@phila/layerboard 3.0.0-beta.2 → 3.0.0-beta.5

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.mjs CHANGED
@@ -1,110 +1,110 @@
1
- import { defineComponent as we, ref as k, watch as Pe, computed as R, onMounted as Ae, onUnmounted as Lt, createElementBlock as w, openBlock as d, createVNode as ee, unref as _, withCtx as Be, createBlock as X, createCommentVNode as O, Fragment as ie, renderList as re, useAttrs as Ft, toRef as Tt, normalizeClass as ne, createElementVNode as P, toDisplayString as j, withDirectives as St, mergeProps as tt, vModelDynamic as zt, createTextVNode as me, normalizeProps as dt, guardReactiveProps as ft, renderSlot as se, withModifiers as Et, normalizeStyle as Y, readonly as W, provide as U, resolveComponent as _t, vShow as Ot } from "vue";
1
+ import { defineComponent as we, ref as C, watch as Pe, computed as I, onMounted as Ve, onUnmounted as Lt, createElementBlock as w, openBlock as p, createVNode as K, unref as _, withCtx as Ee, createBlock as Y, createCommentVNode as O, Fragment as ie, renderList as se, useAttrs as Ft, toRef as zt, normalizeClass as ne, createElementVNode as P, toDisplayString as j, renderSlot as ae, withDirectives as St, mergeProps as tt, vModelDynamic as Tt, createTextVNode as me, normalizeProps as dt, guardReactiveProps as ft, withModifiers as Et, normalizeStyle as ee, readonly as W, provide as U, resolveComponent as _t, vShow as Ot } from "vue";
2
2
  import { Map as It, DrawTool as Rt, RasterLayer as pt, CircleLayer as yt, FillLayer as Dt, LineLayer as Ye, MapMarker as Zt, MapPopup as Bt } from "@phila/phila-ui-map-core";
