@phila/layerboard 3.0.0-beta.32 → 3.0.0-beta.34

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