@edugis-org/webmapx 0.1.15 → 0.2.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.
Files changed (43) hide show
  1. package/dist-lib/{alert-C_G5X6J8.js → alert-CM5EIQzP.js} +28 -30
  2. package/dist-lib/{attribution-format-B4f05_u0.js → attribution-format-CZg2WjHO.js} +1 -1
  3. package/dist-lib/{button-BlZd3WPH.js → button-B_8TR-jN.js} +34 -38
  4. package/dist-lib/{checkbox-DB4oPyyw.js → checkbox-DOopjfpt.js} +25 -29
  5. package/dist-lib/{chunk.36O46B5H-km1dakSW.js → chunk.36O46B5H-EYkf8iaY.js} +8 -8
  6. package/dist-lib/{chunk.3RPBFEDE-Cxq6VVR6.js → chunk.3RPBFEDE-DC091CnT.js} +1 -1
  7. package/dist-lib/{chunk.5JY5FUCG-CYkzbQXS.js → chunk.5JY5FUCG-BmZ-LXEt.js} +324 -306
  8. package/dist-lib/{chunk.AJ3ENQ5C-DXVGX5Dn.js → chunk.AJ3ENQ5C-BhSO747I.js} +22 -25
  9. package/dist-lib/chunk.NYIIDP5N-DoNij0Gf.js +99 -0
  10. package/dist-lib/{chunk.SI4ACBFK-CLb9VfMG.js → chunk.SI4ACBFK-CdJVQctt.js} +1 -1
  11. package/dist-lib/{chunk.YHLNUJ7P-ByKy0MKm.js → chunk.YHLNUJ7P-DINaI4pI.js} +22 -24
  12. package/dist-lib/{decorate-CKr8yG1g.js → decorate-DNmmPsJp.js} +1 -1
  13. package/dist-lib/decorators-d8E4nZJy.js +624 -0
  14. package/dist-lib/{divider-BOFbR_Ny.js → divider-Ly2UhLd1.js} +6 -7
  15. package/dist-lib/{icon-CBNpO1lq.js → icon-DIjRqLFJ.js} +1 -1
  16. package/dist-lib/{icon-button-B5rXu3Gg.js → icon-button-C5K3NZWf.js} +39 -42
  17. package/dist-lib/{input-B212BH6L.js → input-DUaeAHt8.js} +63 -49
  18. package/dist-lib/{option-BQN9Zz_8.js → option-LnK7BxuV.js} +56 -59
  19. package/dist-lib/{spinner-DdcBaa3z.js → spinner-D_cltutw.js} +2 -2
  20. package/dist-lib/{toast-Bq2PmEpm.js → toast-DDqkINxT.js} +1 -1
  21. package/dist-lib/{tooltip-CBGOiZwJ.js → tooltip-C86FhPFx.js} +26 -27
  22. package/dist-lib/{webmapx-3d-tool-CKoLGMpk.js → webmapx-3d-tool-DXzN9Tha.js} +6 -7
  23. package/dist-lib/{webmapx-base-tool-Bc9Wz0yA.js → webmapx-base-tool-idjVnrFA.js} +8 -8
  24. package/dist-lib/{webmapx-config-edit-tool-7265_DNz.js → webmapx-config-edit-tool-B14KD1ak.js} +21 -22
  25. package/dist-lib/{webmapx-coordinates-tool-CSwh6fBU.js → webmapx-coordinates-tool-D57LfNy6.js} +25 -26
  26. package/dist-lib/{webmapx-core-bundle-Q6mWOib1.js → webmapx-core-bundle-C4M7AiLh.js} +726 -723
  27. package/dist-lib/{webmapx-draw-tool-6QRr5Gip.js → webmapx-draw-tool-utv2v3LN.js} +345 -325
  28. package/dist-lib/{webmapx-geolocation-tool-qxN5aaVB.js → webmapx-geolocation-tool-BIEqZkMX.js} +27 -28
  29. package/dist-lib/{webmapx-import-layer-tool-tJ374qHR.js → webmapx-import-layer-tool-DcFxtRJN.js} +18 -19
  30. package/dist-lib/{webmapx-info-tool-C3txgv3v.js → webmapx-info-tool-DDrllfth.js} +69 -70
  31. package/dist-lib/{webmapx-language-osmvector-jQzTOPU1.js → webmapx-language-osmvector-D_OP-fC3.js} +8 -9
  32. package/dist-lib/{webmapx-measure-tool-Cxxrzgdf.js → webmapx-measure-tool-D-6STy8v.js} +33 -34
  33. package/dist-lib/{webmapx-modal-tool-DQVHNXqX.js → webmapx-modal-tool-CftNio2w.js} +10 -10
  34. package/dist-lib/{webmapx-plugin-tool-BNZ61x6s.js → webmapx-plugin-tool-CGwliIUs.js} +5 -6
  35. package/dist-lib/{webmapx-print-tool-BDOTbS6u.js → webmapx-print-tool-DVL_0Hqz.js} +55 -56
  36. package/dist-lib/{webmapx-search-tool-CHlsE2Wx.js → webmapx-search-tool-D6y6WT8q.js} +13 -14
  37. package/dist-lib/{webmapx-settings-B0AT9Vjn.js → webmapx-settings--mFVPZsD.js} +41 -45
  38. package/dist-lib/{webmapx-truearea-tool-dxSgcbOj.js → webmapx-truearea-tool-nQzVCTAC.js} +31 -32
  39. package/dist-lib/{webmapx-view-mode-tool-DVSMakdh.js → webmapx-view-mode-tool-CQI54rFj.js} +11 -12
  40. package/dist-lib/webmapx.css +1 -1
  41. package/dist-lib/webmapx.js +22 -19
  42. package/package.json +1 -1
  43. package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +0 -34
@@ -1,35 +1,30 @@
1
1
  import { a as e, t } from "./chunk-HEgqtunE.js";
2
- import { a as n, i as r, n as i, r as a, t as o } from "./chunk.YHLNUJ7P-ByKy0MKm.js";
3
- import { a as s, i as c, o as l, r as u, t as d } from "./decorate-CKr8yG1g.js";
4
- import { t as f } from "./webmapx-base-tool-Bc9Wz0yA.js";
5
- import "./webmapx-plugin-tool-BNZ61x6s.js";
6
- import { i as p, o as m, r as h, s as g, t as _ } from "./chunk.AJ3ENQ5C-DXVGX5Dn.js";
7
- import { t as ee } from "./chunk.NYIIDP5N-B4UCI-rQ.js";
8
- import { t as v } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
9
- import "./icon-CBNpO1lq.js";
10
- import { t as y } from "./chunk.36O46B5H-km1dakSW.js";
11
- import { t as b } from "./chunk.3RPBFEDE-Cxq6VVR6.js";
12
- import "./button-BlZd3WPH.js";
13
- import { t as x } from "./checkbox-DB4oPyyw.js";
14
- import { n as te } from "./input-B212BH6L.js";
15
- import { t as ne } from "./chunk.SI4ACBFK-CLb9VfMG.js";
16
- import { t as re } from "./tooltip-CBGOiZwJ.js";
17
- import "./spinner-DdcBaa3z.js";
18
- import "./icon-button-B5rXu3Gg.js";
19
- import { n as ie, r as ae } from "./attribution-format-B4f05_u0.js";
20
- import { a as oe, i as se, t as ce } from "./zip.js-DVhmtjxZ.js";
21
- import { i as le } from "./geo-calculations-DbFJAUoI.js";
22
- import { t as ue } from "./throttle-BeneRNYK.js";
23
- import "./webmapx-modal-tool-DQVHNXqX.js";
24
- import { LitElement as S, css as C, html as w, nothing as T, svg as E } from "lit";
25
- import { customElement as D, eventOptions as de, property as O, query as k, queryAssignedElements as fe, state as A } from "lit/decorators.js";
26
- import { classMap as pe } from "lit/directives/class-map.js";
27
- import { ifDefined as me } from "lit/directives/if-defined.js";
28
- import { live as j } from "lit/directives/live.js";
29
- import { when as he } from "lit/directives/when.js";
30
- import { unsafeHTML as M } from "lit-html/directives/unsafe-html.js";
2
+ import { a as n, i as r, o as i, s as a, t as o } from "./chunk.YHLNUJ7P-DINaI4pI.js";
3
+ import { a as s, c, d as l, h as u, i as d, n as f, o as p, p as m, r as h, s as g, t as _ } from "./decorators-d8E4nZJy.js";
4
+ import { a as v, i as y, o as b, r as x, t as S } from "./decorate-DNmmPsJp.js";
5
+ import { t as C } from "./webmapx-base-tool-idjVnrFA.js";
6
+ import "./webmapx-plugin-tool-CGwliIUs.js";
7
+ import { i as ee, o as te, r as ne, s as w, t as re } from "./chunk.AJ3ENQ5C-BhSO747I.js";
8
+ import { a as ie, n as ae, t as oe } from "./chunk.NYIIDP5N-DoNij0Gf.js";
9
+ import { t as se } from "./chunk.6CTB5ZDJ-DjZrBd6Y.js";
10
+ import "./icon-DIjRqLFJ.js";
11
+ import { t as ce } from "./chunk.36O46B5H-EYkf8iaY.js";
12
+ import { t as le } from "./chunk.3RPBFEDE-DC091CnT.js";
13
+ import "./button-B_8TR-jN.js";
14
+ import { t as ue } from "./checkbox-DOopjfpt.js";
15
+ import { n as T, r as de } from "./input-DUaeAHt8.js";
16
+ import { t as fe } from "./chunk.SI4ACBFK-CdJVQctt.js";
17
+ import { t as pe } from "./tooltip-C86FhPFx.js";
18
+ import "./spinner-D_cltutw.js";
19
+ import { n as me } from "./chunk.5JY5FUCG-BmZ-LXEt.js";
20
+ import "./icon-button-C5K3NZWf.js";
21
+ import { n as he, r as ge } from "./attribution-format-CZg2WjHO.js";
22
+ import { a as _e, i as ve, t as ye } from "./zip.js-DVhmtjxZ.js";
23
+ import { i as E } from "./geo-calculations-DbFJAUoI.js";
24
+ import { t as be } from "./throttle-BeneRNYK.js";
25
+ import "./webmapx-modal-tool-CftNio2w.js";
31
26
  //#region src/components/webmapx-layout.ts