3
- import { cn as ot, Icon as he, BaseLink as At, ActionContent as gt } from "@phila/phila-ui-core";
4
- function Ve(e, i, t = {}) {
3
+ import { cn as ot, Icon as ue, BaseLink as Vt, ActionContent as gt } from "@phila/phila-ui-core";
4
+ function Ne(e, n, t = {}) {
5
5
  const o = { type: "Feature" };
6
- return (t.id === 0 || t.id) && (o.id = t.id), t.bbox && (o.bbox = t.bbox), o.properties = i || {}, o.geometry = e, o;
6
+ return (t.id === 0 || t.id) && (o.id = t.id), t.bbox && (o.bbox = t.bbox), o.properties = n || {}, o.geometry = e, o;
7
7
  }
8
- function Nt(e, i, t = {}) {
9
- for (const l of e) {
10
- if (l.length < 4)
8
+ function At(e, n, t = {}) {
9
+ for (const a of e) {
10
+ if (a.length < 4)
11
11
  throw new Error(
12
12
  "Each LinearRing of a Polygon must have 4 or more Positions."
13
13
  );
14
- if (l[l.length - 1].length !== l[0].length)
14
+ if (a[a.length - 1].length !== a[0].length)
15
15
  throw new Error("First and last Position are not equivalent.");
16
- for (let a = 0; a < l[l.length - 1].length; a++)
17
- if (l[l.length - 1][a] !== l[0][a])
16
+ for (let l = 0; l < a[a.length - 1].length; l++)
17
+ if (a[a.length - 1][l] !== a[0][l])
18
18
  throw new Error("First and last Position are not equivalent.");
19
19
  }
20
- return Ve({
20
+ return Ne({
21
21
  type: "Polygon",
22
22
  coordinates: e
23
- }, i, t);
23
+ }, n, t);
24
24
  }
25
- function Vt(e, i, t = {}) {
25
+ function Nt(e, n, t = {}) {
26
26
  if (e.length < 2)
27
27
  throw new Error("coordinates must be an array of two or more positions");
28
- return Ve({
28
+ return Ne({
29
29
  type: "LineString",
30
30
  coordinates: e
31
- }, i, t);
31
+ }, n, t);
32
32
  }
33
- function Ut(e, i, t = {}) {
34
- return Ve({
33
+ function Ut(e, n, t = {}) {
34
+ return Ne({
35
35
  type: "MultiLineString",
36
36
  coordinates: e
37
- }, i, t);
37
+ }, n, t);
38
38
  }
39
- function Wt(e, i, t = {}) {
40
- return Ve({
39
+ function Wt(e, n, t = {}) {
40
+ return Ne({
41
41
  type: "MultiPolygon",
42
42
  coordinates: e
43
- }, i, t);
43
+ }, n, t);
44
44
  }
45
45
  function jt(e) {
46
46
  return e.type === "Feature" ? e.geometry : e;
47
47
  }
48
- function qt(e, i, t) {
49
- var o = e.length, l = Me(e[0], i), a = [], c, f, p;
50
- let S, g;
48
+ function qt(e, n, t) {
49
+ var o = e.length, a = Me(e[0], n), l = [], c, h, f;
50
+ let M, m;
51
51
  for (t || (t = []), c = 1; c < o; c++) {
52
- for (S = e[c - 1], g = e[c], f = p = Me(g, i); ; )
53
- if (l | f) {
54
- if (l & f)
52
+ for (M = e[c - 1], m = e[c], h = f = Me(m, n); ; )
53
+ if (a | h) {
54
+ if (a & h)
55
55
  break;
56
- l ? (S = nt(S, g, l, i), l = Me(S, i)) : (g = nt(S, g, f, i), f = Me(g, i));
56
+ a ? (M = nt(M, m, a, n), a = Me(M, n)) : (m = nt(M, m, h, n), h = Me(m, n));
57
57
  } else {
58
- a.push(S), f !== p ? (a.push(g), c < o - 1 && (t.push(a), a = [])) : c === o - 1 && a.push(g);
58
+ l.push(M), h !== f ? (l.push(m), c < o - 1 && (t.push(l), l = [])) : c === o - 1 && l.push(m);
59
59
  break;
60
60
  }
61
- l = p;
61
+ a = f;
62
62
  }
63
- return a.length && t.push(a), t;
63
+ return l.length && t.push(l), t;
64
64
  }
65
- function Gt(e, i) {
66
- var t, o, l, a, c, f, p;
65
+ function Gt(e, n) {
66
+ var t, o, a, l, c, h, f;
67
67
  for (o = 1; o <= 8; o *= 2) {
68
- for (t = [], l = e[e.length - 1], a = !(Me(l, i) & o), c = 0; c < e.length; c++)
69
- f = e[c], p = !(Me(f, i) & o), p !== a && t.push(nt(l, f, o, i)), p && t.push(f), l = f, a = p;
68
+ for (t = [], a = e[e.length - 1], l = !(Me(a, n) & o), c = 0; c < e.length; c++)
69
+ h = e[c], f = !(Me(h, n) & o), f !== l && t.push(nt(a, h, o, n)), f && t.push(h), a = h, l = f;
70
70
  if (e = t, !e.length) break;
71
71
  }
72
72
  return t;
73
73
  }
74
- function nt(e, i, t, o) {
75
- return t & 8 ? [e[0] + (i[0] - e[0]) * (o[3] - e[1]) / (i[1] - e[1]), o[3]] : t & 4 ? [e[0] + (i[0] - e[0]) * (o[1] - e[1]) / (i[1] - e[1]), o[1]] : t & 2 ? [o[2], e[1] + (i[1] - e[1]) * (o[2] - e[0]) / (i[0] - e[0])] : t & 1 ? [o[0], e[1] + (i[1] - e[1]) * (o[0] - e[0]) / (i[0] - e[0])] : null;
74
+ function nt(e, n, t, o) {
75
+ return t & 8 ? [e[0] + (n[0] - e[0]) * (o[3] - e[1]) / (n[1] - e[1]), o[3]] : t & 4 ? [e[0] + (n[0] - e[0]) * (o[1] - e[1]) / (n[1] - e[1]), o[1]] : t & 2 ? [o[2], e[1] + (n[1] - e[1]) * (o[2] - e[0]) / (n[0] - e[0])] : t & 1 ? [o[0], e[1] + (n[1] - e[1]) * (o[0] - e[0]) / (n[0] - e[0])] : null;
76
76
  }
77
- function Me(e, i) {
77
+ function Me(e, n) {
78
78
  var t = 0;
79
- return e[0] < i[0] ? t |= 1 : e[0] > i[2] && (t |= 2), e[1] < i[1] ? t |= 4 : e[1] > i[3] && (t |= 8), t;
79
+ return e[0] < n[0] ? t |= 1 : e[0] > n[2] && (t |= 2), e[1] < n[1] ? t |= 4 : e[1] > n[3] && (t |= 8), t;
80
80
  }
81
- function Ht(e, i) {
82
- const t = jt(e), o = t.type, l = e.type === "Feature" ? e.properties : {};
83
- let a = t.coordinates;
81
+ function Ht(e, n) {
82
+ const t = jt(e), o = t.type, a = e.type === "Feature" ? e.properties : {};
83
+ let l = t.coordinates;
84
84
  switch (o) {
85
85
  case "LineString":
86
86
  case "MultiLineString": {
87
87
  const c = [];
88
- return o === "LineString" && (a = [a]), a.forEach((f) => {
89
- qt(f, i, c);
90
- }), c.length === 1 ? Vt(c[0], l) : Ut(c, l);
88
+ return o === "LineString" && (l = [l]), l.forEach((h) => {
89
+ qt(h, n, c);
90
+ }), c.length === 1 ? Nt(c[0], a) : Ut(c, a);
91
91
  }
92
92
  case "Polygon":
93
- return Nt(ht(a, i), l);
93
+ return At(ht(l, n), a);
94
94
  case "MultiPolygon":
95
95
  return Wt(
96
- a.map((c) => ht(c, i)),
97
- l
96
+ l.map((c) => ht(c, n)),
97
+ a
98
98
  );
99
99
  default:
100
100
  throw new Error("geometry " + o + " not supported");
101
101
  }
102
102
  }
103
- function ht(e, i) {
103
+ function ht(e, n) {
104
104
  const t = [];
105
105
  for (const o of e) {
106
- const l = Gt(o, i);
107
- l.length > 0 && ((l[0][0] !== l[l.length - 1][0] || l[0][1] !== l[l.length - 1][1]) && l.push(l[0]), l.length >= 4 && t.push(l));
106
+ const a = Gt(o, n);
107
+ a.length > 0 && ((a[0][0] !== a[a.length - 1][0] || a[0][1] !== a[a.length - 1][1]) && a.push(a[0]), a.length >= 4 && t.push(a));
108
108
  }
109
109
  return t;
110
110
  }
@@ -131,35 +131,35 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
131
131
  initialCenter: {}
132
132
  },
133
133
  emits: ["zoom", "layerLoading", "layerError"],
134
- setup(e, { emit: i }) {
135
- const t = e, o = i, l = k(null), a = k(null), c = k(0);
136
- function f(n) {
137
- o("zoom", n), a.value && (c.value = p(a.value));
138
- }
139
- function p(n) {
140
- const u = n.getZoom(), x = n.getCenter().lat, $ = 559082264028e-3, F = x * Math.PI / 180;
141
- return $ * Math.cos(F) / Math.pow(2, u);
142
- }
143
- const S = k({}), g = k(null), m = k(/* @__PURE__ */ new Set()), s = ["fema-100-year-floodplain", "fema-500-year-floodplain"];
144
- async function v(n, u, r, x) {
145
- const $ = encodeURIComponent(x || "1=1"), F = JSON.stringify({
134
+ setup(e, { emit: n }) {
135
+ const t = e, o = n, a = C(null), l = C(null), c = C(0);
136
+ function h(i) {
137
+ o("zoom", i), l.value && (c.value = f(l.value));
138
+ }
139
+ function f(i) {
140
+ const u = i.getZoom(), x = i.getCenter().lat, k = 559082264028e-3, z = x * Math.PI / 180;
141
+ return k * Math.cos(z) / Math.pow(2, u);
142
+ }
143
+ const M = C({}), m = C(null), v = C(/* @__PURE__ */ new Set()), s = ["fema-100-year-floodplain", "fema-500-year-floodplain"];
144
+ async function d(i, u, r, x) {
145
+ const k = encodeURIComponent(x || "1=1"), z = JSON.stringify({
146
146
  xmin: u.west,
147
147
  ymin: u.south,
148
148
  xmax: u.east,
149
149
  ymax: u.north,
150
150
  spatialReference: { wkid: 4326 }
151
- }), I = 2e3;
152
- let A = 0, V = [], K = !0;
153
- for (; K; ) {
154
- const G = `${n}/query?where=${$}&geometry=${encodeURIComponent(F)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${I}&resultOffset=${A}&f=geojson`, Z = await fetch(G);
151
+ }), R = 2e3;
152
+ let V = 0, N = [], X = !0;
153
+ for (; X; ) {
154
+ const G = `${i}/query?where=${k}&geometry=${encodeURIComponent(z)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=true&resultRecordCount=${R}&resultOffset=${V}&f=geojson`, Z = await fetch(G);
155
155
  if (!Z.ok)
156
156
  throw new Error(`HTTP ${Z.status}: ${Z.statusText}`);
157
157
  const H = await Z.json();
158
- H.features && H.features.length > 0 ? (V = V.concat(H.features), A += H.features.length, K = H.features.length === I) : K = !1;
158
+ H.features && H.features.length > 0 ? (N = N.concat(H.features), V += H.features.length, X = H.features.length === R) : X = !1;
159
159
  }
160
160
  if (s.includes(r)) {
161
161
  const G = [u.west, u.south, u.east, u.north];
162
- V = V.map((Z) => {
162
+ N = N.map((Z) => {
163
163
  if (Z.geometry && (Z.geometry.type === "Polygon" || Z.geometry.type === "MultiPolygon"))
164
164
  try {
165
165
  return Jt(Z, G);
@@ -171,20 +171,20 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
171
171
  }
172
172
  return {
173
173
  type: "FeatureCollection",
174
- features: V
174
+ features: N
175
175
  };
176
176
  }
177
- async function T(n, u) {
177
+ async function $(i, u) {
178
178
  const r = u.map(async (x) => {
179
- const $ = t.layerList.find((F) => F.config.id === x)?.config;
180
- if ($) {
179
+ const k = t.layerList.find((z) => z.config.id === x)?.config;
180
+ if (k) {
181
181
  o("layerLoading", x, !0);
182
182
  try {
183
- const F = await v($.url, n, x, $.where);
184
- S.value = { ...S.value, [x]: F }, o("layerError", x, null);
185
- } catch (F) {
186
- const I = F instanceof Error ? F.message : "Failed to load";
187
- o("layerError", x, I);
183
+ const z = await d(k.url, i, x, k.where);
184
+ M.value = { ...M.value, [x]: z }, o("layerError", x, null);
185
+ } catch (z) {
186
+ const R = z instanceof Error ? z.message : "Failed to load";
187
+ o("layerError", x, R);
188
188
  } finally {
189
189
  o("layerLoading", x, !1);
190
190
  }
@@ -192,163 +192,163 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
192
192
  });
193
193
  await Promise.all(r);
194
194
  }
195
- async function h(n) {
195
+ async function y(i) {
196
196
  const u = [...t.visibleLayers];
197
- await T(n, u);
197
+ await $(i, u);
198
198
  }
199
- function C(n) {
200
- g.value = n.bounds, h(n.bounds);
199
+ function S(i) {
200
+ m.value = i.bounds, y(i.bounds);
201
201
  }
202
- function y(n) {
203
- a.value = n;
204
- const u = n.getBounds();
205
- g.value = {
202
+ function g(i) {
203
+ l.value = i;
204
+ const u = i.getBounds();
205
+ m.value = {
206
206
  west: u.getWest(),
207
207
  south: u.getSouth(),
208
208
  east: u.getEast(),
209
209
  north: u.getNorth()
210
210
  };
211
- const r = n.getZoom();
212
- o("zoom", r), c.value = p(n), h(g.value);
211
+ const r = i.getZoom();
212
+ o("zoom", r), c.value = f(i), y(m.value);
213
213
  }
214
214
  Pe(
215
215
  () => t.visibleLayers.size,
216
216
  async () => {
217
- if (oe.value.length > 0 && te(), g.value) {
218
- const n = new Set(t.visibleLayers), u = [...n].filter(
219
- (r) => !m.value.has(r)
217
+ if (oe.value.length > 0 && te(), m.value) {
218
+ const i = new Set(t.visibleLayers), u = [...i].filter(
219
+ (r) => !v.value.has(r)
220
220
  );
221
- m.value = new Set(n), u.length > 0 && await T(g.value, u);
221
+ v.value = new Set(i), u.length > 0 && await $(m.value, u);
222
222
  }
223
223
  }
224
224
  );
225
- function b(n) {
226
- return t.visibleLayers.has(n);
227
- }
228
- function E(n) {
229
- return !!S.value[n.id];
230
- }
231
- const z = R(
232
- () => t.layerList.filter((n) => n.config.type === "circle" && b(n.config.id) && E(n.config)).map((n) => n.config)
233
- ), B = R(
234
- () => t.layerList.filter((n) => n.config.type === "fill" && b(n.config.id) && E(n.config)).map((n) => n.config)
235
- ), q = R(
236
- () => t.layerList.filter((n) => n.config.type === "fill" && n.config.outlinePaint && b(n.config.id) && E(n.config)).map((n) => n.config)
237
- ), ce = R(
238
- () => t.layerList.filter((n) => n.config.type === "line" && b(n.config.id) && E(n.config)).map((n) => n.config)
225
+ function b(i) {
226
+ return t.visibleLayers.has(i);
227
+ }
228
+ function E(i) {
229
+ return !!M.value[i.id];
230
+ }
231
+ const T = I(
232
+ () => t.layerList.filter((i) => i.config.type === "circle" && b(i.config.id) && E(i.config)).map((i) => i.config)
233
+ ), B = I(
234
+ () => t.layerList.filter((i) => i.config.type === "fill" && b(i.config.id) && E(i.config)).map((i) => i.config)
235
+ ), q = I(
236
+ () => t.layerList.filter((i) => i.config.type === "fill" && i.config.outlinePaint && b(i.config.id) && E(i.config)).map((i) => i.config)
237
+ ), ce = I(
238
+ () => t.layerList.filter((i) => i.config.type === "line" && b(i.config.id) && E(i.config)).map((i) => i.config)
239
239
  );
240
- function Le(n) {
241
- return t.visibleTiledLayers?.has(n) ?? !1;
240
+ function Le(i) {
241
+ return t.visibleTiledLayers?.has(i) ?? !1;
242
242
  }
243
- function Se(n) {
244
- return t.tiledLayerOpacities?.[n] ?? 1;
243
+ function Se(i) {
244
+ return t.tiledLayerOpacities?.[i] ?? 1;
245
245
  }
246
- function We(n) {
247
- return `${n.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
246
+ function We(i) {
247
+ return `${i.replace(/\/$/, "")}/tile/{z}/{y}/{x}`;
248
248
  }
249
- function je(n) {
249
+ function je(i) {
250
250
  return {
251
251
  type: "raster",
252
- tiles: [We(n.url)],
252
+ tiles: [We(i.url)],
253
253
  tileSize: 256,
254
- attribution: n.attribution || ""
254
+ attribution: i.attribution || ""
255
255
  };
256
256
  }
257
- const Te = k({}), Oe = k(/* @__PURE__ */ new Set());
258
- async function ze(n) {
259
- if (!Oe.value.has(n.id)) {
260
- Oe.value.add(n.id);
257
+ const ze = C({}), Ie = C(/* @__PURE__ */ new Set());
258
+ async function Te(i) {
259
+ if (!Ie.value.has(i.id)) {
260
+ Ie.value.add(i.id);
261
261
  try {
262
- const u = n.url.replace(/\/$/, ""), r = await fetch(`${u}?f=json`);
262
+ const u = i.url.replace(/\/$/, ""), r = await fetch(`${u}?f=json`);
263
263
  if (!r.ok)
264
264
  return;
265
265
  const x = await r.json();
266
- let $ = x.minScale || 0, F = x.maxScale || 0;
266
+ let k = x.minScale || 0, z = x.maxScale || 0;
267
267
  if (x.layers && x.layers.length > 0)
268
- for (const I of x.layers)
269
- I.maxScale && I.maxScale > 0 && (F === 0 || I.maxScale < F) && (F = I.maxScale);
270
- F === 0 && (F = 72e3), Te.value = {
271
- ...Te.value,
272
- [n.id]: { minScale: $, maxScale: F }
268
+ for (const R of x.layers)
269
+ R.maxScale && R.maxScale > 0 && (z === 0 || R.maxScale < z) && (z = R.maxScale);
270
+ z === 0 && (z = 72e3), ze.value = {
271
+ ...ze.value,
272
+ [i.id]: { minScale: k, maxScale: z }
273
273
  };
274
274
  } catch {
275
275
  }
276
276
  }
277
277
  }
278
- Ae(() => {
278
+ Ve(() => {
279
279
  if (t.tiledLayers)
280
- for (const n of t.tiledLayers)
281
- n.scaleBasedRendering && ze(n);
280
+ for (const i of t.tiledLayers)
281
+ i.scaleBasedRendering && Te(i);
282
282
  });
283
- function Ie(n) {
284
- if (!n.scaleBasedRendering)
283
+ function Re(i) {
284
+ if (!i.scaleBasedRendering)
285
285
  return "tiled";
286
- const u = Te.value[n.id];
286
+ const u = ze.value[i.id];
287
287
  if (!u)
288
288
  return "tiled";
289
289
  const r = c.value;
290
290
  return r === 0 || r > u.maxScale ? "tiled" : "dynamic";
291
291
  }
292
- const qe = R(() => t.tiledLayers ? t.tiledLayers.filter((n) => Le(n.id) ? n.scaleBasedRendering ? Ie(n) === "tiled" : !0 : !1) : []), Ge = R(() => t.tiledLayers ? t.tiledLayers.filter((n) => Le(n.id) && n.scaleBasedRendering ? Ie(n) === "dynamic" : !1) : []);
293
- function Ce(n) {
292
+ const qe = I(() => t.tiledLayers ? t.tiledLayers.filter((i) => Le(i.id) ? i.scaleBasedRendering ? Re(i) === "tiled" : !0 : !1) : []), Ge = I(() => t.tiledLayers ? t.tiledLayers.filter((i) => Le(i.id) && i.scaleBasedRendering ? Re(i) === "dynamic" : !1) : []);
293
+ function Ce(i) {
294
294
  return {
295
295
  type: "raster",
296
- tiles: [`${n.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
296
+ tiles: [`${i.url.replace(/\/$/, "")}/export?bbox={bbox-epsg-3857}&bboxSR=3857&imageSR=3857&size=256,256&format=png32&transparent=true&f=image`],
297
297
  tileSize: 256,
298
- attribution: n.attribution || ""
298
+ attribution: i.attribution || ""
299
299
  };
300
300
  }
301
- function de(n) {
302
- return { type: "geojson", data: S.value[n.id] };
301
+ function fe(i) {
302
+ return { type: "geojson", data: M.value[i.id] };
303
303
  }
304
- function ke(n) {
305
- return t.layerOpacities[n] ?? 1;
304
+ function ke(i) {
305
+ return t.layerOpacities[i] ?? 1;
306
306
  }
307
- function fe(n) {
308
- const u = ke(n.id), r = n.type === "circle" ? "circle-opacity" : n.type === "fill" ? "fill-opacity" : "line-opacity";
309
- if (n.type === "fill" && n.paint["fill-opacity"] === 0)
310
- return { ...n.paint, "fill-opacity": 0 };
311
- const x = n.type === "circle" ? "circle-color" : n.type === "fill" ? "fill-color" : "line-color", $ = { ...n.paint }, F = $[x], I = $[r] === 1, A = typeof F == "string" && F.startsWith("rgba(");
312
- if (I && A) {
307
+ function pe(i) {
308
+ const u = ke(i.id), r = i.type === "circle" ? "circle-opacity" : i.type === "fill" ? "fill-opacity" : "line-opacity";
309
+ if (i.type === "fill" && i.paint["fill-opacity"] === 0)
310
+ return { ...i.paint, "fill-opacity": 0 };
311
+ const x = i.type === "circle" ? "circle-color" : i.type === "fill" ? "fill-color" : "line-color", k = { ...i.paint }, z = k[x], R = k[r] === 1, V = typeof z == "string" && z.startsWith("rgba(");
312
+ if (R && V) {
313
313
  if (u === 1)
314
- return $;
314
+ return k;
315
315
  {
316
- const V = F.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
317
- if (V && V[4]) {
318
- const [, K, G, Z, H] = V, Xe = parseFloat(H) * u;
319
- $[x] = `rgba(${K}, ${G}, ${Z}, ${Xe})`, $[r] = 1;
316
+ const N = z.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
317
+ if (N && N[4]) {
318
+ const [, X, G, Z, H] = N, Xe = parseFloat(H) * u;
319
+ k[x] = `rgba(${X}, ${G}, ${Z}, ${Xe})`, k[r] = 1;
320
320
  }
321
- return $;
321
+ return k;
322
322
  }
323
323
  }
324
- if (A) {
325
- const V = F.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
326
- if (V) {
327
- const [, K, G, Z] = V;
328
- $[x] = `rgb(${K}, ${G}, ${Z})`;
324
+ if (V) {
325
+ const N = z.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
326
+ if (N) {
327
+ const [, X, G, Z] = N;
328
+ k[x] = `rgb(${X}, ${G}, ${Z})`;
329
329
  }
330
330
  }
331
- return $[r] = u, $;
331
+ return k[r] = u, k;
332
332
  }
333
- function He(n) {
334
- const u = ke(n.id);
335
- return { ...n.outlinePaint, "line-opacity": u };
333
+ function He(i) {
334
+ const u = ke(i.id);
335
+ return { ...i.outlinePaint, "line-opacity": u };
336
336
  }
337
- const oe = k([]), pe = k(null), J = k(0);
338
- function $e(n) {
339
- const u = n.replace(/-outline$/, "");
337
+ const oe = C([]), ye = C(null), J = C(0);
338
+ function $e(i) {
339
+ const u = i.replace(/-outline$/, "");
340
340
  return t.layerList.find((x) => x.config.id === u)?.config;
341
341
  }
342
- function ve(n, u) {
343
- return n.replace(/\{([^}]+)\}/g, (r, x) => {
344
- const $ = u[x];
345
- return $ == null ? "" : String($);
342
+ function ve(i, u) {
343
+ return i.replace(/\{([^}]+)\}/g, (r, x) => {
344
+ const k = u[x];
345
+ return k == null ? "" : String(k);
346
346
  });
347
347
  }
348
- function Je(n, u) {
349
- if (n == null) return "-";
350
- if (u?.dateFormat && typeof n == "number") {
351
- const r = new Date(n);
348
+ function Je(i, u) {
349
+ if (i == null) return "-";
350
+ if (u?.dateFormat && typeof i == "number") {
351
+ const r = new Date(i);
352
352
  switch (u.dateFormat) {
353
353
  case "shortDateShortTime":
354
354
  return r.toLocaleString();
@@ -362,51 +362,51 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
362
362
  return r.toLocaleDateString();
363
363
  }
364
364
  }
365
- if (typeof n == "number") {
366
- if (n > 1e12 && !u)
367
- return new Date(n).toLocaleDateString();
365
+ if (typeof i == "number") {
366
+ if (i > 1e12 && !u)
367
+ return new Date(i).toLocaleDateString();
368
368
  const r = u?.places, x = u?.digitSeparator ?? !0;
369
369
  if (r !== void 0) {
370
- const $ = n.toFixed(r);
370
+ const k = i.toFixed(r);
371
371
  if (x) {
372
- const F = $.split("."), I = F[0] || "0", A = F[1], V = I.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
373
- return A ? `${V}.${A}` : V;
372
+ const z = k.split("."), R = z[0] || "0", V = z[1], N = R.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
373
+ return V ? `${N}.${V}` : N;
374
374
  }
375
- return $;
375
+ return k;
376
376
  }
377
- return x ? n.toLocaleString() : String(n);
377
+ return x ? i.toLocaleString() : String(i);
378
378
  }
379
- return String(n);
379
+ return String(i);
380
380
  }
381
- function Re(n) {
381
+ function De(i) {
382
382
  const u = /* @__PURE__ */ new Set();
383
- return n.filter((r) => {
384
- const $ = `${r.layer.id.replace(/-outline$/, "")}:${JSON.stringify(r.properties)}`;
385
- return u.has($) ? !1 : (u.add($), !0);
383
+ return i.filter((r) => {
384
+ const k = `${r.layer.id.replace(/-outline$/, "")}:${JSON.stringify(r.properties)}`;
385
+ return u.has(k) ? !1 : (u.add(k), !0);
386
386
  });
387
387
  }
388
- function ye(n, u) {
388
+ function ge(i, u) {
389
389
  const r = /* @__PURE__ */ new Map();
390
- return u.forEach((x, $) => {
391
- r.set(x.id, $);
392
- }), n.sort((x, $) => {
393
- const F = x.layer.id.replace(/-outline$/, ""), I = $.layer.id.replace(/-outline$/, ""), A = r.get(F) ?? -1;
394
- return (r.get(I) ?? -1) - A;
390
+ return u.forEach((x, k) => {
391
+ r.set(x.id, k);
392
+ }), i.sort((x, k) => {
393
+ const z = x.layer.id.replace(/-outline$/, ""), R = k.layer.id.replace(/-outline$/, ""), V = r.get(z) ?? -1;
394
+ return (r.get(R) ?? -1) - V;
395
395
  });
396
396
  }
397
- function xe(n) {
398
- const u = a.value;
397
+ function xe(i) {
398
+ const u = l.value;
399
399
  if (!u) return;
400
400
  const r = [];
401
401
  t.layerList.forEach((G) => {
402
402
  const Z = G.config;
403
403
  t.visibleLayers.has(Z.id) && (r.push(Z.id), Z.outlinePaint && r.push(`${Z.id}-outline`));
404
404
  });
405
- const x = u.project([n.lngLat.lng, n.lngLat.lat]), $ = u.queryRenderedFeatures(x, {
405
+ const x = u.project([i.lngLat.lng, i.lngLat.lat]), k = u.queryRenderedFeatures(x, {
406
406
  layers: r
407
407
  });
408
- if ($.length === 0) return;
409
- const F = Re($), I = t.layerList.map((G) => G.config), A = ye(F, I), V = A.map((G) => {
408
+ if (k.length === 0) return;
409
+ const z = De(k), R = t.layerList.map((G) => G.config), V = ge(z, R), N = V.map((G) => {
410
410
  const Z = G.layer.id.replace(/-outline$/, ""), H = $e(Z);
411
411
  return H ? {
412
412
  layerId: H.id,
@@ -415,78 +415,78 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
415
415
  popupConfig: H.popup
416
416
  } : null;
417
417
  }).filter((G) => G !== null);
418
- if (V.length === 0) return;
419
- oe.value = V, J.value = 0, pe.value = [n.lngLat.lng, n.lngLat.lat];
420
- const K = A[0];
421
- if (K && K.geometry) {
422
- const G = K.layer.id.replace(/-outline$/, ""), Z = $e(G);
418
+ if (N.length === 0) return;
419
+ oe.value = N, J.value = 0, ye.value = [i.lngLat.lng, i.lngLat.lat];
420
+ const X = V[0];
421
+ if (X && X.geometry) {
422
+ const G = X.layer.id.replace(/-outline$/, ""), Z = $e(G);
423
423
  if (Z) {
424
- const H = rt(K.geometry), Xe = st(Z.id, Z.type);
425
- ge.value = {
426
- geometry: K.geometry,
424
+ const H = rt(X.geometry), Xe = st(Z.id, Z.type);
425
+ he.value = {
426
+ geometry: X.geometry,
427
427
  geometryType: H,
428
428
  layerId: Z.id,
429
- properties: K.properties || {},
429
+ properties: X.properties || {},
430
430
  originalStyle: Xe
431
431
  };
432
432
  }
433
433
  }
434
434
  }
435
435
  function te() {
436
- oe.value = [], pe.value = null, J.value = 0, ge.value = null;
436
+ oe.value = [], ye.value = null, J.value = 0, he.value = null;
437
437
  }
438
- function be(n) {
438
+ function be(i) {
439
439
  if (oe.value.length === 0) return;
440
- const u = n.target;
440
+ const u = i.target;
441
441
  if (!(u.tagName === "INPUT" || u.tagName === "TEXTAREA" || u.isContentEditable))
442
- switch (n.key) {
442
+ switch (i.key) {
443
443
  case "ArrowLeft":
444
444
  case "ArrowUp":
445
- n.preventDefault(), De();
445
+ i.preventDefault(), Ze();
446
446
  break;
447
447
  case "ArrowRight":
448
448
  case "ArrowDown":
449
- n.preventDefault(), le();
449
+ i.preventDefault(), le();
450
450
  break;
451
451
  case "Escape":
452
- n.preventDefault(), te();
452
+ i.preventDefault(), te();
453
453
  break;
454
454
  }
455
455
  }
456
- Ae(() => {
456
+ Ve(() => {
457
457
  window.addEventListener("keydown", be);
458
458
  }), Lt(() => {
459
459
  window.removeEventListener("keydown", be);
460
460
  });
461
461
  function le() {
462
- const n = oe.value.length;
463
- n <= 1 || (J.value = (J.value + 1) % n);
464
- }
465
- function De() {
466
- const n = oe.value.length;
467
- n <= 1 || (J.value = (J.value - 1 + n) % n);
468
- }
469
- const L = R(() => oe.value.length === 0 ? null : oe.value[J.value]), M = R(() => {
470
- const n = L.value;
471
- return !n || !n.popupConfig ? n?.layerTitle || "" : ve(n.popupConfig.title, n.properties);
472
- }), ae = R(() => {
473
- const n = L.value;
474
- if (!n) return "";
462
+ const i = oe.value.length;
463
+ i <= 1 || (J.value = (J.value + 1) % i);
464
+ }
465
+ function Ze() {
466
+ const i = oe.value.length;
467
+ i <= 1 || (J.value = (J.value - 1 + i) % i);
468
+ }
469
+ const L = I(() => oe.value.length === 0 ? null : oe.value[J.value]), F = I(() => {
470
+ const i = L.value;
471
+ return !i || !i.popupConfig ? i?.layerTitle || "" : ve(i.popupConfig.title, i.properties);
472
+ }), re = I(() => {
473
+ const i = L.value;
474
+ if (!i) return "";
475
475
  let u = '<div class="popup-content">';
476
- if (u += `<h3 class="popup-title">${M.value}</h3>`, n.popupConfig?.fields?.length) {
476
+ if (u += `<h3 class="popup-title">${F.value}</h3>`, i.popupConfig?.fields?.length) {
477
477
  u += '<table class="popup-table">';
478
- for (const r of n.popupConfig.fields) {
479
- const x = Je(n.properties[r.field], r.format);
478
+ for (const r of i.popupConfig.fields) {
479
+ const x = Je(i.properties[r.field], r.format);
480
480
  u += `<tr><th>${r.label}</th><td>${x}</td></tr>`;
481
481
  }
482
482
  u += "</table>";
483
483
  } else
484
484
  u += '<p class="popup-no-fields">No additional information available.</p>';
485
485
  return u += "</div>", u;
486
- }), N = k({
486
+ }), A = C({
487
487
  type: "FeatureCollection",
488
488
  features: []
489
- }), Q = k({
489
+ }), Q = C({
490
490
  type: "FeatureCollection",
491
491
  features: []
492
492
  }), Qe = {
@@ -499,90 +499,90 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
499
499
  "line-width": ["get", "highlightWidth"],
500
500
  "line-color": "#00FFFF",
501
501
  "line-opacity": 0.9
502
- }, ge = k(null);
503
- function rt(n) {
504
- return n.type;
502
+ }, he = C(null);
503
+ function rt(i) {
504
+ return i.type;
505
505
  }
506
- function st(n, u) {
507
- const r = $e(n);
506
+ function st(i, u) {
507
+ const r = $e(i);
508
508
  if (!r) return { radius: 5, width: 2 };
509
509
  const x = r.paint || {};
510
510
  if (u === "circle") {
511
- const $ = x["circle-radius"];
512
- return typeof $ == "number" ? { radius: $ } : { radius: 5 };
511
+ const k = x["circle-radius"];
512
+ return typeof k == "number" ? { radius: k } : { radius: 5 };
513
513
  }
514
514
  if (u === "line" || u === "fill") {
515
- const $ = x["line-width"];
516
- if (typeof $ == "number")
517
- return { width: $ };
515
+ const k = x["line-width"];
516
+ if (typeof k == "number")
517
+ return { width: k };
518
518
  if (r.outlinePaint && r.outlinePaint["line-width"]) {
519
- const F = r.outlinePaint["line-width"];
520
- if (typeof F == "number")
521
- return { width: F };
519
+ const z = r.outlinePaint["line-width"];
520
+ if (typeof z == "number")
521
+ return { width: z };
522
522
  }
523
523
  return { width: 2 };
524
524
  }
525
525
  return { radius: 5, width: 2 };
526
526
  }
527
- function ct(n) {
528
- return !n || n.length === 0 ? [] : n[0] ?? [];
527
+ function ct(i) {
528
+ return !i || i.length === 0 ? [] : i[0] ?? [];
529
529
  }
530
- function $t(n) {
531
- const { geometry: u, geometryType: r, originalStyle: x } = n;
530
+ function $t(i) {
531
+ const { geometry: u, geometryType: r, originalStyle: x } = i;
532
532
  if (r === "Point" || r === "MultiPoint") {
533
- const F = (x.radius || 5) + 3;
533
+ const z = (x.radius || 5) + 3;
534
534
  return {
535
535
  type: "FeatureCollection",
536
536
  features: [{
537
537
  type: "Feature",
538
538
  geometry: u,
539
539
  properties: {
540
- highlightRadius: F
540
+ highlightRadius: z
541
541
  }
542
542
  }]
543
543
  };
544
544
  }
545
545
  if (r === "LineString" || r === "MultiLineString") {
546
- const F = (x.width || 2) + 3;
546
+ const z = (x.width || 2) + 3;
547
547
  return {
548
548
  type: "FeatureCollection",
549
549
  features: [{
550
550
  type: "Feature",
551
551
  geometry: u,
552
552
  properties: {
553
- highlightWidth: F
553
+ highlightWidth: z
554
554
  }
555
555
  }]
556
556
  };
557
557
  }
558
558
  if (r === "Polygon") {
559
- const $ = u.coordinates, F = ct($), A = (x.width || 2) + 3;
559
+ const k = u.coordinates, z = ct(k), V = (x.width || 2) + 3;
560
560
  return {
561
561
  type: "FeatureCollection",
562
562
  features: [{
563
563
  type: "Feature",
564
564
  geometry: {
565
565
  type: "LineString",
566
- coordinates: F
566
+ coordinates: z
567
567
  },
568
568
  properties: {
569
- highlightWidth: A
569
+ highlightWidth: V
570
570
  }
571
571
  }]
572
572
  };
573
573
  }
574
574
  if (r === "MultiPolygon") {
575
- const $ = u.coordinates, I = (x.width || 2) + 3;
575
+ const k = u.coordinates, R = (x.width || 2) + 3;
576
576
  return {
577
577
  type: "FeatureCollection",
578
- features: $.map((V) => ({
578
+ features: k.map((N) => ({
579
579
  type: "Feature",
580
580
  geometry: {
581
581
  type: "LineString",
582
- coordinates: ct(V)
582
+ coordinates: ct(N)
583
583
  },
584
584
  properties: {
585
- highlightWidth: I
585
+ highlightWidth: R
586
586
  }
587
587
  }))
588
588
  };
@@ -592,64 +592,64 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
592
592
  features: []
593
593
  };
594
594
  }
595
- function xt(n) {
596
- if (!n) {
595
+ function xt(i) {
596
+ if (!i) {
597
597
  Pt();
598
598
  return;
599
599
  }
600
- const u = $t(n);
601
- n.geometryType === "Point" || n.geometryType === "MultiPoint" ? (N.value = u, Q.value = { type: "FeatureCollection", features: [] }) : (Q.value = u, N.value = { type: "FeatureCollection", features: [] });
600
+ const u = $t(i);
601
+ i.geometryType === "Point" || i.geometryType === "MultiPoint" ? (A.value = u, Q.value = { type: "FeatureCollection", features: [] }) : (Q.value = u, A.value = { type: "FeatureCollection", features: [] });
602
602
  }
603
603
  function Pt() {
604
- N.value = { type: "FeatureCollection", features: [] }, Q.value = { type: "FeatureCollection", features: [] };
604
+ A.value = { type: "FeatureCollection", features: [] }, Q.value = { type: "FeatureCollection", features: [] };
605
605
  }
606
- Pe(ge, (n) => {
607
- xt(n);
606
+ Pe(he, (i) => {
607
+ xt(i);
608
608
  }), Pe(
609
609
  () => t.visibleLayers,
610
- (n) => {
611
- ge.value && !n.has(ge.value.layerId) && (ge.value = null, te());
610
+ (i) => {
611
+ he.value && !i.has(he.value.layerId) && (he.value = null, te());
612
612
  },
613
613
  { deep: !0 }
614
614
  ), Pe(J, () => {
615
- const n = L.value;
616
- if (!n) {
617
- ge.value = null;
615
+ const i = L.value;
616
+ if (!i) {
617
+ he.value = null;
618
618
  return;
619
619
  }
620
- const u = a.value;
621
- if (!u || !pe.value) return;
620
+ const u = l.value;
621
+ if (!u || !ye.value) return;
622
622
  const r = [];
623
- t.layerList.forEach((I) => {
624
- const A = I.config;
625
- t.visibleLayers.has(A.id) && (r.push(A.id), A.outlinePaint && r.push(`${A.id}-outline`));
623
+ t.layerList.forEach((R) => {
624
+ const V = R.config;
625
+ t.visibleLayers.has(V.id) && (r.push(V.id), V.outlinePaint && r.push(`${V.id}-outline`));
626
626
  });
627
- const x = u.project(pe.value), F = u.queryRenderedFeatures(x, {
627
+ const x = u.project(ye.value), z = u.queryRenderedFeatures(x, {
628
628
  layers: r
629
- }).find((I) => I.layer.id.replace(/-outline$/, "") === n.layerId && JSON.stringify(I.properties) === JSON.stringify(n.properties));
630
- if (F && F.geometry) {
631
- const I = $e(n.layerId);
632
- if (I) {
633
- const A = rt(F.geometry), V = st(I.id, I.type);
634
- ge.value = {
635
- geometry: F.geometry,
636
- geometryType: A,
637
- layerId: I.id,
638
- properties: F.properties || {},
639
- originalStyle: V
629
+ }).find((R) => R.layer.id.replace(/-outline$/, "") === i.layerId && JSON.stringify(R.properties) === JSON.stringify(i.properties));
630
+ if (z && z.geometry) {
631
+ const R = $e(i.layerId);
632
+ if (R) {
633
+ const V = rt(z.geometry), N = st(R.id, R.type);
634
+ he.value = {
635
+ geometry: z.geometry,
636
+ geometryType: V,
637
+ layerId: R.id,
638
+ properties: z.properties || {},
639
+ originalStyle: N
640
640
  };
641
641
  }
642
642
  }
643
643
  });
644
- const ut = k(null);
645
- function Mt(n) {
646
- const [u, r] = n.geometry.coordinates;
644
+ const ut = C(null);
645
+ function Mt(i) {
646
+ const [u, r] = i.geometry.coordinates;
647
647
  ut.value = [u, r];
648
648
  }
649
- return (n, u) => (d(), w("div", Qt, [
650
- ee(_(It), {
649
+ return (i, u) => (p(), w("div", Qt, [
650
+ K(_(It), {
651
651
  ref_key: "mapRef",
652
- ref: l,
652
+ ref: a,
653
653
  zoom: t.initialZoom,
654
654
  center: t.initialCenter,
655
655
  "navigation-controls": { position: t.navigationControlPosition },
@@ -664,18 +664,18 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
664
664
  "pictometry-button-position": t.pictometryButtonPosition,
665
665
  "tool-panel-layout": "vertical",
666
666
  "tool-panel-split-ratio": 50,
667
- onZoom: f,
667
+ onZoom: h,
668
668
  onClick: te,
669
- onMoveend: C,
670
- onLoad: y,
669
+ onMoveend: S,
670
+ onLoad: g,
671
671
  onSearchResult: Mt
672
672
  }, {
673
- default: Be(() => [
674
- t.drawControlPosition !== null ? (d(), X(_(Rt), {
673
+ default: Ee(() => [
674
+ t.drawControlPosition !== null ? (p(), Y(_(Rt), {
675
675
  key: 0,
676
676
  position: t.drawControlPosition
677
677
  }, null, 8, ["position"])) : O("", !0),
678
- (d(!0), w(ie, null, re(qe.value, (r) => (d(), X(_(pt), {
678
+ (p(!0), w(ie, null, se(qe.value, (r) => (p(), Y(_(pt), {
679
679
  key: "tiled-" + r.id,
680
680
  id: "tiled-" + r.id,
681
681
  source: je(r),
@@ -683,7 +683,7 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
683
683
  minzoom: r.minZoom,
684
684
  maxzoom: r.maxZoom
685
685
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
686
- (d(!0), w(ie, null, re(Ge.value, (r) => (d(), X(_(pt), {
686
+ (p(!0), w(ie, null, se(Ge.value, (r) => (p(), Y(_(pt), {
687
687
  key: "dynamic-" + r.id,
688
688
  id: "dynamic-" + r.id,
689
689
  source: Ce(r),
@@ -691,66 +691,66 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
691
691
  minzoom: r.minZoom,
692
692
  maxzoom: r.maxZoom
693
693
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
694
- (d(!0), w(ie, null, re(z.value, (r) => (d(), X(_(yt), {
694
+ (p(!0), w(ie, null, se(T.value, (r) => (p(), Y(_(yt), {
695
695
  key: r.id,
696
696
  id: r.id,
697
- source: de(r),
698
- paint: fe(r),
697
+ source: fe(r),
698
+ paint: pe(r),
699
699
  minzoom: r.minZoom,
700
700
  maxzoom: r.maxZoom,
701
701
  "before-id": "highlight-circles",
702
702
  onClick: xe
703
703
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
704
- (d(!0), w(ie, null, re(B.value, (r) => (d(), X(_(Dt), {
704
+ (p(!0), w(ie, null, se(B.value, (r) => (p(), Y(_(Dt), {
705
705
  key: r.id,
706
706
  id: r.id,
707
- source: de(r),
708
- paint: fe(r),
707
+ source: fe(r),
708
+ paint: pe(r),
709
709
  minzoom: r.minZoom,
710
710
  maxzoom: r.maxZoom,
711
711
  "before-id": "highlight-circles",
712
712
  onClick: xe
713
713
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
714
- (d(!0), w(ie, null, re(q.value, (r) => (d(), X(_(Ye), {
714
+ (p(!0), w(ie, null, se(q.value, (r) => (p(), Y(_(Ye), {
715
715
  key: r.id + "-outline",
716
716
  id: r.id + "-outline",
717
- source: de(r),
717
+ source: fe(r),
718
718
  paint: He(r),
719
719
  minzoom: r.minZoom,
720
720
  maxzoom: r.maxZoom,
721
721
  "before-id": "highlight-lines",
722
722
  onClick: xe
723
723
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
724
- (d(!0), w(ie, null, re(ce.value, (r) => (d(), X(_(Ye), {
724
+ (p(!0), w(ie, null, se(ce.value, (r) => (p(), Y(_(Ye), {
725
725
  key: r.id,
726
726
  id: r.id,
727
- source: de(r),
728
- paint: fe(r),
727
+ source: fe(r),
728
+ paint: pe(r),
729
729
  minzoom: r.minZoom,
730
730
  maxzoom: r.maxZoom,
731
731
  "before-id": "highlight-lines",
732
732
  onClick: xe
733
733
  }, null, 8, ["id", "source", "paint", "minzoom", "maxzoom"]))), 128)),
734
- ee(_(yt), {
734
+ K(_(yt), {
735
735
  key: "highlight-circles-layer",
736
736
  id: "highlight-circles",
737
- source: { type: "geojson", data: N.value },
737
+ source: { type: "geojson", data: A.value },
738
738
  paint: Qe
739
739
  }, null, 8, ["source"]),
740
- ee(_(Ye), {
740
+ K(_(Ye), {
741
741
  key: "highlight-lines-layer",
742
742
  id: "highlight-lines",
743
743
  source: { type: "geojson", data: Q.value },
744
744
  paint: Ke
745
745
  }, null, 8, ["source"]),
746
- ee(_(Zt), {
746
+ K(_(Zt), {
747
747
  "lng-lat": ut.value,
748
748
  color: "#2176d2"
749
749
  }, null, 8, ["lng-lat"]),
750
- L.value && pe.value ? (d(), X(_(Bt), {
750
+ L.value && ye.value ? (p(), Y(_(Bt), {
751
751
  key: 1,
752
- "lng-lat": pe.value,
753
- html: ae.value,
752
+ "lng-lat": ye.value,
753
+ html: re.value,
754
754
  "close-on-click": !1,
755
755
  "show-navigation": oe.value.length > 1,
756
756
  "current-feature-index": J.value,
@@ -758,19 +758,19 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
758
758
  "layer-name": L.value.layerTitle,
759
759
  onClose: te,
760
760
  onNext: le,
761
- onPrevious: De
761
+ onPrevious: Ze
762
762
  }, null, 8, ["lng-lat", "html", "show-navigation", "current-feature-index", "total-features", "layer-name"])) : O("", !0)
763
763
  ]),
764
764
  _: 1
765
765
  }, 8, ["zoom", "center", "navigation-controls", "geolocation-control", "basemap-change-controls", "map-search-control", "cyclomedia-config", "cyclomedia-button-position", "pictometry-credentials", "pictometry-button-position"])
766
766
  ]));
767
767
  }
768
- }), _e = (e, i) => {
768
+ }), Oe = (e, n) => {
769
769
  const t = e.__vccOpts || e;
770
- for (const [o, l] of i)
771
- t[o] = l;
770
+ for (const [o, a] of n)
771
+ t[o] = a;
772
772
  return t;
773
- }, Xt = /* @__PURE__ */ _e(Kt, [["__scopeId", "data-v-38b78874"]]), Yt = ["disabled"], eo = /* @__PURE__ */ we({
773
+ }, Xt = /* @__PURE__ */ Oe(Kt, [["__scopeId", "data-v-c7524a9f"]]), Yt = ["disabled"], eo = /* @__PURE__ */ we({
774
774
  inheritAttrs: !1,
775
775
  __name: "PhlButton",
776
776
  props: {
@@ -792,56 +792,57 @@ const Qt = { class: "map-panel" }, Kt = /* @__PURE__ */ we({
792
792
  svgRaw: {}
793
793
  },
794
794
  setup(e) {
795
- const i = e, t = (c) => "href" in c && c.href !== void 0 || "to" in c && c.to !== void 0, o = R(() => ot(
795
+ const n = e, t = (c) => "href" in c && c.href !== void 0 || "to" in c && c.to !== void 0, o = I(() => ot(
796
796
  "phila-button",
797
- `phila-button--${i.variant}`,
798
- i.size && `is-${i.size}`,
799
- i.iconOnly && "icon-button",
800
- i.iconOnly && i.variant === "standard" && "icon-button--standard",
801
- i.className
802
- )), l = R(() => t(i) ? "to" in i && i.to !== void 0 ? {
803
- to: i.to,
804
- disabled: i.disabled,
797
+ `phila-button--${n.variant}`,
798
+ n.size && `is-${n.size}`,
799
+ n.iconOnly && "icon-button",
800
+ n.iconOnly && n.variant === "standard" && "icon-button--standard",
801
+ n.className
802
+ )), a = I(() => t(n) ? "to" in n && n.to !== void 0 ? {
803
+ to: n.to,
804
+ disabled: n.disabled,
805
805
  className: o.value
806
806
  } : {
807
- href: i.href,
808
- target: i.target,
809
- rel: i.rel,
810
- disabled: i.disabled,
807
+ href: n.href,
808
+ target: n.target,
809
+ rel: n.rel,
810
+ disabled: n.disabled,
811
811
  className: o.value
812
- } : {}), a = R(
812
+ } : {}), l = I(
813
813
  () => ({
814
- iconDefinition: i.iconDefinition,
815
- iconClass: i.iconClass,
816
- src: i.src,
817
- iconRight: i.iconRight,
818
- iconOnly: i.iconOnly,
819
- text: i.text,
820
- size: i.size
814
+ iconDefinition: n.iconDefinition,
815
+ iconClass: n.iconClass,
816
+ src: n.src,
817
+ iconRight: n.iconRight,
818
+ iconOnly: n.iconOnly,
819
+ text: n.text,
820
+ size: n.size,
821
+ shadow: n.iconOnly && n.variant === "standard"
821
822
  })
822
823
  );
823
- return (c, f) => t(i) ? (d(), X(_(At), tt({ key: 0 }, { ...l.value, ...c.$attrs }, { role: "button" }), {
824
- default: Be(() => [
825
- ee(_(gt), dt(ft(a.value)), {
826
- default: Be(() => [
827
- se(c.$slots, "default", {}, () => [
828
- me(j(i.text), 1)
824
+ return (c, h) => t(n) ? (p(), Y(_(Vt), tt({ key: 0 }, { ...a.value, ...c.$attrs }, { role: "button" }), {
825
+ default: Ee(() => [
826
+ K(_(gt), dt(ft(l.value)), {
827
+ default: Ee(() => [
828
+ ae(c.$slots, "default", {}, () => [
829
+ me(j(n.text), 1)
829
830
  ])
830
831
  ]),
831
832
  _: 3
832
833
  }, 16)
833
834
  ]),
834
835
  _: 3
835
- }, 16)) : (d(), w("button", tt({
836
+ }, 16)) : (p(), w("button", tt({
836
837
  key: 1,
837
838
  type: "button",
838
- disabled: i.disabled,
839
+ disabled: n.disabled,
839
840
  class: o.value
840
841
  }, c.$attrs), [
841
- ee(_(gt), dt(ft(a.value)), {
842
- default: Be(() => [
843
- se(c.$slots, "default", {}, () => [
844
- me(j(i.text), 1)
842
+ K(_(gt), dt(ft(l.value)), {
843
+ default: Ee(() => [
844
+ ae(c.$slots, "default", {}, () => [
845
+ me(j(n.text), 1)
845
846
  ])
846
847
  ]),
847
848
  _: 3
@@ -858,7 +859,7 @@ var to = {
858
859
  iconName: "xmark",
859
860
  icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
860
861
  }, io = no;
861
- const lo = ["for"], ao = { class: "state-layer" }, ro = { class: "content" }, so = { class: "input-text-container" }, co = ["id", "placeholder"], uo = {
862
+ const ao = ["for"], lo = { class: "state-layer" }, ro = { class: "content" }, so = { class: "input-text-container" }, co = ["id", "placeholder"], uo = {
862
863
  key: 1,
863
864
  class: "has-text-body-small phila-supporting-text"
864
865
  }, fo = {
@@ -868,6 +869,7 @@ const lo = ["for"], ao = { class: "state-layer" }, ro = { class: "content" }, so
868
869
  inheritAttrs: !1,
869
870
  __name: "TextField",
870
871
  props: {
872
+ modelValue: { default: void 0 },
871
873
  className: { default: "" },
872
874
  label: { default: "" },
873
875
  id: { default: `phila-text-field-${Math.random().toString(36).substring(2, 9)}` },
@@ -879,75 +881,97 @@ const lo = ["for"], ao = { class: "state-layer" }, ro = { class: "content" }, so
879
881
  return [];
880
882
  } }
881
883
  },
882
- setup(e, { emit: i }) {
883
- const t = Ft(), o = e, l = R(() => typeof o.error == "string" ? o.error : o.error[0]), a = Tt(o, "id"), c = R(() => {
884
- const S = ["default-class"];
885
- return t.disabled != null && S.push("phila-input--disabled"), l.value && S.push("phila-input--error"), t.required != null && S.push("phila-input--required"), ot(...S);
886
- }), f = k(""), p = R(() => {
887
- const S = [];
888
- return f.value !== "" && S.push("phila-text-field--filled"), o.className && S.push(o.className), ot(...S);
889
- });
890
- return (S, g) => (d(), w("div", {
891
- class: ne(["phila-input", c.value])
884
+ emits: ["update:modelValue"],
885
+ setup(e, { emit: n }) {
886
+ const t = Ft(), o = e, a = I(() => typeof o.error == "string" ? o.error : o.error[0]), l = zt(o, "id"), c = n, h = C(""), f = I({
887
+ get: () => o.modelValue !== void 0 ? o.modelValue : h.value,
888
+ set: (d) => {
889
+ c("update:modelValue", d), h.value = d;
890
+ }
891
+ }), M = I(() => {
892
+ const d = ["default-class"];
893
+ return t.disabled != null && d.push("phila-input--disabled"), a.value && d.push("phila-input--error"), t.required != null && d.push("phila-input--required"), ot(...d);
894
+ }), m = I(() => {
895
+ const d = [];
896
+ return f.value !== "" && d.push("phila-text-field--filled"), o.className && d.push(o.className), ot(...d);
897
+ }), v = C(null), s = (d) => {
898
+ d.target.closest("button") || v.value?.focus();
899
+ };
900
+ return (d, $) => (p(), w("div", {
901
+ class: ne(["phila-input", M.value])
892
902
  }, [
893
- o.label ? (d(), w("label", {
903
+ o.label ? (p(), w("label", {
894
904
  key: 0,
895
- for: a.value,
905
+ for: l.value,
896
906
  class: "has-text-label-small phila-label"
897
- }, j(o.label), 9, lo)) : O("", !0),
907
+ }, j(o.label), 9, ao)) : O("", !0),
898
908
  P("div", {
899
- class: ne(["phila-text-field", p.value])
909
+ class: ne(["phila-text-field", m.value]),
910
+ onClick: s
900
911
  }, [
901
- P("div", ao, [
902
- o.leadingIcon ? (d(), X(_(he), {
912
+ P("div", lo, [
913
+ o.leadingIcon ? (p(), Y(_(ue), {
903
914
  key: 0,
904
915
  "icon-class": o.leadingIcon,
905
- inline: ""
916
+ inline: "",
917
+ decorative: "",
918
+ shadow: ""
906
919
  }, null, 8, ["icon-class"])) : O("", !0),
907
920
  P("div", ro, [
908
921
  P("div", so, [
909
922
  St(P("input", tt({
910
- id: a.value,
911
- "onUpdate:modelValue": g[0] || (g[0] = (m) => f.value = m),
923
+ id: l.value,
924
+ ref_key: "inputRef",
925
+ ref: v,
926
+ "onUpdate:modelValue": $[0] || ($[0] = (y) => f.value = y),
912
927
  class: "phila-text-field-input has-text-body-default",
913
928
  placeholder: o.placeholder
914
929
  }, _(t)), null, 16, co), [
915
- [zt, f.value]
930
+ [Tt, f.value]
916
931
  ])
917
932
  ])
918
933
  ]),
919
- f.value != "" ? (d(), X(_(eo), {
934
+ f.value != "" ? (p(), Y(_(eo), {
920
935
  key: 1,
921
936
  variant: "standard",
922
- size: "extra-small",
937
+ size: "small",
923
938
  "icon-only": "",
924
- icon: _(io),
925
- onClick: g[1] || (g[1] = (m) => f.value = "")
926
- }, null, 8, ["icon"])) : O("", !0),
927
- o.trailingIcon ? (d(), X(_(he), {
939
+ "icon-definition": _(io),
940
+ onClick: $[1] || ($[1] = (y) => f.value = "")
941
+ }, null, 8, ["icon-definition"])) : O("", !0),
942
+ o.trailingIcon ? (p(), Y(_(ue), {
928
943
  key: 2,
944
+ size: "small",
929
945
  "icon-class": o.trailingIcon,
930
- inline: ""
931
- }, null, 8, ["icon-class"])) : O("", !0)
946
+ inline: "",
947
+ decorative: "",
948
+ shadow: ""
949
+ }, null, 8, ["icon-class"])) : O("", !0),
950
+ ae(d.$slots, "trailing-action")
932
951
  ])
933
952
  ], 2),
934
- o.supportingText ? (d(), w("div", uo, j(o.supportingText), 1)) : O("", !0),
935
- l.value ? (d(), w("div", fo, [
936
- ee(_(he), {
953
+ o.supportingText ? (p(), w("div", uo, j(o.supportingText), 1)) : O("", !0),
954
+ a.value ? (p(), w("div", fo, [
955
+ K(_(ue), {
937
956
  "icon-definition": _(oo),
938
957
  size: "small",
939
- inline: ""
958
+ inline: "",
959
+ decorative: ""
940
960
  }, null, 8, ["icon-definition"]),
941
- me(" " + j(l.value), 1)
961
+ me(" " + j(a.value), 1)
942
962
  ])) : O("", !0)
943
963
  ], 2));
944
964
  }
945
965
  });
946
966
  var yo = {
967
+ prefix: "fas",
968
+ iconName: "filter",
969
+ icon: [512, 512, [], "f0b0", "M32 64C19.1 64 7.4 71.8 2.4 83.8S.2 109.5 9.4 118.6L192 301.3 192 416c0 8.5 3.4 16.6 9.4 22.6l64 64c9.2 9.2 22.9 11.9 34.9 6.9S320 492.9 320 480l0-178.7 182.6-182.6c9.2-9.2 11.9-22.9 6.9-34.9S492.9 64 480 64L32 64z"]
970
+ }, go = {
947
971
  prefix: "fas",
948
972
  iconName: "caret-right",
949
973
  icon: [256, 512, [], "f0da", "M249.3 235.8c10.2 12.6 9.5 31.1-2.2 42.8l-128 128c-9.2 9.2-22.9 11.9-34.9 6.9S64.5 396.9 64.5 384l0-256c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l128 128 2.2 2.4z"]
950
- }, go = {
974
+ }, ho = {
951
975
  prefix: "fas",
952
976
  iconName: "caret-left",
953
977
  icon: [256, 512, [], "f0d9", "M7.7 235.8c-10.3 12.6-9.5 31.1 2.2 42.8l128 128c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-256c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-128 128-2.2 2.4z"]
@@ -955,40 +979,40 @@ var yo = {
955
979
  prefix: "fas",
956
980
  iconName: "xmark",
957
981
  icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]
958
- }, ho = {
982
+ }, mo = {
959
983
  prefix: "fas",
960
984
  iconName: "bars",
961
985
  icon: [448, 512, ["navicon"], "f0c9", "M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]
962
- }, mo = {
986
+ }, vo = {
963
987
  prefix: "fas",
964
988
  iconName: "circle-info",
965
989
  icon: [512, 512, ["info-circle"], "f05a", "M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM224 160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm-8 64l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]
966
990
  };
967
- const vo = { class: "layer-panel" }, bo = {
991
+ const bo = { class: "layer-panel" }, wo = {
968
992
  key: 0,
969
993
  class: "search-box"
970
- }, wo = {
994
+ }, Lo = {
971
995
  key: 1,
972
996
  class: "topics-container"
973
- }, Lo = { class: "layer-row" }, So = ["href"], Co = {
997
+ }, So = { class: "layer-row" }, Co = ["href"], ko = {
974
998
  key: 1,
975
999
  class: "metadata-placeholder"
976
- }, ko = ["checked", "disabled", "onChange"], $o = { class: "layer-title" }, xo = {
1000
+ }, $o = ["checked", "disabled", "onChange"], xo = { class: "layer-title" }, Po = {
977
1001
  key: 0,
978
1002
  class: "loading-indicator"
979
- }, Po = ["title"], Mo = {
1003
+ }, Mo = ["title"], Fo = {
980
1004
  key: 2,
981
1005
  class: "zoom-indicator"
982
- }, Fo = {
1006
+ }, zo = {
983
1007
  key: 0,
984
1008
  class: "opacity-control"
985
- }, To = { class: "opacity-label" }, zo = ["value", "onInput"], Eo = {
1009
+ }, To = { class: "opacity-label" }, Eo = ["value", "onInput"], _o = {
986
1010
  key: 1,
987
1011
  class: "layer-legend"
988
- }, _o = { class: "legend-label" }, Oo = {
1012
+ }, Oo = { class: "legend-label" }, Io = {
989
1013
  key: 0,
990
1014
  class: "no-results"
991
- }, Io = /* @__PURE__ */ we({
1015
+ }, Ro = /* @__PURE__ */ we({
992
1016
  __name: "LayerPanel",
993
1017
  props: {
994
1018
  layerList: {},
@@ -1003,179 +1027,189 @@ const vo = { class: "layer-panel" }, bo = {
1003
1027
  showSearch: { type: Boolean, default: !0 },
1004
1028
  showOpacity: { type: Boolean, default: !0 },
1005
1029
  showLegend: { type: Boolean, default: !0 },
1006
- searchPlaceholder: { default: "Search layers..." }
1030
+ searchPlaceholder: { default: "Filter layers..." }
1007
1031
  },
1008
1032
  emits: ["toggleLayer", "setOpacity", "updateSearch"],
1009
- setup(e, { emit: i }) {
1010
- const t = e, o = i, l = R(() => {
1033
+ setup(e, { emit: n }) {
1034
+ const t = e, o = n, a = I(() => {
1011
1035
  if (!t.searchQuery.trim())
1012
1036
  return t.layerList;
1013
- const C = t.searchQuery.toLowerCase();
1037
+ const S = t.searchQuery.toLowerCase();
1014
1038
  return t.layerList.filter(
1015
- (y) => y.config.title.toLowerCase().includes(C)
1039
+ (g) => g.config.title.toLowerCase().includes(S)
1016
1040
  );
1017
1041
  });
1018
- function a(C) {
1019
- let y = C.split("?")[0] || C;
1020
- return y = y.replace(/\/query$/, ""), y = y.replace(/\/$/, ""), y.toLowerCase();
1042
+ function l(S) {
1043
+ let g = S.split("?")[0] || S;
1044
+ return g = g.replace(/\/query$/, ""), g = g.replace(/\/$/, ""), g.toLowerCase();
1021
1045
  }
1022
- function c(C) {
1023
- const y = a(C);
1024
- return t.layerMetadata[y] || null;
1046
+ function c(S) {
1047
+ const g = l(S);
1048
+ return t.layerMetadata[g] || null;
1025
1049
  }
1026
- const f = R(() => t.layerList.some((C) => c(C.config.url)));
1027
- function p(C) {
1028
- return t.visibleLayers.has(C);
1050
+ const h = I(() => t.layerList.some((S) => c(S.config.url)));
1051
+ function f(S) {
1052
+ return t.visibleLayers.has(S);
1029
1053
  }
1030
- function S(C) {
1031
- return t.layerOpacities[C] ?? 1;
1054
+ function M(S) {
1055
+ return t.layerOpacities[S] ?? 1;
1032
1056
  }
1033
- function g(C) {
1034
- return t.loadingLayers.has(C);
1057
+ function m(S) {
1058
+ return t.loadingLayers.has(S);
1035
1059
  }
1036
- function m(C) {
1037
- return t.layerErrors[C] || null;
1060
+ function v(S) {
1061
+ return t.layerErrors[S] || null;
1038
1062
  }
1039
- function s(C) {
1040
- const y = t.currentZoom, b = C.minZoom, E = C.maxZoom;
1041
- return !(b !== void 0 && y < b || E !== void 0 && y > E);
1063
+ function s(S) {
1064
+ const g = t.currentZoom, b = S.minZoom, E = S.maxZoom;
1065
+ return !(b !== void 0 && g < b || E !== void 0 && g > E);
1042
1066
  }
1043
- const v = R({
1067
+ const d = I({
1044
1068
  get: () => t.searchQuery,
1045
- set: (C) => o("updateSearch", C)
1069
+ set: (S) => o("updateSearch", S)
1046
1070
  });
1047
- function T(C) {
1048
- o("toggleLayer", C);
1049
- }
1050
- function h(C, y) {
1051
- const b = y.target, E = parseFloat(b.value);
1052
- o("setOpacity", C, E);
1053
- }
1054
- return (C, y) => (d(), w("aside", vo, [
1055
- e.showSearch ? (d(), w("div", bo, [
1056
- ee(_(po), {
1057
- modelValue: v.value,
1058
- "onUpdate:modelValue": y[0] || (y[0] = (b) => v.value = b),
1071
+ function $(S) {
1072
+ o("toggleLayer", S);
1073
+ }
1074
+ function y(S, g) {
1075
+ const b = g.target, E = parseFloat(b.value);
1076
+ o("setOpacity", S, E);
1077
+ }
1078
+ return (S, g) => (p(), w("aside", bo, [
1079
+ e.showSearch ? (p(), w("div", wo, [
1080
+ K(_(po), {
1081
+ modelValue: d.value,
1082
+ "onUpdate:modelValue": g[0] || (g[0] = (b) => d.value = b),
1059
1083
  placeholder: e.searchPlaceholder,
1060
1084
  "class-name": "layer-search-field"
1061
- }, null, 8, ["modelValue", "placeholder"])
1085
+ }, {
1086
+ "trailing-action": Ee(() => [
1087
+ K(_(ue), {
1088
+ "icon-definition": _(yo),
1089
+ size: "small",
1090
+ inline: "",
1091
+ decorative: ""
1092
+ }, null, 8, ["icon-definition"])
1093
+ ]),
1094
+ _: 1
1095
+ }, 8, ["modelValue", "placeholder"])
1062
1096
  ])) : O("", !0),
1063
- e.mode === "topics" ? (d(), w("div", wo, [
1064
- se(C.$slots, "topics", {}, () => [
1065
- y[2] || (y[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
1097
+ e.mode === "topics" ? (p(), w("div", Lo, [
1098
+ ae(S.$slots, "topics", {}, () => [
1099
+ g[2] || (g[2] = P("div", { class: "no-topics" }, ' No topic components provided. Use the "topics" slot to add TopicAccordion components. ', -1))
1066
1100
  ], !0)
1067
- ])) : (d(), w("div", {
1101
+ ])) : (p(), w("div", {
1068
1102
  key: 2,
1069
- class: ne(["layer-list", { "has-metadata": f.value }])
1103
+ class: ne(["layer-list", { "has-metadata": h.value }])
1070
1104
  }, [
1071
- (d(!0), w(ie, null, re(l.value, (b) => (d(), w("div", {
1105
+ (p(!0), w(ie, null, se(a.value, (b) => (p(), w("div", {
1072
1106
  key: b.config.id,
1073
1107
  class: "layer-item"
1074
1108
  }, [
1075
- P("div", Lo, [
1076
- c(b.config.url) ? (d(), w("a", {
1109
+ P("div", So, [
1110
+ c(b.config.url) ? (p(), w("a", {
1077
1111
  key: 0,
1078
1112
  href: c(b.config.url) || "",
1079
1113
  target: "_blank",
1080
1114
  rel: "noopener noreferrer",
1081
1115
  class: "metadata-link",
1082
1116
  title: "View metadata",
1083
- onClick: y[1] || (y[1] = Et(() => {
1117
+ onClick: g[1] || (g[1] = Et(() => {
1084
1118
  }, ["stop"]))
1085
1119
  }, [
1086
- ee(_(he), {
1087
- "icon-definition": _(mo),
1120
+ K(_(ue), {
1121
+ "icon-definition": _(vo),
1088
1122
  size: "small",
1089
1123
  inline: "",
1090
1124
  decorative: ""
1091
1125
  }, null, 8, ["icon-definition"])
1092
- ], 8, So)) : f.value ? (d(), w("span", Co)) : O("", !0),
1126
+ ], 8, Co)) : h.value ? (p(), w("span", ko)) : O("", !0),
1093
1127
  P("label", {
1094
1128
  class: ne(["layer-checkbox", {
1095
1129
  "layer-unavailable": !s(b.config),
1096
- "layer-error": m(b.config.id)
1130
+ "layer-error": v(b.config.id)
1097
1131
  }])
1098
1132
  }, [
1099
1133
  P("input", {
1100
1134
  type: "checkbox",
1101
- checked: p(b.config.id),
1135
+ checked: f(b.config.id),
1102
1136
  disabled: !s(b.config),
1103
- onChange: (E) => T(b.config.id)
1104
- }, null, 40, ko),
1105
- P("span", $o, [
1137
+ onChange: (E) => $(b.config.id)
1138
+ }, null, 40, $o),
1139
+ P("span", xo, [
1106
1140
  me(j(b.config.title) + " ", 1),
1107
- g(b.config.id) ? (d(), w("span", xo, " Loading... ")) : O("", !0),
1108
- m(b.config.id) ? (d(), w("span", {
1141
+ m(b.config.id) ? (p(), w("span", Po, " Loading... ")) : O("", !0),
1142
+ v(b.config.id) ? (p(), w("span", {
1109
1143
  key: 1,
1110
1144
  class: "error-indicator",
1111
- title: m(b.config.id) || ""
1112
- }, " Error ", 8, Po)) : O("", !0),
1113
- s(b.config) ? O("", !0) : (d(), w("span", Mo, " (zoom in) "))
1145
+ title: v(b.config.id) || ""
1146
+ }, " Error ", 8, Mo)) : O("", !0),
1147
+ s(b.config) ? O("", !0) : (p(), w("span", Fo, " (zoom in) "))
1114
1148
  ])
1115
1149
  ], 2)
1116
1150
  ]),
1117
- e.showOpacity && p(b.config.id) ? (d(), w("div", Fo, [
1118
- P("label", To, " Opacity: " + j(Math.round(S(b.config.id) * 100)) + "% ", 1),
1151
+ e.showOpacity && f(b.config.id) ? (p(), w("div", zo, [
1152
+ P("label", To, " Opacity: " + j(Math.round(M(b.config.id) * 100)) + "% ", 1),
1119
1153
  P("input", {
1120
1154
  type: "range",
1121
1155
  min: "0",
1122
1156
  max: "1",
1123
1157
  step: "0.05",
1124
- value: S(b.config.id),
1158
+ value: M(b.config.id),
1125
1159
  class: "opacity-slider",
1126
- onInput: (E) => h(b.config.id, E)
1127
- }, null, 40, zo)
1160
+ onInput: (E) => y(b.config.id, E)
1161
+ }, null, 40, Eo)
1128
1162
  ])) : O("", !0),
1129
- e.showLegend && p(b.config.id) && b.config.legend?.length ? (d(), w("ul", Eo, [
1130
- (d(!0), w(ie, null, re(b.config.legend, (E, z) => (d(), w("li", {
1131
- key: z,
1163
+ e.showLegend && f(b.config.id) && b.config.legend?.length ? (p(), w("ul", _o, [
1164
+ (p(!0), w(ie, null, se(b.config.legend, (E, T) => (p(), w("li", {
1165
+ key: T,
1132
1166
  class: "legend-item"
1133
1167
  }, [
1134
- E.type === "circle" ? (d(), w("span", {
1168
+ E.type === "circle" ? (p(), w("span", {
1135
1169
  key: 0,
1136
1170
  class: "legend-symbol legend-circle",
1137
- style: Y({ backgroundColor: E.color })
1138
- }, null, 4)) : E.type === "line" ? (d(), w("span", {
1171
+ style: ee({ backgroundColor: E.color })
1172
+ }, null, 4)) : E.type === "line" ? (p(), w("span", {
1139
1173
  key: 1,
1140
1174
  class: "legend-symbol legend-line",
1141
- style: Y({
1175
+ style: ee({
1142
1176
  backgroundColor: E.color,
1143
1177
  height: `${E.width || 2}px`
1144
1178
  })
1145
- }, null, 4)) : E.type === "fill" ? (d(), w("span", {
1179
+ }, null, 4)) : E.type === "fill" ? (p(), w("span", {
1146
1180
  key: 2,
1147
1181
  class: "legend-symbol legend-fill",
1148
- style: Y({ backgroundColor: E.color })
1182
+ style: ee({ backgroundColor: E.color })
1149
1183
  }, null, 4)) : O("", !0),
1150
- P("span", _o, j(E.label), 1)
1184
+ P("span", Oo, j(E.label), 1)
1151
1185
  ]))), 128))
1152
1186
  ])) : O("", !0)
1153
1187
  ]))), 128)),
1154
- l.value.length === 0 ? (d(), w("div", Oo, ' No layers match "' + j(e.searchQuery) + '" ', 1)) : O("", !0)
1188
+ a.value.length === 0 ? (p(), w("div", Io, ' No layers match "' + j(e.searchQuery) + '" ', 1)) : O("", !0)
1155
1189
  ], 2))
1156
1190
  ]));
1157
1191
  }
1158
- }), Ro = /* @__PURE__ */ _e(Io, [["__scopeId", "data-v-82d84fbe"]]);
1192
+ }), Do = /* @__PURE__ */ Oe(Ro, [["__scopeId", "data-v-d2e878e2"]]);
1159
1193
  function D(e) {
1160
1194
  if (!e || !Array.isArray(e) || e.length < 3) return "#888888";
1161
- const i = e[0], t = e[1], o = e[2], a = (e[3] ?? 255) / 255;
1162
- return a === 1 ? `#${i.toString(16).padStart(2, "0")}${t.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${i}, ${t}, ${o}, ${a.toFixed(2)})`;
1195
+ const n = e[0], t = e[1], o = e[2], l = (e[3] ?? 255) / 255;
1196
+ return l === 1 ? `#${n.toString(16).padStart(2, "0")}${t.toString(16).padStart(2, "0")}${o.toString(16).padStart(2, "0")}` : `rgba(${n}, ${t}, ${o}, ${l.toFixed(2)})`;
1163
1197
  }
1164
- function ue(e) {
1198
+ function de(e) {
1165
1199
  return e !== void 0 ? e : 1;
1166
1200
  }
1167
- const Do = 559082264;
1201
+ const Zo = 559082264;
1168
1202
  function vt(e) {
1169
- return !e || e <= 0 ? null : Math.round(Math.log2(Do / e) * 100) / 100;
1203
+ return !e || e <= 0 ? null : Math.round(Math.log2(Zo / e) * 100) / 100;
1170
1204
  }
1171
- function Zo(e, i) {
1205
+ function Bo(e, n) {
1172
1206
  const t = {};
1173
1207
  if (e && e > 0) {
1174
1208
  const o = vt(e);
1175
1209
  o !== null && (t.minZoom = o);
1176
1210
  }
1177
- if (i && i > 0) {
1178
- const o = vt(i);
1211
+ if (n && n > 0) {
1212
+ const o = vt(n);
1179
1213
  o !== null && (t.maxZoom = o);
1180
1214
  }
1181
1215
  return t;
@@ -1203,19 +1237,19 @@ function Fe(e) {
1203
1237
  function et(e) {
1204
1238
  return String(e);
1205
1239
  }
1206
- function Ct(e, i, t) {
1207
- const o = e.symbol, l = Ue(o);
1208
- let a = {}, c = [], f = null;
1209
- if (l === "fill" && o) {
1210
- const p = o.color === null ? 0 : o.color?.[3] ?? 255, S = p === 0 ? "rgba(0, 0, 0, 0)" : D(o.color), g = p === 0 ? 0 : p < 255 ? 1 : ue(i);
1211
- if (a = {
1212
- "fill-color": S,
1213
- "fill-opacity": g
1240
+ function Ct(e, n, t) {
1241
+ const o = e.symbol, a = Ue(o);
1242
+ let l = {}, c = [], h = null;
1243
+ if (a === "fill" && o) {
1244
+ const f = o.color === null ? 0 : o.color?.[3] ?? 255, M = f === 0 ? "rgba(0, 0, 0, 0)" : D(o.color), m = f === 0 ? 0 : f < 255 ? 1 : de(n);
1245
+ if (l = {
1246
+ "fill-color": M,
1247
+ "fill-opacity": m
1214
1248
  }, Fe(o.outline)) {
1215
- const m = o.outline.width || 1, s = D(o.outline.color);
1216
- p !== 0 && (a["fill-outline-color"] = s), (m > 1 || p === 0) && (f = {
1249
+ const v = o.outline.width || 1, s = D(o.outline.color);
1250
+ f !== 0 && (l["fill-outline-color"] = s), (v > 1 || f === 0) && (h = {
1217
1251
  "line-color": s,
1218
- "line-width": m
1252
+ "line-width": v
1219
1253
  });
1220
1254
  }
1221
1255
  c = [{
@@ -1223,240 +1257,240 @@ function Ct(e, i, t) {
1223
1257
  color: D(o.color),
1224
1258
  label: e.label || "Feature"
1225
1259
  }];
1226
- } else if (l === "line" && o)
1227
- a = {
1260
+ } else if (a === "line" && o)
1261
+ l = {
1228
1262
  "line-color": D(o.color),
1229
1263
  "line-width": o.width || 1,
1230
- "line-opacity": ue(i)
1264
+ "line-opacity": de(n)
1231
1265
  }, c = [{
1232
1266
  type: "line",
1233
1267
  color: D(o.color),
1234
1268
  width: o.width || 1,
1235
1269
  label: e.label || "Feature"
1236
1270
  }];
1237
- else if (l === "circle" && o) {
1238
- const p = Math.round((o.size || 6) * 0.71 * 100) / 100;
1239
- a = {
1271
+ else if (a === "circle" && o) {
1272
+ const f = Math.round((o.size || 6) * 0.71 * 100) / 100;
1273
+ l = {
1240
1274
  "circle-color": D(o.color),
1241
- "circle-radius": p,
1242
- "circle-opacity": ue(i)
1243
- }, Fe(o.outline) && (a["circle-stroke-color"] = D(o.outline.color), a["circle-stroke-width"] = o.outline.width || 1), c = [{
1275
+ "circle-radius": f,
1276
+ "circle-opacity": de(n)
1277
+ }, Fe(o.outline) && (l["circle-stroke-color"] = D(o.outline.color), l["circle-stroke-width"] = o.outline.width || 1), c = [{
1244
1278
  type: "circle",
1245
1279
  color: D(o.color),
1246
1280
  label: e.label || "Feature"
1247
1281
  }];
1248
1282
  }
1249
- return { paint: a, legend: c, geomType: l, outlinePaint: f };
1283
+ return { paint: l, legend: c, geomType: a, outlinePaint: h };
1250
1284
  }
1251
- function Bo(e, i, t) {
1252
- const o = e.field1, l = e.uniqueValueInfos || [], a = e.defaultSymbol;
1253
- if (l.length === 0)
1254
- return Ct({ ...e, symbol: a }, i);
1255
- const c = l[0]?.symbol || a, f = Ue(c);
1256
- let p = {}, S = [], g = null;
1257
- if (f === "fill") {
1258
- const m = ["match", ["to-string", ["get", o]]];
1259
- for (const s of l) {
1260
- m.push(et(s.value)), m.push(D(s.symbol?.color));
1261
- const v = String(s.value), h = t?.get(v) || s.label || v;
1262
- S.push({
1285
+ function Vo(e, n, t) {
1286
+ const o = e.field1, a = e.uniqueValueInfos || [], l = e.defaultSymbol;
1287
+ if (a.length === 0)
1288
+ return Ct({ ...e, symbol: l }, n);
1289
+ const c = a[0]?.symbol || l, h = Ue(c);
1290
+ let f = {}, M = [], m = null;
1291
+ if (h === "fill") {
1292
+ const v = ["match", ["to-string", ["get", o]]];
1293
+ for (const s of a) {
1294
+ v.push(et(s.value)), v.push(D(s.symbol?.color));
1295
+ const d = String(s.value), y = t?.get(d) || s.label || d;
1296
+ M.push({
1263
1297
  type: "fill",
1264
1298
  color: D(s.symbol?.color),
1265
- label: h
1299
+ label: y
1266
1300
  });
1267
1301
  }
1268
- if (m.push(a ? D(a.color) : "#888888"), p = {
1269
- "fill-color": m,
1270
- "fill-opacity": ue(i)
1302
+ if (v.push(l ? D(l.color) : "#888888"), f = {
1303
+ "fill-color": v,
1304
+ "fill-opacity": de(n)
1271
1305
  }, Fe(c?.outline)) {
1272
- const s = c.outline.width || 1, v = D(c.outline.color);
1273
- p["fill-outline-color"] = v, s > 1 && (g = {
1274
- "line-color": v,
1306
+ const s = c.outline.width || 1, d = D(c.outline.color);
1307
+ f["fill-outline-color"] = d, s > 1 && (m = {
1308
+ "line-color": d,
1275
1309
  "line-width": s
1276
1310
  });
1277
1311
  }
1278
- } else if (f === "line") {
1279
- const m = ["match", ["to-string", ["get", o]]];
1280
- for (const s of l) {
1281
- m.push(et(s.value)), m.push(D(s.symbol?.color));
1282
- const v = String(s.value), h = t?.get(v) || s.label || v;
1283
- S.push({
1312
+ } else if (h === "line") {
1313
+ const v = ["match", ["to-string", ["get", o]]];
1314
+ for (const s of a) {
1315
+ v.push(et(s.value)), v.push(D(s.symbol?.color));
1316
+ const d = String(s.value), y = t?.get(d) || s.label || d;
1317
+ M.push({
1284
1318
  type: "line",
1285
1319
  color: D(s.symbol?.color),
1286
1320
  width: s.symbol?.width || 1,
1287
- label: h
1321
+ label: y
1288
1322
  });
1289
1323
  }
1290
- m.push(a ? D(a.color) : "#888888"), p = {
1291
- "line-color": m,
1324
+ v.push(l ? D(l.color) : "#888888"), f = {
1325
+ "line-color": v,
1292
1326
  "line-width": c?.width || 2,
1293
- "line-opacity": ue(i)
1327
+ "line-opacity": de(n)
1294
1328
  };
1295
- } else if (f === "circle") {
1296
- const m = ["match", ["to-string", ["get", o]]];
1297
- for (const v of l) {
1298
- m.push(et(v.value)), m.push(D(v.symbol?.color));
1299
- const T = String(v.value), C = t?.get(T) || v.label || T;
1300
- S.push({
1329
+ } else if (h === "circle") {
1330
+ const v = ["match", ["to-string", ["get", o]]];
1331
+ for (const d of a) {
1332
+ v.push(et(d.value)), v.push(D(d.symbol?.color));
1333
+ const $ = String(d.value), S = t?.get($) || d.label || $;
1334
+ M.push({
1301
1335
  type: "circle",
1302
- color: D(v.symbol?.color),
1303
- label: C
1336
+ color: D(d.symbol?.color),
1337
+ label: S
1304
1338
  });
1305
1339
  }
1306
- m.push(a ? D(a.color) : "#888888");
1340
+ v.push(l ? D(l.color) : "#888888");
1307
1341
  const s = Math.round((c?.size || 6) * 0.71 * 100) / 100;
1308
- p = {
1309
- "circle-color": m,
1342
+ f = {
1343
+ "circle-color": v,
1310
1344
  "circle-radius": s,
1311
- "circle-opacity": ue(i)
1312
- }, Fe(c?.outline) && (p["circle-stroke-color"] = D(c.outline.color), p["circle-stroke-width"] = c.outline.width || 1);
1345
+ "circle-opacity": de(n)
1346
+ }, Fe(c?.outline) && (f["circle-stroke-color"] = D(c.outline.color), f["circle-stroke-width"] = c.outline.width || 1);
1313
1347
  }
1314
- return { paint: p, legend: S, geomType: f, outlinePaint: g };
1348
+ return { paint: f, legend: M, geomType: h, outlinePaint: m };
1315
1349
  }
1316
- function Ao(e, i) {
1317
- const t = e.field, o = e.classBreakInfos || [], l = e.visualVariables?.find((g) => g.type === "colorInfo");
1318
- if (l?.stops && l.stops.length > 0)
1319
- return No(l, t, e, i);
1350
+ function Ao(e, n) {
1351
+ const t = e.field, o = e.classBreakInfos || [], a = e.visualVariables?.find((m) => m.type === "colorInfo");
1352
+ if (a?.stops && a.stops.length > 0)
1353
+ return No(a, t, e, n);
1320
1354
  if (o.length === 0)
1321
1355
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1322
- const a = o[0]?.symbol, c = Ue(a);
1323
- let f = {}, p = [], S = null;
1356
+ const l = o[0]?.symbol, c = Ue(l);
1357
+ let h = {}, f = [], M = null;
1324
1358
  if (c === "fill") {
1325
- const g = ["step", ["get", t]];
1326
- g.push(D(o[0]?.symbol?.color));
1327
- for (let m = 0; m < o.length; m++) {
1328
- const s = o[m];
1329
- m > 0 && (g.push(o[m - 1].classMaxValue), g.push(D(s.symbol?.color))), p.push({
1359
+ const m = ["step", ["get", t]];
1360
+ m.push(D(o[0]?.symbol?.color));
1361
+ for (let v = 0; v < o.length; v++) {
1362
+ const s = o[v];
1363
+ v > 0 && (m.push(o[v - 1].classMaxValue), m.push(D(s.symbol?.color))), f.push({
1330
1364
  type: "fill",
1331
1365
  color: D(s.symbol?.color),
1332
1366
  label: s.label || `${s.classMaxValue}`
1333
1367
  });
1334
1368
  }
1335
- if (f = {
1336
- "fill-color": g,
1337
- "fill-opacity": ue(i)
1338
- }, Fe(a?.outline)) {
1339
- const m = a.outline.width || 1, s = D(a.outline.color);
1340
- f["fill-outline-color"] = s, m > 1 && (S = {
1369
+ if (h = {
1370
+ "fill-color": m,
1371
+ "fill-opacity": de(n)
1372
+ }, Fe(l?.outline)) {
1373
+ const v = l.outline.width || 1, s = D(l.outline.color);
1374
+ h["fill-outline-color"] = s, v > 1 && (M = {
1341
1375
  "line-color": s,
1342
- "line-width": m
1376
+ "line-width": v
1343
1377
  });
1344
1378
  }
1345
1379
  } else if (c === "line") {
1346
- const g = ["step", ["get", t]];
1347
- g.push(D(o[0]?.symbol?.color));
1348
- let m = e.minValue ?? 0;
1349
- for (let v = 0; v < o.length; v++) {
1350
- const T = o[v];
1351
- v > 0 && (g.push(o[v - 1].classMaxValue), g.push(D(T.symbol?.color))), p.push({
1380
+ const m = ["step", ["get", t]];
1381
+ m.push(D(o[0]?.symbol?.color));
1382
+ let v = e.minValue ?? 0;
1383
+ for (let d = 0; d < o.length; d++) {
1384
+ const $ = o[d];
1385
+ d > 0 && (m.push(o[d - 1].classMaxValue), m.push(D($.symbol?.color))), f.push({
1352
1386
  type: "line",
1353
- color: D(T.symbol?.color),
1354
- width: T.symbol?.width || a?.width || 2,
1355
- label: T.label || `${m} - ${T.classMaxValue}`
1356
- }), m = T.classMaxValue + 1;
1387
+ color: D($.symbol?.color),
1388
+ width: $.symbol?.width || l?.width || 2,
1389
+ label: $.label || `${v} - ${$.classMaxValue}`
1390
+ }), v = $.classMaxValue + 1;
1357
1391
  }
1358
- const s = a?.width || 2;
1359
- f = {
1360
- "line-color": g,
1392
+ const s = l?.width || 2;
1393
+ h = {
1394
+ "line-color": m,
1361
1395
  "line-width": s,
1362
- "line-opacity": ue(i)
1396
+ "line-opacity": de(n)
1363
1397
  };
1364
1398
  }
1365
- return { paint: f, legend: p, geomType: c, outlinePaint: S };
1399
+ return { paint: h, legend: f, geomType: c, outlinePaint: M };
1366
1400
  }
1367
- function No(e, i, t, o) {
1368
- const l = e.stops || [];
1369
- if (l.length === 0)
1401
+ function No(e, n, t, o) {
1402
+ const a = e.stops || [];
1403
+ if (a.length === 0)
1370
1404
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1371
- const a = t.classBreakInfos?.[0]?.symbol || t.defaultSymbol, c = Ue(a);
1372
- let f = {}, p = [], S = null;
1405
+ const l = t.classBreakInfos?.[0]?.symbol || t.defaultSymbol, c = Ue(l);
1406
+ let h = {}, f = [], M = null;
1373
1407
  if (c === "fill") {
1374
- const g = ["interpolate", ["linear"], ["get", i]];
1375
- for (const s of l)
1376
- g.push(s.value), g.push(D(s.color)), p.push({
1408
+ const m = ["interpolate", ["linear"], ["get", n]];
1409
+ for (const s of a)
1410
+ m.push(s.value), m.push(D(s.color)), f.push({
1377
1411
  type: "fill",
1378
1412
  color: D(s.color),
1379
1413
  label: s.label || `${s.value}`
1380
1414
  });
1381
- if (f = {
1415
+ if (h = {
1382
1416
  "fill-color": [
1383
1417
  "case",
1384
- ["==", ["get", i], null],
1418
+ ["==", ["get", n], null],
1385
1419
  "rgba(0, 0, 0, 0)",
1386
1420
  // Transparent for null/no-data values
1387
- g
1421
+ m
1388
1422
  // Otherwise use the interpolated color
1389
1423
  ],
1390
- "fill-opacity": ue(o)
1391
- }, Fe(a?.outline)) {
1392
- const s = a.outline.width || 1, v = D(a.outline.color);
1393
- f["fill-outline-color"] = v, s > 1 && (S = {
1394
- "line-color": v,
1424
+ "fill-opacity": de(o)
1425
+ }, Fe(l?.outline)) {
1426
+ const s = l.outline.width || 1, d = D(l.outline.color);
1427
+ h["fill-outline-color"] = d, s > 1 && (M = {
1428
+ "line-color": d,
1395
1429
  "line-width": s
1396
1430
  });
1397
1431
  }
1398
1432
  }
1399
- return { paint: f, legend: p, geomType: c, outlinePaint: S };
1433
+ return { paint: h, legend: f, geomType: c, outlinePaint: M };
1400
1434
  }
1401
- function Vo(e, i, t, o) {
1435
+ function Uo(e, n, t, o) {
1402
1436
  if (!e?.renderer)
1403
1437
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1404
- const l = e.renderer;
1405
- switch (l.type) {
1438
+ const a = e.renderer;
1439
+ switch (a.type) {
1406
1440
  case "simple":
1407
- return Ct(l, i);
1441
+ return Ct(a, n);
1408
1442
  case "uniqueValue":
1409
- return Bo(l, i, t);
1443
+ return Vo(a, n, t);
1410
1444
  case "classBreaks":
1411
- return Ao(l, i);
1445
+ return Ao(a, n);
1412
1446
  default:
1413
1447
  return { paint: {}, legend: [], geomType: "fill", outlinePaint: null };
1414
1448
  }
1415
1449
  }
1416
- function Uo(e) {
1450
+ function Wo(e) {
1417
1451
  if (!e) return null;
1418
- const i = e.title || "", o = (e.fieldInfos || []).filter((l) => l.visible === !0).map((l) => {
1419
- const a = {
1420
- field: l.fieldName,
1421
- label: l.label || l.fieldName
1452
+ const n = e.title || "", o = (e.fieldInfos || []).filter((a) => a.visible === !0).map((a) => {
1453
+ const l = {
1454
+ field: a.fieldName,
1455
+ label: a.label || a.fieldName
1422
1456
  };
1423
- return l.format && (a.format = {}, l.format.dateFormat && (a.format.dateFormat = l.format.dateFormat), l.format.digitSeparator !== void 0 && (a.format.digitSeparator = l.format.digitSeparator), l.format.places !== void 0 && (a.format.places = l.format.places), Object.keys(a.format).length === 0 && delete a.format), a;
1457
+ return a.format && (l.format = {}, a.format.dateFormat && (l.format.dateFormat = a.format.dateFormat), a.format.digitSeparator !== void 0 && (l.format.digitSeparator = a.format.digitSeparator), a.format.places !== void 0 && (l.format.places = a.format.places), Object.keys(l.format).length === 0 && delete l.format), l;
1424
1458
  });
1425
1459
  return {
1426
- title: i,
1460
+ title: n,
1427
1461
  fields: o
1428
1462
  };
1429
1463
  }
1430
- function Wo(e) {
1464
+ function jo(e) {
1431
1465
  return e?.definitionExpression;
1432
1466
  }
1433
- function jo(e) {
1467
+ function qo(e) {
1434
1468
  return (e.includes("_") ? e.split("_").slice(1).join(" ") : e).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
1435
1469
  }
1436
- function qo(e) {
1470
+ function Go(e) {
1437
1471
  return e.includes("_") ? e.split("_").slice(1).join(" ") : e;
1438
1472
  }
1439
- function Go(e) {
1440
- const i = /* @__PURE__ */ new Map();
1473
+ function Ho(e) {
1474
+ const n = /* @__PURE__ */ new Map();
1441
1475
  if (!e)
1442
- return i;
1476
+ return n;
1443
1477
  const t = e.split(`
1444
1478
  `), o = /^(\d{1,3})\s+(.+)$/;
1445
- for (const l of t) {
1446
- const a = l.trim().match(o);
1447
- if (a) {
1448
- const [, c, f] = a;
1449
- c && f && i.set(c, f.trim());
1479
+ for (const a of t) {
1480
+ const l = a.trim().match(o);
1481
+ if (l) {
1482
+ const [, c, h] = l;
1483
+ c && h && n.set(c, h.trim());
1450
1484
  }
1451
1485
  }
1452
- return i;
1486
+ return n;
1453
1487
  }
1454
- async function Ho(e) {
1488
+ async function Jo(e) {
1455
1489
  try {
1456
- const i = await fetch(`${e}?f=json`);
1457
- if (!i.ok)
1490
+ const n = await fetch(`${e}?f=json`);
1491
+ if (!n.ok)
1458
1492
  return null;
1459
- const t = await i.json();
1493
+ const t = await n.json();
1460
1494
  return t.drawingInfo ? {
1461
1495
  drawingInfo: t.drawingInfo,
1462
1496
  description: t.description
@@ -1466,59 +1500,59 @@ async function Ho(e) {
1466
1500
  }
1467
1501
  }
1468
1502
  async function kt(e) {
1469
- const i = e.operationalLayers || [], t = [], o = ["Zoning and Planning_Land Use"];
1470
- for (const l of i)
1471
- if (l.url && l.itemId !== "4f39b829b96d437da9231727d9c91fab")
1503
+ const n = e.operationalLayers || [], t = [], o = ["Zoning and Planning_Land Use"];
1504
+ for (const a of n)
1505
+ if (a.url && a.itemId !== "4f39b829b96d437da9231727d9c91fab")
1472
1506
  try {
1473
- let a = l.layerDefinition?.drawingInfo, c;
1474
- const f = !a || !a.renderer, p = o.includes(l.title);
1475
- if ((f || p) && l.url) {
1476
- const z = await Ho(l.url);
1477
- z && (a = z.drawingInfo, z.description && (c = Go(z.description), c.size > 0));
1507
+ let l = a.layerDefinition?.drawingInfo, c;
1508
+ const h = !l || !l.renderer, f = o.includes(a.title);
1509
+ if ((h || f) && a.url) {
1510
+ const T = await Jo(a.url);
1511
+ T && (l = T.drawingInfo, T.description && (c = Ho(T.description), c.size > 0));
1478
1512
  }
1479
- const { paint: S, legend: g, geomType: m, outlinePaint: s } = Vo(
1480
- a,
1481
- l.opacity,
1513
+ const { paint: M, legend: m, geomType: v, outlinePaint: s } = Uo(
1514
+ l,
1515
+ a.opacity,
1482
1516
  c,
1483
- l.title
1484
- ), v = Uo(l.popupInfo), T = Wo(l.layerDefinition), h = Zo(
1485
- l.layerDefinition?.minScale,
1486
- l.layerDefinition?.maxScale
1487
- ), C = jo(l.title), y = qo(l.title);
1488
- let b = l.opacity ?? 1;
1517
+ a.title
1518
+ ), d = Wo(a.popupInfo), $ = jo(a.layerDefinition), y = Bo(
1519
+ a.layerDefinition?.minScale,
1520
+ a.layerDefinition?.maxScale
1521
+ ), S = qo(a.title), g = Go(a.title);
1522
+ let b = a.opacity ?? 1;
1489
1523
  const E = {
1490
- id: C,
1491
- title: y,
1492
- type: m,
1493
- url: l.url,
1524
+ id: S,
1525
+ title: g,
1526
+ type: v,
1527
+ url: a.url,
1494
1528
  opacity: b,
1495
- paint: S,
1496
- legend: g,
1497
- popup: v
1529
+ paint: M,
1530
+ legend: m,
1531
+ popup: d
1498
1532
  };
1499
- T && (E.where = T), h.minZoom !== void 0 && (E.minZoom = h.minZoom), h.maxZoom !== void 0 && (E.maxZoom = h.maxZoom), s && (E.outlinePaint = s), t.push(E);
1533
+ $ && (E.where = $), y.minZoom !== void 0 && (E.minZoom = y.minZoom), y.maxZoom !== void 0 && (E.maxZoom = y.maxZoom), s && (E.outlinePaint = s), t.push(E);
1500
1534
  } catch {
1501
1535
  }
1502
- return t.sort((l, a) => l.title.localeCompare(a.title)), t;
1536
+ return t.sort((a, l) => a.title.localeCompare(l.title)), t;
1503
1537
  }
1504
- const bt = {}, lt = "376af635c84643cd816a8c5d017a53aa", Dn = lt;
1505
- function at(e, i) {
1538
+ const bt = {}, at = "376af635c84643cd816a8c5d017a53aa", Zn = at;
1539
+ function lt(e, n) {
1506
1540
  let t = `https://www.arcgis.com/sharing/rest/content/items/${e}/data?f=json`;
1507
- return i && (t += `&token=${i}`), t;
1541
+ return n && (t += `&token=${n}`), t;
1508
1542
  }
1509
- function Zn() {
1510
- return at(lt);
1543
+ function Bn() {
1544
+ return lt(at);
1511
1545
  }
1512
- const Ne = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map();
1513
- function Jo(e) {
1514
- e ? (Ne.delete(e), Ee.delete(e)) : (Ne.clear(), Ee.clear());
1546
+ const Ae = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map();
1547
+ function Qo(e) {
1548
+ e ? (Ae.delete(e), _e.delete(e)) : (Ae.clear(), _e.clear());
1515
1549
  }
1516
- let Ze, wt = 0;
1517
- async function Qo() {
1518
- const e = typeof import.meta < "u" && bt?.VITE_AGO_USERNAME, i = typeof import.meta < "u" && bt?.VITE_AGO_PASSWORD;
1519
- if (!(!e || !i)) {
1520
- if (Ze && Date.now() < wt - 3e5)
1521
- return Ze;
1550
+ let Be, wt = 0;
1551
+ async function Ko() {
1552
+ const e = typeof import.meta < "u" && bt?.VITE_AGO_USERNAME, n = typeof import.meta < "u" && bt?.VITE_AGO_PASSWORD;
1553
+ if (!(!e || !n)) {
1554
+ if (Be && Date.now() < wt - 3e5)
1555
+ return Be;
1522
1556
  try {
1523
1557
  const o = await (await fetch("https://www.arcgis.com/sharing/rest/generateToken", {
1524
1558
  method: "POST",
@@ -1528,183 +1562,183 @@ async function Qo() {
1528
1562
  body: new URLSearchParams({
1529
1563
  f: "json",
1530
1564
  username: e,
1531
- password: i,
1565
+ password: n,
1532
1566
  referer: window.location.origin || "https://localhost",
1533
1567
  expiration: "120"
1534
1568
  // 2 hours
1535
1569
  })
1536
1570
  })).json();
1537
- return o.error ? void 0 : (Ze = o.token, wt = o.expires, Ze);
1571
+ return o.error ? void 0 : (Be = o.token, wt = o.expires, Be);
1538
1572
  } catch {
1539
1573
  return;
1540
1574
  }
1541
1575
  }
1542
1576
  }
1543
- async function Ko(e, i) {
1544
- const t = at(e, i), o = await fetch(t);
1577
+ async function Xo(e, n) {
1578
+ const t = lt(e, n), o = await fetch(t);
1545
1579
  if (!o.ok)
1546
1580
  throw new Error(`Failed to fetch WebMap: ${o.status} ${o.statusText}`);
1547
- const l = await o.json();
1548
- if (l.error)
1549
- throw new Error(`ArcGIS error: ${l.error.message || l.error.code || "Unknown error"}`);
1550
- return l;
1581
+ const a = await o.json();
1582
+ if (a.error)
1583
+ throw new Error(`ArcGIS error: ${a.error.message || a.error.code || "Unknown error"}`);
1584
+ return a;
1551
1585
  }
1552
- async function Xo(e) {
1586
+ async function Yo(e) {
1553
1587
  try {
1554
- const i = await Qo(), t = await Ko(e, i);
1588
+ const n = await Ko(), t = await Xo(e, n);
1555
1589
  return await kt(t);
1556
- } catch (i) {
1557
- throw new Error(`Failed to load dynamic layer configs: ${i instanceof Error ? i.message : "Unknown error"}`);
1590
+ } catch (n) {
1591
+ throw new Error(`Failed to load dynamic layer configs: ${n instanceof Error ? n.message : "Unknown error"}`);
1558
1592
  }
1559
1593
  }
1560
- async function it(e = lt) {
1561
- const i = Ne.get(e);
1562
- if (i)
1563
- return i;
1564
- const t = Ee.get(e);
1594
+ async function it(e = at) {
1595
+ const n = Ae.get(e);
1596
+ if (n)
1597
+ return n;
1598
+ const t = _e.get(e);
1565
1599
  if (t)
1566
1600
  return t;
1567
1601
  const o = (async () => {
1568
1602
  try {
1569
- const l = await Xo(e);
1570
- return Ne.set(e, l), l;
1603
+ const a = await Yo(e);
1604
+ return Ae.set(e, a), a;
1571
1605
  } finally {
1572
- Ee.delete(e);
1606
+ _e.delete(e);
1573
1607
  }
1574
1608
  })();
1575
- return Ee.set(e, o), o;
1609
+ return _e.set(e, o), o;
1576
1610
  }
1577
- function Yo(e) {
1578
- const i = k({}), t = /* @__PURE__ */ new Map();
1611
+ function en(e) {
1612
+ const n = C({}), t = /* @__PURE__ */ new Map();
1579
1613
  for (const s of e)
1580
- i.value[s.id] = {
1614
+ n.value[s.id] = {
1581
1615
  data: null,
1582
1616
  loading: !1,
1583
1617
  error: null,
1584
1618
  lastFetched: null
1585
1619
  };
1586
1620
  async function o(s) {
1587
- const v = s.id;
1588
- i.value = {
1589
- ...i.value,
1590
- [v]: {
1591
- data: i.value[v]?.data ?? null,
1592
- lastFetched: i.value[v]?.lastFetched ?? null,
1621
+ const d = s.id;
1622
+ n.value = {
1623
+ ...n.value,
1624
+ [d]: {
1625
+ data: n.value[d]?.data ?? null,
1626
+ lastFetched: n.value[d]?.lastFetched ?? null,
1593
1627
  loading: !0,
1594
1628
  error: null
1595
1629
  }
1596
1630
  };
1597
1631
  try {
1598
- let T;
1632
+ let $;
1599
1633
  if (s.type === "http-get") {
1600
- const h = await fetch(s.url, {
1634
+ const y = await fetch(s.url, {
1601
1635
  method: "GET",
1602
1636
  ...s.options
1603
1637
  });
1604
- if (!h.ok)
1605
- throw new Error(`HTTP ${h.status}: ${h.statusText}`);
1606
- T = await h.json();
1638
+ if (!y.ok)
1639
+ throw new Error(`HTTP ${y.status}: ${y.statusText}`);
1640
+ $ = await y.json();
1607
1641
  } else if (s.type === "http-post") {
1608
- const h = await fetch(s.url, {
1642
+ const y = await fetch(s.url, {
1609
1643
  method: "POST",
1610
1644
  ...s.options
1611
1645
  });
1612
- if (!h.ok)
1613
- throw new Error(`HTTP ${h.status}: ${h.statusText}`);
1614
- T = await h.json();
1615
- } else if (s.type === "esri") {
1616
- const C = `${s.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, y = await fetch(C, s.options);
1617
1646
  if (!y.ok)
1618
1647
  throw new Error(`HTTP ${y.status}: ${y.statusText}`);
1619
- T = (await y.json()).features?.map((E) => E.attributes) || [];
1648
+ $ = await y.json();
1649
+ } else if (s.type === "esri") {
1650
+ const S = `${s.url.replace(/\/$/, "")}/query?where=1%3D1&outFields=*&returnGeometry=false&f=json`, g = await fetch(S, s.options);
1651
+ if (!g.ok)
1652
+ throw new Error(`HTTP ${g.status}: ${g.statusText}`);
1653
+ $ = (await g.json()).features?.map((E) => E.attributes) || [];
1620
1654
  } else
1621
1655
  throw new Error(`Unknown data source type: ${s.type}`);
1622
- s.transform && (T = s.transform(T)), i.value = {
1623
- ...i.value,
1624
- [v]: {
1625
- data: T,
1656
+ s.transform && ($ = s.transform($)), n.value = {
1657
+ ...n.value,
1658
+ [d]: {
1659
+ data: $,
1626
1660
  loading: !1,
1627
1661
  error: null,
1628
1662
  lastFetched: Date.now()
1629
1663
  }
1630
1664
  };
1631
- } catch (T) {
1632
- const h = T instanceof Error ? T.message : "Unknown error";
1633
- i.value = {
1634
- ...i.value,
1635
- [v]: {
1636
- data: i.value[v]?.data ?? null,
1637
- lastFetched: i.value[v]?.lastFetched ?? null,
1665
+ } catch ($) {
1666
+ const y = $ instanceof Error ? $.message : "Unknown error";
1667
+ n.value = {
1668
+ ...n.value,
1669
+ [d]: {
1670
+ data: n.value[d]?.data ?? null,
1671
+ lastFetched: n.value[d]?.lastFetched ?? null,
1638
1672
  loading: !1,
1639
- error: h
1673
+ error: y
1640
1674
  }
1641
1675
  };
1642
1676
  }
1643
1677
  }
1644
- async function l() {
1678
+ async function a() {
1645
1679
  await Promise.all(e.map((s) => o(s)));
1646
1680
  }
1647
- async function a(s) {
1648
- const v = e.find((T) => T.id === s);
1649
- v && await o(v);
1681
+ async function l(s) {
1682
+ const d = e.find(($) => $.id === s);
1683
+ d && await o(d);
1650
1684
  }
1651
1685
  function c(s) {
1652
- return i.value[s]?.data ?? null;
1686
+ return n.value[s]?.data ?? null;
1653
1687
  }
1654
- const f = R(() => Object.values(i.value).some((s) => s.loading));
1655
- function p(s) {
1656
- return i.value[s]?.loading ?? !1;
1688
+ const h = I(() => Object.values(n.value).some((s) => s.loading));
1689
+ function f(s) {
1690
+ return n.value[s]?.loading ?? !1;
1657
1691
  }
1658
- function S(s) {
1659
- return i.value[s]?.error ?? null;
1692
+ function M(s) {
1693
+ return n.value[s]?.error ?? null;
1660
1694
  }
1661
- function g() {
1695
+ function m() {
1662
1696
  for (const s of e)
1663
1697
  if (s.pollInterval && s.pollInterval > 0) {
1664
- const v = window.setInterval(() => {
1698
+ const d = window.setInterval(() => {
1665
1699
  o(s);
1666
1700
  }, s.pollInterval);
1667
- t.set(s.id, v);
1701
+ t.set(s.id, d);
1668
1702
  }
1669
1703
  }
1670
- function m() {
1704
+ function v() {
1671
1705
  for (const [, s] of t)
1672
1706
  window.clearInterval(s);
1673
1707
  t.clear();
1674
1708
  }
1675
- return Ae(() => {
1676
- l(), g();
1709
+ return Ve(() => {
1710
+ a(), m();
1677
1711
  }), Lt(() => {
1678
- m();
1712
+ v();
1679
1713
  }), {
1680
1714
  /** Reactive state for all data sources */
1681
- state: W(i),
1715
+ state: W(n),
1682
1716
  /** Whether any data source is currently loading */
1683
- isLoading: f,
1717
+ isLoading: h,
1684
1718
  /** Fetch all data sources */
1685
- fetchAll: l,
1719
+ fetchAll: a,
1686
1720
  /** Refetch a specific data source by id */
1687
- refetch: a,
1721
+ refetch: l,
1688
1722
  /** Get data for a specific source */
1689
1723
  getData: c,
1690
1724
  /** Check if a specific source is loading */
1691
- isSourceLoading: p,
1725
+ isSourceLoading: f,
1692
1726
  /** Get error for a specific source */
1693
- getError: S,
1727
+ getError: M,
1694
1728
  /** Stop all polling (useful for cleanup) */
1695
- stopPolling: m
1729
+ stopPolling: v
1696
1730
  };
1697
1731
  }
1698
- const en = { class: "layerboard-layout" }, tn = {
1732
+ const tn = { class: "layerboard-layout" }, on = {
1699
1733
  key: 0,
1700
1734
  class: "layerboard-subtitle"
1701
- }, on = { class: "layerboard-mobile-menu-content" }, nn = { class: "layerboard-main" }, ln = {
1735
+ }, nn = { class: "layerboard-mobile-menu-content" }, an = { class: "layerboard-main" }, ln = {
1702
1736
  key: 0,
1703
1737
  class: "layerboard-loading"
1704
- }, an = {
1738
+ }, rn = {
1705
1739
  key: 1,
1706
1740
  class: "layerboard-error"
1707
- }, rn = { key: 0 }, sn = { key: 1 }, cn = { class: "layerboard-modal" }, un = /* @__PURE__ */ we({
1741
+ }, sn = { key: 0 }, cn = { key: 1 }, un = { class: "layerboard-modal" }, dn = /* @__PURE__ */ we({
1708
1742
  __name: "Layerboard",
1709
1743
  props: {
1710
1744
  title: {},
@@ -1732,181 +1766,181 @@ const en = { class: "layerboard-layout" }, tn = {
1732
1766
  initialCenter: {}
1733
1767
  },
1734
1768
  emits: ["configs-loaded", "load-error", "zoom"],
1735
- setup(e, { expose: i, emit: t }) {
1736
- const o = e, l = t, a = k([]), c = k(!0), f = k(null), p = k(12), S = k(""), g = k(/* @__PURE__ */ new Set()), m = k({}), s = k(/* @__PURE__ */ new Set()), v = k({}), T = k({}), h = k(/* @__PURE__ */ new Set()), C = k({});
1737
- function y() {
1769
+ setup(e, { expose: n, emit: t }) {
1770
+ const o = e, a = t, l = C([]), c = C(!0), h = C(null), f = C(12), M = C(""), m = C(/* @__PURE__ */ new Set()), v = C({}), s = C(/* @__PURE__ */ new Set()), d = C({}), $ = C({}), y = C(/* @__PURE__ */ new Set()), S = C({});
1771
+ function g() {
1738
1772
  const L = {};
1739
- for (const M of o.tiledLayers)
1740
- L[M.id] = M.opacity ?? 1;
1741
- C.value = L;
1773
+ for (const F of o.tiledLayers)
1774
+ L[F.id] = F.opacity ?? 1;
1775
+ S.value = L;
1742
1776
  }
1743
1777
  function b(L) {
1744
- h.value.has(L) ? h.value.delete(L) : h.value.add(L), h.value = new Set(h.value);
1778
+ y.value.has(L) ? y.value.delete(L) : y.value.add(L), y.value = new Set(y.value);
1745
1779
  }
1746
- function E(L, M) {
1747
- M ? h.value.add(L) : h.value.delete(L), h.value = new Set(h.value);
1780
+ function E(L, F) {
1781
+ F ? y.value.add(L) : y.value.delete(L), y.value = new Set(y.value);
1748
1782
  }
1749
- function z(L, M) {
1750
- C.value = { ...C.value, [L]: M };
1783
+ function T(L, F) {
1784
+ S.value = { ...S.value, [L]: F };
1751
1785
  }
1752
- const B = o.dataSources.length > 0 ? Yo(o.dataSources) : null, q = R(() => B?.state.value ?? {}), ce = R(() => B?.isLoading.value ?? !1);
1786
+ const B = o.dataSources.length > 0 ? en(o.dataSources) : null, q = I(() => B?.state.value ?? {}), ce = I(() => B?.isLoading.value ?? !1);
1753
1787
  function Le(L) {
1754
1788
  return B?.getData(L) ?? null;
1755
1789
  }
1756
1790
  function Se(L) {
1757
1791
  return B?.refetch(L) ?? Promise.resolve();
1758
1792
  }
1759
- U("layerboard-layers", W(a)), U("layerboard-visible", g), U("layerboard-opacities", m), U("layerboard-loading", W(s)), U("layerboard-errors", W(v)), U("layerboard-zoom", W(p)), U("layerboard-toggle-layer", Ce), U("layerboard-set-layer-visible", de), U("layerboard-set-layers-visible", ke), U("layerboard-set-opacity", fe), U("layerboard-tiled-layers", W(R(() => o.tiledLayers))), U("layerboard-visible-tiled", h), U("layerboard-tiled-opacities", C), U("layerboard-toggle-tiled", b), U("layerboard-set-tiled-opacity", z), U("layerboard-set-tiled-visible", E), U("layerboard-data-sources-state", q), U("layerboard-data-sources-loading", ce), U("layerboard-get-data-source", Le), U("layerboard-refetch-data-source", Se);
1760
- const We = R(() => ({
1793
+ U("layerboard-layers", W(l)), U("layerboard-visible", m), U("layerboard-opacities", v), U("layerboard-loading", W(s)), U("layerboard-errors", W(d)), U("layerboard-zoom", W(f)), U("layerboard-toggle-layer", Ce), U("layerboard-set-layer-visible", fe), U("layerboard-set-layers-visible", ke), U("layerboard-set-opacity", pe), U("layerboard-tiled-layers", W(I(() => o.tiledLayers))), U("layerboard-visible-tiled", y), U("layerboard-tiled-opacities", S), U("layerboard-toggle-tiled", b), U("layerboard-set-tiled-opacity", T), U("layerboard-set-tiled-visible", E), U("layerboard-data-sources-state", q), U("layerboard-data-sources-loading", ce), U("layerboard-get-data-source", Le), U("layerboard-refetch-data-source", Se);
1794
+ const We = I(() => ({
1761
1795
  backgroundColor: o.themeColor
1762
- })), je = R(() => ({
1796
+ })), je = I(() => ({
1763
1797
  backgroundColor: o.themeColor
1764
- })), Te = R(() => ({
1798
+ })), ze = I(() => ({
1765
1799
  backgroundColor: o.themeColor
1766
- })), Oe = R(() => ({
1767
- width: ye.value ? "0" : o.sidebarWidth
1800
+ })), Ie = I(() => ({
1801
+ width: ge.value ? "0" : o.sidebarWidth
1768
1802
  }));
1769
- async function ze() {
1803
+ async function Te() {
1770
1804
  try {
1771
- c.value = !0, f.value = null;
1772
- const M = (await it(o.webMapId)).map((N) => {
1773
- const Q = o.layerStyleOverrides[N.id];
1805
+ c.value = !0, h.value = null;
1806
+ const F = (await it(o.webMapId)).map((A) => {
1807
+ const Q = o.layerStyleOverrides[A.id];
1774
1808
  return Q ? {
1775
- ...N,
1776
- paint: Q.paint ?? N.paint,
1777
- outlinePaint: Q.outlinePaint ?? N.outlinePaint,
1778
- legend: Q.legend ?? N.legend,
1779
- type: Q.type ?? N.type
1780
- } : N;
1809
+ ...A,
1810
+ paint: Q.paint ?? A.paint,
1811
+ outlinePaint: Q.outlinePaint ?? A.outlinePaint,
1812
+ legend: Q.legend ?? A.legend,
1813
+ type: Q.type ?? A.type
1814
+ } : A;
1781
1815
  });
1782
- a.value = M.map((N) => ({
1783
- config: N,
1784
- component: N.type
1816
+ l.value = F.map((A) => ({
1817
+ config: A,
1818
+ component: A.type
1785
1819
  }));
1786
- const ae = {};
1787
- M.forEach((N) => {
1788
- ae[N.id] = N.opacity ?? 1;
1789
- }), m.value = ae, l("configs-loaded", M);
1820
+ const re = {};
1821
+ F.forEach((A) => {
1822
+ re[A.id] = A.opacity ?? 1;
1823
+ }), v.value = re, a("configs-loaded", F);
1790
1824
  } catch (L) {
1791
- const M = L instanceof Error ? L.message : "Failed to load layer configurations";
1792
- f.value = M, l("load-error", M);
1825
+ const F = L instanceof Error ? L.message : "Failed to load layer configurations";
1826
+ h.value = F, a("load-error", F);
1793
1827
  } finally {
1794
1828
  c.value = !1;
1795
1829
  }
1796
1830
  }
1797
- function Ie(L) {
1798
- let M = L.split("?")[0] || L;
1799
- return M = M.replace(/\/query$/, ""), M = M.replace(/\/$/, ""), M.toLowerCase();
1831
+ function Re(L) {
1832
+ let F = L.split("?")[0] || L;
1833
+ return F = F.replace(/\/query$/, ""), F = F.replace(/\/$/, ""), F.toLowerCase();
1800
1834
  }
1801
1835
  async function qe() {
1802
1836
  if (o.fetchMetadata)
1803
1837
  try {
1804
1838
  const L = "https://phl.carto.com/api/v2/sql?q=" + encodeURIComponent(
1805
1839
  "select url_text, COALESCE(representation, '') as representation from phl.knack_metadata_reps_endpoints_join WHERE ( format = 'API' OR format = 'GeoService' ) AND url_text IS NOT null"
1806
- ), M = await fetch(L);
1807
- if (!M.ok) return;
1808
- const ae = await M.json(), N = {};
1809
- for (const Q of ae.rows || [])
1840
+ ), F = await fetch(L);
1841
+ if (!F.ok) return;
1842
+ const re = await F.json(), A = {};
1843
+ for (const Q of re.rows || [])
1810
1844
  if (Q.url_text && Q.representation) {
1811
- const Qe = Ie(Q.url_text), Ke = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
1812
- N[Qe] = Ke;
1845
+ const Qe = Re(Q.url_text), Ke = `https://metadata.phila.gov/#home/representationdetails/${Q.representation}/`;
1846
+ A[Qe] = Ke;
1813
1847
  }
1814
- T.value = N;
1848
+ $.value = A;
1815
1849
  } catch {
1816
1850
  }
1817
1851
  }
1818
1852
  function Ge(L) {
1819
- p.value = L, l("zoom", L);
1853
+ f.value = L, a("zoom", L);
1820
1854
  }
1821
1855
  function Ce(L) {
1822
- g.value.has(L) ? g.value.delete(L) : g.value.add(L), g.value = new Set(g.value);
1856
+ m.value.has(L) ? m.value.delete(L) : m.value.add(L), m.value = new Set(m.value);
1823
1857
  }
1824
- function de(L, M) {
1825
- M ? g.value.add(L) : g.value.delete(L), g.value = new Set(g.value);
1858
+ function fe(L, F) {
1859
+ F ? m.value.add(L) : m.value.delete(L), m.value = new Set(m.value);
1826
1860
  }
1827
- function ke(L, M) {
1828
- for (const ae of L)
1829
- M ? g.value.add(ae) : g.value.delete(ae);
1830
- g.value = new Set(g.value);
1861
+ function ke(L, F) {
1862
+ for (const re of L)
1863
+ F ? m.value.add(re) : m.value.delete(re);
1864
+ m.value = new Set(m.value);
1831
1865
  }
1832
- function fe(L, M) {
1833
- m.value = { ...m.value, [L]: M };
1866
+ function pe(L, F) {
1867
+ v.value = { ...v.value, [L]: F };
1834
1868
  }
1835
- function He(L, M) {
1836
- M ? s.value.add(L) : s.value.delete(L), s.value = new Set(s.value);
1869
+ function He(L, F) {
1870
+ F ? s.value.add(L) : s.value.delete(L), s.value = new Set(s.value);
1837
1871
  }
1838
- function oe(L, M) {
1839
- if (M)
1840
- v.value = { ...v.value, [L]: M };
1872
+ function oe(L, F) {
1873
+ if (F)
1874
+ d.value = { ...d.value, [L]: F };
1841
1875
  else {
1842
- const { [L]: ae, ...N } = v.value;
1843
- v.value = N;
1876
+ const { [L]: re, ...A } = d.value;
1877
+ d.value = A;
1844
1878
  }
1845
1879
  }
1846
- function pe(L) {
1847
- S.value = L;
1880
+ function ye(L) {
1881
+ M.value = L;
1848
1882
  }
1849
- const J = k("map");
1883
+ const J = C("map");
1850
1884
  function $e() {
1851
1885
  J.value = J.value === "sidebar" ? "map" : "sidebar";
1852
1886
  }
1853
- const ve = k(!1);
1887
+ const ve = C(!1);
1854
1888
  function Je() {
1855
1889
  ve.value = !ve.value;
1856
1890
  }
1857
- function Re() {
1891
+ function De() {
1858
1892
  ve.value = !1;
1859
1893
  }
1860
- const ye = k(!1);
1894
+ const ge = C(!1);
1861
1895
  function xe() {
1862
- ye.value = !ye.value;
1896
+ ge.value = !ge.value;
1863
1897
  }
1864
- const te = k(!1);
1898
+ const te = C(!1);
1865
1899
  function be() {
1866
1900
  te.value = !0;
1867
1901
  }
1868
1902
  function le() {
1869
1903
  te.value = !1;
1870
1904
  }
1871
- function De(L) {
1905
+ function Ze(L) {
1872
1906
  L.target.classList.contains("layerboard-modal-backdrop") && le();
1873
1907
  }
1874
- return U("layerboard-open-modal", be), U("layerboard-close-modal", le), U("layerboard-is-modal-open", W(te)), i({
1908
+ return U("layerboard-open-modal", be), U("layerboard-close-modal", le), U("layerboard-is-modal-open", W(te)), n({
1875
1909
  /** Layer configurations */
1876
- layerList: a,
1910
+ layerList: l,
1877
1911
  /** Set of visible layer IDs */
1878
- visibleLayers: g,
1912
+ visibleLayers: m,
1879
1913
  /** Layer opacity values */
1880
- layerOpacities: m,
1914
+ layerOpacities: v,
1881
1915
  /** Set of currently loading layer IDs */
1882
1916
  loadingLayers: s,
1883
1917
  /** Map of layer errors by ID */
1884
- layerErrors: v,
1918
+ layerErrors: d,
1885
1919
  /** Current map zoom level */
1886
- currentZoom: p,
1920
+ currentZoom: f,
1887
1921
  /** Toggle a layer's visibility */
1888
1922
  toggleLayer: Ce,
1889
1923
  /** Set a layer's visibility explicitly */
1890
- setLayerVisible: de,
1924
+ setLayerVisible: fe,
1891
1925
  /** Set multiple layers' visibility at once */
1892
1926
  setLayersVisible: ke,
1893
1927
  /** Set a layer's opacity */
1894
- setLayerOpacity: fe,
1928
+ setLayerOpacity: pe,
1895
1929
  /** Reload layer configurations */
1896
- reloadConfigs: ze,
1930
+ reloadConfigs: Te,
1897
1931
  /** Clear configuration cache */
1898
- clearCache: () => Jo(o.webMapId),
1932
+ clearCache: () => Qo(o.webMapId),
1899
1933
  // Tiled layer APIs
1900
1934
  /** Set of visible tiled layer IDs */
1901
- visibleTiledLayers: h,
1935
+ visibleTiledLayers: y,
1902
1936
  /** Tiled layer opacity values */
1903
- tiledLayerOpacities: C,
1937
+ tiledLayerOpacities: S,
1904
1938
  /** Toggle a tiled layer's visibility */
1905
1939
  toggleTiledLayer: b,
1906
1940
  /** Set a tiled layer's visibility explicitly */
1907
1941
  setTiledLayerVisible: E,
1908
1942
  /** Set a tiled layer's opacity */
1909
- setTiledLayerOpacity: z,
1943
+ setTiledLayerOpacity: T,
1910
1944
  // Data source APIs
1911
1945
  /** State of all data sources */
1912
1946
  dataSourcesState: q,
@@ -1923,14 +1957,14 @@ const en = { class: "layerboard-layout" }, tn = {
1923
1957
  openModal: be,
1924
1958
  /** Close the modal */
1925
1959
  closeModal: le
1926
- }), Ae(() => {
1927
- ze(), qe(), y();
1928
- }), (L, M) => (d(), w("div", en, [
1960
+ }), Ve(() => {
1961
+ Te(), qe(), g();
1962
+ }), (L, F) => (p(), w("div", tn, [
1929
1963
  P("header", {
1930
1964
  class: "layerboard-header",
1931
- style: Y(We.value)
1965
+ style: ee(We.value)
1932
1966
  }, [
1933
- M[1] || (M[1] = P("a", {
1967
+ F[1] || (F[1] = P("a", {
1934
1968
  href: "https://www.phila.gov/",
1935
1969
  class: "layerboard-logo layerboard-desktop-only"
1936
1970
  }, [
@@ -1939,122 +1973,122 @@ const en = { class: "layerboard-layout" }, tn = {
1939
1973
  alt: "City of Philadelphia"
1940
1974
  })
1941
1975
  ], -1)),
1942
- M[2] || (M[2] = P("span", { class: "layerboard-header-divider layerboard-desktop-only" }, null, -1)),
1976
+ F[2] || (F[2] = P("span", { class: "layerboard-header-divider layerboard-desktop-only" }, null, -1)),
1943
1977
  P("button", {
1944
1978
  class: "layerboard-hamburger layerboard-mobile-only",
1945
1979
  onClick: Je,
1946
1980
  "aria-label": "Toggle menu"
1947
1981
  }, [
1948
- ee(_(he), {
1949
- "icon-definition": _(ho),
1982
+ K(_(ue), {
1983
+ "icon-definition": _(mo),
1950
1984
  size: "medium",
1951
1985
  decorative: ""
1952
1986
  }, null, 8, ["icon-definition"])
1953
1987
  ]),
1954
- se(L.$slots, "header", {}, () => [
1988
+ ae(L.$slots, "header", {}, () => [
1955
1989
  P("h1", null, j(e.title), 1),
1956
- e.subtitle ? (d(), w("span", tn, j(e.subtitle), 1)) : O("", !0)
1990
+ e.subtitle ? (p(), w("span", on, j(e.subtitle), 1)) : O("", !0)
1957
1991
  ], !0),
1958
- ve.value ? (d(), w("div", {
1992
+ ve.value ? (p(), w("div", {
1959
1993
  key: 0,
1960
1994
  class: "layerboard-mobile-menu",
1961
- style: Y({ backgroundColor: e.themeColor })
1995
+ style: ee({ backgroundColor: e.themeColor })
1962
1996
  }, [
1963
- P("div", on, [
1964
- se(L.$slots, "footer", {
1997
+ P("div", nn, [
1998
+ ae(L.$slots, "footer", {
1965
1999
  openModal: be,
1966
2000
  closeModal: le,
1967
2001
  isModalOpen: te.value
1968
2002
  }, () => [
1969
- M[0] || (M[0] = me(" City of Philadelphia ", -1))
2003
+ F[0] || (F[0] = me(" City of Philadelphia ", -1))
1970
2004
  ], !0)
1971
2005
  ]),
1972
2006
  P("button", {
1973
2007
  class: "layerboard-mobile-menu-close",
1974
- onClick: Re,
2008
+ onClick: De,
1975
2009
  "aria-label": "Close menu"
1976
2010
  }, [
1977
- ee(_(he), {
2011
+ K(_(ue), {
1978
2012
  "icon-definition": _(mt),
1979
2013
  size: "medium",
1980
2014
  decorative: ""
1981
2015
  }, null, 8, ["icon-definition"])
1982
2016
  ])
1983
2017
  ], 4)) : O("", !0),
1984
- ve.value ? (d(), w("div", {
2018
+ ve.value ? (p(), w("div", {
1985
2019
  key: 1,
1986
2020
  class: "layerboard-mobile-menu-backdrop",
1987
- onClick: Re
2021
+ onClick: De
1988
2022
  })) : O("", !0)
1989
2023
  ], 4),
1990
- P("div", nn, [
1991
- c.value ? (d(), w("div", ln, [
2024
+ P("div", an, [
2025
+ c.value ? (p(), w("div", ln, [
1992
2026
  P("div", {
1993
2027
  class: "layerboard-spinner",
1994
- style: Y({ borderTopColor: e.themeColor })
2028
+ style: ee({ borderTopColor: e.themeColor })
1995
2029
  }, null, 4),
1996
2030
  P("p", null, "Loading " + j(e.title) + "...", 1)
1997
- ])) : f.value ? (d(), w("div", an, [
1998
- M[3] || (M[3] = P("h2", null, "Error Loading Layers", -1)),
1999
- P("p", null, j(f.value), 1),
2031
+ ])) : h.value ? (p(), w("div", rn, [
2032
+ F[3] || (F[3] = P("h2", null, "Error Loading Layers", -1)),
2033
+ P("p", null, j(h.value), 1),
2000
2034
  P("button", {
2001
2035
  class: "layerboard-retry-button",
2002
- style: Y({ backgroundColor: e.themeColor }),
2003
- onClick: ze
2036
+ style: ee({ backgroundColor: e.themeColor }),
2037
+ onClick: Te
2004
2038
  }, " Retry ", 4)
2005
- ])) : (d(), w(ie, { key: 2 }, [
2039
+ ])) : (p(), w(ie, { key: 2 }, [
2006
2040
  P("aside", {
2007
2041
  class: ne(["layerboard-sidebar", { "is-active": J.value === "sidebar" }]),
2008
- style: Y(Oe.value)
2042
+ style: ee(Ie.value)
2009
2043
  }, [
2010
- se(L.$slots, "sidebar", {
2011
- layers: a.value,
2012
- visibleLayers: g.value,
2013
- layerOpacities: m.value,
2044
+ ae(L.$slots, "sidebar", {
2045
+ layers: l.value,
2046
+ visibleLayers: m.value,
2047
+ layerOpacities: v.value,
2014
2048
  loadingLayers: s.value,
2015
- layerErrors: v.value,
2016
- currentZoom: p.value,
2049
+ layerErrors: d.value,
2050
+ currentZoom: f.value,
2017
2051
  toggleLayer: Ce,
2018
- setLayerVisible: de,
2052
+ setLayerVisible: fe,
2019
2053
  setLayersVisible: ke,
2020
- setOpacity: fe,
2054
+ setOpacity: pe,
2021
2055
  tiledLayers: e.tiledLayers,
2022
- visibleTiledLayers: h.value,
2023
- tiledLayerOpacities: C.value,
2056
+ visibleTiledLayers: y.value,
2057
+ tiledLayerOpacities: S.value,
2024
2058
  toggleTiledLayer: b,
2025
2059
  setTiledLayerVisible: E,
2026
- setTiledLayerOpacity: z,
2060
+ setTiledLayerOpacity: T,
2027
2061
  dataSourcesState: q.value,
2028
2062
  dataSourcesLoading: ce.value,
2029
2063
  getDataSource: Le,
2030
2064
  refetchDataSource: Se
2031
2065
  }, () => [
2032
- e.showDefaultSidebar ? (d(), X(Ro, {
2066
+ e.showDefaultSidebar ? (p(), Y(Do, {
2033
2067
  key: 0,
2034
- "layer-list": a.value,
2035
- "visible-layers": g.value,
2036
- "layer-opacities": m.value,
2068
+ "layer-list": l.value,
2069
+ "visible-layers": m.value,
2070
+ "layer-opacities": v.value,
2037
2071
  "loading-layers": s.value,
2038
- "layer-errors": v.value,
2039
- "current-zoom": p.value,
2040
- "search-query": S.value,
2041
- "layer-metadata": T.value,
2072
+ "layer-errors": d.value,
2073
+ "current-zoom": f.value,
2074
+ "search-query": M.value,
2075
+ "layer-metadata": $.value,
2042
2076
  onToggleLayer: Ce,
2043
- onSetOpacity: fe,
2044
- onUpdateSearch: pe
2077
+ onSetOpacity: pe,
2078
+ onUpdateSearch: ye
2045
2079
  }, null, 8, ["layer-list", "visible-layers", "layer-opacities", "loading-layers", "layer-errors", "current-zoom", "search-query", "layer-metadata"])) : O("", !0)
2046
2080
  ], !0)
2047
2081
  ], 6),
2048
2082
  P("div", {
2049
2083
  class: ne(["layerboard-map", { "is-active": J.value === "map" }])
2050
2084
  }, [
2051
- ee(Xt, {
2052
- "visible-layers": g.value,
2053
- "layer-opacities": m.value,
2054
- "layer-list": a.value,
2085
+ K(Xt, {
2086
+ "visible-layers": m.value,
2087
+ "layer-opacities": v.value,
2088
+ "layer-list": l.value,
2055
2089
  "tiled-layers": e.tiledLayers,
2056
- "visible-tiled-layers": h.value,
2057
- "tiled-layer-opacities": C.value,
2090
+ "visible-tiled-layers": y.value,
2091
+ "tiled-layer-opacities": S.value,
2058
2092
  "cyclomedia-config": e.cyclomediaConfig,
2059
2093
  "pictometry-credentials": e.pictometryCredentials,
2060
2094
  "basemap-control-position": e.basemapControlPosition,
@@ -2072,13 +2106,13 @@ const en = { class: "layerboard-layout" }, tn = {
2072
2106
  }, null, 8, ["visible-layers", "layer-opacities", "layer-list", "tiled-layers", "visible-tiled-layers", "tiled-layer-opacities", "cyclomedia-config", "pictometry-credentials", "basemap-control-position", "navigation-control-position", "geolocation-control-position", "search-control-position", "draw-control-position", "cyclomedia-button-position", "pictometry-button-position", "initial-zoom", "initial-center"])
2073
2107
  ], 2),
2074
2108
  P("button", {
2075
- class: ne(["layerboard-sidebar-toggle", { "is-collapsed": ye.value }]),
2076
- style: Y({ left: ye.value ? "0" : o.sidebarWidth }),
2109
+ class: ne(["layerboard-sidebar-toggle", { "is-collapsed": ge.value }]),
2110
+ style: ee({ left: ge.value ? "0" : o.sidebarWidth }),
2077
2111
  onClick: xe,
2078
2112
  "aria-label": "Toggle sidebar"
2079
2113
  }, [
2080
- ee(_(he), {
2081
- "icon-definition": ye.value ? _(yo) : _(go),
2114
+ K(_(ue), {
2115
+ "icon-definition": ge.value ? _(go) : _(ho),
2082
2116
  size: "medium",
2083
2117
  decorative: ""
2084
2118
  }, null, 8, ["icon-definition"])
@@ -2087,49 +2121,49 @@ const en = { class: "layerboard-layout" }, tn = {
2087
2121
  ]),
2088
2122
  P("button", {
2089
2123
  class: "layerboard-mobile-toggle",
2090
- style: Y(Te.value),
2124
+ style: ee(ze.value),
2091
2125
  onClick: $e
2092
2126
  }, [
2093
- J.value === "map" ? (d(), w("span", rn, j(e.sidebarLabel), 1)) : (d(), w("span", sn, j(e.mapLabel), 1))
2127
+ J.value === "map" ? (p(), w("span", sn, j(e.sidebarLabel), 1)) : (p(), w("span", cn, j(e.mapLabel), 1))
2094
2128
  ], 4),
2095
2129
  P("footer", {
2096
2130
  class: "layerboard-footer",
2097
- style: Y(je.value)
2131
+ style: ee(je.value)
2098
2132
  }, [
2099
- se(L.$slots, "footer", {
2133
+ ae(L.$slots, "footer", {
2100
2134
  openModal: be,
2101
2135
  closeModal: le,
2102
2136
  isModalOpen: te.value
2103
2137
  }, () => [
2104
- M[4] || (M[4] = me(" City of Philadelphia ", -1))
2138
+ F[4] || (F[4] = me(" City of Philadelphia ", -1))
2105
2139
  ], !0)
2106
2140
  ], 4),
2107
- te.value ? (d(), w("div", {
2141
+ te.value ? (p(), w("div", {
2108
2142
  key: 0,
2109
2143
  class: "layerboard-modal-backdrop",
2110
- onClick: De
2144
+ onClick: Ze
2111
2145
  }, [
2112
- P("div", cn, [
2146
+ P("div", un, [
2113
2147
  P("button", {
2114
2148
  class: "layerboard-modal-close",
2115
2149
  onClick: le,
2116
2150
  "aria-label": "Close modal"
2117
2151
  }, [
2118
- ee(_(he), {
2152
+ K(_(ue), {
2119
2153
  "icon-definition": _(mt),
2120
2154
  size: "medium",
2121
2155
  decorative: ""
2122
2156
  }, null, 8, ["icon-definition"])
2123
2157
  ]),
2124
- se(L.$slots, "modal", { closeModal: le }, void 0, !0)
2158
+ ae(L.$slots, "modal", { closeModal: le }, void 0, !0)
2125
2159
  ])
2126
2160
  ])) : O("", !0)
2127
2161
  ]));
2128
2162
  }
2129
- }), Bn = /* @__PURE__ */ _e(un, [["__scopeId", "data-v-54d854f8"]]), dn = ["aria-expanded"], fn = {
2163
+ }), Vn = /* @__PURE__ */ Oe(dn, [["__scopeId", "data-v-dac16679"]]), fn = ["aria-expanded"], pn = {
2130
2164
  key: 0,
2131
2165
  class: "topic-icon"
2132
- }, pn = { class: "topic-title" }, yn = { class: "topic-content" }, gn = /* @__PURE__ */ we({
2166
+ }, yn = { class: "topic-title" }, gn = { class: "topic-content" }, hn = /* @__PURE__ */ we({
2133
2167
  __name: "TopicAccordion",
2134
2168
  props: {
2135
2169
  title: {},
@@ -2139,40 +2173,40 @@ const en = { class: "layerboard-layout" }, tn = {
2139
2173
  headerClass: {}
2140
2174
  },
2141
2175
  emits: ["toggle", "layerChange"],
2142
- setup(e, { emit: i }) {
2143
- const t = e, o = i, l = k(t.expanded);
2176
+ setup(e, { emit: n }) {
2177
+ const t = e, o = n, a = C(t.expanded);
2144
2178
  Pe(
2145
2179
  () => t.expanded,
2146
2180
  (c) => {
2147
- l.value = c;
2181
+ a.value = c;
2148
2182
  }
2149
2183
  );
2150
- function a() {
2151
- l.value = !l.value, o("toggle", l.value);
2184
+ function l() {
2185
+ a.value = !a.value, o("toggle", a.value);
2152
2186
  }
2153
- return (c, f) => {
2154
- const p = _t("font-awesome-icon");
2155
- return d(), w("div", {
2156
- class: ne(["topic-accordion", { "is-expanded": l.value }])
2187
+ return (c, h) => {
2188
+ const f = _t("font-awesome-icon");
2189
+ return p(), w("div", {
2190
+ class: ne(["topic-accordion", { "is-expanded": a.value }])
2157
2191
  }, [
2158
2192
  P("button", {
2159
2193
  class: ne(["topic-header", e.headerClass]),
2160
2194
  type: "button",
2161
- "aria-expanded": l.value,
2162
- onClick: a
2195
+ "aria-expanded": a.value,
2196
+ onClick: l
2163
2197
  }, [
2164
- e.icon || c.$slots.icon ? (d(), w("span", fn, [
2165
- se(c.$slots, "icon", {}, () => [
2166
- e.icon ? (d(), X(p, {
2198
+ e.icon || c.$slots.icon ? (p(), w("span", pn, [
2199
+ ae(c.$slots, "icon", {}, () => [
2200
+ e.icon ? (p(), Y(f, {
2167
2201
  key: 0,
2168
2202
  icon: ["fas", e.icon]
2169
2203
  }, null, 8, ["icon"])) : O("", !0)
2170
2204
  ], !0)
2171
2205
  ])) : O("", !0),
2172
- P("span", pn, j(e.title), 1),
2206
+ P("span", yn, j(e.title), 1),
2173
2207
  P("span", {
2174
- class: ne(["topic-chevron", { "is-rotated": l.value }])
2175
- }, [...f[0] || (f[0] = [
2208
+ class: ne(["topic-chevron", { "is-rotated": a.value }])
2209
+ }, [...h[0] || (h[0] = [
2176
2210
  P("svg", {
2177
2211
  xmlns: "http://www.w3.org/2000/svg",
2178
2212
  width: "20",
@@ -2187,39 +2221,39 @@ const en = { class: "layerboard-layout" }, tn = {
2187
2221
  P("polyline", { points: "6 9 12 15 18 9" })
2188
2222
  ], -1)
2189
2223
  ])], 2)
2190
- ], 10, dn),
2191
- St(P("div", yn, [
2192
- se(c.$slots, "default", {}, () => [
2193
- f[1] || (f[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
2224
+ ], 10, fn),
2225
+ St(P("div", gn, [
2226
+ ae(c.$slots, "default", {}, () => [
2227
+ h[1] || (h[1] = P("p", { class: "topic-empty" }, "No content provided for this topic.", -1))
2194
2228
  ], !0)
2195
2229
  ], 512), [
2196
- [Ot, l.value]
2230
+ [Ot, a.value]
2197
2231
  ])
2198
2232
  ], 2);
2199
2233
  };
2200
2234
  }
2201
- }), An = /* @__PURE__ */ _e(gn, [["__scopeId", "data-v-fb48c75b"]]), hn = { class: "layer-checkbox-set" }, mn = ["checked", "disabled", "onChange"], vn = { class: "layer-title" }, bn = {
2235
+ }), An = /* @__PURE__ */ Oe(hn, [["__scopeId", "data-v-fb48c75b"]]), mn = { class: "layer-checkbox-set" }, vn = ["checked", "disabled", "onChange"], bn = { class: "layer-title" }, wn = {
2202
2236
  key: 0,
2203
2237
  class: "loading-indicator"
2204
- }, wn = ["title"], Ln = {
2238
+ }, Ln = ["title"], Sn = {
2205
2239
  key: 2,
2206
2240
  class: "zoom-indicator"
2207
- }, Sn = { class: "layer-title" }, Cn = {
2241
+ }, Cn = { class: "layer-title" }, kn = {
2208
2242
  key: 0,
2209
2243
  class: "loading-indicator"
2210
- }, kn = ["title"], $n = {
2244
+ }, $n = ["title"], xn = {
2211
2245
  key: 2,
2212
2246
  class: "zoom-indicator"
2213
- }, xn = {
2247
+ }, Pn = {
2214
2248
  key: 2,
2215
2249
  class: "opacity-control"
2216
- }, Pn = { class: "opacity-label" }, Mn = ["value", "onInput"], Fn = {
2250
+ }, Mn = { class: "opacity-label" }, Fn = ["value", "onInput"], zn = {
2217
2251
  key: 3,
2218
2252
  class: "layer-legend"
2219
- }, Tn = { class: "legend-label" }, zn = {
2253
+ }, Tn = { class: "legend-label" }, En = {
2220
2254
  key: 0,
2221
2255
  class: "empty-state"
2222
- }, En = /* @__PURE__ */ we({
2256
+ }, _n = /* @__PURE__ */ we({
2223
2257
  __name: "LayerCheckboxSet",
2224
2258
  props: {
2225
2259
  layers: {},
@@ -2232,303 +2266,303 @@ const en = { class: "layerboard-layout" }, tn = {
2232
2266
  showLegend: { type: Boolean, default: !0 }
2233
2267
  },
2234
2268
  emits: ["toggleLayer", "setOpacity"],
2235
- setup(e, { emit: i }) {
2236
- const t = e, o = i;
2237
- function l(h) {
2238
- return t.visibleLayerIds.has(h);
2269
+ setup(e, { emit: n }) {
2270
+ const t = e, o = n;
2271
+ function a(y) {
2272
+ return t.visibleLayerIds.has(y);
2239
2273
  }
2240
- function a(h) {
2241
- return t.layerOpacities[h] ?? 1;
2274
+ function l(y) {
2275
+ return t.layerOpacities[y] ?? 1;
2242
2276
  }
2243
- function c(h) {
2244
- return t.loadingLayerIds.has(h);
2277
+ function c(y) {
2278
+ return t.loadingLayerIds.has(y);
2245
2279
  }
2246
- function f(h) {
2247
- return t.layerErrors[h] || null;
2280
+ function h(y) {
2281
+ return t.layerErrors[y] || null;
2248
2282
  }
2249
- function p(h) {
2250
- const C = t.currentZoom, y = h.minZoom, b = h.maxZoom;
2251
- return !(y !== void 0 && C < y || b !== void 0 && C > b);
2283
+ function f(y) {
2284
+ const S = t.currentZoom, g = y.minZoom, b = y.maxZoom;
2285
+ return !(g !== void 0 && S < g || b !== void 0 && S > b);
2252
2286
  }
2253
- function S(h) {
2254
- return h.displayOptions?.shouldShowCheckbox !== !1;
2287
+ function M(y) {
2288
+ return y.displayOptions?.shouldShowCheckbox !== !1;
2255
2289
  }
2256
- function g(h) {
2257
- return t.showOpacity ? h.displayOptions?.shouldShowSlider !== !1 : !1;
2290
+ function m(y) {
2291
+ return t.showOpacity ? y.displayOptions?.shouldShowSlider !== !1 : !1;
2258
2292
  }
2259
- function m(h) {
2260
- return t.showLegend ? h.displayOptions?.shouldShowLegendBox !== !1 : !1;
2293
+ function v(y) {
2294
+ return t.showLegend ? y.displayOptions?.shouldShowLegendBox !== !1 : !1;
2261
2295
  }
2262
- function s(h) {
2263
- return h.displayOptions?.layerNameChange || h.title;
2296
+ function s(y) {
2297
+ return y.displayOptions?.layerNameChange || y.title;
2264
2298
  }
2265
- function v(h) {
2266
- o("toggleLayer", h);
2299
+ function d(y) {
2300
+ o("toggleLayer", y);
2267
2301
  }
2268
- function T(h, C) {
2269
- const y = C.target;
2270
- o("setOpacity", h, parseFloat(y.value));
2302
+ function $(y, S) {
2303
+ const g = S.target;
2304
+ o("setOpacity", y, parseFloat(g.value));
2271
2305
  }
2272
- return (h, C) => (d(), w("div", hn, [
2273
- (d(!0), w(ie, null, re(e.layers, (y) => (d(), w("div", {
2274
- key: y.id,
2306
+ return (y, S) => (p(), w("div", mn, [
2307
+ (p(!0), w(ie, null, se(e.layers, (g) => (p(), w("div", {
2308
+ key: g.id,
2275
2309
  class: "layer-item"
2276
2310
  }, [
2277
- S(y) ? (d(), w("label", {
2311
+ M(g) ? (p(), w("label", {
2278
2312
  key: 0,
2279
2313
  class: ne(["layer-checkbox", {
2280
- "layer-unavailable": !p(y),
2281
- "layer-error": f(y.id)
2314
+ "layer-unavailable": !f(g),
2315
+ "layer-error": h(g.id)
2282
2316
  }])
2283
2317
  }, [
2284
2318
  P("input", {
2285
2319
  type: "checkbox",
2286
- checked: l(y.id),
2287
- disabled: !p(y),
2288
- onChange: (b) => v(y.id)
2289
- }, null, 40, mn),
2290
- P("span", vn, [
2291
- me(j(s(y)) + " ", 1),
2292
- c(y.id) ? (d(), w("span", bn, " Loading... ")) : O("", !0),
2293
- f(y.id) ? (d(), w("span", {
2320
+ checked: a(g.id),
2321
+ disabled: !f(g),
2322
+ onChange: (b) => d(g.id)
2323
+ }, null, 40, vn),
2324
+ P("span", bn, [
2325
+ me(j(s(g)) + " ", 1),
2326
+ c(g.id) ? (p(), w("span", wn, " Loading... ")) : O("", !0),
2327
+ h(g.id) ? (p(), w("span", {
2294
2328
  key: 1,
2295
2329
  class: "error-indicator",
2296
- title: f(y.id) || ""
2297
- }, " Error ", 8, wn)) : O("", !0),
2298
- p(y) ? O("", !0) : (d(), w("span", Ln, " (zoom in) "))
2330
+ title: h(g.id) || ""
2331
+ }, " Error ", 8, Ln)) : O("", !0),
2332
+ f(g) ? O("", !0) : (p(), w("span", Sn, " (zoom in) "))
2299
2333
  ])
2300
- ], 2)) : (d(), w("div", {
2334
+ ], 2)) : (p(), w("div", {
2301
2335
  key: 1,
2302
2336
  class: ne(["layer-label-only", {
2303
- "layer-unavailable": !p(y),
2304
- "layer-error": f(y.id)
2337
+ "layer-unavailable": !f(g),
2338
+ "layer-error": h(g.id)
2305
2339
  }])
2306
2340
  }, [
2307
- P("span", Sn, [
2308
- me(j(s(y)) + " ", 1),
2309
- c(y.id) ? (d(), w("span", Cn, " Loading... ")) : O("", !0),
2310
- f(y.id) ? (d(), w("span", {
2341
+ P("span", Cn, [
2342
+ me(j(s(g)) + " ", 1),
2343
+ c(g.id) ? (p(), w("span", kn, " Loading... ")) : O("", !0),
2344
+ h(g.id) ? (p(), w("span", {
2311
2345
  key: 1,
2312
2346
  class: "error-indicator",
2313
- title: f(y.id) || ""
2314
- }, " Error ", 8, kn)) : O("", !0),
2315
- p(y) ? O("", !0) : (d(), w("span", $n, " (zoom in) "))
2347
+ title: h(g.id) || ""
2348
+ }, " Error ", 8, $n)) : O("", !0),
2349
+ f(g) ? O("", !0) : (p(), w("span", xn, " (zoom in) "))
2316
2350
  ])
2317
2351
  ], 2)),
2318
- g(y) && l(y.id) ? (d(), w("div", xn, [
2319
- P("label", Pn, " Opacity: " + j(Math.round(a(y.id) * 100)) + "% ", 1),
2352
+ m(g) && a(g.id) ? (p(), w("div", Pn, [
2353
+ P("label", Mn, " Opacity: " + j(Math.round(l(g.id) * 100)) + "% ", 1),
2320
2354
  P("input", {
2321
2355
  type: "range",
2322
2356
  min: "0",
2323
2357
  max: "1",
2324
2358
  step: "0.05",
2325
- value: a(y.id),
2359
+ value: l(g.id),
2326
2360
  class: "opacity-slider",
2327
- onInput: (b) => T(y.id, b)
2328
- }, null, 40, Mn)
2361
+ onInput: (b) => $(g.id, b)
2362
+ }, null, 40, Fn)
2329
2363
  ])) : O("", !0),
2330
- m(y) && l(y.id) && y.legend?.length ? (d(), w("ul", Fn, [
2331
- (d(!0), w(ie, null, re(y.legend, (b, E) => (d(), w("li", {
2364
+ v(g) && a(g.id) && g.legend?.length ? (p(), w("ul", zn, [
2365
+ (p(!0), w(ie, null, se(g.legend, (b, E) => (p(), w("li", {
2332
2366
  key: E,
2333
2367
  class: "legend-item"
2334
2368
  }, [
2335
- b.type === "circle" ? (d(), w("span", {
2369
+ b.type === "circle" ? (p(), w("span", {
2336
2370
  key: 0,
2337
2371
  class: "legend-symbol legend-circle",
2338
- style: Y({ backgroundColor: b.color })
2339
- }, null, 4)) : b.type === "line" ? (d(), w("span", {
2372
+ style: ee({ backgroundColor: b.color })
2373
+ }, null, 4)) : b.type === "line" ? (p(), w("span", {
2340
2374
  key: 1,
2341
2375
  class: "legend-symbol legend-line",
2342
- style: Y({
2376
+ style: ee({
2343
2377
  backgroundColor: b.color,
2344
2378
  height: `${b.width || 2}px`
2345
2379
  })
2346
- }, null, 4)) : b.type === "fill" ? (d(), w("span", {
2380
+ }, null, 4)) : b.type === "fill" ? (p(), w("span", {
2347
2381
  key: 2,
2348
2382
  class: "legend-symbol legend-fill",
2349
- style: Y({ backgroundColor: b.color })
2383
+ style: ee({ backgroundColor: b.color })
2350
2384
  }, null, 4)) : O("", !0),
2351
2385
  P("span", Tn, j(b.label), 1)
2352
2386
  ]))), 128))
2353
2387
  ])) : O("", !0)
2354
2388
  ]))), 128)),
2355
- e.layers.length === 0 ? (d(), w("div", zn, " No layers available ")) : O("", !0)
2389
+ e.layers.length === 0 ? (p(), w("div", En, " No layers available ")) : O("", !0)
2356
2390
  ]));
2357
2391
  }
2358
- }), Nn = /* @__PURE__ */ _e(En, [["__scopeId", "data-v-cc5e50fd"]]);
2359
- function Vn(e) {
2360
- const i = k([]), t = k(/* @__PURE__ */ new Set()), o = k({}), l = k(/* @__PURE__ */ new Set()), a = k({}), c = k(""), f = k(!1), p = k(!1), S = k(null), g = R(() => {
2392
+ }), Nn = /* @__PURE__ */ Oe(_n, [["__scopeId", "data-v-cc5e50fd"]]);
2393
+ function Un(e) {
2394
+ const n = C([]), t = C(/* @__PURE__ */ new Set()), o = C({}), a = C(/* @__PURE__ */ new Set()), l = C({}), c = C(""), h = C(!1), f = C(!1), M = C(null), m = I(() => {
2361
2395
  if (!c.value.trim())
2362
- return i.value;
2363
- const z = c.value.toLowerCase();
2364
- return i.value.filter(
2365
- (B) => B.title.toLowerCase().includes(z)
2396
+ return n.value;
2397
+ const T = c.value.toLowerCase();
2398
+ return n.value.filter(
2399
+ (B) => B.title.toLowerCase().includes(T)
2366
2400
  );
2367
- }), m = R(() => i.value.map((z) => ({
2368
- config: z,
2369
- component: z.type
2401
+ }), v = I(() => n.value.map((T) => ({
2402
+ config: T,
2403
+ component: T.type
2370
2404
  // "circle", "fill", or "line"
2371
2405
  })));
2372
2406
  async function s() {
2373
- if (!p.value) {
2374
- f.value = !0, S.value = null;
2407
+ if (!f.value) {
2408
+ h.value = !0, M.value = null;
2375
2409
  try {
2376
- let z;
2377
- e.mode === "dynamic" || !e.mode ? e.webMapId ? z = await v(e.webMapId) : z = await it() : z = await it(), i.value = z;
2410
+ let T;
2411
+ e.mode === "dynamic" || !e.mode ? e.webMapId ? T = await d(e.webMapId) : T = await it() : T = await it(), n.value = T;
2378
2412
  const B = {};
2379
- z.forEach((q) => {
2413
+ T.forEach((q) => {
2380
2414
  B[q.id] = q.opacity ?? 1;
2381
- }), o.value = B, p.value = !0;
2382
- } catch (z) {
2383
- S.value = z instanceof Error ? z : new Error("Failed to initialize layerboard");
2415
+ }), o.value = B, f.value = !0;
2416
+ } catch (T) {
2417
+ M.value = T instanceof Error ? T : new Error("Failed to initialize layerboard");
2384
2418
  } finally {
2385
- f.value = !1;
2419
+ h.value = !1;
2386
2420
  }
2387
2421
  }
2388
2422
  }
2389
- async function v(z) {
2390
- const B = at(z), q = await fetch(B);
2423
+ async function d(T) {
2424
+ const B = lt(T), q = await fetch(B);
2391
2425
  if (!q.ok)
2392
2426
  throw new Error(`Failed to fetch WebMap: ${q.status} ${q.statusText}`);
2393
2427
  const ce = await q.json();
2394
2428
  return kt(ce);
2395
2429
  }
2396
- function T(z) {
2430
+ function $(T) {
2397
2431
  const B = new Set(t.value);
2398
- B.has(z) ? B.delete(z) : B.add(z), t.value = B;
2432
+ B.has(T) ? B.delete(T) : B.add(T), t.value = B;
2399
2433
  }
2400
- function h(z, B) {
2434
+ function y(T, B) {
2401
2435
  o.value = {
2402
2436
  ...o.value,
2403
- [z]: Math.max(0, Math.min(1, B))
2437
+ [T]: Math.max(0, Math.min(1, B))
2404
2438
  };
2405
2439
  }
2406
- function C(z) {
2407
- c.value = z;
2440
+ function S(T) {
2441
+ c.value = T;
2408
2442
  }
2409
- function y(z, B) {
2410
- const q = new Set(l.value);
2411
- B ? q.add(z) : q.delete(z), l.value = q;
2443
+ function g(T, B) {
2444
+ const q = new Set(a.value);
2445
+ B ? q.add(T) : q.delete(T), a.value = q;
2412
2446
  }
2413
- function b(z, B) {
2447
+ function b(T, B) {
2414
2448
  if (B)
2415
- a.value = { ...a.value, [z]: B };
2449
+ l.value = { ...l.value, [T]: B };
2416
2450
  else {
2417
- const { [z]: q, ...ce } = a.value;
2418
- a.value = ce;
2451
+ const { [T]: q, ...ce } = l.value;
2452
+ l.value = ce;
2419
2453
  }
2420
2454
  }
2421
2455
  function E() {
2422
- i.value = [], t.value = /* @__PURE__ */ new Set(), o.value = {}, l.value = /* @__PURE__ */ new Set(), a.value = {}, c.value = "", f.value = !1, p.value = !1, S.value = null;
2456
+ n.value = [], t.value = /* @__PURE__ */ new Set(), o.value = {}, a.value = /* @__PURE__ */ new Set(), l.value = {}, c.value = "", h.value = !1, f.value = !1, M.value = null;
2423
2457
  }
2424
2458
  return {
2425
2459
  // State (readonly)
2426
- layerConfigs: W(i),
2460
+ layerConfigs: W(n),
2427
2461
  visibleLayers: W(t),
2428
2462
  layerOpacities: W(o),
2429
- loadingLayers: W(l),
2430
- layerErrors: W(a),
2463
+ loadingLayers: W(a),
2464
+ layerErrors: W(l),
2431
2465
  searchQuery: W(c),
2432
- isLoading: W(f),
2433
- isInitialized: W(p),
2434
- error: W(S),
2466
+ isLoading: W(h),
2467
+ isInitialized: W(f),
2468
+ error: W(M),
2435
2469
  // Computed
2436
- filteredLayerConfigs: g,
2437
- layerList: m,
2470
+ filteredLayerConfigs: m,
2471
+ layerList: v,
2438
2472
  // Config
2439
2473
  config: e,
2440
2474
  // Methods
2441
2475
  initialize: s,
2442
- toggleLayer: T,
2443
- setLayerOpacity: h,
2444
- filterLayers: C,
2445
- setLayerLoading: y,
2476
+ toggleLayer: $,
2477
+ setLayerOpacity: y,
2478
+ filterLayers: S,
2479
+ setLayerLoading: g,
2446
2480
  setLayerError: b,
2447
2481
  reset: E
2448
2482
  };
2449
2483
  }
2450
- function Un() {
2451
- const e = k([]), i = k(/* @__PURE__ */ new Set()), t = k(/* @__PURE__ */ new Set());
2452
- function o(a) {
2453
- i.value.has(a) ? i.value.delete(a) : i.value.add(a);
2484
+ function Wn() {
2485
+ const e = C([]), n = C(/* @__PURE__ */ new Set()), t = C(/* @__PURE__ */ new Set());
2486
+ function o(l) {
2487
+ n.value.has(l) ? n.value.delete(l) : n.value.add(l);
2454
2488
  }
2455
- function l(a) {
2456
- e.value = a;
2489
+ function a(l) {
2490
+ e.value = l;
2457
2491
  }
2458
2492
  return {
2459
- layers: R(() => e.value),
2460
- visibleLayerIds: R(() => i.value),
2461
- loadingLayerIds: R(() => t.value),
2493
+ layers: I(() => e.value),
2494
+ visibleLayerIds: I(() => n.value),
2495
+ loadingLayerIds: I(() => t.value),
2462
2496
  toggleLayer: o,
2463
- setLayers: l
2497
+ setLayers: a
2464
2498
  };
2465
2499
  }
2466
- function _n(e) {
2467
- const i = k(null), t = k(!1), o = k(null), l = k(0);
2468
- async function a(p = {}) {
2500
+ function On(e) {
2501
+ const n = C(null), t = C(!1), o = C(null), a = C(0);
2502
+ async function l(f = {}) {
2469
2503
  t.value = !0, o.value = null;
2470
- const S = e.pageSize || 2e3;
2471
- let g = 0, m = [], s = !0;
2504
+ const M = e.pageSize || 2e3;
2505
+ let m = 0, v = [], s = !0;
2472
2506
  try {
2473
2507
  for (; s; ) {
2474
- const T = e.url.replace(/\/$/, ""), h = encodeURIComponent(p.where || e.where || "1=1");
2475
- let C = `${T}/query?where=${h}&outFields=*&returnGeometry=true&resultRecordCount=${S}&resultOffset=${g}&f=geojson`;
2476
- if (p.bounds) {
2508
+ const $ = e.url.replace(/\/$/, ""), y = encodeURIComponent(f.where || e.where || "1=1");
2509
+ let S = `${$}/query?where=${y}&outFields=*&returnGeometry=true&resultRecordCount=${M}&resultOffset=${m}&f=geojson`;
2510
+ if (f.bounds) {
2477
2511
  const E = JSON.stringify({
2478
- xmin: p.bounds.west,
2479
- ymin: p.bounds.south,
2480
- xmax: p.bounds.east,
2481
- ymax: p.bounds.north,
2512
+ xmin: f.bounds.west,
2513
+ ymin: f.bounds.south,
2514
+ xmax: f.bounds.east,
2515
+ ymax: f.bounds.north,
2482
2516
  spatialReference: { wkid: 4326 }
2483
2517
  });
2484
- C += `&geometry=${encodeURIComponent(E)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
2518
+ S += `&geometry=${encodeURIComponent(E)}&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects`;
2485
2519
  }
2486
- const y = await fetch(C);
2487
- if (!y.ok)
2488
- throw new Error(`HTTP ${y.status}: ${y.statusText}`);
2489
- const b = await y.json();
2490
- b.features && b.features.length > 0 ? (m = m.concat(b.features), g += b.features.length, s = b.features.length === S) : s = !1;
2520
+ const g = await fetch(S);
2521
+ if (!g.ok)
2522
+ throw new Error(`HTTP ${g.status}: ${g.statusText}`);
2523
+ const b = await g.json();
2524
+ b.features && b.features.length > 0 ? (v = v.concat(b.features), m += b.features.length, s = b.features.length === M) : s = !1;
2491
2525
  }
2492
- const v = {
2526
+ const d = {
2493
2527
  type: "FeatureCollection",
2494
- features: m
2528
+ features: v
2495
2529
  };
2496
- return i.value = v, l.value = m.length, v;
2497
- } catch (v) {
2498
- const T = v instanceof Error ? v : new Error("Failed to fetch features");
2499
- throw o.value = T, T;
2530
+ return n.value = d, a.value = v.length, d;
2531
+ } catch (d) {
2532
+ const $ = d instanceof Error ? d : new Error("Failed to fetch features");
2533
+ throw o.value = $, $;
2500
2534
  } finally {
2501
2535
  t.value = !1;
2502
2536
  }
2503
2537
  }
2504
2538
  function c() {
2505
- i.value = null, l.value = 0, o.value = null;
2539
+ n.value = null, a.value = 0, o.value = null;
2506
2540
  }
2507
- async function f(p = {}) {
2508
- return a(p);
2541
+ async function h(f = {}) {
2542
+ return l(f);
2509
2543
  }
2510
2544
  return {
2511
2545
  // State (readonly)
2512
- data: W(i),
2546
+ data: W(n),
2513
2547
  isLoading: W(t),
2514
2548
  error: W(o),
2515
- totalFeatures: W(l),
2549
+ totalFeatures: W(a),
2516
2550
  // Config
2517
2551
  config: e,
2518
2552
  // Methods
2519
- fetch: a,
2520
- refetch: f,
2553
+ fetch: l,
2554
+ refetch: h,
2521
2555
  clear: c
2522
2556
  };
2523
2557
  }
2524
- function Wn(e, i, t) {
2525
- const o = _n(e);
2558
+ function jn(e, n, t) {
2559
+ const o = On(e);
2526
2560
  return Pe(
2527
- i,
2528
- async (l) => {
2529
- if (l) {
2530
- const a = t(l);
2531
- await o.fetch(a);
2561
+ n,
2562
+ async (a) => {
2563
+ if (a) {
2564
+ const l = t(a);
2565
+ await o.fetch(l);
2532
2566
  }
2533
2567
  },
2534
2568
  { immediate: !0 }
@@ -2536,19 +2570,19 @@ function Wn(e, i, t) {
2536
2570
  }
2537
2571
  export {
2538
2572
  Nn as LayerCheckboxSet,
2539
- Ro as LayerPanel,
2540
- Bn as Layerboard,
2573
+ Do as LayerPanel,
2574
+ Vn as Layerboard,
2541
2575
  Xt as MapPanel,
2542
2576
  An as TopicAccordion,
2543
- Dn as WEBMAP_ID,
2544
- at as buildWebMapUrl,
2545
- Jo as clearCache,
2577
+ Zn as WEBMAP_ID,
2578
+ lt as buildWebMapUrl,
2579
+ Qo as clearCache,
2546
2580
  it as getLayerConfigs,
2547
- Zn as getWebMapUrl,
2581
+ Bn as getWebMapUrl,
2548
2582
  kt as transformWebMapToLayerConfigs,
2549
- Yo as useApiDataSources,
2550
- _n as useDataSource,
2551
- Un as useLayerConfig,
2552
- Vn as useLayerboard,
2553
- Wn as useReactiveDataSource
2583
+ en as useApiDataSources,
2584
+ On as useDataSource,
2585
+ Wn as useLayerConfig,
2586
+ Un as useLayerboard,
2587
+ jn as useReactiveDataSource
2554
2588
  };