@phila/layerboard 3.0.0-beta.3 → 3.0.0-beta.30

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