@phila/layerboard 3.0.0-beta.6 → 3.0.0-beta.7

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