@opengis/gis 0.2.111 → 0.2.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as ge, computed as P, openBlock as c, createElementBlock as x, normalizeClass as Ae, renderSlot as Zt, createCommentVNode as K, createElementVNode as o, createTextVNode as Ce, toDisplayString as V, h as Io, mergeModels as Kt, defineAsyncComponent as vt, useModel as Nt, ref as T, watch as le, createVNode as ne, unref as se, withCtx as Oe, createStaticVNode as vn, useSlots as ks, Fragment as ie, renderList as he, normalizeStyle as ft, withModifiers as nt, createBlock as pe, resolveDynamicComponent as Qt, withDirectives as Be, onBeforeUnmount as Ve, onMounted as Ue, resolveComponent as el, shallowRef as tl, onUnmounted as vo, provide as $s, inject as Cs, vModelText as gt, getCurrentInstance as rn, nextTick as st, reactive as It, Teleport as Ot, Transition as Uo, createSlots as Ss, toRef as As, resolveDirective as Ls, vShow as Gt, vModelRadio as Ms, vModelSelect as cr, withKeys as dr } from "vue";
1
+ import { defineComponent as ge, computed as P, openBlock as c, createElementBlock as x, normalizeClass as Ae, renderSlot as Zt, createCommentVNode as K, createElementVNode as o, createTextVNode as Ce, toDisplayString as V, h as Io, mergeModels as Kt, defineAsyncComponent as vt, useModel as Nt, ref as F, watch as le, createVNode as ne, unref as se, withCtx as Oe, createStaticVNode as vn, useSlots as ks, Fragment as ie, renderList as he, normalizeStyle as ft, withModifiers as nt, createBlock as pe, resolveDynamicComponent as Qt, withDirectives as Be, onBeforeUnmount as Ve, onMounted as Ue, resolveComponent as el, shallowRef as tl, onUnmounted as vo, provide as $s, inject as Cs, vModelText as gt, getCurrentInstance as rn, nextTick as st, reactive as It, Teleport as Ot, Transition as Uo, createSlots as Ss, toRef as As, resolveDirective as Ls, vShow as Gt, vModelRadio as Ms, vModelSelect as cr, withKeys as dr } from "vue";
2
2
  import { useRoute as Lt, useRouter as Pt } from "vue-router";
3
3
  import { notify as je, TooltipDirective as Es, confirm as fr, VsPagination as Ts } from "@opengis/core";
4
4
  import { VsInputArraySelect as Fs, VsInputMask as Is } from "@opengis/form";
@@ -598,7 +598,7 @@ const ln = Re("x", [
598
598
  }),
599
599
  emits: ["update:columns"],
