@ogc-maps/storybook-components 0.11.0 → 0.12.0

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/main.js CHANGED
@@ -1,37 +1,37 @@
1
- import { B as $t } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
- import { C as Bt } from "./CollapsibleControl-qo9daiD8.js";
3
- import { C as Ut, f as qt, a as Gt } from "./CoordinateDisplay-PxPmVjpm.js";
4
- import { E as _t } from "./ExportButton-BsNrOvRE.js";
1
+ import { B as $i } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
+ import { C as Bi } from "./CollapsibleControl-qo9daiD8.js";
3
+ import { C as Ui, f as Gi, a as qi } from "./CoordinateDisplay-PxPmVjpm.js";
4
+ import { E as _i } from "./ExportButton-BsNrOvRE.js";
5
5
  import { jsx as a, jsxs as l, Fragment as z } from "react/jsx-runtime";
6
- import { useState as T, useEffect as G, useRef as V, useCallback as Be, useId as ze, useMemo as Ue } from "react";
7
- import { F as Ht } from "./FeatureDetailPanel-CkFpdEKW.js";
8
- import { F as Xt } from "./FeatureTooltip-DxzN-jnp.js";
9
- import { L as Kt } from "./LayerPanel-SCdJ8948.js";
10
- import { L as Zt } from "./Legend-BLWBzD7Y.js";
11
- import { LuRuler as Qe, LuPentagon as Ze, LuTrash2 as be, LuMousePointer2 as ea, LuSquareDashedMousePointer as aa, LuList as ta, LuGripHorizontal as ia, LuDownload as ra, LuX as la, LuInfo as pa } from "react-icons/lu";
12
- import { W as na, X as ua, Y as xe, S as qe, n as Ge, m as ye, U as oa, j as ma } from "./geo-CyDCsiW-.js";
13
- import { a as ai, b as ti, c as ii, Z as ri, _ as li, $ as pi, a0 as ni, a1 as ui, a2 as oi, d as mi, a3 as si, e as ci, f as di, g as hi, h as gi, i as bi, k as yi, l as fi, a4 as xi, a5 as wi, o as Ni, p as vi, q as ki, r as Ci, s as Si, t as Ti, u as Di, v as Li, w as Ai, x as Ei, y as Ii, z as Mi, A as Fi, B as Pi, C as ji, D as Oi, E as $i, a6 as Ri, F as Bi, G as zi, H as Ui, I as qi, J as Gi, a7 as Wi, K as _i, L as Vi, M as Hi, N as Yi, O as Xi, P as Ji, Q as Ki, R as Qi, T as Zi, V as er } from "./geo-CyDCsiW-.js";
14
- import { S as tr } from "./SearchPanel-4Y12jfuP.js";
15
- import { s as sa } from "./index-BrphSJJ2.js";
16
- import { B as rr, C as lr, a as pr, b as nr, D as ur, F as or, c as mr, d as sr, e as cr, G as dr, L as hr, f as gr, g as br, h as yr, i as fr, j as xr, M as wr, N as Nr, O as vr, P as kr, k as Cr, S as Sr, l as Tr, m as Dr, n as Lr, o as Ar, p as Er, q as Ir, r as Mr, T as Fr, U as Pr, V as jr, v as Or } from "./index-BrphSJJ2.js";
17
- import './style.css';function xt({
6
+ import { useState as T, useEffect as q, useRef as H, useCallback as Be, useId as ze, useMemo as Ue } from "react";
7
+ import { F as Hi } from "./FeatureDetailPanel-CkFpdEKW.js";
8
+ import { F as Xi } from "./FeatureTooltip-DxzN-jnp.js";
9
+ import { L as Ji } from "./LayerPanel-SCdJ8948.js";
10
+ import { L as Qi } from "./Legend-BLWBzD7Y.js";
11
+ import { LuRuler as Ke, LuPentagon as Qe, LuTrash2 as be, LuMousePointer2 as ea, LuSquareDashedMousePointer as aa, LuList as ia, LuGripHorizontal as ta, LuDownload as ra, LuX as la, LuInfo as pa } from "react-icons/lu";
12
+ import { Y as na, Z as ua, _ as xe, U as Ge, o as qe, n as ye, W as oa, k as ma } from "./geo--Ta-t__y.js";
13
+ import { a as at, b as it, c as tt, d as rt, $ as lt, a0 as pt, a1 as nt, a2 as ut, a3 as ot, a4 as mt, e as st, a5 as ct, f as dt, g as ht, h as gt, i as bt, j as yt, l as ft, m as xt, a6 as wt, a7 as Nt, p as vt, q as kt, r as Ct, s as St, t as Tt, u as Dt, v as Lt, w as At, x as Et, y as It, z as Mt, A as Ft, B as Pt, C as Ot, D as jt, E as $t, F as Rt, G as Bt, a8 as zt, H as Ut, I as Gt, J as qt, K as Wt, L as _t, a9 as Vt, M as Ht, N as Yt, O as Xt, P as Zt, Q as Jt, R as Kt, S as Qt, T as er, V as ar, X as ir } from "./geo--Ta-t__y.js";
14
+ import { S as rr } from "./SearchPanel-4Y12jfuP.js";
15
+ import { s as sa } from "./index-CqBeCxon.js";
16
+ import { B as pr, a as nr, C as ur, b as or, c as mr, D as sr, d as cr, F as dr, e as hr, f as gr, g as br, G as yr, L as fr, h as xr, i as wr, j as Nr, k as vr, l as kr, M as Cr, N as Sr, O as Tr, P as Dr, m as Lr, S as Ar, n as Er, o as Ir, p as Mr, q as Fr, r as Pr, t as Or, u as jr, T as $r, U as Rr, V as Br, v as zr } from "./index-CqBeCxon.js";
17
+ import './style.css';function xi({
18
18
  open: e,
19
- layers: t,
20
- availableFormats: i,
19
+ layers: i,
20
+ availableFormats: t,
21
21
  hasActiveFilter: r,
22
22
  loading: p = !1,
23
23
  progress: u,
24
24
  error: n,
25
- onExport: f,
25
+ onExport: x,
26
26
  onClose: s
27
27
  }) {
28
- const [g, d] = T(""), [x, c] = T(""), [o, h] = T(!0);
29
- if (G(() => {
30
- e && (d(t.length === 1 ? t[0].id : ""), c(i.length > 0 ? i[0].id : ""), h(!0));
31
- }, [e, t, i]), !e) return null;
32
- const w = t.find((m) => m.id === g), v = i.find((m) => m.id === x), C = w != null && r(w.id), A = w != null && v != null && !p, j = () => {
33
- !w || !v || f({
34
- layer: w,
28
+ const [g, d] = T(""), [w, c] = T(""), [o, h] = T(!0);
29
+ if (q(() => {
30
+ e && (d(i.length === 1 ? i[0].id : ""), c(t.length > 0 ? t[0].id : ""), h(!0));
31
+ }, [e, i, t]), !e) return null;
32
+ const N = i.find((m) => m.id === g), v = t.find((m) => m.id === w), C = N != null && r(N.id), E = N != null && v != null && !p, O = () => {
33
+ !N || !v || x({
34
+ layer: N,
35
35
  format: v,
36
36
  filtered: C ? o : !1
37
37
  });
@@ -61,7 +61,7 @@ import './style.css';function xt({
61
61
  children: "Layer"
62
62
  }
63
63
  ),
64
- t.length === 1 ? /* @__PURE__ */ a("div", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700", children: t[0].label }) : /* @__PURE__ */ l(
64
+ i.length === 1 ? /* @__PURE__ */ a("div", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700", children: i[0].label }) : /* @__PURE__ */ l(
65
65
  "select",
66
66
  {
67
67
  id: "export-layer-select",
@@ -70,14 +70,14 @@ import './style.css';function xt({
70
70
  className: "mapui:w-full mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-gray-700",
71
71
  children: [
72
72
  /* @__PURE__ */ a("option", { value: "", disabled: !0, children: "Select a layer..." }),
73
- t.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label }, m.id))
73
+ i.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label }, m.id))
74
74
  ]
75
75
  }
76
76
  )
77
77
  ] }),
78
78
  /* @__PURE__ */ l("fieldset", { className: "mapui:mb-4", children: [
79
79
  /* @__PURE__ */ a("legend", { className: "mapui:mb-1 mapui:text-sm mapui:font-medium mapui:text-gray-700", children: "Format" }),
80
- /* @__PURE__ */ a("div", { className: "mapui:space-y-1", children: i.map((m) => /* @__PURE__ */ l(
80
+ /* @__PURE__ */ a("div", { className: "mapui:space-y-1", children: t.map((m) => /* @__PURE__ */ l(
81
81
  "label",
82
82
  {
83
83
  className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-2 mapui:rounded mapui:px-2 mapui:py-1.5 hover:mapui:bg-gray-50",
@@ -88,7 +88,7 @@ import './style.css';function xt({
88
88
  type: "radio",
89
89
  name: "export-format",
90
90
  value: m.id,
91
- checked: x === m.id,
91
+ checked: w === m.id,
92
92
  onChange: () => c(m.id),
93
93
  className: "mapui:accent-blue-600"
94
94
  }
@@ -134,11 +134,11 @@ import './style.css';function xt({
134
134
  "button",
135
135
  {
136
136
  type: "button",
137
- onClick: j,
138
- disabled: !A,
137
+ onClick: O,
138
+ disabled: !E,
139
139
  className: [
140
140
  "mapui:rounded mapui:border mapui:border-transparent mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-white",
141
- A ? "mapui:cursor-pointer mapui:bg-blue-600 hover:mapui:bg-blue-700" : "mapui:cursor-not-allowed mapui:bg-blue-400"
141
+ E ? "mapui:cursor-pointer mapui:bg-blue-600 hover:mapui:bg-blue-700" : "mapui:cursor-not-allowed mapui:bg-blue-400"
142
142
  ].join(" "),
143
143
  children: p ? "Exporting..." : "Export"
144
144
  }
@@ -149,32 +149,32 @@ import './style.css';function xt({
149
149
  );
150
150
  }
151
151
  const ca = [
152
- { mode: "distance", icon: Qe, label: "Distance" },
153
- { mode: "area", icon: Ze, label: "Area" }
152
+ { mode: "distance", icon: Ke, label: "Distance" },
153
+ { mode: "area", icon: Qe, label: "Area" }
154
154
  ];
155
- function da(e, t) {
156
- return e ? t === 0 ? "Click on the map to start measuring" : e === "distance" ? "Click to add points, double-click to finish" : t < 3 ? "Click to add points (min 3 for area)" : "Click to add points, double-click to close" : "Select a measurement mode";
155
+ function da(e, i) {
156
+ return e ? i === 0 ? "Click on the map to start measuring" : e === "distance" ? "Click to add points, double-click to finish" : i < 3 ? "Click to add points (min 3 for area)" : "Click to add points, double-click to close" : "Select a measurement mode";
157
157
  }
158
- function wt({
158
+ function wi({
159
159
  mode: e,
160
- onModeChange: t,
161
- points: i,
160
+ onModeChange: i,
161
+ points: t,
162
162
  measurement: r,
163
163
  unit: p,
164
164
  onUnitChange: u,
165
165
  onClear: n,
166
- className: f
166
+ className: x
167
167
  }) {
168
168
  const s = e ? na[e] : [];
169
- return /* @__PURE__ */ l("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${f ?? ""}`, children: [
170
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ca.map(({ mode: g, icon: d, label: x }) => {
169
+ return /* @__PURE__ */ l("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${x ?? ""}`, children: [
170
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ca.map(({ mode: g, icon: d, label: w }) => {
171
171
  const c = e === g;
172
172
  return /* @__PURE__ */ l(
173
173
  "button",
174
174
  {
175
175
  type: "button",
176
- onClick: () => t(c ? null : g),
177
- "aria-label": x,
176
+ onClick: () => i(c ? null : g),
177
+ "aria-label": w,
178
178
  "aria-pressed": c,
179
179
  className: [
180
180
  "mapui:flex mapui:flex-1 mapui:items-center mapui:justify-center mapui:gap-1.5 mapui:rounded mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:transition-colors",
@@ -182,7 +182,7 @@ function wt({
182
182
  ].join(" "),
183
183
  children: [
184
184
  /* @__PURE__ */ a(d, { size: 16 }),
185
- x
185
+ w
186
186
  ]
187
187
  },
188
188
  g
@@ -207,8 +207,8 @@ function wt({
207
207
  g
208
208
  );
209
209
  }) }),
210
- /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: da(e, i.length) }),
211
- i.length > 0 && /* @__PURE__ */ l(
210
+ /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-center mapui:text-xs mapui:text-gray-500", children: da(e, t.length) }),
211
+ t.length > 0 && /* @__PURE__ */ l(
212
212
  "button",
213
213
  {
214
214
  type: "button",
@@ -227,21 +227,21 @@ const ha = [
227
227
  { mode: "click", icon: ea, label: "Click" },
228
228
  { mode: "box", icon: aa, label: "Box" }
229
229
  ];
230
- function ga(e, t, i) {
231
- return t ? e ? i === 0 ? e === "click" ? "Click on features to select them" : "Click and drag to draw a selection box" : `${i} feature${i !== 1 ? "s" : ""} selected` : "Choose a selection mode" : "Select a layer to begin";
230
+ function ga(e, i, t) {
231
+ return i ? e ? t === 0 ? e === "click" ? "Click on features to select them" : "Click and drag to draw a selection box" : `${t} feature${t !== 1 ? "s" : ""} selected` : "Choose a selection mode" : "Select a layer to begin";
232
232
  }
233
- function Nt({
233
+ function Ni({
234
234
  mode: e,
235
- onModeChange: t,
236
- layers: i,
235
+ onModeChange: i,
236
+ layers: t,
237
237
  activeLayerId: r,
238
238
  onActiveLayerChange: p,
239
239
  selectedCount: u,
240
240
  onClear: n,
241
- onViewResults: f,
241
+ onViewResults: x,
242
242
  className: s
243
243
  }) {
244
- const g = i.filter((d) => d.visible);
244
+ const g = t.filter((d) => d.visible);
245
245
  return /* @__PURE__ */ l("div", { className: `mapui:flex mapui:flex-col mapui:gap-3 ${s ?? ""}`, children: [
246
246
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
247
247
  /* @__PURE__ */ a("label", { className: "mapui:text-xs mapui:font-medium mapui:text-gray-600", children: "Layer" }),
@@ -259,13 +259,13 @@ function Nt({
259
259
  )
260
260
  ] }),
261
261
  r && /* @__PURE__ */ l(z, { children: [
262
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ha.map(({ mode: d, icon: x, label: c }) => {
262
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: ha.map(({ mode: d, icon: w, label: c }) => {
263
263
  const o = e === d;
264
264
  return /* @__PURE__ */ l(
265
265
  "button",
266
266
  {
267
267
  type: "button",
268
- onClick: () => t(o ? null : d),
268
+ onClick: () => i(o ? null : d),
269
269
  "aria-label": c,
270
270
  "aria-pressed": o,
271
271
  className: [
@@ -273,7 +273,7 @@ function Nt({
273
273
  o ? "mapui:bg-blue-600 mapui:text-white" : "mapui:bg-gray-100 mapui:text-gray-700 hover:mapui:bg-gray-200"
274
274
  ].join(" "),
275
275
  children: [
276
- /* @__PURE__ */ a(x, { size: 16 }),
276
+ /* @__PURE__ */ a(w, { size: 16 }),
277
277
  c
278
278
  ]
279
279
  },
@@ -286,10 +286,10 @@ function Nt({
286
286
  "button",
287
287
  {
288
288
  type: "button",
289
- onClick: f,
289
+ onClick: x,
290
290
  className: "mapui:flex mapui:flex-1 mapui:items-center mapui:justify-center mapui:gap-1.5 mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1.5 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
291
291
  children: [
292
- /* @__PURE__ */ a(ta, { size: 14 }),
292
+ /* @__PURE__ */ a(ia, { size: 14 }),
293
293
  "View Results"
294
294
  ]
295
295
  }
@@ -314,33 +314,33 @@ function ba(e) {
314
314
  return e == null ? "--" : typeof e == "boolean" ? e ? "Yes" : "No" : typeof e == "object" ? JSON.stringify(e) : String(e);
315
315
  }
316
316
  const ya = 200, fa = 0.6, xa = 300;
317
- function vt({
317
+ function vi({
318
318
  open: e,
319
- features: t,
320
- columns: i,
319
+ features: i,
320
+ columns: t,
321
321
  title: r = "Results",
322
322
  onClose: p,
323
323
  onExport: u,
324
324
  onFeatureClick: n,
325
- onClearSelection: f
325
+ onClearSelection: x
326
326
  }) {
327
- const [s, g] = T(xa), d = V(!1), x = V(0), c = V(0), o = Be((w) => {
328
- w.preventDefault(), d.current = !0, x.current = w.clientY, c.current = s;
327
+ const [s, g] = T(xa), d = H(!1), w = H(0), c = H(0), o = Be((N) => {
328
+ N.preventDefault(), d.current = !0, w.current = N.clientY, c.current = s;
329
329
  }, [s]);
330
- if (G(() => {
330
+ if (q(() => {
331
331
  if (!e) return;
332
- const w = (C) => {
332
+ const N = (C) => {
333
333
  if (!d.current) return;
334
- const A = window.innerHeight * fa, j = x.current - C.clientY, m = Math.min(A, Math.max(ya, c.current + j));
334
+ const E = window.innerHeight * fa, O = w.current - C.clientY, m = Math.min(E, Math.max(ya, c.current + O));
335
335
  g(m);
336
336
  }, v = () => {
337
337
  d.current = !1;
338
338
  };
339
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", v), () => {
340
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", v);
339
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", v), () => {
340
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", v);
341
341
  };
342
342
  }, [e]), !e) return null;
343
- const h = i ?? (t.length > 0 ? Object.keys(t[0].properties).filter((w) => w !== "geometry") : []);
343
+ const h = t ?? (i.length > 0 ? Object.keys(i[0].properties).filter((N) => N !== "geometry") : []);
344
344
  return /* @__PURE__ */ l(
345
345
  "div",
346
346
  {
@@ -352,13 +352,13 @@ function vt({
352
352
  {
353
353
  className: "mapui:flex mapui:items-center mapui:justify-center mapui:h-3 mapui:cursor-ns-resize mapui:bg-gray-100 mapui:border-b mapui:border-gray-200 hover:mapui:bg-gray-200",
354
354
  onMouseDown: o,
355
- children: /* @__PURE__ */ a(ia, { size: 14, className: "mapui:text-gray-400" })
355
+ children: /* @__PURE__ */ a(ta, { size: 14, className: "mapui:text-gray-400" })
356
356
  }
357
357
  ),
358
358
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:px-4 mapui:py-2 mapui:border-b mapui:border-gray-200 mapui:shrink-0", children: [
359
359
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
360
360
  /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-semibold mapui:text-gray-800", children: r }),
361
- /* @__PURE__ */ a("span", { className: "mapui:rounded-full mapui:bg-blue-100 mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:font-medium mapui:text-blue-700", children: t.length })
361
+ /* @__PURE__ */ a("span", { className: "mapui:rounded-full mapui:bg-blue-100 mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:font-medium mapui:text-blue-700", children: i.length })
362
362
  ] }),
363
363
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
364
364
  u && /* @__PURE__ */ a(
@@ -371,11 +371,11 @@ function vt({
371
371
  children: /* @__PURE__ */ a(ra, { size: 16 })
372
372
  }
373
373
  ),
374
- f && /* @__PURE__ */ a(
374
+ x && /* @__PURE__ */ a(
375
375
  "button",
376
376
  {
377
377
  type: "button",
378
- onClick: f,
378
+ onClick: x,
379
379
  title: "Clear selection",
380
380
  className: "mapui:flex mapui:items-center mapui:justify-center mapui:w-7 mapui:h-7 mapui:rounded hover:mapui:bg-gray-100 mapui:text-gray-500",
381
381
  children: /* @__PURE__ */ a(be, { size: 16 })
@@ -393,19 +393,19 @@ function vt({
393
393
  )
394
394
  ] })
395
395
  ] }),
396
- /* @__PURE__ */ a("div", { className: "mapui:overflow-auto mapui:flex-1", children: t.length === 0 ? /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-center mapui:h-full mapui:text-sm mapui:text-gray-400", children: "No features to display" }) : /* @__PURE__ */ l("table", { className: "mapui:w-full mapui:text-xs mapui:border-collapse", children: [
396
+ /* @__PURE__ */ a("div", { className: "mapui:overflow-auto mapui:flex-1", children: i.length === 0 ? /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-center mapui:h-full mapui:text-sm mapui:text-gray-400", children: "No features to display" }) : /* @__PURE__ */ l("table", { className: "mapui:w-full mapui:text-xs mapui:border-collapse", children: [
397
397
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ l("tr", { className: "mapui:bg-gray-50 mapui:sticky mapui:top-0", children: [
398
398
  /* @__PURE__ */ a("th", { className: "mapui:px-3 mapui:py-2 mapui:text-left mapui:font-medium mapui:text-gray-600 mapui:border-b mapui:border-gray-200", children: "#" }),
399
- h.map((w) => /* @__PURE__ */ a(
399
+ h.map((N) => /* @__PURE__ */ a(
400
400
  "th",
401
401
  {
402
402
  className: "mapui:px-3 mapui:py-2 mapui:text-left mapui:font-medium mapui:text-gray-600 mapui:border-b mapui:border-gray-200 mapui:whitespace-nowrap",
403
- children: w
403
+ children: N
404
404
  },
405
- w
405
+ N
406
406
  ))
407
407
  ] }) }),
408
- /* @__PURE__ */ a("tbody", { children: t.map((w, v) => /* @__PURE__ */ l(
408
+ /* @__PURE__ */ a("tbody", { children: i.map((N, v) => /* @__PURE__ */ l(
409
409
  "tr",
410
410
  {
411
411
  onClick: () => n == null ? void 0 : n(v),
@@ -420,7 +420,7 @@ function vt({
420
420
  "td",
421
421
  {
422
422
  className: "mapui:px-3 mapui:py-1.5 mapui:text-gray-700 mapui:border-b mapui:border-gray-100 mapui:whitespace-nowrap",
423
- children: ba(w.properties[C])
423
+ children: ba(N.properties[C])
424
424
  },
425
425
  C
426
426
  ))
@@ -433,8 +433,8 @@ function vt({
433
433
  }
434
434
  );
435
435
  }
436
- function wa({ text: e, id: t }) {
437
- const i = ze(), r = t ?? i;
436
+ function wa({ text: e, id: i }) {
437
+ const t = ze(), r = i ?? t;
438
438
  return /* @__PURE__ */ l("span", { className: "mapui:relative mapui:inline-flex mapui:group", children: [
439
439
  /* @__PURE__ */ a(
440
440
  "span",
@@ -460,28 +460,28 @@ function wa({ text: e, id: t }) {
460
460
  )
461
461
  ] });
462
462
  }
463
- function S({ label: e, error: t, required: i, description: r, htmlFor: p, children: u }) {
463
+ function S({ label: e, error: i, required: t, description: r, htmlFor: p, children: u }) {
464
464
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
465
465
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1", children: [
466
466
  /* @__PURE__ */ l("label", { htmlFor: p, className: "mapui:flex mapui:items-center mapui:gap-1 mapui:text-xs mapui:font-medium mapui:text-gray-700", children: [
467
467
  e,
468
- i && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
468
+ t && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
469
469
  ] }),
470
470
  r && /* @__PURE__ */ a(wa, { text: r })
471
471
  ] }),
472
472
  u,
473
- t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
473
+ i && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: i })
474
474
  ] });
475
475
  }
476
- function J({ value: e, onChange: t, label: i }) {
476
+ function Z({ value: e, onChange: i, label: t }) {
477
477
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
478
478
  /* @__PURE__ */ a(
479
479
  "input",
480
480
  {
481
481
  type: "color",
482
482
  value: e,
483
- onChange: (r) => t(r.target.value),
484
- "aria-label": i ?? "Color",
483
+ onChange: (r) => i(r.target.value),
484
+ "aria-label": t ?? "Color",
485
485
  className: "mapui:h-8 mapui:w-10 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:p-0.5"
486
486
  }
487
487
  ),
@@ -490,8 +490,8 @@ function J({ value: e, onChange: t, label: i }) {
490
490
  }
491
491
  function re({
492
492
  open: e,
493
- title: t,
494
- description: i,
493
+ title: i,
494
+ description: t,
495
495
  onConfirm: r,
496
496
  onCancel: p
497
497
  }) {
@@ -509,7 +509,7 @@ function re({
509
509
  {
510
510
  id: "confirm-dialog-title",
511
511
  className: "mapui:m-0 mapui:mb-2 mapui:text-base mapui:font-semibold mapui:text-gray-900",
512
- children: t
512
+ children: i
513
513
  }
514
514
  ),
515
515
  /* @__PURE__ */ a(
@@ -517,7 +517,7 @@ function re({
517
517
  {
518
518
  id: "confirm-dialog-description",
519
519
  className: "mapui:m-0 mapui:mb-6 mapui:text-sm mapui:text-gray-600",
520
- children: i
520
+ children: t
521
521
  }
522
522
  ),
523
523
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:justify-end mapui:gap-2", children: [
@@ -546,11 +546,11 @@ function re({
546
546
  }
547
547
  function X({
548
548
  title: e,
549
- children: t,
550
- defaultOpen: i = !1,
549
+ children: i,
550
+ defaultOpen: t = !1,
551
551
  badge: r
552
552
  }) {
553
- const [p, u] = T(i);
553
+ const [p, u] = T(t);
554
554
  return /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
555
555
  /* @__PURE__ */ l(
556
556
  "button",
@@ -567,18 +567,18 @@ function X({
567
567
  ]
568
568
  }
569
569
  ),
570
- p && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: t })
570
+ p && /* @__PURE__ */ a("div", { className: "mapui:p-3", children: i })
571
571
  ] });
572
572
  }
573
573
  const ee = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
574
574
  function we({
575
575
  value: e,
576
- onChange: t,
577
- onTestConnection: i,
576
+ onChange: i,
577
+ onTestConnection: t,
578
578
  testStatus: r = "idle",
579
579
  testError: p
580
580
  }) {
581
- const u = (n) => t({ ...e, ...n });
581
+ const u = (n) => i({ ...e, ...n });
582
582
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
583
583
  /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
584
584
  "input",
@@ -602,11 +602,11 @@ function we({
602
602
  className: `${ee} mapui:flex-1`
603
603
  }
604
604
  ),
605
- i && /* @__PURE__ */ a(
605
+ t && /* @__PURE__ */ a(
606
606
  "button",
607
607
  {
608
608
  type: "button",
609
- onClick: () => i(e.url),
609
+ onClick: () => t(e.url),
610
610
  disabled: r === "loading" || !e.url,
611
611
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-500 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-sm mapui:text-blue-600 hover:mapui:bg-blue-50 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
612
612
  children: r === "loading" ? "Testing…" : "Test Connection"
@@ -644,21 +644,21 @@ const le = () => ({
644
644
  label: void 0,
645
645
  tileMatrixSetId: "WebMercatorQuad"
646
646
  });
647
- function kt({ sources: e, onChange: t }) {
648
- const [i, r] = T(null), [p, u] = T(null), [n, f] = T(!1), [s, g] = T(le()), [d, x] = T({}), [c, o] = T({}), [h, w] = T(null), v = async (m, I) => {
649
- x((F) => ({ ...F, [m]: "loading" }));
647
+ function ki({ sources: e, onChange: i }) {
648
+ const [t, r] = T(null), [p, u] = T(null), [n, x] = T(!1), [s, g] = T(le()), [d, w] = T({}), [c, o] = T({}), [h, N] = T(null), v = async (m, L) => {
649
+ w((F) => ({ ...F, [m]: "loading" }));
650
650
  try {
651
- const F = await fetch(`${I}/conformance`);
652
- F.ok ? x((b) => ({ ...b, [m]: "success" })) : (x((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: `HTTP ${F.status}` })));
651
+ const F = await fetch(`${L}/conformance`);
652
+ F.ok ? w((b) => ({ ...b, [m]: "success" })) : (w((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: `HTTP ${F.status}` })));
653
653
  } catch (F) {
654
- x((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: F instanceof Error ? F.message : "Network error" }));
654
+ w((b) => ({ ...b, [m]: "error" })), o((b) => ({ ...b, [m]: F instanceof Error ? F.message : "Network error" }));
655
655
  }
656
656
  }, C = () => {
657
- p && (t(e.map((m) => m.id === i ? p : m)), r(null), u(null));
658
- }, A = () => {
659
- t([...e, s]), f(!1), g(le());
660
- }, j = (m) => {
661
- t(e.filter((I) => I.id !== m)), w(null);
657
+ p && (i(e.map((m) => m.id === t ? p : m)), r(null), u(null));
658
+ }, E = () => {
659
+ i([...e, s]), x(!1), g(le());
660
+ }, O = (m) => {
661
+ i(e.filter((L) => L.id !== m)), N(null);
662
662
  };
663
663
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
664
664
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -668,7 +668,7 @@ function kt({ sources: e, onChange: t }) {
668
668
  {
669
669
  type: "button",
670
670
  onClick: () => {
671
- f(!0), g(le());
671
+ x(!0), g(le());
672
672
  },
673
673
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
674
674
  children: "+ Add Source"
@@ -680,13 +680,13 @@ function kt({ sources: e, onChange: t }) {
680
680
  "li",
681
681
  {
682
682
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
683
- children: i === m.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
683
+ children: t === m.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
684
684
  /* @__PURE__ */ a(
685
685
  we,
686
686
  {
687
687
  value: p ?? m,
688
688
  onChange: u,
689
- onTestConnection: (I) => v(`edit-${m.id}`, I),
689
+ onTestConnection: (L) => v(`edit-${m.id}`, L),
690
690
  testStatus: d[`edit-${m.id}`],
691
691
  testError: c[`edit-${m.id}`]
692
692
  }
@@ -739,7 +739,7 @@ function kt({ sources: e, onChange: t }) {
739
739
  "button",
740
740
  {
741
741
  type: "button",
742
- onClick: () => w(m.id),
742
+ onClick: () => N(m.id),
743
743
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
744
744
  children: "Remove"
745
745
  }
@@ -766,7 +766,7 @@ function kt({ sources: e, onChange: t }) {
766
766
  "button",
767
767
  {
768
768
  type: "button",
769
- onClick: A,
769
+ onClick: E,
770
770
  disabled: !s.id || !s.url,
771
771
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
772
772
  children: "Save"
@@ -776,7 +776,7 @@ function kt({ sources: e, onChange: t }) {
776
776
  "button",
777
777
  {
778
778
  type: "button",
779
- onClick: () => f(!1),
779
+ onClick: () => x(!1),
780
780
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
781
781
  children: "Cancel"
782
782
  }
@@ -789,27 +789,27 @@ function kt({ sources: e, onChange: t }) {
789
789
  open: h !== null,
790
790
  title: "Remove Source",
791
791
  description: "Are you sure you want to remove this source? Any layers using it will be affected.",
792
- onConfirm: () => h && j(h),
793
- onCancel: () => w(null)
792
+ onConfirm: () => h && O(h),
793
+ onCancel: () => N(null)
794
794
  }
795
795
  )
796
796
  ] });
797
797
  }
798
- function Ct({
798
+ function Ci({
799
799
  sourceUrl: e,
800
- selectedCollectionIds: t,
801
- onSelect: i,
800
+ selectedCollectionIds: i,
801
+ onSelect: t,
802
802
  onDeselect: r
803
803
  }) {
804
- const { collections: p, loading: u, error: n } = qe(e || null);
804
+ const { collections: p, loading: u, error: n } = Ge(e || null);
805
805
  return u ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:py-4 mapui:text-sm mapui:text-gray-500", children: [
806
806
  /* @__PURE__ */ a("span", { className: "mapui:inline-block mapui:h-4 mapui:w-4 mapui:animate-spin mapui:rounded-full mapui:border-2 mapui:border-gray-300 mapui:border-t-blue-600" }),
807
807
  "Loading collections…"
808
808
  ] }) : n ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
809
809
  "Failed to load collections: ",
810
810
  n.message
811
- ] }) : p.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: p.map((f) => {
812
- const s = t.includes(f.id);
811
+ ] }) : p.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: p.map((x) => {
812
+ const s = i.includes(x.id);
813
813
  return /* @__PURE__ */ l(
814
814
  "li",
815
815
  {
@@ -819,63 +819,63 @@ function Ct({
819
819
  "input",
820
820
  {
821
821
  type: "checkbox",
822
- id: `collection-${f.id}`,
822
+ id: `collection-${x.id}`,
823
823
  checked: s,
824
- onChange: () => s ? r(f.id) : i(f.id),
824
+ onChange: () => s ? r(x.id) : t(x.id),
825
825
  className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
826
826
  }
827
827
  ),
828
828
  /* @__PURE__ */ l(
829
829
  "label",
830
830
  {
831
- htmlFor: `collection-${f.id}`,
831
+ htmlFor: `collection-${x.id}`,
832
832
  className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
833
833
  children: [
834
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: f.title ?? f.id }),
835
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: f.id }),
836
- f.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: f.description })
834
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: x.title ?? x.id }),
835
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: x.id }),
836
+ x.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: x.description })
837
837
  ]
838
838
  }
839
839
  )
840
840
  ]
841
841
  },
842
- f.id
842
+ x.id
843
843
  );
844
844
  }) });
845
845
  }
846
- function Na({ value: e, onChange: t, availableIcons: i }) {
847
- const [r, p] = T(!1), [u, n] = T(-1), f = V(null), s = ze(), g = u >= 0 ? `${s}-option-${u}` : void 0, d = Ue(() => {
848
- if (!i || i.length === 0) return [];
849
- if (!e) return i;
846
+ function Na({ value: e, onChange: i, availableIcons: t }) {
847
+ const [r, p] = T(!1), [u, n] = T(-1), x = H(null), s = ze(), g = u >= 0 ? `${s}-option-${u}` : void 0, d = Ue(() => {
848
+ if (!t || t.length === 0) return [];
849
+ if (!e) return t;
850
850
  const v = e.toLowerCase();
851
- return i.filter((C) => C.toLowerCase().includes(v));
852
- }, [i, e]), x = r && d.length > 0, c = Be(
851
+ return t.filter((C) => C.toLowerCase().includes(v));
852
+ }, [t, e]), w = r && d.length > 0, c = Be(
853
853
  (v) => {
854
- t(v), p(!1), n(-1);
854
+ i(v), p(!1), n(-1);
855
855
  },
856
- [t]
856
+ [i]
857
857
  ), o = (v) => {
858
- t(v.target.value), p(!0), n(-1);
858
+ i(v.target.value), p(!0), n(-1);
859
859
  }, h = (v) => {
860
- x && (v.key === "ArrowDown" ? (v.preventDefault(), n((C) => Math.min(C + 1, d.length - 1))) : v.key === "ArrowUp" ? (v.preventDefault(), n((C) => Math.max(C - 1, 0))) : v.key === "Enter" && u >= 0 ? (v.preventDefault(), c(d[u])) : v.key === "Escape" && (p(!1), n(-1)));
860
+ w && (v.key === "ArrowDown" ? (v.preventDefault(), n((C) => Math.min(C + 1, d.length - 1))) : v.key === "ArrowUp" ? (v.preventDefault(), n((C) => Math.max(C - 1, 0))) : v.key === "Enter" && u >= 0 ? (v.preventDefault(), c(d[u])) : v.key === "Escape" && (p(!1), n(-1)));
861
861
  };
862
- G(() => {
862
+ q(() => {
863
863
  const v = (C) => {
864
- f.current && !f.current.contains(C.target) && (p(!1), n(-1));
864
+ x.current && !x.current.contains(C.target) && (p(!1), n(-1));
865
865
  };
866
866
  return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
867
867
  }, []);
868
- const w = "mapui:w-full mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
869
- return !i || i.length === 0 ? /* @__PURE__ */ a(
868
+ const N = "mapui:w-full mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
869
+ return !t || t.length === 0 ? /* @__PURE__ */ a(
870
870
  "input",
871
871
  {
872
872
  type: "text",
873
873
  value: e,
874
- onChange: (v) => t(v.target.value || ""),
874
+ onChange: (v) => i(v.target.value || ""),
875
875
  placeholder: "icon-name",
876
- className: w
876
+ className: N
877
877
  }
878
- ) : /* @__PURE__ */ l("div", { ref: f, className: "mapui:relative", children: [
878
+ ) : /* @__PURE__ */ l("div", { ref: x, className: "mapui:relative", children: [
879
879
  /* @__PURE__ */ a(
880
880
  "input",
881
881
  {
@@ -883,17 +883,17 @@ function Na({ value: e, onChange: t, availableIcons: i }) {
883
883
  value: e,
884
884
  placeholder: "Search icons…",
885
885
  role: "combobox",
886
- "aria-expanded": x,
886
+ "aria-expanded": w,
887
887
  "aria-autocomplete": "list",
888
888
  "aria-controls": s,
889
889
  "aria-activedescendant": g,
890
890
  onChange: o,
891
891
  onFocus: () => p(!0),
892
892
  onKeyDown: h,
893
- className: w
893
+ className: N
894
894
  }
895
895
  ),
896
- x && /* @__PURE__ */ a(
896
+ w && /* @__PURE__ */ a(
897
897
  "ul",
898
898
  {
899
899
  id: s,
@@ -905,8 +905,8 @@ function Na({ value: e, onChange: t, availableIcons: i }) {
905
905
  id: `${s}-option-${C}`,
906
906
  role: "option",
907
907
  "aria-selected": C === u,
908
- onMouseDown: (A) => {
909
- A.preventDefault(), c(v);
908
+ onMouseDown: (E) => {
909
+ E.preventDefault(), c(v);
910
910
  },
911
911
  className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${C === u ? "mapui:bg-blue-100" : "hover:mapui:bg-gray-50"}`,
912
912
  children: v
@@ -936,185 +936,185 @@ function va(e) {
936
936
  return e[0] === "interpolate" ? "interpolate" : "match";
937
937
  }
938
938
  function ka(e) {
939
- const t = Array.isArray(e[1]) ? e[1][1] ?? "" : "", i = e[e.length - 1] ?? "#000000", r = [];
939
+ const i = Array.isArray(e[1]) ? e[1][1] ?? "" : "", t = e[e.length - 1] ?? "#000000", r = [];
940
940
  for (let p = 2; p < e.length - 1; p += 2)
941
941
  r.push({ value: String(e[p] ?? ""), color: e[p + 1] ?? "#000000" });
942
- return { property: t, pairs: r, fallback: i };
942
+ return { property: i, pairs: r, fallback: t };
943
943
  }
944
- function ve(e, t, i) {
944
+ function ve(e, i, t) {
945
945
  const r = ["match", ["get", e]];
946
- for (const p of t)
946
+ for (const p of i)
947
947
  r.push(p.value, p.color);
948
- return r.push(i), r;
948
+ return r.push(t), r;
949
949
  }
950
950
  function ne(e) {
951
- const t = e[2];
952
- let i = "";
953
- Array.isArray(t) && (t[0] === "to-number" && Array.isArray(t[1]) ? i = t[1][1] ?? "" : i = t[1] ?? "");
951
+ const i = e[2];
952
+ let t = "";
953
+ Array.isArray(i) && (i[0] === "to-number" && Array.isArray(i[1]) ? t = i[1][1] ?? "" : t = i[1] ?? "");
954
954
  const r = [];
955
955
  for (let p = 3; p < e.length; p += 2)
956
956
  r.push({ stop: Number(e[p] ?? 0), color: e[p + 1] ?? "#000000" });
957
- return { property: i, stops: r };
957
+ return { property: t, stops: r };
958
958
  }
959
- function ke(e, t) {
960
- const i = ["interpolate", ["linear"], ["to-number", ["get", e]]];
961
- for (const r of t)
962
- i.push(r.stop, r.color);
963
- return i;
959
+ function ke(e, i) {
960
+ const t = ["interpolate", ["linear"], ["to-number", ["get", e]]];
961
+ for (const r of i)
962
+ t.push(r.stop, r.color);
963
+ return t;
964
964
  }
965
965
  function Ce(e) {
966
- return e.map((t) => ({ stopText: String(t.stop), color: t.color }));
966
+ return e.map((i) => ({ stopText: String(i.stop), color: i.color }));
967
967
  }
968
968
  function Ca(e) {
969
- return e.map((t, i) => {
970
- if (t.stopText.trim() === "") return "Value required";
971
- const r = parseFloat(t.stopText);
969
+ return e.map((i, t) => {
970
+ if (i.stopText.trim() === "") return "Value required";
971
+ const r = parseFloat(i.stopText);
972
972
  if (isNaN(r)) return "Must be a number";
973
- if (i > 0) {
974
- const p = parseFloat(e[i - 1].stopText);
973
+ if (t > 0) {
974
+ const p = parseFloat(e[t - 1].stopText);
975
975
  if (!isNaN(p) && r <= p) return "Must be greater than previous stop";
976
976
  }
977
977
  return "";
978
978
  });
979
979
  }
980
980
  function Sa(e) {
981
- const t = [];
982
- for (const i of e) {
983
- const r = parseFloat(i.stopText);
981
+ const i = [];
982
+ for (const t of e) {
983
+ const r = parseFloat(t.stopText);
984
984
  if (isNaN(r)) return null;
985
- t.push({ stop: r, color: i.color });
985
+ i.push({ stop: r, color: t.color });
986
986
  }
987
- return t;
987
+ return i;
988
988
  }
989
989
  const ae = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", ue = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50", Se = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50";
990
990
  function Ta({
991
991
  value: e,
992
- onChange: t,
993
- availableProperties: i = [],
992
+ onChange: i,
993
+ availableProperties: t = [],
994
994
  onFetchDistinctValues: r
995
995
  }) {
996
- const [p, u] = T(() => va(e)), [n, f] = T(!1), s = ka(e), g = p === "match" ? s.property : "", d = p === "match" ? s.pairs : [], x = p === "match" ? s.fallback : "#000000", [c, o] = T(() => {
997
- const y = ne(e);
998
- return Ce(y.stops);
999
- }), [h, w] = T(() => p === "interpolate" ? ne(e).property : ""), [v, C] = T([]), A = V(e);
1000
- G(() => {
1001
- if (A.current !== e && p === "interpolate") {
1002
- const y = ne(e);
1003
- o(Ce(y.stops)), w(y.property), C([]);
996
+ const [p, u] = T(() => va(e)), [n, x] = T(!1), s = ka(e), g = p === "match" ? s.property : "", d = p === "match" ? s.pairs : [], w = p === "match" ? s.fallback : "#000000", [c, o] = T(() => {
997
+ const f = ne(e);
998
+ return Ce(f.stops);
999
+ }), [h, N] = T(() => p === "interpolate" ? ne(e).property : ""), [v, C] = T([]), E = H(e);
1000
+ q(() => {
1001
+ if (E.current !== e && p === "interpolate") {
1002
+ const f = ne(e);
1003
+ o(Ce(f.stops)), N(f.property), C([]);
1004
1004
  }
1005
- A.current = e;
1005
+ E.current = e;
1006
1006
  }, [e, p]);
1007
- const j = i.filter(
1008
- (y) => !y.type || y.type === "string"
1009
- ), m = i.filter(
1010
- (y) => y.type === "number" || y.type === "integer"
1011
- ), I = (y, D, E) => {
1012
- t(ve(y, D, E));
1013
- }, F = (y) => {
1014
- I(y, d, x);
1015
- }, b = (y) => {
1016
- I(g, d, y);
1017
- }, M = (y, D) => {
1018
- const E = d.map((L, B) => B === y ? { ...L, value: D } : L);
1019
- I(g, E, x);
1020
- }, P = (y, D) => {
1021
- const E = d.map((L, B) => B === y ? { ...L, color: D } : L);
1022
- I(g, E, x);
1023
- }, N = (y) => {
1024
- const D = d.filter((E, L) => L !== y);
1025
- I(g, D, x);
1007
+ const O = t.filter(
1008
+ (f) => !f.type || f.type === "string"
1009
+ ), m = t.filter(
1010
+ (f) => f.type === "number" || f.type === "integer"
1011
+ ), L = (f, D, I) => {
1012
+ i(ve(f, D, I));
1013
+ }, F = (f) => {
1014
+ L(f, d, w);
1015
+ }, b = (f) => {
1016
+ L(g, d, f);
1017
+ }, M = (f, D) => {
1018
+ const I = d.map((A, B) => B === f ? { ...A, value: D } : A);
1019
+ L(g, I, w);
1020
+ }, P = (f, D) => {
1021
+ const I = d.map((A, B) => B === f ? { ...A, color: D } : A);
1022
+ L(g, I, w);
1023
+ }, y = (f) => {
1024
+ const D = d.filter((I, A) => A !== f);
1025
+ L(g, D, w);
1026
1026
  }, k = () => {
1027
- const y = [...d, { value: "", color: pe(d.length) }];
1028
- I(g, y, x);
1029
- }, O = async () => {
1027
+ const f = [...d, { value: "", color: pe(d.length) }];
1028
+ L(g, f, w);
1029
+ }, j = async () => {
1030
1030
  if (!(!r || !g)) {
1031
- f(!0);
1031
+ x(!0);
1032
1032
  try {
1033
- const D = (await r(g)).map((E, L) => ({
1034
- value: E,
1035
- color: pe(L)
1033
+ const D = (await r(g)).map((I, A) => ({
1034
+ value: I,
1035
+ color: pe(A)
1036
1036
  }));
1037
- I(g, D, x);
1037
+ L(g, D, w);
1038
1038
  } finally {
1039
- f(!1);
1039
+ x(!1);
1040
1040
  }
1041
1041
  }
1042
- }, R = (y, D) => {
1043
- const E = Ca(D);
1044
- if (C(E), y && D.length >= 2 && E.every((L) => !L)) {
1045
- const L = Sa(D);
1046
- L && t(ke(y, L));
1042
+ }, R = (f, D) => {
1043
+ const I = Ca(D);
1044
+ if (C(I), f && D.length >= 2 && I.every((A) => !A)) {
1045
+ const A = Sa(D);
1046
+ A && i(ke(f, A));
1047
1047
  }
1048
- }, W = (y) => {
1049
- w(y), R(y, c);
1050
- }, U = (y, D) => {
1051
- const E = c.map((L, B) => B === y ? { ...L, stopText: D } : L);
1052
- o(E), R(h, E);
1053
- }, q = (y, D) => {
1054
- const E = c.map((L, B) => B === y ? { ...L, color: D } : L);
1055
- o(E), R(h, E);
1056
- }, K = (y) => {
1057
- const D = c.filter((E, L) => L !== y);
1048
+ }, W = (f) => {
1049
+ N(f), R(f, c);
1050
+ }, U = (f, D) => {
1051
+ const I = c.map((A, B) => B === f ? { ...A, stopText: D } : A);
1052
+ o(I), R(h, I);
1053
+ }, G = (f, D) => {
1054
+ const I = c.map((A, B) => B === f ? { ...A, color: D } : A);
1055
+ o(I), R(h, I);
1056
+ }, J = (f) => {
1057
+ const D = c.filter((I, A) => A !== f);
1058
1058
  o(D), R(h, D);
1059
- }, Q = () => {
1059
+ }, K = () => {
1060
1060
  var B;
1061
- const y = ((B = c[c.length - 1]) == null ? void 0 : B.stopText) ?? "0", D = parseFloat(y), E = isNaN(D) ? 0 : D + 10, L = [...c, { stopText: String(E), color: pe(c.length) }];
1062
- o(L), R(h, L);
1063
- }, Z = (y) => {
1064
- u(y), y === "match" ? t(ve("", [], "#000000")) : (o([]), w(""), C([]), t(ke("", [])));
1061
+ const f = ((B = c[c.length - 1]) == null ? void 0 : B.stopText) ?? "0", D = parseFloat(f), I = isNaN(D) ? 0 : D + 10, A = [...c, { stopText: String(I), color: pe(c.length) }];
1062
+ o(A), R(h, A);
1063
+ }, Q = (f) => {
1064
+ u(f), f === "match" ? i(ve("", [], "#000000")) : (o([]), N(""), C([]), i(ke("", [])));
1065
1065
  };
1066
1066
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1067
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((y) => /* @__PURE__ */ a(
1067
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((f) => /* @__PURE__ */ a(
1068
1068
  "button",
1069
1069
  {
1070
1070
  type: "button",
1071
- onClick: () => Z(y),
1071
+ onClick: () => Q(f),
1072
1072
  className: [
1073
1073
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-xs mapui:capitalize mapui:outline-none",
1074
1074
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
1075
- p === y ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1075
+ p === f ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1076
1076
  ].join(" "),
1077
- children: y === "match" ? "Categorical" : "Gradient"
1077
+ children: f === "match" ? "Categorical" : "Gradient"
1078
1078
  },
1079
- y
1079
+ f
1080
1080
  )) }),
1081
1081
  p === "match" && /* @__PURE__ */ l(z, { children: [
1082
1082
  /* @__PURE__ */ l(
1083
1083
  "select",
1084
1084
  {
1085
1085
  value: g,
1086
- onChange: (y) => F(y.target.value),
1086
+ onChange: (f) => F(f.target.value),
1087
1087
  className: ae,
1088
1088
  children: [
1089
1089
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
1090
- j.map((y) => /* @__PURE__ */ a("option", { value: y.name, children: y.title ?? y.name }, y.name))
1090
+ O.map((f) => /* @__PURE__ */ a("option", { value: f.name, children: f.title ?? f.name }, f.name))
1091
1091
  ]
1092
1092
  }
1093
1093
  ),
1094
- d.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: d.map((y, D) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1094
+ d.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: d.map((f, D) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1095
1095
  /* @__PURE__ */ a(
1096
1096
  "input",
1097
1097
  {
1098
1098
  type: "text",
1099
- value: y.value,
1100
- onChange: (E) => M(D, E.target.value),
1099
+ value: f.value,
1100
+ onChange: (I) => M(D, I.target.value),
1101
1101
  placeholder: "value",
1102
1102
  className: `${ae} mapui:flex-1`
1103
1103
  }
1104
1104
  ),
1105
1105
  /* @__PURE__ */ a(
1106
- J,
1106
+ Z,
1107
1107
  {
1108
- value: y.color,
1109
- onChange: (E) => P(D, E),
1110
- label: `Color for "${y.value}"`
1108
+ value: f.color,
1109
+ onChange: (I) => P(D, I),
1110
+ label: `Color for "${f.value}"`
1111
1111
  }
1112
1112
  ),
1113
- /* @__PURE__ */ a("button", { type: "button", onClick: () => N(D), className: Se, children: "×" })
1113
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => y(D), className: Se, children: "×" })
1114
1114
  ] }, D)) }),
1115
1115
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1116
1116
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500 mapui:shrink-0", children: "Fallback:" }),
1117
- /* @__PURE__ */ a(J, { value: x, onChange: b, label: "Fallback color" })
1117
+ /* @__PURE__ */ a(Z, { value: w, onChange: b, label: "Fallback color" })
1118
1118
  ] }),
1119
1119
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
1120
1120
  /* @__PURE__ */ a("button", { type: "button", onClick: k, className: ue, children: "+ Add value" }),
@@ -1122,7 +1122,7 @@ function Ta({
1122
1122
  "button",
1123
1123
  {
1124
1124
  type: "button",
1125
- onClick: O,
1125
+ onClick: j,
1126
1126
  disabled: n,
1127
1127
  className: ue,
1128
1128
  children: n ? "Loading…" : "Auto-populate"
@@ -1135,16 +1135,16 @@ function Ta({
1135
1135
  "select",
1136
1136
  {
1137
1137
  value: h,
1138
- onChange: (y) => W(y.target.value),
1138
+ onChange: (f) => W(f.target.value),
1139
1139
  className: ae,
1140
1140
  children: [
1141
1141
  /* @__PURE__ */ a("option", { value: "", children: "Select a numeric property…" }),
1142
- m.map((y) => /* @__PURE__ */ a("option", { value: y.name, children: y.title ?? y.name }, y.name))
1142
+ m.map((f) => /* @__PURE__ */ a("option", { value: f.name, children: f.title ?? f.name }, f.name))
1143
1143
  ]
1144
1144
  }
1145
1145
  ),
1146
- c.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: c.map((y, D) => {
1147
- const E = v[D];
1146
+ c.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: c.map((f, D) => {
1147
+ const I = v[D];
1148
1148
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
1149
1149
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1150
1150
  /* @__PURE__ */ a(
@@ -1152,44 +1152,44 @@ function Ta({
1152
1152
  {
1153
1153
  type: "text",
1154
1154
  inputMode: "numeric",
1155
- value: y.stopText,
1156
- onChange: (L) => U(D, L.target.value),
1155
+ value: f.stopText,
1156
+ onChange: (A) => U(D, A.target.value),
1157
1157
  placeholder: "stop",
1158
1158
  className: `${ae} mapui:w-24`
1159
1159
  }
1160
1160
  ),
1161
1161
  /* @__PURE__ */ a(
1162
- J,
1162
+ Z,
1163
1163
  {
1164
- value: y.color,
1165
- onChange: (L) => q(D, L),
1166
- label: `Color at stop ${y.stopText}`
1164
+ value: f.color,
1165
+ onChange: (A) => G(D, A),
1166
+ label: `Color at stop ${f.stopText}`
1167
1167
  }
1168
1168
  ),
1169
- /* @__PURE__ */ a("button", { type: "button", onClick: () => K(D), className: Se, children: "×" })
1169
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => J(D), className: Se, children: "×" })
1170
1170
  ] }),
1171
- E && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: E })
1171
+ I && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-500", children: I })
1172
1172
  ] }, D);
1173
1173
  }) }),
1174
- /* @__PURE__ */ a("button", { type: "button", onClick: Q, className: ue, children: "+ Add stop" })
1174
+ /* @__PURE__ */ a("button", { type: "button", onClick: K, className: ue, children: "+ Add stop" })
1175
1175
  ] })
1176
1176
  ] });
1177
1177
  }
1178
- const H = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1178
+ const Y = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1179
1179
  function Da({
1180
1180
  value: e,
1181
- onChange: t
1181
+ onChange: i
1182
1182
  }) {
1183
- const i = (e == null ? void 0 : e[0]) ?? 0, r = (e == null ? void 0 : e[1]) ?? 0;
1183
+ const t = (e == null ? void 0 : e[0]) ?? 0, r = (e == null ? void 0 : e[1]) ?? 0;
1184
1184
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1185
1185
  /* @__PURE__ */ a(
1186
1186
  "input",
1187
1187
  {
1188
1188
  type: "number",
1189
1189
  step: 0.5,
1190
- value: i,
1191
- onChange: (p) => t([parseFloat(p.target.value) || 0, r]),
1192
- className: `${H} mapui:w-20`,
1190
+ value: t,
1191
+ onChange: (p) => i([parseFloat(p.target.value) || 0, r]),
1192
+ className: `${Y} mapui:w-20`,
1193
1193
  "aria-label": "X",
1194
1194
  placeholder: "X"
1195
1195
  }
@@ -1200,8 +1200,8 @@ function Da({
1200
1200
  type: "number",
1201
1201
  step: 0.5,
1202
1202
  value: r,
1203
- onChange: (p) => t([i, parseFloat(p.target.value) || 0]),
1204
- className: `${H} mapui:w-20`,
1203
+ onChange: (p) => i([t, parseFloat(p.target.value) || 0]),
1204
+ className: `${Y} mapui:w-20`,
1205
1205
  "aria-label": "Y",
1206
1206
  placeholder: "Y"
1207
1207
  }
@@ -1210,9 +1210,9 @@ function Da({
1210
1210
  }
1211
1211
  function La({
1212
1212
  value: e,
1213
- onChange: t
1213
+ onChange: i
1214
1214
  }) {
1215
- const i = e ?? 1;
1215
+ const t = e ?? 1;
1216
1216
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1217
1217
  /* @__PURE__ */ a(
1218
1218
  "input",
@@ -1221,26 +1221,26 @@ function La({
1221
1221
  min: 0,
1222
1222
  max: 1,
1223
1223
  step: 0.01,
1224
- value: i,
1225
- onChange: (r) => t(parseFloat(r.target.value)),
1224
+ value: t,
1225
+ onChange: (r) => i(parseFloat(r.target.value)),
1226
1226
  className: "mapui:flex-1"
1227
1227
  }
1228
1228
  ),
1229
- /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
1229
+ /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: t.toFixed(2) })
1230
1230
  ] });
1231
1231
  }
1232
1232
  function Te({
1233
1233
  def: e,
1234
- value: t,
1235
- onChange: i,
1234
+ value: i,
1235
+ onChange: t,
1236
1236
  availableIcons: r,
1237
1237
  availableProperties: p,
1238
1238
  onFetchDistinctValues: u
1239
1239
  }) {
1240
- var n, f;
1240
+ var n, x;
1241
1241
  switch (e.widget) {
1242
1242
  case "color": {
1243
- const s = Array.isArray(t), g = s ? t[t.length - 1] ?? "#000000" : "#000000";
1243
+ const s = Array.isArray(i), g = s ? i[i.length - 1] ?? "#000000" : "#000000";
1244
1244
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1 mapui:w-full", children: [
1245
1245
  /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-end", children: /* @__PURE__ */ a(
1246
1246
  "button",
@@ -1248,7 +1248,7 @@ function Te({
1248
1248
  type: "button",
1249
1249
  title: s ? "Switch to static color" : "Switch to data-driven color",
1250
1250
  onClick: () => {
1251
- i(s ? g : ["match", ["get", ""], g]);
1251
+ t(s ? g : ["match", ["get", ""], g]);
1252
1252
  },
1253
1253
  className: [
1254
1254
  "mapui:cursor-pointer mapui:rounded mapui:border mapui:px-1.5 mapui:py-0.5 mapui:font-mono mapui:text-xs mapui:outline-none",
@@ -1261,16 +1261,16 @@ function Te({
1261
1261
  s ? /* @__PURE__ */ a(
1262
1262
  Ta,
1263
1263
  {
1264
- value: t,
1265
- onChange: (d) => i(d),
1264
+ value: i,
1265
+ onChange: (d) => t(d),
1266
1266
  availableProperties: p,
1267
1267
  onFetchDistinctValues: u
1268
1268
  }
1269
1269
  ) : /* @__PURE__ */ a(
1270
- J,
1270
+ Z,
1271
1271
  {
1272
- value: t ?? "#000000",
1273
- onChange: i,
1272
+ value: i ?? "#000000",
1273
+ onChange: t,
1274
1274
  label: e.label
1275
1275
  }
1276
1276
  )
@@ -1280,8 +1280,8 @@ function Te({
1280
1280
  return /* @__PURE__ */ a(
1281
1281
  La,
1282
1282
  {
1283
- value: t,
1284
- onChange: i
1283
+ value: i,
1284
+ onChange: t
1285
1285
  }
1286
1286
  );
1287
1287
  case "number":
@@ -1292,9 +1292,9 @@ function Te({
1292
1292
  min: e.min,
1293
1293
  max: e.max,
1294
1294
  step: e.step ?? 1,
1295
- value: t ?? e.min ?? 0,
1296
- onChange: (s) => i(parseFloat(s.target.value) || 0),
1297
- className: H
1295
+ value: i ?? e.min ?? 0,
1296
+ onChange: (s) => t(parseFloat(s.target.value) || 0),
1297
+ className: Y
1298
1298
  }
1299
1299
  );
1300
1300
  case "boolean":
@@ -1302,8 +1302,8 @@ function Te({
1302
1302
  "input",
1303
1303
  {
1304
1304
  type: "checkbox",
1305
- checked: t ?? !1,
1306
- onChange: (s) => i(s.target.checked),
1305
+ checked: i ?? !1,
1306
+ onChange: (s) => t(s.target.checked),
1307
1307
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1308
1308
  }
1309
1309
  );
@@ -1311,44 +1311,44 @@ function Te({
1311
1311
  return /* @__PURE__ */ a(
1312
1312
  "select",
1313
1313
  {
1314
- value: t ?? ((n = e.options) == null ? void 0 : n[0]) ?? "",
1315
- onChange: (s) => i(s.target.value),
1316
- className: H,
1317
- children: (f = e.options) == null ? void 0 : f.map((s) => /* @__PURE__ */ a("option", { value: s, children: s }, s))
1314
+ value: i ?? ((n = e.options) == null ? void 0 : n[0]) ?? "",
1315
+ onChange: (s) => t(s.target.value),
1316
+ className: Y,
1317
+ children: (x = e.options) == null ? void 0 : x.map((s) => /* @__PURE__ */ a("option", { value: s, children: s }, s))
1318
1318
  }
1319
1319
  );
1320
1320
  case "translate":
1321
1321
  return /* @__PURE__ */ a(
1322
1322
  Da,
1323
1323
  {
1324
- value: t,
1325
- onChange: i
1324
+ value: i,
1325
+ onChange: t
1326
1326
  }
1327
1327
  );
1328
1328
  case "dasharray":
1329
1329
  case "stringArray": {
1330
- const s = t, g = s ? s.join(", ") : "";
1330
+ const s = i, g = s ? s.join(", ") : "";
1331
1331
  return /* @__PURE__ */ a(
1332
1332
  "input",
1333
1333
  {
1334
1334
  type: "text",
1335
1335
  value: g,
1336
1336
  onChange: (d) => {
1337
- const x = d.target.value.trim();
1338
- if (!x) {
1339
- i(void 0);
1337
+ const w = d.target.value.trim();
1338
+ if (!w) {
1339
+ t(void 0);
1340
1340
  return;
1341
1341
  }
1342
1342
  if (e.widget === "dasharray") {
1343
- const c = x.split(",").map((o) => parseFloat(o.trim())).filter((o) => !isNaN(o));
1344
- i(c.length > 0 ? c : void 0);
1343
+ const c = w.split(",").map((o) => parseFloat(o.trim())).filter((o) => !isNaN(o));
1344
+ t(c.length > 0 ? c : void 0);
1345
1345
  } else {
1346
- const c = x.split(",").map((o) => o.trim()).filter(Boolean);
1347
- i(c.length > 0 ? c : void 0);
1346
+ const c = w.split(",").map((o) => o.trim()).filter(Boolean);
1347
+ t(c.length > 0 ? c : void 0);
1348
1348
  }
1349
1349
  },
1350
1350
  placeholder: e.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
1351
- className: H
1351
+ className: Y
1352
1352
  }
1353
1353
  );
1354
1354
  }
@@ -1357,17 +1357,17 @@ function Te({
1357
1357
  "input",
1358
1358
  {
1359
1359
  type: "text",
1360
- value: t ?? "",
1361
- onChange: (s) => i(s.target.value || void 0),
1362
- className: H
1360
+ value: i ?? "",
1361
+ onChange: (s) => t(s.target.value || void 0),
1362
+ className: Y
1363
1363
  }
1364
1364
  );
1365
1365
  case "icon-image":
1366
1366
  return /* @__PURE__ */ a(
1367
1367
  Na,
1368
1368
  {
1369
- value: t ?? "",
1370
- onChange: (s) => i(s ?? void 0),
1369
+ value: i ?? "",
1370
+ onChange: (s) => t(s ?? void 0),
1371
1371
  availableIcons: r
1372
1372
  }
1373
1373
  );
@@ -1375,17 +1375,17 @@ function Te({
1375
1375
  return null;
1376
1376
  }
1377
1377
  }
1378
- function Aa({ def: e, value: t, onChange: i, availableIcons: r, availableProperties: p, onFetchDistinctValues: u }) {
1379
- const n = e.enableDefault !== void 0, f = t !== void 0;
1378
+ function Aa({ def: e, value: i, onChange: t, availableIcons: r, availableProperties: p, onFetchDistinctValues: u }) {
1379
+ const n = e.enableDefault !== void 0, x = i !== void 0;
1380
1380
  if (n && e.widget === "boolean") {
1381
1381
  const s = !e.enableDefault;
1382
1382
  return /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
1383
1383
  "input",
1384
1384
  {
1385
1385
  type: "checkbox",
1386
- checked: t === s,
1386
+ checked: i === s,
1387
1387
  onChange: (g) => {
1388
- i(e.key, g.target.checked ? s : void 0);
1388
+ t(e.key, g.target.checked ? s : void 0);
1389
1389
  },
1390
1390
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1391
1391
  }
@@ -1396,19 +1396,19 @@ function Aa({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
1396
1396
  "input",
1397
1397
  {
1398
1398
  type: "checkbox",
1399
- checked: f,
1399
+ checked: x,
1400
1400
  onChange: (s) => {
1401
- i(e.key, s.target.checked ? e.enableDefault : void 0);
1401
+ t(e.key, s.target.checked ? e.enableDefault : void 0);
1402
1402
  },
1403
1403
  className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
1404
1404
  }
1405
1405
  ),
1406
- f && /* @__PURE__ */ a(
1406
+ x && /* @__PURE__ */ a(
1407
1407
  Te,
1408
1408
  {
1409
1409
  def: e,
1410
- value: t,
1411
- onChange: (s) => i(e.key, s),
1410
+ value: i,
1411
+ onChange: (s) => t(e.key, s),
1412
1412
  availableIcons: r,
1413
1413
  availableProperties: p,
1414
1414
  onFetchDistinctValues: u
@@ -1418,8 +1418,8 @@ function Aa({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
1418
1418
  Te,
1419
1419
  {
1420
1420
  def: e,
1421
- value: t,
1422
- onChange: (s) => i(e.key, s),
1421
+ value: i,
1422
+ onChange: (s) => t(e.key, s),
1423
1423
  availableIcons: r,
1424
1424
  availableProperties: p,
1425
1425
  onFetchDistinctValues: u
@@ -1428,31 +1428,31 @@ function Aa({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
1428
1428
  }
1429
1429
  function De({
1430
1430
  title: e,
1431
- properties: t,
1432
- values: i,
1431
+ properties: i,
1432
+ values: t,
1433
1433
  onChange: r,
1434
1434
  defaultOpen: p = !1,
1435
1435
  availableIcons: u,
1436
1436
  availableProperties: n,
1437
- onFetchDistinctValues: f
1437
+ onFetchDistinctValues: x
1438
1438
  }) {
1439
- const s = t.filter(
1440
- (g) => g.enableDefault !== void 0 && i[g.key] !== void 0
1439
+ const s = i.filter(
1440
+ (g) => g.enableDefault !== void 0 && t[g.key] !== void 0
1441
1441
  ).length;
1442
- return /* @__PURE__ */ a(X, { title: e, defaultOpen: p, badge: s || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: t.map((g) => /* @__PURE__ */ a(
1442
+ return /* @__PURE__ */ a(X, { title: e, defaultOpen: p, badge: s || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: i.map((g) => /* @__PURE__ */ a(
1443
1443
  Aa,
1444
1444
  {
1445
1445
  def: g,
1446
- value: i[g.key],
1446
+ value: t[g.key],
1447
1447
  onChange: r,
1448
1448
  availableIcons: u,
1449
1449
  availableProperties: n,
1450
- onFetchDistinctValues: f
1450
+ onFetchDistinctValues: x
1451
1451
  },
1452
1452
  g.key
1453
1453
  )) }) });
1454
1454
  }
1455
- function _(e) {
1455
+ function V(e) {
1456
1456
  return Array.isArray(e);
1457
1457
  }
1458
1458
  function Ea(e) {
@@ -1460,46 +1460,46 @@ function Ea(e) {
1460
1460
  }
1461
1461
  function We(e) {
1462
1462
  if (e[0] === "match") {
1463
- const t = [];
1463
+ const i = [];
1464
1464
  for (let r = 3; r < e.length; r += 2)
1465
- typeof e[r] == "string" && t.push(e[r]);
1466
- const i = e[e.length - 1];
1467
- return typeof i == "string" && t.push(i), t;
1465
+ typeof e[r] == "string" && i.push(e[r]);
1466
+ const t = e[e.length - 1];
1467
+ return typeof t == "string" && i.push(t), i;
1468
1468
  }
1469
1469
  if (e[0] === "interpolate") {
1470
- const t = [];
1471
- for (let i = 4; i < e.length; i += 2)
1472
- typeof e[i] == "string" && t.push(e[i]);
1473
- return t;
1470
+ const i = [];
1471
+ for (let t = 4; t < e.length; t += 2)
1472
+ typeof e[t] == "string" && i.push(e[t]);
1473
+ return i;
1474
1474
  }
1475
1475
  return [];
1476
1476
  }
1477
1477
  function Ia(e) {
1478
1478
  if (e[0] === "match") {
1479
- const t = [];
1479
+ const i = [];
1480
1480
  for (let r = 2; r < e.length - 1; r += 2) {
1481
1481
  const p = String(e[r]), u = e[r + 1];
1482
- typeof u == "string" && t.push({ label: p, color: u });
1482
+ typeof u == "string" && i.push({ label: p, color: u });
1483
1483
  }
1484
- const i = e[e.length - 1];
1485
- return typeof i == "string" && t.push({ label: "Other", color: i }), t;
1484
+ const t = e[e.length - 1];
1485
+ return typeof t == "string" && i.push({ label: "Other", color: t }), i;
1486
1486
  }
1487
1487
  if (e[0] === "interpolate") {
1488
- const t = [];
1489
- for (let i = 3; i < e.length; i += 2) {
1490
- const r = String(e[i]), p = e[i + 1];
1491
- typeof p == "string" && t.push({ label: r, color: p });
1488
+ const i = [];
1489
+ for (let t = 3; t < e.length; t += 2) {
1490
+ const r = String(e[t]), p = e[t + 1];
1491
+ typeof p == "string" && i.push({ label: r, color: p });
1492
1492
  }
1493
- return t;
1493
+ return i;
1494
1494
  }
1495
1495
  return [];
1496
1496
  }
1497
1497
  function Ma(e) {
1498
- const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1499
- if (Array.isArray(t)) {
1500
- if (t[0] === "get" && typeof t[1] == "string") return t[1];
1501
- if (t[0] === "to-number" && Array.isArray(t[1]) && t[1][0] === "get")
1502
- return t[1][1] ?? null;
1498
+ const i = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1499
+ if (Array.isArray(i)) {
1500
+ if (i[0] === "get" && typeof i[1] == "string") return i[1];
1501
+ if (i[0] === "to-number" && Array.isArray(i[1]) && i[1][0] === "get")
1502
+ return i[1][1] ?? null;
1503
1503
  }
1504
1504
  return null;
1505
1505
  }
@@ -1526,23 +1526,23 @@ function Pa(e) {
1526
1526
  return "circle";
1527
1527
  }
1528
1528
  }
1529
- function oe({ expr: e, height: t }) {
1530
- const i = We(e);
1531
- if (i.length === 0)
1529
+ function oe({ expr: e, height: i }) {
1530
+ const t = We(e);
1531
+ if (t.length === 0)
1532
1532
  return /* @__PURE__ */ a(
1533
1533
  "div",
1534
1534
  {
1535
- style: { width: "100%", height: t ?? 32, background: "#e5e7eb", borderRadius: 4 },
1535
+ style: { width: "100%", height: i ?? 32, background: "#e5e7eb", borderRadius: 4 },
1536
1536
  title: "Expression (no preview)"
1537
1537
  }
1538
1538
  );
1539
- const r = e[0] === "interpolate", p = r ? `linear-gradient(to right, ${i.join(", ")})` : i.map((u, n) => `${u} ${n / i.length * 100}% ${(n + 1) / i.length * 100}%`).join(", ");
1539
+ const r = e[0] === "interpolate", p = r ? `linear-gradient(to right, ${t.join(", ")})` : t.map((u, n) => `${u} ${n / t.length * 100}% ${(n + 1) / t.length * 100}%`).join(", ");
1540
1540
  return /* @__PURE__ */ a(
1541
1541
  "div",
1542
1542
  {
1543
1543
  style: {
1544
1544
  width: "100%",
1545
- height: t ?? 32,
1545
+ height: i ?? 32,
1546
1546
  background: r ? p : `linear-gradient(to right, ${p})`,
1547
1547
  borderRadius: 4
1548
1548
  },
@@ -1550,10 +1550,10 @@ function oe({ expr: e, height: t }) {
1550
1550
  }
1551
1551
  );
1552
1552
  }
1553
- function Le(e, t) {
1554
- return typeof e == "string" ? e : _(e) ? We(e)[0] ?? t : t;
1553
+ function Le(e, i) {
1554
+ return typeof e == "string" ? e : V(e) ? We(e)[0] ?? i : i;
1555
1555
  }
1556
- function ja({ style: e }) {
1556
+ function Oa({ style: e }) {
1557
1557
  if (e.type === "fill") {
1558
1558
  const r = e.paint["fill-color"];
1559
1559
  return /* @__PURE__ */ a(
@@ -1561,7 +1561,7 @@ function ja({ style: e }) {
1561
1561
  {
1562
1562
  className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:overflow-hidden",
1563
1563
  "aria-label": "Style preview",
1564
- children: _(r) ? /* @__PURE__ */ a(oe, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1564
+ children: V(r) ? /* @__PURE__ */ a(oe, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1565
1565
  "div",
1566
1566
  {
1567
1567
  style: {
@@ -1569,7 +1569,7 @@ function ja({ style: e }) {
1569
1569
  height: "100%",
1570
1570
  backgroundColor: r,
1571
1571
  opacity: e.paint["fill-opacity"],
1572
- outline: e.paint["fill-outline-color"] && !_(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
1572
+ outline: e.paint["fill-outline-color"] && !V(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
1573
1573
  }
1574
1574
  }
1575
1575
  )
@@ -1583,7 +1583,7 @@ function ja({ style: e }) {
1583
1583
  {
1584
1584
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:rounded mapui:border mapui:border-gray-200 mapui:px-2",
1585
1585
  "aria-label": "Style preview",
1586
- children: _(r) ? /* @__PURE__ */ a(oe, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1586
+ children: V(r) ? /* @__PURE__ */ a(oe, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1587
1587
  "div",
1588
1588
  {
1589
1589
  style: {
@@ -1604,7 +1604,7 @@ function ja({ style: e }) {
1604
1604
  {
1605
1605
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
1606
1606
  "aria-label": "Style preview",
1607
- children: _(r) ? /* @__PURE__ */ a("div", { style: { width: p, height: p, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(oe, { expr: r, height: p }) }) : /* @__PURE__ */ a(
1607
+ children: V(r) ? /* @__PURE__ */ a("div", { style: { width: p, height: p, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(oe, { expr: r, height: p }) }) : /* @__PURE__ */ a(
1608
1608
  "div",
1609
1609
  {
1610
1610
  style: {
@@ -1613,14 +1613,14 @@ function ja({ style: e }) {
1613
1613
  backgroundColor: r,
1614
1614
  opacity: e.paint["circle-opacity"],
1615
1615
  borderRadius: "50%",
1616
- border: e.paint["circle-stroke-color"] && !_(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
1616
+ border: e.paint["circle-stroke-color"] && !V(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
1617
1617
  }
1618
1618
  }
1619
1619
  )
1620
1620
  }
1621
1621
  );
1622
1622
  }
1623
- const t = Le(e.paint["text-color"], "#333333"), i = Le(e.paint["icon-color"], "#333333");
1623
+ const i = Le(e.paint["text-color"], "#333333"), t = Le(e.paint["icon-color"], "#333333");
1624
1624
  return /* @__PURE__ */ a(
1625
1625
  "div",
1626
1626
  {
@@ -1630,7 +1630,7 @@ function ja({ style: e }) {
1630
1630
  "span",
1631
1631
  {
1632
1632
  style: {
1633
- color: t ?? i ?? "#333333",
1633
+ color: i ?? t ?? "#333333",
1634
1634
  fontSize: "1.1rem",
1635
1635
  fontWeight: 600
1636
1636
  },
@@ -1640,7 +1640,7 @@ function ja({ style: e }) {
1640
1640
  }
1641
1641
  );
1642
1642
  }
1643
- const Oa = [
1643
+ const ja = [
1644
1644
  // Appearance (paint)
1645
1645
  { key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
1646
1646
  { key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
@@ -1741,7 +1741,7 @@ const Oa = [
1741
1741
  { key: "symbol-sort-key", label: "Sort Key", widget: "number", group: "Placement", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are prioritised in collision detection and drawn on top within this layer." },
1742
1742
  { key: "symbol-z-order", label: "Z-Order", widget: "enum", group: "Placement", category: "layout", options: ["auto", "viewport-y", "source"], enableDefault: "auto", description: '"viewport-y" renders symbols in top-to-bottom screen order (closer = higher); "source" preserves data source order; "auto" uses "viewport-y" when sort-key is unset.' }
1743
1743
  ], za = {
1744
- fill: Oa,
1744
+ fill: ja,
1745
1745
  line: $a,
1746
1746
  circle: Ra,
1747
1747
  symbol: Ba
@@ -1750,21 +1750,21 @@ function Ua(e) {
1750
1750
  return za[e] ?? [];
1751
1751
  }
1752
1752
  function Ae(e) {
1753
- const t = {};
1754
- for (const i of e)
1755
- t[i.group] || (t[i.group] = []), t[i.group].push(i);
1756
- return t;
1753
+ const i = {};
1754
+ for (const t of e)
1755
+ i[t.group] || (i[t.group] = []), i[t.group].push(t);
1756
+ return i;
1757
1757
  }
1758
1758
  const ge = {
1759
1759
  type: "fill",
1760
1760
  paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 }
1761
- }, qa = {
1761
+ }, Ga = {
1762
1762
  type: "line",
1763
1763
  paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
1764
1764
  }, _e = {
1765
1765
  type: "circle",
1766
1766
  paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
1767
- }, Ga = {
1767
+ }, qa = {
1768
1768
  type: "symbol",
1769
1769
  paint: { "text-color": "#333333" },
1770
1770
  layout: { "text-field": "{name}", "text-size": 14 }
@@ -1773,67 +1773,67 @@ const ge = {
1773
1773
  };
1774
1774
  function Ee(e) {
1775
1775
  if (e.type !== "symbol") return "text";
1776
- const t = e.layout ?? {}, i = "icon-image" in t, r = "text-field" in t;
1777
- return i && r ? "both" : i ? "icon" : "text";
1776
+ const i = e.layout ?? {}, t = "icon-image" in i, r = "text-field" in i;
1777
+ return t && r ? "both" : t ? "icon" : "text";
1778
1778
  }
1779
- const _a = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", te = {
1779
+ const _a = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", ie = {
1780
1780
  fill: "Fill",
1781
1781
  line: "Line",
1782
1782
  circle: "Circle",
1783
1783
  symbol: "Symbol"
1784
1784
  }, Va = ["text", "icon", "both"];
1785
- function Ha({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availableIcons: p, availableProperties: u, onFetchDistinctValues: n }) {
1786
- const f = r ?? (i ? [i] : []), [s, g] = T(() => Ee(e));
1787
- G(() => {
1785
+ function Ha({ value: e, onChange: i, suggestedType: t, suggestedTypes: r, availableIcons: p, availableProperties: u, onFetchDistinctValues: n }) {
1786
+ const x = r ?? (t ? [t] : []), [s, g] = T(() => Ee(e));
1787
+ q(() => {
1788
1788
  g(Ee(e));
1789
1789
  }, [e.type]);
1790
1790
  const d = (b) => {
1791
- t(b === "fill" ? ge : b === "line" ? qa : b === "circle" ? _e : Ga);
1792
- }, x = (b) => {
1791
+ i(b === "fill" ? ge : b === "line" ? Ga : b === "circle" ? _e : qa);
1792
+ }, w = (b) => {
1793
1793
  if (b === s) return;
1794
1794
  const M = e.paint ?? {}, P = e.layout ?? {};
1795
- let N = { ...M }, k = { ...P };
1796
- b === "icon" ? (N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([O]) => !O.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = Wa.layout["icon-image"])) : b === "text" && (N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("icon-"))), k = Object.fromEntries(Object.entries(k).filter(([O]) => !O.startsWith("icon-"))), "text-field" in k || (k["text-field"] = "{name}"), "text-size" in k || (k["text-size"] = 14), "text-color" in N || (N["text-color"] = "#333333")), g(b), t({
1795
+ let y = { ...M }, k = { ...P };
1796
+ b === "icon" ? (y = Object.fromEntries(Object.entries(y).filter(([j]) => !j.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([j]) => !j.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = Wa.layout["icon-image"])) : b === "text" && (y = Object.fromEntries(Object.entries(y).filter(([j]) => !j.startsWith("icon-"))), k = Object.fromEntries(Object.entries(k).filter(([j]) => !j.startsWith("icon-"))), "text-field" in k || (k["text-field"] = "{name}"), "text-size" in k || (k["text-size"] = 14), "text-color" in y || (y["text-color"] = "#333333")), g(b), i({
1797
1797
  ...e,
1798
- paint: N,
1798
+ paint: y,
1799
1799
  layout: Object.keys(k).length > 0 ? k : void 0
1800
1800
  });
1801
1801
  }, c = (b, M) => {
1802
1802
  const P = { ...e.paint, [b]: M };
1803
- for (const N of Object.keys(P))
1804
- P[N] === void 0 && delete P[N];
1805
- t({ ...e, paint: P });
1803
+ for (const y of Object.keys(P))
1804
+ P[y] === void 0 && delete P[y];
1805
+ i({ ...e, paint: P });
1806
1806
  }, o = (b, M) => {
1807
- const N = { ...e.layout ?? {}, [b]: M };
1808
- for (const k of Object.keys(N))
1809
- N[k] === void 0 && delete N[k];
1810
- t({
1807
+ const y = { ...e.layout ?? {}, [b]: M };
1808
+ for (const k of Object.keys(y))
1809
+ y[k] === void 0 && delete y[k];
1810
+ i({
1811
1811
  ...e,
1812
- layout: Object.keys(N).length > 0 ? N : void 0
1812
+ layout: Object.keys(y).length > 0 ? y : void 0
1813
1813
  });
1814
1814
  };
1815
1815
  let h = Ua(e.type);
1816
1816
  e.type === "symbol" && (s === "text" ? h = h.filter((b) => !b.key.startsWith("icon-")) : s === "icon" && (h = h.filter((b) => !b.key.startsWith("text-"))));
1817
- const w = h.filter((b) => b.category === "paint"), v = h.filter((b) => b.category === "layout"), C = Ae(w), A = Ae(v), j = e.paint, m = e.layout ?? {}, I = Object.keys(C), F = Object.keys(A);
1817
+ const N = h.filter((b) => b.category === "paint"), v = h.filter((b) => b.category === "layout"), C = Ae(N), E = Ae(v), O = e.paint, m = e.layout ?? {}, L = Object.keys(C), F = Object.keys(E);
1818
1818
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1819
- f.length > 0 && !f.includes(e.type) && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-blue-800", children: [
1819
+ x.length > 0 && !x.includes(e.type) && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-blue-800", children: [
1820
1820
  /* @__PURE__ */ l("span", { children: [
1821
1821
  "Detected geometry is suitable for",
1822
1822
  " ",
1823
- f.map((b, M) => /* @__PURE__ */ l("span", { children: [
1824
- M > 0 && (M === f.length - 1 ? " or " : ", "),
1825
- /* @__PURE__ */ a("strong", { children: te[b] })
1823
+ x.map((b, M) => /* @__PURE__ */ l("span", { children: [
1824
+ M > 0 && (M === x.length - 1 ? " or " : ", "),
1825
+ /* @__PURE__ */ a("strong", { children: ie[b] })
1826
1826
  ] }, b)),
1827
1827
  " ",
1828
1828
  "style."
1829
1829
  ] }),
1830
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: f.map((b) => /* @__PURE__ */ a(
1830
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: x.map((b) => /* @__PURE__ */ a(
1831
1831
  "button",
1832
1832
  {
1833
1833
  type: "button",
1834
1834
  onClick: () => d(b),
1835
1835
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-400 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-blue-700 hover:mapui:bg-blue-100",
1836
- children: te[b]
1836
+ children: ie[b]
1837
1837
  },
1838
1838
  b
1839
1839
  )) })
@@ -1844,14 +1844,14 @@ function Ha({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availa
1844
1844
  value: e.type,
1845
1845
  onChange: (b) => d(b.target.value),
1846
1846
  className: _a,
1847
- children: Object.keys(te).map((b) => /* @__PURE__ */ a("option", { value: b, children: te[b] }, b))
1847
+ children: Object.keys(ie).map((b) => /* @__PURE__ */ a("option", { value: b, children: ie[b] }, b))
1848
1848
  }
1849
1849
  ) }),
1850
1850
  e.type === "symbol" && /* @__PURE__ */ a(S, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: Va.map((b) => /* @__PURE__ */ a(
1851
1851
  "button",
1852
1852
  {
1853
1853
  type: "button",
1854
- onClick: () => x(b),
1854
+ onClick: () => w(b),
1855
1855
  className: [
1856
1856
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-sm mapui:capitalize mapui:outline-none",
1857
1857
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
@@ -1863,7 +1863,7 @@ function Ha({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availa
1863
1863
  )) }) }),
1864
1864
  /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
1865
1865
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:text-gray-500", children: "Preview" }),
1866
- /* @__PURE__ */ a(ja, { style: e })
1866
+ /* @__PURE__ */ a(Oa, { style: e })
1867
1867
  ] }),
1868
1868
  F.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1869
1869
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Layout" }),
@@ -1871,7 +1871,7 @@ function Ha({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availa
1871
1871
  De,
1872
1872
  {
1873
1873
  title: b,
1874
- properties: A[b],
1874
+ properties: E[b],
1875
1875
  values: m,
1876
1876
  onChange: o,
1877
1877
  defaultOpen: M === 0,
@@ -1882,14 +1882,14 @@ function Ha({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availa
1882
1882
  b
1883
1883
  ))
1884
1884
  ] }),
1885
- I.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1885
+ L.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1886
1886
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Paint" }),
1887
- I.map((b) => /* @__PURE__ */ a(
1887
+ L.map((b) => /* @__PURE__ */ a(
1888
1888
  De,
1889
1889
  {
1890
1890
  title: b,
1891
1891
  properties: C[b],
1892
- values: j,
1892
+ values: O,
1893
1893
  onChange: c,
1894
1894
  defaultOpen: !1,
1895
1895
  availableIcons: p,
@@ -1902,23 +1902,23 @@ function Ha({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availa
1902
1902
  ] });
1903
1903
  }
1904
1904
  const Ie = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1905
- function Ya({ value: e, onChange: t }) {
1905
+ function Ya({ value: e, onChange: i }) {
1906
1906
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1907
1907
  /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
1908
1908
  "input",
1909
1909
  {
1910
1910
  type: "text",
1911
1911
  value: e.label,
1912
- onChange: (i) => t({ ...e, label: i.target.value }),
1912
+ onChange: (t) => i({ ...e, label: t.target.value }),
1913
1913
  placeholder: "Legend entry label",
1914
1914
  className: Ie
1915
1915
  }
1916
1916
  ) }),
1917
1917
  /* @__PURE__ */ a(S, { label: "Color", children: /* @__PURE__ */ a(
1918
- J,
1918
+ Z,
1919
1919
  {
1920
1920
  value: e.color,
1921
- onChange: (i) => t({ ...e, color: i }),
1921
+ onChange: (t) => i({ ...e, color: t }),
1922
1922
  label: "Entry color"
1923
1923
  }
1924
1924
  ) }),
@@ -1926,7 +1926,7 @@ function Ya({ value: e, onChange: t }) {
1926
1926
  "select",
1927
1927
  {
1928
1928
  value: e.shape ?? "square",
1929
- onChange: (i) => t({ ...e, shape: i.target.value }),
1929
+ onChange: (t) => i({ ...e, shape: t.target.value }),
1930
1930
  className: Ie,
1931
1931
  children: [
1932
1932
  /* @__PURE__ */ a("option", { value: "square", children: "Square" }),
@@ -1938,42 +1938,42 @@ function Ya({ value: e, onChange: t }) {
1938
1938
  ] });
1939
1939
  }
1940
1940
  const Me = () => ({ label: "", color: "#4a90d9", shape: "square" }), me = 8, Fe = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1941
- function Xa({ value: e, onChange: t, styles: i }) {
1941
+ function Xa({ value: e, onChange: i, styles: t }) {
1942
1942
  const r = (e == null ? void 0 : e.entries) ?? [], p = (e == null ? void 0 : e.displayMode) ?? "simple", u = Ue(() => {
1943
- if (!i || i.length === 0) return null;
1943
+ if (!t || t.length === 0) return null;
1944
1944
  const c = [];
1945
1945
  let o = "simple", h = null;
1946
- for (const w of i) {
1947
- const v = Fa(w), C = Pa(w);
1948
- if (_(v)) {
1949
- const A = Ea(v);
1950
- if (!A) continue;
1951
- const j = Ia(v).map((m) => ({ label: m.label, color: m.color, shape: C }));
1952
- c.push(...j), A === "interpolate" ? (o = "gradient", h || (h = Ma(v))) : o === "simple" && (o = "categorical");
1953
- } else typeof v == "string" && c.length === 0 && c.push({ label: w.type, color: v, shape: C });
1946
+ for (const N of t) {
1947
+ const v = Fa(N), C = Pa(N);
1948
+ if (V(v)) {
1949
+ const E = Ea(v);
1950
+ if (!E) continue;
1951
+ const O = Ia(v).map((m) => ({ label: m.label, color: m.color, shape: C }));
1952
+ c.push(...O), E === "interpolate" ? (o = "gradient", h || (h = Ma(v))) : o === "simple" && (o = "categorical");
1953
+ } else typeof v == "string" && c.length === 0 && c.push({ label: N.type, color: v, shape: C });
1954
1954
  }
1955
1955
  return c.length === 0 ? null : { entries: c, mode: o, property: h };
1956
- }, [i]), n = () => {
1957
- t({ ...e, entries: [...r, Me()] });
1958
- }, f = (c, o) => {
1959
- const h = r.map((w, v) => v === c ? o : w);
1960
- t({ ...e, entries: h });
1956
+ }, [t]), n = () => {
1957
+ i({ ...e, entries: [...r, Me()] });
1958
+ }, x = (c, o) => {
1959
+ const h = r.map((N, v) => v === c ? o : N);
1960
+ i({ ...e, entries: h });
1961
1961
  }, s = (c) => {
1962
- const o = r.filter((h, w) => w !== c);
1963
- t(o.length > 0 ? { ...e, entries: o } : void 0);
1962
+ const o = r.filter((h, N) => N !== c);
1963
+ i(o.length > 0 ? { ...e, entries: o } : void 0);
1964
1964
  }, g = (c) => {
1965
- t(c ? { entries: [Me()] } : void 0);
1965
+ i(c ? { entries: [Me()] } : void 0);
1966
1966
  }, d = () => {
1967
- u && t({
1967
+ u && i({
1968
1968
  entries: u.entries,
1969
1969
  displayMode: u.mode,
1970
1970
  ...u.mode === "gradient" && u.property ? { gradientProperty: u.property } : {},
1971
1971
  ...u.mode === "categorical" ? { showLabelsCollapsed: !1 } : {}
1972
1972
  });
1973
- }, x = (c) => {
1973
+ }, w = (c) => {
1974
1974
  if (!e) return;
1975
1975
  const o = { ...e, displayMode: c };
1976
- c !== "categorical" && delete o.showLabelsCollapsed, c !== "categorical" && c !== "gradient" && delete o.showColorBar, c !== "gradient" && delete o.gradientProperty, c === "simple" && delete o.showDisclosureArrow, t(o);
1976
+ c !== "categorical" && delete o.showLabelsCollapsed, c !== "categorical" && c !== "gradient" && delete o.showColorBar, c !== "gradient" && delete o.gradientProperty, c === "simple" && delete o.showDisclosureArrow, i(o);
1977
1977
  };
1978
1978
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1979
1979
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
@@ -2034,7 +2034,7 @@ function Xa({ value: e, onChange: t, styles: i }) {
2034
2034
  {
2035
2035
  id: "legend-display-mode",
2036
2036
  value: p,
2037
- onChange: (c) => x(c.target.value),
2037
+ onChange: (c) => w(c.target.value),
2038
2038
  className: Fe,
2039
2039
  children: [
2040
2040
  /* @__PURE__ */ a("option", { value: "simple", children: "Simple" }),
@@ -2051,7 +2051,7 @@ function Xa({ value: e, onChange: t, styles: i }) {
2051
2051
  type: "checkbox",
2052
2052
  id: "legend-show-labels-collapsed",
2053
2053
  checked: e.showLabelsCollapsed ?? !1,
2054
- onChange: (c) => t({ ...e, showLabelsCollapsed: c.target.checked }),
2054
+ onChange: (c) => i({ ...e, showLabelsCollapsed: c.target.checked }),
2055
2055
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2056
2056
  }
2057
2057
  ),
@@ -2064,7 +2064,7 @@ function Xa({ value: e, onChange: t, styles: i }) {
2064
2064
  type: "checkbox",
2065
2065
  id: "legend-show-color-bar",
2066
2066
  checked: e.showColorBar !== !1,
2067
- onChange: (c) => t({ ...e, showColorBar: c.target.checked }),
2067
+ onChange: (c) => i({ ...e, showColorBar: c.target.checked }),
2068
2068
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2069
2069
  }
2070
2070
  ),
@@ -2077,7 +2077,7 @@ function Xa({ value: e, onChange: t, styles: i }) {
2077
2077
  type: "checkbox",
2078
2078
  id: "legend-show-disclosure-arrow",
2079
2079
  checked: e.showDisclosureArrow !== !1,
2080
- onChange: (c) => t({ ...e, showDisclosureArrow: c.target.checked }),
2080
+ onChange: (c) => i({ ...e, showDisclosureArrow: c.target.checked }),
2081
2081
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2082
2082
  }
2083
2083
  ),
@@ -2091,7 +2091,7 @@ function Xa({ value: e, onChange: t, styles: i }) {
2091
2091
  type: "text",
2092
2092
  id: "legend-gradient-property",
2093
2093
  value: e.gradientProperty ?? "",
2094
- onChange: (c) => t({ ...e, gradientProperty: c.target.value || void 0 }),
2094
+ onChange: (c) => i({ ...e, gradientProperty: c.target.value || void 0 }),
2095
2095
  placeholder: "e.g. Population",
2096
2096
  className: Fe
2097
2097
  }
@@ -2121,7 +2121,7 @@ function Xa({ value: e, onChange: t, styles: i }) {
2121
2121
  Ya,
2122
2122
  {
2123
2123
  value: c,
2124
- onChange: (h) => f(o, h)
2124
+ onChange: (h) => x(o, h)
2125
2125
  }
2126
2126
  )
2127
2127
  ]
@@ -2157,38 +2157,38 @@ function Xa({ value: e, onChange: t, styles: i }) {
2157
2157
  }
2158
2158
  function Pe({
2159
2159
  options: e,
2160
- onChange: t,
2161
- placeholder: i,
2160
+ onChange: i,
2161
+ placeholder: t,
2162
2162
  className: r
2163
2163
  }) {
2164
2164
  const [p, u] = T(() => (e == null ? void 0 : e.join(", ")) ?? "");
2165
- return G(() => {
2165
+ return q(() => {
2166
2166
  u((e == null ? void 0 : e.join(", ")) ?? "");
2167
2167
  }, [e == null ? void 0 : e.join(",")]), /* @__PURE__ */ a(
2168
2168
  "input",
2169
2169
  {
2170
2170
  type: "text",
2171
2171
  value: p,
2172
- onChange: (f) => u(f.target.value),
2172
+ onChange: (x) => u(x.target.value),
2173
2173
  onBlur: () => {
2174
- const f = p.trim(), s = f ? f.split(",").map((g) => g.trim()).filter(Boolean) : void 0;
2175
- t(s), u((s == null ? void 0 : s.join(", ")) ?? "");
2174
+ const x = p.trim(), s = x ? x.split(",").map((g) => g.trim()).filter(Boolean) : void 0;
2175
+ i(s), u((s == null ? void 0 : s.join(", ")) ?? "");
2176
2176
  },
2177
- placeholder: i,
2177
+ placeholder: t,
2178
2178
  className: r
2179
2179
  }
2180
2180
  );
2181
2181
  }
2182
- const $ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", Ja = {
2182
+ const $ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", Za = {
2183
2183
  text: { type: "text", property: "", label: "", autocomplete: !1 },
2184
2184
  number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
2185
2185
  datetime: { type: "datetime", property: "", label: "", range: !1 },
2186
2186
  select: { type: "select", property: "", label: "" }
2187
2187
  };
2188
- function Ka({ value: e, onChange: t, availableProperties: i }) {
2188
+ function Ja({ value: e, onChange: i, availableProperties: t }) {
2189
2189
  const r = (n) => {
2190
- t({ ...Ja[n], property: e.property, label: e.label });
2191
- }, p = (n) => t({ ...e, ...n }), u = i && i.length > 0;
2190
+ i({ ...Za[n], property: e.property, label: e.label });
2191
+ }, p = (n) => i({ ...e, ...n }), u = t && t.length > 0;
2192
2192
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2193
2193
  /* @__PURE__ */ a(S, { label: "Field Type", children: /* @__PURE__ */ l(
2194
2194
  "select",
@@ -2212,7 +2212,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2212
2212
  className: $,
2213
2213
  children: [
2214
2214
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
2215
- i.map((n) => /* @__PURE__ */ a("option", { value: n.name, children: n.title ?? n.name }, n.name))
2215
+ t.map((n) => /* @__PURE__ */ a("option", { value: n.name, children: n.title ?? n.name }, n.name))
2216
2216
  ]
2217
2217
  }
2218
2218
  ) : /* @__PURE__ */ a(
@@ -2253,7 +2253,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2253
2253
  type: "checkbox",
2254
2254
  id: "text-autocomplete",
2255
2255
  checked: e.autocomplete ?? !1,
2256
- onChange: (n) => t({ ...e, autocomplete: n.target.checked }),
2256
+ onChange: (n) => i({ ...e, autocomplete: n.target.checked }),
2257
2257
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2258
2258
  }
2259
2259
  ),
@@ -2266,7 +2266,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2266
2266
  type: "checkbox",
2267
2267
  id: "text-prefetch",
2268
2268
  checked: e.prefetch ?? !1,
2269
- onChange: (n) => t({ ...e, prefetch: n.target.checked }),
2269
+ onChange: (n) => i({ ...e, prefetch: n.target.checked }),
2270
2270
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2271
2271
  }
2272
2272
  ),
@@ -2279,7 +2279,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2279
2279
  type: "checkbox",
2280
2280
  id: "text-zoomTo",
2281
2281
  checked: e.zoomTo ?? !1,
2282
- onChange: (n) => t({ ...e, zoomTo: n.target.checked }),
2282
+ onChange: (n) => i({ ...e, zoomTo: n.target.checked }),
2283
2283
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2284
2284
  }
2285
2285
  ),
@@ -2289,7 +2289,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2289
2289
  Pe,
2290
2290
  {
2291
2291
  options: e.options,
2292
- onChange: (n) => t({ ...e, options: n }),
2292
+ onChange: (n) => i({ ...e, options: n }),
2293
2293
  placeholder: "option1, option2",
2294
2294
  className: $
2295
2295
  }
@@ -2300,7 +2300,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2300
2300
  "select",
2301
2301
  {
2302
2302
  value: e.inputMode ?? "input",
2303
- onChange: (n) => t({
2303
+ onChange: (n) => i({
2304
2304
  ...e,
2305
2305
  inputMode: n.target.value
2306
2306
  }),
@@ -2315,7 +2315,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2315
2315
  "select",
2316
2316
  {
2317
2317
  value: e.operator ?? "eq",
2318
- onChange: (n) => t({
2318
+ onChange: (n) => i({
2319
2319
  ...e,
2320
2320
  operator: n.target.value
2321
2321
  }),
@@ -2334,7 +2334,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2334
2334
  "select",
2335
2335
  {
2336
2336
  value: e.operatorLabelStyle ?? "symbol",
2337
- onChange: (n) => t({
2337
+ onChange: (n) => i({
2338
2338
  ...e,
2339
2339
  operatorLabelStyle: n.target.value
2340
2340
  }),
@@ -2352,7 +2352,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2352
2352
  type: "checkbox",
2353
2353
  id: "number-show-range",
2354
2354
  checked: e.showRange ?? !1,
2355
- onChange: (n) => t({ ...e, showRange: n.target.checked }),
2355
+ onChange: (n) => i({ ...e, showRange: n.target.checked }),
2356
2356
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2357
2357
  }
2358
2358
  ),
@@ -2364,7 +2364,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2364
2364
  {
2365
2365
  type: "number",
2366
2366
  value: e.min ?? "",
2367
- onChange: (n) => t({
2367
+ onChange: (n) => i({
2368
2368
  ...e,
2369
2369
  min: n.target.value ? parseFloat(n.target.value) : void 0
2370
2370
  }),
@@ -2376,7 +2376,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2376
2376
  {
2377
2377
  type: "number",
2378
2378
  value: e.max ?? "",
2379
- onChange: (n) => t({
2379
+ onChange: (n) => i({
2380
2380
  ...e,
2381
2381
  max: n.target.value ? parseFloat(n.target.value) : void 0
2382
2382
  }),
@@ -2388,7 +2388,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2388
2388
  {
2389
2389
  type: "number",
2390
2390
  value: e.step ?? "",
2391
- onChange: (n) => t({
2391
+ onChange: (n) => i({
2392
2392
  ...e,
2393
2393
  step: n.target.value ? parseFloat(n.target.value) : void 0
2394
2394
  }),
@@ -2404,7 +2404,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2404
2404
  type: "checkbox",
2405
2405
  id: "datetime-range",
2406
2406
  checked: e.range ?? !1,
2407
- onChange: (n) => t({ ...e, range: n.target.checked }),
2407
+ onChange: (n) => i({ ...e, range: n.target.checked }),
2408
2408
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2409
2409
  }
2410
2410
  ),
@@ -2418,7 +2418,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2418
2418
  type: "checkbox",
2419
2419
  id: "select-prefetch",
2420
2420
  checked: e.prefetch ?? !1,
2421
- onChange: (n) => t({ ...e, prefetch: n.target.checked }),
2421
+ onChange: (n) => i({ ...e, prefetch: n.target.checked }),
2422
2422
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2423
2423
  }
2424
2424
  ),
@@ -2431,7 +2431,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2431
2431
  type: "checkbox",
2432
2432
  id: "select-zoomTo",
2433
2433
  checked: e.zoomTo ?? !1,
2434
- onChange: (n) => t({ ...e, zoomTo: n.target.checked }),
2434
+ onChange: (n) => i({ ...e, zoomTo: n.target.checked }),
2435
2435
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2436
2436
  }
2437
2437
  ),
@@ -2441,7 +2441,7 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2441
2441
  Pe,
2442
2442
  {
2443
2443
  options: e.options,
2444
- onChange: (n) => t({ ...e, options: n }),
2444
+ onChange: (n) => i({ ...e, options: n }),
2445
2445
  placeholder: "option1, option2",
2446
2446
  className: $
2447
2447
  }
@@ -2449,40 +2449,40 @@ function Ka({ value: e, onChange: t, availableProperties: i }) {
2449
2449
  ] })
2450
2450
  ] });
2451
2451
  }
2452
- const Qa = () => ({
2452
+ const Ka = () => ({
2453
2453
  type: "text",
2454
2454
  property: "",
2455
2455
  label: "",
2456
2456
  autocomplete: !1
2457
2457
  });
2458
- function Za({ fields: e, onChange: t, availableProperties: i }) {
2458
+ function Qa({ fields: e, onChange: i, availableProperties: t }) {
2459
2459
  const [r, p] = T(null), u = () => {
2460
- const d = [...e, Qa()];
2461
- t(d), p(d.length - 1);
2462
- }, n = (d, x) => {
2463
- t(e.map((c, o) => o === d ? x : c));
2464
- }, f = (d) => {
2465
- t(e.filter((x, c) => c !== d)), p(null);
2460
+ const d = [...e, Ka()];
2461
+ i(d), p(d.length - 1);
2462
+ }, n = (d, w) => {
2463
+ i(e.map((c, o) => o === d ? w : c));
2464
+ }, x = (d) => {
2465
+ i(e.filter((w, c) => c !== d)), p(null);
2466
2466
  }, s = (d) => {
2467
2467
  if (d === 0) return;
2468
- const x = [...e];
2469
- [x[d - 1], x[d]] = [x[d], x[d - 1]], t(x), p(d - 1);
2468
+ const w = [...e];
2469
+ [w[d - 1], w[d]] = [w[d], w[d - 1]], i(w), p(d - 1);
2470
2470
  }, g = (d) => {
2471
2471
  if (d === e.length - 1) return;
2472
- const x = [...e];
2473
- [x[d], x[d + 1]] = [x[d + 1], x[d]], t(x), p(d + 1);
2472
+ const w = [...e];
2473
+ [w[d], w[d + 1]] = [w[d + 1], w[d]], i(w), p(d + 1);
2474
2474
  };
2475
2475
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2476
2476
  e.length === 0 && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
2477
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((d, x) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
2477
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((d, w) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
2478
2478
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
2479
2479
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
2480
2480
  /* @__PURE__ */ a(
2481
2481
  "button",
2482
2482
  {
2483
2483
  type: "button",
2484
- onClick: () => s(x),
2485
- disabled: x === 0,
2484
+ onClick: () => s(w),
2485
+ disabled: w === 0,
2486
2486
  "aria-label": "Move up",
2487
2487
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
2488
2488
  children: "▲"
@@ -2492,8 +2492,8 @@ function Za({ fields: e, onChange: t, availableProperties: i }) {
2492
2492
  "button",
2493
2493
  {
2494
2494
  type: "button",
2495
- onClick: () => g(x),
2496
- disabled: x === e.length - 1,
2495
+ onClick: () => g(w),
2496
+ disabled: w === e.length - 1,
2497
2497
  "aria-label": "Move down",
2498
2498
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
2499
2499
  children: "▼"
@@ -2504,7 +2504,7 @@ function Za({ fields: e, onChange: t, availableProperties: i }) {
2504
2504
  "button",
2505
2505
  {
2506
2506
  type: "button",
2507
- onClick: () => p(r === x ? null : x),
2507
+ onClick: () => p(r === w ? null : w),
2508
2508
  className: "mapui:flex-1 mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:text-left mapui:text-sm mapui:font-medium mapui:text-gray-800",
2509
2509
  children: [
2510
2510
  /* @__PURE__ */ a("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children: d.type }),
@@ -2516,22 +2516,22 @@ function Za({ fields: e, onChange: t, availableProperties: i }) {
2516
2516
  "button",
2517
2517
  {
2518
2518
  type: "button",
2519
- onClick: () => f(x),
2519
+ onClick: () => x(w),
2520
2520
  "aria-label": "Remove field",
2521
2521
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2522
2522
  children: "Remove"
2523
2523
  }
2524
2524
  )
2525
2525
  ] }),
2526
- r === x && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2527
- Ka,
2526
+ r === w && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2527
+ Ja,
2528
2528
  {
2529
2529
  value: d,
2530
- onChange: (c) => n(x, c),
2531
- availableProperties: i
2530
+ onChange: (c) => n(w, c),
2531
+ availableProperties: t
2532
2532
  }
2533
2533
  ) })
2534
- ] }, x)) }),
2534
+ ] }, w)) }),
2535
2535
  /* @__PURE__ */ a(
2536
2536
  "button",
2537
2537
  {
@@ -2543,44 +2543,44 @@ function Za({ fields: e, onChange: t, availableProperties: i }) {
2543
2543
  )
2544
2544
  ] });
2545
2545
  }
2546
- function et(e) {
2547
- return Object.entries(e).map(([t, i]) => ({
2548
- key: t,
2549
- label: i.label ?? "",
2550
- visible: i.visible ?? !0
2546
+ function ei(e) {
2547
+ return Object.entries(e).map(([i, t]) => ({
2548
+ key: i,
2549
+ label: t.label ?? "",
2550
+ visible: t.visible ?? !0
2551
2551
  }));
2552
2552
  }
2553
- function at(e) {
2554
- const t = {};
2555
- for (const i of e)
2556
- t[i.key] = {
2557
- visible: i.visible,
2558
- ...i.label ? { label: i.label } : {}
2553
+ function ai(e) {
2554
+ const i = {};
2555
+ for (const t of e)
2556
+ i[t.key] = {
2557
+ visible: t.visible,
2558
+ ...t.label ? { label: t.label } : {}
2559
2559
  };
2560
- return t;
2560
+ return i;
2561
2561
  }
2562
2562
  const se = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2563
- function tt({ value: e, onChange: t, availableProperties: i }) {
2564
- const r = et(e), p = i && i.length > 0, u = (o) => t(at(o)), n = () => {
2563
+ function ii({ value: e, onChange: i, availableProperties: t }) {
2564
+ const r = ei(e), p = t && t.length > 0, u = (o) => i(ai(o)), n = () => {
2565
2565
  u([...r, { key: "", label: "", visible: !0 }]);
2566
- }, f = (o) => {
2567
- u(r.filter((h, w) => w !== o));
2566
+ }, x = (o) => {
2567
+ u(r.filter((h, N) => N !== o));
2568
2568
  }, s = (o, h) => {
2569
- u(r.map((w, v) => v === o ? { ...w, ...h } : w));
2569
+ u(r.map((N, v) => v === o ? { ...N, ...h } : N));
2570
2570
  }, g = (o, h) => {
2571
- const w = i == null ? void 0 : i.find((C) => C.name === h), v = (w == null ? void 0 : w.title) ?? r[o].label;
2572
- u(r.map((C, A) => A === o ? { ...C, key: h, label: v } : C));
2571
+ const N = t == null ? void 0 : t.find((C) => C.name === h), v = (N == null ? void 0 : N.title) ?? r[o].label;
2572
+ u(r.map((C, E) => E === o ? { ...C, key: h, label: v } : C));
2573
2573
  }, d = (o) => {
2574
2574
  if (o === 0) return;
2575
2575
  const h = [...r];
2576
2576
  [h[o - 1], h[o]] = [h[o], h[o - 1]], u(h);
2577
- }, x = (o) => {
2577
+ }, w = (o) => {
2578
2578
  if (o === r.length - 1) return;
2579
2579
  const h = [...r];
2580
2580
  [h[o], h[o + 1]] = [h[o + 1], h[o]], u(h);
2581
2581
  }, c = () => {
2582
- if (!i) return;
2583
- const o = i.map((h) => ({
2582
+ if (!t) return;
2583
+ const o = t.map((h) => ({
2584
2584
  key: h.name,
2585
2585
  label: h.title ?? "",
2586
2586
  visible: !0
@@ -2622,7 +2622,7 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2622
2622
  "button",
2623
2623
  {
2624
2624
  type: "button",
2625
- onClick: () => x(h),
2625
+ onClick: () => w(h),
2626
2626
  disabled: h === r.length - 1,
2627
2627
  "aria-label": "Move down",
2628
2628
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
@@ -2635,12 +2635,12 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2635
2635
  "select",
2636
2636
  {
2637
2637
  value: o.key,
2638
- onChange: (w) => g(h, w.target.value),
2638
+ onChange: (N) => g(h, N.target.value),
2639
2639
  "aria-label": "Property key",
2640
2640
  className: se,
2641
2641
  children: [
2642
2642
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
2643
- i.map((w) => /* @__PURE__ */ a("option", { value: w.name, children: w.title ?? w.name }, w.name))
2643
+ t.map((N) => /* @__PURE__ */ a("option", { value: N.name, children: N.title ?? N.name }, N.name))
2644
2644
  ]
2645
2645
  }
2646
2646
  ) : /* @__PURE__ */ a(
@@ -2648,7 +2648,7 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2648
2648
  {
2649
2649
  type: "text",
2650
2650
  value: o.key,
2651
- onChange: (w) => s(h, { key: w.target.value }),
2651
+ onChange: (N) => s(h, { key: N.target.value }),
2652
2652
  placeholder: "property_name",
2653
2653
  "aria-label": "Property key",
2654
2654
  className: se
@@ -2659,7 +2659,7 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2659
2659
  {
2660
2660
  type: "text",
2661
2661
  value: o.label,
2662
- onChange: (w) => s(h, { label: w.target.value }),
2662
+ onChange: (N) => s(h, { label: N.target.value }),
2663
2663
  placeholder: "Friendly name",
2664
2664
  "aria-label": "Display label",
2665
2665
  className: se
@@ -2670,7 +2670,7 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2670
2670
  {
2671
2671
  type: "checkbox",
2672
2672
  checked: o.visible,
2673
- onChange: (w) => s(h, { visible: w.target.checked }),
2673
+ onChange: (N) => s(h, { visible: N.target.checked }),
2674
2674
  "aria-label": "Visible",
2675
2675
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2676
2676
  }
@@ -2679,7 +2679,7 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2679
2679
  "button",
2680
2680
  {
2681
2681
  type: "button",
2682
- onClick: () => f(h),
2682
+ onClick: () => x(h),
2683
2683
  "aria-label": "Remove property",
2684
2684
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2685
2685
  children: "Remove"
@@ -2700,98 +2700,98 @@ function tt({ value: e, onChange: t, availableProperties: i }) {
2700
2700
  ] });
2701
2701
  }
2702
2702
  const Ve = /geojson\.org\/schema\/(\w+)\.json/;
2703
- function it(e) {
2703
+ function ti(e) {
2704
2704
  return !!e.$ref && Ve.test(e.$ref);
2705
2705
  }
2706
2706
  function He(e) {
2707
- const t = Ve.exec(e);
2708
- return t ? t[1] : null;
2707
+ const i = Ve.exec(e);
2708
+ return i ? i[1] : null;
2709
2709
  }
2710
2710
  function Ye(e) {
2711
- const t = e.toLowerCase();
2712
- return t.includes("polygon") ? "fill" : t.includes("linestring") ? "line" : t.includes("point") ? "circle" : null;
2711
+ const i = e.toLowerCase();
2712
+ return i.includes("polygon") ? "fill" : i.includes("linestring") ? "line" : i.includes("point") ? "circle" : null;
2713
2713
  }
2714
2714
  function fe(e) {
2715
- const t = e.toLowerCase();
2716
- return t.includes("polygon") ? ["fill", "line"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
2717
- }
2718
- function rt(e) {
2719
- for (const t of Object.values(e.properties))
2720
- if (t.$ref) {
2721
- const i = He(t.$ref);
2722
- if (i) return Ye(i);
2715
+ const i = e.toLowerCase();
2716
+ return i.includes("polygon") ? ["fill", "line"] : i.includes("linestring") ? ["line"] : i.includes("point") ? ["circle", "symbol"] : [];
2717
+ }
2718
+ function ri(e) {
2719
+ for (const i of Object.values(e.properties))
2720
+ if (i.$ref) {
2721
+ const t = He(i.$ref);
2722
+ if (t) return Ye(t);
2723
2723
  }
2724
2724
  return null;
2725
2725
  }
2726
2726
  function Xe(e) {
2727
- for (const t of Object.values(e.properties))
2728
- if (t.$ref) {
2729
- const i = He(t.$ref);
2730
- if (i) return fe(i);
2727
+ for (const i of Object.values(e.properties))
2728
+ if (i.$ref) {
2729
+ const t = He(i.$ref);
2730
+ if (t) return fe(t);
2731
2731
  }
2732
2732
  return [];
2733
2733
  }
2734
- function lt(e) {
2735
- return Object.entries(e.properties).filter(([, t]) => !it(t)).map(([t, i]) => ({
2736
- name: t,
2737
- title: i.title,
2738
- type: i.type,
2739
- format: i.format,
2740
- enum: i.enum,
2741
- minimum: i.minimum,
2742
- maximum: i.maximum
2734
+ function li(e) {
2735
+ return Object.entries(e.properties).filter(([, i]) => !ti(i)).map(([i, t]) => ({
2736
+ name: i,
2737
+ title: t.title,
2738
+ type: t.type,
2739
+ format: t.format,
2740
+ enum: t.enum,
2741
+ minimum: t.minimum,
2742
+ maximum: t.maximum
2743
2743
  }));
2744
2744
  }
2745
- function Je(e) {
2746
- var i;
2747
- const t = /* @__PURE__ */ new Set();
2745
+ function Ze(e) {
2746
+ var t;
2747
+ const i = /* @__PURE__ */ new Set();
2748
2748
  for (const r of e)
2749
- (i = r.geometry) != null && i.type && t.add(r.geometry.type);
2750
- return Array.from(t);
2749
+ (t = r.geometry) != null && t.type && i.add(r.geometry.type);
2750
+ return Array.from(i);
2751
2751
  }
2752
- function pt(e) {
2753
- const t = /* @__PURE__ */ new Set();
2752
+ function pi(e) {
2753
+ const i = /* @__PURE__ */ new Set();
2754
2754
  for (const p of e) {
2755
2755
  const u = p.toLowerCase();
2756
- u.includes("polygon") ? t.add("polygon") : u.includes("linestring") ? t.add("line") : u.includes("point") && t.add("point");
2756
+ u.includes("polygon") ? i.add("polygon") : u.includes("linestring") ? i.add("line") : u.includes("point") && i.add("point");
2757
2757
  }
2758
- const i = t.size > 1, r = [];
2759
- return t.has("polygon") && r.push({
2758
+ const t = i.size > 1, r = [];
2759
+ return i.has("polygon") && r.push({
2760
2760
  type: "fill",
2761
2761
  paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 },
2762
- ...i ? { geometryFilter: ["Polygon", "MultiPolygon"] } : {}
2763
- }), t.has("line") && r.push({
2762
+ ...t ? { geometryFilter: ["Polygon", "MultiPolygon"] } : {}
2763
+ }), i.has("line") && r.push({
2764
2764
  type: "line",
2765
2765
  paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 },
2766
- ...i ? { geometryFilter: ["LineString", "MultiLineString"] } : {}
2767
- }), t.has("point") && r.push({
2766
+ ...t ? { geometryFilter: ["LineString", "MultiLineString"] } : {}
2767
+ }), i.has("point") && r.push({
2768
2768
  type: "circle",
2769
2769
  paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 },
2770
- ...i ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2770
+ ...t ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2771
2771
  }), r;
2772
2772
  }
2773
- async function St(e, t) {
2774
- var i, r;
2773
+ async function Si(e, i) {
2774
+ var t, r;
2775
2775
  try {
2776
- const p = await Ge(e, t), u = rt(p);
2776
+ const p = await qe(e, i), u = ri(p);
2777
2777
  if (u) return u;
2778
2778
  } catch {
2779
2779
  }
2780
2780
  try {
2781
- const u = (r = (i = (await ye(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
2781
+ const u = (r = (t = (await ye(e, i, { limit: 1 })).features[0]) == null ? void 0 : t.geometry) == null ? void 0 : r.type;
2782
2782
  if (typeof u == "string") return Ye(u);
2783
2783
  } catch {
2784
2784
  }
2785
2785
  return null;
2786
2786
  }
2787
- async function Tt(e, t) {
2787
+ async function Ti(e, i) {
2788
2788
  try {
2789
- const i = await Ge(e, t), r = Xe(i);
2789
+ const t = await qe(e, i), r = Xe(t);
2790
2790
  if (r.length > 0) return r;
2791
2791
  } catch {
2792
2792
  }
2793
2793
  try {
2794
- const i = await ye(e, t, { limit: 20 }), r = Je(i.features), p = /* @__PURE__ */ new Set();
2794
+ const t = await ye(e, i, { limit: 20 }), r = Ze(t.features), p = /* @__PURE__ */ new Set();
2795
2795
  for (const u of r)
2796
2796
  for (const n of fe(u))
2797
2797
  p.add(n);
@@ -2800,63 +2800,63 @@ async function Tt(e, t) {
2800
2800
  }
2801
2801
  return [];
2802
2802
  }
2803
- function Dt(e) {
2804
- return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (t) => t.toUpperCase());
2803
+ function Di(e) {
2804
+ return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (i) => i.toUpperCase());
2805
2805
  }
2806
- function nt(e, t, i) {
2806
+ function ni(e, i, t) {
2807
2807
  const r = [...e ?? []];
2808
- return r[t] = i, r;
2808
+ return r[i] = t, r;
2809
2809
  }
2810
- function ut(e, t) {
2811
- return (e ?? []).filter((i, r) => r !== t);
2810
+ function ui(e, i) {
2811
+ return (e ?? []).filter((t, r) => r !== i);
2812
2812
  }
2813
- const Y = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2814
- function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2815
- var j;
2816
- const p = (m) => t({ ...e, ...m }), u = V(e);
2813
+ const _ = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2814
+ function Oe({ value: e, onChange: i, availableSources: t, availableIcons: r }) {
2815
+ var O;
2816
+ const p = (m) => i({ ...e, ...m }), u = H(e);
2817
2817
  u.current = e;
2818
- const n = V(t);
2819
- n.current = t;
2820
- const f = i.find((m) => m.id === e.sourceId), s = (f == null ? void 0 : f.url) ?? null, g = e.collection || null, { collections: d, loading: x } = qe(s), { queryables: c, loading: o } = oa(s, g), h = c ? lt(c) : [], [w, v] = T([]), [C, A] = T([]);
2821
- return G(() => {
2818
+ const n = H(i);
2819
+ n.current = i;
2820
+ const x = t.find((m) => m.id === e.sourceId), s = (x == null ? void 0 : x.url) ?? null, g = e.collection || null, { collections: d, loading: w } = Ge(s), { queryables: c, loading: o } = oa(s, g), h = c ? li(c) : [], [N, v] = T([]), [C, E] = T([]);
2821
+ return q(() => {
2822
2822
  if (!c) {
2823
- v([]), A([]);
2823
+ v([]), E([]);
2824
2824
  return;
2825
2825
  }
2826
2826
  const m = (b, M) => {
2827
- var N;
2828
- const P = pt(b);
2829
- v(P), A(M), P.length > 0 && !((N = u.current.styles) != null && N.length) && n.current({ ...u.current, styles: P });
2830
- }, I = Xe(c);
2831
- if (I.length > 0) {
2827
+ var y;
2828
+ const P = pi(b);
2829
+ v(P), E(M), P.length > 0 && !((y = u.current.styles) != null && y.length) && n.current({ ...u.current, styles: P });
2830
+ }, L = Xe(c);
2831
+ if (L.length > 0) {
2832
2832
  const b = [];
2833
- for (const M of I)
2833
+ for (const M of L)
2834
2834
  M === "fill" ? b.push("Polygon") : M === "line" ? b.push("LineString") : (M === "circle" || M === "symbol") && b.push("Point");
2835
- m(b, I);
2835
+ m(b, L);
2836
2836
  return;
2837
2837
  }
2838
2838
  if (!s || !g) {
2839
- v([]), A([]);
2839
+ v([]), E([]);
2840
2840
  return;
2841
2841
  }
2842
2842
  let F = !1;
2843
2843
  return ye(s, g, { limit: 20 }).then((b) => {
2844
2844
  if (F) return;
2845
- const M = Je(b.features);
2845
+ const M = Ze(b.features);
2846
2846
  if (M.length > 0) {
2847
2847
  const P = /* @__PURE__ */ new Set();
2848
- for (const N of M)
2849
- for (const k of fe(N)) P.add(k);
2848
+ for (const y of M)
2849
+ for (const k of fe(y)) P.add(k);
2850
2850
  m(M, Array.from(P));
2851
2851
  } else
2852
- v([]), A([]);
2852
+ v([]), E([]);
2853
2853
  }).catch(() => {
2854
- F || (v([]), A([]));
2854
+ F || (v([]), E([]));
2855
2855
  }), () => {
2856
2856
  F = !0;
2857
2857
  };
2858
- }, [c, s, g]), G(() => {
2859
- v([]), A([]);
2858
+ }, [c, s, g]), q(() => {
2859
+ v([]), E([]);
2860
2860
  }, [s, g]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2861
2861
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
2862
2862
  /* @__PURE__ */ a(S, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
@@ -2866,7 +2866,7 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2866
2866
  value: e.id,
2867
2867
  onChange: (m) => p({ id: m.target.value }),
2868
2868
  placeholder: "my-layer",
2869
- className: Y
2869
+ className: _
2870
2870
  }
2871
2871
  ) }),
2872
2872
  /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
@@ -2876,7 +2876,7 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2876
2876
  value: e.label,
2877
2877
  onChange: (m) => p({ label: m.target.value }),
2878
2878
  placeholder: "My Layer",
2879
- className: Y
2879
+ className: _
2880
2880
  }
2881
2881
  ) })
2882
2882
  ] }),
@@ -2885,10 +2885,10 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2885
2885
  {
2886
2886
  value: e.sourceId,
2887
2887
  onChange: (m) => p({ sourceId: m.target.value }),
2888
- className: Y,
2888
+ className: _,
2889
2889
  children: [
2890
2890
  /* @__PURE__ */ a("option", { value: "", children: "Select a source…" }),
2891
- i.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label ?? m.id }, m.id))
2891
+ t.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.label ?? m.id }, m.id))
2892
2892
  ]
2893
2893
  }
2894
2894
  ) }),
@@ -2898,7 +2898,7 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2898
2898
  {
2899
2899
  value: e.collection,
2900
2900
  onChange: (m) => p({ collection: m.target.value }),
2901
- className: Y,
2901
+ className: _,
2902
2902
  children: [
2903
2903
  /* @__PURE__ */ a("option", { value: "", children: "Select a collection…" }),
2904
2904
  d.map((m) => /* @__PURE__ */ a("option", { value: m.id, children: m.title ?? m.id }, m.id))
@@ -2910,8 +2910,8 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2910
2910
  type: "text",
2911
2911
  value: e.collection,
2912
2912
  onChange: (m) => p({ collection: m.target.value }),
2913
- placeholder: x ? "Loading collections…" : "collection-id",
2914
- className: Y
2913
+ placeholder: w ? "Loading collections…" : "collection-id",
2914
+ className: _
2915
2915
  }
2916
2916
  ),
2917
2917
  o && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
@@ -2943,8 +2943,42 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2943
2943
  ),
2944
2944
  /* @__PURE__ */ a("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
2945
2945
  ] }),
2946
+ /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
2947
+ /* @__PURE__ */ a(S, { label: "Min Zoom", children: /* @__PURE__ */ a(
2948
+ "input",
2949
+ {
2950
+ type: "number",
2951
+ min: 0,
2952
+ max: 24,
2953
+ step: 1,
2954
+ value: e.minZoom ?? "",
2955
+ onChange: (m) => {
2956
+ const L = m.target.valueAsNumber;
2957
+ p({ minZoom: isNaN(L) ? void 0 : L });
2958
+ },
2959
+ placeholder: "0",
2960
+ className: _
2961
+ }
2962
+ ) }),
2963
+ /* @__PURE__ */ a(S, { label: "Max Zoom", children: /* @__PURE__ */ a(
2964
+ "input",
2965
+ {
2966
+ type: "number",
2967
+ min: 0,
2968
+ max: 24,
2969
+ step: 1,
2970
+ value: e.maxZoom ?? "",
2971
+ onChange: (m) => {
2972
+ const L = m.target.valueAsNumber;
2973
+ p({ maxZoom: isNaN(L) ? void 0 : L });
2974
+ },
2975
+ placeholder: "24",
2976
+ className: _
2977
+ }
2978
+ ) })
2979
+ ] }),
2946
2980
  /* @__PURE__ */ a(X, { title: "Style", children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-4", children: [
2947
- (e.styles ?? [ge]).map((m, I) => {
2981
+ (e.styles ?? [ge]).map((m, L) => {
2948
2982
  var F;
2949
2983
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2950
2984
  m.geometryFilter && m.geometryFilter.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-wrap mapui:gap-1", children: m.geometryFilter.map((b) => /* @__PURE__ */ a(
@@ -2959,7 +2993,7 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2959
2993
  Ha,
2960
2994
  {
2961
2995
  value: m,
2962
- onChange: (b) => p({ styles: nt(e.styles, I, b) }),
2996
+ onChange: (b) => p({ styles: ni(e.styles, L, b) }),
2963
2997
  suggestedTypes: C,
2964
2998
  availableIcons: r,
2965
2999
  availableProperties: h,
@@ -2970,12 +3004,12 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2970
3004
  "button",
2971
3005
  {
2972
3006
  type: "button",
2973
- onClick: () => p({ styles: ut(e.styles, I) }),
3007
+ onClick: () => p({ styles: ui(e.styles, L) }),
2974
3008
  className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2975
3009
  children: "Remove style"
2976
3010
  }
2977
3011
  )
2978
- ] }, I);
3012
+ ] }, L);
2979
3013
  }),
2980
3014
  /* @__PURE__ */ a(
2981
3015
  "button",
@@ -2996,15 +3030,15 @@ function je({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2996
3030
  }
2997
3031
  ) }),
2998
3032
  /* @__PURE__ */ a(X, { title: "Search Fields", children: /* @__PURE__ */ a(
2999
- Za,
3033
+ Qa,
3000
3034
  {
3001
- fields: ((j = e.search) == null ? void 0 : j.fields) ?? [],
3035
+ fields: ((O = e.search) == null ? void 0 : O.fields) ?? [],
3002
3036
  onChange: (m) => p({ search: m.length > 0 ? { fields: m } : void 0 }),
3003
3037
  availableProperties: h
3004
3038
  }
3005
3039
  ) }),
3006
3040
  /* @__PURE__ */ a(X, { title: "Property Display", children: /* @__PURE__ */ a(
3007
- tt,
3041
+ ii,
3008
3042
  {
3009
3043
  value: e.propertyDisplay ?? {},
3010
3044
  onChange: (m) => p({ propertyDisplay: Object.keys(m).length > 0 ? m : void 0 }),
@@ -3021,37 +3055,37 @@ const ce = () => ({
3021
3055
  visible: !0,
3022
3056
  dataMode: "vector-tiles"
3023
3057
  });
3024
- function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
3025
- const [p, u] = T(null), [n, f] = T(!1), [s, g] = T(ce()), [d, x] = T(null), [c, o] = T(null), [h, w] = T(null), v = () => {
3026
- t([...e, s]), f(!1), g(ce());
3027
- }, C = (N) => {
3028
- t(e.map((k) => k.id === p ? N : k));
3029
- }, A = (N) => {
3030
- t(e.filter((k) => k.id !== N)), x(null), p === N && u(null);
3031
- }, j = (N) => {
3032
- if (N === 0) return;
3058
+ function Li({ layers: e, onChange: i, availableSources: t, availableIcons: r }) {
3059
+ const [p, u] = T(null), [n, x] = T(!1), [s, g] = T(ce()), [d, w] = T(null), [c, o] = T(null), [h, N] = T(null), v = () => {
3060
+ i([...e, s]), x(!1), g(ce());
3061
+ }, C = (y) => {
3062
+ i(e.map((k) => k.id === p ? y : k));
3063
+ }, E = (y) => {
3064
+ i(e.filter((k) => k.id !== y)), w(null), p === y && u(null);
3065
+ }, O = (y) => {
3066
+ if (y === 0) return;
3033
3067
  const k = [...e];
3034
- [k[N - 1], k[N]] = [k[N], k[N - 1]], t(k);
3035
- }, m = (N) => {
3036
- if (N === e.length - 1) return;
3068
+ [k[y - 1], k[y]] = [k[y], k[y - 1]], i(k);
3069
+ }, m = (y) => {
3070
+ if (y === e.length - 1) return;
3037
3071
  const k = [...e];
3038
- [k[N], k[N + 1]] = [k[N + 1], k[N]], t(k);
3039
- }, I = (N, k) => {
3040
- o(k), N.dataTransfer.effectAllowed = "move", N.dataTransfer.setData("text/plain", k);
3041
- }, F = (N, k) => {
3042
- N.preventDefault(), N.dataTransfer.dropEffect = "move", w(k);
3072
+ [k[y], k[y + 1]] = [k[y + 1], k[y]], i(k);
3073
+ }, L = (y, k) => {
3074
+ o(k), y.dataTransfer.effectAllowed = "move", y.dataTransfer.setData("text/plain", k);
3075
+ }, F = (y, k) => {
3076
+ y.preventDefault(), y.dataTransfer.dropEffect = "move", N(k);
3043
3077
  }, b = () => {
3044
- w(null);
3045
- }, M = (N, k) => {
3046
- N.preventDefault(), w(null);
3047
- const O = c;
3048
- if (o(null), !O || O === k) return;
3049
- const R = e.findIndex((q) => q.id === O), W = e.findIndex((q) => q.id === k);
3078
+ N(null);
3079
+ }, M = (y, k) => {
3080
+ y.preventDefault(), N(null);
3081
+ const j = c;
3082
+ if (o(null), !j || j === k) return;
3083
+ const R = e.findIndex((G) => G.id === j), W = e.findIndex((G) => G.id === k);
3050
3084
  if (R === -1 || W === -1) return;
3051
3085
  const U = [...e];
3052
- U.splice(R, 1), U.splice(W, 0, e[R]), t(U);
3086
+ U.splice(R, 1), U.splice(W, 0, e[R]), i(U);
3053
3087
  }, P = () => {
3054
- o(null), w(null);
3088
+ o(null), N(null);
3055
3089
  };
3056
3090
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3057
3091
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3061,7 +3095,7 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3061
3095
  {
3062
3096
  type: "button",
3063
3097
  onClick: () => {
3064
- f(!0), g(ce());
3098
+ x(!0), g(ce());
3065
3099
  },
3066
3100
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
3067
3101
  children: "+ Add Layer"
@@ -3069,22 +3103,22 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3069
3103
  )
3070
3104
  ] }),
3071
3105
  e.length === 0 && !n && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
3072
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((N, k) => {
3073
- var U, q, K, Q, Z;
3074
- const O = c === N.id, R = h === N.id, W = p === N.id;
3106
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((y, k) => {
3107
+ var U, G, J, K, Q;
3108
+ const j = c === y.id, R = h === y.id, W = p === y.id;
3075
3109
  return /* @__PURE__ */ l(
3076
3110
  "li",
3077
3111
  {
3078
3112
  draggable: !W,
3079
- onDragStart: W ? void 0 : (y) => I(y, N.id),
3080
- onDragOver: (y) => F(y, N.id),
3113
+ onDragStart: W ? void 0 : (f) => L(f, y.id),
3114
+ onDragOver: (f) => F(f, y.id),
3081
3115
  onDragLeave: b,
3082
- onDrop: (y) => M(y, N.id),
3116
+ onDrop: (f) => M(f, y.id),
3083
3117
  onDragEnd: P,
3084
3118
  className: [
3085
3119
  "mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
3086
3120
  R ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
3087
- O ? "mapui:opacity-50" : "mapui:opacity-100"
3121
+ j ? "mapui:opacity-50" : "mapui:opacity-100"
3088
3122
  ].join(" "),
3089
3123
  children: [
3090
3124
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:gap-2 mapui:px-3 mapui:py-2", children: [
@@ -3094,7 +3128,7 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3094
3128
  "button",
3095
3129
  {
3096
3130
  type: "button",
3097
- onClick: () => j(k),
3131
+ onClick: () => O(k),
3098
3132
  disabled: k === 0,
3099
3133
  "aria-label": "Move layer up",
3100
3134
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
@@ -3122,18 +3156,24 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3122
3156
  }
3123
3157
  ),
3124
3158
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
3125
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: N.label || N.id }),
3126
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: N.collection }),
3159
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: y.label || y.id }),
3160
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: y.collection }),
3127
3161
  /* @__PURE__ */ l("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
3128
- /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: N.dataMode }),
3129
- (((U = N.styles) == null ? void 0 : U.length) ?? 0) > 0 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: N.styles.map((y) => y.type).join(" · ") }),
3130
- N.visible === !1 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
3131
- (((K = (q = N.search) == null ? void 0 : q.fields) == null ? void 0 : K.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
3132
- N.search.fields.length,
3162
+ /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: y.dataMode }),
3163
+ (((U = y.styles) == null ? void 0 : U.length) ?? 0) > 0 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: y.styles.map((f) => f.type).join(" · ") }),
3164
+ y.visible === !1 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
3165
+ (((J = (G = y.search) == null ? void 0 : G.fields) == null ? void 0 : J.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
3166
+ y.search.fields.length,
3133
3167
  " search fields"
3134
3168
  ] }),
3135
- (((Z = (Q = N.legend) == null ? void 0 : Q.entries) == null ? void 0 : Z.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
3136
- N.legend.entries.length,
3169
+ (y.minZoom != null || y.maxZoom != null) && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-cyan-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-cyan-700", children: [
3170
+ "z",
3171
+ y.minZoom ?? 0,
3172
+ "–",
3173
+ y.maxZoom ?? 24
3174
+ ] }),
3175
+ (((Q = (K = y.legend) == null ? void 0 : K.entries) == null ? void 0 : Q.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
3176
+ y.legend.entries.length,
3137
3177
  " legend entries"
3138
3178
  ] })
3139
3179
  ] })
@@ -3144,44 +3184,44 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3144
3184
  "button",
3145
3185
  {
3146
3186
  type: "button",
3147
- onClick: () => u(p === N.id ? null : N.id),
3187
+ onClick: () => u(p === y.id ? null : y.id),
3148
3188
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
3149
- children: p === N.id ? "Close" : "Edit"
3189
+ children: p === y.id ? "Close" : "Edit"
3150
3190
  }
3151
3191
  ),
3152
3192
  /* @__PURE__ */ a(
3153
3193
  "button",
3154
3194
  {
3155
3195
  type: "button",
3156
- onClick: () => x(N.id),
3196
+ onClick: () => w(y.id),
3157
3197
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
3158
3198
  children: "Remove"
3159
3199
  }
3160
3200
  )
3161
3201
  ] })
3162
3202
  ] }),
3163
- p === N.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
3164
- je,
3203
+ p === y.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
3204
+ Oe,
3165
3205
  {
3166
- value: N,
3206
+ value: y,
3167
3207
  onChange: C,
3168
- availableSources: i,
3208
+ availableSources: t,
3169
3209
  availableIcons: r
3170
3210
  }
3171
3211
  ) })
3172
3212
  ]
3173
3213
  },
3174
- N.id
3214
+ y.id
3175
3215
  );
3176
3216
  }) }),
3177
3217
  n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3178
3218
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
3179
3219
  /* @__PURE__ */ a(
3180
- je,
3220
+ Oe,
3181
3221
  {
3182
3222
  value: s,
3183
3223
  onChange: g,
3184
- availableSources: i,
3224
+ availableSources: t,
3185
3225
  availableIcons: r
3186
3226
  }
3187
3227
  ),
@@ -3200,7 +3240,7 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3200
3240
  "button",
3201
3241
  {
3202
3242
  type: "button",
3203
- onClick: () => f(!1),
3243
+ onClick: () => x(!1),
3204
3244
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
3205
3245
  children: "Cancel"
3206
3246
  }
@@ -3213,24 +3253,24 @@ function Lt({ layers: e, onChange: t, availableSources: i, availableIcons: r })
3213
3253
  open: d !== null,
3214
3254
  title: "Remove Layer",
3215
3255
  description: "Are you sure you want to remove this layer from the configuration?",
3216
- onConfirm: () => d && A(d),
3217
- onCancel: () => x(null)
3256
+ onConfirm: () => d && E(d),
3257
+ onCancel: () => w(null)
3218
3258
  }
3219
3259
  )
3220
3260
  ] });
3221
3261
  }
3222
- const ie = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3223
- function Oe({ value: e, onChange: t }) {
3224
- const i = (r) => t({ ...e, ...r });
3262
+ const te = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3263
+ function je({ value: e, onChange: i }) {
3264
+ const t = (r) => i({ ...e, ...r });
3225
3265
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3226
3266
  /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3227
3267
  "input",
3228
3268
  {
3229
3269
  type: "text",
3230
3270
  value: e.id,
3231
- onChange: (r) => i({ id: r.target.value }),
3271
+ onChange: (r) => t({ id: r.target.value }),
3232
3272
  placeholder: "osm",
3233
- className: ie
3273
+ className: te
3234
3274
  }
3235
3275
  ) }),
3236
3276
  /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
@@ -3238,9 +3278,9 @@ function Oe({ value: e, onChange: t }) {
3238
3278
  {
3239
3279
  type: "text",
3240
3280
  value: e.label,
3241
- onChange: (r) => i({ label: r.target.value }),
3281
+ onChange: (r) => t({ label: r.target.value }),
3242
3282
  placeholder: "OpenStreetMap",
3243
- className: ie
3283
+ className: te
3244
3284
  }
3245
3285
  ) }),
3246
3286
  /* @__PURE__ */ a(S, { label: "Style URL", required: !0, children: /* @__PURE__ */ a(
@@ -3248,9 +3288,9 @@ function Oe({ value: e, onChange: t }) {
3248
3288
  {
3249
3289
  type: "url",
3250
3290
  value: e.url,
3251
- onChange: (r) => i({ url: r.target.value }),
3291
+ onChange: (r) => t({ url: r.target.value }),
3252
3292
  placeholder: "https://example.com/style.json",
3253
- className: ie
3293
+ className: te
3254
3294
  }
3255
3295
  ) }),
3256
3296
  /* @__PURE__ */ l(S, { label: "Thumbnail URL (optional)", children: [
@@ -3259,9 +3299,9 @@ function Oe({ value: e, onChange: t }) {
3259
3299
  {
3260
3300
  type: "url",
3261
3301
  value: e.thumbnail ?? "",
3262
- onChange: (r) => i({ thumbnail: r.target.value || void 0 }),
3302
+ onChange: (r) => t({ thumbnail: r.target.value || void 0 }),
3263
3303
  placeholder: "https://example.com/thumbnail.png",
3264
- className: ie
3304
+ className: te
3265
3305
  }
3266
3306
  ),
3267
3307
  e.thumbnail && /* @__PURE__ */ a(
@@ -3276,13 +3316,13 @@ function Oe({ value: e, onChange: t }) {
3276
3316
  ] });
3277
3317
  }
3278
3318
  const de = () => ({ id: "", label: "", url: "" });
3279
- function At({ basemaps: e, onChange: t }) {
3280
- const [i, r] = T(null), [p, u] = T(!1), [n, f] = T(de()), [s, g] = T(null), d = (o) => {
3281
- t(e.map((h) => h.id === i ? o : h));
3282
- }, x = () => {
3283
- t([...e, n]), u(!1), f(de());
3319
+ function Ai({ basemaps: e, onChange: i }) {
3320
+ const [t, r] = T(null), [p, u] = T(!1), [n, x] = T(de()), [s, g] = T(null), d = (o) => {
3321
+ i(e.map((h) => h.id === t ? o : h));
3322
+ }, w = () => {
3323
+ i([...e, n]), u(!1), x(de());
3284
3324
  }, c = (o) => {
3285
- t(e.filter((h) => h.id !== o)), g(null);
3325
+ i(e.filter((h) => h.id !== o)), g(null);
3286
3326
  };
3287
3327
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3288
3328
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3292,7 +3332,7 @@ function At({ basemaps: e, onChange: t }) {
3292
3332
  {
3293
3333
  type: "button",
3294
3334
  onClick: () => {
3295
- u(!0), f(de());
3335
+ u(!0), x(de());
3296
3336
  },
3297
3337
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
3298
3338
  children: "+ Add Basemap"
@@ -3323,9 +3363,9 @@ function At({ basemaps: e, onChange: t }) {
3323
3363
  "button",
3324
3364
  {
3325
3365
  type: "button",
3326
- onClick: () => r(i === o.id ? null : o.id),
3366
+ onClick: () => r(t === o.id ? null : o.id),
3327
3367
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
3328
- children: i === o.id ? "Close" : "Edit"
3368
+ children: t === o.id ? "Close" : "Edit"
3329
3369
  }
3330
3370
  ),
3331
3371
  /* @__PURE__ */ a(
@@ -3339,20 +3379,20 @@ function At({ basemaps: e, onChange: t }) {
3339
3379
  )
3340
3380
  ] })
3341
3381
  ] }),
3342
- i === o.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Oe, { value: o, onChange: d }) })
3382
+ t === o.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(je, { value: o, onChange: d }) })
3343
3383
  ]
3344
3384
  },
3345
3385
  o.id
3346
3386
  )) }),
3347
3387
  p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3348
3388
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
3349
- /* @__PURE__ */ a(Oe, { value: n, onChange: f }),
3389
+ /* @__PURE__ */ a(je, { value: n, onChange: x }),
3350
3390
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
3351
3391
  /* @__PURE__ */ a(
3352
3392
  "button",
3353
3393
  {
3354
3394
  type: "button",
3355
- onClick: x,
3395
+ onClick: w,
3356
3396
  disabled: !n.id || !n.url,
3357
3397
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
3358
3398
  children: "Save"
@@ -3382,15 +3422,15 @@ function At({ basemaps: e, onChange: t }) {
3382
3422
  ] });
3383
3423
  }
3384
3424
  const $e = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3385
- function Re({ value: e, onChange: t }) {
3386
- const i = (r) => t({ ...e, ...r });
3425
+ function Re({ value: e, onChange: i }) {
3426
+ const t = (r) => i({ ...e, ...r });
3387
3427
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3388
3428
  /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
3389
3429
  "input",
3390
3430
  {
3391
3431
  type: "text",
3392
3432
  value: e.id,
3393
- onChange: (r) => i({ id: r.target.value }),
3433
+ onChange: (r) => t({ id: r.target.value }),
3394
3434
  placeholder: "my-sprites",
3395
3435
  className: $e
3396
3436
  }
@@ -3401,7 +3441,7 @@ function Re({ value: e, onChange: t }) {
3401
3441
  {
3402
3442
  type: "url",
3403
3443
  value: e.url,
3404
- onChange: (r) => i({ url: r.target.value }),
3444
+ onChange: (r) => t({ url: r.target.value }),
3405
3445
  placeholder: "https://example.com/sprites/sprite",
3406
3446
  className: $e
3407
3447
  }
@@ -3416,21 +3456,21 @@ function Re({ value: e, onChange: t }) {
3416
3456
  ] })
3417
3457
  ] });
3418
3458
  }
3419
- const he = () => ({ id: "", url: "" }), ot = (e) => {
3459
+ const he = () => ({ id: "", url: "" }), oi = (e) => {
3420
3460
  try {
3421
3461
  return new URL(e), !0;
3422
3462
  } catch {
3423
3463
  return !1;
3424
3464
  }
3425
3465
  };
3426
- function Et({ sprites: e, onChange: t }) {
3427
- const [i, r] = T(null), [p, u] = T(!1), [n, f] = T(he()), [s, g] = T(null), d = (o) => {
3428
- t(e.map((h, w) => w === i ? o : h));
3429
- }, x = () => {
3430
- t([...e, n]), u(!1), f(he());
3466
+ function Ei({ sprites: e, onChange: i }) {
3467
+ const [t, r] = T(null), [p, u] = T(!1), [n, x] = T(he()), [s, g] = T(null), d = (o) => {
3468
+ i(e.map((h, N) => N === t ? o : h));
3469
+ }, w = () => {
3470
+ i([...e, n]), u(!1), x(he());
3431
3471
  }, c = (o) => {
3432
- const h = e.findIndex((w) => w.id === o);
3433
- t(e.filter((w) => w.id !== o)), i !== null && (h === i ? r(null) : h < i && r(i - 1)), g(null);
3472
+ const h = e.findIndex((N) => N.id === o);
3473
+ i(e.filter((N) => N.id !== o)), t !== null && (h === t ? r(null) : h < t && r(t - 1)), g(null);
3434
3474
  };
3435
3475
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3436
3476
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -3440,7 +3480,7 @@ function Et({ sprites: e, onChange: t }) {
3440
3480
  {
3441
3481
  type: "button",
3442
3482
  onClick: () => {
3443
- u(!0), f(he());
3483
+ u(!0), x(he());
3444
3484
  },
3445
3485
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
3446
3486
  children: "+ Add Sprite Sheet"
@@ -3463,9 +3503,9 @@ function Et({ sprites: e, onChange: t }) {
3463
3503
  "button",
3464
3504
  {
3465
3505
  type: "button",
3466
- onClick: () => r(i === h ? null : h),
3506
+ onClick: () => r(t === h ? null : h),
3467
3507
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
3468
- children: i === h ? "Close" : "Edit"
3508
+ children: t === h ? "Close" : "Edit"
3469
3509
  }
3470
3510
  ),
3471
3511
  /* @__PURE__ */ a(
@@ -3479,21 +3519,21 @@ function Et({ sprites: e, onChange: t }) {
3479
3519
  )
3480
3520
  ] })
3481
3521
  ] }),
3482
- i === h && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Re, { value: o, onChange: d }) })
3522
+ t === h && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Re, { value: o, onChange: d }) })
3483
3523
  ]
3484
3524
  },
3485
3525
  h
3486
3526
  )) }),
3487
3527
  p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
3488
3528
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Sprite Sheet" }),
3489
- /* @__PURE__ */ a(Re, { value: n, onChange: f }),
3529
+ /* @__PURE__ */ a(Re, { value: n, onChange: x }),
3490
3530
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
3491
3531
  /* @__PURE__ */ a(
3492
3532
  "button",
3493
3533
  {
3494
3534
  type: "button",
3495
- onClick: x,
3496
- disabled: !n.id || !n.url || !ot(n.url) || e.some((o) => o.id === n.id),
3535
+ onClick: w,
3536
+ disabled: !n.id || !n.url || !oi(n.url) || e.some((o) => o.id === n.id),
3497
3537
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
3498
3538
  children: "Save"
3499
3539
  }
@@ -3521,7 +3561,7 @@ function Et({ sprites: e, onChange: t }) {
3521
3561
  )
3522
3562
  ] });
3523
3563
  }
3524
- const mt = [
3564
+ const mi = [
3525
3565
  { key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
3526
3566
  { key: "showLegend", label: "Legend", description: "Map legend" },
3527
3567
  { key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
@@ -3534,13 +3574,13 @@ const mt = [
3534
3574
  { key: "showMeasureTool", label: "Measure Tool", description: "Measure distances and areas on the map" },
3535
3575
  { key: "showSelectionTool", label: "Selection Tool", description: "Select features by click or box draw" }
3536
3576
  ];
3537
- function It({ value: e, onChange: t }) {
3538
- const i = (r, p) => {
3539
- t({ ...e, [r]: p });
3577
+ function Ii({ value: e, onChange: i }) {
3578
+ const t = (r, p) => {
3579
+ i({ ...e, [r]: p });
3540
3580
  };
3541
3581
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
3542
3582
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-2 mapui:text-xs mapui:text-gray-500", children: "Enable or disable UI panels and controls." }),
3543
- /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: mt.map(({ key: r, label: p, description: u }) => {
3583
+ /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: mi.map(({ key: r, label: p, description: u }) => {
3544
3584
  const n = e[r];
3545
3585
  return /* @__PURE__ */ l(
3546
3586
  "label",
@@ -3557,7 +3597,7 @@ function It({ value: e, onChange: t }) {
3557
3597
  {
3558
3598
  type: "checkbox",
3559
3599
  checked: n,
3560
- onChange: (f) => i(r, f.target.checked),
3600
+ onChange: (x) => t(r, x.target.checked),
3561
3601
  className: "mapui:sr-only",
3562
3602
  "aria-label": p
3563
3603
  }
@@ -3588,46 +3628,46 @@ function It({ value: e, onChange: t }) {
3588
3628
  }) })
3589
3629
  ] });
3590
3630
  }
3591
- const Ke = [
3631
+ const Je = [
3592
3632
  { key: "latitude", label: "Latitude", min: -90, max: 90, step: 1e-6, placeholder: "0" },
3593
3633
  { key: "longitude", label: "Longitude", min: -180, max: 180, step: 1e-6, placeholder: "0" },
3594
3634
  { key: "zoom", label: "Zoom", min: 0, max: 24, step: 0.1, placeholder: "2" },
3595
3635
  { key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
3596
3636
  { key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
3597
3637
  ];
3598
- function st(e, t) {
3599
- const i = Ke.find((r) => r.key === e);
3600
- if (i) {
3601
- if (isNaN(t)) return "Must be a number";
3602
- if (t < i.min) return `Must be at least ${i.min}`;
3603
- if (t > i.max) return `Must be at most ${i.max}`;
3638
+ function si(e, i) {
3639
+ const t = Je.find((r) => r.key === e);
3640
+ if (t) {
3641
+ if (isNaN(i)) return "Must be a number";
3642
+ if (i < t.min) return `Must be at least ${t.min}`;
3643
+ if (i > t.max) return `Must be at most ${t.max}`;
3604
3644
  }
3605
3645
  }
3606
- const ct = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3607
- function Mt({ value: e, onChange: t }) {
3608
- const i = (r, p) => {
3646
+ const ci = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3647
+ function Mi({ value: e, onChange: i }) {
3648
+ const t = (r, p) => {
3609
3649
  const u = parseFloat(p);
3610
- t({ ...e, [r]: isNaN(u) ? 0 : u });
3650
+ i({ ...e, [r]: isNaN(u) ? 0 : u });
3611
3651
  };
3612
- return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Ke.map(({ key: r, label: p, min: u, max: n, step: f, placeholder: s }) => {
3613
- const g = st(r, e[r]);
3652
+ return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Je.map(({ key: r, label: p, min: u, max: n, step: x, placeholder: s }) => {
3653
+ const g = si(r, e[r]);
3614
3654
  return /* @__PURE__ */ a(S, { label: p, error: g, children: /* @__PURE__ */ a(
3615
3655
  "input",
3616
3656
  {
3617
3657
  type: "number",
3618
3658
  min: u,
3619
3659
  max: n,
3620
- step: f,
3660
+ step: x,
3621
3661
  value: e[r],
3622
3662
  placeholder: s,
3623
- onChange: (d) => i(r, d.target.value),
3624
- className: `${ct} ${g ? "mapui:border-red-400" : ""}`
3663
+ onChange: (d) => t(r, d.target.value),
3664
+ className: `${ci} ${g ? "mapui:border-red-400" : ""}`
3625
3665
  }
3626
3666
  ) }, r);
3627
3667
  }) });
3628
3668
  }
3629
- function Ft({ config: e }) {
3630
- const t = sa(e);
3669
+ function Fi({ config: e }) {
3670
+ const i = sa(e);
3631
3671
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3632
3672
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
3633
3673
  /* @__PURE__ */ a(
@@ -3635,201 +3675,205 @@ function Ft({ config: e }) {
3635
3675
  {
3636
3676
  className: [
3637
3677
  "mapui:inline-flex mapui:items-center mapui:rounded-full mapui:px-2.5 mapui:py-0.5 mapui:text-xs mapui:font-semibold",
3638
- t.success ? "mapui:bg-green-100 mapui:text-green-800" : "mapui:bg-red-100 mapui:text-red-800"
3678
+ i.success ? "mapui:bg-green-100 mapui:text-green-800" : "mapui:bg-red-100 mapui:text-red-800"
3639
3679
  ].join(" "),
3640
- children: t.success ? "Valid" : "Invalid"
3680
+ children: i.success ? "Valid" : "Invalid"
3641
3681
  }
3642
3682
  ),
3643
3683
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500", children: "MapConfig validation" })
3644
3684
  ] }),
3645
- !t.success && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
3685
+ !i.success && /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3", children: [
3646
3686
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:font-semibold mapui:text-red-700", children: "Validation Errors" }),
3647
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: t.error.errors.map((i, r) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
3648
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children: i.path.join(" > ") || "root" }),
3649
- /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-800", children: i.message })
3687
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: i.error.errors.map((t, r) => /* @__PURE__ */ l("li", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
3688
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-red-600", children: t.path.join(" > ") || "root" }),
3689
+ /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-red-800", children: t.message })
3650
3690
  ] }, r)) })
3651
3691
  ] }),
3652
3692
  /* @__PURE__ */ a("div", { className: "mapui:overflow-auto mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-gray-50", children: /* @__PURE__ */ a("pre", { className: "mapui:m-0 mapui:p-3 mapui:text-xs mapui:text-gray-800 mapui:whitespace-pre", children: JSON.stringify(e, null, 2) }) })
3653
3693
  ] });
3654
3694
  }
3655
- function dt(e, t) {
3656
- const [i, r] = e, [p, u] = t;
3695
+ function di(e, i) {
3696
+ const [t, r] = e, [p, u] = i;
3657
3697
  return {
3658
3698
  type: "Polygon",
3659
3699
  coordinates: [[
3660
- [i, r],
3700
+ [t, r],
3661
3701
  [p, r],
3662
3702
  [p, u],
3663
- [i, u],
3664
- [i, r]
3703
+ [t, u],
3704
+ [t, r]
3665
3705
  ]]
3666
3706
  };
3667
3707
  }
3668
- function Pt(e, t) {
3708
+ function Pi(e, i) {
3669
3709
  return {
3670
3710
  type: "Feature",
3671
3711
  properties: {},
3672
- geometry: dt(e, t)
3712
+ geometry: di(e, i)
3673
3713
  };
3674
3714
  }
3675
3715
  export {
3676
- rr as BasemapConfigSchema,
3677
- Oe as BasemapEditor,
3678
- At as BasemapList,
3679
- $t as BasemapSwitcher,
3680
- lr as CircleLayoutSchema,
3681
- pr as CirclePaintSchema,
3682
- nr as CircleStyleSchema,
3683
- Bt as CollapsibleControl,
3716
+ pr as BasemapConfigSchema,
3717
+ je as BasemapEditor,
3718
+ Ai as BasemapList,
3719
+ $i as BasemapSwitcher,
3720
+ nr as BrandingConfigSchema,
3721
+ ur as CircleLayoutSchema,
3722
+ or as CirclePaintSchema,
3723
+ mr as CircleStyleSchema,
3724
+ Bi as CollapsibleControl,
3684
3725
  X as CollapsibleSection,
3685
- Ct as CollectionBrowser,
3686
- J as ColorPicker,
3687
- Ft as ConfigPreview,
3726
+ Ci as CollectionBrowser,
3727
+ Z as ColorPicker,
3728
+ Fi as ConfigPreview,
3688
3729
  re as ConfirmDialog,
3689
- Ut as CoordinateDisplay,
3690
- ur as DatetimeSearchFieldSchema,
3691
- _t as ExportButton,
3692
- xt as ExportModal,
3693
- Ht as FeatureDetailPanel,
3694
- Xt as FeatureTooltip,
3695
- or as FillLayoutSchema,
3696
- mr as FillPaintSchema,
3697
- sr as FillStyleSchema,
3698
- cr as FilterConfigSchema,
3730
+ Ui as CoordinateDisplay,
3731
+ sr as DEFAULT_HEADER_COLOR,
3732
+ cr as DatetimeSearchFieldSchema,
3733
+ _i as ExportButton,
3734
+ xi as ExportModal,
3735
+ Hi as FeatureDetailPanel,
3736
+ Xi as FeatureTooltip,
3737
+ dr as FillLayoutSchema,
3738
+ hr as FillPaintSchema,
3739
+ gr as FillStyleSchema,
3740
+ br as FilterConfigSchema,
3699
3741
  S as FormField,
3700
- dr as GeometryTypeSchema,
3701
- hr as LayerConfigSchema,
3702
- je as LayerEditor,
3703
- Lt as LayerList,
3704
- Kt as LayerPanel,
3705
- Zt as Legend,
3706
- gr as LegendConfigSchema,
3742
+ yr as GeometryTypeSchema,
3743
+ fr as LayerConfigSchema,
3744
+ Oe as LayerEditor,
3745
+ Li as LayerList,
3746
+ Ji as LayerPanel,
3747
+ Qi as Legend,
3748
+ xr as LegendConfigSchema,
3707
3749
  Xa as LegendEditor,
3708
3750
  Ya as LegendEntryEditor,
3709
- br as LegendEntrySchema,
3710
- yr as LineLayoutSchema,
3711
- fr as LinePaintSchema,
3712
- xr as LineStyleSchema,
3713
- wr as MapConfigSchema,
3714
- wt as MeasurePanel,
3715
- Nr as NumberSearchFieldSchema,
3716
- vr as OgcApiSourceSchema,
3717
- kr as PropertyDisplayConfigSchema,
3718
- tt as PropertyDisplayEditor,
3719
- Cr as PropertyDisplaySchema,
3720
- vt as ResultsDrawer,
3721
- Sr as SearchConfigSchema,
3722
- Ka as SearchFieldEditor,
3723
- Za as SearchFieldList,
3724
- Tr as SearchFieldSchema,
3725
- tr as SearchPanel,
3726
- Dr as SelectSearchFieldSchema,
3727
- Nt as SelectionPanel,
3751
+ wr as LegendEntrySchema,
3752
+ Nr as LineLayoutSchema,
3753
+ vr as LinePaintSchema,
3754
+ kr as LineStyleSchema,
3755
+ Cr as MapConfigSchema,
3756
+ wi as MeasurePanel,
3757
+ Sr as NumberSearchFieldSchema,
3758
+ Tr as OgcApiSourceSchema,
3759
+ Dr as PropertyDisplayConfigSchema,
3760
+ ii as PropertyDisplayEditor,
3761
+ Lr as PropertyDisplaySchema,
3762
+ vi as ResultsDrawer,
3763
+ Ar as SearchConfigSchema,
3764
+ Ja as SearchFieldEditor,
3765
+ Qa as SearchFieldList,
3766
+ Er as SearchFieldSchema,
3767
+ rr as SearchPanel,
3768
+ Ir as SelectSearchFieldSchema,
3769
+ Ni as SelectionPanel,
3728
3770
  we as SourceEditor,
3729
- kt as SourceList,
3771
+ ki as SourceList,
3730
3772
  Re as SpriteSourceEditor,
3731
- Et as SpriteSourceList,
3732
- Lr as SpriteSourceSchema,
3733
- Ar as StyleConfigSchema,
3773
+ Ei as SpriteSourceList,
3774
+ Mr as SpriteSourceSchema,
3775
+ Fr as StyleConfigSchema,
3734
3776
  Ha as StyleEditor,
3735
- Er as SymbolLayoutSchema,
3736
- Ir as SymbolPaintSchema,
3737
- Mr as SymbolStyleSchema,
3738
- Fr as TextSearchFieldSchema,
3739
- It as UIConfigEditor,
3740
- Pr as UIConfigSchema,
3777
+ Pr as SymbolLayoutSchema,
3778
+ Or as SymbolPaintSchema,
3779
+ jr as SymbolStyleSchema,
3780
+ $r as TextSearchFieldSchema,
3781
+ Ii as UIConfigEditor,
3782
+ Rr as UIConfigSchema,
3741
3783
  na as UNITS_FOR_MODE,
3742
3784
  xe as UNIT_LABELS,
3743
- jr as ViewConfigSchema,
3744
- Mt as ViewEditor,
3745
- ai as and,
3746
- ti as bboxFromGeometry,
3747
- ii as between,
3748
- Pt as buildBoxDrawData,
3749
- dt as buildBoxPolygon,
3750
- pt as buildDefaultStylesForGeometryTypes,
3751
- ri as buildMeasureGeometryData,
3752
- li as buildMeasurePointsData,
3753
- pi as calculateArea,
3754
- ni as calculateDistance,
3755
- ui as calculateMeasurement,
3785
+ Br as ViewConfigSchema,
3786
+ Mi as ViewEditor,
3787
+ at as and,
3788
+ it as bboxFromGeometry,
3789
+ tt as between,
3790
+ Pi as buildBoxDrawData,
3791
+ di as buildBoxPolygon,
3792
+ pi as buildDefaultStylesForGeometryTypes,
3793
+ rt as buildGeometryFilter,
3794
+ lt as buildMeasureGeometryData,
3795
+ pt as buildMeasurePointsData,
3796
+ nt as calculateArea,
3797
+ ut as calculateDistance,
3798
+ ot as calculateMeasurement,
3756
3799
  _e as defaultCircle,
3757
3800
  ge as defaultFill,
3758
- qa as defaultLine,
3759
- Ga as defaultSymbol,
3760
- oi as defaultUnitForMode,
3801
+ Ga as defaultLine,
3802
+ qa as defaultSymbol,
3803
+ mt as defaultUnitForMode,
3761
3804
  Xe as detectGeometryStyleTypesFromQueryables,
3762
- rt as detectGeometryTypeFromQueryables,
3763
- Je as detectGeometryTypesFromFeatures,
3764
- St as detectStyleTypeForCollection,
3765
- Tt as detectStyleTypesForCollection,
3766
- mi as downloadBlob,
3767
- si as downloadCsv,
3768
- ci as eq,
3805
+ ri as detectGeometryTypeFromQueryables,
3806
+ Ze as detectGeometryTypesFromFeatures,
3807
+ Si as detectStyleTypeForCollection,
3808
+ Ti as detectStyleTypesForCollection,
3809
+ st as downloadBlob,
3810
+ ct as downloadCsv,
3811
+ dt as eq,
3769
3812
  We as expressionColors,
3770
3813
  Ia as expressionEntries,
3771
3814
  Ma as expressionPropertyName,
3772
3815
  Ea as expressionType,
3773
3816
  He as extractGeometryType,
3774
- di as featuresToCsv,
3775
- hi as fetchCollectionDetail,
3776
- gi as fetchCollections,
3777
- bi as fetchConformance,
3817
+ ht as featuresToCsv,
3818
+ gt as fetchCollectionDetail,
3819
+ bt as fetchCollections,
3820
+ yt as fetchConformance,
3778
3821
  ma as fetchDistinctValues,
3779
- yi as fetchFeatureById,
3780
- fi as fetchFeatureCount,
3822
+ ft as fetchFeatureById,
3823
+ xt as fetchFeatureCount,
3781
3824
  ye as fetchFeatures,
3782
- Ge as fetchQueryables,
3783
- xi as fetchSpriteNames,
3784
- wi as fetchSpriteUrlFromStyle,
3785
- Ni as fetchTileJson,
3786
- qt as formatDMS,
3787
- Gt as formatDecimal,
3825
+ qe as fetchQueryables,
3826
+ wt as fetchSpriteNames,
3827
+ Nt as fetchSpriteUrlFromStyle,
3828
+ vt as fetchTileJson,
3829
+ Gi as formatDMS,
3830
+ qi as formatDecimal,
3788
3831
  ua as formatMeasurement,
3789
- vi as fromSimpleFilters,
3790
- ki as fromStructuredFilters,
3832
+ kt as fromSimpleFilters,
3833
+ Ct as fromStructuredFilters,
3791
3834
  Ye as geometryTypeToStyleType,
3792
3835
  fe as geometryTypeToStyleTypes,
3793
3836
  pe as getColorFromPalette,
3794
- Ci as getCql2FilteredVectorTileUrl,
3795
- Si as getFilteredVectorTileUrl,
3837
+ St as getCql2FilteredVectorTileUrl,
3838
+ Tt as getFilteredVectorTileUrl,
3796
3839
  Fa as getPrimaryColor,
3797
3840
  Pa as getShapeForStyleType,
3798
- Ti as getTileJsonUrl,
3799
- Di as getVectorTileUrl,
3800
- Li as gt,
3801
- Ai as gte,
3802
- Dt as humanizePropertyName,
3803
- Ei as inList,
3804
- _ as isExpression,
3805
- it as isGeometryProperty,
3806
- Ii as isNull,
3807
- Mi as like,
3808
- Fi as lt,
3809
- Pi as lte,
3810
- ji as neq,
3811
- Oi as not,
3812
- $i as or,
3813
- Ri as resolveAvailableIcons,
3814
- Bi as resolvePropertyDisplay,
3815
- zi as resolveStyleWithSprites,
3816
- Ui as sDwithin,
3817
- qi as sIntersects,
3818
- Gi as sWithin,
3841
+ Dt as getTileJsonUrl,
3842
+ Lt as getVectorTileSourceKey,
3843
+ At as getVectorTileUrl,
3844
+ Et as gt,
3845
+ It as gte,
3846
+ Di as humanizePropertyName,
3847
+ Mt as inList,
3848
+ V as isExpression,
3849
+ ti as isGeometryProperty,
3850
+ Ft as isNull,
3851
+ Pt as like,
3852
+ Ot as lt,
3853
+ jt as lte,
3854
+ $t as neq,
3855
+ Rt as not,
3856
+ Bt as or,
3857
+ zt as resolveAvailableIcons,
3858
+ Ut as resolvePropertyDisplay,
3859
+ Gt as resolveStyleWithSprites,
3860
+ qt as sDwithin,
3861
+ Wt as sIntersects,
3862
+ _t as sWithin,
3819
3863
  sa as safeValidateMapConfig,
3820
- Wi as selectedFeatureKey,
3821
- _i as serializeCql2,
3822
- Vi as tAfter,
3823
- Hi as tBefore,
3824
- Yi as tDuring,
3825
- lt as toAvailableProperties,
3826
- Xi as useCsvExport,
3827
- Ji as useExport,
3828
- Ki as useMeasure,
3829
- Qi as useOgcCollectionDetail,
3830
- qe as useOgcCollections,
3831
- Zi as useOgcFeatures,
3864
+ Vt as selectedFeatureKey,
3865
+ Ht as serializeCql2,
3866
+ Yt as tAfter,
3867
+ Xt as tBefore,
3868
+ Zt as tDuring,
3869
+ li as toAvailableProperties,
3870
+ Jt as useCsvExport,
3871
+ Kt as useExport,
3872
+ Qt as useMeasure,
3873
+ er as useOgcCollectionDetail,
3874
+ Ge as useOgcCollections,
3875
+ ar as useOgcFeatures,
3832
3876
  oa as useOgcQueryables,
3833
- er as useSelection,
3834
- Or as validateMapConfig
3877
+ ir as useSelection,
3878
+ zr as validateMapConfig
3835
3879
  };