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

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