32
- var ge = class extends S {
27
+ var D = class extends g {
33
28
  constructor(...e) {
34
29
  super(...e), this.slotDirections = {
35
30
  "top-left": "vertical",
@@ -44,7 +39,7 @@ var ge = class extends S {
44
39
  };
45
40
  }
46
41
  static {
47
- this.styles = C`
42
+ this.styles = u`
48
43
  :host {
49
44
  position: absolute;
50
45
  inset: 0;
@@ -192,7 +187,7 @@ var ge = class extends S {
192
187
  `;
193
188
  }
194
189
  render() {
195
- return w`
190
+ return m`
196
191
  <div class="overlay-surface">
197
192
  <!-- Edge zones first (lowest stacking order) -->
198
193
  <div class="slot-zone slot-zone--edge-bottom-right">
@@ -254,22 +249,22 @@ var ge = class extends S {
254
249
  })?.getAttribute("direction") === "horizontal" ? "horizontal" : "vertical";
255
250
  }
256
251
  };
257
- d([A()], ge.prototype, "slotDirections", void 0), ge = d([D("webmapx-layout")], ge);
252
+ S([d()], D.prototype, "slotDirections", void 0), D = S([p("webmapx-layout")], D);
258
253
  //#endregion
259
254
  //#region src/components/internal/tool-selection-scope.ts
260
- function N(e, t) {
255
+ function xe(e, t) {
261
256
  return !!(t && e.includes(t));
262
257
  }
263
- function _e(e, t) {
258
+ function O(e, t) {
264
259
  return !!(e.sourceToolbar && t && e.sourceToolbar !== t);
265
260
  }
266
- function ve(e) {
261
+ function Se(e) {
267
262
  let { toolIds: t, currentActiveToolId: n, detail: r, ownToolbar: i } = e;
268
- if (!_e(r, i)) return r.toolId ? N(t, r.toolId) ? r.toolId : void 0 : r.previousToolId ? N(t, r.previousToolId) ? null : void 0 : r.toolId === null ? null : void 0;
263
+ if (!O(r, i)) return r.toolId ? xe(t, r.toolId) ? r.toolId : void 0 : r.previousToolId ? xe(t, r.previousToolId) ? null : void 0 : r.toolId === null ? null : void 0;
269
264
  }
270
265
  //#endregion
271
266
  //#region src/components/webmapx-toolbar.ts
272
- var P = class extends S {
267
+ var Ce = class extends g {
273
268
  constructor(...e) {
274
269
  super(...e), this.orientation = "vertical", this.toolManager = null, this.toolPanel = null, this.boundHandleToolActivated = (e) => this.handleToolActivated(e), this.boundHandleToolDeactivated = (e) => this.handleToolDeactivated(e), this.boundHandleToolSelect = (e) => this.handleToolSelect(e), this.boundHandlePanelClose = (e) => this.handlePanelClose(e), this.handleArrowKeys = (e) => {
275
270
  let t = this.focusableButtons();
@@ -287,7 +282,7 @@ var P = class extends S {
287
282
  }, this.boundHandleClick = (e) => this.handleButtonClick(e);
288
283
  }
289
284
  static {
290
- this.styles = C`
285
+ this.styles = u`
291
286
  :host {
292
287
  display: flex;
293
288
  flex-direction: column;
@@ -412,7 +407,7 @@ var P = class extends S {
412
407
  this.hasButtonForTool(t) && this.clearActiveButtons();
413
408
  }
414
409
  handleToolSelect(e) {
415
- let t = e.detail ?? {}, n = ve({
410
+ let t = e.detail ?? {}, n = Se({
416
411
  toolIds: this.getToolIds(),
417
412
  currentActiveToolId: this.getActiveButtonToolId(),
418
413
  detail: t,
@@ -442,7 +437,7 @@ var P = class extends S {
442
437
  }), this.applyRovingTabindex();
443
438
  }
444
439
  hasButtonForTool(e) {
445
- return N(this.getToolIds(), e);
440
+ return xe(this.getToolIds(), e);
446
441
  }
447
442
  getToolIds() {
448
443
  return this.buttons.map((e) => e.getAttribute("name") || e.getAttribute("data-tool")).filter((e) => !!e);
@@ -452,20 +447,20 @@ var P = class extends S {
452
447
  return e?.getAttribute("name") || e?.getAttribute("data-tool") || null;
453
448
  }
454
449
  render() {
455
- return w`
450
+ return m`
456
451
  <slot name="before"></slot>
457
452
  <slot @slotchange=${this.handleSlotChange}></slot>
458
453
  <slot name="after"></slot>
459
454
  `;
460
455
  }
461
456
  };
462
- d([O({
457
+ S([s({
463
458
  type: String,
464
459
  reflect: !0
465
- })], P.prototype, "orientation", void 0), d([fe()], P.prototype, "buttons", void 0), P = d([D("webmapx-toolbar")], P);
460
+ })], Ce.prototype, "orientation", void 0), S([_()], Ce.prototype, "buttons", void 0), Ce = S([p("webmapx-toolbar")], Ce);
466
461
  //#endregion
467
462
  //#region src/components/webmapx-tool-panel.ts
468
- var ye = class extends S {
463
+ var k = class extends g {
469
464
  constructor(...e) {
470
465
  super(...e), this.label = "Tools", this.active = !1, this.collapsed = !1, this.defaultLabel = "Tools", this.activeToolId = null, this.toolIndex = /* @__PURE__ */ new Map(), this.mapHost = null, this.boundHandleToolActivated = (e) => this.handleToolActivated(e), this.boundHandleToolDeactivated = (e) => this.handleToolDeactivated(e), this.boundHandleToolSelect = (e) => this.handleToolSelect(e), this.boundHandleKeydown = (e) => this.handleKeydown(e), this.triggerButton = null;
471
466
  }
@@ -544,7 +539,7 @@ var ye = class extends S {
544
539
  }
545
540
  handleToolSelect(e) {
546
541
  let t = e.detail ?? {};
547
- if (_e(t, this.resolveToolbar())) return;
542
+ if (O(t, this.resolveToolbar())) return;
548
543
  let n = t.toolId ?? null, r = t.previousToolId ?? null;
549
544
  if (!(n && this.mapHost?.toolManager?.getTool(n))) {
550
545
  if (!n) {
@@ -564,7 +559,7 @@ var ye = class extends S {
564
559
  return this.mapHost?.querySelector("webmapx-toolbar") ?? null;
565
560
  }
566
561
  static {
567
- this.styles = C`
562
+ this.styles = u`
568
563
  :host {
569
564
  display: none;
570
565
  box-sizing: border-box;
@@ -654,7 +649,7 @@ var ye = class extends S {
654
649
  n && n.focus?.();
655
650
  }
656
651
  render() {
657
- return w`
652
+ return m`
658
653
  <div class="panel-header">
659
654
  <slot name="header"><h3>${this.label}</h3></slot>
660
655
  <sl-button size="small" circle variant="text" @click=${this.toggleCollapsed}>
@@ -671,16 +666,16 @@ var ye = class extends S {
671
666
  `;
672
667
  }
673
668
  };
674
- d([O({ type: String })], ye.prototype, "label", void 0), d([O({
669
+ S([s({ type: String })], k.prototype, "label", void 0), S([s({
675
670
  type: Boolean,
676
671
  reflect: !0
677
- })], ye.prototype, "active", void 0), d([O({
672
+ })], k.prototype, "active", void 0), S([s({
678
673
  type: Boolean,
679
674
  reflect: !0
680
- })], ye.prototype, "collapsed", void 0), ye = d([D("webmapx-tool-panel")], ye);
675
+ })], k.prototype, "collapsed", void 0), k = S([p("webmapx-tool-panel")], k);
681
676
  //#endregion
682
677
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BWVSW6TI.js
683
- var be = C`
678
+ var we = u`
684
679
  :host {
685
680
  display: block;
686
681
  outline: 0;
@@ -832,9 +827,17 @@ var be = C`
832
827
  outline: dashed 1px SelectedItem;
833
828
  }
834
829
  }
835
- `, F = class e extends i {
830
+ `;
831
+ //#endregion
832
+ //#region node_modules/lit-html/directives/when.js
833
+ function Te(e, t, n) {
834
+ return e ? t(e) : n?.(e);
835
+ }
836
+ //#endregion
837
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.P4TU54CC.js
838
+ var A = class e extends r {
836
839
  constructor() {
837
- super(...arguments), this.localize = new v(this), this.indeterminate = !1, this.isLeaf = !1, this.loading = !1, this.selectable = !1, this.expanded = !1, this.selected = !1, this.disabled = !1, this.lazy = !1;
840
+ super(...arguments), this.localize = new se(this), this.indeterminate = !1, this.isLeaf = !1, this.loading = !1, this.selectable = !1, this.expanded = !1, this.selected = !1, this.disabled = !1, this.lazy = !1;
838
841
  }
839
842
  static isTreeItem(e) {
840
843
  return e instanceof Element && e.getAttribute("role") === "treeitem";
@@ -846,9 +849,9 @@ var be = C`
846
849
  this.childrenContainer.hidden = !this.expanded, this.childrenContainer.style.height = this.expanded ? "auto" : "0", this.isLeaf = !this.lazy && this.getChildrenItems().length === 0, this.handleExpandedChange();
847
850
  }
848
851
  async animateCollapse() {
849
- this.emit("sl-collapse"), await p(this.childrenContainer);
850
- let { keyframes: e, options: t } = m(this, "tree-item.collapse", { dir: this.localize.dir() });
851
- await _(this.childrenContainer, h(e, this.childrenContainer.scrollHeight), t), this.childrenContainer.hidden = !0, this.emit("sl-after-collapse");
852
+ this.emit("sl-collapse"), await ee(this.childrenContainer);
853
+ let { keyframes: e, options: t } = te(this, "tree-item.collapse", { dir: this.localize.dir() });
854
+ await re(this.childrenContainer, ne(e, this.childrenContainer.scrollHeight), t), this.childrenContainer.hidden = !0, this.emit("sl-after-collapse");
852
855
  }
853
856
  isNestedItem() {
854
857
  let t = this.parentElement;
@@ -861,9 +864,9 @@ var be = C`
861
864
  e.has("selected") && !e.has("indeterminate") && (this.indeterminate = !1);
862
865
  }
863
866
  async animateExpand() {
864
- this.emit("sl-expand"), await p(this.childrenContainer), this.childrenContainer.hidden = !1;
865
- let { keyframes: e, options: t } = m(this, "tree-item.expand", { dir: this.localize.dir() });
866
- await _(this.childrenContainer, h(e, this.childrenContainer.scrollHeight), t), this.childrenContainer.style.height = "auto", this.emit("sl-after-expand");
867
+ this.emit("sl-expand"), await ee(this.childrenContainer), this.childrenContainer.hidden = !1;
868
+ let { keyframes: e, options: t } = te(this, "tree-item.expand", { dir: this.localize.dir() });
869
+ await re(this.childrenContainer, ne(e, this.childrenContainer.scrollHeight), t), this.childrenContainer.style.height = "auto", this.emit("sl-after-expand");
867
870
  }
868
871
  handleLoadingChange() {
869
872
  this.setAttribute("aria-busy", this.loading ? "true" : "false"), this.loading || this.animateExpand();
@@ -888,10 +891,10 @@ var be = C`
888
891
  }
889
892
  render() {
890
893
  let e = this.localize.dir() === "rtl", t = !this.loading && (!this.isLeaf || this.lazy);
891
- return w`
894
+ return m`
892
895
  <div
893
896
  part="base"
894
- class="${pe({
897
+ class="${ie({
895
898
  "tree-item": !0,
896
899
  "tree-item--expanded": this.expanded,
897
900
  "tree-item--selected": this.selected,
@@ -915,13 +918,13 @@ var be = C`
915
918
 
916
919
  <div
917
920
  part="expand-button"
918
- class=${pe({
921
+ class=${ie({
919
922
  "tree-item__expand-button": !0,
920
923
  "tree-item__expand-button--visible": t
921
924
  })}
922
925
  aria-hidden="true"
923
926
  >
924
- ${he(this.loading, () => w` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `)}
927
+ ${Te(this.loading, () => m` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `)}
925
928
  <slot class="tree-item__expand-icon-slot" name="expand-icon">
926
929
  <sl-icon library="system" name=${e ? "chevron-left" : "chevron-right"}></sl-icon>
927
930
  </slot>
@@ -930,7 +933,7 @@ var be = C`
930
933
  </slot>
931
934
  </div>
932
935
 
933
- ${he(this.selectable, () => w`
936
+ ${Te(this.selectable, () => m`
934
937
  <sl-checkbox
935
938
  part="checkbox"
936
939
  exportparts="
@@ -944,7 +947,7 @@ var be = C`
944
947
  "
945
948
  class="tree-item__checkbox"
946
949
  ?disabled="${this.disabled}"
947
- ?checked="${j(this.selected)}"
950
+ ?checked="${T(this.selected)}"
948
951
  ?indeterminate="${this.indeterminate}"
949
952
  tabindex="-1"
950
953
  ></sl-checkbox>
@@ -960,25 +963,25 @@ var be = C`
960
963
  `;
961
964
  }
962
965
  };
963
- F.styles = [a, be], F.dependencies = {
964
- "sl-checkbox": x,
966
+ A.styles = [n, we], A.dependencies = {
967
+ "sl-checkbox": ue,
965
968
  "sl-icon": o,
966
- "sl-spinner": y
967
- }, n([A()], F.prototype, "indeterminate", 2), n([A()], F.prototype, "isLeaf", 2), n([A()], F.prototype, "loading", 2), n([A()], F.prototype, "selectable", 2), n([O({
969
+ "sl-spinner": ce
970
+ }, a([d()], A.prototype, "indeterminate", 2), a([d()], A.prototype, "isLeaf", 2), a([d()], A.prototype, "loading", 2), a([d()], A.prototype, "selectable", 2), a([s({
968
971
  type: Boolean,
969
972
  reflect: !0
970
- })], F.prototype, "expanded", 2), n([O({
973
+ })], A.prototype, "expanded", 2), a([s({
971
974
  type: Boolean,
972
975
  reflect: !0
973
- })], F.prototype, "selected", 2), n([O({
976
+ })], A.prototype, "selected", 2), a([s({
974
977
  type: Boolean,
975
978
  reflect: !0
976
- })], F.prototype, "disabled", 2), n([O({
979
+ })], A.prototype, "disabled", 2), a([s({
977
980
  type: Boolean,
978
981
  reflect: !0
979
- })], F.prototype, "lazy", 2), n([k("slot:not([name])")], F.prototype, "defaultSlot", 2), n([k("slot[name=children]")], F.prototype, "childrenSlot", 2), n([k(".tree-item__item")], F.prototype, "itemElement", 2), n([k(".tree-item__children")], F.prototype, "childrenContainer", 2), n([k(".tree-item__expand-button slot")], F.prototype, "expandButtonSlot", 2), n([r("loading", { waitUntilFirstUpdate: !0 })], F.prototype, "handleLoadingChange", 1), n([r("disabled")], F.prototype, "handleDisabledChange", 1), n([r("selected")], F.prototype, "handleSelectedChange", 1), n([r("expanded", { waitUntilFirstUpdate: !0 })], F.prototype, "handleExpandedChange", 1), n([r("expanded", { waitUntilFirstUpdate: !0 })], F.prototype, "handleExpandAnimation", 1), n([r("lazy", { waitUntilFirstUpdate: !0 })], F.prototype, "handleLazyChange", 1);
980
- var xe = F;
981
- g("tree-item.expand", {
982
+ })], A.prototype, "lazy", 2), a([f("slot:not([name])")], A.prototype, "defaultSlot", 2), a([f("slot[name=children]")], A.prototype, "childrenSlot", 2), a([f(".tree-item__item")], A.prototype, "itemElement", 2), a([f(".tree-item__children")], A.prototype, "childrenContainer", 2), a([f(".tree-item__expand-button slot")], A.prototype, "expandButtonSlot", 2), a([i("loading", { waitUntilFirstUpdate: !0 })], A.prototype, "handleLoadingChange", 1), a([i("disabled")], A.prototype, "handleDisabledChange", 1), a([i("selected")], A.prototype, "handleSelectedChange", 1), a([i("expanded", { waitUntilFirstUpdate: !0 })], A.prototype, "handleExpandedChange", 1), a([i("expanded", { waitUntilFirstUpdate: !0 })], A.prototype, "handleExpandAnimation", 1), a([i("lazy", { waitUntilFirstUpdate: !0 })], A.prototype, "handleLazyChange", 1);
983
+ var Ee = A;
984
+ w("tree-item.expand", {
982
985
  keyframes: [{
983
986
  height: "0",
984
987
  opacity: "0",
@@ -992,7 +995,7 @@ g("tree-item.expand", {
992
995
  duration: 250,
993
996
  easing: "cubic-bezier(0.4, 0.0, 0.2, 1)"
994
997
  }
995
- }), g("tree-item.collapse", {
998
+ }), w("tree-item.collapse", {
996
999
  keyframes: [{
997
1000
  height: "auto",
998
1001
  opacity: "1",
@@ -1009,7 +1012,7 @@ g("tree-item.expand", {
1009
1012
  });
1010
1013
  //#endregion
1011
1014
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.G7B7WU5W.js
1012
- var Se = C`
1015
+ var De = u`
1013
1016
  :host {
1014
1017
  /*
1015
1018
  * These are actually used by tree item, but we define them here so they can more easily be set and all tree items
@@ -1032,7 +1035,7 @@ var Se = C`
1032
1035
  `;
1033
1036
  //#endregion
1034
1037
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MSDIZVRW.js
1035
- function Ce(e, t = !1) {
1038
+ function Oe(e, t = !1) {
1036
1039
  function n(e) {
1037
1040
  let t = e.getChildrenItems({ includeDisabled: !1 });
1038
1041
  if (t.length) {
@@ -1042,7 +1045,7 @@ function Ce(e, t = !1) {
1042
1045
  }
1043
1046
  function r(e) {
1044
1047
  let t = e.parentElement;
1045
- xe.isTreeItem(t) && (n(t), r(t));
1048
+ Ee.isTreeItem(t) && (n(t), r(t));
1046
1049
  }
1047
1050
  function i(e) {
1048
1051
  for (let n of e.getChildrenItems()) n.selected = t ? e.selected || n.selected : !n.disabled && e.selected, i(n);
@@ -1050,16 +1053,16 @@ function Ce(e, t = !1) {
1050
1053
  }
1051
1054
  i(e), r(e);
1052
1055
  }
1053
- var I = class extends i {
1056
+ var j = class extends r {
1054
1057
  constructor() {
1055
- super(), this.selection = "single", this.clickTarget = null, this.localize = new v(this), this.initTreeItem = (e) => {
1058
+ super(), this.selection = "single", this.clickTarget = null, this.localize = new se(this), this.initTreeItem = (e) => {
1056
1059
  e.selectable = this.selection === "multiple", ["expand", "collapse"].filter((e) => !!this.querySelector(`[slot="${e}-icon"]`)).forEach((t) => {
1057
1060
  let n = e.querySelector(`[slot="${t}-icon"]`), r = this.getExpandButtonIcon(t);
1058
1061
  r && (n === null ? e.append(r) : n.hasAttribute("data-default") && n.replaceWith(r));
1059
1062
  });
1060
1063
  }, this.handleTreeChanged = (e) => {
1061
1064
  for (let t of e) {
1062
- let e = [...t.addedNodes].filter(xe.isTreeItem), n = [...t.removedNodes].filter(xe.isTreeItem);
1065
+ let e = [...t.addedNodes].filter(Ee.isTreeItem), n = [...t.removedNodes].filter(Ee.isTreeItem);
1063
1066
  e.forEach(this.initTreeItem), this.lastFocusedItem && n.includes(this.lastFocusedItem) && (this.lastFocusedItem = null);
1064
1067
  }
1065
1068
  }, this.handleFocusOut = (e) => {
@@ -1067,7 +1070,7 @@ var I = class extends i {
1067
1070
  (!t || !this.contains(t)) && (this.tabIndex = 0);
1068
1071
  }, this.handleFocusIn = (e) => {
1069
1072
  let t = e.target;
1070
- e.target === this && this.focusItem(this.lastFocusedItem || this.getAllTreeItems()[0]), xe.isTreeItem(t) && !t.disabled && (this.lastFocusedItem && (this.lastFocusedItem.tabIndex = -1), this.lastFocusedItem = t, this.tabIndex = -1, t.tabIndex = 0);
1073
+ e.target === this && this.focusItem(this.lastFocusedItem || this.getAllTreeItems()[0]), Ee.isTreeItem(t) && !t.disabled && (this.lastFocusedItem && (this.lastFocusedItem.tabIndex = -1), this.lastFocusedItem = t, this.tabIndex = -1, t.tabIndex = 0);
1071
1074
  }, this.addEventListener("focusin", this.handleFocusIn), this.addEventListener("focusout", this.handleFocusOut), this.addEventListener("sl-lazy-change", this.handleSlotChange);
1072
1075
  }
1073
1076
  async connectedCallback() {
@@ -1090,7 +1093,7 @@ var I = class extends i {
1090
1093
  }
1091
1094
  selectItem(e) {
1092
1095
  let t = [...this.selectedItems];
1093
- if (this.selection === "multiple") e.selected = !e.selected, e.lazy && (e.expanded = !0), Ce(e);
1096
+ if (this.selection === "multiple") e.selected = !e.selected, e.lazy && (e.expanded = !0), Oe(e);
1094
1097
  else if (this.selection === "single" || e.isLeaf) {
1095
1098
  let t = this.getAllTreeItems();
1096
1099
  for (let n of t) n.selected = n === e;
@@ -1121,7 +1124,7 @@ var I = class extends i {
1121
1124
  if (t.length > 0) {
1122
1125
  e.preventDefault();
1123
1126
  let i = t.findIndex((e) => e.matches(":focus")), a = t[i], o = (e) => {
1124
- let n = t[re(e, 0, t.length - 1)];
1127
+ let n = t[pe(e, 0, t.length - 1)];
1125
1128
  this.focusItem(n);
1126
1129
  }, s = (e) => {
1127
1130
  a.expanded = e;
@@ -1143,7 +1146,7 @@ var I = class extends i {
1143
1146
  let e = this.selection === "multiple", t = this.getAllTreeItems();
1144
1147
  this.setAttribute("aria-multiselectable", e ? "true" : "false");
1145
1148
  for (let n of t) n.selectable = e;
1146
- e && (await this.updateComplete, [...this.querySelectorAll(":scope > sl-tree-item")].forEach((e) => Ce(e, !0)));
1149
+ e && (await this.updateComplete, [...this.querySelectorAll(":scope > sl-tree-item")].forEach((e) => Oe(e, !0)));
1147
1150
  }
1148
1151
  get selectedItems() {
1149
1152
  return this.getAllTreeItems().filter((e) => e.selected);
@@ -1157,7 +1160,7 @@ var I = class extends i {
1157
1160
  });
1158
1161
  }
1159
1162
  render() {
1160
- return w`
1163
+ return m`
1161
1164
  <div
1162
1165
  part="base"
1163
1166
  class="tree"
@@ -1174,15 +1177,15 @@ var I = class extends i {
1174
1177
  };
1175
1178
  //#endregion
1176
1179
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.GTHX4FOE.js
1177
- I.styles = [a, Se], n([k("slot:not([name])")], I.prototype, "defaultSlot", 2), n([k("slot[name=expand-icon]")], I.prototype, "expandedIconSlot", 2), n([k("slot[name=collapse-icon]")], I.prototype, "collapsedIconSlot", 2), n([O()], I.prototype, "selection", 2), n([r("selection")], I.prototype, "handleSelectionChange", 1), I.define("sl-tree"), xe.define("sl-tree-item");
1180
+ j.styles = [n, De], a([f("slot:not([name])")], j.prototype, "defaultSlot", 2), a([f("slot[name=expand-icon]")], j.prototype, "expandedIconSlot", 2), a([f("slot[name=collapse-icon]")], j.prototype, "collapsedIconSlot", 2), a([s()], j.prototype, "selection", 2), a([i("selection")], j.prototype, "handleSelectionChange", 1), j.define("sl-tree"), Ee.define("sl-tree-item");
1178
1181
  //#endregion
1179
1182
  //#region src/components/webmapx-layer-tree.ts
1180
- var we = class extends S {
1183
+ var M = class extends g {
1181
1184
  constructor(...e) {
1182
1185
  super(...e), this.tree = [], this.toolId = null, this.configTree = [], this.searchQuery = "", this.searchThreshold = 8, this.configHandler = null, this.addLayerFailedHandler = null, this.mapReadyHandler = null, this.adapter = null, this.unsubscribeLayerAdd = null, this.unsubscribeLayerRemove = null, this.nodeByKey = /* @__PURE__ */ new Map(), this.supportStatusByLayerId = /* @__PURE__ */ new Map(), this.capsCache = /* @__PURE__ */ new Map(), this.pendingSupportChecks = /* @__PURE__ */ new Set(), this.supportQueue = [], this.supportChecksInFlight = 0, this.maxConcurrentSupportChecks = 3, this.didQueueRootSupportChecks = !1;
1183
1186
  }
1184
1187
  static {
1185
- this.styles = C`
1188
+ this.styles = u`
1186
1189
  :host {
1187
1190
  display: block;
1188
1191
  height: auto; /* let parent control available height */
@@ -1644,7 +1647,7 @@ var we = class extends S {
1644
1647
  renderNode(e, t, n = "0") {
1645
1648
  if ((e.type === "getcapabilities" || e.type === "capabilities") && e.url) {
1646
1649
  let r = this.capsKey(e), i = this.capsCache.get(r), a = this.getChildSelectionContext(e, t, n), o;
1647
- return o = !i || i.status === "loading" ? w`<sl-tree-item disabled><sl-spinner style="font-size:0.85rem"></sl-spinner> Loading…</sl-tree-item>` : i.status === "error" ? w`<sl-tree-item disabled style="color:var(--sl-color-danger-600)">⚠ ${i.error}</sl-tree-item>` : w`${i.children.map((e, t) => this.renderNode(e, a, `${n}.${t}`))}`, w`
1650
+ return o = !i || i.status === "loading" ? m`<sl-tree-item disabled><sl-spinner style="font-size:0.85rem"></sl-spinner> Loading…</sl-tree-item>` : i.status === "error" ? m`<sl-tree-item disabled style="color:var(--sl-color-danger-600)">⚠ ${i.error}</sl-tree-item>` : m`${i.children.map((e, t) => this.renderNode(e, a, `${n}.${t}`))}`, m`
1648
1651
  <sl-tree-item ?expanded=${e.expanded} data-node-key=${n}
1649
1652
  @sl-expand=${() => {
1650
1653
  this.fetchCapabilities(e);
@@ -1653,12 +1656,12 @@ var we = class extends S {
1653
1656
  ${o}
1654
1657
  </sl-tree-item>`;
1655
1658
  }
1656
- if (e.separator) return w`
1659
+ if (e.separator) return m`
1657
1660
  <sl-tree-item class="separator-item" data-node-key=${n} tabindex="-1" aria-hidden="true">
1658
1661
  <span class="tree-separator">${this.resolveNodeLabel(e)}</span>
1659
1662
  </sl-tree-item>`;
1660
1663
  let r = this.getChildSelectionContext(e, t, n);
1661
- if (this.nodeByKey.set(n, e), e.children && e.children.length > 0) return w`
1664
+ if (this.nodeByKey.set(n, e), e.children && e.children.length > 0) return m`
1662
1665
  <sl-tree-item ?expanded=${e.expanded} data-node-key=${n}>
1663
1666
  <span @click=${(e) => {
1664
1667
  let t = e.currentTarget.closest("sl-tree-item");
@@ -1669,11 +1672,11 @@ var we = class extends S {
1669
1672
  `;
1670
1673
  {
1671
1674
  let t = r.selectionMode === "single", i = this.getExclusiveGroupKey(e, r), a = this.getSupportStatus(e.layerId) === "unsupported", o = this.resolveNodeLabel(e), s = a ? `${o} (unsupported for current engine)` : o;
1672
- return w`
1675
+ return m`
1673
1676
  <sl-tree-item data-node-key=${n} @keydown=${(e) => {
1674
1677
  (e.key === " " || e.key === "Enter") && (e.preventDefault(), e.currentTarget.querySelector("sl-checkbox, input[type=\"radio\"]")?.click()), (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "ArrowLeft" || e.key === "ArrowRight") && t && e.preventDefault();
1675
1678
  }}>
1676
- ${t ? w`
1679
+ ${t ? m`
1677
1680
  <label class="layer-radio">
1678
1681
  <input
1679
1682
  type="radio"
@@ -1689,7 +1692,7 @@ var we = class extends S {
1689
1692
  />
1690
1693
  <span>${s}</span>
1691
1694
  </label>
1692
- ` : w`
1695
+ ` : m`
1693
1696
  <sl-checkbox
1694
1697
  ?checked=${e.checked}
1695
1698
  ?disabled=${a}
@@ -1748,8 +1751,8 @@ var we = class extends S {
1748
1751
  render() {
1749
1752
  this.nodeByKey.clear();
1750
1753
  let e = this.searchQuery.trim().toLowerCase(), t = e ? this.filterTree(this.effectiveTree, e) : this.effectiveTree;
1751
- return w`
1752
- ${this.showSearch ? w`
1754
+ return m`
1755
+ ${this.showSearch ? m`
1753
1756
  <div class="search">
1754
1757
  <input
1755
1758
  type="text"
@@ -1759,22 +1762,22 @@ var we = class extends S {
1759
1762
  .value=${this.searchQuery}
1760
1763
  @input=${this.handleSearchInput}
1761
1764
  />
1762
- ${this.searchQuery ? w`<button class="search-clear" @click=${this.handleSearchClear} aria-label="Clear search">&times;</button>` : w``}
1765
+ ${this.searchQuery ? m`<button class="search-clear" @click=${this.handleSearchClear} aria-label="Clear search">&times;</button>` : m``}
1763
1766
  </div>
1764
- ` : w``}
1767
+ ` : m``}
1765
1768
  <sl-tree @sl-expand=${this.handleTreeExpand}>
1766
1769
  ${t.map((e, t) => this.renderNode(e, void 0, `${t}`))}
1767
1770
  </sl-tree>
1768
1771
  `;
1769
1772
  }
1770
1773
  };
1771
- d([O({ type: Array })], we.prototype, "tree", void 0), d([O({
1774
+ S([s({ type: Array })], M.prototype, "tree", void 0), S([s({
1772
1775
  type: String,
1773
1776
  attribute: "tool-id"
1774
- })], we.prototype, "toolId", void 0), d([A()], we.prototype, "configTree", void 0), d([A()], we.prototype, "searchQuery", void 0), d([A()], we.prototype, "capsCache", void 0), we = d([D("webmapx-layer-tree")], we);
1777
+ })], M.prototype, "toolId", void 0), S([d()], M.prototype, "configTree", void 0), S([d()], M.prototype, "searchQuery", void 0), S([d()], M.prototype, "capsCache", void 0), M = S([p("webmapx-layer-tree")], M);
1775
1778
  //#endregion
1776
1779
  //#region node_modules/@simonwep/pickr/dist/themes/nano.min.css
1777
- var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1780
+ var ke = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1778
1781
  (function(n, r) {
1779
1782
  typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.Pickr = r() : n.Pickr = r();
1780
1783
  })(self, (() => (() => {
@@ -1790,7 +1793,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1790
1793
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
1791
1794
  }
1792
1795
  }, t = {};
1793
- e.d(t, { default: () => oe });
1796
+ e.d(t, { default: () => re });
1794
1797
  var n = {};
1795
1798
  function r(e, t, n, r, i = {}) {
1796
1799
  t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
@@ -1903,10 +1906,10 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1903
1906
  100 * i
1904
1907
  ];
1905
1908
  }
1906
- function ee(e, t, n, r) {
1909
+ function v(e, t, n, r) {
1907
1910
  return t /= 100, n /= 100, [..._(255 * (1 - d(1, (e /= 100) * (1 - (r /= 100)) + r)), 255 * (1 - d(1, t * (1 - r) + r)), 255 * (1 - d(1, n * (1 - r) + r)))];
1908
1911
  }
1909
- function v(e, t, n) {
1912
+ function y(e, t, n) {
1910
1913
  t /= 100;
1911
1914
  let r = 2 * (t *= (n /= 100) < .5 ? n : 1 - n) / (n + t) * 100, i = 100 * (n + t);
1912
1915
  return [
@@ -1915,10 +1918,10 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1915
1918
  i
1916
1919
  ];
1917
1920
  }
1918
- function y(e) {
1921
+ function b(e) {
1919
1922
  return _(...e.match(/.{2}/g).map(((e) => parseInt(e, 16))));
1920
1923
  }
1921
- function b(e) {
1924
+ function x(e) {
1922
1925
  e = e.match(/^[a-zA-Z]+$/) ? function(e) {
1923
1926
  if (e.toLowerCase() === "black") return "#000";
1924
1927
  let t = document.createElement("canvas").getContext("2d");
@@ -1936,7 +1939,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1936
1939
  let [, e, t, a, o] = n(r);
1937
1940
  if (e > 100 || t > 100 || a > 100 || o > 100) break t;
1938
1941
  return {
1939
- values: ee(e, t, a, o),
1942
+ values: v(e, t, a, o),
1940
1943
  type: i
1941
1944
  };
1942
1945
  }
@@ -1954,7 +1957,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1954
1957
  e.length !== 4 && e.length !== 3 || (e = e.split("").map(((e) => e + e)).join(""));
1955
1958
  let t = e.substring(0, 6), n = e.substring(6);
1956
1959
  return n = n ? parseInt(n, 16) / 255 : void 0, {
1957
- values: [...y(t), n],
1960
+ values: [...b(t), n],
1958
1961
  a: n,
1959
1962
  type: i
1960
1963
  };
@@ -1963,7 +1966,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1963
1966
  let [, e, t, a, , o] = n(r);
1964
1967
  if (o = r[6] === "%" ? o / 100 : o, e > 360 || t > 100 || a > 100 || o < 0 || o > 1) break t;
1965
1968
  return {
1966
- values: [...v(e, t, a), o],
1969
+ values: [...y(e, t, a), o],
1967
1970
  a: o,
1968
1971
  type: i
1969
1972
  };
@@ -1988,7 +1991,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1988
1991
  type: null
1989
1992
  };
1990
1993
  }
1991
- function x(e = 0, t = 0, n = 0, r = 1) {
1994
+ function S(e = 0, t = 0, n = 0, r = 1) {
1992
1995
  let i = (e, t) => (n = -1) => t(~n ? e.map(((e) => Number(e.toFixed(n)))) : e), a = {
1993
1996
  h: e,
1994
1997
  s: t,
@@ -2029,12 +2032,12 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2029
2032
  }(a.h, a.s, a.v), t = a.a >= 1 ? "" : Number((255 * a.a).toFixed(0)).toString(16).toUpperCase().padStart(2, "0");
2030
2033
  return t && e.push(t), e.toString = () => `#${e.join("").toUpperCase()}`, e;
2031
2034
  },
2032
- clone: () => x(a.h, a.s, a.v, a.a)
2035
+ clone: () => S(a.h, a.s, a.v, a.a)
2033
2036
  };
2034
2037
  return a;
2035
2038
  }
2036
- let te = (e) => Math.max(Math.min(e, 1), 0);
2037
- function ne(e) {
2039
+ let C = (e) => Math.max(Math.min(e, 1), 0);
2040
+ function ee(e) {
2038
2041
  let t = {
2039
2042
  options: Object.assign({
2040
2043
  lock: null,
@@ -2047,7 +2050,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2047
2050
  let { lock: n } = t.options, a = i === "ArrowUp", o = i === "ArrowRight", s = i === "ArrowDown", c = i === "ArrowLeft";
2048
2051
  if (r === "keydown" && (a || o || s || c)) {
2049
2052
  let r = 0, i = 0;
2050
- n === "v" ? r = a || o ? 1 : -1 : n === "h" ? r = a || o ? -1 : 1 : (i = a ? -1 : +!!s, r = c ? -1 : +!!o), t.update(te(t.cache.x + .01 * r), te(t.cache.y + .01 * i)), e.preventDefault();
2053
+ n === "v" ? r = a || o ? 1 : -1 : n === "h" ? r = a || o ? -1 : 1 : (i = a ? -1 : +!!s, r = c ? -1 : +!!o), t.update(C(t.cache.x + .01 * r), C(t.cache.y + .01 * i)), e.preventDefault();
2051
2054
  } else i.startsWith("Arrow") && (t.options.onstop(), e.preventDefault());
2052
2055
  }
2053
2056
  },
@@ -2068,7 +2071,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2068
2071
  x: c / s.width,
2069
2072
  y: l / s.height
2070
2073
  };
2071
- let u = te(c / s.width), d = te(l / s.height);
2074
+ let u = C(c / s.width), d = C(l / s.height);
2072
2075
  switch (i) {
2073
2076
  case "v": return n.onchange(u);
2074
2077
  case "h": return n.onchange(d);
@@ -2099,7 +2102,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2099
2102
  }, { options: n, _tapstart: r, _keyboard: o } = t;
2100
2103
  return i([n.wrapper, n.element], "mousedown", r), i([n.wrapper, n.element], "touchstart", r, { passive: !1 }), i(document, ["keydown", "keyup"], o), t;
2101
2104
  }
2102
- function re(e = {}) {
2105
+ function te(e = {}) {
2103
2106
  e = Object.assign({
2104
2107
  onchange: () => 0,
2105
2108
  className: "",
@@ -2110,7 +2113,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2110
2113
  }));
2111
2114
  return { destroy: () => a(...t) };
2112
2115
  }
2113
- let ie = {
2116
+ let ne = {
2114
2117
  variantFlipOrder: {
2115
2118
  start: "sme",
2116
2119
  middle: "mse",
@@ -2125,7 +2128,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2125
2128
  position: "bottom",
2126
2129
  margin: 8,
2127
2130
  padding: 0
2128
- }, ae = (e, t, n) => {
2131
+ }, w = (e, t, n) => {
2129
2132
  let r = typeof e != "object" || e instanceof HTMLElement ? {
2130
2133
  reference: e,
2131
2134
  popper: t,
@@ -2137,7 +2140,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2137
2140
  return ((e, t, n) => {
2138
2141
  let { container: r, arrow: i, margin: a, padding: o, position: s, variantFlipOrder: c, positionFlipOrder: l } = {
2139
2142
  container: document.documentElement.getBoundingClientRect(),
2140
- ...ie,
2143
+ ...ne,
2141
2144
  ...n
2142
2145
  }, { left: u, top: d } = t.style;
2143
2146
  t.style.left = "0", t.style.top = "0";
@@ -2153,10 +2156,10 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2153
2156
  hs: f.top,
2154
2157
  hm: f.bottom - f.height / 2 - p.height / 2,
2155
2158
  he: f.bottom - p.height
2156
- }, [g, _ = "middle"] = s.split("-"), ee = l[g], v = c[_], { top: y, left: b, bottom: x, right: te } = r;
2157
- for (let e of ee) {
2158
- let n = e === "t" || e === "b", r = m[e], [a, s] = n ? ["top", "left"] : ["left", "top"], [c, l] = n ? [p.height, p.width] : [p.width, p.height], [u, d] = n ? [x, te] : [te, x], [g, _] = n ? [y, b] : [b, y];
2159
- if (!(r < g || r + c + o > u)) for (let u of v) {
2159
+ }, [g, _ = "middle"] = s.split("-"), v = l[g], y = c[_], { top: b, left: x, bottom: S, right: C } = r;
2160
+ for (let e of v) {
2161
+ let n = e === "t" || e === "b", r = m[e], [a, s] = n ? ["top", "left"] : ["left", "top"], [c, l] = n ? [p.height, p.width] : [p.width, p.height], [u, d] = n ? [S, C] : [C, S], [g, _] = n ? [b, x] : [x, b];
2162
+ if (!(r < g || r + c + o > u)) for (let u of y) {
2160
2163
  let m = h[(n ? "v" : "h") + u];
2161
2164
  if (!(m < _ || m + l + o > d)) {
2162
2165
  if (m -= p[s], r -= p[a], t.style[s] = `${m}px`, t.style[a] = `${r}px`, i) {
@@ -2180,7 +2183,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2180
2183
  })(t, n, r);
2181
2184
  } };
2182
2185
  };
2183
- class oe {
2186
+ class re {
2184
2187
  static utils = n;
2185
2188
  static version = "1.9.1";
2186
2189
  static I18N_DEFAULTS = {
@@ -2227,8 +2230,8 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2227
2230
  _recalc = !0;
2228
2231
  _nanopop = null;
2229
2232
  _root = null;
2230
- _color = x();
2231
- _lastColor = x();
2233
+ _color = S();
2234
+ _lastColor = S();
2232
2235
  _swatchColors = [];
2233
2236
  _setupAnimationFrame = null;
2234
2237
  _eventListener = {
@@ -2243,20 +2246,20 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2243
2246
  swatchselect: []
2244
2247
  };
2245
2248
  constructor(e) {
2246
- this.options = e = Object.assign({ ...oe.DEFAULT_OPTIONS }, e);
2249
+ this.options = e = Object.assign({ ...re.DEFAULT_OPTIONS }, e);
2247
2250
  let { swatches: t, components: n, theme: r, sliders: i, lockOpacity: a, padding: o } = e;
2248
2251
  ["nano", "monolith"].includes(r) && !i && (e.sliders = "h"), n.interaction ||= {};
2249
2252
  let { preview: s, opacity: c, hue: l, palette: u } = n;
2250
2253
  n.opacity = !a && c, n.palette = u || s || c || l, this._preBuild(), this._buildComponents(), this._bindEvents(), this._finalBuild(), t && t.length && t.forEach(((e) => this.addSwatch(e)));
2251
2254
  let { button: d, app: f } = this._root;
2252
- this._nanopop = ae(d, f, { margin: o }), d.setAttribute("role", "button"), d.setAttribute("aria-label", this._t("btn:toggle"));
2255
+ this._nanopop = w(d, f, { margin: o }), d.setAttribute("role", "button"), d.setAttribute("aria-label", this._t("btn:toggle"));
2253
2256
  let p = this;
2254
2257
  this._setupAnimationFrame = requestAnimationFrame((function t() {
2255
2258
  if (!f.offsetWidth) return requestAnimationFrame(t);
2256
2259
  p.setColor(e.default), p._rePositioningPicker(), e.defaultRepresentation && (p._representation = e.defaultRepresentation, p.setColorRepresentation(p._representation)), e.showAlways && p.show(), p._initializingActive = !1, p._emit("init");
2257
2260
  }));
2258
2261
  }
2259
- static create = (e) => new oe(e);
2262
+ static create = (e) => new re(e);
2260
2263
  _preBuild() {
2261
2264
  let { options: e } = this;
2262
2265
  for (let t of ["el", "container"]) e[t] = l(e[t]);
@@ -2275,7 +2278,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2275
2278
  }
2276
2279
  _buildComponents() {
2277
2280
  let e = this, t = this.options.components, n = (e.options.sliders || "v").repeat(2), [r, i] = n.match(/^[vh]+$/g) ? n : [], a = () => this._color ||= this._lastColor.clone(), o = {
2278
- palette: ne({
2281
+ palette: ee({
2279
2282
  element: e._root.palette.picker,
2280
2283
  wrapper: e._root.palette.palette,
2281
2284
  onstop: () => e._emit("changestop", "slider", e),
@@ -2290,7 +2293,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2290
2293
  l.style.setProperty("--pcr-color", u);
2291
2294
  }
2292
2295
  }),
2293
- hue: ne({
2296
+ hue: ee({
2294
2297
  lock: i === "v" ? "h" : "v",
2295
2298
  element: e._root.hue.picker,
2296
2299
  wrapper: e._root.hue.slider,
@@ -2301,7 +2304,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2301
2304
  e._recalc && (r.h = 360 * n), this.element.style.backgroundColor = `hsl(${r.h}, 100%, 50%)`, o.palette.trigger();
2302
2305
  }
2303
2306
  }),
2304
- opacity: ne({
2307
+ opacity: ee({
2305
2308
  lock: r === "v" ? "h" : "v",
2306
2309
  element: e._root.opacity.picker,
2307
2310
  wrapper: e._root.opacity.slider,
@@ -2312,7 +2315,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2312
2315
  e._recalc && (r.a = Math.round(100 * n) / 100), this.element.style.background = `rgba(0, 0, 0, ${r.a})`, o.palette.trigger();
2313
2316
  }
2314
2317
  }),
2315
- selectable: re({
2318
+ selectable: te({
2316
2319
  elements: e._root.interaction.options,
2317
2320
  className: "active",
2318
2321
  onchange(t) {
@@ -2421,14 +2424,14 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2421
2424
  n.useAsButton || t.button.style.setProperty("--pcr-color", "rgba(0, 0, 0, 0.15)"), t.button.classList.add("clear"), n.showAlways || this.hide(), this._lastColor = null, this._initializingActive || e || (this._emit("save", null), this._emit("clear"));
2422
2425
  }
2423
2426
  _parseLocalColor(e) {
2424
- let { values: t, type: n, a: r } = b(e), { lockOpacity: i } = this.options, a = r !== void 0 && r !== 1;
2427
+ let { values: t, type: n, a: r } = x(e), { lockOpacity: i } = this.options, a = r !== void 0 && r !== 1;
2425
2428
  return t && t.length === 3 && (t[3] = void 0), {
2426
2429
  values: !t || i && a ? null : t,
2427
2430
  type: n
2428
2431
  };
2429
2432
  }
2430
2433
  _t(e) {
2431
- return this.options.i18n[e] || oe.I18N_DEFAULTS[e];
2434
+ return this.options.i18n[e] || re.I18N_DEFAULTS[e];
2432
2435
  }
2433
2436
  _emit(e, ...t) {
2434
2437
  this._eventListener[e].forEach(((e) => e(...t, this)));
@@ -2443,7 +2446,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2443
2446
  addSwatch(e) {
2444
2447
  let { values: t } = this._parseLocalColor(e);
2445
2448
  if (t) {
2446
- let { _swatchColors: e, _root: n } = this, r = x(...t), a = o(`<button type="button" style="--pcr-color: ${r.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);
2449
+ let { _swatchColors: e, _root: n } = this, r = S(...t), a = o(`<button type="button" style="--pcr-color: ${r.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);
2447
2450
  return n.swatches.appendChild(a), e.push({
2448
2451
  el: a,
2449
2452
  color: r
@@ -2485,7 +2488,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2485
2488
  setHSVA(e = 360, t = 0, n = 0, r = 1, i = !1) {
2486
2489
  let a = this._recalc;
2487
2490
  if (this._recalc = !1, e < 0 || e > 360 || t < 0 || t > 100 || n < 0 || n > 100 || r < 0 || r > 1) return !1;
2488
- this._color = x(e, t, n, r);
2491
+ this._color = S(e, t, n, r);
2489
2492
  let { hue: o, opacity: s, palette: c } = this._components;
2490
2493
  return o.update(e / 360), s.update(r), c.update(t / 100, 1 - n / 100), i || this.applyColor(), a && this._updateOutput(), this._recalc = a, !0;
2491
2494
  }
@@ -2523,9 +2526,9 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2523
2526
  }
2524
2527
  return t = t.default;
2525
2528
  })()));
2526
- })))(), 1), Ee, L = class extends f {
2529
+ })))(), 1), Ae, N = class extends C {
2527
2530
  static {
2528
- Ee = this;
2531
+ Ae = this;
2529
2532
  }
2530
2533
  constructor(...e) {
2531
2534
  super(...e), this.layerId = "", this.collapsible = !0, this.meta = null, this.zoom = 2, this.legendCollapsed = !0, this.legendOverflowing = !1, this.editOverrides = {}, this.editorOpenKey = null, this.terrainEnabled = !1, this.legendResizeObserver = null, this.measureLegendQueued = !1, this.pickrInstances = /* @__PURE__ */ new Map(), this.pickrOriginal = /* @__PURE__ */ new Map(), this.pendingPaintUpdates = /* @__PURE__ */ new Map(), this.pendingPaintRaf = null;
@@ -2534,7 +2537,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2534
2537
  this.collapsedLegendHeight = 180;
2535
2538
  }
2536
2539
  static {
2537
- this.styles = C`
2540
+ this.styles = u`
2538
2541
  :host { display: block; }
2539
2542
  .legend-wrap { display: flex; flex-direction: column; gap: 2px; }
2540
2543
  .legend-collapse {
@@ -2544,7 +2547,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2544
2547
  overflow: visible;
2545
2548
  }
2546
2549
  .legend-collapse.collapsed .legend-collapse-content {
2547
- max-height: ${Ee.collapsedLegendHeight}px;
2550
+ max-height: ${Ae.collapsedLegendHeight}px;
2548
2551
  overflow: hidden;
2549
2552
  }
2550
2553
  .legend-collapse.collapsed::after {
@@ -2639,17 +2642,17 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2639
2642
  this.legendOverflowing &&= !1;
2640
2643
  return;
2641
2644
  }
2642
- let e = this.renderRoot?.querySelector(".legend-collapse-content"), t = !!(e && e.scrollHeight > Ee.collapsedLegendHeight + 1);
2645
+ let e = this.renderRoot?.querySelector(".legend-collapse-content"), t = !!(e && e.scrollHeight > Ae.collapsedLegendHeight + 1);
2643
2646
  this.legendOverflowing !== t && (this.legendOverflowing = t);
2644
2647
  }
2645
2648
  renderCollapsibleLegend(e) {
2646
2649
  let t = this.collapsible && this.legendOverflowing && this.legendCollapsed, n = this.collapsible && this.legendOverflowing;
2647
- return w`
2650
+ return m`
2648
2651
  <div class="legend-collapse ${t ? "collapsed" : ""}">
2649
2652
  <div class="legend-collapse-content">
2650
2653
  ${e}
2651
2654
  </div>
2652
- ${n ? w`
2655
+ ${n ? m`
2653
2656
  <button
2654
2657
  type="button"
2655
2658
  class="legend-toggle"
@@ -2760,7 +2763,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2760
2763
  }
2761
2764
  renderZoomHint(e, t, n) {
2762
2765
  let r = n > t;
2763
- return w`<div class="legend-row"><span class="legend-label">${r ? "zoom out" : "zoom in"} to level ${r ? t : e} for display</span></div>`;
2766
+ return m`<div class="legend-row"><span class="legend-label">${r ? "zoom out" : "zoom in"} to level ${r ? t : e} for display</span></div>`;
2764
2767
  }
2765
2768
  renderCompositeLegend(e, t) {
2766
2769
  let n = [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = e.length === 1, o = Infinity, s = -Infinity;
@@ -2776,69 +2779,69 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2776
2779
  if (!e || typeof e.type != "string" || e.hideFromLegend === !0) continue;
2777
2780
  let s = typeof e.minzoom == "number" ? e.minzoom : 0, c = typeof e.maxzoom == "number" ? e.maxzoom : 24;
2778
2781
  if (t < s || t >= c + 1 || e.filter && !this.evalFilter(e.filter, t) || e.layout?.visibility === "none") continue;
2779
- let l = e.type, u = e.paint && typeof e.paint == "object" ? e.paint : {}, d = e.layout && typeof e.layout == "object" ? e.layout : {}, f = String(e.id ?? ""), p = e.metadata && typeof e.metadata == "object" ? e.metadata : void 0, m = a ? typeof this.meta?.label == "string" ? this.meta.label : "" : typeof p?.label == "string" && p.label.length > 0 ? p.label : f.replace(/^style:/, "").replace(/-/g, " "), h = {};
2780
- for (let [e, n] of Object.entries(u)) h[e] = this.isDataDriven(n) ? n : this.evalAtZoom(n, t);
2781
- let g = {};
2782
- for (let [e, n] of Object.entries(d)) g[e] = this.evalAtZoom(n, t);
2783
- let _ = { ...h }, ee = { ...g }, v = this.editOverrides[f];
2784
- v && (Object.assign(h, v), "text-size" in v && (g["text-size"] = v["text-size"]));
2785
- let y = l === "fill" ? "fill-color" : l === "fill-extrusion" ? "fill-extrusion-color" : l === "line" ? "line-color" : l === "circle" ? "circle-color" : l === "symbol" ? "text-color" : null, b = y ? u[y] : null, x = b ? this.extractDataCases(b) : null;
2786
- if (x && x.length > 1) {
2782
+ let l = e.type, u = e.paint && typeof e.paint == "object" ? e.paint : {}, d = e.layout && typeof e.layout == "object" ? e.layout : {}, f = String(e.id ?? ""), p = e.metadata && typeof e.metadata == "object" ? e.metadata : void 0, h = a ? typeof this.meta?.label == "string" ? this.meta.label : "" : typeof p?.label == "string" && p.label.length > 0 ? p.label : f.replace(/^style:/, "").replace(/-/g, " "), g = {};
2783
+ for (let [e, n] of Object.entries(u)) g[e] = this.isDataDriven(n) ? n : this.evalAtZoom(n, t);
2784
+ let _ = {};
2785
+ for (let [e, n] of Object.entries(d)) _[e] = this.evalAtZoom(n, t);
2786
+ let v = { ...g }, y = { ..._ }, b = this.editOverrides[f];
2787
+ b && (Object.assign(g, b), "text-size" in b && (_["text-size"] = b["text-size"]));
2788
+ let x = l === "fill" ? "fill-color" : l === "fill-extrusion" ? "fill-extrusion-color" : l === "line" ? "line-color" : l === "circle" ? "circle-color" : l === "symbol" ? "text-color" : null, S = x ? u[x] : null, C = S ? this.extractDataCases(S) : null;
2789
+ if (C && C.length > 1) {
2787
2790
  let e = `${l}|${f}`;
2788
2791
  if (r.has(e)) continue;
2789
- r.add(e), i.has(e) || i.set(e, [f]), a || n.push(w`<div class="sub-group-title">${m}</div>`);
2790
- let o = Array.isArray(b) ? b : null, s = o ? this.colorExprStopIndices(o) : null;
2791
- for (let e = 0; e < x.length; e++) {
2792
- let { label: i, paint: a } = x[e], c = {
2793
- ...h,
2794
- [y]: a
2795
- }, u = this.renderSwatch(l, c, t, g);
2792
+ r.add(e), i.has(e) || i.set(e, [f]), a || n.push(m`<div class="sub-group-title">${h}</div>`);
2793
+ let o = Array.isArray(S) ? S : null, s = o ? this.colorExprStopIndices(o) : null;
2794
+ for (let e = 0; e < C.length; e++) {
2795
+ let { label: i, paint: a } = C[e], c = {
2796
+ ...g,
2797
+ [x]: a
2798
+ }, u = this.renderSwatch(l, c, t, _);
2796
2799
  if (!u) continue;
2797
2800
  let d = `${l}|${String(a)}`;
2798
2801
  if (r.has(d)) continue;
2799
2802
  r.add(d);
2800
- let p = s?.[e] ?? null, m = typeof a == "string" ? a : "#000", _ = p !== null && o ? w`<button type="button" style="background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center"
2803
+ let p = s?.[e] ?? null, h = typeof a == "string" ? a : "#000", v = p !== null && o ? m`<button type="button" style="background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center"
2801
2804
  @click=${(e) => {
2802
- e.stopPropagation(), this.openStopColorPicker(e.currentTarget, [f], y, o, p, m);
2805
+ e.stopPropagation(), this.openStopColorPicker(e.currentTarget, [f], x, o, p, h);
2803
2806
  }}>
2804
2807
  ${u}</button>` : u;
2805
- n.push(w`
2808
+ n.push(m`
2806
2809
  <div class="legend-row sub-row">
2807
- ${_}
2810
+ ${v}
2808
2811
  <span class="legend-label">${i}</span>
2809
2812
  </div>`);
2810
2813
  }
2811
2814
  } else {
2812
- let e = y ? String(_[y] ?? "#aaa") : "#aaa", a = `${l}|${e}`;
2815
+ let e = x ? String(v[x] ?? "#aaa") : "#aaa", a = `${l}|${e}`;
2813
2816
  if (l === "line") {
2814
- let t = _["line-dasharray"];
2817
+ let t = v["line-dasharray"];
2815
2818
  a = `line|${e}|${Array.isArray(t) ? t.join(",") : String(t ?? "")}`;
2816
2819
  } else if (l === "symbol") {
2817
- let t = ee["text-size"] ?? _["text-size"], n = Math.round(Number(typeof t == "number" ? t : 12)), r = (Array.isArray(ee["text-font"]) ? ee["text-font"] : []).join(" ").toLowerCase(), i = r.includes("bold") || r.includes("black") ? "700" : r.includes("semibold") || r.includes("demibold") || r.includes("medium") ? "600" : "400", o = Math.round(Number(_["text-halo-width"] ?? 0) * 2) / 2;
2818
- a = `symbol|${e}|${n}|${i}|${o}|${o > 0 ? String(_["text-halo-color"] ?? "") : ""}`;
2820
+ let t = y["text-size"] ?? v["text-size"], n = Math.round(Number(typeof t == "number" ? t : 12)), r = (Array.isArray(y["text-font"]) ? y["text-font"] : []).join(" ").toLowerCase(), i = r.includes("bold") || r.includes("black") ? "700" : r.includes("semibold") || r.includes("demibold") || r.includes("medium") ? "600" : "400", o = Math.round(Number(v["text-halo-width"] ?? 0) * 2) / 2;
2821
+ a = `symbol|${e}|${n}|${i}|${o}|${o > 0 ? String(v["text-halo-color"] ?? "") : ""}`;
2819
2822
  }
2820
2823
  if (i.has(a) || i.set(a, []), i.get(a).push(f), r.has(a)) continue;
2821
2824
  r.add(a);
2822
- let o = this.renderSwatch(l, h, t, g);
2825
+ let o = this.renderSwatch(l, g, t, _);
2823
2826
  if (!o) continue;
2824
- let s = this.isEditableType(l, h), c = this.editorOpenKey === a;
2825
- if (n.push(w`
2827
+ let s = this.isEditableType(l, g), c = this.editorOpenKey === a;
2828
+ if (n.push(m`
2826
2829
  <div class="legend-row ${s ? "editable" : ""}"
2827
2830
  @click=${s ? () => {
2828
2831
  this.editorOpenKey = c ? null : a;
2829
2832
  } : null}>
2830
2833
  ${o}
2831
- <span class="legend-label">${m}</span>
2834
+ <span class="legend-label">${h}</span>
2832
2835
  </div>`), s && c) {
2833
2836
  let e = l === "symbol" ? {
2834
- ...h,
2835
- "text-size": g["text-size"] ?? h["text-size"]
2836
- } : h;
2837
+ ...g,
2838
+ "text-size": _["text-size"] ?? g["text-size"]
2839
+ } : g;
2837
2840
  n.push(this.renderStyleEditor(i.get(a), l, e));
2838
2841
  }
2839
2842
  }
2840
2843
  }
2841
- return w`<div class="legend-wrap">${n}</div>`;
2844
+ return m`<div class="legend-wrap">${n}</div>`;
2842
2845
  }
2843
2846
  resolveSwatchColor(e, t) {
2844
2847
  return typeof e == "string" ? e : t;
@@ -2846,41 +2849,41 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2846
2849
  renderSwatch(e, t, n, r) {
2847
2850
  if (e === "fill") {
2848
2851
  let e = this.resolveSwatchColor(t["fill-color"], "#000000");
2849
- return E`<svg width="20" height="12" style="flex-shrink:0">
2852
+ return l`<svg width="20" height="12" style="flex-shrink:0">
2850
2853
  <rect x="1" y="1" width="18" height="10" fill="${e}" fill-opacity="${Number(t["fill-opacity"] ?? .7)}"
2851
2854
  stroke="${String(t["fill-outline-color"] ?? e)}" stroke-width="1" rx="1"/>
2852
2855
  </svg>`;
2853
2856
  }
2854
- if (e === "fill-extrusion") return E`<svg width="20" height="12" style="flex-shrink:0">
2857
+ if (e === "fill-extrusion") return l`<svg width="20" height="12" style="flex-shrink:0">
2855
2858
  <rect x="1" y="1" width="18" height="10" fill="${String(t["fill-extrusion-color"] ?? "#aaa")}" fill-opacity="${Number(t["fill-extrusion-opacity"] ?? .8)}" stroke="none"/>
2856
2859
  <line x1="19" y1="1" x2="19" y2="11" stroke="rgba(0,0,0,0.3)" stroke-width="2"/>
2857
2860
  <line x1="1" y1="11" x2="19" y2="11" stroke="rgba(0,0,0,0.3)" stroke-width="2"/>
2858
2861
  </svg>`;
2859
- if (e === "line") return E`<svg width="20" height="12" style="flex-shrink:0">
2862
+ if (e === "line") return l`<svg width="20" height="12" style="flex-shrink:0">
2860
2863
  <line x1="1" y1="6" x2="19" y2="6" stroke="${this.resolveSwatchColor(t["line-color"], "#616161")}" stroke-width="${Math.min(Number(t["line-width"] ?? 2), 4)}"
2861
2864
  stroke-dasharray="${Array.isArray(t["line-dasharray"]) ? t["line-dasharray"].join(" ") : ""}" stroke-linecap="round"/>
2862
2865
  </svg>`;
2863
2866
  if (e === "circle") {
2864
2867
  let e = String(t["circle-color"] ?? "#aaa");
2865
- return E`<svg width="20" height="12" style="flex-shrink:0">
2868
+ return l`<svg width="20" height="12" style="flex-shrink:0">
2866
2869
  <circle cx="10" cy="6" r="${Math.min(Number(t["circle-radius"] ?? 4), 5)}" fill="${e}" stroke="${String(t["circle-stroke-color"] ?? e)}" stroke-width="${Number(t["circle-stroke-width"] ?? 0)}"/>
2867
2870
  </svg>`;
2868
2871
  }
2869
2872
  if (e === "symbol") {
2870
- let e = String(t["text-color"] ?? "#555"), n = t["text-halo-width"] && Number(t["text-halo-width"]) > 0 ? String(t["text-halo-color"] ?? "rgba(255,255,255,0.8)") : null, i = r?.["text-size"] ?? t["text-size"], a = Math.min(Math.max(Math.round((typeof i == "number" ? i : 12) * .9), 7), 24), o = (Array.isArray(r?.["text-font"]) ? r["text-font"] : []).join(" ").toLowerCase(), s = o.includes("bold") || o.includes("black") ? "700" : o.includes("semibold") || o.includes("demibold") || o.includes("medium") ? "600" : "400", c = o.includes("italic") || o.includes("oblique") ? "italic" : "normal", l = Math.max(20, a + 4);
2871
- return E`<svg width="${l}" height="${a + 4}" style="flex-shrink:0">
2872
- ${n ? E`<text x="${l / 2}" y="${a}" text-anchor="middle"
2873
+ let e = String(t["text-color"] ?? "#555"), n = t["text-halo-width"] && Number(t["text-halo-width"]) > 0 ? String(t["text-halo-color"] ?? "rgba(255,255,255,0.8)") : null, i = r?.["text-size"] ?? t["text-size"], a = Math.min(Math.max(Math.round((typeof i == "number" ? i : 12) * .9), 7), 24), o = (Array.isArray(r?.["text-font"]) ? r["text-font"] : []).join(" ").toLowerCase(), s = o.includes("bold") || o.includes("black") ? "700" : o.includes("semibold") || o.includes("demibold") || o.includes("medium") ? "600" : "400", c = o.includes("italic") || o.includes("oblique") ? "italic" : "normal", u = Math.max(20, a + 4);
2874
+ return l`<svg width="${u}" height="${a + 4}" style="flex-shrink:0">
2875
+ ${n ? l`<text x="${u / 2}" y="${a}" text-anchor="middle"
2873
2876
  font-size="${a}" font-weight="${s}" font-style="${c}"
2874
2877
  stroke="${n}" stroke-width="3" stroke-linejoin="round"
2875
2878
  fill="none" font-family="sans-serif">A</text>` : ""}
2876
- <text x="${l / 2}" y="${a}" text-anchor="middle"
2879
+ <text x="${u / 2}" y="${a}" text-anchor="middle"
2877
2880
  font-size="${a}" font-weight="${s}" font-style="${c}"
2878
2881
  fill="${e}" font-family="sans-serif">A</text>
2879
2882
  </svg>`;
2880
2883
  }
2881
- return e === "background" ? E`<svg width="20" height="12" style="flex-shrink:0">
2884
+ return e === "background" ? l`<svg width="20" height="12" style="flex-shrink:0">
2882
2885
  <rect x="1" y="1" width="18" height="10" fill="${String(t["background-color"] ?? "#eee")}" rx="1"/>
2883
- </svg>` : e === "raster" || e === "hillshade" ? E`<svg width="20" height="12" style="flex-shrink:0">
2886
+ </svg>` : e === "raster" || e === "hillshade" ? l`<svg width="20" height="12" style="flex-shrink:0">
2884
2887
  <defs><pattern id="rp" width="4" height="4" patternUnits="userSpaceOnUse">
2885
2888
  <rect width="2" height="2" fill="#ccc"/>
2886
2889
  <rect x="2" y="2" width="2" height="2" fill="#eee"/>
@@ -2937,51 +2940,51 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2937
2940
  }];
2938
2941
  }
2939
2942
  renderBubbleLegend(e, t, n) {
2940
- let r = Math.min(n, 1.5), i = Math.max(...e.map((e) => e.radius)), a = i + r + 2, o = a * 2, s = i * 2 + r * 2 + 4, c = s - 2, l = o + 8, u = o + 60, d = [...e].sort((e, t) => t.radius - e.radius).map((e) => {
2943
+ let r = Math.min(n, 1.5), i = Math.max(...e.map((e) => e.radius)), a = i + r + 2, o = a * 2, s = i * 2 + r * 2 + 4, c = s - 2, u = o + 8, d = o + 60, f = [...e].sort((e, t) => t.radius - e.radius).map((e) => {
2941
2944
  let n = Math.max(1, e.radius * 1), i = c - n - r, o = i - n;
2942
- return E`
2945
+ return l`
2943
2946
  <circle cx="${a}" cy="${i}" r="${n}"
2944
2947
  fill="${e.color}" fill-opacity="0.75"
2945
2948
  stroke="${t}" stroke-width="${r}"/>
2946
- <line x1="${a + n + r}" y1="${o}" x2="${l - 2}" y2="${o}"
2949
+ <line x1="${a + n + r}" y1="${o}" x2="${u - 2}" y2="${o}"
2947
2950
  stroke="#999" stroke-width="0.5" stroke-dasharray="2 2"/>
2948
- <text x="${l}" y="${o + 4}" font-size="9" fill="#555">${e.value}</text>
2951
+ <text x="${u}" y="${o + 4}" font-size="9" fill="#555">${e.value}</text>
2949
2952
  `;
2950
- }), f = Math.max(14, Math.floor((o + 60) / e.length)), p = e.length * f, m = e.map((e, t) => E`<rect x="${t * f}" y="0" width="${f}" height="${8}" fill="${e.color}"/>
2951
- <text x="${t * f + f / 2}" y="${17}" font-size="8"
2952
- text-anchor="middle" fill="#555">${e.value}</text>`), h = e.every((t) => t.color === e[0].color);
2953
- return w`
2953
+ }), p = Math.max(14, Math.floor((o + 60) / e.length)), h = e.length * p, g = e.map((e, t) => l`<rect x="${t * p}" y="0" width="${p}" height="${8}" fill="${e.color}"/>
2954
+ <text x="${t * p + p / 2}" y="${17}" font-size="8"
2955
+ text-anchor="middle" fill="#555">${e.value}</text>`), _ = e.every((t) => t.color === e[0].color);
2956
+ return m`
2954
2957
  <div class="legend-row" style="flex-direction:column;align-items:flex-start;gap:6px">
2955
- ${E`<svg width="${u}" height="${s}" style="overflow:visible">
2958
+ ${l`<svg width="${d}" height="${s}" style="overflow:visible">
2956
2959
  <line x1="${a}" y1="${c}" x2="${a}" y2="2" stroke="#bbb" stroke-width="1"/>
2957
- ${d}
2960
+ ${f}
2958
2961
  </svg>`}
2959
- ${h ? "" : E`<svg width="${p}" height="${20}" style="overflow:visible">
2960
- ${m}
2962
+ ${_ ? "" : l`<svg width="${h}" height="${20}" style="overflow:visible">
2963
+ ${g}
2961
2964
  </svg>`}
2962
2965
  </div>`;
2963
2966
  }
2964
2967
  renderCircleRow(e, t, n, r, i) {
2965
2968
  let a = Math.min(Math.max(r, 2), 12), o = Math.min(n, 2), s = (a + o) * 2 + 2;
2966
- return w`
2969
+ return m`
2967
2970
  <div class="legend-row">
2968
- ${E`<svg width="${s}" height="${s}" style="flex-shrink:0">
2971
+ ${l`<svg width="${s}" height="${s}" style="flex-shrink:0">
2969
2972
  <circle cx="${s / 2}" cy="${s / 2}" r="${a}"
2970
2973
  fill="${e}" stroke="${t}" stroke-width="${o}"/>
2971
2974
  </svg>`}
2972
- ${i === null ? "" : w`<span class="legend-label">${i}</span>`}
2975
+ ${i === null ? "" : m`<span class="legend-label">${i}</span>`}
2973
2976
  </div>`;
2974
2977
  }
2975
2978
  renderFillRow(e, t, n, r, i) {
2976
- let a = E`<svg width="24" height="14" style="flex-shrink:0">
2979
+ let a = l`<svg width="24" height="14" style="flex-shrink:0">
2977
2980
  <rect x="1" y="1" width="22" height="12"
2978
2981
  fill="${e}" fill-opacity="${n}"
2979
2982
  stroke="${t}" stroke-width="1.5" rx="2"/>
2980
2983
  </svg>`;
2981
- return w`
2984
+ return m`
2982
2985
  <div class="legend-row">
2983
- ${i ? w`<button type="button" style="background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center" @click=${i}>${a}</button>` : a}
2984
- ${r === null ? "" : w`<span class="legend-label">${r}</span>`}
2986
+ ${i ? m`<button type="button" style="background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center" @click=${i}>${a}</button>` : a}
2987
+ ${r === null ? "" : m`<span class="legend-label">${r}</span>`}
2985
2988
  </div>`;
2986
2989
  }
2987
2990
  colorExprStopIndices(e) {
@@ -3011,30 +3014,30 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3011
3014
  }, !1);
3012
3015
  }
3013
3016
  renderLineRow(e, t, n, r) {
3014
- return w`
3017
+ return m`
3015
3018
  <div class="legend-row">
3016
- ${E`<svg width="24" height="14" style="flex-shrink:0">
3019
+ ${l`<svg width="24" height="14" style="flex-shrink:0">
3017
3020
  <line x1="2" y1="7" x2="22" y2="7"
3018
3021
  stroke="${e}" stroke-width="${Math.min(t, 4)}"
3019
3022
  stroke-dasharray="${n}" stroke-linecap="round"/>
3020
3023
  </svg>`}
3021
- ${r === null ? "" : w`<span class="legend-label">${r}</span>`}
3024
+ ${r === null ? "" : m`<span class="legend-label">${r}</span>`}
3022
3025
  </div>`;
3023
3026
  }
3024
3027
  renderEditableLineRow(e, t, n, r, i, a, o) {
3025
- return w`
3028
+ return m`
3026
3029
  <div class="legend-row">
3027
3030
  <button type="button" class="color-swatch" style="background:transparent; border:none; padding:0; width:24px; height:14px; flex-shrink:0; cursor:pointer;"
3028
3031
  @click=${(n) => {
3029
3032
  n.stopPropagation(), this.openStopColorPicker(n.currentTarget, e, "line-color", a, o, t);
3030
3033
  }}>
3031
- ${E`<svg width="24" height="14">
3034
+ ${l`<svg width="24" height="14">
3032
3035
  <line x1="2" y1="7" x2="22" y2="7"
3033
3036
  stroke="${t}" stroke-width="${Math.min(n, 4)}"
3034
3037
  stroke-dasharray="${r}" stroke-linecap="round"/>
3035
3038
  </svg>`}
3036
3039
  </button>
3037
- ${i === null ? "" : w`<span class="legend-label">${i}</span>`}
3040
+ ${i === null ? "" : m`<span class="legend-label">${i}</span>`}
3038
3041
  </div>`;
3039
3042
  }
3040
3043
  getAttrTranslations() {
@@ -3211,14 +3214,14 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3211
3214
  }
3212
3215
  openColorPicker(e, t, n, r, i, a = !0) {
3213
3216
  let o = `${t.join(",")}::${n}`, s = i ?? ((e) => this.setPaintOverride(t, n, e)), c = this.pickrInstances.get(o);
3214
- c ? (c.setColor(r), this.pickrOriginal.set(o, r)) : (c = Te.default.create({
3217
+ c ? (c.setColor(r), this.pickrOriginal.set(o, r)) : (c = ke.default.create({
3215
3218
  el: e,
3216
3219
  theme: "nano",
3217
3220
  default: r,
3218
3221
  useAsButton: !0,
3219
3222
  comparison: !1,
3220
3223
  appClass: "webmapx-pickr",
3221
- swatches: Ee.COLOR_PALETTE,
3224
+ swatches: Ae.COLOR_PALETTE,
3222
3225
  components: {
3223
3226
  preview: !0,
3224
3227
  opacity: !0,
@@ -3264,7 +3267,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3264
3267
  this.editOverrides = r, this.pendingPaintRaf === null && (this.pendingPaintRaf = requestAnimationFrame(() => this.flushPaintOverrides()));
3265
3268
  }
3266
3269
  renderRangeRow(e, t, n, r, i, a, o, s = "") {
3267
- return w`
3270
+ return m`
3268
3271
  <div class="style-editor-row">
3269
3272
  <label>${t}
3270
3273
  <input type="range" min=${i} max=${a} step=${o} .value=${String(r)}
@@ -3274,7 +3277,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3274
3277
  </div>`;
3275
3278
  }
3276
3279
  renderColorRow(e, t, n, r) {
3277
- return w`
3280
+ return m`
3278
3281
  <div class="style-editor-row">
3279
3282
  <label>${t}</label>
3280
3283
  <button type="button" class="color-swatch" style="background:${r}"
@@ -3288,11 +3291,11 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3288
3291
  let t = this.toCssColor(n["fill-outline-color"], i);
3289
3292
  s.push(this.renderColorRow(e, "outline color", "fill-outline-color", t));
3290
3293
  }
3291
- return s.push(this.renderRangeRow(e, "opacity", a, o, 0, 1, .05)), w`<div class="style-editor">${s}</div>`;
3294
+ return s.push(this.renderRangeRow(e, "opacity", a, o, 0, 1, .05)), m`<div class="style-editor">${s}</div>`;
3292
3295
  }
3293
3296
  if (t === "line") {
3294
3297
  let t = this.toCssColor(n["line-color"], "#000000"), r = Number(n["line-width"] ?? 2), i = Number(n["line-opacity"] ?? 1);
3295
- return w`<div class="style-editor">
3298
+ return m`<div class="style-editor">
3296
3299
  ${this.renderColorRow(e, "line color", "line-color", t)}
3297
3300
  ${this.renderRangeRow(e, "width", "line-width", r, .5, 10, .5, "px")}
3298
3301
  ${this.renderRangeRow(e, "opacity", "line-opacity", i, 0, 1, .05)}
@@ -3300,7 +3303,7 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3300
3303
  }
3301
3304
  if (t === "circle") {
3302
3305
  let t = this.toCssColor(n["circle-color"], "#000000"), r = Number(n["circle-radius"] ?? 5), i = this.toCssColor(n["circle-stroke-color"], t), a = Number(n["circle-stroke-width"] ?? 0), o = Number(n["circle-opacity"] ?? 1);
3303
- return w`<div class="style-editor">
3306
+ return m`<div class="style-editor">
3304
3307
  ${this.renderRangeRow(e, "radius", "circle-radius", r, 1, 30, 1, "px")}
3305
3308
  ${this.renderColorRow(e, "fill color", "circle-color", t)}
3306
3309
  ${this.renderRangeRow(e, "opacity", "circle-opacity", o, 0, 1, .05)}
@@ -3310,17 +3313,17 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3310
3313
  }
3311
3314
  if (t === "symbol") {
3312
3315
  let t = this.toCssColor(n["text-color"], "#1f2937"), r = Number(n["text-opacity"] ?? 1), i = Number(n["text-size"] ?? 12), a = n["text-halo-color"] !== void 0 || Number(n["text-halo-width"] ?? 0) > 0, o = this.toCssColor(n["text-halo-color"], "#ffffff");
3313
- return w`<div class="style-editor">
3316
+ return m`<div class="style-editor">
3314
3317
  ${this.renderRangeRow(e, "size", "text-size", i, 8, 32, 1, "px")}
3315
3318
  ${this.renderColorRow(e, "text color", "text-color", t)}
3316
3319
  ${this.renderRangeRow(e, "opacity", "text-opacity", r, 0, 1, .05)}
3317
3320
  ${a ? this.renderColorRow(e, "halo color", "text-halo-color", o) : ""}
3318
3321
  </div>`;
3319
3322
  }
3320
- return w``;
3323
+ return m``;
3321
3324
  }
3322
3325
  renderHillshadeTerrainCheckbox() {
3323
- return w`
3326
+ return m`
3324
3327
  <div class="style-editor-row" style="padding:2px 0">
3325
3328
  <input type="checkbox" id="hillshade-terrain-${this.layerId}" .checked=${this.terrainEnabled}
3326
3329
  @change=${(e) => this.toggleTerrainFromHillshade(e.target.checked)}>
@@ -3367,12 +3370,12 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3367
3370
  1 / 3,
3368
3371
  2 / 3,
3369
3372
  1
3370
- ].map((e) => f * (p / f) ** +e), h = m.map((e) => l(e)), g = c.prop ? r.get(c.prop)?.unit : void 0, _ = m.map((e) => Math.max(1, e)), ee = _[_.length - 1], v = ee < 4 ? 4 / ee : 1, y = h.map((e, t) => ({
3373
+ ].map((e) => f * (p / f) ** +e), h = m.map((e) => l(e)), g = c.prop ? r.get(c.prop)?.unit : void 0, _ = m.map((e) => Math.max(1, e)), v = _[_.length - 1], y = v < 4 ? 4 / v : 1, b = h.map((e, t) => ({
3371
3374
  value: this.formatNumber(e, g),
3372
3375
  color: o,
3373
- radius: Math.max(1, Math.round(_[t] * v))
3374
- })), b = /* @__PURE__ */ new Set(), x = y.filter((e) => !b.has(e.radius) && b.add(e.radius));
3375
- return [this.renderBubbleLegend(x, e, t)];
3376
+ radius: Math.max(1, Math.round(_[t] * y))
3377
+ })), x = /* @__PURE__ */ new Set(), S = b.filter((e) => !x.has(e.radius) && x.add(e.radius));
3378
+ return [this.renderBubbleLegend(S, e, t)];
3376
3379
  }
3377
3380
  if (s) {
3378
3381
  let n = this.evalAtZoom(a, this.zoom), r = Math.min(Number(isFinite(Number(n)) ? n : 6), 20);
@@ -3412,15 +3415,15 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3412
3415
  return o && o.length === r.length ? this.renderEditableLineRow(e, u, c, a, l, t, o[s]) : this.renderLineRow(u, c, a, l);
3413
3416
  });
3414
3417
  }
3415
- return t === "symbol" ? [w`
3418
+ return t === "symbol" ? [m`
3416
3419
  <div class="legend-row">
3417
- ${E`<svg width="24" height="14" style="flex-shrink:0">
3420
+ ${l`<svg width="24" height="14" style="flex-shrink:0">
3418
3421
  <text x="12" y="11" text-anchor="middle" font-size="11"
3419
3422
  fill="${String(n["text-color"] ?? "#1f2937")}" font-family="sans-serif">A</text>
3420
3423
  </svg>`}
3421
- </div>`] : t === "raster" || t === "background" || t === "hillshade" ? [w`
3424
+ </div>`] : t === "raster" || t === "background" || t === "hillshade" ? [m`
3422
3425
  <div class="legend-row">
3423
- ${E`<svg width="24" height="14" style="flex-shrink:0">
3426
+ ${l`<svg width="24" height="14" style="flex-shrink:0">
3424
3427
  <defs>
3425
3428
  <pattern id="grid" width="4" height="4" patternUnits="userSpaceOnUse">
3426
3429
  <rect width="2" height="2" fill="#ccc"/>
@@ -3432,12 +3435,12 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3432
3435
  </div>`] : [];
3433
3436
  }
3434
3437
  render() {
3435
- if (!this.layerId) return w``;
3438
+ if (!this.layerId) return m``;
3436
3439
  let e = this.meta, t = typeof e?.layerType == "string" ? e.layerType : null, n = e?.paint && typeof e.paint == "object" ? e.paint : {}, r = typeof e?.legendurl == "string" && e.legendurl.length > 0 ? e.legendurl : null, i = typeof e?.label == "string" ? e.label : this.layerId, a = Array.isArray(e?.sublayers) ? e.sublayers : null, o = typeof e?.minzoom == "number" ? e.minzoom : 0, s = typeof e?.maxzoom == "number" ? e.maxzoom : 24;
3437
3440
  if (this.zoom < o || this.zoom > s) return this.renderZoomHint(o, s, this.zoom);
3438
3441
  if (a && a.length > 0) {
3439
3442
  let e = this.renderCompositeLegend(a, this.zoom);
3440
- return a.length === 1 && typeof a[0]?.type == "string" && a[0].type === "hillshade" ? this.renderCollapsibleLegend(w`
3443
+ return a.length === 1 && typeof a[0]?.type == "string" && a[0].type === "hillshade" ? this.renderCollapsibleLegend(m`
3441
3444
  <div class="legend-wrap">
3442
3445
  ${e}
3443
3446
  ${this.renderHillshadeTerrainCheckbox()}
@@ -3457,19 +3460,19 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3457
3460
  ].includes(t) && !r, d = [this.layerId], f = this.editOverrides[this.layerId], p = f ? {
3458
3461
  ...n,
3459
3462
  ...f
3460
- } : n, m = !a && u && this.isEditableType(t, p), h = this.editorOpenKey === this.layerId;
3461
- return this.renderCollapsibleLegend(w`
3463
+ } : n, h = !a && u && this.isEditableType(t, p), g = this.editorOpenKey === this.layerId;
3464
+ return this.renderCollapsibleLegend(m`
3462
3465
  <div class="legend-wrap">
3463
- ${u ? w`
3464
- <div class=${m ? "editable" : ""} @click=${m ? () => {
3465
- this.editorOpenKey = h ? null : this.layerId;
3466
+ ${u ? m`
3467
+ <div class=${h ? "editable" : ""} @click=${h ? () => {
3468
+ this.editorOpenKey = g ? null : this.layerId;
3466
3469
  } : null}>
3467
3470
  ${this.renderLegendItems(d, t, p)}
3468
3471
  </div>
3469
3472
  ${t === "hillshade" ? this.renderHillshadeTerrainCheckbox() : ""}
3470
- ${m && h ? this.renderStyleEditor(d, t, p) : ""}
3473
+ ${h && g ? this.renderStyleEditor(d, t, p) : ""}
3471
3474
  ` : ""}
3472
- ${r ? w`
3475
+ ${r ? m`
3473
3476
  <img class="legend-img" src=${r} alt=${i}
3474
3477
  @error=${(e) => {
3475
3478
  let t = e.target, n = document.createElement("span");
@@ -3480,24 +3483,24 @@ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3480
3483
  `);
3481
3484
  }
3482
3485
  };
3483
- d([O({
3486
+ S([s({
3484
3487
  type: String,
3485
3488
  attribute: "layer-id"
3486
- })], L.prototype, "layerId", void 0), d([O({
3489
+ })], N.prototype, "layerId", void 0), S([s({
3487
3490
  type: Boolean,
3488
3491
  reflect: !0
3489
- })], L.prototype, "collapsible", void 0), d([A()], L.prototype, "meta", void 0), d([A()], L.prototype, "zoom", void 0), d([A()], L.prototype, "legendCollapsed", void 0), d([A()], L.prototype, "legendOverflowing", void 0), d([A()], L.prototype, "editOverrides", void 0), d([A()], L.prototype, "editorOpenKey", void 0), d([A()], L.prototype, "terrainEnabled", void 0), L = Ee = d([D("webmapx-layer-legend")], L);
3492
+ })], N.prototype, "collapsible", void 0), S([d()], N.prototype, "meta", void 0), S([d()], N.prototype, "zoom", void 0), S([d()], N.prototype, "legendCollapsed", void 0), S([d()], N.prototype, "legendOverflowing", void 0), S([d()], N.prototype, "editOverrides", void 0), S([d()], N.prototype, "editorOpenKey", void 0), S([d()], N.prototype, "terrainEnabled", void 0), N = Ae = S([p("webmapx-layer-legend")], N);
3490
3493
  //#endregion
3491
3494
  //#region node_modules/dompurify/dist/purify.es.mjs
3492
- function De(e, t) {
3495
+ function je(e, t) {
3493
3496
  (t == null || t > e.length) && (t = e.length);
3494
3497
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
3495
3498
  return r;
3496
3499
  }
3497
- function Oe(e) {
3500
+ function Me(e) {
3498
3501
  if (Array.isArray(e)) return e;
3499
3502
  }
3500
- function ke(e, t) {
3503
+ function Ne(e, t) {
3501
3504
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
3502
3505
  if (n != null) {
3503
3506
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -3515,113 +3518,113 @@ function ke(e, t) {
3515
3518
  return s;
3516
3519
  }
3517
3520
  }
3518
- function Ae() {
3521
+ function Pe() {
3519
3522
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3520
3523
  }
3521
- function je(e, t) {
3522
- return Oe(e) || ke(e, t) || Me(e, t) || Ae();
3524
+ function Fe(e, t) {
3525
+ return Me(e) || Ne(e, t) || Ie(e, t) || Pe();
3523
3526
  }
3524
- function Me(e, t) {
3527
+ function Ie(e, t) {
3525
3528
  if (e) {
3526
- if (typeof e == "string") return De(e, t);
3529
+ if (typeof e == "string") return je(e, t);
3527
3530
  var n = {}.toString.call(e).slice(8, -1);
3528
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? De(e, t) : void 0;
3531
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? je(e, t) : void 0;
3529
3532
  }
3530
3533
  }
3531
- var Ne = Object.entries, Pe = Object.setPrototypeOf, Fe = Object.isFrozen, Ie = Object.getPrototypeOf, Le = Object.getOwnPropertyDescriptor, R = Object.freeze, z = Object.seal, Re = Object.create, ze = typeof Reflect < "u" && Reflect, Be = ze.apply, Ve = ze.construct;
3532
- R ||= function(e) {
3534
+ var Le = Object.entries, Re = Object.setPrototypeOf, ze = Object.isFrozen, Be = Object.getPrototypeOf, P = Object.getOwnPropertyDescriptor, F = Object.freeze, I = Object.seal, Ve = Object.create, He = typeof Reflect < "u" && Reflect, Ue = He.apply, We = He.construct;
3535
+ F ||= function(e) {
3533
3536
  return e;
3534
- }, z ||= function(e) {
3537
+ }, I ||= function(e) {
3535
3538
  return e;
3536
- }, Be ||= function(e, t) {
3539
+ }, Ue ||= function(e, t) {
3537
3540
  var n = [...arguments].slice(2);
3538
3541
  return e.apply(t, n);
3539
- }, Ve ||= function(e) {
3542
+ }, We ||= function(e) {
3540
3543
  return new e(...[...arguments].slice(1));
3541
3544
  };
3542
- var He = U(Array.prototype.forEach), Ue = U(Array.prototype.lastIndexOf), We = U(Array.prototype.pop), Ge = U(Array.prototype.push), Ke = U(Array.prototype.splice), qe = Array.isArray, Je = U(String.prototype.toLowerCase), Ye = U(String.prototype.toString), Xe = U(String.prototype.match), Ze = U(String.prototype.replace), Qe = U(String.prototype.indexOf), $e = U(String.prototype.trim), et = U(Number.prototype.toString), tt = U(Boolean.prototype.toString), nt = typeof BigInt > "u" ? null : U(BigInt.prototype.toString), rt = typeof Symbol > "u" ? null : U(Symbol.prototype.toString), B = U(Object.prototype.hasOwnProperty), V = U(Object.prototype.toString), H = U(RegExp.prototype.test), it = at(TypeError);
3543
- function U(e) {
3545
+ var Ge = B(Array.prototype.forEach), Ke = B(Array.prototype.lastIndexOf), qe = B(Array.prototype.pop), Je = B(Array.prototype.push), Ye = B(Array.prototype.splice), Xe = Array.isArray, Ze = B(String.prototype.toLowerCase), Qe = B(String.prototype.toString), $e = B(String.prototype.match), et = B(String.prototype.replace), tt = B(String.prototype.indexOf), nt = B(String.prototype.trim), rt = B(Number.prototype.toString), it = B(Boolean.prototype.toString), at = typeof BigInt > "u" ? null : B(BigInt.prototype.toString), ot = typeof Symbol > "u" ? null : B(Symbol.prototype.toString), L = B(Object.prototype.hasOwnProperty), R = B(Object.prototype.toString), z = B(RegExp.prototype.test), st = ct(TypeError);
3546
+ function B(e) {
3544
3547
  return function(t) {
3545
3548
  t instanceof RegExp && (t.lastIndex = 0);
3546
3549
  var n = [...arguments].slice(1);
3547
- return Be(e, t, n);
3550
+ return Ue(e, t, n);
3548
3551
  };
3549
3552
  }
3550
- function at(e) {
3553
+ function ct(e) {
3551
3554
  return function() {
3552
- return Ve(e, [...arguments]);
3555
+ return We(e, [...arguments]);
3553
3556
  };
3554
3557
  }
3555
- function W(e, t) {
3556
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Je;
3557
- if (Pe && Pe(e, null), !qe(t)) return e;
3558
+ function V(e, t) {
3559
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ze;
3560
+ if (Re && Re(e, null), !Xe(t)) return e;
3558
3561
  let r = t.length;
3559
3562
  for (; r--;) {
3560
3563
  let i = t[r];
3561
3564
  if (typeof i == "string") {
3562
3565
  let e = n(i);
3563
- e !== i && (Fe(t) || (t[r] = e), i = e);
3566
+ e !== i && (ze(t) || (t[r] = e), i = e);
3564
3567
  }
3565
3568
  e[i] = !0;
3566
3569
  }
3567
3570
  return e;
3568
3571
  }
3569
- function ot(e) {
3570
- for (let t = 0; t < e.length; t++) B(e, t) || (e[t] = null);
3572
+ function lt(e) {
3573
+ for (let t = 0; t < e.length; t++) L(e, t) || (e[t] = null);
3571
3574
  return e;
3572
3575
  }
3573
- function G(e) {
3574
- let t = Re(null);
3575
- for (let r of Ne(e)) {
3576
- var n = je(r, 2);
3576
+ function H(e) {
3577
+ let t = Ve(null);
3578
+ for (let r of Le(e)) {
3579
+ var n = Fe(r, 2);
3577
3580
  let i = n[0], a = n[1];
3578
- B(e, i) && (qe(a) ? t[i] = ot(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = G(a) : t[i] = a);
3581
+ L(e, i) && (Xe(a) ? t[i] = lt(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = H(a) : t[i] = a);
3579
3582
  }
3580
3583
  return t;
3581
3584
  }
3582
- function st(e) {
3585
+ function ut(e) {
3583
3586
  switch (typeof e) {
3584
3587
  case "string": return e;
3585
- case "number": return et(e);
3586
- case "boolean": return tt(e);
3587
- case "bigint": return nt ? nt(e) : "0";
3588
- case "symbol": return rt ? rt(e) : "Symbol()";
3589
- case "undefined": return V(e);
3588
+ case "number": return rt(e);
3589
+ case "boolean": return it(e);
3590
+ case "bigint": return at ? at(e) : "0";
3591
+ case "symbol": return ot ? ot(e) : "Symbol()";
3592
+ case "undefined": return R(e);
3590
3593
  case "function":
3591
3594
  case "object": {
3592
- if (e === null) return V(e);
3593
- let t = e, n = ct(t, "toString");
3595
+ if (e === null) return R(e);
3596
+ let t = e, n = U(t, "toString");
3594
3597
  if (typeof n == "function") {
3595
3598
  let e = n(t);
3596
- return typeof e == "string" ? e : V(e);
3599
+ return typeof e == "string" ? e : R(e);
3597
3600
  }
3598
- return V(e);
3601
+ return R(e);
3599
3602
  }
3600
- default: return V(e);
3603
+ default: return R(e);
3601
3604
  }
3602
3605
  }
3603
- function ct(e, t) {
3606
+ function U(e, t) {
3604
3607
  for (; e !== null;) {
3605
- let n = Le(e, t);
3608
+ let n = P(e, t);
3606
3609
  if (n) {
3607
- if (n.get) return U(n.get);
3608
- if (typeof n.value == "function") return U(n.value);
3610
+ if (n.get) return B(n.get);
3611
+ if (typeof n.value == "function") return B(n.value);
3609
3612
  }
3610
- e = Ie(e);
3613
+ e = Be(e);
3611
3614
  }
3612
3615
  function n() {
3613
3616
  return null;
3614
3617
  }
3615
3618
  return n;
3616
3619
  }
3617
- function lt(e) {
3620
+ function dt(e) {
3618
3621
  try {
3619
- return H(e, ""), !0;
3622
+ return z(e, ""), !0;
3620
3623
  } catch {
3621
3624
  return !1;
3622
3625
  }
3623
3626
  }
3624
- var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), dt = R(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), ft = R([
3627
+ var ft = F(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), pt = F(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), mt = F([
3625
3628
  "feBlend",
3626
3629
  "feColorMatrix",
3627
3630
  "feComponentTransfer",
@@ -3647,7 +3650,7 @@ var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3647
3650
  "feSpotLight",
3648
3651
  "feTile",
3649
3652
  "feTurbulence"
3650
- ]), pt = R([
3653
+ ]), ht = F([
3651
3654
  "animate",
3652
3655
  "color-profile",
3653
3656
  "cursor",
@@ -3670,7 +3673,7 @@ var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3670
3673
  "solidcolor",
3671
3674
  "unknown",
3672
3675
  "use"
3673
- ]), mt = R(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), ht = R([
3676
+ ]), gt = F(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), _t = F([
3674
3677
  "maction",
3675
3678
  "maligngroup",
3676
3679
  "malignmark",
@@ -3686,13 +3689,13 @@ var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3686
3689
  "annotation-xml",
3687
3690
  "mprescripts",
3688
3691
  "none"
3689
- ]), gt = R(["#text"]), _t = R(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), vt = R(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), yt = R(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), bt = R([
3692
+ ]), vt = F(["#text"]), yt = F(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), bt = F(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), xt = F(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), St = F([
3690
3693
  "xlink:href",
3691
3694
  "xml:id",
3692
3695
  "xlink:title",
3693
3696
  "xml:space",
3694
3697
  "xmlns:xlink"
3695
- ]), xt = z(/{{[\w\W]*|^[\w\W]*}}/g), St = z(/<%[\w\W]*|^[\w\W]*%>/g), Ct = z(/\${[\w\W]*/g), wt = z(/^data-[\-\w.\u00B7-\uFFFF]+$/), Tt = z(/^aria-[\-\w]+$/), Et = z(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Dt = z(/^(?:\w+script|data):/i), Ot = z(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), kt = z(/^html$/i), At = z(/^[a-z][.\w]*(-[.\w]+)+$/i), jt = z(/<[/\w!]/g), Mt = z(/<[/\w]/g), Nt = z(/<\/no(script|embed|frames)/i), Pt = z(/\/>/i), Ft = {
3698
+ ]), Ct = I(/{{[\w\W]*|^[\w\W]*}}/g), wt = I(/<%[\w\W]*|^[\w\W]*%>/g), Tt = I(/\${[\w\W]*/g), Et = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), Dt = I(/^aria-[\-\w]+$/), Ot = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), kt = I(/^(?:\w+script|data):/i), At = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), jt = I(/^html$/i), Mt = I(/^[a-z][.\w]*(-[.\w]+)+$/i), Nt = I(/<[/\w!]/g), Pt = I(/<[/\w]/g), Ft = I(/<\/no(script|embed|frames)/i), It = I(/\/>/i), W = {
3696
3699
  element: 1,
3697
3700
  attribute: 2,
3698
3701
  text: 3,
@@ -3705,9 +3708,9 @@ var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3705
3708
  documentType: 10,
3706
3709
  documentFragment: 11,
3707
3710
  notation: 12
3708
- }, It = function() {
3711
+ }, Lt = function() {
3709
3712
  return typeof window > "u" ? null : window;
3710
- }, Lt = function(e, t) {
3713
+ }, Rt = function(e, t) {
3711
3714
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
3712
3715
  let n = null, r = "data-tt-policy-suffix";
3713
3716
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -3724,7 +3727,7 @@ var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3724
3727
  } catch {
3725
3728
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
3726
3729
  }
3727
- }, Rt = function() {
3730
+ }, zt = function() {
3728
3731
  return {
3729
3732
  afterSanitizeAttributes: [],
3730
3733
  afterSanitizeElements: [],
@@ -3736,53 +3739,53 @@ var ut = R(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3736
3739
  uponSanitizeElement: [],
3737
3740
  uponSanitizeShadowNode: []
3738
3741
  };
3739
- }, zt = function(e, t, n, r) {
3740
- return B(e, t) && qe(e[t]) ? W(r.base ? G(r.base) : {}, e[t], r.transform) : n;
3742
+ }, Bt = function(e, t, n, r) {
3743
+ return L(e, t) && Xe(e[t]) ? V(r.base ? H(r.base) : {}, e[t], r.transform) : n;
3741
3744
  };
3742
- function Bt() {
3743
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : It(), t = (e) => Bt(e);
3744
- if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== Ft.document || !e.Element) return t.isSupported = !1, t;
3745
+ function Vt() {
3746
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Lt(), t = (e) => Vt(e);
3747
+ if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== W.document || !e.Element) return t.isSupported = !1, t;
3745
3748
  let n = e.document, r = n, i = r.currentScript;
3746
3749
  e.DocumentFragment;
3747
3750
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
3748
3751
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
3749
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = ct(d, "cloneNode"), p = ct(d, "remove"), m = ct(d, "nextSibling"), h = ct(d, "childNodes"), g = ct(d, "parentNode"), _ = ct(d, "shadowRoot"), ee = ct(d, "attributes"), v = o && o.prototype ? ct(o.prototype, "nodeType") : null, y = o && o.prototype ? ct(o.prototype, "nodeName") : null;
3752
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = U(d, "cloneNode"), p = U(d, "remove"), m = U(d, "nextSibling"), h = U(d, "childNodes"), g = U(d, "parentNode"), _ = U(d, "shadowRoot"), v = U(d, "attributes"), y = o && o.prototype ? U(o.prototype, "nodeType") : null, b = o && o.prototype ? U(o.prototype, "nodeName") : null;
3750
3753
  if (typeof a == "function") {
3751
3754
  let e = n.createElement("template");
3752
3755
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
3753
3756
  }
3754
- let b, x = "", te, ne = !1, re = 0, ie = function() {
3755
- if (re > 0) throw it("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
3756
- }, ae = function(e) {
3757
- ie(), re++;
3757
+ let x, S = "", C, ee = !1, te = 0, ne = function() {
3758
+ if (te > 0) throw st("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
3759
+ }, w = function(e) {
3760
+ ne(), te++;
3758
3761
  try {
3759
- return b.createHTML(e);
3762
+ return x.createHTML(e);
3760
3763
  } finally {
3761
- re--;
3764
+ te--;
3762
3765
  }
3763
- }, oe = function(e) {
3764
- ie(), re++;
3766
+ }, re = function(e) {
3767
+ ne(), te++;
3765
3768
  try {
3766
- return b.createScriptURL(e);
3769
+ return x.createScriptURL(e);
3767
3770
  } finally {
3768
- re--;
3769
- }
3770
- }, se = function() {
3771
- return ne ||= (te = Lt(u, i), !0), te;
3772
- }, ce = n, le = ce.implementation, ue = ce.createNodeIterator, S = ce.createDocumentFragment, C = ce.getElementsByTagName, w = r.importNode, T = Rt();
3773
- t.isSupported = typeof Ne == "function" && typeof g == "function" && le && le.createHTMLDocument !== void 0;
3774
- let E = xt, D = St, de = Ct, O = wt, k = Tt, fe = Dt, A = Ot, pe = At, me = Et, j = null, he = W({}, [
3775
- ...ut,
3776
- ...dt,
3771
+ te--;
3772
+ }
3773
+ }, ie = function() {
3774
+ return ee ||= (C = Rt(u, i), !0), C;
3775
+ }, ae = n, oe = ae.implementation, se = ae.createNodeIterator, ce = ae.createDocumentFragment, le = ae.getElementsByTagName, ue = r.importNode, T = zt();
3776
+ t.isSupported = typeof Le == "function" && typeof g == "function" && oe && oe.createHTMLDocument !== void 0;
3777
+ let de = Ct, fe = wt, pe = Tt, me = Et, he = Dt, ge = kt, _e = At, ve = Mt, ye = Ot, E = null, be = V({}, [
3777
3778
  ...ft,
3779
+ ...pt,
3778
3780
  ...mt,
3779
- ...gt
3780
- ]), M = null, ge = W({}, [
3781
- ..._t,
3782
- ...vt,
3781
+ ...gt,
3782
+ ...vt
3783
+ ]), D = null, xe = V({}, [
3783
3784
  ...yt,
3784
- ...bt
3785
- ]), N = Object.seal(Re(null, {
3785
+ ...bt,
3786
+ ...xt,
3787
+ ...St
3788
+ ]), O = Object.seal(Ve(null, {
3786
3789
  tagNameCheck: {
3787
3790
  writable: !0,
3788
3791
  configurable: !1,
@@ -3801,7 +3804,7 @@ function Bt() {
3801
3804
  enumerable: !0,
3802
3805
  value: !1
3803
3806
  }
3804
- })), _e = null, ve = null, P = Object.seal(Re(null, {
3807
+ })), Se = null, Ce = null, k = Object.seal(Ve(null, {
3805
3808
  tagCheck: {
3806
3809
  writable: !0,
3807
3810
  configurable: !1,
@@ -3814,14 +3817,14 @@ function Bt() {
3814
3817
  enumerable: !0,
3815
3818
  value: null
3816
3819
  }
3817
- })), ye = !0, be = !0, F = !1, xe = !0, Se = !1, Ce = !0, I = !1, we = !1, Te = null, Ee = null, L = !1, De = !1, Oe = !1, ke = !1, Ae = !0, je = !1, Me = "user-content-", Pe = !0, Fe = !1, Ie = {}, Le = null, ze = W({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Be = null, Ve = W({}, [
3820
+ })), we = !0, Te = !0, A = !1, Ee = !0, De = !1, Oe = !0, j = !1, M = !1, ke = null, Ae = null, N = !1, je = !1, Me = !1, Ne = !1, Pe = !0, Fe = !1, Ie = "user-content-", Re = !0, ze = !1, Be = {}, P = null, He = V({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ue = null, We = V({}, [
3818
3821
  "audio",
3819
3822
  "video",
3820
3823
  "img",
3821
3824
  "source",
3822
3825
  "image",
3823
3826
  "track"
3824
- ]), et = null, tt = W({}, [
3827
+ ]), rt = null, it = V({}, [
3825
3828
  "alt",
3826
3829
  "class",
3827
3830
  "for",
@@ -3836,223 +3839,223 @@ function Bt() {
3836
3839
  "value",
3837
3840
  "style",
3838
3841
  "xmlns"
3839
- ]), nt = "http://www.w3.org/1998/Math/MathML", rt = "http://www.w3.org/2000/svg", V = "http://www.w3.org/1999/xhtml", U = V, at = !1, ot = null, Vt = W({}, [
3840
- nt,
3841
- rt,
3842
- V
3843
- ], Ye), Ht = R([
3842
+ ]), at = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", R = "http://www.w3.org/1999/xhtml", B = R, ct = !1, lt = null, Ht = V({}, [
3843
+ at,
3844
+ ot,
3845
+ R
3846
+ ], Qe), Ut = F([
3844
3847
  "mi",
3845
3848
  "mo",
3846
3849
  "mn",
3847
3850
  "ms",
3848
3851
  "mtext"
3849
- ]), Ut = W({}, Ht), Wt = R(["annotation-xml"]), Gt = W({}, Wt), Kt = W({}, [
3852
+ ]), Wt = V({}, Ut), Gt = F(["annotation-xml"]), Kt = V({}, Gt), qt = V({}, [
3850
3853
  "title",
3851
3854
  "style",
3852
3855
  "font",
3853
3856
  "a",
3854
3857
  "script"
3855
- ]), K = null, qt = ["application/xhtml+xml", "text/html"], q = null, J = null, Jt = n.createElement("form"), Yt = function(e) {
3858
+ ]), G = null, Jt = ["application/xhtml+xml", "text/html"], K = null, q = null, Yt = n.createElement("form"), Xt = function(e) {
3856
3859
  return e instanceof RegExp || e instanceof Function;
3857
- }, Xt = function() {
3860
+ }, Zt = function() {
3858
3861
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3859
- if (J && J === e) return;
3860
- (!e || typeof e != "object") && (e = {}), e = G(e), K = qt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, q = K === "application/xhtml+xml" ? Ye : Je, j = zt(e, "ALLOWED_TAGS", he, { transform: q }), M = zt(e, "ALLOWED_ATTR", ge, { transform: q }), ot = zt(e, "ALLOWED_NAMESPACES", Vt, { transform: Ye }), et = zt(e, "ADD_URI_SAFE_ATTR", tt, {
3861
- transform: q,
3862
- base: tt
3863
- }), Be = zt(e, "ADD_DATA_URI_TAGS", Ve, {
3864
- transform: q,
3865
- base: Ve
3866
- }), Le = zt(e, "FORBID_CONTENTS", ze, { transform: q }), _e = zt(e, "FORBID_TAGS", G({}), { transform: q }), ve = zt(e, "FORBID_ATTR", G({}), { transform: q }), Ie = B(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? G(e.USE_PROFILES) : e.USE_PROFILES : !1, ye = e.ALLOW_ARIA_ATTR !== !1, be = e.ALLOW_DATA_ATTR !== !1, F = e.ALLOW_UNKNOWN_PROTOCOLS || !1, xe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = e.SAFE_FOR_TEMPLATES || !1, Ce = e.SAFE_FOR_XML !== !1, I = e.WHOLE_DOCUMENT || !1, De = e.RETURN_DOM || !1, Oe = e.RETURN_DOM_FRAGMENT || !1, ke = e.RETURN_TRUSTED_TYPE || !1, L = e.FORCE_BODY || !1, Ae = e.SANITIZE_DOM !== !1, je = e.SANITIZE_NAMED_PROPS || !1, Pe = e.KEEP_CONTENT !== !1, Fe = e.IN_PLACE || !1, me = lt(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Et, U = typeof e.NAMESPACE == "string" ? e.NAMESPACE : V, Ut = B(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? G(e.MATHML_TEXT_INTEGRATION_POINTS) : W({}, Ht), Gt = B(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? G(e.HTML_INTEGRATION_POINTS) : W({}, Wt);
3867
- let t = B(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? G(e.CUSTOM_ELEMENT_HANDLING) : Re(null);
3868
- if (N = Re(null), B(t, "tagNameCheck") && Yt(t.tagNameCheck) && (N.tagNameCheck = t.tagNameCheck), B(t, "attributeNameCheck") && Yt(t.attributeNameCheck) && (N.attributeNameCheck = t.attributeNameCheck), B(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), z(N), Se && (be = !1), Oe && (De = !0), Ie && (j = W({}, gt), M = Re(null), Ie.html === !0 && (W(j, ut), W(M, _t)), Ie.svg === !0 && (W(j, dt), W(M, vt), W(M, bt)), Ie.svgFilters === !0 && (W(j, ft), W(M, vt), W(M, bt)), Ie.mathMl === !0 && (W(j, mt), W(M, yt), W(M, bt))), P.tagCheck = null, P.attributeCheck = null, B(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? P.tagCheck = e.ADD_TAGS : qe(e.ADD_TAGS) && (j === he && (j = G(j)), W(j, e.ADD_TAGS, q))), B(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? P.attributeCheck = e.ADD_ATTR : qe(e.ADD_ATTR) && (M === ge && (M = G(M)), W(M, e.ADD_ATTR, q))), B(e, "ADD_URI_SAFE_ATTR") && qe(e.ADD_URI_SAFE_ATTR) && W(et, e.ADD_URI_SAFE_ATTR, q), B(e, "FORBID_CONTENTS") && qe(e.FORBID_CONTENTS) && (Le === ze && (Le = G(Le)), W(Le, e.FORBID_CONTENTS, q)), B(e, "ADD_FORBID_CONTENTS") && qe(e.ADD_FORBID_CONTENTS) && (Le === ze && (Le = G(Le)), W(Le, e.ADD_FORBID_CONTENTS, q)), Pe && (j["#text"] = !0), I && W(j, [
3862
+ if (q && q === e) return;
3863
+ (!e || typeof e != "object") && (e = {}), e = H(e), G = Jt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, K = G === "application/xhtml+xml" ? Qe : Ze, E = Bt(e, "ALLOWED_TAGS", be, { transform: K }), D = Bt(e, "ALLOWED_ATTR", xe, { transform: K }), lt = Bt(e, "ALLOWED_NAMESPACES", Ht, { transform: Qe }), rt = Bt(e, "ADD_URI_SAFE_ATTR", it, {
3864
+ transform: K,
3865
+ base: it
3866
+ }), Ue = Bt(e, "ADD_DATA_URI_TAGS", We, {
3867
+ transform: K,
3868
+ base: We
3869
+ }), P = Bt(e, "FORBID_CONTENTS", He, { transform: K }), Se = Bt(e, "FORBID_TAGS", H({}), { transform: K }), Ce = Bt(e, "FORBID_ATTR", H({}), { transform: K }), Be = L(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? H(e.USE_PROFILES) : e.USE_PROFILES : !1, we = e.ALLOW_ARIA_ATTR !== !1, Te = e.ALLOW_DATA_ATTR !== !1, A = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = e.SAFE_FOR_TEMPLATES || !1, Oe = e.SAFE_FOR_XML !== !1, j = e.WHOLE_DOCUMENT || !1, je = e.RETURN_DOM || !1, Me = e.RETURN_DOM_FRAGMENT || !1, Ne = e.RETURN_TRUSTED_TYPE || !1, N = e.FORCE_BODY || !1, Pe = e.SANITIZE_DOM !== !1, Fe = e.SANITIZE_NAMED_PROPS || !1, Re = e.KEEP_CONTENT !== !1, ze = e.IN_PLACE || !1, ye = dt(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ot, B = typeof e.NAMESPACE == "string" ? e.NAMESPACE : R, Wt = L(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? H(e.MATHML_TEXT_INTEGRATION_POINTS) : V({}, Ut), Kt = L(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? H(e.HTML_INTEGRATION_POINTS) : V({}, Gt);
3870
+ let t = L(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? H(e.CUSTOM_ELEMENT_HANDLING) : Ve(null);
3871
+ if (O = Ve(null), L(t, "tagNameCheck") && Xt(t.tagNameCheck) && (O.tagNameCheck = t.tagNameCheck), L(t, "attributeNameCheck") && Xt(t.attributeNameCheck) && (O.attributeNameCheck = t.attributeNameCheck), L(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), I(O), De && (Te = !1), Me && (je = !0), Be && (E = V({}, vt), D = Ve(null), Be.html === !0 && (V(E, ft), V(D, yt)), Be.svg === !0 && (V(E, pt), V(D, bt), V(D, St)), Be.svgFilters === !0 && (V(E, mt), V(D, bt), V(D, St)), Be.mathMl === !0 && (V(E, gt), V(D, xt), V(D, St))), k.tagCheck = null, k.attributeCheck = null, L(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? k.tagCheck = e.ADD_TAGS : Xe(e.ADD_TAGS) && (E === be && (E = H(E)), V(E, e.ADD_TAGS, K))), L(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? k.attributeCheck = e.ADD_ATTR : Xe(e.ADD_ATTR) && (D === xe && (D = H(D)), V(D, e.ADD_ATTR, K))), L(e, "ADD_URI_SAFE_ATTR") && Xe(e.ADD_URI_SAFE_ATTR) && V(rt, e.ADD_URI_SAFE_ATTR, K), L(e, "FORBID_CONTENTS") && Xe(e.FORBID_CONTENTS) && (P === He && (P = H(P)), V(P, e.FORBID_CONTENTS, K)), L(e, "ADD_FORBID_CONTENTS") && Xe(e.ADD_FORBID_CONTENTS) && (P === He && (P = H(P)), V(P, e.ADD_FORBID_CONTENTS, K)), Re && (E["#text"] = !0), j && V(E, [
3869
3872
  "html",
3870
3873
  "head",
3871
3874
  "body"
3872
- ]), j.table && (W(j, ["tbody"]), delete _e.tbody), e.TRUSTED_TYPES_POLICY) {
3873
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw it("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
3874
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw it("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
3875
- let t = b;
3876
- b = e.TRUSTED_TYPES_POLICY;
3875
+ ]), E.table && (V(E, ["tbody"]), delete Se.tbody), e.TRUSTED_TYPES_POLICY) {
3876
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw st("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
3877
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw st("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
3878
+ let t = x;
3879
+ x = e.TRUSTED_TYPES_POLICY;
3877
3880
  try {
3878
- x = ae("");
3881
+ S = w("");
3879
3882
  } catch (e) {
3880
- throw b = t, e;
3883
+ throw x = t, e;
3881
3884
  }
3882
- } else e.TRUSTED_TYPES_POLICY === null ? (b = void 0, x = "") : (b === void 0 && (b = se()), b && typeof x == "string" && (x = ae("")));
3883
- R && R(e), J = e;
3884
- }, Zt = W({}, [
3885
- ...dt,
3886
- ...ft,
3887
- ...pt
3888
- ]), Qt = W({}, [...mt, ...ht]), $t = function(e, t, n) {
3889
- return t.namespaceURI === V ? e === "svg" : t.namespaceURI === nt ? e === "svg" && (n === "annotation-xml" || Ut[n]) : !!Zt[e];
3890
- }, en = function(e, t, n) {
3891
- return t.namespaceURI === V ? e === "math" : t.namespaceURI === rt ? e === "math" && Gt[n] : !!Qt[e];
3892
- }, Y = function(e, t, n) {
3893
- return t.namespaceURI === rt && !Gt[n] || t.namespaceURI === nt && !Ut[n] ? !1 : !Qt[e] && (Kt[e] || !Zt[e]);
3894
- }, tn = function(e) {
3885
+ } else e.TRUSTED_TYPES_POLICY === null ? (x = void 0, S = "") : (x === void 0 && (x = ie()), x && typeof S == "string" && (S = w("")));
3886
+ F && F(e), q = e;
3887
+ }, Qt = V({}, [
3888
+ ...pt,
3889
+ ...mt,
3890
+ ...ht
3891
+ ]), $t = V({}, [...gt, ..._t]), en = function(e, t, n) {
3892
+ return t.namespaceURI === R ? e === "svg" : t.namespaceURI === at ? e === "svg" && (n === "annotation-xml" || Wt[n]) : !!Qt[e];
3893
+ }, tn = function(e, t, n) {
3894
+ return t.namespaceURI === R ? e === "math" : t.namespaceURI === ot ? e === "math" && Kt[n] : !!$t[e];
3895
+ }, J = function(e, t, n) {
3896
+ return t.namespaceURI === ot && !Kt[n] || t.namespaceURI === at && !Wt[n] ? !1 : !$t[e] && (qt[e] || !Qt[e]);
3897
+ }, nn = function(e) {
3895
3898
  let t = g(e);
3896
3899
  (!t || !t.tagName) && (t = {
3897
- namespaceURI: U,
3900
+ namespaceURI: B,
3898
3901
  tagName: "template"
3899
3902
  });
3900
- let n = Je(e.tagName), r = Je(t.tagName);
3901
- return ot[e.namespaceURI] ? e.namespaceURI === rt ? $t(n, t, r) : e.namespaceURI === nt ? en(n, t, r) : e.namespaceURI === V ? Y(n, t, r) : !!(K === "application/xhtml+xml" && ot[e.namespaceURI]) : !1;
3902
- }, X = function(e) {
3903
- Ge(t.removed, { element: e });
3903
+ let n = Ze(e.tagName), r = Ze(t.tagName);
3904
+ return lt[e.namespaceURI] ? e.namespaceURI === ot ? en(n, t, r) : e.namespaceURI === at ? tn(n, t, r) : e.namespaceURI === R ? J(n, t, r) : !!(G === "application/xhtml+xml" && lt[e.namespaceURI]) : !1;
3905
+ }, Y = function(e) {
3906
+ Je(t.removed, { element: e });
3904
3907
  try {
3905
3908
  g(e).removeChild(e);
3906
3909
  } catch {
3907
- if (p(e), !g(e)) throw it("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
3910
+ if (p(e), !g(e)) throw st("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
3908
3911
  }
3909
- }, nn = function(e) {
3912
+ }, rn = function(e) {
3910
3913
  let t = h(e);
3911
3914
  if (t) {
3912
3915
  let e = [];
3913
- He(t, (t) => {
3914
- Ge(e, t);
3915
- }), He(e, (e) => {
3916
+ Ge(t, (t) => {
3917
+ Je(e, t);
3918
+ }), Ge(e, (e) => {
3916
3919
  try {
3917
3920
  p(e);
3918
3921
  } catch {}
3919
3922
  });
3920
3923
  }
3921
- let n = ee(e);
3924
+ let n = v(e);
3922
3925
  if (n) for (let t = n.length - 1; t >= 0; --t) {
3923
3926
  let r = n[t], i = r && r.name;
3924
3927
  if (typeof i == "string") try {
3925
3928
  e.removeAttribute(i);
3926
3929
  } catch {}
3927
3930
  }
3928
- }, Z = function(e, n) {
3931
+ }, X = function(e, n) {
3929
3932
  try {
3930
- Ge(t.removed, {
3933
+ Je(t.removed, {
3931
3934
  attribute: n.getAttributeNode(e),
3932
3935
  from: n
3933
3936
  });
3934
3937
  } catch {
3935
- Ge(t.removed, {
3938
+ Je(t.removed, {
3936
3939
  attribute: null,
3937
3940
  from: n
3938
3941
  });
3939
3942
  }
3940
- if (n.removeAttribute(e), e === "is") if (De || Oe) try {
3941
- X(n);
3943
+ if (n.removeAttribute(e), e === "is") if (je || Me) try {
3944
+ Y(n);
3942
3945
  } catch {}
3943
3946
  else try {
3944
3947
  n.setAttribute(e, "");
3945
3948
  } catch {}
3946
- }, rn = function(e) {
3947
- let t = ee(e);
3949
+ }, an = function(e) {
3950
+ let t = v(e);
3948
3951
  if (t) for (let n = t.length - 1; n >= 0; --n) {
3949
3952
  let r = t[n], i = r && r.name;
3950
- if (!(typeof i != "string" || M[q(i)])) try {
3953
+ if (!(typeof i != "string" || D[K(i)])) try {
3951
3954
  e.removeAttribute(i);
3952
3955
  } catch {}
3953
3956
  }
3954
- }, an = function(e) {
3957
+ }, on = function(e) {
3955
3958
  let t = [e];
3956
3959
  for (; t.length > 0;) {
3957
3960
  let e = t.pop();
3958
- (v ? v(e) : e.nodeType) === Ft.element && rn(e);
3961
+ (y ? y(e) : e.nodeType) === W.element && an(e);
3959
3962
  let n = h(e);
3960
3963
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
3961
3964
  }
3962
- }, on = function(e) {
3965
+ }, sn = function(e) {
3963
3966
  let t = null, r = null;
3964
- if (L) e = "<remove></remove>" + e;
3967
+ if (N) e = "<remove></remove>" + e;
3965
3968
  else {
3966
- let t = Xe(e, /^[\r\n\t ]+/);
3969
+ let t = $e(e, /^[\r\n\t ]+/);
3967
3970
  r = t && t[0];
3968
3971
  }
3969
- K === "application/xhtml+xml" && U === V && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3970
- let i = b ? ae(e) : e;
3971
- if (U === V) try {
3972
- t = new l().parseFromString(i, K);
3972
+ G === "application/xhtml+xml" && B === R && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3973
+ let i = x ? w(e) : e;
3974
+ if (B === R) try {
3975
+ t = new l().parseFromString(i, G);
3973
3976
  } catch {}
3974
3977
  if (!t || !t.documentElement) {
3975
- t = le.createDocument(U, "template", null);
3978
+ t = oe.createDocument(B, "template", null);
3976
3979
  try {
3977
- t.documentElement.innerHTML = at ? x : i;
3980
+ t.documentElement.innerHTML = ct ? S : i;
3978
3981
  } catch {}
3979
3982
  }
3980
3983
  let a = t.body || t.documentElement;
3981
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), U === V ? C.call(t, I ? "html" : "body")[0] : I ? t.documentElement : a;
3982
- }, sn = function(e) {
3983
- return ue.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3984
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), B === R ? le.call(t, j ? "html" : "body")[0] : j ? t.documentElement : a;
3984
3985
  }, cn = function(e) {
3985
- return e = Ze(e, E, " "), e = Ze(e, D, " "), e = Ze(e, de, " "), e;
3986
+ return se.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3986
3987
  }, ln = function(e) {
3988
+ return e = et(e, de, " "), e = et(e, fe, " "), e = et(e, pe, " "), e;
3989
+ }, un = function(e) {
3987
3990
  e.normalize();
3988
- let t = ue.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
3989
- for (; n;) n.data = cn(n.data), n = t.nextNode();
3991
+ let t = se.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
3992
+ for (; n;) n.data = ln(n.data), n = t.nextNode();
3990
3993
  let r = e.querySelectorAll?.call(e, "template");
3991
- r && He(r, (e) => {
3992
- dn(e.content) && ln(e.content);
3994
+ r && Ge(r, (e) => {
3995
+ fn(e.content) && un(e.content);
3993
3996
  });
3994
- }, un = function(e) {
3995
- let t = y ? y(e) : null;
3996
- return typeof t != "string" || q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ee(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== v(e) || e.childNodes !== h(e);
3997
3997
  }, dn = function(e) {
3998
- if (!v || typeof e != "object" || !e) return !1;
3998
+ let t = b ? b(e) : null;
3999
+ return typeof t != "string" || K(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== v(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== y(e) || e.childNodes !== h(e);
4000
+ }, fn = function(e) {
4001
+ if (!y || typeof e != "object" || !e) return !1;
3999
4002
  try {
4000
- return v(e) === Ft.documentFragment;
4003
+ return y(e) === W.documentFragment;
4001
4004
  } catch {
4002
4005
  return !1;
4003
4006
  }
4004
- }, Q = function(e) {
4005
- if (!v || typeof e != "object" || !e) return !1;
4007
+ }, Z = function(e) {
4008
+ if (!y || typeof e != "object" || !e) return !1;
4006
4009
  try {
4007
- return typeof v(e) == "number";
4010
+ return typeof y(e) == "number";
4008
4011
  } catch {
4009
4012
  return !1;
4010
4013
  }
4011
4014
  };
4012
- function fn(e, n, r) {
4013
- e.length !== 0 && He(e, (e) => {
4014
- e.call(t, n, r, J);
4015
+ function Q(e, n, r) {
4016
+ e.length !== 0 && Ge(e, (e) => {
4017
+ e.call(t, n, r, q);
4015
4018
  });
4016
4019
  }
4017
4020
  let $ = function(e, t) {
4018
- return !!(Ce && e.hasChildNodes() && !Q(e.firstElementChild) && H(jt, e.textContent) && H(jt, e.innerHTML) || Ce && e.namespaceURI === V && t === "style" && Q(e.firstElementChild) || e.nodeType === Ft.processingInstruction || Ce && e.nodeType === Ft.comment && H(Mt, e.data));
4021
+ return !!(Oe && e.hasChildNodes() && !Z(e.firstElementChild) && z(Nt, e.textContent) && z(Nt, e.innerHTML) || Oe && e.namespaceURI === R && t === "style" && Z(e.firstElementChild) || e.nodeType === W.processingInstruction || Oe && e.nodeType === W.comment && z(Pt, e.data));
4019
4022
  }, pn = function(e, t) {
4020
- if (!_e[t] && _n(t) && (N.tagNameCheck instanceof RegExp && H(N.tagNameCheck, t) || N.tagNameCheck instanceof Function && N.tagNameCheck(t))) return !1;
4021
- if (Pe && !Le[t]) {
4023
+ if (!Se[t] && _n(t) && (O.tagNameCheck instanceof RegExp && z(O.tagNameCheck, t) || O.tagNameCheck instanceof Function && O.tagNameCheck(t))) return !1;
4024
+ if (Re && !P[t]) {
4022
4025
  let t = g(e), n = h(e);
4023
4026
  if (n && t) {
4024
4027
  let r = n.length;
4025
4028
  for (let i = r - 1; i >= 0; --i) {
4026
- let r = Fe ? n[i] : f(n[i], !0);
4029
+ let r = ze ? n[i] : f(n[i], !0);
4027
4030
  t.insertBefore(r, m(e));
4028
4031
  }
4029
4032
  }
4030
4033
  }
4031
- return X(e), !0;
4034
+ return Y(e), !0;
4032
4035
  }, mn = function(e) {
4033
- if (fn(T.beforeSanitizeElements, e, null), un(e)) return X(e), !0;
4034
- let n = q(y ? y(e) : e.nodeName);
4035
- if (fn(T.uponSanitizeElement, e, {
4036
+ if (Q(T.beforeSanitizeElements, e, null), dn(e)) return Y(e), !0;
4037
+ let n = K(b ? b(e) : e.nodeName);
4038
+ if (Q(T.uponSanitizeElement, e, {
4036
4039
  tagName: n,
4037
- allowedTags: j
4038
- }), $(e, n)) return X(e), !0;
4039
- if (_e[n] || !(P.tagCheck instanceof Function && P.tagCheck(n)) && !j[n]) return pn(e, n);
4040
- if ((v ? v(e) : e.nodeType) === Ft.element && !tn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && H(Nt, e.innerHTML)) return X(e), !0;
4041
- if (Se && e.nodeType === Ft.text) {
4042
- let n = cn(e.textContent);
4043
- e.textContent !== n && (Ge(t.removed, { element: e.cloneNode() }), e.textContent = n);
4044
- }
4045
- return fn(T.afterSanitizeElements, e, null), !1;
4040
+ allowedTags: E
4041
+ }), $(e, n)) return Y(e), !0;
4042
+ if (Se[n] || !(k.tagCheck instanceof Function && k.tagCheck(n)) && !E[n]) return pn(e, n);
4043
+ if ((y ? y(e) : e.nodeType) === W.element && !nn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && z(Ft, e.innerHTML)) return Y(e), !0;
4044
+ if (De && e.nodeType === W.text) {
4045
+ let n = ln(e.textContent);
4046
+ e.textContent !== n && (Je(t.removed, { element: e.cloneNode() }), e.textContent = n);
4047
+ }
4048
+ return Q(T.afterSanitizeElements, e, null), !1;
4046
4049
  }, hn = function(e, t, r) {
4047
- if (ve[t] || Ae && (t === "id" || t === "name") && (r in n || r in Jt)) return !1;
4048
- let i = M[t] || P.attributeCheck instanceof Function && P.attributeCheck(t, e);
4049
- if (!(be && H(O, t)) && !(ye && H(k, t))) {
4050
+ if (Ce[t] || Pe && (t === "id" || t === "name") && (r in n || r in Yt)) return !1;
4051
+ let i = D[t] || k.attributeCheck instanceof Function && k.attributeCheck(t, e);
4052
+ if (!(Te && z(me, t)) && !(we && z(he, t))) {
4050
4053
  if (!i) {
4051
- if (!(_n(e) && (N.tagNameCheck instanceof RegExp && H(N.tagNameCheck, e) || N.tagNameCheck instanceof Function && N.tagNameCheck(e)) && (N.attributeNameCheck instanceof RegExp && H(N.attributeNameCheck, t) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(t, e)) || t === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && H(N.tagNameCheck, r) || N.tagNameCheck instanceof Function && N.tagNameCheck(r)))) return !1;
4052
- } else if (!et[t] && !H(me, Ze(r, A, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Qe(r, "data:") === 0 && Be[e]) && !(F && !H(fe, Ze(r, A, ""))) && r) return !1;
4054
+ if (!(_n(e) && (O.tagNameCheck instanceof RegExp && z(O.tagNameCheck, e) || O.tagNameCheck instanceof Function && O.tagNameCheck(e)) && (O.attributeNameCheck instanceof RegExp && z(O.attributeNameCheck, t) || O.attributeNameCheck instanceof Function && O.attributeNameCheck(t, e)) || t === "is" && O.allowCustomizedBuiltInElements && (O.tagNameCheck instanceof RegExp && z(O.tagNameCheck, r) || O.tagNameCheck instanceof Function && O.tagNameCheck(r)))) return !1;
4055
+ } else if (!rt[t] && !z(ye, et(r, _e, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && tt(r, "data:") === 0 && Ue[e]) && !(A && !z(ge, et(r, _e, ""))) && r) return !1;
4053
4056
  }
4054
4057
  return !0;
4055
- }, gn = W({}, [
4058
+ }, gn = V({}, [
4056
4059
  "annotation-xml",
4057
4060
  "color-profile",
4058
4061
  "font-face",
@@ -4062,64 +4065,64 @@ function Bt() {
4062
4065
  "font-face-uri",
4063
4066
  "missing-glyph"
4064
4067
  ]), _n = function(e) {
4065
- return !gn[Je(e)] && H(pe, e);
4068
+ return !gn[Ze(e)] && z(ve, e);
4066
4069
  }, vn = function(e, t, n, r) {
4067
- if (b && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
4068
- case "TrustedHTML": return ae(r);
4069
- case "TrustedScriptURL": return oe(r);
4070
+ if (x && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
4071
+ case "TrustedHTML": return w(r);
4072
+ case "TrustedScriptURL": return re(r);
4070
4073
  }
4071
4074
  return r;
4072
4075
  }, yn = function(e, n, r, i) {
4073
4076
  try {
4074
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), un(e) ? X(e) : We(t.removed);
4077
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), dn(e) ? Y(e) : qe(t.removed);
4075
4078
  } catch {
4076
- Z(n, e);
4079
+ X(n, e);
4077
4080
  }
4078
4081
  }, bn = function(e) {
4079
- fn(T.beforeSanitizeAttributes, e, null);
4082
+ Q(T.beforeSanitizeAttributes, e, null);
4080
4083
  let t = e.attributes;
4081
- if (!t || un(e)) return;
4084
+ if (!t || dn(e)) return;
4082
4085
  let n = {
4083
4086
  attrName: "",
4084
4087
  attrValue: "",
4085
4088
  keepAttr: !0,
4086
- allowedAttributes: M,
4089
+ allowedAttributes: D,
4087
4090
  forceKeepAttr: void 0
4088
- }, r = t.length, i = q(e.nodeName);
4091
+ }, r = t.length, i = K(e.nodeName);
4089
4092
  for (; r--;) {
4090
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = q(o), u = c, d = o === "value" ? u : $e(u);
4091
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, fn(T.uponSanitizeAttribute, e, n), d = n.attrValue, je && (l === "id" || l === "name") && Qe(d, Me) !== 0 && (Z(o, e), d = Me + d), Ce && H(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
4092
- Z(o, e);
4093
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = K(o), u = c, d = o === "value" ? u : nt(u);
4094
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, Q(T.uponSanitizeAttribute, e, n), d = n.attrValue, Fe && (l === "id" || l === "name") && tt(d, Ie) !== 0 && (X(o, e), d = Ie + d), Oe && z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
4095
+ X(o, e);
4093
4096
  continue;
4094
4097
  }
4095
- if (l === "attributename" && Xe(d, "href")) {
4096
- Z(o, e);
4098
+ if (l === "attributename" && $e(d, "href")) {
4099
+ X(o, e);
4097
4100
  continue;
4098
4101
  }
4099
4102
  if (!n.forceKeepAttr) {
4100
4103
  if (!n.keepAttr) {
4101
- Z(o, e);
4104
+ X(o, e);
4102
4105
  continue;
4103
4106
  }
4104
- if (!xe && H(Pt, d)) {
4105
- Z(o, e);
4107
+ if (!Ee && z(It, d)) {
4108
+ X(o, e);
4106
4109
  continue;
4107
4110
  }
4108
- if (Se && (d = cn(d)), !hn(i, l, d)) {
4109
- Z(o, e);
4111
+ if (De && (d = ln(d)), !hn(i, l, d)) {
4112
+ X(o, e);
4110
4113
  continue;
4111
4114
  }
4112
4115
  d = vn(i, l, s, d), d !== u && yn(e, o, s, d);
4113
4116
  }
4114
4117
  }
4115
- fn(T.afterSanitizeAttributes, e, null);
4118
+ Q(T.afterSanitizeAttributes, e, null);
4116
4119
  }, xn = function(e) {
4117
- let t = null, n = sn(e);
4118
- for (fn(T.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (fn(T.uponSanitizeShadowNode, t, null), mn(t), bn(t), dn(t.content) && xn(t.content), (v ? v(t) : t.nodeType) === Ft.element) {
4120
+ let t = null, n = cn(e);
4121
+ for (Q(T.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Q(T.uponSanitizeShadowNode, t, null), mn(t), bn(t), fn(t.content) && xn(t.content), (y ? y(t) : t.nodeType) === W.element) {
4119
4122
  let e = _(t);
4120
- dn(e) && (Sn(e), xn(e));
4123
+ fn(e) && (Sn(e), xn(e));
4121
4124
  }
4122
- fn(T.afterSanitizeShadowDOM, e, null);
4125
+ Q(T.afterSanitizeShadowDOM, e, null);
4123
4126
  }, Sn = function(e) {
4124
4127
  let t = [{
4125
4128
  node: e,
@@ -4131,16 +4134,16 @@ function Bt() {
4131
4134
  xn(e.shadow);
4132
4135
  continue;
4133
4136
  }
4134
- let n = e.node, r = (v ? v(n) : n.nodeType) === Ft.element, i = h(n);
4137
+ let n = e.node, r = (y ? y(n) : n.nodeType) === W.element, i = h(n);
4135
4138
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
4136
4139
  node: i[e],
4137
4140
  shadow: null
4138
4141
  });
4139
4142
  if (r) {
4140
- let e = y ? y(n) : null;
4141
- if (typeof e == "string" && q(e) === "template") {
4143
+ let e = b ? b(n) : null;
4144
+ if (typeof e == "string" && K(e) === "template") {
4142
4145
  let e = n.content;
4143
- dn(e) && t.push({
4146
+ fn(e) && t.push({
4144
4147
  node: e,
4145
4148
  shadow: null
4146
4149
  });
@@ -4148,7 +4151,7 @@ function Bt() {
4148
4151
  }
4149
4152
  if (r) {
4150
4153
  let e = _(n);
4151
- dn(e) && t.push({
4154
+ fn(e) && t.push({
4152
4155
  node: null,
4153
4156
  shadow: e
4154
4157
  }, {
@@ -4160,67 +4163,67 @@ function Bt() {
4160
4163
  };
4161
4164
  return t.sanitize = function(e) {
4162
4165
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
4163
- if (at = !e, at && (e = "<!-->"), typeof e != "string" && !Q(e) && (e = st(e), typeof e != "string")) throw it("dirty is not a string, aborting");
4166
+ if (ct = !e, ct && (e = "<!-->"), typeof e != "string" && !Z(e) && (e = ut(e), typeof e != "string")) throw st("dirty is not a string, aborting");
4164
4167
  if (!t.isSupported) return e;
4165
- we ? (j = Te, M = Ee) : Xt(n), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (j = G(j)), T.uponSanitizeAttribute.length > 0 && (M = G(M)), t.removed = [];
4166
- let c = Fe && typeof e != "string" && Q(e);
4168
+ M ? (E = ke, D = Ae) : Zt(n), (T.uponSanitizeElement.length > 0 || T.uponSanitizeAttribute.length > 0) && (E = H(E)), T.uponSanitizeAttribute.length > 0 && (D = H(D)), t.removed = [];
4169
+ let c = ze && typeof e != "string" && Z(e);
4167
4170
  if (c) {
4168
- let t = y ? y(e) : e.nodeName;
4171
+ let t = b ? b(e) : e.nodeName;
4169
4172
  if (typeof t == "string") {
4170
- let e = q(t);
4171
- if (!j[e] || _e[e]) throw it("root node is forbidden and cannot be sanitized in-place");
4173
+ let e = K(t);
4174
+ if (!E[e] || Se[e]) throw st("root node is forbidden and cannot be sanitized in-place");
4172
4175
  }
4173
- if (un(e)) throw it("root node is clobbered and cannot be sanitized in-place");
4176
+ if (dn(e)) throw st("root node is clobbered and cannot be sanitized in-place");
4174
4177
  try {
4175
4178
  Sn(e);
4176
4179
  } catch (t) {
4177
- throw nn(e), t;
4180
+ throw rn(e), t;
4178
4181
  }
4179
- } else if (Q(e)) i = on("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === Ft.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Sn(a);
4182
+ } else if (Z(e)) i = sn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === W.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Sn(a);
4180
4183
  else {
4181
- if (!De && !Se && !I && e.indexOf("<") === -1) return b && ke ? ae(e) : e;
4182
- if (i = on(e), !i) return De ? null : ke ? x : "";
4184
+ if (!je && !De && !j && e.indexOf("<") === -1) return x && Ne ? w(e) : e;
4185
+ if (i = sn(e), !i) return je ? null : Ne ? S : "";
4183
4186
  }
4184
- i && L && X(i.firstChild);
4185
- let l = sn(c ? e : i);
4187
+ i && N && Y(i.firstChild);
4188
+ let l = cn(c ? e : i);
4186
4189
  try {
4187
- for (; o = l.nextNode();) mn(o), bn(o), dn(o.content) && xn(o.content);
4190
+ for (; o = l.nextNode();) mn(o), bn(o), fn(o.content) && xn(o.content);
4188
4191
  } catch (t) {
4189
- throw c && nn(e), t;
4192
+ throw c && rn(e), t;
4190
4193
  }
4191
- if (c) return He(t.removed, (e) => {
4192
- e.element && an(e.element);
4193
- }), Se && ln(e), e;
4194
- if (De) {
4195
- if (Se && ln(i), Oe) for (s = S.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
4194
+ if (c) return Ge(t.removed, (e) => {
4195
+ e.element && on(e.element);
4196
+ }), De && un(e), e;
4197
+ if (je) {
4198
+ if (De && un(i), Me) for (s = ce.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
4196
4199
  else s = i;
4197
- return (M.shadowroot || M.shadowrootmode) && (s = w.call(r, s, !0)), s;
4200
+ return (D.shadowroot || D.shadowrootmode) && (s = ue.call(r, s, !0)), s;
4198
4201
  }
4199
- let u = I ? i.outerHTML : i.innerHTML;
4200
- return I && j["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && H(kt, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), Se && (u = cn(u)), b && ke ? ae(u) : u;
4202
+ let u = j ? i.outerHTML : i.innerHTML;
4203
+ return j && E["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && z(jt, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), De && (u = ln(u)), x && Ne ? w(u) : u;
4201
4204
  }, t.setConfig = function() {
4202
- Xt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), we = !0, Te = j, Ee = M;
4205
+ Zt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), M = !0, ke = E, Ae = D;
4203
4206
  }, t.clearConfig = function() {
4204
- J = null, we = !1, Te = null, Ee = null, b = te, x = "";
4207
+ q = null, M = !1, ke = null, Ae = null, x = C, S = "";
4205
4208
  }, t.isValidAttribute = function(e, t, n) {
4206
- return J || Xt({}), hn(q(e), q(t), n);
4209
+ return q || Zt({}), hn(K(e), K(t), n);
4207
4210
  }, t.addHook = function(e, t) {
4208
- typeof t == "function" && B(T, e) && Ge(T[e], t);
4211
+ typeof t == "function" && L(T, e) && Je(T[e], t);
4209
4212
  }, t.removeHook = function(e, t) {
4210
- if (B(T, e)) {
4213
+ if (L(T, e)) {
4211
4214
  if (t !== void 0) {
4212
- let n = Ue(T[e], t);
4213
- return n === -1 ? void 0 : Ke(T[e], n, 1)[0];
4215
+ let n = Ke(T[e], t);
4216
+ return n === -1 ? void 0 : Ye(T[e], n, 1)[0];
4214
4217
  }
4215
- return We(T[e]);
4218
+ return qe(T[e]);
4216
4219
  }
4217
4220
  }, t.removeHooks = function(e) {
4218
- B(T, e) && (T[e] = []);
4221
+ L(T, e) && (T[e] = []);
4219
4222
  }, t.removeAllHooks = function() {
4220
- T = Rt();
4223
+ T = zt();
4221
4224
  }, t;
4222
4225
  }
4223
- var Vt = Bt(), Ht = /* @__PURE__ */ "a.b.strong.i.em.u.s.p.br.span.div.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tfoot.tr.td.th.blockquote.code.pre.hr.img.sub.sup.small".split("."), Ut = [
4226
+ var Ht = Vt(), Ut = /* @__PURE__ */ "a.b.strong.i.em.u.s.p.br.span.div.ul.ol.li.h1.h2.h3.h4.h5.h6.table.thead.tbody.tfoot.tr.td.th.blockquote.code.pre.hr.img.sub.sup.small".split("."), Wt = [
4224
4227
  "href",
4225
4228
  "title",
4226
4229
  "src",
@@ -4228,10 +4231,10 @@ var Vt = Bt(), Ht = /* @__PURE__ */ "a.b.strong.i.em.u.s.p.br.span.div.ul.ol.li.
4228
4231
  "width",
4229
4232
  "height"
4230
4233
  ];
4231
- function Wt(e) {
4232
- let t = Vt.sanitize(e, {
4233
- ALLOWED_TAGS: Ht,
4234
- ALLOWED_ATTR: Ut,
4234
+ function Gt(e) {
4235
+ let t = Ht.sanitize(e, {
4236
+ ALLOWED_TAGS: Ut,
4237
+ ALLOWED_ATTR: Wt,
4235
4238
  ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
4236
4239
  }), n = new DOMParser().parseFromString(t, "text/html");
4237
4240
  return n.querySelectorAll("a[href]").forEach((e) => {
@@ -4240,12 +4243,12 @@ function Wt(e) {
4240
4243
  }
4241
4244
  //#endregion
4242
4245
  //#region src/components/webmapx-layer-info-dialog.ts
4243
- var Gt = /^https:\/\/\S+$/i, Kt = class extends S {
4246
+ var Kt = /^https:\/\/\S+$/i, qt = class extends g {
4244
4247
  constructor(...e) {
4245
4248
  super(...e), this.dialogTitle = "", this.attribution = "", this.featureSummary = "", this.content = { kind: "none" }, this.fetchToken = 0;
4246
4249
  }
4247
4250
  static {
4248
- this.styles = C`
4251
+ this.styles = u`
4249
4252
  :host { display: block; }
4250
4253
 
4251
4254
  sl-dialog::part(panel) {
@@ -4308,13 +4311,13 @@ var Gt = /^https:\/\/\S+$/i, Kt = class extends S {
4308
4311
  this.content = { kind: "none" };
4309
4312
  return;
4310
4313
  }
4311
- if (Gt.test(i)) {
4314
+ if (Kt.test(i)) {
4312
4315
  this.loadFromUrl(i);
4313
4316
  return;
4314
4317
  }
4315
4318
  this.content = {
4316
4319
  kind: "html",
4317
- html: Wt(i)
4320
+ html: Gt(i)
4318
4321
  };
4319
4322
  }
4320
4323
  close() {
@@ -4330,7 +4333,7 @@ var Gt = /^https:\/\/\S+$/i, Kt = class extends S {
4330
4333
  if (t !== this.fetchToken) return;
4331
4334
  this.content = {
4332
4335
  kind: "html",
4333
- html: Wt(r)
4336
+ html: Gt(r)
4334
4337
  };
4335
4338
  } catch {
4336
4339
  if (t !== this.fetchToken) return;
@@ -4342,22 +4345,22 @@ var Gt = /^https:\/\/\S+$/i, Kt = class extends S {
4342
4345
  }
4343
4346
  renderContent() {
4344
4347
  switch (this.content.kind) {
4345
- case "none": return this.featureSummary ? null : w`<p class="placeholder">No detailed layer information available.</p>`;
4346
- case "loading": return w`<div class="loading"><sl-spinner></sl-spinner> Loading layer information…</div>`;
4347
- case "error": return w`<p class="placeholder">${this.content.message}</p>`;
4348
- case "html": return w`<div class="abstract">${M(this.content.html)}</div>`;
4348
+ case "none": return this.featureSummary ? null : m`<p class="placeholder">No detailed layer information available.</p>`;
4349
+ case "loading": return m`<div class="loading"><sl-spinner></sl-spinner> Loading layer information…</div>`;
4350
+ case "error": return m`<p class="placeholder">${this.content.message}</p>`;
4351
+ case "html": return m`<div class="abstract">${me(this.content.html)}</div>`;
4349
4352
  }
4350
4353
  }
4351
4354
  render() {
4352
- return w`
4355
+ return m`
4353
4356
  <sl-dialog label=${this.dialogTitle}
4354
4357
  @sl-request-close=${(e) => {
4355
4358
  e.detail?.source === "overlay" && this.close();
4356
4359
  }}>
4357
4360
  ${this.renderContent()}
4358
- ${this.featureSummary || this.attribution ? w`<div class="layer-meta">
4359
- ${this.featureSummary ? w`<div class="feature-summary">${this.featureSummary}</div>` : null}
4360
- ${this.attribution ? w`<div class="attribution"><strong>Attribution:</strong> ${ie(this.attribution)}</div>` : null}
4361
+ ${this.featureSummary || this.attribution ? m`<div class="layer-meta">
4362
+ ${this.featureSummary ? m`<div class="feature-summary">${this.featureSummary}</div>` : null}
4363
+ ${this.attribution ? m`<div class="attribution"><strong>Attribution:</strong> ${he(this.attribution)}</div>` : null}
4361
4364
  </div>` : null}
4362
4365
  <div class="footer">
4363
4366
  <sl-button autofocus @click=${this.close}>Close</sl-button>
@@ -4366,15 +4369,15 @@ var Gt = /^https:\/\/\S+$/i, Kt = class extends S {
4366
4369
  `;
4367
4370
  }
4368
4371
  };
4369
- d([A()], Kt.prototype, "dialogTitle", void 0), d([A()], Kt.prototype, "attribution", void 0), d([A()], Kt.prototype, "featureSummary", void 0), d([A()], Kt.prototype, "content", void 0), d([k("sl-dialog")], Kt.prototype, "dialog", void 0), Kt = d([D("webmapx-layer-info-dialog")], Kt);
4372
+ S([d()], qt.prototype, "dialogTitle", void 0), S([d()], qt.prototype, "attribution", void 0), S([d()], qt.prototype, "featureSummary", void 0), S([d()], qt.prototype, "content", void 0), S([f("sl-dialog")], qt.prototype, "dialog", void 0), qt = S([p("webmapx-layer-info-dialog")], qt);
4370
4373
  //#endregion
4371
4374
  //#region src/components/webmapx-layer-style-dialog.ts
4372
- var K = class extends S {
4375
+ var G = class extends g {
4373
4376
  constructor(...e) {
4374
4377
  super(...e), this.dialogTitle = "Layer style", this.groups = [], this.analyses = {}, this.visibleAttributeTables = {};
4375
4378
  }
4376
4379
  static {
4377
- this.styles = C`
4380
+ this.styles = u`
4378
4381
  :host { display: block; }
4379
4382
 
4380
4383
  sl-dialog::part(panel) {
@@ -4709,13 +4712,13 @@ var K = class extends S {
4709
4712
  }
4710
4713
  renderValue(e) {
4711
4714
  let t = this.toValidUrl(e);
4712
- if (t) return w`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>`;
4715
+ if (t) return m`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>`;
4713
4716
  let n = this.formatValue(e);
4714
- return n === "" ? T : this.isDateTimeValue(e) ? w`<span class="no-wrap-value">${n}</span>` : n;
4717
+ return n === "" ? c : this.isDateTimeValue(e) ? m`<span class="no-wrap-value">${n}</span>` : n;
4715
4718
  }
4716
4719
  renderSampleValue(e) {
4717
4720
  let t = this.toValidUrl(e);
4718
- return t ? w`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>` : e;
4721
+ return t ? m`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>` : e;
4719
4722
  }
4720
4723
  toValidUrl(e) {
4721
4724
  if (typeof e != "string") return null;
@@ -4747,29 +4750,29 @@ var K = class extends S {
4747
4750
  }
4748
4751
  renderAnalysis(e) {
4749
4752
  let t = this.analyses[e.sourceId];
4750
- return t ? w`
4753
+ return t ? m`
4751
4754
  <div class="attribute-analysis">
4752
4755
  <div class="analysis-row"><span class="analysis-label">Type</span><span class="analysis-value">${t.type}</span></div>
4753
4756
  <div class="analysis-row"><span class="analysis-label">Values</span><span class="analysis-value">${t.presentCount} present, ${t.missingCount} missing</span></div>
4754
4757
  <div class="analysis-row"><span class="analysis-label">Unique</span><span class="analysis-value">${t.uniqueCount}</span></div>
4755
- ${t.rangeLabel ? w`<div class="analysis-row"><span class="analysis-label">Range</span><span class="analysis-value">${t.rangeLabel}</span></div>` : null}
4756
- ${t.sampleValues.length > 0 ? w`<div class="analysis-row">
4758
+ ${t.rangeLabel ? m`<div class="analysis-row"><span class="analysis-label">Range</span><span class="analysis-value">${t.rangeLabel}</span></div>` : null}
4759
+ ${t.sampleValues.length > 0 ? m`<div class="analysis-row">
4757
4760
  <span class="analysis-label">Sample</span>
4758
4761
  <span class="analysis-value">
4759
- ${t.sampleValues.map((e, t) => w`${t > 0 ? "; " : ""}${this.renderSampleValue(e)}`)}
4762
+ ${t.sampleValues.map((e, t) => m`${t > 0 ? "; " : ""}${this.renderSampleValue(e)}`)}
4760
4763
  </span>
4761
4764
  </div>` : null}
4762
4765
  </div>
4763
4766
  ` : null;
4764
4767
  }
4765
4768
  renderAttributeTable(e) {
4766
- return this.visibleAttributeTables[e.sourceId] ? e.featureRows.length === 0 ? w`<p class="placeholder">No loaded feature rows available.</p>` : w`
4769
+ return this.visibleAttributeTables[e.sourceId] ? e.featureRows.length === 0 ? m`<p class="placeholder">No loaded feature rows available.</p>` : m`
4767
4770
  <div class="attribute-table-wrap">
4768
4771
  <table class="attribute-table">
4769
4772
  <thead>
4770
4773
  <tr>
4771
4774
  <th>#</th>
4772
- ${e.attributes.map((t) => w`
4775
+ ${e.attributes.map((t) => m`
4773
4776
  <th class="attribute-heading">
4774
4777
  <button
4775
4778
  type="button"
@@ -4782,10 +4785,10 @@ var K = class extends S {
4782
4785
  </tr>
4783
4786
  </thead>
4784
4787
  <tbody>
4785
- ${e.featureRows.map((t, n) => w`
4788
+ ${e.featureRows.map((t, n) => m`
4786
4789
  <tr>
4787
4790
  <td class="feature-index-cell">${n + 1}</td>
4788
- ${e.attributes.map((e) => w`
4791
+ ${e.attributes.map((e) => m`
4789
4792
  <td class=${this.toValidUrl(t[e.name]) ? "feature-value-cell url-value-cell" : "feature-value-cell"}>
4790
4793
  ${this.renderValue(t[e.name])}
4791
4794
  </td>
@@ -4798,33 +4801,33 @@ var K = class extends S {
4798
4801
  ` : null;
4799
4802
  }
4800
4803
  render() {
4801
- return w`
4804
+ return m`
4802
4805
  <sl-dialog label=${this.dialogTitle}
4803
4806
  @sl-request-close=${(e) => {
4804
4807
  e.detail?.source === "overlay" && this.close();
4805
4808
  }}>
4806
- ${this.groups.length > 0 ? w`<div class="source-list">
4807
- ${this.groups.map((e) => w`
4809
+ ${this.groups.length > 0 ? m`<div class="source-list">
4810
+ ${this.groups.map((e) => m`
4808
4811
  <section class="source-group">
4809
4812
  <h3 class="source-title">${e.sourceId}</h3>
4810
4813
  <div class="source-meta">
4811
4814
  <span class="pill">${e.featureCountLabel}</span>
4812
- ${e.geometryTypes.map((e) => w`<span class="pill">${e}</span>`)}
4815
+ ${e.geometryTypes.map((e) => m`<span class="pill">${e}</span>`)}
4813
4816
  </div>
4814
4817
  <p class="subheading">Table</p>
4815
- ${e.attributes.length > 0 ? w`<div class="table-controls">
4818
+ ${e.attributes.length > 0 ? m`<div class="table-controls">
4816
4819
  <span class="table-hint">
4817
4820
  ${this.visibleAttributeTables[e.sourceId] ? "Click an attribute header to analyze it. Use the button to hide the table." : "Show the feature table. Click an attribute header to analyze it."}
4818
4821
  </span>
4819
4822
  <sl-button size="small" @click=${() => this.toggleAttributeTable(e.sourceId)}>
4820
4823
  ${this.visibleAttributeTables[e.sourceId] ? "Hide table" : "Table"}
4821
4824
  </sl-button>
4822
- </div>` : w`<p class="placeholder">No attributes found in loaded features.</p>`}
4825
+ </div>` : m`<p class="placeholder">No attributes found in loaded features.</p>`}
4823
4826
  ${this.renderAttributeTable(e)}
4824
4827
  ${this.renderAnalysis(e)}
4825
4828
  <p class="subheading">Layers</p>
4826
4829
  <div class="style-targets">
4827
- ${e.layers.map((e) => w`
4830
+ ${e.layers.map((e) => m`
4828
4831
  <div class="style-target">
4829
4832
  <sl-icon name="palette"></sl-icon>
4830
4833
  <span class="target-label">${e.id}</span>
@@ -4834,7 +4837,7 @@ var K = class extends S {
4834
4837
  </div>
4835
4838
  </section>
4836
4839
  `)}
4837
- </div>` : w`<p class="placeholder">No editable style source found.</p>`}
4840
+ </div>` : m`<p class="placeholder">No editable style source found.</p>`}
4838
4841
  <div class="footer">
4839
4842
  <sl-button autofocus @click=${this.close}>Close</sl-button>
4840
4843
  </div>
@@ -4842,18 +4845,18 @@ var K = class extends S {
4842
4845
  `;
4843
4846
  }
4844
4847
  };
4845
- d([A()], K.prototype, "dialogTitle", void 0), d([A()], K.prototype, "groups", void 0), d([A()], K.prototype, "analyses", void 0), d([A()], K.prototype, "visibleAttributeTables", void 0), d([k("sl-dialog")], K.prototype, "dialog", void 0), K = d([D("webmapx-layer-style-dialog")], K);
4848
+ S([d()], G.prototype, "dialogTitle", void 0), S([d()], G.prototype, "groups", void 0), S([d()], G.prototype, "analyses", void 0), S([d()], G.prototype, "visibleAttributeTables", void 0), S([f("sl-dialog")], G.prototype, "dialog", void 0), G = S([p("webmapx-layer-style-dialog")], G);
4846
4849
  //#endregion
4847
4850
  //#region src/components/webmapx-save-layers-dialog.ts
4848
- var qt, q = class extends S {
4851
+ var Jt, K = class extends g {
4849
4852
  static {
4850
- qt = this;
4853
+ Jt = this;
4851
4854
  }
4852
4855
  constructor(...e) {
4853
4856
  super(...e), this.items = [], this.filename = "map-layers", this.includeStyle = !0, this.zip = !0;
4854
4857
  }
4855
4858
  static {
4856
- this.styles = C`
4859
+ this.styles = u`
4857
4860
  :host { display: block; }
4858
4861
 
4859
4862
  sl-dialog::part(panel) {
@@ -4927,7 +4930,7 @@ var qt, q = class extends S {
4927
4930
  buildFileBases(e) {
4928
4931
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
4929
4932
  for (let r of e) {
4930
- let e = qt.sanitizeFileBase(r.layerId), i = e, a = 2;
4933
+ let e = Jt.sanitizeFileBase(r.layerId), i = e, a = 2;
4931
4934
  for (; n.has(i);) i = `${e}_${a++}`;
4932
4935
  n.add(i), t.set(r.layerId, i);
4933
4936
  }
@@ -4970,14 +4973,14 @@ var qt, q = class extends S {
4970
4973
  this.downloadBlob(new Blob([r], { type: "application/geo+json" }), `${t}.geojson`), this.close();
4971
4974
  return;
4972
4975
  }
4973
- let n = [...e].reverse(), r = this.buildFileBases(n), i = new ce(new se("application/zip"));
4976
+ let n = [...e].reverse(), r = this.buildFileBases(n), i = new ye(new ve("application/zip"));
4974
4977
  for (let e of n) {
4975
4978
  let t = typeof e.data == "string" ? e.data : JSON.stringify(e.data, null, 2);
4976
- await i.add(`${r.get(e.layerId)}.geojson`, new oe(t));
4979
+ await i.add(`${r.get(e.layerId)}.geojson`, new _e(t));
4977
4980
  }
4978
4981
  if (this.includeStyle) for (let e of n) {
4979
4982
  let t = this.buildStyleConfig(e, r.get(e.layerId));
4980
- await i.add(`${r.get(e.layerId)}_style.json`, new oe(JSON.stringify(t, null, 2)));
4983
+ await i.add(`${r.get(e.layerId)}_style.json`, new _e(JSON.stringify(t, null, 2)));
4981
4984
  }
4982
4985
  this.downloadBlob(await i.close(), `${t}.zip`), this.close();
4983
4986
  }
@@ -4987,13 +4990,13 @@ var qt, q = class extends S {
4987
4990
  }
4988
4991
  render() {
4989
4992
  let e = this.selectedItems.length, t = this.singleFileEligible;
4990
- return w`
4993
+ return m`
4991
4994
  <sl-dialog label="Save layer(s)"
4992
4995
  @sl-request-close=${(e) => {
4993
4996
  e.detail?.source === "overlay" && this.close();
4994
4997
  }}>
4995
4998
  <div class="layer-list">
4996
- ${this.items.map((e) => w`
4999
+ ${this.items.map((e) => m`
4997
5000
  <div class="layer-row">
4998
5001
  <sl-checkbox
4999
5002
  ?checked=${e.checked}
@@ -5001,7 +5004,7 @@ var qt, q = class extends S {
5001
5004
  @sl-change=${(t) => this.toggleItem(e.layerId, t.target.checked)}
5002
5005
  >
5003
5006
  ${e.label}
5004
- ${e.data === null ? w`<span class="unsupported">(no exportable data)</span>` : null}
5007
+ ${e.data === null ? m`<span class="unsupported">(no exportable data)</span>` : null}
5005
5008
  </sl-checkbox>
5006
5009
  </div>
5007
5010
  `)}
@@ -5020,7 +5023,7 @@ var qt, q = class extends S {
5020
5023
  }}>
5021
5024
  Include style
5022
5025
  </sl-checkbox>
5023
- ${t ? w`
5026
+ ${t ? m`
5024
5027
  <sl-checkbox ?checked=${this.zip}
5025
5028
  @sl-change=${(e) => {
5026
5029
  this.zip = e.target.checked;
@@ -5040,15 +5043,15 @@ var qt, q = class extends S {
5040
5043
  `;
5041
5044
  }
5042
5045
  };
5043
- d([A()], q.prototype, "items", void 0), d([A()], q.prototype, "filename", void 0), d([A()], q.prototype, "includeStyle", void 0), d([A()], q.prototype, "zip", void 0), d([k("sl-dialog")], q.prototype, "dialog", void 0), d([k(".filename-input")], q.prototype, "filenameInput", void 0), q = qt = d([D("webmapx-save-layers-dialog")], q);
5046
+ S([d()], K.prototype, "items", void 0), S([d()], K.prototype, "filename", void 0), S([d()], K.prototype, "includeStyle", void 0), S([d()], K.prototype, "zip", void 0), S([f("sl-dialog")], K.prototype, "dialog", void 0), S([f(".filename-input")], K.prototype, "filenameInput", void 0), K = Jt = S([p("webmapx-save-layers-dialog")], K);
5044
5047
  //#endregion
5045
5048
  //#region src/components/webmapx-permalink-dialog.ts
5046
- var J = class extends S {
5049
+ var q = class extends g {
5047
5050
  constructor(...e) {
5048
5051
  super(...e), this.url = "", this.hasConfig = !1, this.dynamicLayerIds = [], this.copied = !1;
5049
5052
  }
5050
5053
  static {
5051
- this.styles = C`
5054
+ this.styles = u`
5052
5055
  :host { display: block; }
5053
5056
 
5054
5057
  sl-dialog::part(panel) {
@@ -5097,9 +5100,9 @@ var J = class extends S {
5097
5100
  }, 2e3);
5098
5101
  }
5099
5102
  render() {
5100
- return w`
5103
+ return m`
5101
5104
  <sl-dialog label="Permalink">
5102
- ${this.dynamicLayerIds.length > 0 ? w`
5105
+ ${this.dynamicLayerIds.length > 0 ? m`
5103
5106
  <div class="warning">
5104
5107
  <sl-icon name="exclamation-triangle"></sl-icon>
5105
5108
  <span>
@@ -5109,7 +5112,7 @@ var J = class extends S {
5109
5112
  </span>
5110
5113
  </div>
5111
5114
  ` : null}
5112
- ${this.hasConfig ? null : w`
5115
+ ${this.hasConfig ? null : m`
5113
5116
  <div class="warning">
5114
5117
  <sl-icon name="exclamation-triangle"></sl-icon>
5115
5118
  <span>Config was not loaded from a URL — layer state may not restore for recipients using a different config.</span>
@@ -5127,11 +5130,11 @@ var J = class extends S {
5127
5130
  `;
5128
5131
  }
5129
5132
  };
5130
- d([A()], J.prototype, "url", void 0), d([A()], J.prototype, "hasConfig", void 0), d([A()], J.prototype, "dynamicLayerIds", void 0), d([A()], J.prototype, "copied", void 0), d([k("sl-dialog")], J.prototype, "dialog", void 0), J = d([D("webmapx-permalink-dialog")], J);
5133
+ S([d()], q.prototype, "url", void 0), S([d()], q.prototype, "hasConfig", void 0), S([d()], q.prototype, "dynamicLayerIds", void 0), S([d()], q.prototype, "copied", void 0), S([f("sl-dialog")], q.prototype, "dialog", void 0), q = S([p("webmapx-permalink-dialog")], q);
5131
5134
  //#endregion
5132
5135
  //#region src/components/webmapx-layer-overview.ts
5133
- var Jt;
5134
- function Yt(e) {
5136
+ var Yt;
5137
+ function Xt(e) {
5135
5138
  let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity, a = (e) => {
5136
5139
  if (typeof e[0] == "number") {
5137
5140
  let [a, o] = e;
@@ -5149,7 +5152,7 @@ function Yt(e) {
5149
5152
  Math.min(85.05112878, i)
5150
5153
  ] : null;
5151
5154
  }
5152
- function Xt(e, t) {
5155
+ function Zt(e, t) {
5153
5156
  return e ? t ? [
5154
5157
  Math.min(e[0], t[0]),
5155
5158
  Math.min(e[1], t[1]),
@@ -5157,10 +5160,10 @@ function Xt(e, t) {
5157
5160
  Math.max(e[3], t[3])
5158
5161
  ] : e : t;
5159
5162
  }
5160
- function Zt(e) {
5163
+ function Qt(e) {
5161
5164
  if (!e) return 0;
5162
5165
  switch (e.type) {
5163
- case "GeometryCollection": return e.geometries.reduce((e, t) => e + Zt(t), 0);
5166
+ case "GeometryCollection": return e.geometries.reduce((e, t) => e + Qt(t), 0);
5164
5167
  case "Point": return 1;
5165
5168
  case "MultiPoint":
5166
5169
  case "LineString": return e.coordinates.length;
@@ -5170,16 +5173,16 @@ function Zt(e) {
5170
5173
  default: return 0;
5171
5174
  }
5172
5175
  }
5173
- function Qt(e) {
5176
+ function $t(e) {
5174
5177
  let t = /* @__PURE__ */ new Map(), n = 0;
5175
5178
  for (let r of e.features ?? []) {
5176
5179
  let e = r.geometry?.type ?? "unknown";
5177
- t.set(e, (t.get(e) ?? 0) + 1), n += Zt(r.geometry);
5180
+ t.set(e, (t.get(e) ?? 0) + 1), n += Qt(r.geometry);
5178
5181
  }
5179
5182
  let r = e.features?.length ?? 0, i = [...t.entries()].map(([e, t]) => `${e}: ${t}`).join(", ");
5180
5183
  return `${i && t.size > 1 ? `${r} features (${i})` : `${r} feature${r === 1 ? "" : "s"}${i ? ` (${[...t.keys()][0]})` : ""}`}, ${n} ${n === 1 ? "vertex" : "vertices"}`;
5181
5184
  }
5182
- function $t(e, t) {
5185
+ function en(e, t) {
5183
5186
  if (Array.isArray(t?.sublayers) && t.sublayers.length > 0) {
5184
5187
  let n = /* @__PURE__ */ new Set();
5185
5188
  for (let e of t.sublayers) typeof e.source == "string" && n.add(e.source);
@@ -5187,16 +5190,16 @@ function $t(e, t) {
5187
5190
  }
5188
5191
  return typeof t?.sourceId == "string" ? [[t.sourceId]] : [];
5189
5192
  }
5190
- var en = new Set([
5193
+ var tn = new Set([
5191
5194
  "circle",
5192
5195
  "symbol",
5193
5196
  "label",
5194
5197
  "line",
5195
5198
  "fill",
5196
5199
  "fill-extrusion"
5197
- ]), Y = class extends f {
5200
+ ]), J = class extends C {
5198
5201
  static {
5199
- Jt = this;
5202
+ Yt = this;
5200
5203
  }
5201
5204
  constructor(...e) {
5202
5205
  super(...e), this.backgroundGroupLabel = "Base Maps", this.backgroundTitle = "Base map", this.overviewTitle = "Active layers", this.backgroundLayers = [], this.overviewLayers = [], this.layerTransparency = /* @__PURE__ */ new Map(), this.dropTargetLayerId = null, this.dropTargetPosition = null, this.sourceExtentCache = /* @__PURE__ */ new Map(), this.layerExtentCache = /* @__PURE__ */ new Map(), this.unsubscribeLayerAdd = null, this.unsubscribeLayerRemove = null, this.dragState = null, this.autoScrollState = null;
@@ -5211,7 +5214,7 @@ var en = new Set([
5211
5214
  this.AUTO_SCROLL_INTERVAL_MS = 20;
5212
5215
  }
5213
5216
  static {
5214
- this.styles = C`
5217
+ this.styles = u`
5215
5218
  :host {
5216
5219
  display: block;
5217
5220
  box-sizing: border-box;
@@ -5482,7 +5485,7 @@ var en = new Set([
5482
5485
  this.unsubscribeLayerAdd?.(), this.unsubscribeLayerRemove?.(), this.unsubscribeLayerAdd = null, this.unsubscribeLayerRemove = null;
5483
5486
  }
5484
5487
  render() {
5485
- return w`
5488
+ return m`
5486
5489
  <div class="panel">
5487
5490
  ${this.renderSection(this.overviewTitle, this.overviewLayers, "No active layers.", !0)}
5488
5491
  ${this.renderSection(this.backgroundTitle, this.backgroundLayers, "No base map selected.")}
@@ -5494,13 +5497,13 @@ var en = new Set([
5494
5497
  `;
5495
5498
  }
5496
5499
  renderSection(e, t, n, r = !1) {
5497
- return w`
5500
+ return m`
5498
5501
  <section class="section">
5499
5502
  <h3 class="section-title">${e}</h3>
5500
- ${t.length > 0 ? w`
5503
+ ${t.length > 0 ? m`
5501
5504
  <div class="layer-list">
5502
- ${t.map((e) => w`
5503
- ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "above" ? w`<div class="drop-indicator"></div>` : null}
5505
+ ${t.map((e) => m`
5506
+ ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "above" ? m`<div class="drop-indicator"></div>` : null}
5504
5507
  <div class="layer-card" data-layer-id=${e.layerId}>
5505
5508
  <div class="layer-row">
5506
5509
  <sl-icon-button
@@ -5509,7 +5512,7 @@ var en = new Set([
5509
5512
  label=${e.visible ? "Hide layer" : "Show layer"}
5510
5513
  @click=${() => this.handleVisibilityToggle(e.layerId)}
5511
5514
  ></sl-icon-button>
5512
- ${t.length > 1 ? w`
5515
+ ${t.length > 1 ? m`
5513
5516
  <span
5514
5517
  class="layer-label-drag"
5515
5518
  @pointerdown=${(e) => this.onDragHandlePointerDown(e)}
@@ -5517,7 +5520,7 @@ var en = new Set([
5517
5520
  @pointerup=${(e) => this.onDragHandlePointerUp(e)}
5518
5521
  @pointercancel=${(e) => this.onDragHandlePointerUp(e)}
5519
5522
  ><span class="layer-label ${e.outOfZoom ? "out-of-zoom" : ""}">${e.label}</span></span>
5520
- ` : w`<span class="layer-label ${e.outOfZoom ? "out-of-zoom" : ""}">${e.label}</span>`}
5523
+ ` : m`<span class="layer-label ${e.outOfZoom ? "out-of-zoom" : ""}">${e.label}</span>`}
5521
5524
  <sl-icon-button
5522
5525
  class="collapse-toggle"
5523
5526
  name=${this.isLegendCollapsed(e.layerId) ? "chevron-right" : "chevron-down"}
@@ -5527,7 +5530,7 @@ var en = new Set([
5527
5530
  </div>
5528
5531
  <div class="layer-details ${this.isLegendCollapsed(e.layerId) ? "collapsed" : ""}">
5529
5532
  <div class="layer-details-inner">
5530
- ${e.visible ? w`
5533
+ ${e.visible ? m`
5531
5534
  <div class="opacity-row">
5532
5535
  <sl-icon name="circle-half"></sl-icon>
5533
5536
  <input
@@ -5543,24 +5546,24 @@ var en = new Set([
5543
5546
  <webmapx-layer-legend layer-id=${e.layerId}></webmapx-layer-legend>
5544
5547
  </div>
5545
5548
  ` : null}
5546
- ${e.topLevelGroup ? w`<div class="layer-meta">${e.topLevelGroup}</div>` : null}
5549
+ ${e.topLevelGroup ? m`<div class="layer-meta">${e.topLevelGroup}</div>` : null}
5547
5550
  <div class="layer-details-actions">
5548
5551
  <sl-icon-button
5549
5552
  name="info-circle"
5550
5553
  label="About this layer"
5551
5554
  @click=${() => this.handleShowLayerInfo(e.layerId, e.label)}
5552
5555
  ></sl-icon-button>
5553
- ${e.hasStyleDialog ? w`<sl-icon-button
5556
+ ${e.hasStyleDialog ? m`<sl-icon-button
5554
5557
  name="palette"
5555
5558
  label="Layer style"
5556
5559
  @click=${() => this.handleShowLayerStyle(e.layerId, e.label)}
5557
5560
  ></sl-icon-button>` : null}
5558
- ${e.hasExtent ? w`<sl-icon-button
5561
+ ${e.hasExtent ? m`<sl-icon-button
5559
5562
  name="zoom-in"
5560
5563
  label="Zoom to layer"
5561
5564
  @click=${() => this.handleZoomToLayer(e.layerId)}
5562
5565
  ></sl-icon-button>` : null}
5563
- ${r ? w`<sl-icon-button
5566
+ ${r ? m`<sl-icon-button
5564
5567
  class="delete-layer"
5565
5568
  name="trash"
5566
5569
  label="Delete layer"
@@ -5570,11 +5573,11 @@ var en = new Set([
5570
5573
  </div>
5571
5574
  </div>
5572
5575
  </div>
5573
- ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "below" ? w`<div class="drop-indicator"></div>` : null}
5576
+ ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "below" ? m`<div class="drop-indicator"></div>` : null}
5574
5577
  `)}
5575
5578
  </div>
5576
- ` : w`<div class="empty">${n}</div>`}
5577
- ${r ? w`
5579
+ ` : m`<div class="empty">${n}</div>`}
5580
+ ${r ? m`
5578
5581
  <div class="save-layers-row">
5579
5582
  <sl-tooltip content="Permalink">
5580
5583
  <sl-icon-button
@@ -5583,7 +5586,7 @@ var en = new Set([
5583
5586
  @click=${() => this.handlePermalink()}
5584
5587
  ></sl-icon-button>
5585
5588
  </sl-tooltip>
5586
- ${t.length > 0 ? w`
5589
+ ${t.length > 0 ? m`
5587
5590
  <sl-tooltip content="Save layer(s)…">
5588
5591
  <sl-icon-button
5589
5592
  name="download"
@@ -5677,7 +5680,7 @@ var en = new Set([
5677
5680
  }
5678
5681
  updateAutoScroll(e, t) {
5679
5682
  if (!t) return;
5680
- let n = t.getBoundingClientRect(), r = Jt.AUTO_SCROLL_EDGE_PX, i = null;
5683
+ let n = t.getBoundingClientRect(), r = Yt.AUTO_SCROLL_EDGE_PX, i = null;
5681
5684
  if (e < n.top + r ? i = "up" : e > n.bottom - r && (i = "down"), !i) {
5682
5685
  this.stopAutoScroll();
5683
5686
  return;
@@ -5696,7 +5699,7 @@ var en = new Set([
5696
5699
  this.stopAutoScroll();
5697
5700
  return;
5698
5701
  }
5699
- t.scrollTop += n === "up" ? -Jt.AUTO_SCROLL_STEP_PX : Jt.AUTO_SCROLL_STEP_PX, e.timer = window.setTimeout(() => this.runAutoScrollStep(), Jt.AUTO_SCROLL_INTERVAL_MS);
5702
+ t.scrollTop += n === "up" ? -Yt.AUTO_SCROLL_STEP_PX : Yt.AUTO_SCROLL_STEP_PX, e.timer = window.setTimeout(() => this.runAutoScrollStep(), Yt.AUTO_SCROLL_INTERVAL_MS);
5700
5703
  }
5701
5704
  stopAutoScroll() {
5702
5705
  this.autoScrollState &&= (window.clearTimeout(this.autoScrollState.timer), null);
@@ -5705,8 +5708,8 @@ var en = new Set([
5705
5708
  if (!this.adapter) return;
5706
5709
  let e = this.adapter.getViewportState(), t = this.adapter.store.getState().mapLayers, n = Object.keys(t), r = n.filter((e) => t[e]?.visible === !1), i = /* @__PURE__ */ new Map();
5707
5710
  for (let [e, n] of Object.entries(t)) typeof n.transparency == "number" && n.transparency !== 0 && i.set(e, n.transparency);
5708
- let a = l(this.closest("webmapx-map") ?? this.adapter), o = s(a), u = this.adapter.getProjection?.()?.name ?? null, d = n.filter((e) => t[e]?.dynamic === !0), f = c(a, n, r, e, i, u, o);
5709
- this.permalinkDialog?.open(f, !!o, d);
5711
+ let a = b(this.closest("webmapx-map") ?? this.adapter), o = v(a), s = this.adapter.getProjection?.()?.name ?? null, c = n.filter((e) => t[e]?.dynamic === !0), l = y(a, n, r, e, i, s, o);
5712
+ this.permalinkDialog?.open(l, !!o, c);
5710
5713
  }
5711
5714
  handleSaveLayers() {
5712
5715
  if (!this.adapter) return;
@@ -5778,18 +5781,18 @@ var en = new Set([
5778
5781
  this.styleDialog?.open(r, this.getLayerStyleGroups(e, n));
5779
5782
  }
5780
5783
  getLayerFeatureSummary(e, t) {
5781
- let n = $t(e, t), r = [];
5784
+ let n = en(e, t), r = [];
5782
5785
  for (let e of n) for (let t of e) {
5783
5786
  let e = this.adapter?.getSourceData(t) ?? null;
5784
5787
  if (e && typeof e == "object") {
5785
- r.push(Qt(e));
5788
+ r.push($t(e));
5786
5789
  break;
5787
5790
  }
5788
5791
  }
5789
- return r.length === 0 && t?.sourceData && typeof t.sourceData == "object" && r.push(Qt(t.sourceData)), r.length > 0 ? r.join("; ") : void 0;
5792
+ return r.length === 0 && t?.sourceData && typeof t.sourceData == "object" && r.push($t(t.sourceData)), r.length > 0 ? r.join("; ") : void 0;
5790
5793
  }
5791
5794
  layerHasExtent(e, t) {
5792
- return Array.isArray(t?.bounds) && t.bounds.length === 4 ? !0 : $t(e, t).some((e) => e.some((e) => this.adapter?.getSourceData(e) !== null));
5795
+ return Array.isArray(t?.bounds) && t.bounds.length === 4 ? !0 : en(e, t).some((e) => e.some((e) => this.adapter?.getSourceData(e) !== null));
5793
5796
  }
5794
5797
  layerHasStyleDialog(e) {
5795
5798
  return this.getLayerStyleTargets("", e).length > 0;
@@ -5799,7 +5802,7 @@ var en = new Set([
5799
5802
  if (Array.isArray(t?.sublayers) && t.sublayers.length > 0) this.collectStyleTargetsFromSublayers(e, t.sublayers, n);
5800
5803
  else {
5801
5804
  let r = typeof t?.layerType == "string" ? t.layerType : void 0, i = typeof t?.sourceId == "string" ? t.sourceId : "";
5802
- r && en.has(r) && n.push({
5805
+ r && tn.has(r) && n.push({
5803
5806
  id: e,
5804
5807
  type: r,
5805
5808
  sourceId: i
@@ -5811,7 +5814,7 @@ var en = new Set([
5811
5814
  if (Array.isArray(t)) for (let r of t) {
5812
5815
  if (!r || typeof r != "object") continue;
5813
5816
  let t = r, i = typeof t.type == "string" ? t.type : void 0, a = typeof t.id == "string" && t.id.length > 0 ? t.id : i, o = typeof t.source == "string" ? t.source : "", s = o ? `${e}:${o}` : "", c = typeof t["source-layer"] == "string" ? t["source-layer"] : void 0;
5814
- i && a && en.has(i) && n.push({
5817
+ i && a && tn.has(i) && n.push({
5815
5818
  id: a,
5816
5819
  type: i,
5817
5820
  sourceId: s,
@@ -5919,7 +5922,7 @@ var en = new Set([
5919
5922
  for (let t of e) {
5920
5923
  let e = this.adapter?.getSourceData(t) ?? null;
5921
5924
  if (e && typeof e == "object") {
5922
- n = Yt(e);
5925
+ n = Xt(e);
5923
5926
  break;
5924
5927
  }
5925
5928
  }
@@ -5929,7 +5932,7 @@ var en = new Set([
5929
5932
  if (this.layerExtentCache.has(e)) return this.layerExtentCache.get(e) ?? null;
5930
5933
  let t = this.adapter?.store.getState().mapLayers?.[e], n = null;
5931
5934
  if (Array.isArray(t?.bounds) && t.bounds.length === 4) n = t.bounds;
5932
- else for (let r of $t(e, t)) n = Xt(n, this.getSourceExtent(r));
5935
+ else for (let r of en(e, t)) n = Zt(n, this.getSourceExtent(r));
5933
5936
  return this.layerExtentCache.set(e, n), n;
5934
5937
  }
5935
5938
  handleZoomToLayer(e) {
@@ -5968,24 +5971,24 @@ var en = new Set([
5968
5971
  } }, "UI"), this.applyVisibleLayers(this.store.getState());
5969
5972
  }
5970
5973
  };
5971
- d([O({
5974
+ S([s({
5972
5975
  type: String,
5973
5976
  attribute: "background-group-label"
5974
- })], Y.prototype, "backgroundGroupLabel", void 0), d([O({
5977
+ })], J.prototype, "backgroundGroupLabel", void 0), S([s({
5975
5978
  type: String,
5976
5979
  attribute: "background-title"
5977
- })], Y.prototype, "backgroundTitle", void 0), d([O({
5980
+ })], J.prototype, "backgroundTitle", void 0), S([s({
5978
5981
  type: String,
5979
5982
  attribute: "overview-title"
5980
- })], Y.prototype, "overviewTitle", void 0), d([A()], Y.prototype, "backgroundLayers", void 0), d([A()], Y.prototype, "overviewLayers", void 0), d([A()], Y.prototype, "layerTransparency", void 0), d([A()], Y.prototype, "dropTargetLayerId", void 0), d([A()], Y.prototype, "dropTargetPosition", void 0), d([k("webmapx-layer-info-dialog")], Y.prototype, "infoDialog", void 0), d([k("webmapx-layer-style-dialog")], Y.prototype, "styleDialog", void 0), d([k("webmapx-save-layers-dialog")], Y.prototype, "saveLayersDialog", void 0), d([k("webmapx-permalink-dialog")], Y.prototype, "permalinkDialog", void 0), Y = Jt = d([D("webmapx-layer-overview")], Y);
5983
+ })], J.prototype, "overviewTitle", void 0), S([d()], J.prototype, "backgroundLayers", void 0), S([d()], J.prototype, "overviewLayers", void 0), S([d()], J.prototype, "layerTransparency", void 0), S([d()], J.prototype, "dropTargetLayerId", void 0), S([d()], J.prototype, "dropTargetPosition", void 0), S([f("webmapx-layer-info-dialog")], J.prototype, "infoDialog", void 0), S([f("webmapx-layer-style-dialog")], J.prototype, "styleDialog", void 0), S([f("webmapx-save-layers-dialog")], J.prototype, "saveLayersDialog", void 0), S([f("webmapx-permalink-dialog")], J.prototype, "permalinkDialog", void 0), J = Yt = S([p("webmapx-layer-overview")], J);
5981
5984
  //#endregion
5982
5985
  //#region src/components/webmapx-spinner.ts
5983
- var tn = class extends f {
5986
+ var nn = class extends C {
5984
5987
  constructor(...e) {
5985
5988
  super(...e), this.busy = !1, this.small = !1, this.nocolor = !1;
5986
5989
  }
5987
5990
  static {
5988
- this.styles = C`
5991
+ this.styles = u`
5989
5992
  :host {
5990
5993
  display: block;
5991
5994
  --webmapx-pointer-events: none;
@@ -6019,28 +6022,28 @@ var tn = class extends f {
6019
6022
  this.busy = e.mapBusy;
6020
6023
  }
6021
6024
  render() {
6022
- return w`
6025
+ return m`
6023
6026
  <div class="spinner-container ${this.busy ? "visible" : ""}">
6024
6027
  <sl-spinner></sl-spinner>
6025
6028
  </div>
6026
6029
  `;
6027
6030
  }
6028
6031
  };
6029
- d([A()], tn.prototype, "busy", void 0), d([O({
6032
+ S([d()], nn.prototype, "busy", void 0), S([s({
6030
6033
  type: Boolean,
6031
6034
  reflect: !0
6032
- })], tn.prototype, "small", void 0), d([O({
6035
+ })], nn.prototype, "small", void 0), S([s({
6033
6036
  type: Boolean,
6034
6037
  reflect: !0
6035
- })], tn.prototype, "nocolor", void 0), tn = d([D("webmapx-spinner")], tn);
6038
+ })], nn.prototype, "nocolor", void 0), nn = S([p("webmapx-spinner")], nn);
6036
6039
  //#endregion
6037
6040
  //#region src/components/webmapx-control-group.ts
6038
- var X = class extends S {
6041
+ var Y = class extends g {
6039
6042
  constructor(...e) {
6040
6043
  super(...e), this.orientation = "vertical", this.panelPosition = "after", this.alignment = "start", this.slotAnchorY = "top", this.panelActive = !1, this.priority = "normal", this.panelObserver = null;
6041
6044
  }
6042
6045
  static {
6043
- this.styles = C`
6046
+ this.styles = u`
6044
6047
  :host {
6045
6048
  display: flex;
6046
6049
  pointer-events: none;
@@ -6149,39 +6152,39 @@ var X = class extends S {
6149
6152
  e.has("orientation") && this.updateToolbarOrientation(), e.has("slot") && this.updateSlotAnchor();
6150
6153
  }
6151
6154
  render() {
6152
- return w`<slot @slotchange=${this.handleSlotChange}></slot>`;
6155
+ return m`<slot @slotchange=${this.handleSlotChange}></slot>`;
6153
6156
  }
6154
6157
  };
6155
- d([O({
6158
+ S([s({
6156
6159
  type: String,
6157
6160
  reflect: !0
6158
- })], X.prototype, "orientation", void 0), d([O({
6161
+ })], Y.prototype, "orientation", void 0), S([s({
6159
6162
  type: String,
6160
6163
  reflect: !0,
6161
6164
  attribute: "panel-position"
6162
- })], X.prototype, "panelPosition", void 0), d([O({
6165
+ })], Y.prototype, "panelPosition", void 0), S([s({
6163
6166
  type: String,
6164
6167
  reflect: !0
6165
- })], X.prototype, "alignment", void 0), d([O({
6168
+ })], Y.prototype, "alignment", void 0), S([s({
6166
6169
  type: String,
6167
6170
  reflect: !0,
6168
6171
  attribute: "slot-anchor-y"
6169
- })], X.prototype, "slotAnchorY", void 0), d([O({
6172
+ })], Y.prototype, "slotAnchorY", void 0), S([s({
6170
6173
  type: Boolean,
6171
6174
  reflect: !0,
6172
6175
  attribute: "panel-active"
6173
- })], X.prototype, "panelActive", void 0), d([O({
6176
+ })], Y.prototype, "panelActive", void 0), S([s({
6174
6177
  type: String,
6175
6178
  reflect: !0
6176
- })], X.prototype, "priority", void 0), d([fe()], X.prototype, "childrenElements", void 0), X = d([D("webmapx-control-group")], X);
6179
+ })], Y.prototype, "priority", void 0), S([_()], Y.prototype, "childrenElements", void 0), Y = S([p("webmapx-control-group")], Y);
6177
6180
  //#endregion
6178
6181
  //#region src/components/webmapx-zoom-level.ts
6179
- var nn = class extends f {
6182
+ var rn = class extends C {
6180
6183
  constructor(...e) {
6181
6184
  super(...e), this.currentZoom = null, this.inputValue = "", this.unsubscribeEvents = null;
6182
6185
  }
6183
6186
  static {
6184
- this.styles = C`
6187
+ this.styles = u`
6185
6188
  :host {
6186
6189
  position: relative;
6187
6190
  display: inline-flex;
@@ -6256,7 +6259,7 @@ var nn = class extends f {
6256
6259
  !isNaN(e) && e >= 0 && this.adapter.setZoom(e);
6257
6260
  }
6258
6261
  render() {
6259
- return w`
6262
+ return m`
6260
6263
  <div class="tool-container">
6261
6264
  <label for="zoom-input">Zoom:</label>
6262
6265
  <input
@@ -6274,10 +6277,10 @@ var nn = class extends f {
6274
6277
  `;
6275
6278
  }
6276
6279
  };
6277
- d([A()], nn.prototype, "currentZoom", void 0), d([A()], nn.prototype, "inputValue", void 0), nn = d([D("webmapx-zoom-level")], nn);
6280
+ S([d()], rn.prototype, "currentZoom", void 0), S([d()], rn.prototype, "inputValue", void 0), rn = S([p("webmapx-zoom-level")], rn);
6278
6281
  //#endregion
6279
6282
  //#region src/components/webmapx-navigation-control.ts
6280
- var Z = class extends f {
6283
+ var X = class extends C {
6281
6284
  constructor(...e) {
6282
6285
  super(...e), this.orientation = "vertical", this.showCompass = !0, this.showZoom = !0, this.visualizePitch = !0, this.currentZoom = null, this.bearing = 0, this.pitch = 0, this.compassSupported = !1, this.unsubscribeEvents = [], this.zoomMin = null, this.zoomMax = null, this.compassRect = null, this.compassPointerId = null, this.compassPointerTarget = null, this.startBearing = 0, this.startPitch = 0, this.startPointer = null, this.compassDragMoved = !1, this.suppressNextCompassClick = !1, this.compassClickTolerance = 4, this.compassDragMode = null, this.handleZoomIn = () => {
6283
6286
  if (!this.adapter) return;
@@ -6320,7 +6323,7 @@ var Z = class extends f {
6320
6323
  };
6321
6324
  }
6322
6325
  static {
6323
- this.styles = C`
6326
+ this.styles = u`
6324
6327
  :host {
6325
6328
  display: inline-flex;
6326
6329
  pointer-events: auto;
@@ -6470,7 +6473,7 @@ var Z = class extends f {
6470
6473
  let e = [];
6471
6474
  e.push(`rotate(${this.normalizeBearing(-this.bearing)}deg)`), this.visualizePitch && e.unshift(`rotateX(${this.pitch}deg)`);
6472
6475
  let t = e.join(" ");
6473
- return w`
6476
+ return m`
6474
6477
  <button
6475
6478
  class="nav-btn"
6476
6479
  @click=${this.handleCompassClick}
@@ -6486,12 +6489,12 @@ var Z = class extends f {
6486
6489
  }
6487
6490
  render() {
6488
6491
  let e = this.showCompass && this.compassSupported, t = this.zoomMin ?? -Infinity, n = this.zoomMax ?? Infinity, r = this.currentZoom ?? 0;
6489
- return w`
6492
+ return m`
6490
6493
  <div class="nav-shell">
6491
- ${this.showZoom ? w`<button class="nav-btn" @click=${this.handleZoomIn} ?disabled=${r >= n} title="Zoom in">
6494
+ ${this.showZoom ? m`<button class="nav-btn" @click=${this.handleZoomIn} ?disabled=${r >= n} title="Zoom in">
6492
6495
  <span class="icon">+</span>
6493
6496
  </button>` : null}
6494
- ${this.showZoom ? w`<button class="nav-btn" @click=${this.handleZoomOut} ?disabled=${r <= t} title="Zoom out">
6497
+ ${this.showZoom ? m`<button class="nav-btn" @click=${this.handleZoomOut} ?disabled=${r <= t} title="Zoom out">
6495
6498
  <span class="icon">-</span>
6496
6499
  </button>` : null}
6497
6500
  ${e ? this.renderCompass() : null}
@@ -6499,30 +6502,30 @@ var Z = class extends f {
6499
6502
  `;
6500
6503
  }
6501
6504
  };
6502
- d([O({
6505
+ S([s({
6503
6506
  type: String,
6504
6507
  reflect: !0
6505
- })], Z.prototype, "orientation", void 0), d([O({
6508
+ })], X.prototype, "orientation", void 0), S([s({
6506
6509
  type: Boolean,
6507
6510
  attribute: "show-compass",
6508
6511
  reflect: !0
6509
- })], Z.prototype, "showCompass", void 0), d([O({
6512
+ })], X.prototype, "showCompass", void 0), S([s({
6510
6513
  type: Boolean,
6511
6514
  attribute: "show-zoom",
6512
6515
  reflect: !0
6513
- })], Z.prototype, "showZoom", void 0), d([O({
6516
+ })], X.prototype, "showZoom", void 0), S([s({
6514
6517
  type: Boolean,
6515
6518
  attribute: "visualize-pitch",
6516
6519
  reflect: !0
6517
- })], Z.prototype, "visualizePitch", void 0), d([A()], Z.prototype, "currentZoom", void 0), d([A()], Z.prototype, "bearing", void 0), d([A()], Z.prototype, "pitch", void 0), d([A()], Z.prototype, "compassSupported", void 0), Z = d([D("webmapx-navigation-control")], Z);
6520
+ })], X.prototype, "visualizePitch", void 0), S([d()], X.prototype, "currentZoom", void 0), S([d()], X.prototype, "bearing", void 0), S([d()], X.prototype, "pitch", void 0), S([d()], X.prototype, "compassSupported", void 0), X = S([p("webmapx-navigation-control")], X);
6518
6521
  //#endregion
6519
6522
  //#region src/components/webmapx-scale-control.ts
6520
- var rn = class extends f {
6523
+ var an = class extends C {
6521
6524
  constructor(...e) {
6522
6525
  super(...e), this.maxWidth = 100, this.unit = "metric", this.barWidth = 0, this.label = "—", this.resizeObserver = null, this.unsubscribeEvents = [], this.lastBounds = null, this.lastCenter = null, this.lastZoom = null, this.hasLiveView = !1, this.attachedAdapter = null, this.lastUnprojectStatus = "none";
6523
6526
  }
6524
6527
  static {
6525
- this.styles = C`
6528
+ this.styles = u`
6526
6529
  :host {
6527
6530
  display: inline-flex;
6528
6531
  margin: var(--webmapx-tool-margin, 0);
@@ -6612,16 +6615,16 @@ var rn = class extends f {
6612
6615
  if (!a || a.status === "off-globe" || a.status === "failed") return this.lastUnprojectStatus = a?.status ?? "failed", null;
6613
6616
  if (this.lastZoom != null) {
6614
6617
  let t = n ?? this.lastCenter?.[1];
6615
- return an(this.lastZoom, t ?? 0) * e;
6618
+ return on(this.lastZoom, t ?? 0) * e;
6616
6619
  }
6617
6620
  let o = this.horizontalMetersAcrossBounds(this.lastBounds, n);
6618
6621
  return o && o > 0 && t > 0 ? o / t * e : null;
6619
6622
  }
6620
6623
  horizontalMetersAcrossBounds(e, t) {
6621
6624
  if (!e) return null;
6622
- let n = on(t ?? (e.sw[1] + e.ne[1]) / 2), r = e.sw[0], i = e.ne[0], a = sn(i - r);
6625
+ let n = sn(t ?? (e.sw[1] + e.ne[1]) / 2), r = e.sw[0], i = e.ne[0], a = cn(i - r);
6623
6626
  if (a <= 0) return null;
6624
- let o = cn * Math.cos(n * Math.PI / 180), s = Math.abs(a) * o;
6627
+ let o = ln * Math.cos(n * Math.PI / 180), s = Math.abs(a) * o;
6625
6628
  return s > 0 ? s : null;
6626
6629
  }
6627
6630
  buildDisplay(e, t, n) {
@@ -6629,33 +6632,33 @@ var rn = class extends f {
6629
6632
  if (n === "imperial") {
6630
6633
  let n = e * 3.28084;
6631
6634
  if (n > 5280) {
6632
- let e = n / 5280, r = un(e);
6635
+ let e = n / 5280, r = dn(e);
6633
6636
  return {
6634
6637
  widthPx: r / e * t,
6635
6638
  label: `${r} mi`
6636
6639
  };
6637
6640
  }
6638
- let r = un(n);
6641
+ let r = dn(n);
6639
6642
  return {
6640
6643
  widthPx: r / n * t,
6641
6644
  label: `${r} ft`
6642
6645
  };
6643
6646
  }
6644
6647
  if (n === "nautical") {
6645
- let n = e / 1852, r = un(n);
6648
+ let n = e / 1852, r = dn(n);
6646
6649
  return {
6647
6650
  widthPx: r / n * t,
6648
6651
  label: `${r} nm`
6649
6652
  };
6650
6653
  }
6651
6654
  if (e >= 1e3) {
6652
- let n = e / 1e3, r = un(n);
6655
+ let n = e / 1e3, r = dn(n);
6653
6656
  return {
6654
6657
  widthPx: r / n * t,
6655
6658
  label: `${r} km`
6656
6659
  };
6657
6660
  }
6658
- let r = un(e);
6661
+ let r = dn(e);
6659
6662
  return {
6660
6663
  widthPx: r / e * t,
6661
6664
  label: `${r} m`
@@ -6699,7 +6702,7 @@ var rn = class extends f {
6699
6702
  if (!isFinite(o) || (a = t, Math.abs(o - e) < .1)) break;
6700
6703
  o > e ? r = t : i = t;
6701
6704
  }
6702
- return on(a);
6705
+ return sn(a);
6703
6706
  }
6704
6707
  getTargetPixel(e) {
6705
6708
  let t = this.mapHost?.mapElement ?? this.mapHost;
@@ -6727,7 +6730,7 @@ var rn = class extends f {
6727
6730
  if (!this.attachedAdapter) return null;
6728
6731
  let l = this.attachedAdapter.unproject(s), u = this.attachedAdapter.unproject(c);
6729
6732
  if (!l || !u) return null;
6730
- let d = le(l, u) / 100;
6733
+ let d = E(l, u) / 100;
6731
6734
  return !isFinite(d) || d <= 0 ? null : { meters: d };
6732
6735
  }, c = n ?? o / 2, l = s(c, "primary");
6733
6736
  if (!l) {
@@ -6751,43 +6754,43 @@ var rn = class extends f {
6751
6754
  }
6752
6755
  render() {
6753
6756
  let e = this.barWidth <= 0, t = this.getSurfaceMetrics()?.width ?? this.getContainerWidth();
6754
- return w`
6757
+ return m`
6755
6758
  <div class="scale-shell" role="presentation" style=${`width: ${this.barWidth > 0 ? Math.max(0, Math.min(this.barWidth, t || Infinity)) : Math.min(this.maxWidthPx, t || this.maxWidthPx)}px`}>
6756
6759
  <div class="scale-label ${e ? "muted" : ""}">${this.label}</div>
6757
6760
  </div>
6758
6761
  `;
6759
6762
  }
6760
6763
  };
6761
- d([O({
6764
+ S([s({
6762
6765
  type: Number,
6763
6766
  attribute: "max-width"
6764
- })], rn.prototype, "maxWidth", void 0), d([O({
6767
+ })], an.prototype, "maxWidth", void 0), S([s({
6765
6768
  type: String,
6766
6769
  attribute: "unit"
6767
- })], rn.prototype, "unit", void 0), d([A()], rn.prototype, "barWidth", void 0), d([A()], rn.prototype, "label", void 0), rn = d([D("webmapx-scale-control")], rn);
6768
- function an(e, t) {
6769
- let n = on(t) * Math.PI / 180;
6770
+ })], an.prototype, "unit", void 0), S([d()], an.prototype, "barWidth", void 0), S([d()], an.prototype, "label", void 0), an = S([p("webmapx-scale-control")], an);
6771
+ function on(e, t) {
6772
+ let n = sn(t) * Math.PI / 180;
6770
6773
  return 40075016.68557849 * Math.cos(n) / (512 * 2 ** e);
6771
6774
  }
6772
- function on(e) {
6775
+ function sn(e) {
6773
6776
  return Math.max(-85.05112878, Math.min(85.05112878, e));
6774
6777
  }
6775
- function sn(e) {
6778
+ function cn(e) {
6776
6779
  let t = e;
6777
6780
  return t < 0 && (t += 360), t === 0 || t > 360 ? 360 : t;
6778
6781
  }
6779
- var cn = 111319.49079327357;
6780
- function ln(e) {
6782
+ var ln = 111319.49079327357;
6783
+ function un(e) {
6781
6784
  let t = 10 ** Math.ceil(-Math.log(e) / Math.LN10);
6782
6785
  return Math.round(e * t) / t;
6783
6786
  }
6784
- function un(e) {
6787
+ function dn(e) {
6785
6788
  let t = 10 ** (`${Math.floor(e)}`.length - 1), n = e / t;
6786
- return n = n >= 10 ? 10 : n >= 5 ? 5 : n >= 3 ? 3 : n >= 2 ? 2 : n >= 1 ? 1 : ln(n), t * n;
6789
+ return n = n >= 10 ? 10 : n >= 5 ? 5 : n >= 3 ? 3 : n >= 2 ? 2 : n >= 1 ? 1 : un(n), t * n;
6787
6790
  }
6788
6791
  //#endregion
6789
6792
  //#region src/components/webmapx-fullscreen-control.ts
6790
- var dn = class extends f {
6793
+ var fn = class extends C {
6791
6794
  constructor(...e) {
6792
6795
  super(...e), this.isFullscreen = !1, this.handleFullscreenChange = () => {
6793
6796
  this.isFullscreen = document.fullscreenElement === this.fullscreenTarget();
@@ -6796,7 +6799,7 @@ var dn = class extends f {
6796
6799
  };
6797
6800
  }
6798
6801
  static {
6799
- this.styles = C`
6802
+ this.styles = u`
6800
6803
  :host {
6801
6804
  display: inline-flex;
6802
6805
  pointer-events: auto;
@@ -6857,22 +6860,22 @@ var dn = class extends f {
6857
6860
  onStateChanged() {}
6858
6861
  onConfigReady() {}
6859
6862
  fullscreenTarget() {
6860
- return u(this) ?? this;
6863
+ return x(this) ?? this;
6861
6864
  }
6862
6865
  render() {
6863
- return w`
6866
+ return m`
6864
6867
  <div class="nav-shell">
6865
6868
  <button class="nav-btn" @click=${this.handleToggle} title="${this.isFullscreen ? "Exit fullscreen" : "Fullscreen"}" aria-label="Toggle fullscreen">
6866
- ${this.isFullscreen ? w`<svg viewBox="0 0 24 24"><path d="M9 3v3a2 2 0 0 1-2 2H4M21 9h-3a2 2 0 0 1-2-2V4M3 15h3a2 2 0 0 1 2 2v3M15 21v-3a2 2 0 0 1 2-2h3"/></svg>` : w`<svg viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>`}
6869
+ ${this.isFullscreen ? m`<svg viewBox="0 0 24 24"><path d="M9 3v3a2 2 0 0 1-2 2H4M21 9h-3a2 2 0 0 1-2-2V4M3 15h3a2 2 0 0 1 2 2v3M15 21v-3a2 2 0 0 1 2-2h3"/></svg>` : m`<svg viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>`}
6867
6870
  </button>
6868
6871
  </div>
6869
6872
  `;
6870
6873
  }
6871
6874
  };
6872
- d([A()], dn.prototype, "isFullscreen", void 0), dn = d([D("webmapx-fullscreen-control")], dn);
6875
+ S([d()], fn.prototype, "isFullscreen", void 0), fn = S([p("webmapx-fullscreen-control")], fn);
6873
6876
  //#endregion
6874
6877
  //#region src/components/webmapx-attribution-control.ts
6875
- var Q = class extends f {
6878
+ var Z = class extends C {
6876
6879
  constructor(...e) {
6877
6880
  super(...e), this.attributions = [], this._showLeft = !1, this._showRight = !1, this.layerData = null, this.visibleLayerIds = [], this.mapLayersState = {}, this._dragStartX = 0, this._dragStartScroll = 0, this._dragging = !1;
6878
6881
  }
@@ -6914,7 +6917,7 @@ var Q = class extends f {
6914
6917
  t && i(t);
6915
6918
  continue;
6916
6919
  }
6917
- let o = ae(a, e);
6920
+ let o = ge(a, e);
6918
6921
  o && i(o);
6919
6922
  }
6920
6923
  this.attributions = r, this.updateComplete.then(() => this._updateOverflow());
@@ -6943,23 +6946,23 @@ var Q = class extends f {
6943
6946
  }, { passive: !0 });
6944
6947
  }
6945
6948
  render() {
6946
- return w`
6949
+ return m`
6947
6950
  <div class="attribution-shell" ?hidden=${!(this.attributions.length > 0)} role="region" aria-label="Map attributions">
6948
- ${this._showLeft ? w`<span class="overflow-indicator left" aria-hidden="true">‹</span>` : null}
6951
+ ${this._showLeft ? m`<span class="overflow-indicator left" aria-hidden="true">‹</span>` : null}
6949
6952
  <div class="attribution-scroll">
6950
6953
  <div class="attribution-inner">
6951
- ${this.attributions.map((e, t) => w`
6952
- ${ie(e)}
6953
- ${t < this.attributions.length - 1 ? w`<span class="separator">•</span>` : null}
6954
+ ${this.attributions.map((e, t) => m`
6955
+ ${he(e)}
6956
+ ${t < this.attributions.length - 1 ? m`<span class="separator">•</span>` : null}
6954
6957
  `)}
6955
6958
  </div>
6956
6959
  </div>
6957
- ${this._showRight ? w`<span class="overflow-indicator right" aria-hidden="true">›</span>` : null}
6960
+ ${this._showRight ? m`<span class="overflow-indicator right" aria-hidden="true">›</span>` : null}
6958
6961
  </div>
6959
6962
  `;
6960
6963
  }
6961
6964
  static {
6962
- this.styles = C`
6965
+ this.styles = u`
6963
6966
  :host {
6964
6967
  display: flex;
6965
6968
  justify-content: flex-end;
@@ -7035,10 +7038,10 @@ var Q = class extends f {
7035
7038
  `;
7036
7039
  }
7037
7040
  };
7038
- d([A()], Q.prototype, "attributions", void 0), d([A()], Q.prototype, "_showLeft", void 0), d([A()], Q.prototype, "_showRight", void 0), d([k(".attribution-scroll")], Q.prototype, "_scrollEl", void 0), Q = d([D("webmapx-attribution-control")], Q);
7041
+ S([d()], Z.prototype, "attributions", void 0), S([d()], Z.prototype, "_showLeft", void 0), S([d()], Z.prototype, "_showRight", void 0), S([f(".attribution-scroll")], Z.prototype, "_scrollEl", void 0), Z = S([p("webmapx-attribution-control")], Z);
7039
7042
  //#endregion
7040
7043
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5D6IT2SR.js
7041
- var fn = C`
7044
+ var Q = u`
7042
7045
  :host {
7043
7046
  --thumb-size: 20px;
7044
7047
  --tooltip-offset: 10px;
@@ -7264,9 +7267,9 @@ var fn = C`
7264
7267
  display: none;
7265
7268
  }
7266
7269
  }
7267
- `, $ = class extends i {
7270
+ `, $ = class extends r {
7268
7271
  constructor() {
7269
- super(...arguments), this.formControlController = new b(this), this.hasSlotController = new ee(this, "help-text", "label"), this.localize = new v(this), this.hasFocus = !1, this.hasTooltip = !1, this.title = "", this.name = "", this.value = 0, this.label = "", this.helpText = "", this.disabled = !1, this.min = 0, this.max = 100, this.step = 1, this.tooltip = "top", this.tooltipFormatter = (e) => e.toString(), this.form = "", this.defaultValue = 0;
7272
+ super(...arguments), this.formControlController = new le(this), this.hasSlotController = new oe(this, "help-text", "label"), this.localize = new se(this), this.hasFocus = !1, this.hasTooltip = !1, this.title = "", this.name = "", this.value = 0, this.label = "", this.helpText = "", this.disabled = !1, this.min = 0, this.max = 100, this.step = 1, this.tooltip = "top", this.tooltipFormatter = (e) => e.toString(), this.form = "", this.defaultValue = 0;
7270
7273
  }
7271
7274
  get validity() {
7272
7275
  return this.input.validity;
@@ -7355,10 +7358,10 @@ var fn = C`
7355
7358
  }
7356
7359
  render() {
7357
7360
  let e = this.hasSlotController.test("label"), t = this.hasSlotController.test("help-text"), n = this.label ? !0 : !!e, r = this.helpText ? !0 : !!t;
7358
- return w`
7361
+ return m`
7359
7362
  <div
7360
7363
  part="form-control"
7361
- class=${pe({
7364
+ class=${ie({
7362
7365
  "form-control": !0,
7363
7366
  "form-control--medium": !0,
7364
7367
  "form-control--has-label": n,
@@ -7377,7 +7380,7 @@ var fn = C`
7377
7380
  <div part="form-control-input" class="form-control-input">
7378
7381
  <div
7379
7382
  part="base"
7380
- class=${pe({
7383
+ class=${ie({
7381
7384
  range: !0,
7382
7385
  "range--disabled": this.disabled,
7383
7386
  "range--focused": this.hasFocus,
@@ -7397,12 +7400,12 @@ var fn = C`
7397
7400
  class="range__control"
7398
7401
  title=${this.title}
7399
7402
  type="range"
7400
- name=${me(this.name)}
7403
+ name=${ae(this.name)}
7401
7404
  ?disabled=${this.disabled}
7402
- min=${me(this.min)}
7403
- max=${me(this.max)}
7404
- step=${me(this.step)}
7405
- .value=${j(this.value.toString())}
7405
+ min=${ae(this.min)}
7406
+ max=${ae(this.max)}
7407
+ step=${ae(this.step)}
7408
+ .value=${T(this.value.toString())}
7406
7409
  aria-describedby="help-text"
7407
7410
  @change=${this.handleChange}
7408
7411
  @focus=${this.handleFocus}
@@ -7410,7 +7413,7 @@ var fn = C`
7410
7413
  @invalid=${this.handleInvalid}
7411
7414
  @blur=${this.handleBlur}
7412
7415
  />
7413
- ${this.tooltip !== "none" && !this.disabled ? w`
7416
+ ${this.tooltip !== "none" && !this.disabled ? m`
7414
7417
  <output part="tooltip" class="range__tooltip">
7415
7418
  ${typeof this.tooltipFormatter == "function" ? this.tooltipFormatter(this.value) : this.value}
7416
7419
  </output>
@@ -7433,21 +7436,21 @@ var fn = C`
7433
7436
  //#endregion
7434
7437
  //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CKH4GVK3.js
7435
7438
  $.styles = [
7436
- a,
7437
- ne,
7438
- fn
7439
- ], n([k(".range__control")], $.prototype, "input", 2), n([k(".range__tooltip")], $.prototype, "output", 2), n([A()], $.prototype, "hasFocus", 2), n([A()], $.prototype, "hasTooltip", 2), n([O()], $.prototype, "title", 2), n([O()], $.prototype, "name", 2), n([O({ type: Number })], $.prototype, "value", 2), n([O()], $.prototype, "label", 2), n([O({ attribute: "help-text" })], $.prototype, "helpText", 2), n([O({
7439
+ n,
7440
+ fe,
7441
+ Q
7442
+ ], a([f(".range__control")], $.prototype, "input", 2), a([f(".range__tooltip")], $.prototype, "output", 2), a([d()], $.prototype, "hasFocus", 2), a([d()], $.prototype, "hasTooltip", 2), a([s()], $.prototype, "title", 2), a([s()], $.prototype, "name", 2), a([s({ type: Number })], $.prototype, "value", 2), a([s()], $.prototype, "label", 2), a([s({ attribute: "help-text" })], $.prototype, "helpText", 2), a([s({
7440
7443
  type: Boolean,
7441
7444
  reflect: !0
7442
- })], $.prototype, "disabled", 2), n([O({ type: Number })], $.prototype, "min", 2), n([O({ type: Number })], $.prototype, "max", 2), n([O({ type: Number })], $.prototype, "step", 2), n([O()], $.prototype, "tooltip", 2), n([O({ attribute: !1 })], $.prototype, "tooltipFormatter", 2), n([O({ reflect: !0 })], $.prototype, "form", 2), n([te()], $.prototype, "defaultValue", 2), n([de({ passive: !0 })], $.prototype, "handleThumbDragStart", 1), n([r("value", { waitUntilFirstUpdate: !0 })], $.prototype, "handleValueChange", 1), n([r("disabled", { waitUntilFirstUpdate: !0 })], $.prototype, "handleDisabledChange", 1), n([r("hasTooltip", { waitUntilFirstUpdate: !0 })], $.prototype, "syncRange", 1), $.define("sl-range");
7445
+ })], $.prototype, "disabled", 2), a([s({ type: Number })], $.prototype, "min", 2), a([s({ type: Number })], $.prototype, "max", 2), a([s({ type: Number })], $.prototype, "step", 2), a([s()], $.prototype, "tooltip", 2), a([s({ attribute: !1 })], $.prototype, "tooltipFormatter", 2), a([s({ reflect: !0 })], $.prototype, "form", 2), a([de()], $.prototype, "defaultValue", 2), a([h({ passive: !0 })], $.prototype, "handleThumbDragStart", 1), a([i("value", { waitUntilFirstUpdate: !0 })], $.prototype, "handleValueChange", 1), a([i("disabled", { waitUntilFirstUpdate: !0 })], $.prototype, "handleDisabledChange", 1), a([i("hasTooltip", { waitUntilFirstUpdate: !0 })], $.prototype, "syncRange", 1), $.define("sl-range");
7443
7446
  //#endregion
7444
7447
  //#region src/components/webmapx-tool-template.ts
7445
- var pn = class extends f {
7448
+ var pn = class extends C {
7446
7449
  constructor(...e) {
7447
7450
  super(...e), this.bufferRadius = 0, this.isToolActive = !1, this.toolService = null;
7448
7451
  }
7449
7452
  static {
7450
- this.styles = C`
7453
+ this.styles = u`
7451
7454
  :host {
7452
7455
  display: inline-flex;
7453
7456
  pointer-events: auto;
@@ -7493,7 +7496,7 @@ var pn = class extends f {
7493
7496
  this.toolService?.toggleTool();
7494
7497
  }
7495
7498
  render() {
7496
- return w`
7499
+ return m`
7497
7500
  <div class="tool-container">
7498
7501
  <div class="tool-title">Template Tool — Buffer</div>
7499
7502
  <div class="radius-row">
@@ -7517,14 +7520,14 @@ var pn = class extends f {
7517
7520
  `;
7518
7521
  }
7519
7522
  };
7520
- d([A()], pn.prototype, "bufferRadius", void 0), d([A()], pn.prototype, "isToolActive", void 0), pn = d([D("webmapx-tool-template")], pn);
7523
+ S([d()], pn.prototype, "bufferRadius", void 0), S([d()], pn.prototype, "isToolActive", void 0), pn = S([p("webmapx-tool-template")], pn);
7521
7524
  //#endregion
7522
7525
  //#region src/components/webmapx-inset-map.ts
7523
- var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.05112878, vn = 89.999, yn = 1, bn = "viewport", xn = "viewport-fill", Sn = "viewport-outline", Cn = class extends S {
7526
+ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.05112878, vn = 89.999, yn = 1, bn = "viewport", xn = "viewport-fill", Sn = "viewport-outline", Cn = class extends g {
7524
7527
  constructor(...e) {
7525
- super(...e), this.zoomOffset = -3, this.baseScale = .5, this.minimizable = !1, this._collapsed = !1, this.adapter = null, this.insetMap = null, this.viewportSource = null, this.unsubscribe = null, this.lastCenter = null, this.lastZoom = null, this.lastSourceZoom = null, this.projectionMode = "mercator", this.lastBoundsKey = null, this.initPromise = null, this.pendingViewportBounds = null, this.throttledViewportUpdate = ue(() => {
7528
+ super(...e), this.zoomOffset = -3, this.baseScale = .5, this.minimizable = !1, this._collapsed = !1, this.adapter = null, this.insetMap = null, this.viewportSource = null, this.unsubscribe = null, this.lastCenter = null, this.lastZoom = null, this.lastSourceZoom = null, this.projectionMode = "mercator", this.lastBoundsKey = null, this.initPromise = null, this.pendingViewportBounds = null, this.throttledViewportUpdate = be(() => {
7526
7529
  this.doUpdateViewportRectangle(this.pendingViewportBounds), this.pendingViewportBounds = void 0;
7527
- }, 50), this.throttledRenderLog = ue((e) => {}, 50), this.throttledApplyStateWithZoomOffset = ue((e, t) => {
7530
+ }, 50), this.throttledRenderLog = be((e) => {}, 50), this.throttledApplyStateWithZoomOffset = be((e, t) => {
7528
7531
  this.applyState(e, t);
7529
7532
  }, 50);
7530
7533
  }
@@ -7532,7 +7535,7 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
7532
7535
  return this.renderRoot.querySelector(".inset-map");
7533
7536
  }
7534
7537
  static {
7535
- this.styles = C`
7538
+ this.styles = u`
7536
7539
  :host {
7537
7540
  display: inline-block;
7538
7541
  position: relative;
@@ -7624,14 +7627,14 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
7624
7627
  async doInitializeInset() {
7625
7628
  let e = this.insetContainer;
7626
7629
  if (!e) return;
7627
- let t = u(this);
7630
+ let t = x(this);
7628
7631
  if (!t) return;
7629
7632
  let n = await t.getAdapterAsync?.();
7630
7633
  if (!n) return;
7631
7634
  this.adapter = n, this.projectionMode = this.resolveProjectionMode(t);
7632
7635
  let r = this.adapter.store.getState();
7633
7636
  await this.waitForConfig(t);
7634
- let i = this.resolveInsetToolConfig(t), a = this.resolveInsetNumber("zoom-offset", this.zoomOffset, i.zoomOffset), o = this.resolveInsetNumber("base-scale", this.baseScale, i.baseScale), s = this.backgroundLayer ? this.resolveBackgroundFromLayer(t, this.backgroundLayer) : null, c = this.hasAttribute("style-url") ? this.styleUrl : s?.styleUrl ?? i.styleUrl, l = s ? s.background ?? null : this.resolveInsetBackground(i), d = {
7637
+ let i = this.resolveInsetToolConfig(t), a = this.resolveInsetNumber("zoom-offset", this.zoomOffset, i.zoomOffset), o = this.resolveInsetNumber("base-scale", this.baseScale, i.baseScale), s = this.backgroundLayer ? this.resolveBackgroundFromLayer(t, this.backgroundLayer) : null, c = this.hasAttribute("style-url") ? this.styleUrl : s?.styleUrl ?? i.styleUrl, l = s ? s.background ?? null : this.resolveInsetBackground(i), u = {
7635
7638
  styleUrl: c ?? mn,
7636
7639
  center: r.mapCenter ?? [0, 0],
7637
7640
  zoom: this.clampZoom((r.zoomLevel ?? 0) + a),
@@ -7643,7 +7646,7 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
7643
7646
  tileSize: l.tileSize
7644
7647
  } : {}
7645
7648
  };
7646
- this.insetMap = this.adapter.mapFactory.createMap(e, d), e.style.setProperty("--webmapx-inset-scale", `${o}`), this.insetMap.onReady(() => {
7649
+ this.insetMap = this.adapter.mapFactory.createMap(e, u), e.style.setProperty("--webmapx-inset-scale", `${o}`), this.insetMap.onReady(() => {
7647
7650
  this.setupViewportLayers(), this.applyState(r, a);
7648
7651
  }), this.unsubscribe = this.adapter.store.subscribe((e) => {
7649
7652
  this.hasRelevantStateChange(e) && this.throttledApplyStateWithZoomOffset(e, a);
@@ -7939,7 +7942,7 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
7939
7942
  }
7940
7943
  estimateViewportWidthFromScreenSamples(e) {
7941
7944
  if (!this.adapter) return null;
7942
- let t = u(this)?.mapElement;
7945
+ let t = x(this)?.mapElement;
7943
7946
  if (!t) return null;
7944
7947
  let n = t.clientWidth, r = t.clientHeight;
7945
7948
  if (!Number.isFinite(n) || !Number.isFinite(r) || n <= 0 || r <= 0) return null;
@@ -7948,7 +7951,7 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
7948
7951
  }
7949
7952
  sampleViewportLongitudeRange(e) {
7950
7953
  if (!this.adapter || !this.adapter.store.getState().mapLoaded) return null;
7951
- let t = u(this)?.mapElement;
7954
+ let t = x(this)?.mapElement;
7952
7955
  if (!t) return null;
7953
7956
  let n = t.clientWidth, r = t.clientHeight;
7954
7957
  if (!Number.isFinite(n) || !Number.isFinite(r) || n <= 0 || r <= 0) return null;
@@ -8105,11 +8108,11 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
8105
8108
  };
8106
8109
  }
8107
8110
  render() {
8108
- return w`
8111
+ return m`
8109
8112
  <div class="inset-map-frame ${this._collapsed ? "hidden" : ""}" tabindex=${this.minimizable ? "0" : "-1"}>
8110
8113
  <div class="inset-map"></div>
8111
8114
  </div>
8112
- ${this.minimizable ? w`
8115
+ ${this.minimizable ? m`
8113
8116
  <div class="toggle-btn">
8114
8117
  <sl-icon-button
8115
8118
  name=${this._collapsed ? "arrows-angle-expand" : "arrows-angle-contract"}
@@ -8123,26 +8126,26 @@ var mn = "https://demotiles.maplibre.org/style.json", hn = 0, gn = 22, _n = 85.0
8123
8126
  `;
8124
8127
  }
8125
8128
  };
8126
- d([O({
8129
+ S([s({
8127
8130
  type: Number,
8128
8131
  attribute: "zoom-offset"
8129
- })], Cn.prototype, "zoomOffset", void 0), d([O({
8132
+ })], Cn.prototype, "zoomOffset", void 0), S([s({
8130
8133
  type: String,
8131
8134
  attribute: "style-url"
8132
- })], Cn.prototype, "styleUrl", void 0), d([O({
8135
+ })], Cn.prototype, "styleUrl", void 0), S([s({
8133
8136
  type: String,
8134
8137
  attribute: "background-layer"
8135
- })], Cn.prototype, "backgroundLayer", void 0), d([O({
8138
+ })], Cn.prototype, "backgroundLayer", void 0), S([s({
8136
8139
  type: Number,
8137
8140
  attribute: "base-scale"
8138
- })], Cn.prototype, "baseScale", void 0), d([O({
8141
+ })], Cn.prototype, "baseScale", void 0), S([s({
8139
8142
  type: Boolean,
8140
8143
  attribute: "minimizable"
8141
- })], Cn.prototype, "minimizable", void 0), d([O({
8144
+ })], Cn.prototype, "minimizable", void 0), S([s({
8142
8145
  type: Boolean,
8143
8146
  reflect: !0,
8144
8147
  attribute: "collapsed"
8145
- })], Cn.prototype, "_collapsed", void 0), Cn = d([D("webmapx-inset-map")], Cn);
8148
+ })], Cn.prototype, "_collapsed", void 0), Cn = S([p("webmapx-inset-map")], Cn);
8146
8149
  //#endregion
8147
8150
  //#region src/components/webmapx-active-adapter.ts
8148
8151
  var wn = {
@@ -8150,12 +8153,12 @@ var wn = {
8150
8153
  openlayers: "OpenLayers",
8151
8154
  leaflet: "Leaflet",
8152
8155
  cesium: "Cesium"
8153
- }, Tn = class extends f {
8156
+ }, Tn = class extends C {
8154
8157
  constructor(...e) {
8155
8158
  super(...e), this.adapterName = "—", this.engineVersion = "";
8156
8159
  }
8157
8160
  static {
8158
- this.styles = C`
8161
+ this.styles = u`
8159
8162
  :host { display: inline-block; }
8160
8163
  .badge {
8161
8164
  display: inline-flex;
@@ -8187,7 +8190,7 @@ var wn = {
8187
8190
  this.adapterName = "—", this.engineVersion = "";
8188
8191
  }
8189
8192
  render() {
8190
- return w`
8193
+ return m`
8191
8194
  <span class="badge">
8192
8195
  <span class="dot"></span>
8193
8196
  ${this.adapterName}${this.engineVersion ? ` ${this.engineVersion}` : ""}
@@ -8195,5 +8198,5 @@ var wn = {
8195
8198
  `;
8196
8199
  }
8197
8200
  };
8198
- d([A()], Tn.prototype, "adapterName", void 0), d([A()], Tn.prototype, "engineVersion", void 0), Tn = d([D("webmapx-active-adapter")], Tn);
8201
+ S([d()], Tn.prototype, "adapterName", void 0), S([d()], Tn.prototype, "engineVersion", void 0), Tn = S([p("webmapx-active-adapter")], Tn);
8199
8202
  //#endregion