600
600
  setup(e) {
601
- const t = vt(() => import("@opengis/form")), n = vt(() => import("@opengis/core").then((b) => b.VsModal)), r = e, l = Nt(e, "columns"), i = T(!1), s = T({}), a = T({ ...r.data || {} });
601
+ const t = vt(() => import("@opengis/form")), n = vt(() => import("@opengis/core").then((b) => b.VsModal)), r = e, l = Nt(e, "columns"), i = F(!1), s = F({}), a = F({ ...r.data || {} });
602
602
  le(
603
603
  () => r.data,
604
604
  (b) => {
@@ -1164,7 +1164,7 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
1164
1164
  function n(S) {
1165
1165
  return S.charAt(0).toUpperCase() + S.slice(1);
1166
1166
  }
1167
- const r = vt(() => import("@opengis/core").then((S) => S.VsModal)), l = vt(() => import("@opengis/form")), i = Nt(e, "modelValue"), s = e, a = T({}), v = T(!1), m = T({}), b = T(null), f = ks(), h = (S) => !!(S && f[S]);
1167
+ const r = vt(() => import("@opengis/core").then((S) => S.VsModal)), l = vt(() => import("@opengis/form")), i = Nt(e, "modelValue"), s = e, a = F({}), v = F(!1), m = F({}), b = F(null), f = ks(), h = (S) => !!(S && f[S]);
1168
1168
  t({
1169
1169
  openCreateDialog: () => {
1170
1170
  v.value = !0;
@@ -1213,7 +1213,7 @@ const ka = /* @__PURE__ */ Te(ba, [["render", _a]]), yr = {
1213
1213
  }
1214
1214
  y();
1215
1215
  }
1216
- const g = T(null), _ = T(null), A = (S) => {
1216
+ const g = F(null), _ = F(null), A = (S) => {
1217
1217
  g.value = S;
1218
1218
  }, E = (S) => {
1219
1219
  _.value = S;
@@ -1505,7 +1505,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
1505
1505
  }),
1506
1506
  emits: ["update:data", "update:form"],
1507
1507
  setup(e) {
1508
- const t = Nt(e, "data"), n = Nt(e, "form"), r = e, l = P(() => Array.isArray(r.fields) ? r.fields : []), i = (_) => nn(_ || {}), s = vt(() => import("@opengis/form")), a = T(), v = T(!1), m = T([]), b = () => {
1508
+ const t = Nt(e, "data"), n = Nt(e, "form"), r = e, l = P(() => Array.isArray(r.fields) ? r.fields : []), i = (_) => nn(_ || {}), s = vt(() => import("@opengis/form")), a = F(), v = F(!1), m = F([]), b = () => {
1509
1509
  const _ = h.value.map((A) => i(A)).filter((A) => A.length > 0);
1510
1510
  m.value = [..._], v.value = !0;
1511
1511
  }, f = P(
@@ -1728,7 +1728,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
1728
1728
  }),
1729
1729
  emits: ["update:data", "update:form"],
1730
1730
  setup(e) {
1731
- const t = Nt(e, "data"), n = Nt(e, "form"), r = e, l = P(() => Array.isArray(r.fields) ? r.fields : []), i = (u) => nn(u || {}), s = T(!1), a = T([]), v = () => {
1731
+ const t = Nt(e, "data"), n = Nt(e, "form"), r = e, l = P(() => Array.isArray(r.fields) ? r.fields : []), i = (u) => nn(u || {}), s = F(!1), a = F([]), v = () => {
1732
1732
  const u = m.value.map((d) => i(d)).filter((d) => d.length > 0);
1733
1733
  a.value = [...u], s.value = !0;
1734
1734
  }, m = P({
@@ -1862,7 +1862,7 @@ const Qa = { class: "vs-form" }, Ja = { class: "vs-form__body auto-rows-max cont
1862
1862
  }),
1863
1863
  emits: ["update:data", "update:form"],
1864
1864
  setup(e) {
1865
- const t = Nt(e, "data"), n = Nt(e, "form"), r = e, l = P(() => Array.isArray(r.fields) ? r.fields : []), i = (u) => nn(u || {}), s = T(!1), a = T([]), v = () => {
1865
+ const t = Nt(e, "data"), n = Nt(e, "form"), r = e, l = P(() => Array.isArray(r.fields) ? r.fields : []), i = (u) => nn(u || {}), s = F(!1), a = F([]), v = () => {
1866
1866
  const u = m.value.map((d) => i(d)).filter((d) => d.length > 0);
1867
1867
  a.value = [...u], s.value = !0;
1868
1868
  }, m = P({
@@ -2779,7 +2779,7 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
2779
2779
  var y;
2780
2780
  return ((y = n.resolve(r.value).meta) == null ? void 0 : y.title) ?? "";
2781
2781
  }
2782
- ), i = T("list"), s = T(""), a = [
2782
+ ), i = F("list"), s = F(""), a = [
2783
2783
  { name: "Список", id: "list" },
2784
2784
  { name: "Фільтри", id: "filters" },
2785
2785
  { name: "Картка", id: "card" },
@@ -2789,12 +2789,12 @@ const hu = { class: "flex flex-col md:flex-row md:justify-between lg:flex-row lg
2789
2789
  filters: cu,
2790
2790
  card: gu,
2791
2791
  preview: ld
2792
- }, m = a.map((y) => y.id), b = T({
2792
+ }, m = a.map((y) => y.id), b = F({
2793
2793
  columns: [],
2794
2794
  filters: [],
2795
2795
  card: [],
2796
2796
  tableData: []
2797
- }), f = T([]), h = async () => {
2797
+ }), f = F([]), h = async () => {
2798
2798
  var p;
2799
2799
  if (!((p = b.value) == null ? void 0 : p.token)) {
2800
2800
  je({
@@ -4417,7 +4417,7 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
4417
4417
  },
4418
4418
  emits: ["saved"],
4419
4419
  setup(e, { emit: t }) {
4420
- const n = vt(() => import("@opengis/core").then((k) => k.VsModal)), r = vt(() => import("@opengis/form")), l = e, i = t, s = T(null);
4420
+ const n = vt(() => import("@opengis/core").then((k) => k.VsModal)), r = vt(() => import("@opengis/form")), l = e, i = t, s = F(null);
4421
4421
  async function a(k) {
4422
4422
  var S;
4423
4423
  try {
@@ -4478,7 +4478,7 @@ const Jp = /* @__PURE__ */ Te(Kp, [["render", Qp]]), Jo = /* @__PURE__ */ ge({
4478
4478
  { label: "Рік", value: M },
4479
4479
  { label: "Ключові слова", value: N }
4480
4480
  ];
4481
- }), d = T(!1), y = T({}), p = T(null), g = T(!1), _ = [
4481
+ }), d = F(!1), y = F({}), p = F(null), g = F(!1), _ = [
4482
4482
  {
4483
4483
  name: "description",
4484
4484
  type: "textarea",
@@ -5002,7 +5002,7 @@ const Gn = /* @__PURE__ */ ge({
5002
5002
  },
5003
5003
  emits: ["update:modelValue", "load"],
5004
5004
  setup(e, { emit: t }) {
5005
- const n = e, r = t, l = T(null);
5005
+ const n = e, r = t, l = F(null);
5006
5006
  let i = null, s = null, a = !1;
5007
5007
  function v() {
5008
5008
  return new Promise((b, f) => {
@@ -5078,7 +5078,7 @@ const Gn = /* @__PURE__ */ ge({
5078
5078
  },
5079
5079
  emits: ["update:style-yaml", "update:style-text", "update"],
5080
5080
  setup(e, { emit: t }) {
5081
- const n = e, r = t, l = T("");
5081
+ const n = e, r = t, l = F("");
5082
5082
  le(
5083
5083
  () => n.styleText,
5084
5084
  (v) => {
@@ -5210,7 +5210,7 @@ function pn(e) {
5210
5210
  }
5211
5211
  const os = Symbol("MapContext");
5212
5212
  function Lm(e) {
5213
- const t = tl(null), n = T(!1);
5213
+ const t = tl(null), n = F(!1);
5214
5214
  let r = !1;
5215
5215
  const l = [], i = () => {
5216
5216
  r = !0, l.length && l.forEach((u) => u());
@@ -5639,22 +5639,22 @@ function Xe(e, t, n) {
5639
5639
  a.point && (a.source = qm(a.point)), !a.layer && ((ae = a.source) == null ? void 0 : ae.type) === "raster" && (a.layer = { id: s, type: "raster", source: s }), a.layer && !a.layer.source && Object.assign(a.layer, { source: s });
5640
5640
  let v = !1, m = !1;
5641
5641
  const b = () => {
5642
- var X, ue, Y, R, O, re, F, $, I, B;
5642
+ var X, ue, Y, R, O, re, T, $, I, B;
5643
5643
  if (!(m || !r.value)) {
5644
5644
  if (a.source && !r.value.getSource(s) && r.value.addSource(s, a.source), !r.value.getLayer(i)) {
5645
5645
  const U = a.beforeId === 0 ? (ue = (X = r.value.getStyle().layers) == null ? void 0 : X[0]) == null ? void 0 : ue.id : a.beforeId;
5646
5646
  (R = (Y = a.layer) == null ? void 0 : Y.style) != null && R.icon && Or(r.value, a.layer.style.icon, a.layer.style.colors);
5647
- const te = ((O = a.source) == null ? void 0 : O.type) || ((re = a.layer) == null ? void 0 : re.type), fe = a.layer && (a.layer.type || a.layer.ref) ? a.layer : null, me = (F = a.layer) == null ? void 0 : F.style, xe = (($ = a.layer) == null ? void 0 : $["source-layer"]) || ((I = a.source) == null ? void 0 : I["source-layer"]) || a.sourceLayer || s, Fe = a.style || me, Ne = Rr(Fe, {
5647
+ const te = ((O = a.source) == null ? void 0 : O.type) || ((re = a.layer) == null ? void 0 : re.type), de = a.layer && (a.layer.type || a.layer.ref) ? a.layer : null, me = (T = a.layer) == null ? void 0 : T.style, xe = (($ = a.layer) == null ? void 0 : $["source-layer"]) || ((I = a.source) == null ? void 0 : I["source-layer"]) || a.sourceLayer || s, Fe = a.style || me, Ne = Rr(Fe, {
5648
5648
  sourceType: te,
5649
5649
  filter: (B = a.layer) == null ? void 0 : B.filter,
5650
- allowFallback: !fe
5650
+ allowFallback: !de
5651
5651
  });
5652
5652
  if (!Ne.length) {
5653
- if (fe) {
5653
+ if (de) {
5654
5654
  const H = {
5655
- ...fe,
5656
- id: fe.id || i,
5657
- source: fe.source || s
5655
+ ...de,
5656
+ id: de.id || i,
5657
+ source: de.source || s
5658
5658
  };
5659
5659
  te === "vector" && xe && (H["source-layer"] = H["source-layer"] || xe), r.value.addLayer(H, U);
5660
5660
  }
@@ -5687,20 +5687,20 @@ function Xe(e, t, n) {
5687
5687
  r.value.removeLayer(re.id);
5688
5688
  }), m = !0, a.source && X && r.value.getSource(s) && r.value.removeSource(s);
5689
5689
  }, d = async (X) => {
5690
- var O, re, F, $, I;
5690
+ var O, re, T, $, I;
5691
5691
  if (!r.value) return;
5692
5692
  X != null && X.icon && Or(r.value, X.icon, X.colors);
5693
- const ue = ((O = a.source) == null ? void 0 : O.type) || ((re = a.layer) == null ? void 0 : re.type), Y = ((F = a.layer) == null ? void 0 : F["source-layer"]) || (($ = a.source) == null ? void 0 : $["source-layer"]) || a.sourceLayer || s, R = Rr(X, {
5693
+ const ue = ((O = a.source) == null ? void 0 : O.type) || ((re = a.layer) == null ? void 0 : re.type), Y = ((T = a.layer) == null ? void 0 : T["source-layer"]) || (($ = a.source) == null ? void 0 : $["source-layer"]) || a.sourceLayer || s, R = Rr(X, {
5694
5694
  sourceType: ue,
5695
5695
  filter: (I = a.layer) == null ? void 0 : I.filter,
5696
5696
  allowFallback: !0
5697
5697
  });
5698
5698
  u(!1), R.forEach((B, U) => {
5699
- var fe;
5699
+ var de;
5700
5700
  const te = {
5701
5701
  ...B,
5702
5702
  id: `${i}${U}`,
5703
- source: ((fe = a.layer) == null ? void 0 : fe.source) || s
5703
+ source: ((de = a.layer) == null ? void 0 : de.source) || s
5704
5704
  };
5705
5705
  ue === "vector" && Y && (te["source-layer"] = te["source-layer"] || Y), r.value.addLayer(te);
5706
5706
  });
@@ -5812,7 +5812,7 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
5812
5812
  },
5813
5813
  emits: ["update:columns", "save"],
5814
5814
  setup(e, { emit: t }) {
5815
- const n = e, r = t, l = T(n.columns || []);
5815
+ const n = e, r = t, l = F(n.columns || []);
5816
5816
  le(
5817
5817
  () => n.columns,
5818
5818
  (d) => l.value = d || [],
@@ -5821,7 +5821,7 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
5821
5821
  const y = Xe(n.token);
5822
5822
  y && (y.popup = d), r("update:columns", d);
5823
5823
  });
5824
- const i = T("list"), s = T(!1), a = T([]), v = [
5824
+ const i = F("list"), s = F(!1), a = F([]), v = [
5825
5825
  { key: "name", label: "Назва", type: "main" }
5826
5826
  // { key: "ua", label: "UA" },
5827
5827
  // { key: "format", label: "Format" },
@@ -5904,7 +5904,7 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
5904
5904
  },
5905
5905
  emits: ["update:columns", "save"],
5906
5906
  setup(e, { emit: t }) {
5907
- const n = e, r = t, l = T(n.columns || []);
5907
+ const n = e, r = t, l = F(n.columns || []);
5908
5908
  le(
5909
5909
  () => n.columns,
5910
5910
  (d) => {
@@ -5913,7 +5913,7 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
5913
5913
  ), le(l, (d) => {
5914
5914
  r("update:columns", d);
5915
5915
  });
5916
- const i = T(!1), s = T({
5916
+ const i = F(!1), s = F({
5917
5917
  name: "",
5918
5918
  color: "#2E86DE"
5919
5919
  }), a = vt(
@@ -6106,20 +6106,20 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
6106
6106
  },
6107
6107
  emits: ["update:columns", "save"],
6108
6108
  setup(e, { emit: t }) {
6109
- const n = e, r = t, l = T(n.columns || []);
6109
+ const n = e, r = t, l = F(n.columns || []);
6110
6110
  le(
6111
6111
  () => n.columns,
6112
6112
  (p) => l.value = p || [],
6113
6113
  { immediate: !0 }
6114
6114
  ), le(l, (p) => r("update:columns", p));
6115
- const i = T(n.viewMode ?? "list");
6115
+ const i = F(n.viewMode ?? "list");
6116
6116
  le(
6117
6117
  () => n.viewMode,
6118
6118
  (p) => {
6119
6119
  p && p !== i.value && (i.value = p);
6120
6120
  }
6121
6121
  );
6122
- const s = T(n.html ?? "");
6122
+ const s = F(n.html ?? "");
6123
6123
  le(
6124
6124
  () => n.html,
6125
6125
  (p) => {
@@ -6127,7 +6127,7 @@ const Hm = { class: "flex flex-col flex-1 min-h-0" }, Wm = { class: "flex flex-c
6127
6127
  },
6128
6128
  { immediate: !0 }
6129
6129
  );
6130
- const a = T(!1), v = T([]), m = [
6130
+ const a = F(!1), v = F([]), m = [
6131
6131
  { key: "name", label: "Name", type: "main" }
6132
6132
  // { key: "ua", label: "UA" },
6133
6133
  // { key: 'format', label: 'Format' },
@@ -6270,13 +6270,13 @@ ${E}` : E;
6270
6270
  setup(e, { emit: t }) {
6271
6271
  const n = e, r = t;
6272
6272
  console.log(n.columns);
6273
- const l = T(n.columns || []);
6273
+ const l = F(n.columns || []);
6274
6274
  le(
6275
6275
  () => n.columns,
6276
6276
  (d) => l.value = d || [],
6277
6277
  { immediate: !0 }
6278
6278
  ), le(l, (d) => r("update:columns", d), { deep: !0, immediate: !0 });
6279
- const i = T("list"), s = T(!1), a = T([]), v = [
6279
+ const i = F("list"), s = F(!1), a = F([]), v = [
6280
6280
  { key: "id", label: "Name" },
6281
6281
  { key: "label", label: "UA" }
6282
6282
  // { key: "type", label: "Тип" },
@@ -6362,10 +6362,10 @@ ${E}` : E;
6362
6362
  function nr() {
6363
6363
  const e = rn();
6364
6364
  if (!e)
6365
- return T(null);
6365
+ return F(null);
6366
6366
  const t = e.appContext.config.globalProperties;
6367
6367
  let n = t[Dr];
6368
- return n || (n = T(t.$settings ?? null), Object.defineProperty(t, "$settings", {
6368
+ return n || (n = F(t.$settings ?? null), Object.defineProperty(t, "$settings", {
6369
6369
  configurable: !0,
6370
6370
  enumerable: !0,
6371
6371
  get: () => n.value,
@@ -6377,7 +6377,7 @@ function nr() {
6377
6377
  const fv = /* @__PURE__ */ ge({
6378
6378
  __name: "MapView",
6379
6379
  setup(e, { expose: t }) {
6380
- const n = T(null), r = T(null), l = nr(), i = Lm({
6380
+ const n = F(null), r = F(null), l = nr(), i = Lm({
6381
6381
  container: n,
6382
6382
  mapOptions: {
6383
6383
  style: {
@@ -6468,12 +6468,12 @@ const fv = /* @__PURE__ */ ge({
6468
6468
  m.remove();
6469
6469
  }), (_, A) => null;
6470
6470
  }
6471
- }), Bn = T(null);
6471
+ }), Bn = F(null);
6472
6472
  function mv() {
6473
6473
  Bn.value = null;
6474
6474
  }
6475
6475
  function vv(e) {
6476
- const t = T(!1), n = () => typeof e == "string" ? e : e.value;
6476
+ const t = F(!1), n = () => typeof e == "string" ? e : e.value;
6477
6477
  le(Bn, (s) => {
6478
6478
  s !== n() && t.value && (t.value = !1);
6479
6479
  });
@@ -6503,29 +6503,29 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6503
6503
  },
6504
6504
  setup(e) {
6505
6505
  const t = vt(() => import("@opengis/filter")), n = e, r = P(() => {
6506
- var F;
6507
- return ((F = n.layer) == null ? void 0 : F.id) ?? "";
6506
+ var T;
6507
+ return ((T = n.layer) == null ? void 0 : T.id) ?? "";
6508
6508
  }), l = P(() => `filter-popover-${r.value}`), {
6509
6509
  isOpen: i,
6510
6510
  close: s,
6511
6511
  toggle: a
6512
- } = vv(l), v = It({ top: 0, left: 0, transform: "translateX(-50%)" }), m = T(null), b = T(null);
6512
+ } = vv(l), v = It({ top: 0, left: 0, transform: "translateX(-50%)" }), m = F(null), b = F(null);
6513
6513
  let f = null;
6514
- const h = T({}), u = It({
6514
+ const h = F({}), u = It({
6515
6515
  visible: !1,
6516
6516
  text: "Спочатку активуйте шар, щоб застосувати фільтр",
6517
6517
  top: 0,
6518
6518
  left: 0
6519
6519
  }), d = P(() => i.value), y = P(() => {
6520
- var F;
6521
- return Array.isArray((F = n.layer) == null ? void 0 : F.filters) ? n.layer.filters : [];
6520
+ var T;
6521
+ return Array.isArray((T = n.layer) == null ? void 0 : T.filters) ? n.layer.filters : [];
6522
6522
  }), p = P(() => y.value.length > 0), g = P(() => {
6523
- var F;
6524
- return ((F = n.layer) == null ? void 0 : F.name) ?? "";
6525
- }), _ = P(() => y.value), A = T(null), E = P(() => y.value.length), k = P(() => E.value <= 2), S = P(() => k.value ? "body" : typeof window > "u" || A.value ? Eo : "body"), C = P(() => {
6523
+ var T;
6524
+ return ((T = n.layer) == null ? void 0 : T.name) ?? "";
6525
+ }), _ = P(() => y.value), A = F(null), E = P(() => y.value.length), k = P(() => E.value <= 2), S = P(() => k.value ? "body" : typeof window > "u" || A.value ? Eo : "body"), C = P(() => {
6526
6526
  if (!d.value || !k.value)
6527
6527
  return {};
6528
- const F = typeof window < "u" ? window.innerWidth : 280, I = Math.max(280, F - 16 * 2);
6528
+ const T = typeof window < "u" ? window.innerWidth : 280, I = Math.max(280, T - 16 * 2);
6529
6529
  return {
6530
6530
  position: "absolute",
6531
6531
  top: `${v.top}px`,
@@ -6539,28 +6539,28 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6539
6539
  function M() {
6540
6540
  s();
6541
6541
  }
6542
- function N(F, $, I = 8) {
6542
+ function N(T, $, I = 8) {
6543
6543
  const B = window.scrollY + I, U = window.scrollY + window.innerHeight - I;
6544
- let te = F;
6544
+ let te = T;
6545
6545
  return te + $ > U && (te = U - $), te < B && (te = B), te;
6546
6546
  }
6547
6547
  function D() {
6548
6548
  var me, xe, Fe;
6549
6549
  if (!m.value || !k.value) return;
6550
- const F = m.value.getBoundingClientRect(), $ = window.scrollX + 8, I = window.scrollX + window.innerWidth - 8, B = ((me = b.value) == null ? void 0 : me.offsetWidth) || 280, U = ((xe = b.value) == null ? void 0 : xe.offsetHeight) || 0;
6551
- let te = 0, fe = 0;
6550
+ const T = m.value.getBoundingClientRect(), $ = window.scrollX + 8, I = window.scrollX + window.innerWidth - 8, B = ((me = b.value) == null ? void 0 : me.offsetWidth) || 280, U = ((xe = b.value) == null ? void 0 : xe.offsetHeight) || 0;
6551
+ let te = 0, de = 0;
6552
6552
  if ((Fe = n.catalogAnchor) != null && Fe.value) {
6553
6553
  const Ne = n.catalogAnchor.value.getBoundingClientRect(), H = Ne.top + window.scrollY;
6554
6554
  te = N(H, U, 8);
6555
6555
  const ce = Ne.right + window.scrollX + 12, w = I - B, z = $;
6556
- fe = Math.min(Math.max(ce, z), Math.max(z, w));
6556
+ de = Math.min(Math.max(ce, z), Math.max(z, w));
6557
6557
  } else {
6558
- const Ne = F.bottom + window.scrollY + 8;
6558
+ const Ne = T.bottom + window.scrollY + 8;
6559
6559
  te = N(Ne, U, 8);
6560
- let H = F.left + window.scrollX;
6561
- H < $ && (H = $), H + B > I && (H = Math.max($, I - B)), fe = H;
6560
+ let H = T.left + window.scrollX;
6561
+ H < $ && (H = $), H + B > I && (H = Math.max($, I - B)), de = H;
6562
6562
  }
6563
- v.left = fe, v.top = te, v.transform = "none";
6563
+ v.left = de, v.top = te, v.transform = "none";
6564
6564
  }
6565
6565
  function Q() {
6566
6566
  k.value || re(), a(), i.value && k.value && st(() => {
@@ -6570,37 +6570,37 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6570
6570
  function oe() {
6571
6571
  n.disabled || Q();
6572
6572
  }
6573
- le(d, (F) => {
6574
- F && k.value ? st(() => {
6573
+ le(d, (T) => {
6574
+ T && k.value ? st(() => {
6575
6575
  D(), R(), requestAnimationFrame(() => D());
6576
6576
  }) : (O(), k.value || re());
6577
6577
  }), le(_, () => {
6578
6578
  !d.value || !k.value || st(() => D());
6579
- }, { deep: !0 }), le(k, (F) => {
6580
- d.value && (F ? st(() => {
6579
+ }, { deep: !0 }), le(k, (T) => {
6580
+ d.value && (T ? st(() => {
6581
6581
  D(), R();
6582
6582
  }) : (O(), re()));
6583
6583
  }), le(
6584
6584
  () => n.disabled,
6585
- (F) => {
6586
- F && (s(), h.value = {});
6585
+ (T) => {
6586
+ T && (s(), h.value = {});
6587
6587
  }
6588
6588
  );
6589
6589
  function ae() {
6590
6590
  !d.value || !k.value || D();
6591
6591
  }
6592
- function X(F) {
6592
+ function X(T) {
6593
6593
  const $ = r.value;
6594
6594
  if (!$) return;
6595
6595
  const I = Xe($);
6596
6596
  if (!(I != null && I.setFilter)) return;
6597
- h.value = F;
6598
- const B = Object.entries(F).map(([U, te]) => `${U}=${te}`).join("|");
6597
+ h.value = T;
6598
+ const B = Object.entries(T).map(([U, te]) => `${U}=${te}`).join("|");
6599
6599
  I.setFilter(B);
6600
6600
  }
6601
- function ue(F) {
6601
+ function ue(T) {
6602
6602
  if (!n.disabled) return;
6603
- const $ = F.currentTarget;
6603
+ const $ = T.currentTarget;
6604
6604
  if (!$) return;
6605
6605
  const I = $.getBoundingClientRect();
6606
6606
  u.left = I.left + I.width / 2 + window.scrollX, u.top = I.bottom + 8 + window.scrollY, u.visible = !0;
@@ -6624,7 +6624,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6624
6624
  function re() {
6625
6625
  typeof window > "u" || typeof document > "u" || (A.value = document.querySelector(Eo));
6626
6626
  }
6627
- return (F, $) => p.value ? (c(), x("div", {
6627
+ return (T, $) => p.value ? (c(), x("div", {
6628
6628
  key: 0,
6629
6629
  class: "mapLayer-filter",
6630
6630
  ref_key: "anchor",
@@ -6774,7 +6774,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6774
6774
  }), u = P(() => {
6775
6775
  const E = h.value;
6776
6776
  return Object.keys(E).length ? E : t;
6777
- }), d = T(
6777
+ }), d = F(
6778
6778
  f.value ?? Object.keys(u.value)[0] ?? "gki"
6779
6779
  ), y = Xe("base", {
6780
6780
  source: {
@@ -6849,7 +6849,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6849
6849
  items: {}
6850
6850
  },
6851
6851
  setup(e) {
6852
- const t = e, { map: n, ready: r } = it(), l = T([]);
6852
+ const t = e, { map: n, ready: r } = it(), l = F([]);
6853
6853
  let i = null;
6854
6854
  function s(b) {
6855
6855
  return b ? b.map((f, h) => {
@@ -6916,7 +6916,7 @@ const gv = { class: "map-filter" }, yv = { class: "map-filter__header" }, hv = {
6916
6916
  }
6917
6917
  });
6918
6918
  function Mv() {
6919
- const { map: e, ready: t } = it(), n = T(null), r = T(null), l = T(null), i = T(null);
6919
+ const { map: e, ready: t } = it(), n = F(null), r = F(null), l = F(null), i = F(null);
6920
6920
  let s = [];
6921
6921
  function a() {
6922
6922
  s.forEach((u) => u()), s = [];
@@ -6964,7 +6964,7 @@ const Ev = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
6964
6964
  popupFields: n,
6965
6965
  popupValues: r,
6966
6966
  disable: l
6967
- } = Mv(), { map: i } = it(), s = T(null), a = T({ left: "-9999px", top: "-9999px" }), v = new Intl.NumberFormat("uk-UA", {
6967
+ } = Mv(), { map: i } = it(), s = F(null), a = F({ left: "-9999px", top: "-9999px" }), v = new Intl.NumberFormat("uk-UA", {
6968
6968
  maximumFractionDigits: 2
6969
6969
  });
6970
6970
  function m(y, p) {
@@ -7043,7 +7043,7 @@ const Ev = { class: "min-w-[200px] max-w-[280px] rounded-lg border border-slate-
7043
7043
  }
7044
7044
  });
7045
7045
  function jv() {
7046
- const { map: e, ready: t } = it(), n = Lt(), r = Pt(), l = T(null), i = T(null), s = T(null), a = T(!1), v = T([]), m = T(0), b = P(() => v.value.length), f = P(() => a.value || !!l.value || !!s.value);
7046
+ const { map: e, ready: t } = it(), n = Lt(), r = Pt(), l = F(null), i = F(null), s = F(null), a = F(!1), v = F([]), m = F(0), b = P(() => v.value.length), f = P(() => a.value || !!l.value || !!s.value);
7047
7047
  let h = null, u = !1;
7048
7048
  function d() {
7049
7049
  l.value = null, i.value = null, s.value = null, a.value = !1, v.value = [], m.value = 0;
@@ -7089,7 +7089,7 @@ function jv() {
7089
7089
  m.value <= 0 || _(m.value - 1);
7090
7090
  }
7091
7091
  async function k(oe, ae) {
7092
- var Y, R, O, re, F;
7092
+ var Y, R, O, re, T;
7093
7093
  if (!((Y = oe == null ? void 0 : oe.properties) != null && Y.id)) return;
7094
7094
  const X = new URLSearchParams();
7095
7095
  X.set("layer", oe.source), X.set("id", String((R = oe.properties) == null ? void 0 : R.id));
@@ -7110,14 +7110,14 @@ function jv() {
7110
7110
  columns: B,
7111
7111
  html: I.html || null
7112
7112
  }, u || D(i.value);
7113
- const fe = ((O = I.rows) == null ? void 0 : O.geom) ?? ((re = I.data) == null ? void 0 : re.geom);
7114
- if (fe) {
7115
- const me = typeof fe == "string" ? JSON.parse(fe) : fe;
7113
+ const de = ((O = I.rows) == null ? void 0 : O.geom) ?? ((re = I.data) == null ? void 0 : re.geom);
7114
+ if (de) {
7115
+ const me = typeof de == "string" ? JSON.parse(de) : de;
7116
7116
  me && (i.value = {
7117
7117
  ...i.value,
7118
7118
  geometry: me,
7119
7119
  properties: {
7120
- ...((F = i.value) == null ? void 0 : F.properties) || {},
7120
+ ...((T = i.value) == null ? void 0 : T.properties) || {},
7121
7121
  geom: me,
7122
7122
  geom_4326: me
7123
7123
  }
@@ -7198,7 +7198,7 @@ function jv() {
7198
7198
  };
7199
7199
  }
7200
7200
  function zv() {
7201
- const { map: e, ready: t } = it(), n = T([]), r = T(0), l = T(0), i = T(!1), s = T(null), a = T({}), v = T(null), m = T([]), b = P(() => n.value[l.value] || null), f = P(() => n.value.length > 0);
7201
+ const { map: e, ready: t } = it(), n = F([]), r = F(0), l = F(0), i = F(!1), s = F(null), a = F({}), v = F(null), m = F([]), b = P(() => n.value[l.value] || null), f = P(() => n.value.length > 0);
7202
7202
  let h = null;
7203
7203
  const u = () => {
7204
7204
  h == null || h.remove(), h = null;
@@ -7226,21 +7226,21 @@ function zv() {
7226
7226
  const [Q, oe] = [p(M), p(N)];
7227
7227
  v.value = { x: Q, y: oe }, m.value = D, i.value = !0, s.value = null, n.value = [], a.value = {}, l.value = 0;
7228
7228
  try {
7229
- const ue = D.map(async (F) => {
7230
- const $ = `/api/map-info-point?x=${Q}&y=${oe}&layers=${F}`, I = await fetch($);
7229
+ const ue = D.map(async (T) => {
7230
+ const $ = `/api/map-info-point?x=${Q}&y=${oe}&layers=${T}`, I = await fetch($);
7231
7231
  if (!I.ok) return null;
7232
7232
  const B = await I.json();
7233
7233
  if (!B.count) return null;
7234
7234
  const te = await (await fetch(`${$}&index=0`)).json();
7235
- return { layerId: F, data: te, count: B.count };
7235
+ return { layerId: T, data: te, count: B.count };
7236
7236
  }), R = (await Promise.all(ue)).filter(Boolean);
7237
7237
  if (R.length === 0) {
7238
7238
  r.value = 0;
7239
7239
  return;
7240
7240
  }
7241
- n.value = R.map((F) => F.data);
7241
+ n.value = R.map((T) => T.data);
7242
7242
  const [O] = n.value;
7243
- r.value = R.reduce((F, $) => F + ($.count || 0), 0), a.value[0] = O;
7243
+ r.value = R.reduce((T, $) => T + ($.count || 0), 0), a.value[0] = O;
7244
7244
  const re = ((ae = O == null ? void 0 : O.data) == null ? void 0 : ae.geom_4326) ?? ((X = O == null ? void 0 : O.data) == null ? void 0 : X.geom);
7245
7245
  await g(re);
7246
7246
  } catch (ue) {
@@ -7291,9 +7291,9 @@ function zv() {
7291
7291
  service: ((Y = ue == null ? void 0 : ue.opts) == null ? void 0 : Y.service) ?? ((O = (R = ue == null ? void 0 : ue.opts) == null ? void 0 : R.source) == null ? void 0 : O.service) ?? null,
7292
7292
  count: ((re = ue == null ? void 0 : ue.opts) == null ? void 0 : re.count) ?? null,
7293
7293
  visible: (() => {
7294
- var F;
7294
+ var T;
7295
7295
  try {
7296
- return ((F = e.value) == null ? void 0 : F.getLayer(X)) ? e.value.getLayoutProperty(X, "visibility") !== "none" : !0;
7296
+ return ((T = e.value) == null ? void 0 : T.getLayer(X)) ? e.value.getLayoutProperty(X, "visibility") !== "none" : !0;
7297
7297
  } catch {
7298
7298
  return !0;
7299
7299
  }
@@ -7358,7 +7358,7 @@ const Vr = /* @__PURE__ */ ge({
7358
7358
  ])
7359
7359
  ]));
7360
7360
  }
7361
- }), Tt = T([]);
7361
+ }), Tt = F([]);
7362
7362
  function Nv(e, t) {
7363
7363
  return typeof e != "string" ? "" : e.includes("{{") ? e.replace(/\{\{\s*([a-zA-Z0-9_]+)\s*}}/g, (n, r) => {
7364
7364
  const l = String(r || "").trim();
@@ -7524,7 +7524,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7524
7524
  mapId: {}
7525
7525
  },
7526
7526
  setup(e) {
7527
- const t = e, n = jv(), r = zv(), l = T(null), i = T(null), s = P(() => {
7527
+ const t = e, n = jv(), r = zv(), l = F(null), i = F(null), s = P(() => {
7528
7528
  var L;
7529
7529
  return !!((L = l.value) != null && L.trim());
7530
7530
  });
@@ -7563,7 +7563,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7563
7563
  var ve, ke;
7564
7564
  const L = n.cardFeature.value, j = (L == null ? void 0 : L.source) || ((ve = L == null ? void 0 : L.layer) == null ? void 0 : ve.id), Z = ((ke = L == null ? void 0 : L.properties) == null ? void 0 : ke.id) ?? (L == null ? void 0 : L.id);
7565
7565
  return j && Z != null ? `${j}:${Z}` : null;
7566
- }), D = T(null), Q = T(null), oe = T(0), ae = /* @__PURE__ */ new Map();
7566
+ }), D = F(null), Q = F(null), oe = F(0), ae = /* @__PURE__ */ new Map();
7567
7567
  function X() {
7568
7568
  if (typeof window > "u") return null;
7569
7569
  const j = (window.location.pathname || "").match(/\/maps?\/([^/]+)/i);
@@ -7576,14 +7576,14 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7576
7576
  if (j.length) return j;
7577
7577
  const Z = typeof g.query.slug == "string" ? g.query.slug.trim() : "";
7578
7578
  return Z.length ? Z : X();
7579
- }), Y = T(null), R = T(null), O = /* @__PURE__ */ new Map();
7579
+ }), Y = F(null), R = F(null), O = /* @__PURE__ */ new Map();
7580
7580
  function re(L) {
7581
7581
  const j = L.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
7582
7582
  if (j) return j;
7583
7583
  const Z = Array.from(L).map((ve) => ve.charCodeAt(0).toString(16)).join("").slice(0, 8);
7584
7584
  return Z ? `layer-${Z}` : `layer-${Math.random().toString(36).slice(2, 8)}`;
7585
7585
  }
7586
- function F(L) {
7586
+ function T(L) {
7587
7587
  if (typeof L != "string") return "";
7588
7588
  const j = L.trim();
7589
7589
  if (!j) return "";
@@ -7640,7 +7640,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7640
7640
  return String(L[Z]).trim();
7641
7641
  return "";
7642
7642
  }
7643
- function fe(L) {
7643
+ function de(L) {
7644
7644
  if (!(L != null && L.length)) return;
7645
7645
  const j = Number(L);
7646
7646
  return Number.isFinite(j) ? j : void 0;
@@ -7661,12 +7661,12 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7661
7661
  const ur = L.slice(ve, lt);
7662
7662
  ur.trim().length && j.push({ type: "html", content: ur });
7663
7663
  }
7664
- const bt = U(ut), St = te(bt, ["title"]) || "Тимчасовий шар", en = F(te(bt, ["url"]));
7664
+ const bt = U(ut), St = te(bt, ["title"]) || "Тимчасовий шар", en = T(te(bt, ["url"]));
7665
7665
  if (!en) {
7666
7666
  j.push({ type: "html", content: Je }), ve = lt + Je.length;
7667
7667
  continue;
7668
7668
  }
7669
- const Nn = te(bt, ["id"]), wo = te(bt, ["button-text", "buttonText", "show", "show-label", "showLabel"]), vs = fe(te(bt, ["tile-size", "tileSize"])), gs = fe(te(bt, ["minzoom", "minZoom"])), ys = fe(te(bt, ["maxzoom", "maxZoom"])), hs = fe(te(bt, ["opacity"])), xs = B(te(bt, ["bounds", "data-bounds", "bbox"])), bs = Nn || re(`${St}-${en}`) || re(St), ir = Qe(bs || `layer-${j.length + 1}`), _o = xt.trim(), ar = /<[^>]+>/.test(_o), ws = ar ? _o : null, ko = ar ? null : _o, _s = wo && wo.trim().length ? wo.trim() : ko && ko.trim().length ? ko.trim() : void 0;
7669
+ const Nn = te(bt, ["id"]), wo = te(bt, ["button-text", "buttonText", "show", "show-label", "showLabel"]), vs = de(te(bt, ["tile-size", "tileSize"])), gs = de(te(bt, ["minzoom", "minZoom"])), ys = de(te(bt, ["maxzoom", "maxZoom"])), hs = de(te(bt, ["opacity"])), xs = B(te(bt, ["bounds", "data-bounds", "bbox"])), bs = Nn || re(`${St}-${en}`) || re(St), ir = Qe(bs || `layer-${j.length + 1}`), _o = xt.trim(), ar = /<[^>]+>/.test(_o), ws = ar ? _o : null, ko = ar ? null : _o, _s = wo && wo.trim().length ? wo.trim() : ko && ko.trim().length ? ko.trim() : void 0;
7670
7670
  j.push({
7671
7671
  type: "layer",
7672
7672
  spec: {
@@ -7696,7 +7696,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7696
7696
  }
7697
7697
  function xe(L) {
7698
7698
  if (!L) return null;
7699
- const j = typeof L.id == "string" ? L.id.trim() : "", Z = typeof L.title == "string" ? L.title.trim() : "", ve = F(typeof L.url == "string" ? L.url : "");
7699
+ const j = typeof L.id == "string" ? L.id.trim() : "", Z = typeof L.title == "string" ? L.title.trim() : "", ve = T(typeof L.url == "string" ? L.url : "");
7700
7700
  return !j || !ve ? null : {
7701
7701
  id: j,
7702
7702
  title: Z || j,
@@ -7784,7 +7784,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7784
7784
  }
7785
7785
  return [];
7786
7786
  }
7787
- const we = T(!1), We = T(!0), rt = T((() => {
7787
+ const we = F(!1), We = F(!0), rt = F((() => {
7788
7788
  var L, j;
7789
7789
  return typeof window > "u" ? null : ((j = (L = window.localStorage) == null ? void 0 : L.getItem) == null ? void 0 : j.call(L, Br)) ?? null;
7790
7790
  })()), et = (L) => {
@@ -7853,7 +7853,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7853
7853
  }), be = P(() => G.value.filter((L) => L.type === "layer"));
7854
7854
  function Se(L) {
7855
7855
  return Array.isArray(L) ? L.map((j, Z) => {
7856
- const ve = F(typeof (j == null ? void 0 : j.url) == "string" ? j.url : ""), ke = typeof (j == null ? void 0 : j.geohub) == "string" && j.geohub.trim().length ? `/api-hub/tms/${j.geohub.trim()}/ua/{z}/{x}/{y}.png` : "", ze = ((j == null ? void 0 : j.name) || (j == null ? void 0 : j.title) || (j == null ? void 0 : j.label) || `Шар ${Z + 1}`).toString(), Qe = (j == null ? void 0 : j.id) != null ? String(j.id) : re(`${ze}-${Z + 1}`), Je = (j == null ? void 0 : j.buttonText) || (j == null ? void 0 : j.button_text) || null, ut = (j == null ? void 0 : j.description) || (j == null ? void 0 : j.subtitle) || null, xt = ve || F(ke) || "";
7856
+ const ve = T(typeof (j == null ? void 0 : j.url) == "string" ? j.url : ""), ke = typeof (j == null ? void 0 : j.geohub) == "string" && j.geohub.trim().length ? `/api-hub/tms/${j.geohub.trim()}/ua/{z}/{x}/{y}.png` : "", ze = ((j == null ? void 0 : j.name) || (j == null ? void 0 : j.title) || (j == null ? void 0 : j.label) || `Шар ${Z + 1}`).toString(), Qe = (j == null ? void 0 : j.id) != null ? String(j.id) : re(`${ze}-${Z + 1}`), Je = (j == null ? void 0 : j.buttonText) || (j == null ? void 0 : j.button_text) || null, ut = (j == null ? void 0 : j.description) || (j == null ? void 0 : j.subtitle) || null, xt = ve || T(ke) || "";
7857
7857
  if (!xt) return null;
7858
7858
  const lt = {
7859
7859
  id: Qe,
@@ -7969,8 +7969,8 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7969
7969
  next: In,
7970
7970
  prev: jn,
7971
7971
  count: W,
7972
- index: de
7973
- } = r, Ee = P(() => n.count.value), qe = P(() => n.index.value), $e = P(() => Ee.value > 1), Ge = P(() => m.value ? W.value : Ee.value), He = P(() => m.value ? de.value : qe.value), _e = n.next, Ye = n.prev;
7972
+ index: fe
7973
+ } = r, Ee = P(() => n.count.value), qe = P(() => n.index.value), $e = P(() => Ee.value > 1), Ge = P(() => m.value ? W.value : Ee.value), He = P(() => m.value ? fe.value : qe.value), _e = n.next, Ye = n.prev;
7974
7974
  function Ke() {
7975
7975
  const L = yn();
7976
7976
  L && (E(L), S({ action: "clear", owner: L }), D.value = null);
@@ -7993,7 +7993,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
7993
7993
  Ct();
7994
7994
  }), le(C, (L, j) => {
7995
7995
  L && j && L !== j && Ke();
7996
- }), le(de, (L, j) => {
7996
+ }), le(fe, (L, j) => {
7997
7997
  L !== j && Ke();
7998
7998
  }), le(N, (L, j) => {
7999
7999
  L && j && L !== j && Ke();
@@ -8232,7 +8232,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8232
8232
  o("button", {
8233
8233
  onClick: j[0] || (j[0] = //@ts-ignore
8234
8234
  (...Z) => se(jn) && se(jn)(...Z)),
8235
- disabled: se(de) === 0,
8235
+ disabled: se(fe) === 0,
8236
8236
  class: "border p-1 rounded text-xs disabled:opacity-40"
8237
8237
  }, [
8238
8238
  ne(se(mr), { class: "h-4 w-4" })
@@ -8240,7 +8240,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8240
8240
  o("button", {
8241
8241
  onClick: j[1] || (j[1] = //@ts-ignore
8242
8242
  (...Z) => se(In) && se(In)(...Z)),
8243
- disabled: se(de) === se(W) - 1,
8243
+ disabled: se(fe) === se(W) - 1,
8244
8244
  class: "border p-1 rounded text-xs disabled:opacity-40"
8245
8245
  }, [
8246
8246
  ne(se(vr), { class: "h-4 w-4" })
@@ -8484,7 +8484,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8484
8484
  targetAriaLabel: {}
8485
8485
  },
8486
8486
  setup(e) {
8487
- const t = e, { map: n, ready: r } = it(), l = T(null), i = T(null), s = T(null), a = T(null), v = nr(), m = P(() => {
8487
+ const t = e, { map: n, ready: r } = it(), l = F(null), i = F(null), s = F(null), a = F(null), v = nr(), m = P(() => {
8488
8488
  var _;
8489
8489
  return ((_ = v.value) == null ? void 0 : _.map) ?? null;
8490
8490
  });
@@ -8624,12 +8624,12 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8624
8624
  },
8625
8625
  setup(e) {
8626
8626
  var H, ce;
8627
- const n = As(e, "hideServiceKey"), r = Lt(), l = Pt(), { id: i } = r.params, s = T(null), a = T(null), v = T({}), m = T(null), b = ((ce = (H = rn()) == null ? void 0 : H.appContext.config.globalProperties) == null ? void 0 : ce.$settings) || null;
8627
+ const n = As(e, "hideServiceKey"), r = Lt(), l = Pt(), { id: i } = r.params, s = F(null), a = F(null), v = F({}), m = F(null), b = ((ce = (H = rn()) == null ? void 0 : H.appContext.config.globalProperties) == null ? void 0 : ce.$settings) || null;
8628
8628
  function f(w) {
8629
8629
  typeof document > "u" || (document.title = w ? `${w} — Сервіс` : U0);
8630
8630
  }
8631
8631
  let h = null;
8632
- const u = T(!1);
8632
+ const u = F(!1);
8633
8633
  function d() {
8634
8634
  var w;
8635
8635
  return (w = s.value) == null ? void 0 : w.ctx;
@@ -8671,7 +8671,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8671
8671
  };
8672
8672
  r.query.z === ye.z && r.query.x === ye.x && r.query.y === ye.y || l.replace({ query: ye });
8673
8673
  }
8674
- const E = T(null), k = T(""), S = T([]), C = T([]), M = T([]), N = T("list"), D = T(""), Q = T([]), oe = T(!0);
8674
+ const E = F(null), k = F(""), S = F([]), C = F([]), M = F([]), N = F("list"), D = F(""), Q = F([]), oe = F(!0);
8675
8675
  let ae = null;
8676
8676
  const X = P(() => {
8677
8677
  var w, z;
@@ -8693,12 +8693,12 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8693
8693
  { key: "legend", label: "Легенда", icon: Bp },
8694
8694
  { key: "card", label: "Картка", icon: ts },
8695
8695
  { key: "metadata", label: "Метадані", icon: Jo }
8696
- ], O = R.map((w) => w.key), re = T("style");
8696
+ ], O = R.map((w) => w.key), re = F("style");
8697
8697
  Ue(async () => {
8698
8698
  const w = r.query.tab;
8699
- w && O.includes(w) && (re.value = w), await fe(), F();
8699
+ w && O.includes(w) && (re.value = w), await de(), T();
8700
8700
  });
8701
- async function F() {
8701
+ async function T() {
8702
8702
  var ye;
8703
8703
  const w = d();
8704
8704
  if (!(w != null && w.ready)) return;
@@ -8769,7 +8769,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8769
8769
  ae = null, U();
8770
8770
  }, q0);
8771
8771
  }
8772
- const fe = async () => {
8772
+ const de = async () => {
8773
8773
  try {
8774
8774
  const w = await fetch(`/api/gis-service/${i}`);
8775
8775
  if (!w.ok) throw new Error(`${w.status}`);
@@ -8820,7 +8820,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
8820
8820
  headers: { "Content-Type": "application/json" },
8821
8821
  body: JSON.stringify(w)
8822
8822
  })).ok) throw new Error("Save failed");
8823
- je({ type: "success", title: "Успіх", message: `${z} saved` }), await fe();
8823
+ je({ type: "success", title: "Успіх", message: `${z} saved` }), await de();
8824
8824
  } catch (ee) {
8825
8825
  je({ type: "error", title: "Помилка", message: `Failed to save ${z}` }), console.error(ee);
8826
8826
  }
@@ -9001,7 +9001,7 @@ const Bo = "map-card:external-payload", Ov = (e) => e ? typeof e.html == "string
9001
9001
  data: m.value,
9002
9002
  "entity-id": String(se(i)),
9003
9003
  "entity-type": "service",
9004
- onSaved: fe
9004
+ onSaved: de
9005
9005
  }, null, 8, ["data", "entity-id"])) : K("", !0)
9006
9006
  ])
9007
9007
  ])
@@ -9190,7 +9190,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9190
9190
  paint: { "raster-opacity": 1 }
9191
9191
  },
9192
9192
  beforeId: t.beforeId ?? null
9193
- }), { fitBounds: s } = it(), a = T(1);
9193
+ }), { fitBounds: s } = it(), a = F(1);
9194
9194
  le(
9195
9195
  () => t.tileUrl,
9196
9196
  (f) => {
@@ -9348,7 +9348,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9348
9348
  },
9349
9349
  emits: ["saved"],
9350
9350
  setup(e, { emit: t }) {
9351
- const n = e, r = t, l = vt(() => import("@opengis/core").then((U) => U.VsModal)), i = vt(() => import("@opengis/form")), s = T(!1), a = T(null), v = T(null), m = T(null), b = T(null), f = P(() => b.value ? {
9351
+ const n = e, r = t, l = vt(() => import("@opengis/core").then((U) => U.VsModal)), i = vt(() => import("@opengis/form")), s = F(!1), a = F(null), v = F(null), m = F(null), b = F(null), f = P(() => b.value ? {
9352
9352
  position: "fixed",
9353
9353
  top: `${b.value.top}px`,
9354
9354
  left: `${b.value.left}px`
@@ -9356,7 +9356,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9356
9356
  le(s, (U) => {
9357
9357
  U && st(O);
9358
9358
  });
9359
- const h = T(!1), u = T(null), d = T({}), y = T(null), p = T(""), g = T(!1), _ = T(!1), A = T(null), E = P(() => n.entityId || ""), k = (U, te) => U ? typeof U == "function" ? U(te) : typeof U != "string" ? "" : U.includes(":id") ? te ? U.replace(":id", encodeURIComponent(te)) : "" : U : "", S = P(() => {
9359
+ const h = F(!1), u = F(null), d = F({}), y = F(null), p = F(""), g = F(!1), _ = F(!1), A = F(null), E = P(() => n.entityId || ""), k = (U, te) => U ? typeof U == "function" ? U(te) : typeof U != "string" ? "" : U.includes(":id") ? te ? U.replace(":id", encodeURIComponent(te)) : "" : U : "", S = P(() => {
9360
9360
  var U;
9361
9361
  return (U = n.table) == null ? void 0 : U.trim();
9362
9362
  }), C = P(() => {
@@ -9368,8 +9368,8 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9368
9368
  if (S.value)
9369
9369
  return (U) => `/api/table/${U}`;
9370
9370
  }), N = P(() => k(C.value, E.value)), D = P(() => n.saveEndpoint ? k(n.saveEndpoint, E.value) : A.value ? `/api/table/${encodeURIComponent(A.value)}` : k(M.value, E.value)), Q = P(() => k("/api/gis-clear-rtile/:id", E.value)), oe = P(() => k("/api/gis-xml/:id", E.value)), ae = P(() => {
9371
- var fe, me, xe;
9372
- const U = (me = (fe = n.entityInfo) == null ? void 0 : fe.name) == null ? void 0 : me.trim();
9371
+ var de, me, xe;
9372
+ const U = (me = (de = n.entityInfo) == null ? void 0 : de.name) == null ? void 0 : me.trim();
9373
9373
  if (U) return `Редагування ${U}`;
9374
9374
  const te = (xe = n.entityLabel) == null ? void 0 : xe.trim();
9375
9375
  return te ? `Редагування ${te}` : "Редагування";
@@ -9383,30 +9383,30 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9383
9383
  function O() {
9384
9384
  var w;
9385
9385
  if (typeof window > "u" || !v.value) return;
9386
- const U = v.value.getBoundingClientRect(), te = window.innerWidth, fe = window.innerHeight, me = U.left, xe = Math.max(te - Rg - Rn, Rn), Fe = Math.min(Math.max(me, Rn), xe), Ne = ((w = m.value) == null ? void 0 : w.offsetHeight) ?? 0, H = U.bottom + qr;
9386
+ const U = v.value.getBoundingClientRect(), te = window.innerWidth, de = window.innerHeight, me = U.left, xe = Math.max(te - Rg - Rn, Rn), Fe = Math.min(Math.max(me, Rn), xe), Ne = ((w = m.value) == null ? void 0 : w.offsetHeight) ?? 0, H = U.bottom + qr;
9387
9387
  let ce = H;
9388
- if (Ne && H + Ne > fe - Rn) {
9388
+ if (Ne && H + Ne > de - Rn) {
9389
9389
  const z = U.top - qr - Ne;
9390
9390
  ce = Math.max(z, Rn);
9391
9391
  }
9392
9392
  b.value = { top: ce, left: Fe };
9393
9393
  }
9394
9394
  function re(U) {
9395
- var fe, me;
9395
+ var de, me;
9396
9396
  if (!a.value && !m.value) return;
9397
9397
  const te = U.target;
9398
- te && ((fe = a.value) != null && fe.contains(te) || (me = m.value) != null && me.contains(te)) || (s.value = !1);
9398
+ te && ((de = a.value) != null && de.contains(te) || (me = m.value) != null && me.contains(te)) || (s.value = !1);
9399
9399
  }
9400
- function F() {
9400
+ function T() {
9401
9401
  s.value && O();
9402
9402
  }
9403
9403
  Ue(() => {
9404
- window.addEventListener("click", re), window.addEventListener("resize", F), window.addEventListener("scroll", F, !0);
9404
+ window.addEventListener("click", re), window.addEventListener("resize", T), window.addEventListener("scroll", T, !0);
9405
9405
  }), vo(() => {
9406
- window.removeEventListener("click", re), window.removeEventListener("resize", F), window.removeEventListener("scroll", F, !0);
9406
+ window.removeEventListener("click", re), window.removeEventListener("resize", T), window.removeEventListener("scroll", T, !0);
9407
9407
  });
9408
9408
  async function $() {
9409
- var U, te, fe;
9409
+ var U, te, de;
9410
9410
  if (!(!E.value || !N.value)) {
9411
9411
  R(), h.value = !0, g.value = !0, p.value = "", u.value = null, d.value = {}, A.value = null;
9412
9412
  try {
@@ -9415,7 +9415,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9415
9415
  throw new Error(`Failed to load form: ${me.status}`);
9416
9416
  const xe = await me.json();
9417
9417
  d.value = (xe == null ? void 0 : xe.data) || {}, u.value = (xe == null ? void 0 : xe.schema) || null;
9418
- const Fe = typeof (xe == null ? void 0 : xe.token) == "string" && xe.token || typeof ((U = xe == null ? void 0 : xe.tokens) == null ? void 0 : U.edit) == "string" && xe.tokens.edit || typeof ((te = xe == null ? void 0 : xe.tokens) == null ? void 0 : te.edit_token) == "string" && xe.tokens.edit_token || typeof ((fe = xe == null ? void 0 : xe.data) == null ? void 0 : fe.token) == "string" && xe.data.token || null;
9418
+ const Fe = typeof (xe == null ? void 0 : xe.token) == "string" && xe.token || typeof ((U = xe == null ? void 0 : xe.tokens) == null ? void 0 : U.edit) == "string" && xe.tokens.edit || typeof ((te = xe == null ? void 0 : xe.tokens) == null ? void 0 : te.edit_token) == "string" && xe.tokens.edit_token || typeof ((de = xe == null ? void 0 : xe.data) == null ? void 0 : de.token) == "string" && xe.data.token || null;
9419
9419
  A.value = Fe, y.value = null;
9420
9420
  } catch (me) {
9421
9421
  console.error("Failed to load edit form", me), p.value = "Не вдалося завантажити форму редагування";
@@ -9431,12 +9431,12 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9431
9431
  var U, te;
9432
9432
  if (!(!E.value || !D.value)) {
9433
9433
  if (y.value) {
9434
- const fe = (te = (U = y.value).validate) == null ? void 0 : te.call(U);
9435
- if (fe) {
9434
+ const de = (te = (U = y.value).validate) == null ? void 0 : te.call(U);
9435
+ if (de) {
9436
9436
  je({
9437
9437
  type: "warning",
9438
9438
  title: "Validation",
9439
- message: Object.entries(fe).map(([me, xe]) => `${me}: ${xe}`).join(`
9439
+ message: Object.entries(de).map(([me, xe]) => `${me}: ${xe}`).join(`
9440
9440
  `)
9441
9441
  });
9442
9442
  return;
@@ -9444,19 +9444,19 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9444
9444
  }
9445
9445
  _.value = !0;
9446
9446
  try {
9447
- const fe = await fetch(D.value, {
9447
+ const de = await fetch(D.value, {
9448
9448
  method: ue.value,
9449
9449
  headers: { "Content-Type": "application/json" },
9450
9450
  body: JSON.stringify(d.value)
9451
9451
  });
9452
- if (!fe.ok) throw new Error(`Failed to save: ${fe.status}`);
9452
+ if (!de.ok) throw new Error(`Failed to save: ${de.status}`);
9453
9453
  je({
9454
9454
  type: "success",
9455
9455
  title: "Збережено",
9456
9456
  message: "Зміни збережено"
9457
9457
  }), r("saved", d.value), I();
9458
- } catch (fe) {
9459
- console.error("Failed to save edit form", fe), je({
9458
+ } catch (de) {
9459
+ console.error("Failed to save edit form", de), je({
9460
9460
  type: "error",
9461
9461
  title: "Помилка",
9462
9462
  message: "Не вдалося зберегти зміни"
@@ -9545,7 +9545,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9545
9545
  ne(se(l), {
9546
9546
  teleport: "#modal",
9547
9547
  visible: h.value,
9548
- "onUpdate:visible": te[2] || (te[2] = (fe) => h.value = fe),
9548
+ "onUpdate:visible": te[2] || (te[2] = (de) => h.value = de),
9549
9549
  title: ae.value,
9550
9550
  size: "lg"
9551
9551
  }, {
@@ -9569,9 +9569,9 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9569
9569
  g.value ? (c(), x("div", Ig, " Завантаження форми редагування… ")) : p.value ? (c(), x("div", jg, V(p.value), 1)) : (c(), pe(se(i), {
9570
9570
  key: 2,
9571
9571
  values: d.value,
9572
- "onUpdate:values": te[0] || (te[0] = (fe) => d.value = fe),
9572
+ "onUpdate:values": te[0] || (te[0] = (de) => d.value = de),
9573
9573
  form: y.value,
9574
- "onUpdate:form": te[1] || (te[1] = (fe) => y.value = fe),
9574
+ "onUpdate:form": te[1] || (te[1] = (de) => y.value = de),
9575
9575
  schema: u.value
9576
9576
  }, null, 8, ["values", "form", "schema"]))
9577
9577
  ]),
@@ -9596,13 +9596,13 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9596
9596
  { cardClass: "bg-gradient-to-br from-blue-50 to-blue-100/30 border-blue-200", titleClass: "text-blue-900" },
9597
9597
  { cardClass: "bg-gradient-to-br from-purple-50 to-purple-100/30 border-purple-200", titleClass: "text-purple-900" },
9598
9598
  { cardClass: "bg-gradient-to-br from-gray-50 to-gray-100/30 border-gray-200", titleClass: "text-gray-900" }
9599
- ], n = Pt(), r = Lt(), l = T(null), i = P(() => {
9599
+ ], n = Pt(), r = Lt(), l = F(null), i = P(() => {
9600
9600
  var z;
9601
9601
  const w = (z = r.params) == null ? void 0 : z.id;
9602
9602
  return typeof w == "string" ? w : void 0;
9603
- }), s = T(null), a = T(!1), v = T(!1), m = T(null), b = T(!0);
9603
+ }), s = F(null), a = F(!1), v = F(!1), m = F(null), b = F(!0);
9604
9604
  let f = null;
9605
- const h = T(!1);
9605
+ const h = F(!1);
9606
9606
  function u(w) {
9607
9607
  if (Array.isArray(w)) return u(w[0]);
9608
9608
  if (typeof w != "string" && typeof w != "number") return null;
@@ -9691,7 +9691,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9691
9691
  { key: "info", label: "Інформація", icon: kg },
9692
9692
  { key: "files", label: "Файли", icon: xg },
9693
9693
  { key: "metadata", label: "Метадані", icon: Jo }
9694
- ], X = ae.map((w) => w.key), ue = T(X.includes(r.query.tab) ? r.query.tab : "info"), Y = T(!0);
9694
+ ], X = ae.map((w) => w.key), ue = F(X.includes(r.query.tab) ? r.query.tab : "info"), Y = F(!0);
9695
9695
  le(() => r.query.tab, (w) => {
9696
9696
  w && X.includes(w) && ue.value !== w && (ue.value = w);
9697
9697
  }), le(ue, (w) => {
@@ -9729,7 +9729,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9729
9729
  }), le(i, () => {
9730
9730
  $();
9731
9731
  }, { immediate: !0 });
9732
- async function F(w) {
9732
+ async function T(w) {
9733
9733
  var z;
9734
9734
  $(), ((z = s.value) == null ? void 0 : z.srid) !== w.srid && (je({ title: "XML start", type: "info", message: "зміна системи координат, оновлюємо карту ..." }), await I(`/api/gis-xml/${encodeURIComponent(i.value)}`), je({ title: "XML created", type: "info", message: "карта створена" }), location.reload());
9735
9735
  }
@@ -9793,7 +9793,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9793
9793
  technical: H(w)
9794
9794
  } : null;
9795
9795
  }
9796
- function fe(w) {
9796
+ function de(w) {
9797
9797
  return w != null && w.length ? w.map((ee) => {
9798
9798
  var Me;
9799
9799
  if (!ee) return "";
@@ -9803,7 +9803,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9803
9803
  }
9804
9804
  function me(w) {
9805
9805
  var we, We;
9806
- const z = w.bands_count ?? ((we = w.bands) == null ? void 0 : we.length) ?? "—", ee = fe(w.bands), ye = (w.bands ?? []).map((Ze) => Ze.trim()).filter((Ze) => Ze.length > 0), Me = ye.length ? ye.join(", ") : void 0;
9806
+ const z = w.bands_count ?? ((we = w.bands) == null ? void 0 : we.length) ?? "—", ee = de(w.bands), ye = (w.bands ?? []).map((Ze) => Ze.trim()).filter((Ze) => Ze.length > 0), Me = ye.length ? ye.join(", ") : void 0;
9807
9807
  return [
9808
9808
  {
9809
9809
  label: "Розмір растру, px",
@@ -9911,7 +9911,7 @@ const kg = /* @__PURE__ */ Te(bg, [["render", _g]]), $g = { class: "absolute top
9911
9911
  "entity-label": "Растер",
9912
9912
  "save-method": "put",
9913
9913
  "edit-button-text": "Редагувати",
9914
- onSaved: F
9914
+ onSaved: T
9915
9915
  }, null, 8, ["entity-id", "entity-info"])
9916
9916
  ])
9917
9917
  ])
@@ -10092,7 +10092,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10092
10092
  }
10093
10093
  ], r = vt(
10094
10094
  () => import("@opengis/core").then((d) => d.VsModal)
10095
- ), l = vt(() => import("@opengis/form")), i = Nt(e, "modelValue"), s = t, a = T(!1), v = T({
10095
+ ), l = vt(() => import("@opengis/form")), i = Nt(e, "modelValue"), s = t, a = F(!1), v = F({
10096
10096
  table: "",
10097
10097
  query: "",
10098
10098
  srid: "",
@@ -10231,7 +10231,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10231
10231
  },
10232
10232
  emits: ["save"],
10233
10233
  setup(e, { emit: t }) {
10234
- const n = e, r = t, l = T(n.table), i = T(n.card), s = vt(() => import("@opengis/form").then((v) => v.VsInputText));
10234
+ const n = e, r = t, l = F(n.table), i = F(n.card), s = vt(() => import("@opengis/form").then((v) => v.VsInputText));
10235
10235
  function a() {
10236
10236
  r("save", {
10237
10237
  card_html: i.value,
@@ -10426,25 +10426,25 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10426
10426
  }, th = "cartocss-demo-001", nh = "OpenGIS", Wr = 2, ro = 5, U_ = /* @__PURE__ */ ge({
10427
10427
  __name: "cartocss",
10428
10428
  setup(e) {
10429
- const t = Pt(), n = Lt(), r = T(null), l = [
10429
+ const t = Pt(), n = Lt(), r = F(null), l = [
10430
10430
  { key: "css", label: "CSS", icon: es },
10431
10431
  { key: "data", label: "Дані", icon: fy },
10432
10432
  { key: "metadata", label: "Метадані", icon: Jo },
10433
10433
  { key: "card", label: "Картка", icon: ts }
10434
- ], i = l.map((H) => H.key), s = T(
10434
+ ], i = l.map((H) => H.key), s = F(
10435
10435
  i.includes(n.query.tab) ? n.query.tab : "css"
10436
- ), a = T(!0), v = T(null), m = P(() => {
10436
+ ), a = F(!0), v = F(null), m = P(() => {
10437
10437
  var H;
10438
10438
  return (H = v.value) != null && H.source_path ? l.filter((ce) => ce.key === "card" || ce.key === "metadata") : l;
10439
10439
  }), b = P(
10440
10440
  () => n.params.id || th
10441
- ), f = T({
10441
+ ), f = F({
10442
10442
  id: b.value,
10443
10443
  name: "",
10444
10444
  description: ""
10445
10445
  });
10446
10446
  let h = null;
10447
- const u = T(!1);
10447
+ const u = F(!1);
10448
10448
  function d(H) {
10449
10449
  if (Array.isArray(H)) return d(H[0]);
10450
10450
  if (typeof H != "string" && typeof H != "number") return null;
@@ -10489,9 +10489,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10489
10489
  function E(H) {
10490
10490
  typeof document > "u" || (document.title = H ? `${H} — CartoCSS` : nh);
10491
10491
  }
10492
- const k = T("");
10493
- T("");
10494
- const S = T([]), C = T(!1), M = T(!1), N = T(""), D = T(0), Q = T(!1), oe = T(1), ae = T(!0), X = P(() => `cartocss-layer-${b.value}`), ue = P(() => `${Math.round(oe.value * 100)}%`), Y = P(() => `cartocss-extent-${b.value}`), R = P(() => {
10492
+ const k = F("");
10493
+ F("");
10494
+ const S = F([]), C = F(!1), M = F(!1), N = F(""), D = F(0), Q = F(!1), oe = F(1), ae = F(!0), X = P(() => `cartocss-layer-${b.value}`), ue = P(() => `${Math.round(oe.value * 100)}%`), Y = P(() => `cartocss-extent-${b.value}`), R = P(() => {
10495
10495
  var ee;
10496
10496
  const H = (ee = N.value) == null ? void 0 : ee.trim();
10497
10497
  if (!H) return "";
@@ -10502,7 +10502,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10502
10502
  const H = v.value;
10503
10503
  return H ? H.cartocss_key || H.source_path || b.value || "" : b.value || "";
10504
10504
  });
10505
- const O = T(""), re = T(""), F = P(() => {
10505
+ const O = F(""), re = F(""), T = P(() => {
10506
10506
  var ye;
10507
10507
  const H = (ye = v.value) == null ? void 0 : ye.bounds;
10508
10508
  if (!Array.isArray(H) || H.length < 4) return null;
@@ -10605,7 +10605,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10605
10605
  }
10606
10606
  }
10607
10607
  }
10608
- function fe(H) {
10608
+ function de(H) {
10609
10609
  if (!H) return null;
10610
10610
  if (typeof H == "string")
10611
10611
  try {
@@ -10640,7 +10640,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10640
10640
  name: ee.name || f.value.name,
10641
10641
  description: ee.description || f.value.description
10642
10642
  }, k.value = typeof ee.style == "string" ? ee.style : "";
10643
- const ye = fe(ee.config ?? []);
10643
+ const ye = de(ee.config ?? []);
10644
10644
  S.value = me(ye);
10645
10645
  const Me = typeof ee.url == "string" ? ee.url : "";
10646
10646
  N.value = Me, Q.value = !!(Me && ee.enabled !== !1), D.value = ce != null && ce.bustCache ? Date.now() : 0;
@@ -10759,9 +10759,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10759
10759
  ]),
10760
10760
  o("div", Yy, [
10761
10761
  ne(mn),
10762
- F.value ? (c(), pe(mn, {
10762
+ T.value ? (c(), pe(mn, {
10763
10763
  key: 0,
10764
- targetCenter: F.value,
10764
+ targetCenter: T.value,
10765
10765
  targetLabel: "Центр даних",
10766
10766
  targetAriaLabel: "Перейти до центру даних"
10767
10767
  }, null, 8, ["targetCenter"])) : K("", !0)
@@ -10941,7 +10941,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
10941
10941
  items: {}
10942
10942
  },
10943
10943
  setup(e, { expose: t }) {
10944
- const n = e, r = It({ open: !1, top: 0, left: 0, transform: "translateX(-50%)" }), l = T(null), i = T(null);
10944
+ const n = e, r = It({ open: !1, top: 0, left: 0, transform: "translateX(-50%)" }), l = F(null), i = F(null);
10945
10945
  let s = null;
10946
10946
  const a = P(() => r.open ? {
10947
10947
  position: "absolute",
@@ -11059,9 +11059,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11059
11059
  mapDescription: {}
11060
11060
  },
11061
11061
  setup(e) {
11062
- const t = e, n = T(null), r = T(!1), l = T(null), i = T(null), s = T({ top: 0, left: 0 });
11062
+ const t = e, n = F(null), r = F(!1), l = F(null), i = F(null), s = F({ top: 0, left: 0 });
11063
11063
  Pt();
11064
- const a = T(!0), v = T(!1), m = P(() => Array.isArray(t.links) ? t.links.filter((E) => (E == null ? void 0 : E.name) && (E == null ? void 0 : E.slug)) : []), b = P(() => ({
11064
+ const a = F(!0), v = F(!1), m = P(() => Array.isArray(t.links) ? t.links.filter((E) => (E == null ? void 0 : E.name) && (E == null ? void 0 : E.slug)) : []), b = P(() => ({
11065
11065
  top: `${s.value.top}px`,
11066
11066
  left: `${s.value.left}px`
11067
11067
  })), f = P(() => {
@@ -11220,7 +11220,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11220
11220
  layerId: {}
11221
11221
  },
11222
11222
  setup(e) {
11223
- const t = e, n = T(!1), r = T(100), l = T(null), i = T(null), s = It({ top: 0, left: 0 });
11223
+ const t = e, n = F(!1), r = F(100), l = F(null), i = F(null), s = It({ top: 0, left: 0 });
11224
11224
  function a() {
11225
11225
  var k;
11226
11226
  const f = (k = i.value) == null ? void 0 : k.querySelector("button");
@@ -11322,13 +11322,13 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11322
11322
  },
11323
11323
  emits: ["action"],
11324
11324
  setup(e, { emit: t }) {
11325
- const n = e, r = T({}), l = T(!0), i = T(!1), s = it(), {
11325
+ const n = e, r = F({}), l = F(!0), i = F(!1), s = it(), {
11326
11326
  temporaryLayers: a,
11327
11327
  activateTemporaryLayer: v,
11328
11328
  deactivateTemporaryLayer: m,
11329
11329
  clearTemporaryLayers: b
11330
11330
  } = or(s.map), f = P(() => {
11331
- const F = n.layers.map((I) => ({
11331
+ const T = n.layers.map((I) => ({
11332
11332
  ...I,
11333
11333
  isTemporary: !1,
11334
11334
  owner: null,
@@ -11351,66 +11351,86 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11351
11351
  holder: null
11352
11352
  })
11353
11353
  );
11354
- return [...F, ...$];
11354
+ return [...T, ...$];
11355
11355
  }), h = P(() => f.value.length), u = P(
11356
- () => f.value.filter((F) => E(F.id)).length
11356
+ () => f.value.filter((T) => E(T.id)).length
11357
11357
  ), d = P(
11358
11358
  () => h.value > 0 && u.value === h.value
11359
11359
  ), y = P(() => a.value.length > 0), p = t;
11360
11360
  function g() {
11361
- var F;
11361
+ var T;
11362
11362
  for (let $ = 0; $ < n.layers.length; $++) {
11363
11363
  const I = n.layers[$], B = _(I);
11364
11364
  if (!B)
11365
11365
  continue;
11366
11366
  const U = Xe(I.id, B), te = I.visible !== !1;
11367
- r.value[I.id] = te, te || (F = U == null ? void 0 : U.setVisible) == null || F.call(U, !1);
11367
+ r.value[I.id] = te, te || (T = U == null ? void 0 : U.setVisible) == null || T.call(U, !1);
11368
11368
  }
11369
11369
  }
11370
- function _(F) {
11371
- const $ = F.id;
11370
+ function _(T) {
11371
+ const $ = T.id;
11372
11372
  if (!$) return null;
11373
- const I = (F.type || F.service_type || F.service || "").toString().toLowerCase(), B = F.service_url || F.url || null;
11373
+ const I = (T.type || T.service_type || T.service || "").toString().toLowerCase(), B = T.service_url || T.url || null;
11374
11374
  if (!!B && (I === "tms" || I === "wmts" || I === "wms" || I === "ogc")) {
11375
- const fe = A(B);
11376
- return fe ? {
11375
+ const de = A(B);
11376
+ return de ? {
11377
11377
  sourceId: $,
11378
11378
  source: {
11379
11379
  type: "raster",
11380
- tiles: [fe],
11381
- tileSize: F.tileSize || 256,
11382
- minzoom: F.minzoom ?? 0,
11383
- maxzoom: F.maxzoom ?? 22,
11380
+ tiles: [de],
11381
+ tileSize: T.tileSize || 256,
11382
+ minzoom: T.minzoom ?? 0,
11383
+ maxzoom: T.maxzoom ?? 22,
11384
11384
  // default to xyz unless explicitly overridden
11385
- scheme: F.scheme || "xyz"
11385
+ scheme: T.scheme || "xyz"
11386
11386
  },
11387
11387
  layer: {
11388
11388
  id: $,
11389
11389
  type: "raster",
11390
11390
  source: $
11391
11391
  },
11392
- card: F.card,
11393
- popup: F.popup
11392
+ card: T.card,
11393
+ popup: T.popup
11394
11394
  } : null;
11395
11395
  }
11396
11396
  if (I === "cartocss") {
11397
- const fe = F.url ? A(F.url) : `${location.origin}/api/gis-rtile/${$}/{z}/{x}/{y}.png`;
11398
- return fe ? {
11397
+ const de = T.url ? A(T.url) : `${location.origin}/api/gis-rtile/${$}/{z}/{x}/{y}.png`;
11398
+ return de ? {
11399
11399
  sourceId: $,
11400
11400
  source: {
11401
11401
  type: "raster",
11402
- tiles: [fe],
11403
- tileSize: F.tileSize || 256,
11404
- minzoom: F.minzoom ?? 0,
11405
- maxzoom: F.maxzoom ?? 22
11402
+ tiles: [de],
11403
+ tileSize: T.tileSize || 256,
11404
+ minzoom: T.minzoom ?? 0,
11405
+ maxzoom: T.maxzoom ?? 22
11406
11406
  },
11407
11407
  layer: {
11408
11408
  id: $,
11409
11409
  type: "raster",
11410
11410
  source: $
11411
11411
  },
11412
- card: F.card,
11413
- popup: F.popup
11412
+ card: T.card,
11413
+ popup: T.popup
11414
+ } : null;
11415
+ }
11416
+ if (I === "raster") {
11417
+ const de = T.url ? A(T.url) : `${location.origin}/api/gis-rtile/${$}/{z}/{x}/{y}.png`;
11418
+ return de ? {
11419
+ sourceId: $,
11420
+ source: {
11421
+ type: "raster",
11422
+ tiles: [de],
11423
+ tileSize: T.tileSize || 256,
11424
+ minzoom: T.minzoom ?? 0,
11425
+ maxzoom: T.maxzoom ?? 22
11426
+ },
11427
+ layer: {
11428
+ id: $,
11429
+ type: "raster",
11430
+ source: $
11431
+ },
11432
+ card: T.card,
11433
+ popup: T.popup
11414
11434
  } : null;
11415
11435
  }
11416
11436
  const te = `${location.origin}/api/vtile/${$}/ua/{z}/{x}/{y}.vmt`;
@@ -11426,60 +11446,60 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11426
11446
  id: $,
11427
11447
  source: $,
11428
11448
  "source-layer": $,
11429
- style: F.style
11449
+ style: T.style
11430
11450
  },
11431
- card: F.card,
11432
- popup: F.popup
11451
+ card: T.card,
11452
+ popup: T.popup
11433
11453
  };
11434
11454
  }
11435
- function A(F) {
11436
- return F ? /^https?:\/\//i.test(F) ? F : F.startsWith("//") ? `${window.location.protocol}${F}` : F.startsWith("/") ? `${location.origin}${F}` : `${location.origin}/${F}` : null;
11455
+ function A(T) {
11456
+ return T ? /^https?:\/\//i.test(T) ? T : T.startsWith("//") ? `${window.location.protocol}${T}` : T.startsWith("/") ? `${location.origin}${T}` : `${location.origin}/${T}` : null;
11437
11457
  }
11438
- function E(F) {
11439
- const $ = r.value[F];
11458
+ function E(T) {
11459
+ const $ = r.value[T];
11440
11460
  return $ ?? !0;
11441
11461
  }
11442
- function k(F) {
11462
+ function k(T) {
11443
11463
  var B, U;
11444
- if (!(F != null && F.id)) return null;
11445
- const $ = (B = F.title) == null ? void 0 : B.trim(), I = (U = F.url) == null ? void 0 : U.trim();
11464
+ if (!(T != null && T.id)) return null;
11465
+ const $ = (B = T.title) == null ? void 0 : B.trim(), I = (U = T.url) == null ? void 0 : U.trim();
11446
11466
  return !$ || !I ? null : {
11447
- id: F.id,
11467
+ id: T.id,
11448
11468
  title: $,
11449
11469
  url: I,
11450
- tileSize: F.tileSize,
11451
- minzoom: F.minzoom,
11452
- maxzoom: F.maxzoom,
11453
- opacity: F.opacity
11470
+ tileSize: T.tileSize,
11471
+ minzoom: T.minzoom,
11472
+ maxzoom: T.maxzoom,
11473
+ opacity: T.opacity
11454
11474
  };
11455
11475
  }
11456
- function S(F) {
11457
- if (!F) return;
11458
- const $ = F.owner;
11459
- if (F.action === "clear") {
11476
+ function S(T) {
11477
+ if (!T) return;
11478
+ const $ = T.owner;
11479
+ if (T.action === "clear") {
11460
11480
  const B = a.value.filter((U) => !$ || U.owner === $).map((U) => U.id);
11461
11481
  b($), B.forEach((U) => {
11462
11482
  U in r.value && delete r.value[U];
11463
11483
  });
11464
11484
  return;
11465
11485
  }
11466
- const I = k(F.spec);
11486
+ const I = k(T.spec);
11467
11487
  if (I) {
11468
- if (F.action === "activate") {
11469
- v(I, F.context || {}, $), r.value[I.id] = !0;
11488
+ if (T.action === "activate") {
11489
+ v(I, T.context || {}, $), r.value[I.id] = !0;
11470
11490
  return;
11471
11491
  }
11472
- F.action === "deactivate" && (m(I.id, $), delete r.value[I.id]);
11492
+ T.action === "deactivate" && (m(I.id, $), delete r.value[I.id]);
11473
11493
  }
11474
11494
  }
11475
- function C(F) {
11476
- F instanceof CustomEvent && S(F.detail);
11495
+ function C(T) {
11496
+ T instanceof CustomEvent && S(T.detail);
11477
11497
  }
11478
11498
  le(
11479
- () => a.value.map((F) => F.id),
11480
- (F, $) => {
11481
- const I = new Set($ || []), B = new Set(F);
11482
- F.forEach((U) => {
11499
+ () => a.value.map((T) => T.id),
11500
+ (T, $) => {
11501
+ const I = new Set($ || []), B = new Set(T);
11502
+ T.forEach((U) => {
11483
11503
  U in r.value || (r.value[U] = !0);
11484
11504
  }), I.forEach((U) => {
11485
11505
  B.has(U) || delete r.value[U];
@@ -11487,83 +11507,83 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11487
11507
  },
11488
11508
  { immediate: !0 }
11489
11509
  );
11490
- function M(F, $) {
11510
+ function M(T, $) {
11491
11511
  var B, U, te;
11492
- if (F.isTemporary) {
11512
+ if (T.isTemporary) {
11493
11513
  if (!$) {
11494
- m(F.id, F.owner || void 0), delete r.value[F.id];
11514
+ m(T.id, T.owner || void 0), delete r.value[T.id];
11495
11515
  return;
11496
11516
  }
11497
- r.value[F.id] = !0;
11498
- const fe = F.handle || ((B = a.value.find((me) => me.id === F.id)) == null ? void 0 : B.handle);
11499
- (U = fe == null ? void 0 : fe.setVisible) == null || U.call(fe, !0);
11517
+ r.value[T.id] = !0;
11518
+ const de = T.handle || ((B = a.value.find((me) => me.id === T.id)) == null ? void 0 : B.handle);
11519
+ (U = de == null ? void 0 : de.setVisible) == null || U.call(de, !0);
11500
11520
  return;
11501
11521
  }
11502
- r.value[F.id] = $;
11503
- const I = Xe(F.id);
11522
+ r.value[T.id] = $;
11523
+ const I = Xe(T.id);
11504
11524
  (te = I == null ? void 0 : I.setVisible) == null || te.call(I, $);
11505
11525
  }
11506
- function N(F, $) {
11526
+ function N(T, $) {
11507
11527
  const I = $.target;
11508
- M(F, I.checked);
11528
+ M(T, I.checked);
11509
11529
  }
11510
- function D(F) {
11511
- f.value.forEach(($) => M($, F));
11530
+ function D(T) {
11531
+ f.value.forEach(($) => M($, T));
11512
11532
  }
11513
11533
  function Q() {
11514
11534
  D(!d.value);
11515
11535
  }
11516
- function oe(F) {
11517
- return F.isTemporary ? [
11518
- { label: "Назва", value: F.name ?? null },
11536
+ function oe(T) {
11537
+ return T.isTemporary ? [
11538
+ { label: "Назва", value: T.name ?? null },
11519
11539
  { label: "Тип", value: "Тимчасовий шар" },
11520
- F.owner ? { label: "Джерело", value: F.owner } : null
11540
+ T.owner ? { label: "Джерело", value: T.owner } : null
11521
11541
  ].filter(Boolean) : [
11522
- { label: "Назва", value: F.name ?? null },
11523
- { label: "Назва групи", value: F.group_name || null },
11524
- { label: "Кількість", value: F.count ?? null },
11525
- { label: "Балансоутримувач", value: F.holder ?? null }
11542
+ { label: "Назва", value: T.name ?? null },
11543
+ { label: "Назва групи", value: T.group_name || null },
11544
+ { label: "Кількість", value: T.count ?? null },
11545
+ { label: "Балансоутримувач", value: T.holder ?? null }
11526
11546
  ];
11527
11547
  }
11528
- function ae(F) {
11529
- const $ = F.trim();
11548
+ function ae(T) {
11549
+ const $ = T.trim();
11530
11550
  return $ ? !!(/^#[\da-fA-F]{3,8}$/.test($) || /^rgb\s*\(/.test($) || /^rgba\s*\(/.test($) || /^hsl\s*\(/.test($) || /^hsla\s*\(/.test($) || /^[a-zA-Z]+$/.test($) && $.length < 25) : !1;
11531
11551
  }
11532
- function X(F) {
11533
- var $, I, B, U, te, fe;
11534
- if (!F) return null;
11535
- if (typeof F == "string") {
11536
- const me = F.trim();
11552
+ function X(T) {
11553
+ var $, I, B, U, te, de;
11554
+ if (!T) return null;
11555
+ if (typeof T == "string") {
11556
+ const me = T.trim();
11537
11557
  return !me || !ae(me) ? null : me;
11538
11558
  }
11539
- if (Array.isArray(F)) {
11540
- for (const me of F) {
11559
+ if (Array.isArray(T)) {
11560
+ for (const me of T) {
11541
11561
  const xe = X(me);
11542
11562
  if (xe) return xe;
11543
11563
  }
11544
11564
  return null;
11545
11565
  }
11546
- if (typeof F == "object") {
11547
- const me = F;
11566
+ if (typeof T == "object") {
11567
+ const me = T;
11548
11568
  return X(
11549
- me.color ?? me.fill ?? me.stroke ?? me.lineColor ?? me.fillColor ?? (($ = me.paint) == null ? void 0 : $["fill-color"]) ?? ((I = me.paint) == null ? void 0 : I["line-color"]) ?? ((B = me.paint) == null ? void 0 : B["circle-color"]) ?? ((U = me.paint) == null ? void 0 : U.color) ?? ((te = me.paint) == null ? void 0 : te.lineColor) ?? ((fe = me.paint) == null ? void 0 : fe.fillColor) ?? me.paint ?? me.value
11569
+ me.color ?? me.fill ?? me.stroke ?? me.lineColor ?? me.fillColor ?? (($ = me.paint) == null ? void 0 : $["fill-color"]) ?? ((I = me.paint) == null ? void 0 : I["line-color"]) ?? ((B = me.paint) == null ? void 0 : B["circle-color"]) ?? ((U = me.paint) == null ? void 0 : U.color) ?? ((te = me.paint) == null ? void 0 : te.lineColor) ?? ((de = me.paint) == null ? void 0 : de.fillColor) ?? me.paint ?? me.value
11550
11570
  );
11551
11571
  }
11552
11572
  return null;
11553
11573
  }
11554
- function ue(F) {
11555
- const $ = Array.isArray(F == null ? void 0 : F.legend) ? F.legend[0] : F == null ? void 0 : F.legend, I = X($);
11556
- return I || X(F == null ? void 0 : F.style) || Vh;
11574
+ function ue(T) {
11575
+ const $ = Array.isArray(T == null ? void 0 : T.legend) ? T.legend[0] : T == null ? void 0 : T.legend, I = X($);
11576
+ return I || X(T == null ? void 0 : T.style) || Vh;
11557
11577
  }
11558
- function Y(F) {
11578
+ function Y(T) {
11559
11579
  return {
11560
- "--layers-panel-checkbox-color": ue(F)
11580
+ "--layers-panel-checkbox-color": ue(T)
11561
11581
  };
11562
11582
  }
11563
11583
  function R() {
11564
11584
  if (!a.value.length) return;
11565
- const F = a.value.map(($) => $.id);
11566
- b(), F.forEach(($) => delete r.value[$]);
11585
+ const T = a.value.map(($) => $.id);
11586
+ b(), T.forEach(($) => delete r.value[$]);
11567
11587
  }
11568
11588
  function O() {
11569
11589
  l.value = !l.value;
@@ -11578,18 +11598,18 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11578
11598
  ), re(), i.value && (l.value = !1), window.addEventListener("resize", re);
11579
11599
  }), le(
11580
11600
  () => {
11581
- var F;
11582
- return ((F = n.layers) == null ? void 0 : F.length) ?? 0;
11601
+ var T;
11602
+ return ((T = n.layers) == null ? void 0 : T.length) ?? 0;
11583
11603
  },
11584
- (F, $) => {
11585
- F > 0 && $ === 0 && g();
11604
+ (T, $) => {
11605
+ T > 0 && $ === 0 && g();
11586
11606
  }
11587
11607
  ), Ve(() => {
11588
11608
  window.removeEventListener(
11589
11609
  Zr,
11590
11610
  C
11591
11611
  ), window.removeEventListener("resize", re);
11592
- }), (F, $) => (c(), x("div", kh, [
11612
+ }), (T, $) => (c(), x("div", kh, [
11593
11613
  o("div", $h, [
11594
11614
  o("div", Ch, [
11595
11615
  o("div", Sh, [
@@ -11704,7 +11724,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11704
11724
  ], 2)
11705
11725
  ]));
11706
11726
  }
11707
- }), Gr = /* @__PURE__ */ Te(Bh, [["__scopeId", "data-v-57bebfd3"]]), Uh = { class: "catalog-tab__search relative mt-[10px]" }, qh = {
11727
+ }), Gr = /* @__PURE__ */ Te(Bh, [["__scopeId", "data-v-0636139f"]]), Uh = { class: "catalog-tab__search relative mt-[10px]" }, qh = {
11708
11728
  width: "24",
11709
11729
  height: "24",
11710
11730
  viewBox: "0 0 24 24",
@@ -11724,7 +11744,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11724
11744
  },
11725
11745
  emits: ["toggle-layer", "update:search", "open-filter"],
11726
11746
  setup(e, { emit: t }) {
11727
- const n = e, r = t, l = It({}), i = T(null), s = It({
11747
+ const n = e, r = t, l = It({}), i = F(null), s = It({
11728
11748
  visible: !1,
11729
11749
  text: "Спочатку активуйте шар, щоб застосувати фільтр",
11730
11750
  top: 0,
@@ -11922,7 +11942,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
11922
11942
  top: 0,
11923
11943
  left: 0,
11924
11944
  transform: "translateX(-50%)"
11925
- }), l = T(null), i = T(null);
11945
+ }), l = F(null), i = F(null);
11926
11946
  let s = null;
11927
11947
  const a = P(() => {
11928
11948
  if (!r.open) return { display: "none" };
@@ -12036,65 +12056,65 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12036
12056
  },
12037
12057
  emits: ["select-layer", "reorder", "remove", "toggle-layer"],
12038
12058
  setup(e, { emit: t }) {
12039
- const n = e, r = t, l = It({}), i = T(null), s = T(null), a = /* @__PURE__ */ new Map(), v = It({ top: 0, left: 0 }), m = T(null), b = It({ top: 0, left: 0 }), f = T(null), h = /* @__PURE__ */ new Map(), u = It({});
12040
- function d(F) {
12059
+ const n = e, r = t, l = It({}), i = F(null), s = F(null), a = /* @__PURE__ */ new Map(), v = It({ top: 0, left: 0 }), m = F(null), b = It({ top: 0, left: 0 }), f = F(null), h = /* @__PURE__ */ new Map(), u = It({});
12060
+ function d(T) {
12041
12061
  var $;
12042
12062
  for (const I of (($ = n.catalog) == null ? void 0 : $.groups) ?? []) {
12043
- const B = I.layers.find((U) => U.id === F);
12063
+ const B = I.layers.find((U) => U.id === T);
12044
12064
  if (B) return B;
12045
12065
  }
12046
12066
  return null;
12047
12067
  }
12048
- const y = new Intl.Collator("uk", { sensitivity: "base" }), p = P(() => [...n.selected].sort((F, $) => {
12068
+ const y = new Intl.Collator("uk", { sensitivity: "base" }), p = P(() => [...n.selected].sort((T, $) => {
12049
12069
  var U, te;
12050
- const I = ((U = d(F)) == null ? void 0 : U.name) ?? "", B = ((te = d($)) == null ? void 0 : te.name) ?? "";
12070
+ const I = ((U = d(T)) == null ? void 0 : U.name) ?? "", B = ((te = d($)) == null ? void 0 : te.name) ?? "";
12051
12071
  return y.compare(I, B);
12052
12072
  }));
12053
- le(() => n.selected, (F) => {
12054
- F.forEach(($) => {
12073
+ le(() => n.selected, (T) => {
12074
+ T.forEach(($) => {
12055
12075
  l[$] == null && (l[$] = 100);
12056
12076
  });
12057
12077
  }, { immediate: !0 });
12058
12078
  function g() {
12059
12079
  if (!i.value) return;
12060
- const F = a.get(i.value);
12061
- if (!F) return;
12062
- const $ = F.getBoundingClientRect();
12080
+ const T = a.get(i.value);
12081
+ if (!T) return;
12082
+ const $ = T.getBoundingClientRect();
12063
12083
  v.top = $.bottom + 8 + window.scrollY, v.left = $.left + window.scrollX;
12064
12084
  }
12065
- le(() => n.selected, (F) => {
12066
- F.forEach(($) => {
12085
+ le(() => n.selected, (T) => {
12086
+ T.forEach(($) => {
12067
12087
  u[$] == null && (u[$] = !0);
12068
12088
  });
12069
12089
  }, { immediate: !0 });
12070
- function _(F, $) {
12071
- u[F] = $;
12072
- const I = Xe(F);
12090
+ function _(T, $) {
12091
+ u[T] = $;
12092
+ const I = Xe(T);
12073
12093
  I && I.setVisible($);
12074
12094
  }
12075
- function A(F, $) {
12076
- $ ? h.set(F, $) : h.delete(F);
12095
+ function A(T, $) {
12096
+ $ ? h.set(T, $) : h.delete(T);
12077
12097
  }
12078
- function E(F) {
12079
- m.value = m.value === F ? null : F, m.value && st(() => {
12080
- k(F), requestAnimationFrame(() => {
12081
- k(F);
12098
+ function E(T) {
12099
+ m.value = m.value === T ? null : T, m.value && st(() => {
12100
+ k(T), requestAnimationFrame(() => {
12101
+ k(T);
12082
12102
  });
12083
12103
  });
12084
12104
  }
12085
- function k(F) {
12086
- const $ = h.get(F);
12105
+ function k(T) {
12106
+ const $ = h.get(T);
12087
12107
  if (!$ || !f.value) return;
12088
- const I = $.getBoundingClientRect(), B = 12, U = 6, te = window.scrollX + B, fe = window.scrollX + window.innerWidth - B, me = window.scrollY + B, xe = window.scrollY + window.innerHeight - B, Fe = f.value.offsetWidth || 190, Ne = f.value.offsetHeight || 0;
12108
+ const I = $.getBoundingClientRect(), B = 12, U = 6, te = window.scrollX + B, de = window.scrollX + window.innerWidth - B, me = window.scrollY + B, xe = window.scrollY + window.innerHeight - B, Fe = f.value.offsetWidth || 190, Ne = f.value.offsetHeight || 0;
12089
12109
  let H = I.bottom + window.scrollY + U, ce = I.left + window.scrollX;
12090
- ce + Fe > fe && (ce = I.right + window.scrollX - Fe, ce < te && (ce = te)), ce < te && (ce = te), H + Ne > xe && (H = I.top + window.scrollY - Ne - U, H < me && (H = Math.max(me, xe - Ne))), H < me && (H = me), H + Ne > xe && (H = Math.max(me, xe - Ne)), b.top = H, b.left = ce;
12110
+ ce + Fe > de && (ce = I.right + window.scrollX - Fe, ce < te && (ce = te)), ce < te && (ce = te), H + Ne > xe && (H = I.top + window.scrollY - Ne - U, H < me && (H = Math.max(me, xe - Ne))), H < me && (H = me), H + Ne > xe && (H = Math.max(me, xe - Ne)), b.top = H, b.left = ce;
12091
12111
  }
12092
- function S(F) {
12093
- const $ = Xe(F);
12094
- $ && $.remove(), r("remove", F), m.value = null;
12112
+ function S(T) {
12113
+ const $ = Xe(T);
12114
+ $ && $.remove(), r("remove", T), m.value = null;
12095
12115
  }
12096
- function C(F) {
12097
- const $ = F.target, I = i.value, B = m.value;
12116
+ function C(T) {
12117
+ const $ = T.target, I = i.value, B = m.value;
12098
12118
  if (I) {
12099
12119
  const U = s.value, te = a.get(I);
12100
12120
  if (U && U.contains($) || te && te.contains($)) return;
@@ -12115,10 +12135,10 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12115
12135
  document.removeEventListener("click", C), window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0);
12116
12136
  });
12117
12137
  const { map: N } = it();
12118
- function D(F) {
12119
- var U, te, fe;
12120
- if (!F) return;
12121
- const $ = Xe(F), I = d(F);
12138
+ function D(T) {
12139
+ var U, te, de;
12140
+ if (!T) return;
12141
+ const $ = Xe(T), I = d(T);
12122
12142
  if (!$ && !I) return;
12123
12143
  if (((U = I == null ? void 0 : I.extent) == null ? void 0 : U.length) === 4 && ((te = N.value) != null && te.fitBounds)) {
12124
12144
  const me = I.extent.map((xe) => Number(xe));
@@ -12131,17 +12151,17 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12131
12151
  return;
12132
12152
  }
12133
12153
  }
12134
- (fe = $ == null ? void 0 : $.getSource) != null && fe.call($) && (m.value = null);
12154
+ (de = $ == null ? void 0 : $.getSource) != null && de.call($) && (m.value = null);
12135
12155
  }
12136
- const Q = T(null), oe = T(null);
12137
- function ae(F, $) {
12138
- Q.value = $, oe.value = $, F.dataTransfer && (F.dataTransfer.effectAllowed = "move", F.dataTransfer.setData("text/plain", String($)));
12156
+ const Q = F(null), oe = F(null);
12157
+ function ae(T, $) {
12158
+ Q.value = $, oe.value = $, T.dataTransfer && (T.dataTransfer.effectAllowed = "move", T.dataTransfer.setData("text/plain", String($)));
12139
12159
  }
12140
- function X(F) {
12141
- oe.value = F;
12160
+ function X(T) {
12161
+ oe.value = T;
12142
12162
  }
12143
- function ue(F, $) {
12144
- if (F.preventDefault(), Q.value === null || Q.value === $) {
12163
+ function ue(T, $) {
12164
+ if (T.preventDefault(), Q.value === null || Q.value === $) {
12145
12165
  Q.value = null, oe.value = null;
12146
12166
  return;
12147
12167
  }
@@ -12151,28 +12171,28 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12151
12171
  function Y() {
12152
12172
  Q.value = null, oe.value = null;
12153
12173
  }
12154
- function R(F) {
12155
- return F == null || F === "" ? null : String(F);
12174
+ function R(T) {
12175
+ return T == null || T === "" ? null : String(T);
12156
12176
  }
12157
- function O(F, $) {
12158
- return !Array.isArray(F) || F.length === 0 ? null : `${F.length} ${$}`;
12177
+ function O(T, $) {
12178
+ return !Array.isArray(T) || T.length === 0 ? null : `${T.length} ${$}`;
12159
12179
  }
12160
- function re(F) {
12180
+ function re(T) {
12161
12181
  var H, ce, w, z, ee, ye;
12162
- const $ = Xe(F), I = d(F);
12182
+ const $ = Xe(T), I = d(T);
12163
12183
  if (!$ && !I) return [];
12164
- const B = (I == null ? void 0 : I.name) || ((ce = (H = $ == null ? void 0 : $.opts) == null ? void 0 : H.layer) == null ? void 0 : ce.name) || null, U = (I == null ? void 0 : I.service) || ((w = $ == null ? void 0 : $.opts) == null ? void 0 : w.service) || null, te = (z = $ == null ? void 0 : $.getSource) == null ? void 0 : z.call($), fe = te && "tiles" in te ? (ee = te.tiles) == null ? void 0 : ee[0] : (I == null ? void 0 : I.url) || null, me = (I == null ? void 0 : I.source_path) || null, xe = ($ == null ? void 0 : $.popup) || (I == null ? void 0 : I.popup), Fe = ($ == null ? void 0 : $.card) || (I == null ? void 0 : I.card), Ne = (I == null ? void 0 : I.filters) || ((ye = $ == null ? void 0 : $.opts) == null ? void 0 : ye.filters);
12184
+ const B = (I == null ? void 0 : I.name) || ((ce = (H = $ == null ? void 0 : $.opts) == null ? void 0 : H.layer) == null ? void 0 : ce.name) || null, U = (I == null ? void 0 : I.service) || ((w = $ == null ? void 0 : $.opts) == null ? void 0 : w.service) || null, te = (z = $ == null ? void 0 : $.getSource) == null ? void 0 : z.call($), de = te && "tiles" in te ? (ee = te.tiles) == null ? void 0 : ee[0] : (I == null ? void 0 : I.url) || null, me = (I == null ? void 0 : I.source_path) || null, xe = ($ == null ? void 0 : $.popup) || (I == null ? void 0 : I.popup), Fe = ($ == null ? void 0 : $.card) || (I == null ? void 0 : I.card), Ne = (I == null ? void 0 : I.filters) || ((ye = $ == null ? void 0 : $.opts) == null ? void 0 : ye.filters);
12165
12185
  return [
12166
12186
  { label: "Назва", value: R(B) },
12167
12187
  { label: "Сервіс", value: R(U) },
12168
- { label: "Посилання", value: R(fe), breakLine: !0 },
12188
+ { label: "Посилання", value: R(de), breakLine: !0 },
12169
12189
  { label: "Джерело", value: R(me), breakLine: !0 },
12170
12190
  { label: "Popup", value: O(xe, "полів") },
12171
12191
  { label: "Картка", value: O(Fe, "полів") },
12172
12192
  { label: "Фільтри", value: O(Ne, "фільтрів") }
12173
12193
  ];
12174
12194
  }
12175
- return (F, $) => (c(), x("div", s1, [
12195
+ return (T, $) => (c(), x("div", s1, [
12176
12196
  o("div", i1, [
12177
12197
  o("button", {
12178
12198
  class: "selected-tab__add",
@@ -12446,7 +12466,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12446
12466
  const R = t.query["catalog-tab"];
12447
12467
  return (Array.isArray(R) ? R[0] : R) === "selected" ? "selected" : "catalog";
12448
12468
  }
12449
- const l = T(r()), i = T({ groups: [] }), s = T([]), a = T(""), { map: v } = it(), m = It({}), b = T(null), f = T(!0), h = T(!1);
12469
+ const l = F(r()), i = F({ groups: [] }), s = F([]), a = F(""), { map: v } = it(), m = It({}), b = F(null), f = F(!0), h = F(!1);
12450
12470
  function u(R) {
12451
12471
  return i.value.groups.map((O) => O.layers.find((re) => re.id === R)).find(Boolean) || null;
12452
12472
  }
@@ -12463,8 +12483,8 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12463
12483
  function p(R, O) {
12464
12484
  const re = Xe(R);
12465
12485
  if (m[R] = { ...O }, !(re != null && re.setFilter)) return;
12466
- const F = Object.entries(O).filter(([, $]) => $ != null && $ !== "").map(([$, I]) => `${$}=${I}`);
12467
- re.setFilter(F.join("|"));
12486
+ const T = Object.entries(O).filter(([, $]) => $ != null && $ !== "").map(([$, I]) => `${$}=${I}`);
12487
+ re.setFilter(T.join("|"));
12468
12488
  }
12469
12489
  function g(R) {
12470
12490
  const O = b.value;
@@ -12474,9 +12494,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12474
12494
  const O = R.url;
12475
12495
  let re = null;
12476
12496
  if (O && (re = O.startsWith("http") ? O : `${window.location.origin}${O}`), !re) return null;
12477
- const F = (R.service || "").toString().toLowerCase(), $ = R.count ?? null;
12478
- return F && F !== "vtile" ? {
12479
- service: F,
12497
+ const T = (R.service || "").toString().toLowerCase(), $ = R.count ?? null;
12498
+ return T && T !== "vtile" ? {
12499
+ service: T,
12480
12500
  count: $,
12481
12501
  source: {
12482
12502
  type: "raster",
@@ -12486,7 +12506,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12486
12506
  maxzoom: 20
12487
12507
  }
12488
12508
  } : {
12489
- service: F,
12509
+ service: T,
12490
12510
  count: $,
12491
12511
  source: {
12492
12512
  type: "vector",
@@ -12501,11 +12521,11 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12501
12521
  }
12502
12522
  function A(R, O, re) {
12503
12523
  var B;
12504
- const F = re ?? u(R);
12505
- if (!F) return;
12506
- const $ = _(F);
12524
+ const T = re ?? u(R);
12525
+ if (!T) return;
12526
+ const $ = _(T);
12507
12527
  if (!$) return;
12508
- const I = Xe(F.id, $, v);
12528
+ const I = Xe(T.id, $, v);
12509
12529
  if (I)
12510
12530
  if (I.setVisible(O), O) {
12511
12531
  if (!s.value.includes(R) && (s.value.push(R), (B = v.value) != null && B.getLayer(R)))
@@ -12529,15 +12549,15 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12529
12549
  if (!v.value) return;
12530
12550
  const O = (($ = v.value.getStyle()) == null ? void 0 : $.layers) ?? [];
12531
12551
  let re;
12532
- const F = (I) => O.filter((B) => {
12552
+ const T = (I) => O.filter((B) => {
12533
12553
  var U, te;
12534
12554
  return (B == null ? void 0 : B.source) === I || (B == null ? void 0 : B.id) === I || ((te = (U = B == null ? void 0 : B.id) == null ? void 0 : U.startsWith) == null ? void 0 : te.call(U, `${I}`));
12535
12555
  }).map((B) => B.id);
12536
12556
  for (let I = R.length - 1; I >= 0; I -= 1) {
12537
- const B = R[I], U = F(B);
12557
+ const B = R[I], U = T(B);
12538
12558
  U.length && (U.forEach((te) => {
12539
- var fe;
12540
- if ((fe = v.value) != null && fe.getLayer(te))
12559
+ var de;
12560
+ if ((de = v.value) != null && de.getLayer(te))
12541
12561
  try {
12542
12562
  v.value.moveLayer(te, re);
12543
12563
  } catch (me) {
@@ -12573,9 +12593,9 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12573
12593
  layers: []
12574
12594
  }), re.get(B).layers.push(I);
12575
12595
  }), i.value = { groups: Array.from(re.values()) };
12576
- const F = t.query.layers;
12577
- if (!F) return;
12578
- const $ = Array.isArray(F) ? F[0] : F;
12596
+ const T = t.query.layers;
12597
+ if (!T) return;
12598
+ const $ = Array.isArray(T) ? T[0] : T;
12579
12599
  typeof $ == "string" && $.split(",").forEach((I) => {
12580
12600
  const B = I.trim();
12581
12601
  if (!B) return;
@@ -12702,7 +12722,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12702
12722
  onToggleLayer: A,
12703
12723
  onSelectLayer: O[3] || (O[3] = (re) => l.value = "catalog"),
12704
12724
  onReorder: k,
12705
- onRemove: O[4] || (O[4] = (re) => s.value = s.value.filter((F) => F !== re))
12725
+ onRemove: O[4] || (O[4] = (re) => s.value = s.value.filter((T) => T !== re))
12706
12726
  }, null, 8, ["catalog", "selected"])) : (c(), pe(S1, {
12707
12727
  key: 2,
12708
12728
  layer: M.value,
@@ -12735,7 +12755,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12735
12755
  config: {}
12736
12756
  },
12737
12757
  setup(e) {
12738
- const t = ["#3a7a57", "#d970d5", "#8e997b", "#b4c039", "#a855f7", "#71823a", "#f79d92", "#8b5cf6", "#a6514e", "#6b7280"], n = e, r = T(!0), l = T(!1), i = T([]), s = T(null), a = T(null), v = T(null), m = T(null), b = T(null), f = T({}), h = T(null);
12758
+ const t = ["#3a7a57", "#d970d5", "#8e997b", "#b4c039", "#a855f7", "#71823a", "#f79d92", "#8b5cf6", "#a6514e", "#6b7280"], n = e, r = F(!0), l = F(!1), i = F([]), s = F(null), a = F(null), v = F(null), m = F(null), b = F(null), f = F({}), h = F(null);
12739
12759
  function u(Y) {
12740
12760
  return Y && JSON.parse(JSON.stringify(Y));
12741
12761
  }
@@ -12798,18 +12818,18 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12798
12818
  var re;
12799
12819
  const R = await fetch(`/api/gis-service/${encodeURIComponent(Y)}`);
12800
12820
  if (!R.ok) {
12801
- let F = "Не вдалося завантажити налаштування шару";
12821
+ let T = "Не вдалося завантажити налаштування шару";
12802
12822
  try {
12803
12823
  const $ = await R.json();
12804
- F = ((re = $ == null ? void 0 : $.message) == null ? void 0 : re.error) || ($ == null ? void 0 : $.message) || F;
12824
+ T = ((re = $ == null ? void 0 : $.message) == null ? void 0 : re.error) || ($ == null ? void 0 : $.message) || T;
12805
12825
  } catch {
12806
12826
  }
12807
- throw new Error(F);
12827
+ throw new Error(T);
12808
12828
  }
12809
12829
  const O = await R.json();
12810
- return v.value = (O == null ? void 0 : O.name) || null, m.value = Array.isArray(O == null ? void 0 : O.filters) ? O.filters : null, b.value = u((O == null ? void 0 : O.style) || {}), f.value = ((O == null ? void 0 : O.attributes) || []).reduce((F, $) => {
12830
+ return v.value = (O == null ? void 0 : O.name) || null, m.value = Array.isArray(O == null ? void 0 : O.filters) ? O.filters : null, b.value = u((O == null ? void 0 : O.style) || {}), f.value = ((O == null ? void 0 : O.attributes) || []).reduce((T, $) => {
12811
12831
  const I = typeof ($ == null ? void 0 : $.name) == "string" ? $.name.trim() : "", B = typeof ($ == null ? void 0 : $.ua) == "string" ? $.ua.trim() : "";
12812
- return I && (F[I] = B || I), F;
12832
+ return I && (T[I] = B || I), T;
12813
12833
  }, {}), O;
12814
12834
  }
12815
12835
  function k(Y, R) {
@@ -12836,13 +12856,13 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12836
12856
  return a.value = O, O;
12837
12857
  }
12838
12858
  async function S(Y, R) {
12839
- var F;
12859
+ var T;
12840
12860
  const O = `/api/gis-service/${encodeURIComponent(Y)}/${encodeURIComponent(R)}`, re = await fetch(O);
12841
12861
  if (!re.ok) {
12842
12862
  let $ = "Не вдалося отримати статистику";
12843
12863
  try {
12844
12864
  const I = await re.json();
12845
- $ = ((F = I == null ? void 0 : I.message) == null ? void 0 : F.error) || (I == null ? void 0 : I.message) || $;
12865
+ $ = ((T = I == null ? void 0 : I.message) == null ? void 0 : T.error) || (I == null ? void 0 : I.message) || $;
12846
12866
  } catch {
12847
12867
  }
12848
12868
  throw new Error($);
@@ -12852,31 +12872,31 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12852
12872
  function C(Y) {
12853
12873
  const R = /* @__PURE__ */ new Map();
12854
12874
  return Y && (Y.rules || []).forEach((re) => {
12855
- const F = (re == null ? void 0 : re.value) ?? (re == null ? void 0 : re.id);
12856
- F != null && R.set(String(F), re);
12875
+ const T = (re == null ? void 0 : re.value) ?? (re == null ? void 0 : re.id);
12876
+ T != null && R.set(String(T), re);
12857
12877
  }), R;
12858
12878
  }
12859
- function M(Y, R, O, re, F) {
12879
+ function M(Y, R, O, re, T) {
12860
12880
  if (typeof (R == null ? void 0 : R.color) == "string" && R.color.trim()) return R.color.trim();
12861
12881
  const $ = n.config.colors || {};
12862
12882
  if ($[Y]) return $[Y];
12863
12883
  const B = C(O == null ? void 0 : O.style).get(Y);
12864
- return typeof (B == null ? void 0 : B.color) == "string" && B.color.trim() ? B.color.trim() : t[F % t.length];
12884
+ return typeof (B == null ? void 0 : B.color) == "string" && B.color.trim() ? B.color.trim() : t[T % t.length];
12865
12885
  }
12866
12886
  function N(Y, R, O, re) {
12867
- var F;
12868
- return (R == null ? void 0 : R.text) || (R == null ? void 0 : R.label) || (R == null ? void 0 : R.name) || (R == null ? void 0 : R[`${re}_text`]) || ((F = C(O == null ? void 0 : O.style).get(Y)) == null ? void 0 : F.label) || Y;
12887
+ var T;
12888
+ return (R == null ? void 0 : R.text) || (R == null ? void 0 : R.label) || (R == null ? void 0 : R.name) || (R == null ? void 0 : R[`${re}_text`]) || ((T = C(O == null ? void 0 : O.style).get(Y)) == null ? void 0 : T.label) || Y;
12869
12889
  }
12870
12890
  function D(Y, R, O, re) {
12871
12891
  if (!Y) return;
12872
- const F = u((R == null ? void 0 : R.style) || b.value) || {}, $ = re.trim();
12892
+ const T = u((R == null ? void 0 : R.style) || b.value) || {}, $ = re.trim();
12873
12893
  if (!$) return;
12874
- const I = { ...F.colors || {}, ...n.config.colors || {} };
12894
+ const I = { ...T.colors || {}, ...n.config.colors || {} };
12875
12895
  $ === re && O.forEach((B) => {
12876
12896
  B.color.trim() && (I[B.id] = B.color);
12877
12897
  }), Y.setStyle({
12878
- ...F,
12879
- type: F.type || "polygon",
12898
+ ...T,
12899
+ type: T.type || "polygon",
12880
12900
  colorAttr: $,
12881
12901
  opacity: 0.8,
12882
12902
  colors: I
@@ -12892,18 +12912,18 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
12892
12912
  l.value = !0;
12893
12913
  const O = await E(Y);
12894
12914
  k(Y, O);
12895
- const re = await S(Y, R), F = Array.isArray(re == null ? void 0 : re.rows) ? re.rows.map((B, U) => {
12896
- const te = (B == null ? void 0 : B.id) ?? (B == null ? void 0 : B.value), fe = te != null ? String(te) : "";
12897
- if (!fe) return null;
12898
- const me = N(fe, B, O, R), xe = Number((B == null ? void 0 : B.count) ?? 0) || 0, Fe = M(fe, B, O, R, U);
12915
+ const re = await S(Y, R), T = Array.isArray(re == null ? void 0 : re.rows) ? re.rows.map((B, U) => {
12916
+ const te = (B == null ? void 0 : B.id) ?? (B == null ? void 0 : B.value), de = te != null ? String(te) : "";
12917
+ if (!de) return null;
12918
+ const me = N(de, B, O, R), xe = Number((B == null ? void 0 : B.count) ?? 0) || 0, Fe = M(de, B, O, R, U);
12899
12919
  return {
12900
- id: fe,
12920
+ id: de,
12901
12921
  label: me,
12902
12922
  count: xe,
12903
12923
  color: Fe
12904
12924
  };
12905
12925
  }).filter(Boolean) : [];
12906
- i.value = F, s.value = (($ = re == null ? void 0 : re.field) == null ? void 0 : $.label) || ((I = re == null ? void 0 : re.field) == null ? void 0 : I.name) || null, D(a.value, O, F, R), l.value = !1;
12926
+ i.value = T, s.value = (($ = re == null ? void 0 : re.field) == null ? void 0 : $.label) || ((I = re == null ? void 0 : re.field) == null ? void 0 : I.name) || null, D(a.value, O, T, R), l.value = !1;
12907
12927
  }
12908
12928
  le(
12909
12929
  () => [d.value, g.value],
@@ -13076,18 +13096,18 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13076
13096
  }), h = P(() => {
13077
13097
  var q, J;
13078
13098
  return ((J = (q = n.config) == null ? void 0 : q.placeholder) == null ? void 0 : J.trim()) || "Пошук…";
13079
- }), u = T(f.value[0]);
13099
+ }), u = F(f.value[0]);
13080
13100
  le(f, (q) => {
13081
13101
  q.includes(u.value) || (u.value = q[0]);
13082
13102
  });
13083
- const d = T(""), y = T(!1), p = T(null), g = T(null), _ = T(null), A = T(null), E = T([]), k = T(null), S = T(!1), C = T([]), M = P(
13103
+ const d = F(""), y = F(!1), p = F(null), g = F(null), _ = F(null), A = F(null), E = F([]), k = F(null), S = F(!1), C = F([]), M = P(
13084
13104
  () => (u.value === "address" || u.value === "nominatim") && S.value
13085
13105
  ), N = P(() => {
13086
13106
  var q;
13087
13107
  return ((q = n.config) == null ? void 0 : q.addressDebounceMs) ?? 1e3;
13088
13108
  });
13089
13109
  let D = null;
13090
- const Q = T(!1), oe = P(() => d.value.trim().length > 0 ? E.value : C.value), ae = P(() => d.value.trim().length ? `Знайдено ${E.value.length}` : "Історія пошуку"), X = P(() => d.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
13110
+ const Q = F(!1), oe = P(() => d.value.trim().length > 0 ? E.value : C.value), ae = P(() => d.value.trim().length ? `Знайдено ${E.value.length}` : "Історія пошуку"), X = P(() => d.value.trim().length ? "Нічого не знайдено" : "Історія порожня");
13091
13111
  function ue() {
13092
13112
  var q, J;
13093
13113
  if (typeof window > "u") return [];
@@ -13112,7 +13132,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13112
13132
  function re() {
13113
13133
  O && (O.remove(), O = null);
13114
13134
  }
13115
- function F() {
13135
+ function T() {
13116
13136
  var J;
13117
13137
  const q = (J = r.map) == null ? void 0 : J.value;
13118
13138
  q && (q.getLayer(Dn) && q.removeLayer(Dn), q.getLayer(lo) && q.removeLayer(lo), q.getSource(On) && q.removeSource(On));
@@ -13122,7 +13142,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13122
13142
  if (!((Se = n.config) != null && Se.showMarker) || !q) return;
13123
13143
  const J = (Ie = r.map) == null ? void 0 : Ie.value;
13124
13144
  if (!J) return;
13125
- F(), B();
13145
+ T(), B();
13126
13146
  const G = {
13127
13147
  type: "Feature",
13128
13148
  geometry: q,
@@ -13168,7 +13188,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13168
13188
  function te(q, J) {
13169
13189
  var Se, Ie, De;
13170
13190
  if (!((Se = n.config) != null && Se.showMarker)) return;
13171
- re(), F();
13191
+ re(), T();
13172
13192
  const G = (Ie = r.map) == null ? void 0 : Ie.value;
13173
13193
  if (!G) return;
13174
13194
  if (J) {
@@ -13178,7 +13198,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13178
13198
  const be = ((De = n.config) == null ? void 0 : De.markerColor) || "#3B82F6";
13179
13199
  O = new maplibregl.Marker({ color: be }).setLngLat([q.lng, q.lat]).addTo(G);
13180
13200
  }
13181
- const fe = It({
13201
+ const de = It({
13182
13202
  position: "absolute",
13183
13203
  left: "0px",
13184
13204
  top: "0px",
@@ -13189,7 +13209,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13189
13209
  var Ie;
13190
13210
  if (!A.value) return;
13191
13211
  const q = A.value.getBoundingClientRect(), J = (Ie = _.value) == null ? void 0 : Ie.getBoundingClientRect(), G = (J == null ? void 0 : J.width) ?? q.width, be = ((J == null ? void 0 : J.left) ?? q.left) + window.scrollX, Se = q.bottom + window.scrollY + fx;
13192
- fe.left = `${be}px`, fe.top = `${Se}px`, fe.width = `${G}px`, fe.display = "block";
13212
+ de.left = `${be}px`, de.top = `${Se}px`, de.width = `${G}px`, de.display = "block";
13193
13213
  }
13194
13214
  const xe = () => {
13195
13215
  M.value && me();
@@ -13198,11 +13218,11 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13198
13218
  D && (clearTimeout(D), D = null);
13199
13219
  }
13200
13220
  le(u, () => {
13201
- d.value = "", y.value = !1, E.value = [], S.value = !1, Fe(), Q.value = !1, re(), F();
13221
+ d.value = "", y.value = !1, E.value = [], S.value = !1, Fe(), Q.value = !1, re(), T();
13202
13222
  }), le(M, (q) => {
13203
13223
  q ? st(() => {
13204
13224
  me();
13205
- }) : fe.display = "none";
13225
+ }) : de.display = "none";
13206
13226
  }), le(d, (q) => {
13207
13227
  if (u.value !== "address" && u.value !== "nominatim") {
13208
13228
  E.value = [], Fe();
@@ -13237,7 +13257,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13237
13257
  Ne(J == null ? void 0 : J.target), u.value = q;
13238
13258
  }
13239
13259
  function w() {
13240
- d.value = "", E.value = [], S.value = !1, Q.value = !1, re(), F();
13260
+ d.value = "", E.value = [], S.value = !1, Q.value = !1, re(), T();
13241
13261
  }
13242
13262
  function z(q) {
13243
13263
  const J = q.target;
@@ -13253,7 +13273,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13253
13273
  Ue(() => {
13254
13274
  C.value = ue(), window.addEventListener("click", z, !0), window.addEventListener("scroll", xe, !0), window.addEventListener("resize", xe);
13255
13275
  }), Ve(() => {
13256
- window.removeEventListener("click", z, !0), window.removeEventListener("scroll", xe, !0), window.removeEventListener("resize", xe), Fe(), re(), F();
13276
+ window.removeEventListener("click", z, !0), window.removeEventListener("scroll", xe, !0), window.removeEventListener("resize", xe), Fe(), re(), T();
13257
13277
  });
13258
13278
  function ee(q) {
13259
13279
  return q === "xy" ? "Координати" : q === "parcel" ? "Кадастр" : q === "nominatim" ? "Nominatim" : "Адресний";
@@ -13619,7 +13639,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13619
13639
  ref_key: "addressResultsRef",
13620
13640
  ref: k,
13621
13641
  class: "vs-select__options mt-1 bg-white border border-gray-300 rounded-lg shadow-lg text-sm text-gray-900 z-50",
13622
- style: ft(fe)
13642
+ style: ft(de)
13623
13643
  }, [
13624
13644
  o("div", sx, [
13625
13645
  o("span", ix, V(ae.value), 1),
@@ -13648,7 +13668,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13648
13668
  }), Jr = /* @__PURE__ */ Te(gx, [["__scopeId", "data-v-ba50488b"]]), yx = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.css", hx = "https://watergis.github.io/mapbox-gl-export/mapbox-gl-export.js", xx = /* @__PURE__ */ ge({
13649
13669
  __name: "MapPrintControl",
13650
13670
  setup(e) {
13651
- const { map: t, ready: n, addControl: r, removeControl: l } = it(), i = T(null), s = T(null), a = T(null), v = T(null);
13671
+ const { map: t, ready: n, addControl: r, removeControl: l } = it(), i = F(null), s = F(null), a = F(null), v = F(null);
13652
13672
  let m = null;
13653
13673
  function b() {
13654
13674
  !window.mapboxgl && window.maplibregl && (window.mapboxgl = window.maplibregl);
@@ -13834,7 +13854,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
13834
13854
  },
13835
13855
  setup(e) {
13836
13856
  var A, E, k, S;
13837
- const t = e, n = ((E = (A = rn()) == null ? void 0 : A.appContext.config.globalProperties) == null ? void 0 : E.$settings) || null, r = pn((k = n == null ? void 0 : n.map) == null ? void 0 : k.center) || [30, 50], l = T(null), i = tl(null), s = (S = t.options) == null ? void 0 : S.active, a = T(s === void 0 ? !1 : !!s);
13857
+ const t = e, n = ((E = (A = rn()) == null ? void 0 : A.appContext.config.globalProperties) == null ? void 0 : E.$settings) || null, r = pn((k = n == null ? void 0 : n.map) == null ? void 0 : k.center) || [30, 50], l = F(null), i = tl(null), s = (S = t.options) == null ? void 0 : S.active, a = F(s === void 0 ? !1 : !!s);
13838
13858
  function v(C, M) {
13839
13859
  return typeof C == "number" && Number.isFinite(C) ? C : M;
13840
13860
  }
@@ -14062,7 +14082,7 @@ const fy = /* @__PURE__ */ Te(uy, [["render", dy]]), py = { class: "flex flex-co
14062
14082
  __name: "AddCoordinates",
14063
14083
  emits: ["submit", "cancel"],
14064
14084
  setup(e, { emit: t }) {
14065
- const n = t, r = T(null), l = T(null), i = (v, m, b) => Math.min(Math.max(v, m), b), s = () => {
14085
+ const n = t, r = F(null), l = F(null), i = (v, m, b) => Math.min(Math.max(v, m), b), s = () => {
14066
14086
  if (r.value === null || l.value === null || !Number.isFinite(r.value) || !Number.isFinite(l.value))
14067
14087
  return;
14068
14088
  const v = i(r.value, -90, 90), m = i(l.value, -180, 180);
@@ -14188,7 +14208,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
14188
14208
  setup(e, { emit: t }) {
14189
14209
  const n = e, r = t, l = P(
14190
14210
  () => `${n.coords.lat.toFixed(4)}°, ${n.coords.lng.toFixed(4)}°`
14191
- ), i = T(!1), s = T(n.coords.lat), a = T(n.coords.lng);
14211
+ ), i = F(!1), s = F(n.coords.lat), a = F(n.coords.lng);
14192
14212
  le(
14193
14213
  () => n.coords,
14194
14214
  (h) => {
@@ -14305,7 +14325,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
14305
14325
  },
14306
14326
  emits: ["update-point", "delete-point"],
14307
14327
  setup(e) {
14308
- const t = e, n = T(!1), r = T("km2"), l = [
14328
+ const t = e, n = F(!1), r = F("km2"), l = [
14309
14329
  { id: "km2", label: "км²" },
14310
14330
  { id: "ha", label: "га" },
14311
14331
  { id: "m2", label: "м²" }
@@ -14513,7 +14533,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
14513
14533
  "shape-closed-change"
14514
14534
  ],
14515
14535
  setup(e, { expose: t, emit: n }) {
14516
- const r = n, l = T([]), i = P(() => l.value.length > 0), s = T(!1), a = T(!1), v = T("general");
14536
+ const r = n, l = F([]), i = P(() => l.value.length > 0), s = F(!1), a = F(!1), v = F("general");
14517
14537
  function m(Q) {
14518
14538
  v.value = Q, r("tab-change", Q);
14519
14539
  }
@@ -14863,7 +14883,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
14863
14883
  },
14864
14884
  emits: ["close", "recenter"],
14865
14885
  setup(e, { emit: t }) {
14866
- const n = e, r = t, l = P(() => n.position != null ? n.position.lng.toFixed(6) : "—"), i = P(() => n.position != null ? n.position.lat.toFixed(6) : "—"), s = T(!1);
14886
+ const n = e, r = t, l = P(() => n.position != null ? n.position.lng.toFixed(6) : "—"), i = P(() => n.position != null ? n.position.lat.toFixed(6) : "—"), s = F(!1);
14867
14887
  let a = null;
14868
14888
  function v() {
14869
14889
  if (n.position == null) return;
@@ -15031,7 +15051,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15031
15051
  { id: "polygon", icon: gr, title: "Полігон" },
15032
15052
  { id: "paint", icon: ti, title: "Балончик" },
15033
15053
  { id: "eraser", icon: Ks, title: "Стирачка" }
15034
- ], i = T("pen"), s = T("#2563eb"), a = T(3), v = () => r("update:stroke-color", s.value), m = () => r("update:stroke-width", a.value);
15054
+ ], i = F("pen"), s = F("#2563eb"), a = F(3), v = () => r("update:stroke-color", s.value), m = () => r("update:stroke-width", a.value);
15035
15055
  le(i, (y) => r("update:tool", y)), le(s, (y) => r("update:stroke-color", y)), le(a, (y) => r("update:stroke-width", y));
15036
15056
  function b() {
15037
15057
  r("close");
@@ -15194,7 +15214,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15194
15214
  strokeWidth: { default: 3 }
15195
15215
  },
15196
15216
  setup(e, { expose: t }) {
15197
- const n = T(null), r = T(null), l = T(null), i = T({ x: 0, y: 0 }), s = T(!1), a = e, v = P(() => Math.max(a.strokeWidth * 3, 12)), m = P(() => {
15217
+ const n = F(null), r = F(null), l = F(null), i = F({ x: 0, y: 0 }), s = F(!1), a = e, v = P(() => Math.max(a.strokeWidth * 3, 12)), m = P(() => {
15198
15218
  const $ = v.value * 2;
15199
15219
  return {
15200
15220
  width: `${$}px`,
@@ -15204,20 +15224,20 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15204
15224
  marginLeft: `-${v.value}px`,
15205
15225
  marginTop: `-${v.value}px`
15206
15226
  };
15207
- }), { ready: b } = it(), f = T(!1), h = T([]), u = T([]);
15227
+ }), { ready: b } = it(), f = F(!1), h = F([]), u = F([]);
15208
15228
  let d = 0, y = 0, p = 0, g = 0, _ = null;
15209
15229
  function A() {
15210
15230
  const $ = r.value, I = l.value, B = n.value;
15211
15231
  if (!$ || !B) return;
15212
15232
  const U = B.parentElement;
15213
15233
  if (!U) return;
15214
- const te = U.clientWidth, fe = U.clientHeight;
15215
- if (te <= 0 || fe <= 0) return;
15234
+ const te = U.clientWidth, de = U.clientHeight;
15235
+ if (te <= 0 || de <= 0) return;
15216
15236
  const me = window.devicePixelRatio || 1;
15217
- $.width = te * me, $.height = fe * me, $.style.width = `${te}px`, $.style.height = `${fe}px`;
15237
+ $.width = te * me, $.height = de * me, $.style.width = `${te}px`, $.style.height = `${de}px`;
15218
15238
  const xe = $.getContext("2d");
15219
15239
  if (xe && xe.scale(me, me), I) {
15220
- I.width = te * me, I.height = fe * me, I.style.width = `${te}px`, I.style.height = `${fe}px`;
15240
+ I.width = te * me, I.height = de * me, I.style.width = `${te}px`, I.style.height = `${de}px`;
15221
15241
  const Fe = I.getContext("2d");
15222
15242
  Fe && Fe.scale(me, me);
15223
15243
  }
@@ -15327,7 +15347,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15327
15347
  }
15328
15348
  function ue($, I, B) {
15329
15349
  const U = Math.max(a.strokeWidth * 2.5, 8), te = 12 + Math.floor(a.strokeWidth);
15330
- for (let fe = 0; fe < te; fe++) {
15350
+ for (let de = 0; de < te; de++) {
15331
15351
  const me = Math.random() * 2 * Math.PI, xe = U * Math.random(), Fe = I + Math.cos(me) * xe, Ne = B + Math.sin(me) * xe, H = 1 + Math.random() * 2;
15332
15352
  $.beginPath(), $.arc(Fe, Ne, H, 0, 2 * Math.PI), $.fill();
15333
15353
  }
@@ -15382,7 +15402,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15382
15402
  const B = window.devicePixelRatio || 1;
15383
15403
  I.clearRect(0, 0, $.width / B, $.height / B), h.value = [], u.value = [], C();
15384
15404
  }
15385
- function F() {
15405
+ function T() {
15386
15406
  return r.value;
15387
15407
  }
15388
15408
  return le(
@@ -15399,7 +15419,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15399
15419
  });
15400
15420
  }), Ve(() => {
15401
15421
  _ == null || _.disconnect(), _ = null;
15402
- }), t({ clear: re, getCanvas: F, finishPolygon: R, undo: O, canUndo: () => u.value.length > 0 }), ($, I) => (c(), x("div", {
15422
+ }), t({ clear: re, getCanvas: T, finishPolygon: R, undo: O, canUndo: () => u.value.length > 0 }), ($, I) => (c(), x("div", {
15403
15423
  ref_key: "wrapRef",
15404
15424
  ref: n,
15405
15425
  class: Ae(["drawing-canvas-wrap", { "drawing-canvas-wrap--eraser": e.tool === "eraser" }]),
@@ -15471,10 +15491,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15471
15491
  },
15472
15492
  setup(e) {
15473
15493
  var Xn, yn, In, jn;
15474
- const t = e, n = Lt(), r = Pt(), l = T(null), i = T({}), s = T(null), a = T(!1), v = T(null), m = T(!1), b = T([]), f = T(null), h = P(() => f.value === "ruler"), u = P(() => f.value === "draw"), d = P(() => f.value === "geolocation"), y = T("general"), p = T(null), g = T(null), _ = T(null), A = T("pen"), E = T("#2563eb"), k = T(3), S = T([]), C = T(!1), M = T(null), N = T(!1), D = T(null), Q = P(() => t.id || "main"), oe = P(() => {
15475
- var W, de;
15494
+ const t = e, n = Lt(), r = Pt(), l = F(null), i = F({}), s = F(null), a = F(!1), v = F(null), m = F(!1), b = F([]), f = F(null), h = P(() => f.value === "ruler"), u = P(() => f.value === "draw"), d = P(() => f.value === "geolocation"), y = F("general"), p = F(null), g = F(null), _ = F(null), A = F("pen"), E = F("#2563eb"), k = F(3), S = F([]), C = F(!1), M = F(null), N = F(!1), D = F(null), Q = P(() => t.id || "main"), oe = P(() => {
15495
+ var W, fe;
15476
15496
  return {
15477
- height: ((W = t.height) == null ? void 0 : W.trim()) || ((de = i.value) == null ? void 0 : de.height) || "calc(100vh - 65px)"
15497
+ height: ((W = t.height) == null ? void 0 : W.trim()) || ((fe = i.value) == null ? void 0 : fe.height) || "calc(100vh - 65px)"
15478
15498
  };
15479
15499
  }), ae = P(() => {
15480
15500
  var W;
@@ -15486,18 +15506,18 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15486
15506
  var W;
15487
15507
  return Fe((W = i.value) == null ? void 0 : W.maps);
15488
15508
  }), Y = P(() => {
15489
- var de, Ee;
15490
- const W = ((de = i.value) == null ? void 0 : de.minZoom) ?? ((Ee = i.value) == null ? void 0 : Ee.minzoom) ?? null;
15509
+ var fe, Ee;
15510
+ const W = ((fe = i.value) == null ? void 0 : fe.minZoom) ?? ((Ee = i.value) == null ? void 0 : Ee.minzoom) ?? null;
15491
15511
  return typeof W == "number" ? W : null;
15492
15512
  }), R = P(() => {
15493
- var de, Ee;
15494
- const W = ((de = i.value) == null ? void 0 : de.maxZoom) ?? ((Ee = i.value) == null ? void 0 : Ee.maxzoom) ?? null;
15513
+ var fe, Ee;
15514
+ const W = ((fe = i.value) == null ? void 0 : fe.maxZoom) ?? ((Ee = i.value) == null ? void 0 : Ee.maxzoom) ?? null;
15495
15515
  return typeof W == "number" ? W : typeof t.maxZoom == "number" ? t.maxZoom : 20;
15496
- }), O = T(null), re = P(() => {
15516
+ }), O = F(null), re = P(() => {
15497
15517
  if (!O.value) return null;
15498
- const { lng: W, lat: de } = O.value;
15499
- return `${de.toFixed(6)}, ${W.toFixed(6)}`;
15500
- }), F = P(() => {
15518
+ const { lng: W, lat: fe } = O.value;
15519
+ return `${fe.toFixed(6)}, ${W.toFixed(6)}`;
15520
+ }), T = P(() => {
15501
15521
  var W;
15502
15522
  return ((W = l.value) == null ? void 0 : W.ctx) ?? null;
15503
15523
  }), $ = P(() => {
@@ -15506,18 +15526,18 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15506
15526
  });
15507
15527
  function I(W) {
15508
15528
  if (!W || typeof W != "object") return W;
15509
- const de = pn(W.center);
15510
- return de ? { ...W, center: de } : W;
15529
+ const fe = pn(W.center);
15530
+ return fe ? { ...W, center: fe } : W;
15511
15531
  }
15512
15532
  const B = ((yn = (Xn = rn()) == null ? void 0 : Xn.appContext.config.globalProperties) == null ? void 0 : yn.$settings) || null;
15513
15533
  function U(W) {
15514
15534
  if (W == null) return null;
15515
- const de = Number(typeof W == "string" ? W.trim() : W);
15516
- return Number.isFinite(de) ? de : null;
15535
+ const fe = Number(typeof W == "string" ? W.trim() : W);
15536
+ return Number.isFinite(fe) ? fe : null;
15517
15537
  }
15518
- const te = pn((In = B == null ? void 0 : B.map) == null ? void 0 : In.center), fe = U((jn = B == null ? void 0 : B.map) == null ? void 0 : jn.zoom), me = P(() => {
15519
- const W = (B == null ? void 0 : B.map) || null, de = (W == null ? void 0 : W.boundary) ?? null, Ee = (W == null ? void 0 : W.katottg) ?? null;
15520
- return !de && !Ee ? null : { boundary: de, katottg: Ee };
15538
+ const te = pn((In = B == null ? void 0 : B.map) == null ? void 0 : In.center), de = U((jn = B == null ? void 0 : B.map) == null ? void 0 : jn.zoom), me = P(() => {
15539
+ const W = (B == null ? void 0 : B.map) || null, fe = (W == null ? void 0 : W.boundary) ?? null, Ee = (W == null ? void 0 : W.katottg) ?? null;
15540
+ return !fe && !Ee ? null : { boundary: fe, katottg: Ee };
15521
15541
  });
15522
15542
  function xe(W) {
15523
15543
  return typeof W == "string" && W.trim() ? W.trim().toLowerCase() : "top-left";
@@ -15532,14 +15552,14 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15532
15552
  const W = {
15533
15553
  left: { top: [], bottom: [] },
15534
15554
  right: { top: [], bottom: [] }
15535
- }, de = {
15555
+ }, fe = {
15536
15556
  "top-left": { side: "left", align: "top" },
15537
15557
  "bottom-left": { side: "left", align: "bottom" },
15538
15558
  "top-right": { side: "right", align: "top" },
15539
15559
  "bottom-right": { side: "right", align: "bottom" }
15540
15560
  };
15541
15561
  return Ne.value.forEach((Ee) => {
15542
- const qe = xe(Ee.position), $e = de[qe] ?? { side: "left", align: "top" };
15562
+ const qe = xe(Ee.position), $e = fe[qe] ?? { side: "left", align: "top" };
15543
15563
  W[$e.side][$e.align].push(Ee);
15544
15564
  }), W;
15545
15565
  });
@@ -15547,65 +15567,65 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15547
15567
  return Array.isArray(W) ? W[0] ?? null : typeof W == "string" ? W : null;
15548
15568
  }
15549
15569
  async function ee() {
15550
- var de;
15570
+ var fe;
15551
15571
  await st();
15552
- const W = (de = l.value) == null ? void 0 : de.ctx;
15572
+ const W = (fe = l.value) == null ? void 0 : fe.ctx;
15553
15573
  return W ? (W.ready && await W.ready(), W) : null;
15554
15574
  }
15555
15575
  function ye() {
15556
- var W, de, Ee;
15557
- return ((Ee = (de = (W = l.value) == null ? void 0 : W.ctx) == null ? void 0 : de.map) == null ? void 0 : Ee.value) ?? null;
15576
+ var W, fe, Ee;
15577
+ return ((Ee = (fe = (W = l.value) == null ? void 0 : W.ctx) == null ? void 0 : fe.map) == null ? void 0 : Ee.value) ?? null;
15558
15578
  }
15559
15579
  function Me() {
15560
15580
  const W = ye();
15561
15581
  if (!W) return null;
15562
- const de = W.getCenter();
15582
+ const fe = W.getCenter();
15563
15583
  return {
15564
15584
  z: W.getZoom().toFixed(2),
15565
- x: de.lng.toFixed(5),
15566
- y: de.lat.toFixed(5)
15585
+ x: fe.lng.toFixed(5),
15586
+ y: fe.lat.toFixed(5)
15567
15587
  };
15568
15588
  }
15569
15589
  async function we() {
15570
15590
  var Ee;
15571
- const W = await ee(), de = (Ee = W == null ? void 0 : W.map) == null ? void 0 : Ee.value;
15572
- de && (typeof Y.value == "number" && de.setMinZoom(Y.value), typeof R.value == "number" && de.setMaxZoom(R.value));
15591
+ const W = await ee(), fe = (Ee = W == null ? void 0 : W.map) == null ? void 0 : Ee.value;
15592
+ fe && (typeof Y.value == "number" && fe.setMinZoom(Y.value), typeof R.value == "number" && fe.setMaxZoom(R.value));
15573
15593
  }
15574
15594
  async function We() {
15575
15595
  var $e;
15576
15596
  if (s.value) return;
15577
- const W = await ee(), de = ($e = W == null ? void 0 : W.map) == null ? void 0 : $e.value;
15578
- if (!de) return;
15579
- const Ee = de.getCenter(), qe = de.getZoom();
15597
+ const W = await ee(), fe = ($e = W == null ? void 0 : W.map) == null ? void 0 : $e.value;
15598
+ if (!fe) return;
15599
+ const Ee = fe.getCenter(), qe = fe.getZoom();
15580
15600
  s.value = { center: [Ee.lng, Ee.lat], zoom: qe };
15581
15601
  }
15582
15602
  function Ze() {
15583
15603
  if (an.value) return;
15584
15604
  const W = Me();
15585
15605
  if (!W) return;
15586
- const de = z(n.query.x), Ee = z(n.query.y), qe = z(n.query.z);
15587
- de === W.x && Ee === W.y && qe === W.z || (un.value = W, r.replace({ query: { ...n.query, ...W } }).catch(() => {
15606
+ const fe = z(n.query.x), Ee = z(n.query.y), qe = z(n.query.z);
15607
+ fe === W.x && Ee === W.y && qe === W.z || (un.value = W, r.replace({ query: { ...n.query, ...W } }).catch(() => {
15588
15608
  }));
15589
15609
  }
15590
- function rt(W, de, Ee = 1e-6) {
15591
- return Math.abs(W - de) <= Ee;
15610
+ function rt(W, fe, Ee = 1e-6) {
15611
+ return Math.abs(W - fe) <= Ee;
15592
15612
  }
15593
15613
  async function et() {
15594
15614
  var Ke;
15595
15615
  if (gn()) return;
15596
- const W = await ee(), de = (Ke = W == null ? void 0 : W.map) == null ? void 0 : Ke.value;
15597
- if (!W || !de) return;
15616
+ const W = await ee(), fe = (Ke = W == null ? void 0 : W.map) == null ? void 0 : Ke.value;
15617
+ if (!W || !fe) return;
15598
15618
  const Ee = parseFloat(z(n.query.x) ?? ""), qe = parseFloat(z(n.query.y) ?? ""), $e = parseFloat(z(n.query.z) ?? ""), Ge = !Number.isNaN(Ee), He = !Number.isNaN(qe), _e = !Number.isNaN($e);
15599
15619
  let Ye = !1;
15600
15620
  an.value = !0;
15601
15621
  try {
15602
15622
  if (Ge && He) {
15603
- const tt = de.getCenter();
15604
- (!rt(tt.lng, Ee) || !rt(tt.lat, qe)) && (de.setCenter([Ee, qe]), Ye = !0);
15623
+ const tt = fe.getCenter();
15624
+ (!rt(tt.lng, Ee) || !rt(tt.lat, qe)) && (fe.setCenter([Ee, qe]), Ye = !0);
15605
15625
  }
15606
15626
  if (_e) {
15607
- const tt = de.getZoom();
15608
- rt(tt, $e, 1e-3) || (de.setZoom($e), Ye = !0);
15627
+ const tt = fe.getZoom();
15628
+ rt(tt, $e, 1e-3) || (fe.setZoom($e), Ye = !0);
15609
15629
  }
15610
15630
  (!Ge || !He || !_e || Ye) && Ze();
15611
15631
  } finally {
@@ -15613,23 +15633,23 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15613
15633
  }
15614
15634
  }
15615
15635
  let at = null, _t = null;
15616
- const an = T(!1), un = T(null);
15636
+ const an = F(!1), un = F(null);
15617
15637
  function gn() {
15618
15638
  const W = un.value;
15619
15639
  if (!W) return !1;
15620
- const de = z(n.query.x), Ee = z(n.query.y), qe = z(n.query.z);
15621
- return de === W.x && Ee === W.y && qe === W.z ? (un.value = null, !0) : !1;
15640
+ const fe = z(n.query.x), Ee = z(n.query.y), qe = z(n.query.z);
15641
+ return fe === W.x && Ee === W.y && qe === W.z ? (un.value = null, !0) : !1;
15622
15642
  }
15623
15643
  function cn(W) {
15624
- const de = W == null ? void 0 : W.lngLat;
15625
- de && (O.value = { lng: de.lng, lat: de.lat });
15644
+ const fe = W == null ? void 0 : W.lngLat;
15645
+ fe && (O.value = { lng: fe.lng, lat: fe.lat });
15626
15646
  }
15627
15647
  let jt = null;
15628
15648
  function En(W) {
15629
15649
  var Ee;
15630
15650
  if (!b.value.includes("ruler") || !h.value) return;
15631
- const de = W == null ? void 0 : W.lngLat;
15632
- de && ((Ee = p.value) == null || Ee.addPoint({ lat: de.lat, lng: de.lng }));
15651
+ const fe = W == null ? void 0 : W.lngLat;
15652
+ fe && ((Ee = p.value) == null || Ee.addPoint({ lat: fe.lat, lng: fe.lng }));
15633
15653
  }
15634
15654
  function Tn() {
15635
15655
  var W;
@@ -15652,9 +15672,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15652
15672
  }
15653
15673
  navigator.geolocation.getCurrentPosition(
15654
15674
  (W) => {
15655
- const de = W.coords.latitude, Ee = W.coords.longitude;
15656
- M.value = { lat: de, lng: Ee }, D.value = null, N.value = !1, f.value = "geolocation", ee().then((qe) => {
15657
- qe != null && qe.flyTo && qe.flyTo({ center: [Ee, de], zoom: 15 });
15675
+ const fe = W.coords.latitude, Ee = W.coords.longitude;
15676
+ M.value = { lat: fe, lng: Ee }, D.value = null, N.value = !1, f.value = "geolocation", ee().then((qe) => {
15677
+ qe != null && qe.flyTo && qe.flyTo({ center: [Ee, fe], zoom: 15 });
15658
15678
  });
15659
15679
  },
15660
15680
  () => {
@@ -15668,8 +15688,8 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15668
15688
  }
15669
15689
  function G() {
15670
15690
  const W = M.value;
15671
- W != null && ee().then((de) => {
15672
- de != null && de.flyTo && de.flyTo({ center: [W.lng, W.lat], zoom: 15 });
15691
+ W != null && ee().then((fe) => {
15692
+ fe != null && fe.flyTo && fe.flyTo({ center: [W.lng, W.lat], zoom: 15 });
15673
15693
  });
15674
15694
  }
15675
15695
  function be(W) {
@@ -15689,8 +15709,8 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15689
15709
  }
15690
15710
  function Pe() {
15691
15711
  var $e, Ge, He, _e;
15692
- const W = (He = (Ge = ($e = l.value) == null ? void 0 : $e.ctx) == null ? void 0 : Ge.map) == null ? void 0 : He.value, de = (_e = _.value) == null ? void 0 : _e.getCanvas();
15693
- if (!W || !de) return;
15712
+ const W = (He = (Ge = ($e = l.value) == null ? void 0 : $e.ctx) == null ? void 0 : Ge.map) == null ? void 0 : He.value, fe = (_e = _.value) == null ? void 0 : _e.getCanvas();
15713
+ if (!W || !fe) return;
15694
15714
  const Ee = (Ye, Ke) => {
15695
15715
  const tt = document.createElement("a");
15696
15716
  tt.download = Ke, tt.rel = "noopener", typeof Ye == "string" ? tt.href = Ye : (tt.href = URL.createObjectURL(Ye), setTimeout(() => URL.revokeObjectURL(tt.href), 100)), document.body.appendChild(tt), tt.click(), document.body.removeChild(tt);
@@ -15703,7 +15723,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15703
15723
  Ct.width = Ke, Ct.height = tt;
15704
15724
  const Rt = Ct.getContext("2d");
15705
15725
  if (!Rt) return;
15706
- Rt.drawImage(Ye, 0, 0), Rt.drawImage(de, 0, 0, de.width, de.height, 0, 0, Ke, tt);
15726
+ Rt.drawImage(Ye, 0, 0), Rt.drawImage(fe, 0, 0, fe.width, fe.height, 0, 0, Ke, tt);
15707
15727
  const ot = `map-drawing-${Date.now()}.png`;
15708
15728
  Ct.toBlob(
15709
15729
  (Dt) => {
@@ -15716,9 +15736,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15716
15736
  Ee(ht, ot);
15717
15737
  } catch {
15718
15738
  const ht = document.createElement("canvas");
15719
- ht.width = de.width, ht.height = de.height;
15739
+ ht.width = fe.width, ht.height = fe.height;
15720
15740
  const Ut = ht.getContext("2d");
15721
- Ut && (Ut.drawImage(de, 0, 0), ht.toBlob((Qn) => Qn && Ee(Qn, ot), "image/png"));
15741
+ Ut && (Ut.drawImage(fe, 0, 0), ht.toBlob((Qn) => Qn && Ee(Qn, ot), "image/png"));
15722
15742
  }
15723
15743
  },
15724
15744
  "image/png"
@@ -15736,17 +15756,17 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15736
15756
  async function $t(W = !1) {
15737
15757
  var Ee, qe;
15738
15758
  m.value = !1, v.value = null, O.value = null;
15739
- const de = W || !t.data;
15740
- a.value = de;
15759
+ const fe = W || !t.data;
15760
+ a.value = fe;
15741
15761
  try {
15742
- const $e = de ? await (async () => {
15762
+ const $e = fe ? await (async () => {
15743
15763
  const Ke = await fetch(`/api/gis-map/${encodeURIComponent(Q.value)}`);
15744
15764
  if (!Ke.ok)
15745
15765
  throw new Error(`Помилка завантаження (${Ke.status})`);
15746
15766
  return Ke.json();
15747
15767
  })() : t.data;
15748
- de || (m.value = !0);
15749
- const Ge = pn($e.center) ?? te, He = Fe($e.layers).map((Ke) => I(Ke)), _e = U($e.zoom) ?? fe;
15768
+ fe || (m.value = !0);
15769
+ const Ge = pn($e.center) ?? te, He = Fe($e.layers).map((Ke) => I(Ke)), _e = U($e.zoom) ?? de;
15750
15770
  i.value = {
15751
15771
  ...$e,
15752
15772
  center: Ge ?? null,
@@ -15759,7 +15779,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15759
15779
  } catch ($e) {
15760
15780
  v.value = ($e == null ? void 0 : $e.message) || "Не вдалося завантажити карту";
15761
15781
  } finally {
15762
- de && (a.value = !1);
15782
+ fe && (a.value = !1);
15763
15783
  }
15764
15784
  }
15765
15785
  const mt = P(() => {
@@ -15786,9 +15806,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15786
15806
  visible: Ge.visible ?? $e.visible ?? !0
15787
15807
  });
15788
15808
  }), Array.from(W.values());
15789
- }), Et = T([]);
15809
+ }), Et = F([]);
15790
15810
  function Bt(W) {
15791
- Et.value.includes(W) ? Et.value = Et.value.filter((de) => de !== W) : Et.value.push(W);
15811
+ Et.value.includes(W) ? Et.value = Et.value.filter((fe) => fe !== W) : Et.value.push(W);
15792
15812
  }
15793
15813
  const Kn = P(() => (W) => Et.value.includes(W.id));
15794
15814
  return le([Y, R], () => {
@@ -15807,11 +15827,11 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15807
15827
  () => {
15808
15828
  et();
15809
15829
  }
15810
- ), (W, de) => (c(), x("div", {
15830
+ ), (W, fe) => (c(), x("div", {
15811
15831
  class: "map-widget",
15812
15832
  style: ft(oe.value)
15813
15833
  }, [
15814
- de[8] || (de[8] = o("div", {
15834
+ fe[8] || (fe[8] = o("div", {
15815
15835
  id: "map-filter-popover-host",
15816
15836
  class: "map-widget__filter-host"
15817
15837
  }, null, -1)),
@@ -15833,27 +15853,27 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15833
15853
  boundary: me.value.boundary,
15834
15854
  katottg: me.value.katottg
15835
15855
  }, null, 8, ["boundary", "katottg"])) : K("", !0),
15836
- F.value && b.value.includes("draw") && u.value ? (c(), x("div", Qb, [
15856
+ T.value && b.value.includes("draw") && u.value ? (c(), x("div", Qb, [
15837
15857
  ne(Gb, {
15838
15858
  ref_key: "drawingPanelRef",
15839
15859
  ref: g,
15840
- onClose: de[0] || (de[0] = (He) => f.value = null),
15860
+ onClose: fe[0] || (fe[0] = (He) => f.value = null),
15841
15861
  onClear: Se,
15842
15862
  onDownload: Pe,
15843
15863
  onFinishPolygon: Ie,
15844
15864
  onUndo: De,
15845
- "onUpdate:tool": de[1] || (de[1] = (He) => A.value = He),
15846
- "onUpdate:strokeColor": de[2] || (de[2] = (He) => E.value = He),
15847
- "onUpdate:strokeWidth": de[3] || (de[3] = (He) => k.value = He)
15865
+ "onUpdate:tool": fe[1] || (fe[1] = (He) => A.value = He),
15866
+ "onUpdate:strokeColor": fe[2] || (fe[2] = (He) => E.value = He),
15867
+ "onUpdate:strokeWidth": fe[3] || (fe[3] = (He) => k.value = He)
15848
15868
  }, null, 512)
15849
15869
  ])) : K("", !0),
15850
- F.value ? (c(), x("div", Jb, [
15870
+ T.value ? (c(), x("div", Jb, [
15851
15871
  re.value ? (c(), pe($x, {
15852
15872
  key: 0,
15853
15873
  coordinates: re.value
15854
15874
  }, null, 8, ["coordinates"])) : K("", !0),
15855
15875
  ne(Lx, {
15856
- "map-context": F.value,
15876
+ "map-context": T.value,
15857
15877
  options: $.value
15858
15878
  }, null, 8, ["map-context", "options"]),
15859
15879
  b.value.includes("ruler") && h.value ? (c(), pe(wb, {
@@ -15861,9 +15881,9 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15861
15881
  ref_key: "rulerPanelRef",
15862
15882
  ref: p,
15863
15883
  onClose: Jt,
15864
- onTabChange: de[4] || (de[4] = (He) => y.value = He),
15884
+ onTabChange: fe[4] || (fe[4] = (He) => y.value = He),
15865
15885
  onPointsChange: be,
15866
- onShapeClosedChange: de[5] || (de[5] = (He) => C.value = He)
15886
+ onShapeClosedChange: fe[5] || (fe[5] = (He) => C.value = He)
15867
15887
  }, null, 512)) : K("", !0),
15868
15888
  b.value.includes("geolocation") && d.value ? (c(), pe(Fb, {
15869
15889
  key: 2,
@@ -15966,7 +15986,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
15966
15986
  }, null, 8, ["api"])) : _e.type === "layers" ? (c(), pe(Gr, {
15967
15987
  key: 2,
15968
15988
  layers: mt.value,
15969
- onAction: de[6] || (de[6] = (Ut) => Bt(Ut.layerId)),
15989
+ onAction: fe[6] || (fe[6] = (Ut) => Bt(Ut.layerId)),
15970
15990
  config: _e.config
15971
15991
  }, null, 8, ["layers", "config"])) : _e.type === "basemaps" ? (c(), pe($n, {
15972
15992
  key: 3,
@@ -16014,7 +16034,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16014
16034
  }, null, 8, ["api"])) : _e.type === "layers" ? (c(), pe(Gr, {
16015
16035
  key: 2,
16016
16036
  layers: mt.value,
16017
- onAction: de[7] || (de[7] = (Ut) => Bt(Ut.layerId)),
16037
+ onAction: fe[7] || (fe[7] = (Ut) => Bt(Ut.layerId)),
16018
16038
  config: _e.config
16019
16039
  }, null, 8, ["layers", "config"])) : _e.type === "basemaps" ? (c(), pe($n, {
16020
16040
  key: 3,
@@ -16079,7 +16099,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16079
16099
  },
16080
16100
  emits: ["update:modelValue", "save"],
16081
16101
  setup(e, { emit: t }) {
16082
- const n = e, r = t, l = T(""), i = T(null);
16102
+ const n = e, r = t, l = F(""), i = F(null);
16083
16103
  le(
16084
16104
  () => n.modelValue,
16085
16105
  (v) => {
@@ -16197,7 +16217,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16197
16217
  "top-right",
16198
16218
  "bottom-left",
16199
16219
  "bottom-right"
16200
- ], s = T(null), a = T(-1), v = P(() => n.modelValue || []);
16220
+ ], s = F(null), a = F(-1), v = P(() => n.modelValue || []);
16201
16221
  function m() {
16202
16222
  const g = [
16203
16223
  ...v.value,
@@ -16371,7 +16391,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16371
16391
  var C;
16372
16392
  return ((C = t.resolve("/maps").meta) == null ? void 0 : C.title) ?? "Карти";
16373
16393
  }
16374
- ), l = T(!0), i = T(!1), s = T([]), a = T({}), v = [
16394
+ ), l = F(!0), i = F(!1), s = F([]), a = F({}), v = [
16375
16395
  { name: "Загальна", id: "general" },
16376
16396
  { name: "Шари", id: "layers" },
16377
16397
  { name: "Віджети", id: "widgets" },
@@ -16379,7 +16399,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16379
16399
  ], m = v.map((C) => C.id), b = (C) => C ? Array.isArray(C) ? C[0] : C : null, f = (() => {
16380
16400
  const C = b(n.query.tab);
16381
16401
  return C && m.includes(C) ? C : "general";
16382
- })(), h = T(f);
16402
+ })(), h = F(f);
16383
16403
  le(
16384
16404
  () => n.query.tab,
16385
16405
  (C) => {
@@ -16389,7 +16409,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16389
16409
  ), le(h, (C) => {
16390
16410
  n.query.tab !== C && t.replace({ query: { ...n.query, tab: C } });
16391
16411
  });
16392
- const u = T({
16412
+ const u = F({
16393
16413
  name: "",
16394
16414
  map_key: "",
16395
16415
  description: "",
@@ -16682,10 +16702,10 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16682
16702
  },
16683
16703
  emits: ["update:counts"],
16684
16704
  setup(e, { expose: t, emit: n }) {
16685
- const r = e, l = n, i = Pt(), s = Lt(), a = T(Number(s.query.page) || 1), v = T(!1), m = T(0), b = T([]), f = P(() => {
16705
+ const r = e, l = n, i = Pt(), s = Lt(), a = F(Number(s.query.page) || 1), v = F(!1), m = F(0), b = F([]), f = P(() => {
16686
16706
  const C = (a.value - 1) * Fo, M = C + Fo;
16687
16707
  return b.value.slice(C, M);
16688
- }), h = T(!0), u = T(null), d = T(null);
16708
+ }), h = F(!0), u = F(null), d = F(null);
16689
16709
  let y = null, p = null;
16690
16710
  const g = (C = "", M = "") => {
16691
16711
  const N = new URLSearchParams(), D = C.trim();
@@ -16856,7 +16876,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16856
16876
  const n = e, r = t, l = (s) => {
16857
16877
  const a = s.target.value;
16858
16878
  r("update:filter", a);
16859
- }, i = T(!1);
16879
+ }, i = F(!1);
16860
16880
  return (s, a) => (c(), x("div", $w, [
16861
16881
  o("div", Cw, [
16862
16882
  o("h1", Sw, [
@@ -16968,7 +16988,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
16968
16988
  width: "w-4/12",
16969
16989
  align: "text-left"
16970
16990
  }
16971
- ], l = T([]), i = T(!0), s = T(null), a = P(() => {
16991
+ ], l = F([]), i = F(!0), s = F(null), a = P(() => {
16972
16992
  var f;
16973
16993
  if (!((f = n.search) != null && f.trim()))
16974
16994
  return l.value;
@@ -17050,7 +17070,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
17050
17070
  }, n_ = ["disabled"], o_ = ["disabled"], r_ = { class: "flex items-center gap-3" }, l_ = { class: "bg-white rounded-lg shadow-sm border border-gray-200 p-4 mb-4" }, s_ = { class: "relative max-w-md" }, i_ = { class: "vs-form-text relative w-full border-transparent text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 rounded-sm" }, a_ = { class: "absolute bottom-2/4 translate-y-2/4 cursor-pointer left-3" }, u_ = /* @__PURE__ */ ge({
17051
17071
  __name: "DictionaryDetails",
17052
17072
  setup(e) {
17053
- const t = Pt(), n = Lt(), r = P(() => n.params.name), l = T(!1), i = T(null), s = T(null), a = T(""), v = T(""), m = T(""), b = T(!1), f = T(!1), h = T(null), u = async () => {
17073
+ const t = Pt(), n = Lt(), r = P(() => n.params.name), l = F(!1), i = F(null), s = F(null), a = F(""), v = F(""), m = F(""), b = F(!1), f = F(!1), h = F(null), u = async () => {
17054
17074
  var A;
17055
17075
  try {
17056
17076
  const E = await fetch(
@@ -17226,7 +17246,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
17226
17246
  }), c_ = { class: "flex-col justify-between h-full" }, d_ = { class: "classifiers-component space-y-6 p-8 pt-2 max-w-[90%] mx-auto h-[calc(100vh-95px)]" }, H_ = /* @__PURE__ */ ge({
17227
17247
  __name: "index",
17228
17248
  setup(e) {
17229
- const t = Lt(), n = T(""), r = T(""), l = T(null), i = T({ filtered: 0, total: 0 }), s = (v) => {
17249
+ const t = Lt(), n = F(""), r = F(""), l = F(null), i = F({ filtered: 0, total: 0 }), s = (v) => {
17230
17250
  i.value = v;
17231
17251
  }, a = () => {
17232
17252
  var v;
@@ -17276,7 +17296,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
17276
17296
  },
17277
17297
  emits: ["update:modelValue"],
17278
17298
  setup(e, { expose: t, emit: n }) {
17279
- const r = e, l = n, i = P(() => r.actions && r.actions.length ? r.actions : ["view"]), s = T({}), a = T({}), v = P(() => {
17299
+ const r = e, l = n, i = P(() => r.actions && r.actions.length ? r.actions : ["view"]), s = F({}), a = F({}), v = P(() => {
17280
17300
  var A;
17281
17301
  return ((A = r.data) == null ? void 0 : A.routers) || [];
17282
17302
  });
@@ -17438,7 +17458,7 @@ const Nx = { class: "flex items-center gap-1.5 text-xs bg-gray-50 rounded p-1.5"
17438
17458
  }), I_ = { class: "flex flex-col gap-4 mt-2 mx-2" }, j_ = { class: "flex items-center gap-3" }, z_ = { class: "flex-1 relative" }, W_ = /* @__PURE__ */ ge({
17439
17459
  __name: "VsPermissions",
17440
17460
  setup(e) {
17441
- const t = Lt(), n = T(""), r = T(null), l = T({ categories: [], layers: [] }), i = T([]), s = T(["edit"]), a = P(() => m(l.value)), v = P(() => {
17461
+ const t = Lt(), n = F(""), r = F(null), l = F({ categories: [], layers: [] }), i = F([]), s = F(["edit"]), a = P(() => m(l.value)), v = P(() => {
17442
17462
  const h = n.value.toLowerCase().trim();
17443
17463
  return h ? a.value.map((u) => {
17444
17464
  const d = String(u.ua || "").toLowerCase().includes(h), y = (u.menu || []).filter((p) => String(p.ua || "").toLowerCase().includes(h));