@opengis/gis 0.2.208 → 0.2.209
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/README.md +181 -181
- package/dist/{CardIcon-iGo8QJu9.js → CardIcon-B6rIgAoD.js} +1 -1
- package/dist/{EntityTablePage-BiVoVAhN.js → EntityTablePage-CfLq5znM.js} +2 -2
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-BdL5cQgN.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-CB_4eJz9.js} +1 -1
- package/dist/{MapSettings-CXqiYxV4.js → MapSettings-fwcVWgdK.js} +2 -2
- package/dist/{MapToolbarRight.vue_vue_type_script_setup_true_lang-BHCChxmg.js → MapToolbarRight.vue_vue_type_script_setup_true_lang-BWqBARGq.js} +1 -1
- package/dist/{RastersTablePage-Dgk1wp3d.js → RastersTablePage-XHV40tf_.js} +2 -2
- package/dist/{cartocss-BIpgQU6F.js → cartocss-BjGlng_r.js} +526 -503
- package/dist/{import-utils-CfXKgZFd.js → import-utils-WfWvX9B5.js} +1 -1
- package/dist/{index-CM_DTEUa.js → index-CDy0MSfg.js} +3509 -3461
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +42 -48
- package/dist/{raster-D_vEBha8.js → raster-D2X_jR9m.js} +3 -3
- package/dist/{register-C5_Un1Ms.js → register-Ctn9pgUE.js} +3 -3
- package/dist/service-CiUwLEwY.js +3484 -0
- package/dist/{vs-datatable--K-DxayK.js → vs-datatable-BixMLOv-.js} +4 -3
- package/module/gis/card/gis.metadata.table/index.yml +22 -22
- package/module/gis/card/gis.rasters.table/index.yml +11 -11
- package/module/gis/card/gis.registers.table/index.yml +23 -23
- package/module/gis/card/gis.services.table/index.yml +25 -25
- package/module/gis/cls/bool.yes_no.json +12 -12
- package/module/gis/cls/encoding.json +14 -14
- package/module/gis/cls/geom_type.json +14 -14
- package/module/gis/cls/gis.column_type.json +34 -34
- package/module/gis/cls/gis.column_view_type.json +26 -26
- package/module/gis/cls/gis.filter_type.json +22 -22
- package/module/gis/cls/language.json +10 -10
- package/module/gis/cls/meta.service_type.json +42 -42
- package/module/gis/cls/ogc.service.json +21 -21
- package/module/gis/cls/service_type.json +42 -42
- package/module/gis/cls/source_type.json +10 -10
- package/module/gis/cls/standarts.json +6 -6
- package/module/gis/cls/topic_category.json +106 -106
- package/module/gis/cls/update_frequency.json +29 -29
- package/module/gis/cls/view.json +21 -21
- package/module/gis/form/feedback.answer.form.json +10 -10
- package/module/gis/form/gis.cartocss.form.json +64 -64
- package/module/gis/form/gis.group_list.form.json +17 -17
- package/module/gis/form/gis.maps.form.json +61 -61
- package/module/gis/form/gis.metadata.form.json +240 -240
- package/module/gis/form/gis.metadata_new.form.json +195 -195
- package/module/gis/form/gis.ogc_service.form.json +51 -51
- package/module/gis/form/gis.rasters.form.json +76 -76
- package/module/gis/form/gis.registers.form.json +127 -127
- package/module/gis/form/gis.registers_column.form.json +84 -84
- package/module/gis/form/gis.registers_filter.form.json +65 -65
- package/module/gis/form/gis.services.form.json +111 -111
- package/module/gis/form/gis.services_attributes.form.json +75 -75
- package/module/gis/form/gis.services_filter.form.json +65 -65
- package/module/gis/menu.json +43 -43
- package/module/gis/select/admin.cls.name.sql +9 -9
- package/module/gis/select/layer_list.sql +7 -7
- package/module/gis/select/layer_list_text.sql +7 -7
- package/module/gis/select/pg.column_name.geometry.sql +12 -12
- package/module/gis/select/pg.columns.parent.sql +6 -6
- package/module/gis/select/pg.table_name.sql +17 -17
- package/module/gis/select/service_id.sql +1 -1
- package/module/gis/select/srid.sql +7 -7
- package/module/gis/table/gis.cartocss.table.json +74 -74
- package/module/gis/table/gis.group_list.table.json +58 -58
- package/module/gis/table/gis.maps.table.json +110 -110
- package/module/gis/table/gis.metadata.table.json +70 -70
- package/module/gis/table/gis.metadata_new.table.json +137 -137
- package/module/gis/table/gis.ogc_service.table.json +100 -100
- package/module/gis/table/gis.rasters.table.json +113 -113
- package/module/gis/table/gis.registers.table.json +143 -143
- package/module/gis/table/gis.services.table.json +120 -120
- package/module/gis/table/site.gis.registers.table.json +88 -88
- package/module/gis/table/site.gis.services.table.json +106 -106
- package/module/gis/templates/ISO19136_2017_gml_template.xml +330 -330
- package/module/gis/tokens.yml +5 -5
- package/module/permissions/form/permissions.users.form.json +151 -151
- package/module/permissions/table/gis.permissions.table.json +97 -97
- package/module/test/map/addr.json +302 -302
- package/module/test/map/addr1.yml +23 -23
- package/module/test/select/address.str_id.sql +3 -3
- package/package.json +79 -79
- package/plugin.js +64 -64
- package/server/migrations/array_intersect.sql +13 -13
- package/server/migrations/cartocss.sql +27 -27
- package/server/migrations/group_list.sql +74 -74
- package/server/migrations/maps.sql +30 -30
- package/server/migrations/metadata.sql +415 -415
- package/server/migrations/ogc.sql +106 -106
- package/server/migrations/rasters.sql +265 -265
- package/server/migrations/services.sql +248 -248
- package/server/migrations/services_users_rel.sql +22 -22
- package/server/migrations/widgets.sql +20 -20
- package/server/plugins/crons.js +21 -21
- package/server/plugins/mapnik/funcs/checkRasterFile.js +107 -107
- package/server/plugins/mapnik/funcs/mapnik.js +151 -151
- package/server/plugins/mapnik/funcs/rootFolder.mjs +8 -8
- package/server/plugins/mapnik/map.proto +437 -437
- package/server/plugins/vite.js +74 -74
- package/server/routes/cartocss/cartocss.route.js +31 -31
- package/server/routes/cartocss/cartocss.route.test.js +78 -78
- package/server/routes/cartocss/cartocss.schema.js +76 -76
- package/server/routes/cartocss/functions/add.cartocss.js +39 -39
- package/server/routes/cartocss/functions/get.cartocss.js +57 -57
- package/server/routes/gis/functions/checkXML.js +107 -107
- package/server/routes/gis/functions/dashboard.js +24 -24
- package/server/routes/gis/gis.route.js +26 -26
- package/server/routes/gis/gis.route.test.js +33 -33
- package/server/routes/map/fonts/index.js +1933 -1933
- package/server/routes/map/functions/clearTiles.js +35 -35
- package/server/routes/map/functions/geojson.js +187 -187
- package/server/routes/map/functions/gis.convert.js +65 -65
- package/server/routes/map/functions/gis.icon.js +327 -327
- package/server/routes/map/functions/jsonData.js +206 -206
- package/server/routes/map/functions/layerList.js +144 -144
- package/server/routes/map/functions/map.js +122 -122
- package/server/routes/map/functions/mapCatalog.js +72 -72
- package/server/routes/map/functions/mapCatalogAttribute.js +53 -53
- package/server/routes/map/functions/mapFeatures.js +133 -133
- package/server/routes/map/functions/mapFormat.js +246 -246
- package/server/routes/map/functions/mapTiles.js +162 -162
- package/server/routes/map/functions/maps.js +15 -15
- package/server/routes/map/functions/marker_icon.js +43 -43
- package/server/routes/map/functions/parseGeoFile.js +85 -85
- package/server/routes/map/functions/pointHeight.js +51 -51
- package/server/routes/map/functions/vtile.js +174 -174
- package/server/routes/map/functions/vtile1.js +191 -191
- package/server/routes/map/map.route.js +283 -283
- package/server/routes/map/map.route.test.js +693 -693
- package/server/routes/map/map.schema.js +356 -356
- package/server/routes/map/pin/circle1.svg +76 -76
- package/server/routes/map/pin/circle2.svg +18 -18
- package/server/routes/map/pin/none.svg +12 -12
- package/server/routes/map/pin/pin.svg +14 -14
- package/server/routes/map/pin/pin1.svg +16 -16
- package/server/routes/map/pin/pin2.svg +7 -7
- package/server/routes/map/pin/pin3.svg +34 -34
- package/server/routes/map/pin/pin4.svg +14 -14
- package/server/routes/map/pin/pin5.svg +7 -7
- package/server/routes/map/pin/pin6.svg +12 -12
- package/server/routes/map/pin/pin7.svg +12 -12
- package/server/routes/mapnik/functions/cartoBounds.js +32 -32
- package/server/routes/mapnik/functions/clearTiles.js +103 -103
- package/server/routes/mapnik/functions/convertBoundToTile.js +27 -27
- package/server/routes/mapnik/functions/createXml.js +76 -76
- package/server/routes/mapnik/functions/createXmlMulti.js +72 -72
- package/server/routes/mapnik/functions/fileSearch.js +35 -35
- package/server/routes/mapnik/functions/fileStat.js +28 -28
- package/server/routes/mapnik/functions/pretile.js +138 -138
- package/server/routes/mapnik/functions/rasterInfo.js +66 -66
- package/server/routes/mapnik/functions/readDir.js +22 -22
- package/server/routes/mapnik/functions/rtile.js +164 -164
- package/server/routes/mapnik/functions/uploadRaster.js +152 -152
- package/server/routes/mapnik/functions/uploadXML.js +140 -140
- package/server/routes/mapnik/mapnik.route.js +102 -102
- package/server/routes/mapnik/mapnik.route.test.js +370 -370
- package/server/routes/mapnik/mapnik.schema.mjs +195 -195
- package/server/routes/mapnik.prefixless/functions/mapnikLogger.js +31 -31
- package/server/routes/mapnik.prefixless/functions/mapnikStat.js +21 -21
- package/server/routes/mapnik.prefixless/mapnik.prefixless.route.js +20 -20
- package/server/routes/mapnik.prefixless/mapnik.prefixless.route.test.js +91 -91
- package/server/routes/mapnik.prefixless/mapnik.prefixless.schema.mjs +27 -27
- package/server/routes/maps/functions/add.map.js +42 -42
- package/server/routes/maps/functions/del.map.js +17 -17
- package/server/routes/maps/functions/get.map.js +119 -119
- package/server/routes/maps/maps.route.js +58 -58
- package/server/routes/maps/maps.route.test.js +231 -231
- package/server/routes/maps/maps.schema.js +9 -9
- package/server/routes/metadata/functions/editMetadata.js +35 -35
- package/server/routes/metadata/functions/metadataXML.js +19 -19
- package/server/routes/metadata/metadata.route.js +26 -26
- package/server/routes/metadata/metadata.route.test.js +46 -46
- package/server/routes/metadata/metadata.schema.js +53 -53
- package/server/routes/ogc/functions/map.info.point.js +117 -117
- package/server/routes/ogc/ogc.route.js +21 -21
- package/server/routes/ogc/ogc.route.test.js +53 -53
- package/server/routes/ogc/ogc.schema.js +16 -16
- package/server/routes/permissions/functions/catalog.permissions.edit.js +20 -20
- package/server/routes/permissions/functions/catalog.permissions.js +12 -12
- package/server/routes/permissions/functions/get.permissions.js +59 -59
- package/server/routes/permissions/functions/gis.catalog.js +80 -80
- package/server/routes/permissions/permissions.route.js +35 -35
- package/server/routes/permissions/permissions.route.test.js +35 -35
- package/server/routes/permissions/permissions.schema.js +43 -43
- package/server/routes/registers/functions/add.registry.js +37 -37
- package/server/routes/registers/functions/classifiers.js +100 -100
- package/server/routes/registers/functions/columns.js +3 -3
- package/server/routes/registers/functions/content.type.js +9 -9
- package/server/routes/registers/functions/del.registry.js +14 -14
- package/server/routes/registers/functions/get.info.js +93 -93
- package/server/routes/registers/functions/getFilterSQLParametrized/formatValue.js +328 -328
- package/server/routes/registers/functions/getFilterSQLParametrized/getFilterQuery.js +126 -126
- package/server/routes/registers/functions/getFilterSQLParametrized/getRangeQuery.js +353 -353
- package/server/routes/registers/functions/getFilterSQLParametrized/index.js +81 -81
- package/server/routes/registers/functions/getTableColumnMeta.js +148 -148
- package/server/routes/registers/functions/gis.export.js +159 -159
- package/server/routes/registers/functions/gis.registry.js +71 -71
- package/server/routes/registers/functions/gis.registry.list.js +61 -61
- package/server/routes/registers/functions/gis.suggest.js +310 -310
- package/server/routes/registers/functions/handleRegistryRequest.js +178 -178
- package/server/routes/registers/functions/map.registry.js +87 -87
- package/server/routes/registers/registers.route.js +92 -92
- package/server/routes/registers/registers.route.test.js +173 -173
- package/server/routes/registers/registers.schema.js +276 -276
- package/server/routes/root.mjs +3 -3
- package/server/routes/services/functions/add.service.js +62 -62
- package/server/routes/services/functions/create.route.js +93 -93
- package/server/routes/services/functions/del.service.js +12 -12
- package/server/routes/services/functions/get.layer.geom.js +27 -27
- package/server/routes/services/functions/get.service.users.js +76 -76
- package/server/routes/services/functions/get.services.col.js +34 -34
- package/server/routes/services/functions/get.services.js +124 -124
- package/server/routes/services/functions/legend.auto.js +77 -77
- package/server/routes/services/services.route.js +76 -76
- package/server/routes/services/services.route.test.js +171 -171
- package/server/routes/services/services.schema.js +459 -459
- package/server/routes/widgets/functions/add.widget.js +38 -38
- package/server/routes/widgets/functions/del.widget.js +17 -17
- package/server/routes/widgets/functions/get.widget.js +41 -41
- package/server/routes/widgets/widgets.route.js +61 -61
- package/server/routes/widgets/widgets.route.test.js +144 -144
- package/server/routes/widgets/widgets.schema.js +24 -24
- package/server/shared/listFiles.js +14 -14
- package/utils.js +13 -13
- package/dist/service-JN82JN81.js +0 -3676
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { openBlock as x, createElementBlock as P, createElementVNode as l, defineComponent as
|
|
1
|
+
import { openBlock as x, createElementBlock as P, createElementVNode as l, defineComponent as q, computed as R, createTextVNode as Le, createVNode as M, mergeModels as vt, defineAsyncComponent as Se, useModel as pt, ref as b, withCtx as O, toDisplayString as D, unref as Q, watch as Z, onUnmounted as yt, createCommentVNode as j, onBeforeUnmount as oe, onMounted as Ee, createBlock as T, Transition as gt, withModifiers as De, Fragment as me, renderList as Qe, normalizeStyle as $e, normalizeClass as ve, withDirectives as Ue, vModelText as ht, vModelCheckbox as bt, resolveDynamicComponent as xt } from "vue";
|
|
2
2
|
import { useRouter as _t, useRoute as wt } from "vue-router";
|
|
3
|
-
import { notify as
|
|
3
|
+
import { notify as U } from "@opengis/core";
|
|
4
4
|
import { Minimize2 as kt, Maximize2 as Ct, Link2 as Mt, Ruler as St, Eye as $t, EyeOff as Lt } from "lucide-vue-next";
|
|
5
|
-
import { _ as Ye, f as
|
|
6
|
-
import { S as Ft, C as Nt } from "./CardIcon-
|
|
7
|
-
import { h as pe, _ as jt, a as Ot, b as Dt, c as Ut, d as qt, e as Zt, f as It, g as Qt } from "./MapToolbarRight.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as Ye, f as le, o as Et, p as Vt, q as zt, M as Bt, i as Rt, j as qe, r as Pt, t as At, m as Tt } from "./index-CDy0MSfg.js";
|
|
6
|
+
import { S as Ft, C as Nt } from "./CardIcon-B6rIgAoD.js";
|
|
7
|
+
import { h as pe, _ as jt, a as Ot, b as Dt, c as Ut, d as qt, e as Zt, f as It, g as Qt } from "./MapToolbarRight.vue_vue_type_script_setup_true_lang-BWqBARGq.js";
|
|
8
8
|
import { _ as He } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
|
|
9
|
-
import { V as Yt } from "./vs-datatable
|
|
10
|
-
import { _ as Ze } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { V as Yt } from "./vs-datatable-BixMLOv-.js";
|
|
10
|
+
import { _ as Ze } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-CB_4eJz9.js";
|
|
11
11
|
const Ht = {}, Jt = {
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
width: "24",
|
|
@@ -20,8 +20,8 @@ const Ht = {}, Jt = {
|
|
|
20
20
|
"stroke-linejoin": "round",
|
|
21
21
|
class: "lucide lucide-table"
|
|
22
22
|
};
|
|
23
|
-
function Kt(
|
|
24
|
-
return x(), P("svg", Jt, [...
|
|
23
|
+
function Kt(E, i) {
|
|
24
|
+
return x(), P("svg", Jt, [...i[0] || (i[0] = [
|
|
25
25
|
l("path", { d: "M12 3v18" }, null, -1),
|
|
26
26
|
l("rect", {
|
|
27
27
|
width: "18",
|
|
@@ -34,16 +34,16 @@ function Kt(L, s) {
|
|
|
34
34
|
l("path", { d: "M3 15h18" }, null, -1)
|
|
35
35
|
])]);
|
|
36
36
|
}
|
|
37
|
-
const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-col h-full" }, Gt = { class: "flex justify-end mb-3 gap-2" }, ea = /* @__PURE__ */
|
|
37
|
+
const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-col h-full" }, Gt = { class: "flex justify-end mb-3 gap-2" }, ea = /* @__PURE__ */ q({
|
|
38
38
|
__name: "cartocss-css-tab",
|
|
39
39
|
props: {
|
|
40
40
|
modelValue: {}
|
|
41
41
|
},
|
|
42
42
|
emits: ["update:modelValue", "save"],
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
45
|
-
get: () =>
|
|
46
|
-
set: (p) =>
|
|
43
|
+
setup(E, { emit: i }) {
|
|
44
|
+
const o = E, w = i, _ = R({
|
|
45
|
+
get: () => o.modelValue,
|
|
46
|
+
set: (p) => w("update:modelValue", p)
|
|
47
47
|
});
|
|
48
48
|
return (p, g) => (x(), P("div", Xt, [
|
|
49
49
|
l("div", Gt, [
|
|
@@ -71,7 +71,7 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
71
71
|
Le(" Зберегти ", -1)
|
|
72
72
|
])])
|
|
73
73
|
]),
|
|
74
|
-
|
|
74
|
+
M(He, {
|
|
75
75
|
modelValue: _.value,
|
|
76
76
|
"onUpdate:modelValue": g[1] || (g[1] = (y) => _.value = y),
|
|
77
77
|
language: "cartocss",
|
|
@@ -79,15 +79,15 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
79
79
|
}, null, 8, ["modelValue"])
|
|
80
80
|
]));
|
|
81
81
|
}
|
|
82
|
-
}), ta = { class: "flex flex-col flex-1 min-h-0" }, aa = { class: "flex justify-between mb-3 gap-2" },
|
|
82
|
+
}), ta = { class: "flex flex-col flex-1 min-h-0" }, aa = { class: "flex justify-between mb-3 gap-2" }, na = { class: "text-left" }, oa = { class: "font-medium text-gray-900" }, la = { class: "text-xs text-gray-500" }, ra = { class: "flex justify-center gap-2" }, sa = ["checked", "onChange"], ua = { class: "text-sm font-medium text-gray-900" }, ia = /* @__PURE__ */ q({
|
|
83
83
|
__name: "cartocss-data-tab",
|
|
84
84
|
props: {
|
|
85
85
|
modelValue: { default: [] },
|
|
86
86
|
modelModifiers: {}
|
|
87
87
|
},
|
|
88
88
|
emits: /* @__PURE__ */ vt(["save"], ["update:modelValue"]),
|
|
89
|
-
setup(
|
|
90
|
-
const
|
|
89
|
+
setup(E, { emit: i }) {
|
|
90
|
+
const o = [
|
|
91
91
|
{ key: "table", label: "Таблиця", slot: "datasetCell" },
|
|
92
92
|
{
|
|
93
93
|
key: "active",
|
|
@@ -101,9 +101,9 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
101
101
|
slot: "zoomCell",
|
|
102
102
|
width: "140px"
|
|
103
103
|
}
|
|
104
|
-
],
|
|
105
|
-
() => import("@opengis/core").then((
|
|
106
|
-
), _ = Se(() => import("@opengis/form")), p = pt(
|
|
104
|
+
], w = Se(
|
|
105
|
+
() => import("@opengis/core").then((L) => L.VsModal)
|
|
106
|
+
), _ = Se(() => import("@opengis/form")), p = pt(E, "modelValue"), g = i, y = b(!1), h = b({
|
|
107
107
|
table: "",
|
|
108
108
|
query: "",
|
|
109
109
|
srid: "",
|
|
@@ -115,7 +115,7 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
115
115
|
proj4text: "",
|
|
116
116
|
active: !0,
|
|
117
117
|
card_html: ""
|
|
118
|
-
}),
|
|
118
|
+
}), c = {
|
|
119
119
|
table: { type: "text", label: "Таблиця", validators: ["required"] },
|
|
120
120
|
key: { type: "text", label: "Ключ", validators: ["required"] },
|
|
121
121
|
query: { type: "text", label: "Query" },
|
|
@@ -146,11 +146,11 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
146
146
|
function m() {
|
|
147
147
|
y.value = !1;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
var
|
|
151
|
-
const
|
|
152
|
-
if (!
|
|
153
|
-
|
|
149
|
+
function B() {
|
|
150
|
+
var s, n;
|
|
151
|
+
const L = (s = h.value.table) == null ? void 0 : s.trim(), u = (n = h.value.key) == null ? void 0 : n.trim();
|
|
152
|
+
if (!L || !u) {
|
|
153
|
+
U({
|
|
154
154
|
type: "warning",
|
|
155
155
|
title: "Перевірка",
|
|
156
156
|
message: "Вкажіть таблицю та підпис"
|
|
@@ -159,15 +159,15 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
159
159
|
}
|
|
160
160
|
p.value = [
|
|
161
161
|
...Array.isArray(p.value) ? p.value : [],
|
|
162
|
-
{ ...h.value, table:
|
|
162
|
+
{ ...h.value, table: L, key: u }
|
|
163
163
|
], y.value = !1;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
var
|
|
167
|
-
const
|
|
168
|
-
|
|
165
|
+
function C(L, u) {
|
|
166
|
+
var n;
|
|
167
|
+
const s = ((n = u == null ? void 0 : u.target) == null ? void 0 : n.checked) ?? !1;
|
|
168
|
+
L.active = s, p.value = Array.isArray(p.value) ? [...p.value] : [];
|
|
169
169
|
}
|
|
170
|
-
return (
|
|
170
|
+
return (L, u) => (x(), P("div", ta, [
|
|
171
171
|
l("div", aa, [
|
|
172
172
|
l("button", {
|
|
173
173
|
type: "button",
|
|
@@ -177,45 +177,45 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
177
177
|
l("button", {
|
|
178
178
|
type: "button",
|
|
179
179
|
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium bg-gradient-to-r from-sky-400 to-blue-400 hover:from-sky-500 hover:to-blue-500 text-white shadow-sm px-4 py-2 h-9 text-xs transition-all duration-300",
|
|
180
|
-
onClick:
|
|
180
|
+
onClick: u[0] || (u[0] = (s) => g("save"))
|
|
181
181
|
}, " Зберегти ")
|
|
182
182
|
]),
|
|
183
|
-
|
|
183
|
+
M(Yt, {
|
|
184
184
|
modelValue: p.value,
|
|
185
|
-
"onUpdate:modelValue":
|
|
186
|
-
"columns-scheme":
|
|
187
|
-
"form-scheme":
|
|
185
|
+
"onUpdate:modelValue": u[1] || (u[1] = (s) => p.value = s),
|
|
186
|
+
"columns-scheme": o,
|
|
187
|
+
"form-scheme": c,
|
|
188
188
|
"add-button": !1,
|
|
189
189
|
"main-col-width": "260px"
|
|
190
190
|
}, {
|
|
191
|
-
datasetCell:
|
|
192
|
-
l("div",
|
|
193
|
-
l("div",
|
|
194
|
-
l("div", la,
|
|
191
|
+
datasetCell: O(({ row: s }) => [
|
|
192
|
+
l("div", na, [
|
|
193
|
+
l("div", oa, D(s.table), 1),
|
|
194
|
+
l("div", la, D(s.key), 1)
|
|
195
195
|
])
|
|
196
196
|
]),
|
|
197
|
-
activeCell:
|
|
197
|
+
activeCell: O(({ row: s }) => [
|
|
198
198
|
l("label", ra, [
|
|
199
199
|
l("input", {
|
|
200
200
|
type: "checkbox",
|
|
201
201
|
class: "h-4 w-4 text-sky-500 border-gray-300 rounded focus:ring-sky-300",
|
|
202
|
-
checked:
|
|
203
|
-
onChange: (
|
|
202
|
+
checked: s.active,
|
|
203
|
+
onChange: (n) => C(s, n)
|
|
204
204
|
}, null, 40, sa)
|
|
205
205
|
])
|
|
206
206
|
]),
|
|
207
|
-
zoomCell:
|
|
208
|
-
l("div", ua,
|
|
207
|
+
zoomCell: O(({ row: s }) => [
|
|
208
|
+
l("div", ua, D(s.zoom), 1)
|
|
209
209
|
]),
|
|
210
210
|
_: 1
|
|
211
211
|
}, 8, ["modelValue"]),
|
|
212
|
-
|
|
212
|
+
M(Q(w), {
|
|
213
213
|
teleport: "#modal",
|
|
214
214
|
visible: y.value,
|
|
215
|
-
"onUpdate:visible":
|
|
215
|
+
"onUpdate:visible": u[3] || (u[3] = (s) => y.value = s),
|
|
216
216
|
title: "Нова таблиця CartoCSS"
|
|
217
217
|
}, {
|
|
218
|
-
footer:
|
|
218
|
+
footer: O(() => [
|
|
219
219
|
l("div", { class: "flex justify-end gap-2 p-4 border-т" }, [
|
|
220
220
|
l("button", {
|
|
221
221
|
type: "button",
|
|
@@ -225,43 +225,43 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
225
225
|
l("button", {
|
|
226
226
|
type: "button",
|
|
227
227
|
class: "px-4 py-2 rounded bg-blue-600 text-white",
|
|
228
|
-
onClick:
|
|
228
|
+
onClick: B
|
|
229
229
|
}, " Додати ")
|
|
230
230
|
])
|
|
231
231
|
]),
|
|
232
|
-
default:
|
|
233
|
-
|
|
232
|
+
default: O(() => [
|
|
233
|
+
M(Q(_), {
|
|
234
234
|
values: h.value,
|
|
235
|
-
"onUpdate:values":
|
|
236
|
-
schema:
|
|
235
|
+
"onUpdate:values": u[2] || (u[2] = (s) => h.value = s),
|
|
236
|
+
schema: c
|
|
237
237
|
}, null, 8, ["values"])
|
|
238
238
|
]),
|
|
239
239
|
_: 1
|
|
240
240
|
}, 8, ["visible"])
|
|
241
241
|
]));
|
|
242
242
|
}
|
|
243
|
-
}), ca = { class: "flex flex-col flex-1 min-h-0 gap-4" }, da = { class: "h-[calc(100vh-230px)] rounded-md border border-gray-200 bg-white" }, fa = /* @__PURE__ */
|
|
243
|
+
}), ca = { class: "flex flex-col flex-1 min-h-0 gap-4" }, da = { class: "h-[calc(100vh-230px)] rounded-md border border-gray-200 bg-white" }, fa = /* @__PURE__ */ q({
|
|
244
244
|
__name: "cartocss-card-tab",
|
|
245
245
|
props: {
|
|
246
246
|
card: {},
|
|
247
247
|
table: {}
|
|
248
248
|
},
|
|
249
249
|
emits: ["save"],
|
|
250
|
-
setup(
|
|
251
|
-
const
|
|
250
|
+
setup(E, { emit: i }) {
|
|
251
|
+
const o = E, w = i, _ = b(o.table), p = b(o.card), g = Se(() => import("@opengis/form").then((h) => h.VsInputText));
|
|
252
252
|
function y() {
|
|
253
|
-
|
|
253
|
+
w("save", {
|
|
254
254
|
card_html: p.value,
|
|
255
255
|
card_table: _.value
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
return (h,
|
|
258
|
+
return (h, c) => (x(), P("div", ca, [
|
|
259
259
|
l("div", { class: "flex items-center justify-end gap-3" }, [
|
|
260
260
|
l("button", {
|
|
261
261
|
type: "button",
|
|
262
262
|
class: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium bg-gradient-to-r from-sky-400 to-blue-400 hover:from-sky-500 hover:to-blue-500 text-white shadow-sm px-4 py-2 h-9 text-xs transition-all duration-300",
|
|
263
263
|
onClick: y
|
|
264
|
-
}, [...
|
|
264
|
+
}, [...c[2] || (c[2] = [
|
|
265
265
|
l("svg", {
|
|
266
266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
267
267
|
width: "24",
|
|
@@ -282,15 +282,15 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
282
282
|
])])
|
|
283
283
|
]),
|
|
284
284
|
l("div", null, [
|
|
285
|
-
|
|
285
|
+
M(Q(g), {
|
|
286
286
|
modelValue: _.value,
|
|
287
|
-
"onUpdate:modelValue":
|
|
287
|
+
"onUpdate:modelValue": c[0] || (c[0] = (r) => _.value = r)
|
|
288
288
|
}, null, 8, ["modelValue"])
|
|
289
289
|
]),
|
|
290
290
|
l("div", da, [
|
|
291
|
-
|
|
291
|
+
M(He, {
|
|
292
292
|
modelValue: p.value,
|
|
293
|
-
"onUpdate:modelValue":
|
|
293
|
+
"onUpdate:modelValue": c[1] || (c[1] = (r) => p.value = r),
|
|
294
294
|
language: "html",
|
|
295
295
|
theme: "vs-light",
|
|
296
296
|
class: "h-full w-full rounded-md"
|
|
@@ -298,7 +298,7 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
298
298
|
])
|
|
299
299
|
]));
|
|
300
300
|
}
|
|
301
|
-
}), ma = /* @__PURE__ */
|
|
301
|
+
}), ma = /* @__PURE__ */ q({
|
|
302
302
|
__name: "CartocssLayerLoader",
|
|
303
303
|
props: {
|
|
304
304
|
layerId: { type: String, required: !0 },
|
|
@@ -308,145 +308,168 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
308
308
|
owner: { type: String, default: "" },
|
|
309
309
|
opacity: { type: Number, default: 1 }
|
|
310
310
|
},
|
|
311
|
-
setup(
|
|
312
|
-
const
|
|
313
|
-
activateTemporaryLayer:
|
|
311
|
+
setup(E) {
|
|
312
|
+
const i = E, o = le(), {
|
|
313
|
+
activateTemporaryLayer: w,
|
|
314
314
|
deactivateTemporaryLayer: _,
|
|
315
315
|
setTemporaryLayerOpacity: p
|
|
316
|
-
} = Et(
|
|
316
|
+
} = Et(o.map), g = R(() => {
|
|
317
317
|
var m;
|
|
318
|
-
const r = `${(m =
|
|
318
|
+
const r = `${(m = i == null ? void 0 : i.tileUrl) == null ? void 0 : m.trim()}`;
|
|
319
319
|
return r ? typeof window > "u" || typeof location > "u" || /^https?:\/\//i.test(r) ? r : r.startsWith("//") ? `${window.location.protocol}${r}` : r.startsWith("/") ? `${location.origin}${r}` : `${location.origin}/${r}` : "";
|
|
320
320
|
});
|
|
321
321
|
let y = "", h = "";
|
|
322
|
-
function
|
|
323
|
-
const r =
|
|
324
|
-
y && (!r || y !==
|
|
322
|
+
function c() {
|
|
323
|
+
const r = i.active && !!g.value;
|
|
324
|
+
y && (!r || y !== i.layerId) && (_(y, h || void 0), y = "", h = ""), r && (w(
|
|
325
325
|
{
|
|
326
|
-
id:
|
|
327
|
-
title:
|
|
326
|
+
id: i.layerId,
|
|
327
|
+
title: i.title || i.layerId,
|
|
328
328
|
url: g.value,
|
|
329
|
-
opacity:
|
|
329
|
+
opacity: i.opacity
|
|
330
330
|
},
|
|
331
331
|
{},
|
|
332
|
-
|
|
333
|
-
), y =
|
|
332
|
+
i.owner
|
|
333
|
+
), y = i.layerId, h = i.owner || "");
|
|
334
334
|
}
|
|
335
|
-
return
|
|
336
|
-
() => [
|
|
337
|
-
|
|
335
|
+
return Z(
|
|
336
|
+
() => [i.layerId, g.value, i.active, i.owner],
|
|
337
|
+
c,
|
|
338
338
|
{ immediate: !0 }
|
|
339
|
-
),
|
|
340
|
-
() =>
|
|
339
|
+
), Z(
|
|
340
|
+
() => i.opacity,
|
|
341
341
|
(r) => {
|
|
342
|
-
!y || !
|
|
342
|
+
!y || !i.active || p(y, r, h || void 0);
|
|
343
343
|
},
|
|
344
344
|
{ immediate: !0 }
|
|
345
345
|
), yt(() => {
|
|
346
346
|
y && (_(y, h || void 0), y = "", h = "");
|
|
347
|
-
}), (r, m) =>
|
|
347
|
+
}), (r, m) => j("", !0);
|
|
348
348
|
}
|
|
349
|
-
}), va = /* @__PURE__ */
|
|
349
|
+
}), va = /* @__PURE__ */ q({
|
|
350
350
|
__name: "CartocssMapClickListener",
|
|
351
351
|
props: {
|
|
352
352
|
cartocssId: {},
|
|
353
353
|
infoEnabled: { type: [Boolean, null] },
|
|
354
354
|
active: { type: [Boolean, null] }
|
|
355
355
|
},
|
|
356
|
-
setup(
|
|
357
|
-
const
|
|
358
|
-
() => !!
|
|
359
|
-
), { map: _, ready: p } =
|
|
360
|
-
!
|
|
361
|
-
new CustomEvent(zt, { detail:
|
|
356
|
+
setup(E) {
|
|
357
|
+
const i = E, o = R(() => i.cartocssId ?? null), w = R(
|
|
358
|
+
() => !!i.infoEnabled && i.active !== !1
|
|
359
|
+
), { map: _, ready: p } = le(), g = (u) => {
|
|
360
|
+
!u || typeof window > "u" || window.dispatchEvent(
|
|
361
|
+
new CustomEvent(zt, { detail: u })
|
|
362
362
|
);
|
|
363
|
-
}, y = async (
|
|
364
|
-
const
|
|
365
|
-
if (!
|
|
366
|
-
throw new Error(`API returned ${
|
|
367
|
-
return
|
|
363
|
+
}, y = async (u) => {
|
|
364
|
+
const s = await fetch(`/api/map-format?${u.toString()}`);
|
|
365
|
+
if (!s.ok)
|
|
366
|
+
throw new Error(`API returned ${s.status}`);
|
|
367
|
+
return s.json();
|
|
368
368
|
};
|
|
369
|
-
let h = null,
|
|
370
|
-
const r = (
|
|
371
|
-
if (!
|
|
372
|
-
if (typeof
|
|
369
|
+
let h = null, c = null;
|
|
370
|
+
const r = (u) => {
|
|
371
|
+
if (!u) return null;
|
|
372
|
+
if (typeof u == "string")
|
|
373
373
|
try {
|
|
374
|
-
return JSON.parse(
|
|
374
|
+
return JSON.parse(u);
|
|
375
375
|
} catch {
|
|
376
376
|
return null;
|
|
377
377
|
}
|
|
378
|
-
return
|
|
379
|
-
}, m =
|
|
380
|
-
var
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
return u;
|
|
379
|
+
}, m = (u) => {
|
|
380
|
+
var v;
|
|
381
|
+
const s = Array.isArray(u == null ? void 0 : u.ids) ? u.ids.filter(
|
|
382
|
+
(S) => S != null && String(S).trim() !== ""
|
|
383
|
+
) : [];
|
|
384
|
+
if (s.length)
|
|
385
|
+
return [...new Set(s.map((S) => String(S)))];
|
|
386
|
+
const n = ((v = u == null ? void 0 : u.data) == null ? void 0 : v.id) ?? (u == null ? void 0 : u.id);
|
|
387
|
+
return n != null && String(n).trim() !== "" ? [String(n)] : [];
|
|
388
|
+
}, B = async (u, s) => {
|
|
389
|
+
var S;
|
|
390
|
+
const n = o.value ? `external:${o.value},${u}` : null, v = new URLSearchParams({
|
|
391
|
+
layer: o.value ?? "",
|
|
392
|
+
id: u
|
|
384
393
|
});
|
|
385
394
|
try {
|
|
386
|
-
const
|
|
387
|
-
((
|
|
395
|
+
const k = await y(v), N = typeof k.html == "string" ? k.html : null, V = r(
|
|
396
|
+
((S = k == null ? void 0 : k.data) == null ? void 0 : S.geom) ?? (k == null ? void 0 : k.geom) ?? null
|
|
388
397
|
);
|
|
389
|
-
|
|
390
|
-
html:
|
|
391
|
-
geometry: V ??
|
|
392
|
-
infoToken:
|
|
398
|
+
return !N && !V ? null : {
|
|
399
|
+
html: N,
|
|
400
|
+
geometry: V ?? s,
|
|
401
|
+
infoToken: n
|
|
402
|
+
};
|
|
403
|
+
} catch (k) {
|
|
404
|
+
return console.warn("CartoCSS map-format (id) error", k), null;
|
|
405
|
+
}
|
|
406
|
+
}, C = async (u, s) => {
|
|
407
|
+
const n = (await Promise.all(
|
|
408
|
+
u.map((v) => B(v, s))
|
|
409
|
+
)).filter(Boolean);
|
|
410
|
+
if (n.length) {
|
|
411
|
+
if (n.length === 1) {
|
|
412
|
+
g(n[0]);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
g({
|
|
416
|
+
items: n,
|
|
417
|
+
index: 0
|
|
393
418
|
});
|
|
394
|
-
} catch (c) {
|
|
395
|
-
console.warn("CartoCSS map-format (id) error", c);
|
|
396
419
|
}
|
|
397
|
-
},
|
|
398
|
-
var
|
|
399
|
-
if (!
|
|
400
|
-
if (!
|
|
401
|
-
|
|
420
|
+
}, L = async (u) => {
|
|
421
|
+
var S, k, N;
|
|
422
|
+
if (!o.value || i.active === !1) return;
|
|
423
|
+
if (!w.value) {
|
|
424
|
+
U({
|
|
402
425
|
type: "error",
|
|
403
426
|
title: "CartoCSS",
|
|
404
427
|
message: "Картка не налаштована"
|
|
405
428
|
});
|
|
406
429
|
return;
|
|
407
430
|
}
|
|
408
|
-
const
|
|
409
|
-
if (typeof
|
|
410
|
-
const
|
|
411
|
-
layer:
|
|
412
|
-
lat:
|
|
413
|
-
lng:
|
|
431
|
+
const s = (S = u == null ? void 0 : u.lngLat) == null ? void 0 : S.lng, n = (k = u == null ? void 0 : u.lngLat) == null ? void 0 : k.lat;
|
|
432
|
+
if (typeof s != "number" || typeof n != "number") return;
|
|
433
|
+
const v = new URLSearchParams({
|
|
434
|
+
layer: o.value,
|
|
435
|
+
lat: n.toFixed(6),
|
|
436
|
+
lng: s.toFixed(6)
|
|
414
437
|
});
|
|
415
438
|
try {
|
|
416
|
-
const
|
|
417
|
-
((
|
|
418
|
-
),
|
|
419
|
-
if (
|
|
420
|
-
await
|
|
439
|
+
const V = await y(v), K = r(
|
|
440
|
+
((N = V == null ? void 0 : V.data) == null ? void 0 : N.geom) ?? (V == null ? void 0 : V.geom) ?? null
|
|
441
|
+
), W = m(V);
|
|
442
|
+
if (W.length) {
|
|
443
|
+
await C(W, K);
|
|
421
444
|
return;
|
|
422
445
|
}
|
|
423
|
-
Vt({ html:
|
|
424
|
-
html:
|
|
446
|
+
Vt({ html: V == null ? void 0 : V.html }) && g({
|
|
447
|
+
html: V == null ? void 0 : V.html,
|
|
425
448
|
geometry: K,
|
|
426
449
|
infoToken: null
|
|
427
450
|
});
|
|
428
|
-
} catch (
|
|
429
|
-
console.warn("CartoCSS map-format error",
|
|
451
|
+
} catch (V) {
|
|
452
|
+
console.warn("CartoCSS map-format error", V);
|
|
430
453
|
}
|
|
431
454
|
};
|
|
432
455
|
return p().then(() => {
|
|
433
|
-
|
|
456
|
+
c = _.value, c && (c.on("click", L), h = () => c == null ? void 0 : c.off("click", L));
|
|
434
457
|
}), oe(() => {
|
|
435
|
-
h == null || h(), h = null,
|
|
458
|
+
h == null || h(), h = null, c = null;
|
|
436
459
|
}), () => {
|
|
437
460
|
};
|
|
438
461
|
}
|
|
439
|
-
}), pa = 100, ya = /* @__PURE__ */
|
|
462
|
+
}), pa = 100, ya = /* @__PURE__ */ q({
|
|
440
463
|
__name: "MapFullscreenButton",
|
|
441
464
|
props: {
|
|
442
465
|
target: {}
|
|
443
466
|
},
|
|
444
|
-
setup(
|
|
445
|
-
const
|
|
467
|
+
setup(E) {
|
|
468
|
+
const i = E, { map: o, ready: w } = le(), _ = b(!1), p = b(!1);
|
|
446
469
|
function g() {
|
|
447
|
-
var m,
|
|
448
|
-
if (
|
|
449
|
-
const r = (
|
|
470
|
+
var m, B;
|
|
471
|
+
if (i.target) return i.target;
|
|
472
|
+
const r = (B = (m = o.value) == null ? void 0 : m.getContainer) == null ? void 0 : B.call(m);
|
|
450
473
|
return r ? r.closest(".map-view-root") ?? r : null;
|
|
451
474
|
}
|
|
452
475
|
function y() {
|
|
@@ -456,10 +479,10 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
456
479
|
function h() {
|
|
457
480
|
window.setTimeout(() => {
|
|
458
481
|
var r, m;
|
|
459
|
-
(m = (r =
|
|
482
|
+
(m = (r = o.value) == null ? void 0 : r.resize) == null || m.call(r);
|
|
460
483
|
}, pa);
|
|
461
484
|
}
|
|
462
|
-
async function
|
|
485
|
+
async function c() {
|
|
463
486
|
const r = g();
|
|
464
487
|
if (r)
|
|
465
488
|
try {
|
|
@@ -471,21 +494,21 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
471
494
|
}
|
|
472
495
|
}
|
|
473
496
|
return Ee(async () => {
|
|
474
|
-
await (
|
|
497
|
+
await (w == null ? void 0 : w()), _.value = !!o.value, y(), document.addEventListener("fullscreenchange", y), document.addEventListener("fullscreenchange", h);
|
|
475
498
|
}), oe(() => {
|
|
476
499
|
document.removeEventListener("fullscreenchange", y), document.removeEventListener("fullscreenchange", h);
|
|
477
|
-
}), (r, m) => (x(),
|
|
500
|
+
}), (r, m) => (x(), T(pe, {
|
|
478
501
|
title: p.value ? "Вийти з повного екрана" : "Повний екран",
|
|
479
502
|
tooltip: p.value ? "Вийти з повного екрана" : "Повний екран",
|
|
480
503
|
active: p.value,
|
|
481
504
|
disabled: !_.value,
|
|
482
|
-
onClick:
|
|
505
|
+
onClick: c
|
|
483
506
|
}, {
|
|
484
|
-
default:
|
|
485
|
-
p.value ? (x(),
|
|
507
|
+
default: O(() => [
|
|
508
|
+
p.value ? (x(), T(Q(kt), {
|
|
486
509
|
key: 0,
|
|
487
510
|
class: "w-4 h-4"
|
|
488
|
-
})) : (x(),
|
|
511
|
+
})) : (x(), T(Q(Ct), {
|
|
489
512
|
key: 1,
|
|
490
513
|
class: "w-4 h-4"
|
|
491
514
|
}))
|
|
@@ -493,17 +516,17 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
493
516
|
_: 1
|
|
494
517
|
}, 8, ["title", "tooltip", "active", "disabled"]));
|
|
495
518
|
}
|
|
496
|
-
}), ga = /* @__PURE__ */
|
|
519
|
+
}), ga = /* @__PURE__ */ q({
|
|
497
520
|
__name: "MapCopyLinkButton",
|
|
498
521
|
props: {
|
|
499
522
|
url: { default: "" }
|
|
500
523
|
},
|
|
501
|
-
setup(
|
|
502
|
-
const
|
|
503
|
-
async function
|
|
504
|
-
const
|
|
505
|
-
if (!
|
|
506
|
-
|
|
524
|
+
setup(E) {
|
|
525
|
+
const i = E;
|
|
526
|
+
async function o() {
|
|
527
|
+
const w = i.url || (typeof window < "u" ? window.location.href : "");
|
|
528
|
+
if (!w) {
|
|
529
|
+
U({
|
|
507
530
|
type: "warning",
|
|
508
531
|
title: "Посилання",
|
|
509
532
|
message: "Немає URL для копіювання"
|
|
@@ -511,26 +534,26 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
511
534
|
return;
|
|
512
535
|
}
|
|
513
536
|
try {
|
|
514
|
-
await navigator.clipboard.writeText(
|
|
537
|
+
await navigator.clipboard.writeText(w), U({
|
|
515
538
|
type: "success",
|
|
516
539
|
title: "Посилання",
|
|
517
540
|
message: "Посилання скопійовано"
|
|
518
541
|
});
|
|
519
542
|
} catch (_) {
|
|
520
|
-
console.error("Copy link error:", _),
|
|
543
|
+
console.error("Copy link error:", _), U({
|
|
521
544
|
type: "error",
|
|
522
545
|
title: "Посилання",
|
|
523
546
|
message: "Не вдалося скопіювати посилання"
|
|
524
547
|
});
|
|
525
548
|
}
|
|
526
549
|
}
|
|
527
|
-
return (
|
|
550
|
+
return (w, _) => (x(), T(pe, {
|
|
528
551
|
title: "Копіювати посилання",
|
|
529
552
|
tooltip: "Копіювати посилання",
|
|
530
|
-
onClick:
|
|
553
|
+
onClick: o
|
|
531
554
|
}, {
|
|
532
|
-
default:
|
|
533
|
-
|
|
555
|
+
default: O(() => [
|
|
556
|
+
M(Q(Mt), { class: "w-4 h-4" })
|
|
534
557
|
]),
|
|
535
558
|
_: 1
|
|
536
559
|
}));
|
|
@@ -543,7 +566,7 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
543
566
|
}, ba = { class: "flex flex-col items-center rounded-lg border border-gray-200 bg-white/95 py-2.5 pl-1 pr-2 shadow-lg backdrop-blur-sm" }, xa = ["title", "onClick"], _a = {
|
|
544
567
|
key: 0,
|
|
545
568
|
class: "absolute right-5 text-[9px] tabular-nums text-gray-400"
|
|
546
|
-
}, wa = /* @__PURE__ */
|
|
569
|
+
}, wa = /* @__PURE__ */ q({
|
|
547
570
|
__name: "MapZoomSlider",
|
|
548
571
|
props: {
|
|
549
572
|
visible: { type: Boolean },
|
|
@@ -552,69 +575,69 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
552
575
|
max: { default: 20 }
|
|
553
576
|
},
|
|
554
577
|
emits: ["update:modelValue"],
|
|
555
|
-
setup(
|
|
556
|
-
const
|
|
557
|
-
|
|
558
|
-
() =>
|
|
559
|
-
(
|
|
560
|
-
g.value || (p.value =
|
|
578
|
+
setup(E, { emit: i }) {
|
|
579
|
+
const o = E, w = i, _ = b(), p = b(o.modelValue), g = b(!1);
|
|
580
|
+
Z(
|
|
581
|
+
() => o.modelValue,
|
|
582
|
+
(s) => {
|
|
583
|
+
g.value || (p.value = s);
|
|
561
584
|
}
|
|
562
585
|
);
|
|
563
|
-
const y =
|
|
564
|
-
const
|
|
565
|
-
for (let
|
|
566
|
-
return
|
|
567
|
-
}), h =
|
|
568
|
-
const
|
|
569
|
-
for (let
|
|
570
|
-
|
|
571
|
-
return
|
|
572
|
-
}),
|
|
573
|
-
const
|
|
574
|
-
return
|
|
575
|
-
}, m = (
|
|
576
|
-
|
|
577
|
-
},
|
|
586
|
+
const y = R(() => {
|
|
587
|
+
const s = [];
|
|
588
|
+
for (let n = o.min; n <= o.max; n += 1) s.push(n);
|
|
589
|
+
return s;
|
|
590
|
+
}), h = R(() => {
|
|
591
|
+
const s = /* @__PURE__ */ new Set();
|
|
592
|
+
for (let n = o.min; n <= o.max; n += 5)
|
|
593
|
+
s.add(n);
|
|
594
|
+
return s.add(o.max), s;
|
|
595
|
+
}), c = (s) => h.value.has(s), r = (s) => {
|
|
596
|
+
const n = o.max - o.min;
|
|
597
|
+
return n <= 0 ? 0 : (o.max - s) / n * 100;
|
|
598
|
+
}, m = (s) => {
|
|
599
|
+
w("update:modelValue", s);
|
|
600
|
+
}, B = (s) => {
|
|
578
601
|
if (!_.value) return;
|
|
579
|
-
const
|
|
602
|
+
const n = _.value.getBoundingClientRect(), v = (s - n.top) / n.height;
|
|
580
603
|
p.value = Math.max(
|
|
581
|
-
|
|
582
|
-
Math.min(
|
|
604
|
+
o.min,
|
|
605
|
+
Math.min(o.max, Math.round(o.max - v * (o.max - o.min)))
|
|
583
606
|
);
|
|
584
|
-
},
|
|
585
|
-
|
|
586
|
-
},
|
|
587
|
-
window.removeEventListener("mousemove",
|
|
588
|
-
},
|
|
589
|
-
g.value = !0,
|
|
607
|
+
}, C = (s) => {
|
|
608
|
+
B(s.clientY);
|
|
609
|
+
}, L = () => {
|
|
610
|
+
window.removeEventListener("mousemove", C), window.removeEventListener("mouseup", L), g.value = !1, p.value !== o.modelValue && w("update:modelValue", p.value);
|
|
611
|
+
}, u = (s) => {
|
|
612
|
+
g.value = !0, B(s.clientY), window.addEventListener("mousemove", C), window.addEventListener("mouseup", L);
|
|
590
613
|
};
|
|
591
|
-
return (
|
|
592
|
-
default:
|
|
593
|
-
|
|
614
|
+
return (s, n) => (x(), T(gt, { name: "zoom-panel" }, {
|
|
615
|
+
default: O(() => [
|
|
616
|
+
E.visible ? (x(), P("div", ha, [
|
|
594
617
|
l("div", ba, [
|
|
595
|
-
|
|
618
|
+
n[1] || (n[1] = l("span", { class: "mb-1 text-[9px] font-semibold uppercase tracking-wider text-gray-400" }, " Zoom ", -1)),
|
|
596
619
|
l("div", {
|
|
597
620
|
ref_key: "sliderRef",
|
|
598
621
|
ref: _,
|
|
599
622
|
class: "relative h-44 w-8 cursor-pointer select-none",
|
|
600
|
-
onMousedown: De(
|
|
623
|
+
onMousedown: De(u, ["prevent"])
|
|
601
624
|
}, [
|
|
602
|
-
|
|
603
|
-
(x(!0), P(me, null, Qe(y.value, (
|
|
604
|
-
key:
|
|
625
|
+
n[0] || (n[0] = l("div", { class: "absolute right-0 top-0 bottom-0 w-px bg-gray-200" }, null, -1)),
|
|
626
|
+
(x(!0), P(me, null, Qe(y.value, (v) => (x(), P("button", {
|
|
627
|
+
key: v,
|
|
605
628
|
type: "button",
|
|
606
629
|
class: "absolute right-0 -translate-y-1/2 flex items-center justify-end group",
|
|
607
|
-
style: $e({ top: `${r(
|
|
608
|
-
title: `Zoom ${
|
|
609
|
-
onClick: De((
|
|
630
|
+
style: $e({ top: `${r(v)}%` }),
|
|
631
|
+
title: `Zoom ${v}`,
|
|
632
|
+
onClick: De((S) => m(v), ["stop"])
|
|
610
633
|
}, [
|
|
611
634
|
l("span", {
|
|
612
635
|
class: ve([
|
|
613
636
|
"block rounded-full",
|
|
614
|
-
|
|
637
|
+
c(v) ? "h-px w-2.5 bg-gray-300 group-hover:bg-gray-400" : "h-px w-1.5 bg-gray-200 group-hover:bg-gray-300"
|
|
615
638
|
])
|
|
616
639
|
}, null, 2),
|
|
617
|
-
|
|
640
|
+
c(v) ? (x(), P("span", _a, D(v), 1)) : j("", !0)
|
|
618
641
|
], 12, xa))), 128)),
|
|
619
642
|
l("div", {
|
|
620
643
|
class: "absolute right-0 -translate-y-1/2 flex items-center",
|
|
@@ -626,142 +649,142 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
626
649
|
], 4)
|
|
627
650
|
], 544)
|
|
628
651
|
])
|
|
629
|
-
])) :
|
|
652
|
+
])) : j("", !0)
|
|
630
653
|
]),
|
|
631
654
|
_: 1
|
|
632
655
|
}));
|
|
633
656
|
}
|
|
634
|
-
}), ka = /* @__PURE__ */ Ye(wa, [["__scopeId", "data-v-
|
|
657
|
+
}), ka = /* @__PURE__ */ Ye(wa, [["__scopeId", "data-v-ca77aba8"]]), Ca = { class: "text-[0.7rem] font-bold tabular-nums leading-none text-gray-600" }, Ce = 5, Me = 20, Ma = 13, Sa = 0.01, $a = 200, La = /* @__PURE__ */ q({
|
|
635
658
|
__name: "MapZoomLevelButton",
|
|
636
|
-
setup(
|
|
637
|
-
const { map:
|
|
638
|
-
function r(
|
|
639
|
-
return Math.round(Math.min(h.value, Math.max(y.value,
|
|
659
|
+
setup(E) {
|
|
660
|
+
const { map: i, ready: o } = le(), w = b(!1), _ = b(!1), p = b(Ma), g = b(!1), y = b(Ce), h = b(Me), c = R(() => String(p.value));
|
|
661
|
+
function r(n) {
|
|
662
|
+
return Math.round(Math.min(h.value, Math.max(y.value, n)));
|
|
640
663
|
}
|
|
641
664
|
function m() {
|
|
642
|
-
var
|
|
643
|
-
const
|
|
644
|
-
if (!
|
|
645
|
-
const
|
|
646
|
-
Number.isFinite(
|
|
665
|
+
var k, N;
|
|
666
|
+
const n = i.value;
|
|
667
|
+
if (!n) return;
|
|
668
|
+
const v = (k = n.getMinZoom) == null ? void 0 : k.call(n), S = (N = n.getMaxZoom) == null ? void 0 : N.call(n);
|
|
669
|
+
Number.isFinite(v) && (y.value = Math.max(Ce, Math.floor(Number(v)))), Number.isFinite(S) && (h.value = Math.min(Me, Math.ceil(Number(S)))), y.value > h.value && (y.value = Ce, h.value = Me);
|
|
647
670
|
}
|
|
648
|
-
function
|
|
649
|
-
var
|
|
650
|
-
const
|
|
651
|
-
if (!
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
const
|
|
655
|
-
p.value !==
|
|
671
|
+
function B() {
|
|
672
|
+
var k;
|
|
673
|
+
const n = i.value;
|
|
674
|
+
if (!n || g.value) return;
|
|
675
|
+
const v = (k = n.getZoom) == null ? void 0 : k.call(n);
|
|
676
|
+
if (v == null) return;
|
|
677
|
+
const S = r(v);
|
|
678
|
+
p.value !== S && (p.value = S);
|
|
656
679
|
}
|
|
657
|
-
function
|
|
658
|
-
var
|
|
659
|
-
const
|
|
660
|
-
if (!(
|
|
661
|
-
const
|
|
662
|
-
if (!
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
center: [
|
|
666
|
-
zoom:
|
|
680
|
+
function C(n) {
|
|
681
|
+
var V, K;
|
|
682
|
+
const v = i.value;
|
|
683
|
+
if (!(v != null && v.easeTo)) return;
|
|
684
|
+
const S = (V = v.getCenter) == null ? void 0 : V.call(v);
|
|
685
|
+
if (!S) return;
|
|
686
|
+
const k = r(n), N = (K = v.getZoom) == null ? void 0 : K.call(v);
|
|
687
|
+
N != null && Math.abs(N - k) < Sa || (g.value = !0, v.easeTo({
|
|
688
|
+
center: [S.lng, S.lat],
|
|
689
|
+
zoom: k,
|
|
667
690
|
duration: $a,
|
|
668
691
|
essential: !0
|
|
669
692
|
}));
|
|
670
693
|
}
|
|
671
|
-
function
|
|
672
|
-
g.value = !1,
|
|
694
|
+
function L() {
|
|
695
|
+
g.value = !1, B();
|
|
673
696
|
}
|
|
674
|
-
function
|
|
675
|
-
_.value = !_.value, _.value && (m(),
|
|
697
|
+
function u() {
|
|
698
|
+
_.value = !_.value, _.value && (m(), B());
|
|
676
699
|
}
|
|
677
|
-
function
|
|
678
|
-
p.value =
|
|
700
|
+
function s(n) {
|
|
701
|
+
p.value = n, C(n);
|
|
679
702
|
}
|
|
680
703
|
return Ee(async () => {
|
|
681
|
-
var
|
|
682
|
-
await (
|
|
683
|
-
const
|
|
684
|
-
|
|
704
|
+
var v;
|
|
705
|
+
await (o == null ? void 0 : o());
|
|
706
|
+
const n = i.value;
|
|
707
|
+
w.value = !!n, m(), B(), (v = n == null ? void 0 : n.on) == null || v.call(n, "zoomend", L);
|
|
685
708
|
}), oe(() => {
|
|
686
|
-
var
|
|
687
|
-
(
|
|
688
|
-
}), (
|
|
689
|
-
|
|
709
|
+
var n, v;
|
|
710
|
+
(v = (n = i.value) == null ? void 0 : n.off) == null || v.call(n, "zoomend", L);
|
|
711
|
+
}), (n, v) => (x(), P(me, null, [
|
|
712
|
+
M(pe, {
|
|
690
713
|
title: _.value ? "Закрити вибір зуму" : "Вибрати рівень зуму",
|
|
691
714
|
tooltip: "Рівень зуму",
|
|
692
715
|
active: _.value,
|
|
693
|
-
disabled: !
|
|
716
|
+
disabled: !w.value,
|
|
694
717
|
"aria-label": "Рівень зуму",
|
|
695
|
-
onClick:
|
|
718
|
+
onClick: u
|
|
696
719
|
}, {
|
|
697
|
-
default:
|
|
698
|
-
l("div", Ca,
|
|
720
|
+
default: O(() => [
|
|
721
|
+
l("div", Ca, D(c.value), 1)
|
|
699
722
|
]),
|
|
700
723
|
_: 1
|
|
701
724
|
}, 8, ["title", "active", "disabled"]),
|
|
702
|
-
|
|
725
|
+
M(ka, {
|
|
703
726
|
visible: _.value,
|
|
704
727
|
"model-value": p.value,
|
|
705
728
|
min: y.value,
|
|
706
729
|
max: h.value,
|
|
707
|
-
"onUpdate:modelValue":
|
|
730
|
+
"onUpdate:modelValue": s
|
|
708
731
|
}, null, 8, ["visible", "model-value", "min", "max"])
|
|
709
732
|
], 64));
|
|
710
733
|
}
|
|
711
|
-
}), Ea = /* @__PURE__ */
|
|
734
|
+
}), Ea = /* @__PURE__ */ q({
|
|
712
735
|
__name: "MapRulerButton",
|
|
713
736
|
props: {
|
|
714
737
|
active: { type: Boolean }
|
|
715
738
|
},
|
|
716
739
|
emits: ["click"],
|
|
717
|
-
setup(
|
|
718
|
-
return (
|
|
719
|
-
title:
|
|
740
|
+
setup(E) {
|
|
741
|
+
return (i, o) => (x(), T(pe, {
|
|
742
|
+
title: E.active ? "Вимкнути лінійку" : "Увімкнути лінійку",
|
|
720
743
|
tooltip: "Вимірювання",
|
|
721
|
-
active:
|
|
744
|
+
active: E.active,
|
|
722
745
|
"aria-label": "Вимірювання",
|
|
723
|
-
onClick:
|
|
746
|
+
onClick: o[0] || (o[0] = (w) => i.$emit("click", w))
|
|
724
747
|
}, {
|
|
725
|
-
default:
|
|
726
|
-
|
|
748
|
+
default: O(() => [
|
|
749
|
+
M(Q(St), { class: "w-4 h-4" })
|
|
727
750
|
]),
|
|
728
751
|
_: 1
|
|
729
752
|
}, 8, ["title", "active"]));
|
|
730
753
|
}
|
|
731
|
-
}), Va = /* @__PURE__ */
|
|
754
|
+
}), Va = /* @__PURE__ */ q({
|
|
732
755
|
__name: "RulerMapClickBridge",
|
|
733
756
|
props: {
|
|
734
757
|
active: { type: Boolean }
|
|
735
758
|
},
|
|
736
759
|
emits: ["map-click"],
|
|
737
|
-
setup(
|
|
738
|
-
const
|
|
760
|
+
setup(E, { emit: i }) {
|
|
761
|
+
const o = E, w = i, { map: _, ready: p } = le();
|
|
739
762
|
let g = null;
|
|
740
|
-
function y(
|
|
741
|
-
if (!
|
|
742
|
-
const r =
|
|
743
|
-
typeof (r == null ? void 0 : r.lat) != "number" || typeof (r == null ? void 0 : r.lng) != "number" ||
|
|
763
|
+
function y(c) {
|
|
764
|
+
if (!o.active) return;
|
|
765
|
+
const r = c == null ? void 0 : c.lngLat;
|
|
766
|
+
typeof (r == null ? void 0 : r.lat) != "number" || typeof (r == null ? void 0 : r.lng) != "number" || w("map-click", { lat: r.lat, lng: r.lng });
|
|
744
767
|
}
|
|
745
768
|
async function h() {
|
|
746
|
-
if (g == null || g(), g = null, !
|
|
769
|
+
if (g == null || g(), g = null, !o.active) return;
|
|
747
770
|
await (p == null ? void 0 : p());
|
|
748
|
-
const
|
|
749
|
-
|
|
771
|
+
const c = _.value;
|
|
772
|
+
c != null && c.on && (c.on("click", y), g = () => {
|
|
750
773
|
var r;
|
|
751
|
-
return (r =
|
|
774
|
+
return (r = c.off) == null ? void 0 : r.call(c, "click", y);
|
|
752
775
|
});
|
|
753
776
|
}
|
|
754
|
-
return
|
|
755
|
-
() =>
|
|
777
|
+
return Z(
|
|
778
|
+
() => o.active,
|
|
756
779
|
() => {
|
|
757
780
|
h();
|
|
758
781
|
},
|
|
759
782
|
{ immediate: !0 }
|
|
760
783
|
), oe(() => {
|
|
761
784
|
g == null || g(), g = null;
|
|
762
|
-
}), (
|
|
785
|
+
}), (c, r) => null;
|
|
763
786
|
}
|
|
764
|
-
}), za = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" },
|
|
787
|
+
}), za = { class: "flex h-full bg-gradient-to-br from-slate-50 to-white" }, Ba = { class: "flex-1 relative overflow-hidden" }, Ra = { class: "absolute top-0 left-0 w-full z-20" }, Pa = { class: "px-4 sm:px-6 py-4 border-b border-gray-200 bg-white shadow-sm" }, Aa = { class: "flex items-start justify-between gap-4" }, Ta = { class: "flex-1 min-w-0" }, Fa = { class: "flex items-center text-sm text-gray-500 mb-3" }, Na = { class: "text-gray-900 font-medium truncate max-w-xs" }, ja = { class: "flex items-center justify-between gap-4" }, Oa = { class: "flex-1 min-w-0" }, Da = { class: "flex items-center gap-3 mb-1" }, Ua = { class: "text-base font-semibold text-gray-900 truncate" }, qa = {
|
|
765
788
|
key: 0,
|
|
766
789
|
class: "px-2 py-0.5 bg-green-50 border border-green-200 rounded flex-shrink-0"
|
|
767
790
|
}, Za = { class: "text-xs font-medium text-green-700" }, Ia = ["title"], Qa = { class: "w-full h-full bg-gradient-to-br from-sky-50 via-white to-blue-50 flex items-center justify-center relative pt-[115px]" }, Ya = { class: "relative w-full h-full" }, Ha = { class: "absolute top-3 left-3 z-20" }, Ja = { class: "px-3 py-2 flex items-center gap-2 border-b border-gray-100" }, Ka = { class: "text-xs text-gray-700 w-9 text-right" }, Wa = { class: "px-3 py-2 flex items-center gap-2" }, Xa = {
|
|
@@ -770,93 +793,93 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
770
793
|
}, Ga = {
|
|
771
794
|
key: 2,
|
|
772
795
|
class: "absolute bottom-4 left-1/2 z-30 -translate-x-1/2 rounded-2xl border border-sky-200 bg-white/95 px-4 py-2 text-xs font-medium text-slate-700 shadow-lg backdrop-blur"
|
|
773
|
-
},
|
|
796
|
+
}, en = { class: "flex-1 flex flex-col h-full" }, tn = {
|
|
774
797
|
key: 0,
|
|
775
798
|
class: "px-3 pt-3 pb-2 border-b border-gray-100"
|
|
776
|
-
},
|
|
799
|
+
}, an = ["aria-selected", "onClick"], nn = { class: "leading-none" }, on = { class: "flex flex-col flex-1 overflow-y-hidden p-3" }, ln = {
|
|
777
800
|
key: 0,
|
|
778
801
|
class: "flex-1 flex items-center justify-center text-sm text-gray-500"
|
|
779
|
-
},
|
|
802
|
+
}, rn = "cartocss-demo-001", sn = "OpenGIS", Ie = 2, fe = 5, un = 5, _n = /* @__PURE__ */ q({
|
|
780
803
|
__name: "cartocss",
|
|
781
|
-
setup(
|
|
782
|
-
const
|
|
804
|
+
setup(E) {
|
|
805
|
+
const i = _t(), o = wt(), w = b(null), _ = R(() => {
|
|
783
806
|
var t;
|
|
784
|
-
const e = (t =
|
|
785
|
-
return (typeof e == "string" && e ? e :
|
|
786
|
-
}), p =
|
|
807
|
+
const e = (t = o.matched[o.matched.length - 1]) == null ? void 0 : t.path;
|
|
808
|
+
return (typeof e == "string" && e ? e : o.path).replace(/\/:id\??$/, "") || "/";
|
|
809
|
+
}), p = R(() => {
|
|
787
810
|
var a;
|
|
788
|
-
const e = (a =
|
|
811
|
+
const e = (a = o.meta) == null ? void 0 : a.title;
|
|
789
812
|
return typeof e == "string" && e.trim() ? e : "CartoCSS";
|
|
790
813
|
});
|
|
791
814
|
function g() {
|
|
792
|
-
|
|
815
|
+
i.push(_.value);
|
|
793
816
|
}
|
|
794
817
|
const y = [
|
|
795
818
|
{ key: "css", label: "CSS", icon: Ft },
|
|
796
819
|
{ key: "data", label: "Дані", icon: Wt },
|
|
797
820
|
{ key: "metadata", label: "Метадані", icon: Qt },
|
|
798
821
|
{ key: "card", label: "Картка", icon: Nt }
|
|
799
|
-
], h = y.map((e) => e.key),
|
|
800
|
-
h.includes(
|
|
801
|
-
), r = b(!0), m = b(null),
|
|
822
|
+
], h = y.map((e) => e.key), c = b(
|
|
823
|
+
h.includes(o.query.tab) ? o.query.tab : "css"
|
|
824
|
+
), r = b(!0), m = b(null), B = R(
|
|
802
825
|
() => {
|
|
803
826
|
var e;
|
|
804
827
|
return (e = m.value) != null && e.source_path ? y.filter((a) => a.key === "card" || a.key === "metadata") : y;
|
|
805
828
|
}
|
|
806
|
-
),
|
|
807
|
-
() =>
|
|
808
|
-
),
|
|
809
|
-
id:
|
|
829
|
+
), C = R(
|
|
830
|
+
() => o.params.id || rn
|
|
831
|
+
), L = b({
|
|
832
|
+
id: C.value,
|
|
810
833
|
name: "",
|
|
811
834
|
description: ""
|
|
812
835
|
});
|
|
813
|
-
let
|
|
814
|
-
const
|
|
815
|
-
function
|
|
816
|
-
if (Array.isArray(e)) return
|
|
836
|
+
let u = null;
|
|
837
|
+
const s = b(!1);
|
|
838
|
+
function n(e) {
|
|
839
|
+
if (Array.isArray(e)) return n(e[0]);
|
|
817
840
|
if (typeof e != "string" && typeof e != "number") return null;
|
|
818
841
|
const a = typeof e == "number" ? e : Number(e.trim());
|
|
819
842
|
return Number.isFinite(a) ? a : null;
|
|
820
843
|
}
|
|
821
|
-
function
|
|
844
|
+
function v(e, a) {
|
|
822
845
|
return e.toFixed(a);
|
|
823
846
|
}
|
|
824
|
-
function
|
|
847
|
+
function S(e, a, t) {
|
|
825
848
|
const d = 0.5 * 10 ** -t;
|
|
826
849
|
return Math.abs(e - a) > d;
|
|
827
850
|
}
|
|
828
|
-
function
|
|
851
|
+
function k() {
|
|
829
852
|
var e;
|
|
830
|
-
return (e =
|
|
853
|
+
return (e = w.value) == null ? void 0 : e.ctx;
|
|
831
854
|
}
|
|
832
|
-
function
|
|
833
|
-
var $,
|
|
834
|
-
const e = (
|
|
855
|
+
function N() {
|
|
856
|
+
var $, A, J, I;
|
|
857
|
+
const e = (A = ($ = k()) == null ? void 0 : $.map) == null ? void 0 : A.value;
|
|
835
858
|
if (!e) return;
|
|
836
|
-
const a = o
|
|
859
|
+
const a = n(o.query.z), t = n(o.query.x), d = n(o.query.y);
|
|
837
860
|
if (a == null || t == null || d == null) return;
|
|
838
|
-
const f = (J = e.getCenter) == null ? void 0 : J.call(e),
|
|
839
|
-
(!f ||
|
|
861
|
+
const f = (J = e.getCenter) == null ? void 0 : J.call(e), z = (I = e.getZoom) == null ? void 0 : I.call(e);
|
|
862
|
+
(!f || S(f.lng, t, fe) || S(f.lat, d, fe) || S(z ?? 0, a, Ie)) && (s.value = !0, e.jumpTo({ center: [t, d], zoom: a }), s.value = !1);
|
|
840
863
|
}
|
|
841
|
-
function
|
|
842
|
-
var f,
|
|
843
|
-
if (
|
|
844
|
-
const e = (
|
|
864
|
+
function V() {
|
|
865
|
+
var f, z, F, $;
|
|
866
|
+
if (s.value) return;
|
|
867
|
+
const e = (z = (f = k()) == null ? void 0 : f.map) == null ? void 0 : z.value;
|
|
845
868
|
if (!e) return;
|
|
846
869
|
const a = (F = e.getCenter) == null ? void 0 : F.call(e), t = ($ = e.getZoom) == null ? void 0 : $.call(e);
|
|
847
870
|
if (!a || t == null) return;
|
|
848
871
|
const d = {
|
|
849
|
-
...
|
|
850
|
-
z:
|
|
851
|
-
x:
|
|
852
|
-
y:
|
|
872
|
+
...o.query,
|
|
873
|
+
z: v(t, Ie),
|
|
874
|
+
x: v(a.lng, fe),
|
|
875
|
+
y: v(a.lat, fe)
|
|
853
876
|
};
|
|
854
|
-
|
|
877
|
+
o.query.z === d.z && o.query.x === d.x && o.query.y === d.y || i.replace({ query: d });
|
|
855
878
|
}
|
|
856
|
-
function
|
|
857
|
-
typeof document > "u" || (document.title = e ? `${e} — CartoCSS` :
|
|
879
|
+
function K(e) {
|
|
880
|
+
typeof document > "u" || (document.title = e ? `${e} — CartoCSS` : sn);
|
|
858
881
|
}
|
|
859
|
-
const
|
|
882
|
+
const W = b(""), te = b([]), ye = b(!1), re = b(!1), ge = b(""), he = b(0), X = b(!0), se = b(1), Y = b(!1), ae = b(null), H = b(!1), be = b(null), ue = b(
|
|
860
883
|
[]
|
|
861
884
|
), xe = b(!1), Ve = b("general");
|
|
862
885
|
function Je(e) {
|
|
@@ -877,35 +900,35 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
877
900
|
}
|
|
878
901
|
H.value = !0;
|
|
879
902
|
}
|
|
880
|
-
const Xe =
|
|
903
|
+
const Xe = R(() => `cartocss-layer-${C.value}`), Ge = R(
|
|
881
904
|
() => `${Math.round(se.value * 100)}%`
|
|
882
|
-
), et =
|
|
883
|
-
() => `cartocss-extent-${
|
|
884
|
-
), tt =
|
|
885
|
-
() => `cartocss-extent-draft-${
|
|
886
|
-
),
|
|
905
|
+
), et = R(
|
|
906
|
+
() => `cartocss-extent-${C.value}`
|
|
907
|
+
), tt = R(
|
|
908
|
+
() => `cartocss-extent-draft-${C.value}`
|
|
909
|
+
), Be = R(() => {
|
|
887
910
|
var f;
|
|
888
911
|
const e = (f = ge.value) == null ? void 0 : f.trim();
|
|
889
912
|
if (!e) return "";
|
|
890
913
|
const a = e.includes("?") ? "&" : "?", t = `${e}${a}nottl=1`, d = he.value;
|
|
891
914
|
return d ? `${e}${a}ts=${d}&nocache=1` : t;
|
|
892
|
-
}),
|
|
893
|
-
var
|
|
894
|
-
const e = (
|
|
915
|
+
}), Re = b(""), Pe = b(""), Ae = R(() => {
|
|
916
|
+
var z;
|
|
917
|
+
const e = (z = m.value) == null ? void 0 : z.bounds;
|
|
895
918
|
if (!Array.isArray(e) || e.length < 4) return null;
|
|
896
919
|
const [a, t, d, f] = e;
|
|
897
920
|
return [a, t, d, f].some(
|
|
898
921
|
(F) => typeof F != "number" || Number.isNaN(F)
|
|
899
922
|
) ? null : [(a + d) / 2, (t + f) / 2];
|
|
900
|
-
}), at =
|
|
901
|
-
var
|
|
902
|
-
const e = (
|
|
923
|
+
}), at = R(() => {
|
|
924
|
+
var z;
|
|
925
|
+
const e = (z = m.value) == null ? void 0 : z.bounds;
|
|
903
926
|
if (!Array.isArray(e) || e.length < 4) return null;
|
|
904
927
|
const [a, t, d, f] = e;
|
|
905
928
|
return [a, t, d, f].some(
|
|
906
929
|
(F) => typeof F != "number" || Number.isNaN(F)
|
|
907
930
|
) ? null : [a, t, d, f];
|
|
908
|
-
}), _e =
|
|
931
|
+
}), _e = R(() => {
|
|
909
932
|
const e = m.value;
|
|
910
933
|
return e ? [
|
|
911
934
|
e.description,
|
|
@@ -914,25 +937,25 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
914
937
|
e.is_public === !0 ? "Публічний" : "Не публічний",
|
|
915
938
|
e.enabled === !0 ? "Активний" : "Неактивний"
|
|
916
939
|
].filter(Boolean).join(", ") : "";
|
|
917
|
-
}),
|
|
940
|
+
}), Te = R(() => {
|
|
918
941
|
var a;
|
|
919
942
|
const e = (a = m.value) == null ? void 0 : a.group_id;
|
|
920
943
|
return e ? String(e).toUpperCase() : "";
|
|
921
944
|
});
|
|
922
|
-
let
|
|
945
|
+
let G = null, ne = !1, ee = null;
|
|
923
946
|
function ie(e) {
|
|
924
|
-
return Number(e.toFixed(
|
|
947
|
+
return Number(e.toFixed(un));
|
|
925
948
|
}
|
|
926
949
|
function Fe(e, a) {
|
|
927
|
-
const [t, d] = e, [f,
|
|
950
|
+
const [t, d] = e, [f, z] = a;
|
|
928
951
|
return [
|
|
929
952
|
ie(Math.min(t, f)),
|
|
930
|
-
ie(Math.min(d,
|
|
953
|
+
ie(Math.min(d, z)),
|
|
931
954
|
ie(Math.max(t, f)),
|
|
932
|
-
ie(Math.max(d,
|
|
955
|
+
ie(Math.max(d, z))
|
|
933
956
|
];
|
|
934
957
|
}
|
|
935
|
-
function
|
|
958
|
+
function nt(e) {
|
|
936
959
|
const [a, t, d, f] = e;
|
|
937
960
|
return {
|
|
938
961
|
type: "Polygon",
|
|
@@ -948,31 +971,31 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
948
971
|
};
|
|
949
972
|
}
|
|
950
973
|
function we(e) {
|
|
951
|
-
var d, f,
|
|
952
|
-
const a = (f = (d =
|
|
974
|
+
var d, f, z;
|
|
975
|
+
const a = (f = (d = k()) == null ? void 0 : d.map) == null ? void 0 : f.value, t = (z = a == null ? void 0 : a.getCanvas) == null ? void 0 : z.call(a);
|
|
953
976
|
t != null && t.style && (t.style.cursor = e);
|
|
954
977
|
}
|
|
955
|
-
async function
|
|
956
|
-
if (!(!
|
|
978
|
+
async function ot(e, a) {
|
|
979
|
+
if (!(!C.value || !m.value)) {
|
|
957
980
|
re.value = !0;
|
|
958
981
|
try {
|
|
959
|
-
const t =
|
|
982
|
+
const t = nt(e), d = await fetch(`/api/gis-css/${C.value}`, {
|
|
960
983
|
method: "POST",
|
|
961
984
|
headers: { "Content-Type": "application/json" },
|
|
962
985
|
body: JSON.stringify({ geom: t })
|
|
963
986
|
});
|
|
964
987
|
if (!d.ok)
|
|
965
988
|
throw new Error(`Failed to save cartocss bounds: ${d.status}`);
|
|
966
|
-
|
|
989
|
+
U({
|
|
967
990
|
type: "success",
|
|
968
991
|
title: "Bounds збережено",
|
|
969
992
|
message: "Нові межі успішно збережено."
|
|
970
|
-
}), await ce(
|
|
993
|
+
}), await ce(C.value, { bustCache: !0 });
|
|
971
994
|
} catch (t) {
|
|
972
995
|
console.error("Failed to save CartoCSS bounds", t), m.value && (m.value = {
|
|
973
996
|
...m.value,
|
|
974
997
|
bounds: a ? [...a] : null
|
|
975
|
-
}),
|
|
998
|
+
}), U({
|
|
976
999
|
type: "error",
|
|
977
1000
|
title: "Помилка",
|
|
978
1001
|
message: "Не вдалося зберегти Bounds"
|
|
@@ -984,51 +1007,51 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
984
1007
|
}
|
|
985
1008
|
function Ne(e) {
|
|
986
1009
|
var t, d, f;
|
|
987
|
-
const a = (d = (t =
|
|
1010
|
+
const a = (d = (t = k()) == null ? void 0 : t.map) == null ? void 0 : d.value;
|
|
988
1011
|
if ((f = a == null ? void 0 : a.dragPan) != null && f.enable && a.dragPan.enable(), (e == null ? void 0 : e.length) === 4 && m.value) {
|
|
989
|
-
const
|
|
1012
|
+
const z = Array.isArray(m.value.bounds) ? [...m.value.bounds] : null;
|
|
990
1013
|
m.value = {
|
|
991
1014
|
...m.value,
|
|
992
1015
|
bounds: [...e]
|
|
993
|
-
},
|
|
1016
|
+
}, ot(e, z);
|
|
994
1017
|
}
|
|
995
|
-
|
|
1018
|
+
G = null, ne = !1, ae.value = null, Y.value = !1, we("");
|
|
996
1019
|
}
|
|
997
1020
|
function ke() {
|
|
998
1021
|
Ne(null);
|
|
999
1022
|
}
|
|
1000
1023
|
function lt() {
|
|
1001
|
-
var
|
|
1002
|
-
const e = (F = (
|
|
1024
|
+
var z, F;
|
|
1025
|
+
const e = (F = (z = k()) == null ? void 0 : z.map) == null ? void 0 : F.value;
|
|
1003
1026
|
if (!e) return;
|
|
1004
1027
|
const a = ($) => {
|
|
1005
|
-
var J,
|
|
1028
|
+
var J, I, de;
|
|
1006
1029
|
if (!Y.value || ((J = $ == null ? void 0 : $.originalEvent) == null ? void 0 : J.button) != null && $.originalEvent.button !== 0)
|
|
1007
1030
|
return;
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1031
|
+
const A = $ == null ? void 0 : $.lngLat;
|
|
1032
|
+
A && (G = [A.lng, A.lat], ne = !0, ae.value = [A.lng, A.lat, A.lng, A.lat], (de = (I = e.dragPan) == null ? void 0 : I.disable) == null || de.call(I));
|
|
1010
1033
|
}, t = ($) => {
|
|
1011
|
-
if (!Y.value || !
|
|
1034
|
+
if (!Y.value || !ne || !G)
|
|
1012
1035
|
return;
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1036
|
+
const A = $ == null ? void 0 : $.lngLat;
|
|
1037
|
+
A && (ae.value = Fe(G, [
|
|
1038
|
+
A.lng,
|
|
1039
|
+
A.lat
|
|
1017
1040
|
]));
|
|
1018
1041
|
}, d = ($) => {
|
|
1019
|
-
if (!Y.value || !
|
|
1042
|
+
if (!Y.value || !ne || !G)
|
|
1020
1043
|
return;
|
|
1021
|
-
const
|
|
1022
|
-
if (!
|
|
1044
|
+
const A = $ == null ? void 0 : $.lngLat;
|
|
1045
|
+
if (!A) {
|
|
1023
1046
|
ke();
|
|
1024
1047
|
return;
|
|
1025
1048
|
}
|
|
1026
|
-
const J = Fe(
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
]), [
|
|
1030
|
-
if (!(Math.abs(ft -
|
|
1031
|
-
|
|
1049
|
+
const J = Fe(G, [
|
|
1050
|
+
A.lng,
|
|
1051
|
+
A.lat
|
|
1052
|
+
]), [I, de, ft, mt] = J;
|
|
1053
|
+
if (!(Math.abs(ft - I) > 0 && Math.abs(mt - de) > 0)) {
|
|
1054
|
+
U({
|
|
1032
1055
|
type: "warning",
|
|
1033
1056
|
title: "Bounds не змінено",
|
|
1034
1057
|
message: "Потрібно протягнути прямокутник з ненульовою площею."
|
|
@@ -1039,91 +1062,91 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1039
1062
|
}, f = ($) => {
|
|
1040
1063
|
Y.value && $.key === "Escape" && ($.preventDefault(), ke());
|
|
1041
1064
|
};
|
|
1042
|
-
e.on("mousedown", a), e.on("mousemove", t), e.on("mouseup", d), window.addEventListener("keydown", f),
|
|
1065
|
+
e.on("mousedown", a), e.on("mousemove", t), e.on("mouseup", d), window.addEventListener("keydown", f), ee = () => {
|
|
1043
1066
|
e.off("mousedown", a), e.off("mousemove", t), e.off("mouseup", d), window.removeEventListener("keydown", f);
|
|
1044
1067
|
};
|
|
1045
1068
|
}
|
|
1046
1069
|
async function rt() {
|
|
1047
1070
|
var t;
|
|
1048
|
-
const e =
|
|
1049
|
-
!(e != null && e.ready) || (await e.ready(), !((t = e.map) == null ? void 0 : t.value)) || (
|
|
1071
|
+
const e = k();
|
|
1072
|
+
!(e != null && e.ready) || (await e.ready(), !((t = e.map) == null ? void 0 : t.value)) || (ee || lt(), Y.value = !0, ne = !1, G = null, ae.value = null, we("crosshair"), U({
|
|
1050
1073
|
type: "info",
|
|
1051
1074
|
title: "Редагування Bounds",
|
|
1052
1075
|
message: "Протягніть прямокутник на карті, щоб задати нові межі."
|
|
1053
1076
|
}));
|
|
1054
1077
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1078
|
+
Z(
|
|
1079
|
+
C,
|
|
1057
1080
|
(e) => {
|
|
1058
1081
|
e && ce(e);
|
|
1059
1082
|
},
|
|
1060
1083
|
{ immediate: !0 }
|
|
1061
|
-
),
|
|
1084
|
+
), Z(
|
|
1062
1085
|
() => {
|
|
1063
1086
|
var e;
|
|
1064
|
-
return (e =
|
|
1087
|
+
return (e = L.value) == null ? void 0 : e.name;
|
|
1065
1088
|
},
|
|
1066
|
-
(e) =>
|
|
1089
|
+
(e) => K(e),
|
|
1067
1090
|
{ immediate: !0 }
|
|
1068
1091
|
);
|
|
1069
1092
|
async function st() {
|
|
1070
1093
|
var d;
|
|
1071
|
-
const e =
|
|
1094
|
+
const e = k();
|
|
1072
1095
|
if (!(e != null && e.ready)) return;
|
|
1073
|
-
await e.ready(),
|
|
1096
|
+
await e.ready(), N();
|
|
1074
1097
|
const a = (d = e.map) == null ? void 0 : d.value;
|
|
1075
1098
|
if (!a) return;
|
|
1076
|
-
const t = () =>
|
|
1077
|
-
a.on("moveend", t), a.on("zoomend", t),
|
|
1099
|
+
const t = () => V();
|
|
1100
|
+
a.on("moveend", t), a.on("zoomend", t), u = () => {
|
|
1078
1101
|
a.off("moveend", t), a.off("zoomend", t);
|
|
1079
1102
|
};
|
|
1080
1103
|
}
|
|
1081
|
-
|
|
1082
|
-
() => [
|
|
1104
|
+
Z(
|
|
1105
|
+
() => [o.query.z, o.query.x, o.query.y],
|
|
1083
1106
|
() => {
|
|
1084
|
-
|
|
1107
|
+
N();
|
|
1085
1108
|
}
|
|
1086
1109
|
), Ee(() => {
|
|
1087
1110
|
st();
|
|
1088
1111
|
}), oe(() => {
|
|
1089
|
-
|
|
1090
|
-
}),
|
|
1091
|
-
() =>
|
|
1112
|
+
u == null || u(), u = null, ee == null || ee(), ee = null, we("");
|
|
1113
|
+
}), Z(
|
|
1114
|
+
() => o.query.tab,
|
|
1092
1115
|
(e) => {
|
|
1093
|
-
e &&
|
|
1116
|
+
e && B.value.some((a) => a.key === e) && c.value !== e && (c.value = e);
|
|
1094
1117
|
}
|
|
1095
|
-
),
|
|
1096
|
-
|
|
1118
|
+
), Z(
|
|
1119
|
+
B,
|
|
1097
1120
|
(e) => {
|
|
1098
|
-
e.length && !e.some((a) => a.key ===
|
|
1121
|
+
e.length && !e.some((a) => a.key === c.value) && (c.value = e[0].key);
|
|
1099
1122
|
},
|
|
1100
1123
|
{ immediate: !0 }
|
|
1101
|
-
),
|
|
1102
|
-
|
|
1103
|
-
}),
|
|
1124
|
+
), Z(c, (e) => {
|
|
1125
|
+
o.query.tab !== e && B.value.some((a) => a.key === e) && i.replace({ query: { ...o.query, tab: e } });
|
|
1126
|
+
}), Z(
|
|
1104
1127
|
() => m.value,
|
|
1105
1128
|
(e) => {
|
|
1106
1129
|
const a = e == null ? void 0 : e.card_html;
|
|
1107
|
-
|
|
1130
|
+
Re.value = a, Pe.value = e == null ? void 0 : e.card_table;
|
|
1108
1131
|
},
|
|
1109
1132
|
{ immediate: !0 }
|
|
1110
1133
|
);
|
|
1111
1134
|
function je() {
|
|
1112
|
-
|
|
1135
|
+
C.value && ce(C.value, { bustCache: !0 });
|
|
1113
1136
|
}
|
|
1114
1137
|
async function ut(e, a) {
|
|
1115
|
-
if (
|
|
1138
|
+
if (C.value) {
|
|
1116
1139
|
re.value = !0;
|
|
1117
1140
|
try {
|
|
1118
|
-
const t = await fetch(`/api/gis-css/${
|
|
1141
|
+
const t = await fetch(`/api/gis-css/${C.value}`, {
|
|
1119
1142
|
method: "POST",
|
|
1120
1143
|
headers: { "Content-Type": "application/json" },
|
|
1121
1144
|
body: JSON.stringify(e)
|
|
1122
1145
|
});
|
|
1123
1146
|
if (!t.ok) throw new Error(`Failed to save cartocss: ${t.status}`);
|
|
1124
|
-
|
|
1147
|
+
U({ type: "success", title: "Збережено", message: a }), await ce(C.value, { bustCache: !0 });
|
|
1125
1148
|
} catch (t) {
|
|
1126
|
-
console.error("Failed to save CartoCSS", t),
|
|
1149
|
+
console.error("Failed to save CartoCSS", t), U({
|
|
1127
1150
|
type: "error",
|
|
1128
1151
|
title: "Помилка",
|
|
1129
1152
|
message: "Не вдалося зберегти CartoCSS"
|
|
@@ -1165,17 +1188,17 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1165
1188
|
const t = await fetch(`/api/gis-css/${e}`);
|
|
1166
1189
|
if (!t.ok) throw new Error(`Failed to load cartocss: ${t.status}`);
|
|
1167
1190
|
const d = await t.json(), f = (d == null ? void 0 : d.message) || d || {};
|
|
1168
|
-
m.value = f,
|
|
1191
|
+
m.value = f, L.value = {
|
|
1169
1192
|
id: f.cartocss_key || e,
|
|
1170
|
-
name: f.name ||
|
|
1171
|
-
description: f.description ||
|
|
1172
|
-
},
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1193
|
+
name: f.name || L.value.name,
|
|
1194
|
+
description: f.description || L.value.description
|
|
1195
|
+
}, W.value = typeof f.style == "string" ? f.style : "";
|
|
1196
|
+
const z = it(f.config ?? []);
|
|
1197
|
+
te.value = ct(z), m.value.info = !!te.value.find(($) => $.card_html);
|
|
1175
1198
|
const F = typeof f.url == "string" ? f.url : "";
|
|
1176
|
-
ge.value = F,
|
|
1199
|
+
ge.value = F, X.value = !!(F && f.enabled !== !1), he.value = a != null && a.bustCache ? Date.now() : 0;
|
|
1177
1200
|
} catch (t) {
|
|
1178
|
-
console.error("Failed to fetch CartoCSS", t),
|
|
1201
|
+
console.error("Failed to fetch CartoCSS", t), X.value = !1, ge.value = "", he.value = 0, m.value = null;
|
|
1179
1202
|
} finally {
|
|
1180
1203
|
ye.value = !1;
|
|
1181
1204
|
}
|
|
@@ -1183,38 +1206,38 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1183
1206
|
async function Oe() {
|
|
1184
1207
|
await ut(
|
|
1185
1208
|
{
|
|
1186
|
-
style:
|
|
1187
|
-
config:
|
|
1209
|
+
style: W.value || "",
|
|
1210
|
+
config: te.value
|
|
1188
1211
|
},
|
|
1189
1212
|
"CartoCSS оновлено"
|
|
1190
1213
|
);
|
|
1191
1214
|
}
|
|
1192
1215
|
async function dt(e) {
|
|
1193
1216
|
e.card_html === "" && (e.card_html = null);
|
|
1194
|
-
const a = await fetch(`/api/gis-css/${
|
|
1217
|
+
const a = await fetch(`/api/gis-css/${C.value}`, {
|
|
1195
1218
|
method: "POST",
|
|
1196
1219
|
headers: { "Content-Type": "application/json" },
|
|
1197
1220
|
body: JSON.stringify(e)
|
|
1198
1221
|
});
|
|
1199
1222
|
if (!a.ok) throw new Error(`Failed to save cartocss: ${a.status}`);
|
|
1200
|
-
|
|
1223
|
+
U({
|
|
1201
1224
|
type: "success",
|
|
1202
1225
|
title: "Збережено",
|
|
1203
1226
|
message: "Картка CartoCSS оновлена"
|
|
1204
1227
|
});
|
|
1205
1228
|
}
|
|
1206
1229
|
return (e, a) => (x(), P("div", za, [
|
|
1207
|
-
l("div",
|
|
1208
|
-
l("div",
|
|
1230
|
+
l("div", Ba, [
|
|
1231
|
+
l("div", Ra, [
|
|
1209
1232
|
l("div", Pa, [
|
|
1210
|
-
l("div",
|
|
1211
|
-
l("div",
|
|
1233
|
+
l("div", Aa, [
|
|
1234
|
+
l("div", Ta, [
|
|
1212
1235
|
l("div", Fa, [
|
|
1213
1236
|
l("button", {
|
|
1214
1237
|
type: "button",
|
|
1215
1238
|
class: "hover:text-gray-700 cursor-pointer transition-colors",
|
|
1216
1239
|
onClick: g
|
|
1217
|
-
},
|
|
1240
|
+
}, D(p.value), 1),
|
|
1218
1241
|
a[7] || (a[7] = l("svg", {
|
|
1219
1242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1220
1243
|
width: "24",
|
|
@@ -1229,28 +1252,28 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1229
1252
|
}, [
|
|
1230
1253
|
l("path", { d: "m9 18 6-6-6-6" })
|
|
1231
1254
|
], -1)),
|
|
1232
|
-
l("span", Na,
|
|
1255
|
+
l("span", Na, D(L.value.name || "CartoCSS"), 1)
|
|
1233
1256
|
]),
|
|
1234
1257
|
l("div", ja, [
|
|
1235
1258
|
l("div", Oa, [
|
|
1236
1259
|
l("div", Da, [
|
|
1237
|
-
l("h1", Ua,
|
|
1238
|
-
|
|
1239
|
-
l("span", Za,
|
|
1240
|
-
])) :
|
|
1260
|
+
l("h1", Ua, D(L.value.name || "CartoCSS"), 1),
|
|
1261
|
+
Te.value ? (x(), P("div", qa, [
|
|
1262
|
+
l("span", Za, D(Te.value), 1)
|
|
1263
|
+
])) : j("", !0)
|
|
1241
1264
|
]),
|
|
1242
1265
|
_e.value ? (x(), P("p", {
|
|
1243
1266
|
key: 0,
|
|
1244
1267
|
class: "text-xs text-gray-500 truncate",
|
|
1245
1268
|
title: _e.value
|
|
1246
|
-
},
|
|
1269
|
+
}, D(_e.value), 9, Ia)) : j("", !0)
|
|
1247
1270
|
])
|
|
1248
1271
|
])
|
|
1249
1272
|
]),
|
|
1250
|
-
|
|
1273
|
+
M(jt, {
|
|
1251
1274
|
class: "flex-shrink-0",
|
|
1252
|
-
"entity-id":
|
|
1253
|
-
"entity-info":
|
|
1275
|
+
"entity-id": C.value,
|
|
1276
|
+
"entity-info": L.value,
|
|
1254
1277
|
"form-endpoint": (t) => `/api/form/gis.cartocss.table/${t}`,
|
|
1255
1278
|
"save-endpoint": (t) => `/api/gis-css/${t}`,
|
|
1256
1279
|
"entity-label": "CartoCSS",
|
|
@@ -1262,16 +1285,16 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1262
1285
|
]),
|
|
1263
1286
|
l("div", Qa, [
|
|
1264
1287
|
l("div", Ya, [
|
|
1265
|
-
|
|
1288
|
+
M(Bt, {
|
|
1266
1289
|
ref_key: "mapViewRef",
|
|
1267
|
-
ref:
|
|
1290
|
+
ref: w
|
|
1268
1291
|
}, {
|
|
1269
|
-
default:
|
|
1292
|
+
default: O(() => {
|
|
1270
1293
|
var t, d;
|
|
1271
1294
|
return [
|
|
1272
1295
|
l("div", Ha, [
|
|
1273
|
-
|
|
1274
|
-
default:
|
|
1296
|
+
M(Rt, null, {
|
|
1297
|
+
default: O(() => [
|
|
1275
1298
|
l("div", Ja, [
|
|
1276
1299
|
a[8] || (a[8] = l("span", { class: "text-xs text-gray-600 whitespace-nowrap" }, "Прозорість:", -1)),
|
|
1277
1300
|
Ue(l("input", {
|
|
@@ -1290,23 +1313,23 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1290
1313
|
{ number: !0 }
|
|
1291
1314
|
]
|
|
1292
1315
|
]),
|
|
1293
|
-
l("span", Ka,
|
|
1316
|
+
l("span", Ka, D(Ge.value), 1)
|
|
1294
1317
|
]),
|
|
1295
1318
|
l("div", Wa, [
|
|
1296
1319
|
Ue(l("input", {
|
|
1297
1320
|
id: "show-layer",
|
|
1298
1321
|
type: "checkbox",
|
|
1299
1322
|
class: "rounded",
|
|
1300
|
-
"onUpdate:modelValue": a[1] || (a[1] = (f) =>
|
|
1323
|
+
"onUpdate:modelValue": a[1] || (a[1] = (f) => X.value = f),
|
|
1301
1324
|
style: { "accent-color": "rgb(30, 78, 216)" }
|
|
1302
1325
|
}, null, 512), [
|
|
1303
|
-
[bt,
|
|
1326
|
+
[bt, X.value]
|
|
1304
1327
|
]),
|
|
1305
1328
|
l("label", Xa, [
|
|
1306
|
-
|
|
1329
|
+
X.value ? (x(), T(Q($t), {
|
|
1307
1330
|
key: 0,
|
|
1308
1331
|
class: "w-3.5 h-3.5"
|
|
1309
|
-
})) : (x(),
|
|
1332
|
+
})) : (x(), T(Q(Lt), {
|
|
1310
1333
|
key: 1,
|
|
1311
1334
|
class: "w-3.5 h-3.5"
|
|
1312
1335
|
})),
|
|
@@ -1317,29 +1340,29 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1317
1340
|
_: 1
|
|
1318
1341
|
})
|
|
1319
1342
|
]),
|
|
1320
|
-
|
|
1321
|
-
default:
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1343
|
+
M(Ot, null, {
|
|
1344
|
+
default: O(() => [
|
|
1345
|
+
M(Dt),
|
|
1346
|
+
M(Ut),
|
|
1347
|
+
M(qt),
|
|
1348
|
+
M(qe),
|
|
1349
|
+
Ae.value ? (x(), T(qe, {
|
|
1327
1350
|
key: 0,
|
|
1328
|
-
targetCenter:
|
|
1351
|
+
targetCenter: Ae.value,
|
|
1329
1352
|
targetLabel: "Центр даних",
|
|
1330
1353
|
targetAriaLabel: "Перейти до центру даних"
|
|
1331
|
-
}, null, 8, ["targetCenter"])) :
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1354
|
+
}, null, 8, ["targetCenter"])) : j("", !0),
|
|
1355
|
+
M(ya),
|
|
1356
|
+
M(ga),
|
|
1357
|
+
M(Ea, {
|
|
1335
1358
|
active: H.value,
|
|
1336
1359
|
onClick: We
|
|
1337
1360
|
}, null, 8, ["active"]),
|
|
1338
|
-
|
|
1361
|
+
M(La)
|
|
1339
1362
|
]),
|
|
1340
1363
|
_: 1
|
|
1341
1364
|
}),
|
|
1342
|
-
H.value ? (x(),
|
|
1365
|
+
H.value ? (x(), T(Pt, {
|
|
1343
1366
|
key: 0,
|
|
1344
1367
|
ref_key: "rulerPanelRef",
|
|
1345
1368
|
ref: be,
|
|
@@ -1347,119 +1370,119 @@ const Wt = /* @__PURE__ */ Ye(Ht, [["render", Kt]]), Xt = { class: "flex flex-co
|
|
|
1347
1370
|
onTabChange: a[2] || (a[2] = (f) => Ve.value = f),
|
|
1348
1371
|
onPointsChange: Je,
|
|
1349
1372
|
onShapeClosedChange: a[3] || (a[3] = (f) => xe.value = f)
|
|
1350
|
-
}, null, 512)) :
|
|
1351
|
-
H.value && ue.value.length > 0 ? (x(),
|
|
1373
|
+
}, null, 512)) : j("", !0),
|
|
1374
|
+
H.value && ue.value.length > 0 ? (x(), T(At, {
|
|
1352
1375
|
key: 1,
|
|
1353
1376
|
points: ue.value,
|
|
1354
1377
|
"is-shape-closed": xe.value,
|
|
1355
1378
|
"label-mode": Ve.value
|
|
1356
|
-
}, null, 8, ["points", "is-shape-closed", "label-mode"])) :
|
|
1357
|
-
|
|
1379
|
+
}, null, 8, ["points", "is-shape-closed", "label-mode"])) : j("", !0),
|
|
1380
|
+
M(Va, {
|
|
1358
1381
|
active: H.value,
|
|
1359
1382
|
onMapClick: Ke
|
|
1360
1383
|
}, null, 8, ["active"]),
|
|
1361
|
-
Y.value ? (x(), P("div", Ga, " Потягніть на карті, щоб намалювати нові Bounds. Esc скасовує редагування. ")) :
|
|
1362
|
-
|
|
1384
|
+
Y.value ? (x(), P("div", Ga, " Потягніть на карті, щоб намалювати нові Bounds. Esc скасовує редагування. ")) : j("", !0),
|
|
1385
|
+
Be.value ? (x(), T(ma, {
|
|
1363
1386
|
key: 3,
|
|
1364
1387
|
"layer-id": Xe.value,
|
|
1365
|
-
"tile-url":
|
|
1366
|
-
active:
|
|
1388
|
+
"tile-url": Be.value,
|
|
1389
|
+
active: X.value,
|
|
1367
1390
|
opacity: se.value,
|
|
1368
|
-
title:
|
|
1369
|
-
owner:
|
|
1370
|
-
}, null, 8, ["layer-id", "tile-url", "active", "opacity", "title", "owner"])) :
|
|
1371
|
-
|
|
1391
|
+
title: L.value.name,
|
|
1392
|
+
owner: C.value
|
|
1393
|
+
}, null, 8, ["layer-id", "tile-url", "active", "opacity", "title", "owner"])) : j("", !0),
|
|
1394
|
+
M(Ze, {
|
|
1372
1395
|
extent: at.value,
|
|
1373
1396
|
"layer-id": et.value
|
|
1374
1397
|
}, null, 8, ["extent", "layer-id"]),
|
|
1375
|
-
|
|
1376
|
-
extent:
|
|
1398
|
+
M(Ze, {
|
|
1399
|
+
extent: ae.value,
|
|
1377
1400
|
"layer-id": tt.value,
|
|
1378
1401
|
"line-color": "#0ea5e9",
|
|
1379
1402
|
"line-width": 3
|
|
1380
1403
|
}, null, 8, ["extent", "layer-id"]),
|
|
1381
|
-
|
|
1382
|
-
"cartocss-id":
|
|
1404
|
+
M(va, {
|
|
1405
|
+
"cartocss-id": C.value,
|
|
1383
1406
|
bounds: ((t = m.value) == null ? void 0 : t.bounds) ?? null,
|
|
1384
|
-
active:
|
|
1407
|
+
active: X.value && !Y.value && !H.value,
|
|
1385
1408
|
"info-enabled": (d = m.value) == null ? void 0 : d.info
|
|
1386
1409
|
}, null, 8, ["cartocss-id", "bounds", "active", "info-enabled"]),
|
|
1387
|
-
|
|
1410
|
+
M(Tt, { "map-id": C.value }, null, 8, ["map-id"])
|
|
1388
1411
|
];
|
|
1389
1412
|
}),
|
|
1390
1413
|
_: 1
|
|
1391
1414
|
}, 512)
|
|
1392
1415
|
])
|
|
1393
1416
|
]),
|
|
1394
|
-
m.value ? (x(),
|
|
1417
|
+
m.value ? (x(), T(Zt, {
|
|
1395
1418
|
key: 0,
|
|
1396
1419
|
open: r.value,
|
|
1397
1420
|
onToggle: a[4] || (a[4] = (t) => r.value = !r.value)
|
|
1398
|
-
}, null, 8, ["open"])) :
|
|
1421
|
+
}, null, 8, ["open"])) : j("", !0)
|
|
1399
1422
|
]),
|
|
1400
1423
|
m.value ? (x(), P("div", {
|
|
1401
1424
|
key: 0,
|
|
1402
1425
|
class: ve(["bg-white border-l border-gray-100 flex flex-col overflow-hidden shadow-lg flex-shrink-0 transition-[width] duration-100 ease-in-out", r.value ? "w-[650px]" : "w-0"])
|
|
1403
1426
|
}, [
|
|
1404
|
-
l("div",
|
|
1405
|
-
|
|
1427
|
+
l("div", en, [
|
|
1428
|
+
B.value.length > 1 ? (x(), P("div", tn, [
|
|
1406
1429
|
l("div", {
|
|
1407
1430
|
class: "items-center justify-center text-muted-foreground grid w-full h-12 p-1 bg-gray-50 rounded-xl shadow-sm",
|
|
1408
1431
|
style: $e({
|
|
1409
|
-
gridTemplateColumns: `repeat(${
|
|
1432
|
+
gridTemplateColumns: `repeat(${B.value.length}, minmax(0, 1fr))`
|
|
1410
1433
|
})
|
|
1411
1434
|
}, [
|
|
1412
|
-
(x(!0), P(me, null, Qe(
|
|
1435
|
+
(x(!0), P(me, null, Qe(B.value, (t) => (x(), P("button", {
|
|
1413
1436
|
key: t.key,
|
|
1414
1437
|
type: "button",
|
|
1415
1438
|
role: "tab",
|
|
1416
|
-
"aria-selected":
|
|
1439
|
+
"aria-selected": c.value === t.key,
|
|
1417
1440
|
class: ve([
|
|
1418
1441
|
"whitespace-nowrap flex flex-col items-center justify-center gap-0.5 py-1 px-1 text-[9px] font-medium transition-all duration-300 hover:bg-white/70 rounded-lg group",
|
|
1419
|
-
|
|
1442
|
+
c.value === t.key ? "bg-white shadow-sm text-gray-700" : ""
|
|
1420
1443
|
]),
|
|
1421
|
-
onClick: (d) =>
|
|
1444
|
+
onClick: (d) => c.value = t.key
|
|
1422
1445
|
}, [
|
|
1423
|
-
(x(),
|
|
1424
|
-
l("span",
|
|
1425
|
-
], 10,
|
|
1446
|
+
(x(), T(xt(t.icon), { class: "h-3.5 w-3.5 mb-0.5" })),
|
|
1447
|
+
l("span", nn, D(t.label), 1)
|
|
1448
|
+
], 10, an))), 128))
|
|
1426
1449
|
], 4)
|
|
1427
|
-
])) :
|
|
1428
|
-
l("div",
|
|
1429
|
-
ye.value ? (x(), P("div",
|
|
1430
|
-
|
|
1450
|
+
])) : j("", !0),
|
|
1451
|
+
l("div", on, [
|
|
1452
|
+
ye.value ? (x(), P("div", ln, " Завантаження стилю… ")) : (x(), P(me, { key: 1 }, [
|
|
1453
|
+
c.value === "css" ? (x(), T(ea, {
|
|
1431
1454
|
key: 0,
|
|
1432
|
-
modelValue:
|
|
1433
|
-
"onUpdate:modelValue": a[5] || (a[5] = (t) =>
|
|
1455
|
+
modelValue: W.value,
|
|
1456
|
+
"onUpdate:modelValue": a[5] || (a[5] = (t) => W.value = t),
|
|
1434
1457
|
class: "flex-1 min-h-0",
|
|
1435
1458
|
onSave: Oe
|
|
1436
|
-
}, null, 8, ["modelValue"])) :
|
|
1459
|
+
}, null, 8, ["modelValue"])) : c.value === "data" ? (x(), T(ia, {
|
|
1437
1460
|
key: 1,
|
|
1438
|
-
modelValue:
|
|
1439
|
-
"onUpdate:modelValue": a[6] || (a[6] = (t) =>
|
|
1461
|
+
modelValue: te.value,
|
|
1462
|
+
"onUpdate:modelValue": a[6] || (a[6] = (t) => te.value = t),
|
|
1440
1463
|
class: "flex-1 min-h-0 flex flex-col",
|
|
1441
1464
|
onSave: Oe
|
|
1442
|
-
}, null, 8, ["modelValue"])) :
|
|
1465
|
+
}, null, 8, ["modelValue"])) : c.value === "card" ? (x(), T(fa, {
|
|
1443
1466
|
key: 2,
|
|
1444
|
-
card:
|
|
1467
|
+
card: Re.value,
|
|
1445
1468
|
table: Pe.value,
|
|
1446
1469
|
class: "flex-1 min-h-0",
|
|
1447
1470
|
onSave: dt
|
|
1448
|
-
}, null, 8, ["card", "table"])) :
|
|
1471
|
+
}, null, 8, ["card", "table"])) : c.value === "metadata" ? (x(), T(It, {
|
|
1449
1472
|
key: 3,
|
|
1450
1473
|
data: m.value,
|
|
1451
|
-
"entity-id":
|
|
1474
|
+
"entity-id": C.value,
|
|
1452
1475
|
"entity-type": "css",
|
|
1453
1476
|
onSaved: je,
|
|
1454
1477
|
onEditCssBounds: rt
|
|
1455
|
-
}, null, 8, ["data", "entity-id"])) :
|
|
1478
|
+
}, null, 8, ["data", "entity-id"])) : j("", !0)
|
|
1456
1479
|
], 64))
|
|
1457
1480
|
])
|
|
1458
1481
|
])
|
|
1459
|
-
], 2)) :
|
|
1482
|
+
], 2)) : j("", !0)
|
|
1460
1483
|
]));
|
|
1461
1484
|
}
|
|
1462
1485
|
});
|
|
1463
1486
|
export {
|
|
1464
|
-
|
|
1487
|
+
_n as default
|
|
1465
1488
|
};
|