@edugis-org/webmapx 0.1.9 → 0.1.10

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 (45) hide show
  1. package/dist-lib/alert-C_G5X6J8.js +311 -0
  2. package/dist-lib/button-BlZd3WPH.js +744 -0
  3. package/dist-lib/checkbox-DB4oPyyw.js +287 -0
  4. package/dist-lib/chunk.36O46B5H-km1dakSW.js +77 -0
  5. package/dist-lib/chunk.3RPBFEDE-Cxq6VVR6.js +138 -0
  6. package/dist-lib/chunk.3Y6SB6QS-DUJ8Ickw.js +18 -0
  7. package/dist-lib/chunk.5JY5FUCG-CYkzbQXS.js +1071 -0
  8. package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +99 -0
  9. package/dist-lib/chunk.AJ3ENQ5C-DXVGX5Dn.js +177 -0
  10. package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +8 -0
  11. package/dist-lib/chunk.NYIIDP5N-B4UCI-rQ.js +34 -0
  12. package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +43 -0
  13. package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +61 -0
  14. package/dist-lib/chunk.YHLNUJ7P-ByKy0MKm.js +251 -0
  15. package/dist-lib/{decorate-DnZTfaod.js → decorate-CKr8yG1g.js} +1 -1
  16. package/dist-lib/divider-BOFbR_Ny.js +41 -0
  17. package/dist-lib/icon-CBNpO1lq.js +9 -0
  18. package/dist-lib/icon-button-B5rXu3Gg.js +410 -0
  19. package/dist-lib/input-B212BH6L.js +575 -0
  20. package/dist-lib/option-BQN9Zz_8.js +1108 -0
  21. package/dist-lib/spinner-DdcBaa3z.js +6 -0
  22. package/dist-lib/{toast-BsoXOdeA.js → toast-Bq2PmEpm.js} +1 -1
  23. package/dist-lib/tooltip-CBGOiZwJ.js +197 -0
  24. package/dist-lib/{webmapx-3d-tool-CLppA7mK.js → webmapx-3d-tool-CKoLGMpk.js} +2 -2
  25. package/dist-lib/{webmapx-base-tool-DfRa7TlD.js → webmapx-base-tool-Bc9Wz0yA.js} +1 -1
  26. package/dist-lib/{webmapx-config-edit-tool-BztWspia.js → webmapx-config-edit-tool-7265_DNz.js} +7 -7
  27. package/dist-lib/{webmapx-coordinates-tool-DnTSkrRG.js → webmapx-coordinates-tool-nwlckVn6.js} +3 -3
  28. package/dist-lib/{webmapx-core-bundle-CH-5vYXU.js → webmapx-core-bundle-Q6mWOib1.js} +1579 -671
  29. package/dist-lib/webmapx-draw-tool-6QRr5Gip.js +4315 -0
  30. package/dist-lib/{webmapx-geolocation-tool-DIMh2kIr.js → webmapx-geolocation-tool-qxN5aaVB.js} +6 -7
  31. package/dist-lib/{webmapx-import-layer-tool-DMiC1TpU.js → webmapx-import-layer-tool-tJ374qHR.js} +2 -2
  32. package/dist-lib/{webmapx-info-tool-D-XbAU9J.js → webmapx-info-tool-C3txgv3v.js} +4 -4
  33. package/dist-lib/{webmapx-language-osmvector-BAw9TR-M.js → webmapx-language-osmvector-jQzTOPU1.js} +3 -4
  34. package/dist-lib/{webmapx-measure-tool-CXlg11s8.js → webmapx-measure-tool-Cxxrzgdf.js} +4 -4
  35. package/dist-lib/{webmapx-modal-tool-Cs7LRrgW.js → webmapx-modal-tool-DQVHNXqX.js} +2 -2
  36. package/dist-lib/{webmapx-plugin-tool-qe2yTrWB.js → webmapx-plugin-tool-BNZ61x6s.js} +1 -1
  37. package/dist-lib/{webmapx-print-tool-DrK9sLC7.js → webmapx-print-tool-BDOTbS6u.js} +7 -8
  38. package/dist-lib/{webmapx-search-tool-H7NisgWH.js → webmapx-search-tool-CHlsE2Wx.js} +2 -2
  39. package/dist-lib/webmapx-settings-B0AT9Vjn.js +482 -0
  40. package/dist-lib/{webmapx-truearea-tool-CSU9mE1D.js → webmapx-truearea-tool-dxSgcbOj.js} +2 -2
  41. package/dist-lib/{webmapx-view-mode-tool-D1QyQfq8.js → webmapx-view-mode-tool-DVSMakdh.js} +2 -2
  42. package/dist-lib/webmapx.js +312 -311
  43. package/package.json +1 -1
  44. package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +0 -2117
  45. package/dist-lib/webmapx-settings-EHSm-AGU.js +0 -167
@@ -1,28 +1,35 @@
1
1
  import { a as e, t } from "./chunk-HEgqtunE.js";
2
- import { a as n, i as r, o as i, r as a, t as o } from "./decorate-DnZTfaod.js";
3
- import { t as s } from "./webmapx-base-tool-DfRa7TlD.js";
4
- import "./webmapx-plugin-tool-qe2yTrWB.js";
5
- import { n as c, r as l } from "./attribution-format-B4f05_u0.js";
6
- import { a as u, i as d, t as f } from "./zip.js-DVhmtjxZ.js";
7
- import { i as p } from "./geo-calculations-DbFJAUoI.js";
8
- import { t as m } from "./throttle-BeneRNYK.js";
9
- import "./webmapx-modal-tool-Cs7LRrgW.js";
10
- import { LitElement as h, css as g, html as _, nothing as v, svg as y } from "lit";
11
- import { customElement as b, property as x, query as S, queryAssignedElements as C, state as w } from "lit/decorators.js";
12
- import "@shoelace-style/shoelace/dist/components/button/button.js";
13
- import "@shoelace-style/shoelace/dist/components/icon/icon.js";
14
- import "@shoelace-style/shoelace/dist/components/tree/tree.js";
15
- import "@shoelace-style/shoelace/dist/components/tree-item/tree-item.js";
16
- import "@shoelace-style/shoelace/dist/components/checkbox/checkbox.js";
17
- import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
18
- import { unsafeHTML as ee } from "lit-html/directives/unsafe-html.js";
19
- import "@shoelace-style/shoelace/dist/components/dialog/dialog.js";
20
- import "@shoelace-style/shoelace/dist/components/input/input.js";
21
- import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js";
22
- import "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js";
23
- import "@shoelace-style/shoelace/dist/components/range/range.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";
24
31
  //#region src/components/webmapx-layout.ts
25
- var te = class extends h {
32
+ var ge = class extends S {
26
33
  constructor(...e) {
27
34
  super(...e), this.slotDirections = {
28
35
  "top-left": "vertical",
@@ -37,7 +44,7 @@ var te = class extends h {
37
44
  };
38
45
  }
39
46
  static {
40
- this.styles = g`
47
+ this.styles = C`
41
48
  :host {
42
49
  position: absolute;
43
50
  inset: 0;
@@ -185,7 +192,7 @@ var te = class extends h {
185
192
  `;
186
193
  }
187
194
  render() {
188
- return _`
195
+ return w`
189
196
  <div class="overlay-surface">
190
197
  <!-- Edge zones first (lowest stacking order) -->
191
198
  <div class="slot-zone slot-zone--edge-bottom-right">
@@ -247,22 +254,22 @@ var te = class extends h {
247
254
  })?.getAttribute("direction") === "horizontal" ? "horizontal" : "vertical";
248
255
  }
249
256
  };
250
- o([w()], te.prototype, "slotDirections", void 0), te = o([b("webmapx-layout")], te);
257
+ d([A()], ge.prototype, "slotDirections", void 0), ge = d([D("webmapx-layout")], ge);
251
258
  //#endregion
252
259
  //#region src/components/internal/tool-selection-scope.ts
253
- function T(e, t) {
260
+ function N(e, t) {
254
261
  return !!(t && e.includes(t));
255
262
  }
256
- function ne(e, t) {
263
+ function _e(e, t) {
257
264
  return !!(e.sourceToolbar && t && e.sourceToolbar !== t);
258
265
  }
259
- function re(e) {
266
+ function ve(e) {
260
267
  let { toolIds: t, currentActiveToolId: n, detail: r, ownToolbar: i } = e;
261
- if (!ne(r, i)) return r.toolId ? T(t, r.toolId) ? r.toolId : void 0 : r.previousToolId ? T(t, r.previousToolId) ? null : void 0 : r.toolId === null ? null : void 0;
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;
262
269
  }
263
270
  //#endregion
264
271
  //#region src/components/webmapx-toolbar.ts
265
- var ie = class extends h {
272
+ var P = class extends S {
266
273
  constructor(...e) {
267
274
  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) => {
268
275
  let t = this.focusableButtons();
@@ -280,7 +287,7 @@ var ie = class extends h {
280
287
  }, this.boundHandleClick = (e) => this.handleButtonClick(e);
281
288
  }
282
289
  static {
283
- this.styles = g`
290
+ this.styles = C`
284
291
  :host {
285
292
  display: flex;
286
293
  flex-direction: column;
@@ -405,7 +412,7 @@ var ie = class extends h {
405
412
  this.hasButtonForTool(t) && this.clearActiveButtons();
406
413
  }
407
414
  handleToolSelect(e) {
408
- let t = e.detail ?? {}, n = re({
415
+ let t = e.detail ?? {}, n = ve({
409
416
  toolIds: this.getToolIds(),
410
417
  currentActiveToolId: this.getActiveButtonToolId(),
411
418
  detail: t,
@@ -435,7 +442,7 @@ var ie = class extends h {
435
442
  }), this.applyRovingTabindex();
436
443
  }
437
444
  hasButtonForTool(e) {
438
- return T(this.getToolIds(), e);
445
+ return N(this.getToolIds(), e);
439
446
  }
440
447
  getToolIds() {
441
448
  return this.buttons.map((e) => e.getAttribute("name") || e.getAttribute("data-tool")).filter((e) => !!e);
@@ -445,20 +452,20 @@ var ie = class extends h {
445
452
  return e?.getAttribute("name") || e?.getAttribute("data-tool") || null;
446
453
  }
447
454
  render() {
448
- return _`
455
+ return w`
449
456
  <slot name="before"></slot>
450
457
  <slot @slotchange=${this.handleSlotChange}></slot>
451
458
  <slot name="after"></slot>
452
459
  `;
453
460
  }
454
461
  };
455
- o([x({
462
+ d([O({
456
463
  type: String,
457
464
  reflect: !0
458
- })], ie.prototype, "orientation", void 0), o([C()], ie.prototype, "buttons", void 0), ie = o([b("webmapx-toolbar")], ie);
465
+ })], P.prototype, "orientation", void 0), d([fe()], P.prototype, "buttons", void 0), P = d([D("webmapx-toolbar")], P);
459
466
  //#endregion
460
467
  //#region src/components/webmapx-tool-panel.ts
461
- var ae = class extends h {
468
+ var ye = class extends S {
462
469
  constructor(...e) {
463
470
  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;
464
471
  }
@@ -537,7 +544,7 @@ var ae = class extends h {
537
544
  }
538
545
  handleToolSelect(e) {
539
546
  let t = e.detail ?? {};
540
- if (ne(t, this.resolveToolbar())) return;
547
+ if (_e(t, this.resolveToolbar())) return;
541
548
  let n = t.toolId ?? null, r = t.previousToolId ?? null;
542
549
  if (!(n && this.mapHost?.toolManager?.getTool(n))) {
543
550
  if (!n) {
@@ -557,7 +564,7 @@ var ae = class extends h {
557
564
  return this.mapHost?.querySelector("webmapx-toolbar") ?? null;
558
565
  }
559
566
  static {
560
- this.styles = g`
567
+ this.styles = C`
561
568
  :host {
562
569
  display: none;
563
570
  box-sizing: border-box;
@@ -647,7 +654,7 @@ var ae = class extends h {
647
654
  n && n.focus?.();
648
655
  }
649
656
  render() {
650
- return _`
657
+ return w`
651
658
  <div class="panel-header">
652
659
  <slot name="header"><h3>${this.label}</h3></slot>
653
660
  <sl-button size="small" circle variant="text" @click=${this.toggleCollapsed}>
@@ -664,21 +671,518 @@ var ae = class extends h {
664
671
  `;
665
672
  }
666
673
  };
667
- o([x({ type: String })], ae.prototype, "label", void 0), o([x({
674
+ d([O({ type: String })], ye.prototype, "label", void 0), d([O({
668
675
  type: Boolean,
669
676
  reflect: !0
670
- })], ae.prototype, "active", void 0), o([x({
677
+ })], ye.prototype, "active", void 0), d([O({
671
678
  type: Boolean,
672
679
  reflect: !0
673
- })], ae.prototype, "collapsed", void 0), ae = o([b("webmapx-tool-panel")], ae);
680
+ })], ye.prototype, "collapsed", void 0), ye = d([D("webmapx-tool-panel")], ye);
681
+ //#endregion
682
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.BWVSW6TI.js
683
+ var be = C`
684
+ :host {
685
+ display: block;
686
+ outline: 0;
687
+ z-index: 0;
688
+ }
689
+
690
+ :host(:focus) {
691
+ outline: none;
692
+ }
693
+
694
+ slot:not([name])::slotted(sl-icon) {
695
+ margin-inline-end: var(--sl-spacing-x-small);
696
+ }
697
+
698
+ .tree-item {
699
+ position: relative;
700
+ display: flex;
701
+ align-items: stretch;
702
+ flex-direction: column;
703
+ color: var(--sl-color-neutral-700);
704
+ cursor: pointer;
705
+ user-select: none;
706
+ -webkit-user-select: none;
707
+ }
708
+
709
+ .tree-item__checkbox {
710
+ pointer-events: none;
711
+ }
712
+
713
+ .tree-item__expand-button,
714
+ .tree-item__checkbox,
715
+ .tree-item__label {
716
+ font-family: var(--sl-font-sans);
717
+ font-size: var(--sl-font-size-medium);
718
+ font-weight: var(--sl-font-weight-normal);
719
+ line-height: var(--sl-line-height-dense);
720
+ letter-spacing: var(--sl-letter-spacing-normal);
721
+ }
722
+
723
+ .tree-item__checkbox::part(base) {
724
+ display: flex;
725
+ align-items: center;
726
+ }
727
+
728
+ .tree-item__indentation {
729
+ display: block;
730
+ width: 1em;
731
+ flex-shrink: 0;
732
+ }
733
+
734
+ .tree-item__expand-button {
735
+ display: flex;
736
+ align-items: center;
737
+ justify-content: center;
738
+ box-sizing: content-box;
739
+ color: var(--sl-color-neutral-500);
740
+ padding: var(--sl-spacing-x-small);
741
+ width: 1rem;
742
+ height: 1rem;
743
+ flex-shrink: 0;
744
+ cursor: pointer;
745
+ }
746
+
747
+ .tree-item__expand-button {
748
+ transition: var(--sl-transition-medium) rotate ease;
749
+ }
750
+
751
+ .tree-item--expanded .tree-item__expand-button {
752
+ rotate: 90deg;
753
+ }
754
+
755
+ .tree-item--expanded.tree-item--rtl .tree-item__expand-button {
756
+ rotate: -90deg;
757
+ }
758
+
759
+ .tree-item--expanded slot[name='expand-icon'],
760
+ .tree-item:not(.tree-item--expanded) slot[name='collapse-icon'] {
761
+ display: none;
762
+ }
763
+
764
+ .tree-item:not(.tree-item--has-expand-button) .tree-item__expand-icon-slot {
765
+ display: none;
766
+ }
767
+
768
+ .tree-item__expand-button--visible {
769
+ cursor: pointer;
770
+ }
771
+
772
+ .tree-item__item {
773
+ display: flex;
774
+ align-items: center;
775
+ border-inline-start: solid 3px transparent;
776
+ }
777
+
778
+ .tree-item--disabled .tree-item__item {
779
+ opacity: 0.5;
780
+ outline: none;
781
+ cursor: not-allowed;
782
+ }
783
+
784
+ :host(:focus-visible) .tree-item__item {
785
+ outline: var(--sl-focus-ring);
786
+ outline-offset: var(--sl-focus-ring-offset);
787
+ z-index: 2;
788
+ }
789
+
790
+ :host(:not([aria-disabled='true'])) .tree-item--selected .tree-item__item {
791
+ background-color: var(--sl-color-neutral-100);
792
+ border-inline-start-color: var(--sl-color-primary-600);
793
+ }
794
+
795
+ :host(:not([aria-disabled='true'])) .tree-item__expand-button {
796
+ color: var(--sl-color-neutral-600);
797
+ }
798
+
799
+ .tree-item__label {
800
+ display: flex;
801
+ align-items: center;
802
+ transition: var(--sl-transition-fast) color;
803
+ }
804
+
805
+ .tree-item__children {
806
+ display: block;
807
+ font-size: calc(1em + var(--indent-size, var(--sl-spacing-medium)));
808
+ }
809
+
810
+ /* Indentation lines */
811
+ .tree-item__children {
812
+ position: relative;
813
+ }
814
+
815
+ .tree-item__children::before {
816
+ content: '';
817
+ position: absolute;
818
+ top: var(--indent-guide-offset);
819
+ bottom: var(--indent-guide-offset);
820
+ left: calc(1em - (var(--indent-guide-width) / 2) - 1px);
821
+ border-inline-end: var(--indent-guide-width) var(--indent-guide-style) var(--indent-guide-color);
822
+ z-index: 1;
823
+ }
824
+
825
+ .tree-item--rtl .tree-item__children::before {
826
+ left: auto;
827
+ right: 1em;
828
+ }
829
+
830
+ @media (forced-colors: active) {
831
+ :host(:not([aria-disabled='true'])) .tree-item--selected .tree-item__item {
832
+ outline: dashed 1px SelectedItem;
833
+ }
834
+ }
835
+ `, F = class e extends i {
836
+ 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;
838
+ }
839
+ static isTreeItem(e) {
840
+ return e instanceof Element && e.getAttribute("role") === "treeitem";
841
+ }
842
+ connectedCallback() {
843
+ super.connectedCallback(), this.setAttribute("role", "treeitem"), this.setAttribute("tabindex", "-1"), this.isNestedItem() && (this.slot = "children");
844
+ }
845
+ firstUpdated() {
846
+ this.childrenContainer.hidden = !this.expanded, this.childrenContainer.style.height = this.expanded ? "auto" : "0", this.isLeaf = !this.lazy && this.getChildrenItems().length === 0, this.handleExpandedChange();
847
+ }
848
+ 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
+ }
853
+ isNestedItem() {
854
+ let t = this.parentElement;
855
+ return !!t && e.isTreeItem(t);
856
+ }
857
+ handleChildrenSlotChange() {
858
+ this.loading = !1, this.isLeaf = !this.lazy && this.getChildrenItems().length === 0;
859
+ }
860
+ willUpdate(e) {
861
+ e.has("selected") && !e.has("indeterminate") && (this.indeterminate = !1);
862
+ }
863
+ 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
+ }
868
+ handleLoadingChange() {
869
+ this.setAttribute("aria-busy", this.loading ? "true" : "false"), this.loading || this.animateExpand();
870
+ }
871
+ handleDisabledChange() {
872
+ this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
873
+ }
874
+ handleSelectedChange() {
875
+ this.setAttribute("aria-selected", this.selected ? "true" : "false");
876
+ }
877
+ handleExpandedChange() {
878
+ this.isLeaf ? this.removeAttribute("aria-expanded") : this.setAttribute("aria-expanded", this.expanded ? "true" : "false");
879
+ }
880
+ handleExpandAnimation() {
881
+ this.expanded ? this.lazy ? (this.loading = !0, this.emit("sl-lazy-load")) : this.animateExpand() : this.animateCollapse();
882
+ }
883
+ handleLazyChange() {
884
+ this.emit("sl-lazy-change");
885
+ }
886
+ getChildrenItems({ includeDisabled: t = !0 } = {}) {
887
+ return this.childrenSlot ? [...this.childrenSlot.assignedElements({ flatten: !0 })].filter((n) => e.isTreeItem(n) && (t || !n.disabled)) : [];
888
+ }
889
+ render() {
890
+ let e = this.localize.dir() === "rtl", t = !this.loading && (!this.isLeaf || this.lazy);
891
+ return w`
892
+ <div
893
+ part="base"
894
+ class="${pe({
895
+ "tree-item": !0,
896
+ "tree-item--expanded": this.expanded,
897
+ "tree-item--selected": this.selected,
898
+ "tree-item--disabled": this.disabled,
899
+ "tree-item--leaf": this.isLeaf,
900
+ "tree-item--has-expand-button": t,
901
+ "tree-item--rtl": this.localize.dir() === "rtl"
902
+ })}"
903
+ >
904
+ <div
905
+ class="tree-item__item"
906
+ part="
907
+ item
908
+ ${this.disabled ? "item--disabled" : ""}
909
+ ${this.expanded ? "item--expanded" : ""}
910
+ ${this.indeterminate ? "item--indeterminate" : ""}
911
+ ${this.selected ? "item--selected" : ""}
912
+ "
913
+ >
914
+ <div class="tree-item__indentation" part="indentation"></div>
915
+
916
+ <div
917
+ part="expand-button"
918
+ class=${pe({
919
+ "tree-item__expand-button": !0,
920
+ "tree-item__expand-button--visible": t
921
+ })}
922
+ aria-hidden="true"
923
+ >
924
+ ${he(this.loading, () => w` <sl-spinner part="spinner" exportparts="base:spinner__base"></sl-spinner> `)}
925
+ <slot class="tree-item__expand-icon-slot" name="expand-icon">
926
+ <sl-icon library="system" name=${e ? "chevron-left" : "chevron-right"}></sl-icon>
927
+ </slot>
928
+ <slot class="tree-item__expand-icon-slot" name="collapse-icon">
929
+ <sl-icon library="system" name=${e ? "chevron-left" : "chevron-right"}></sl-icon>
930
+ </slot>
931
+ </div>
932
+
933
+ ${he(this.selectable, () => w`
934
+ <sl-checkbox
935
+ part="checkbox"
936
+ exportparts="
937
+ base:checkbox__base,
938
+ control:checkbox__control,
939
+ control--checked:checkbox__control--checked,
940
+ control--indeterminate:checkbox__control--indeterminate,
941
+ checked-icon:checkbox__checked-icon,
942
+ indeterminate-icon:checkbox__indeterminate-icon,
943
+ label:checkbox__label
944
+ "
945
+ class="tree-item__checkbox"
946
+ ?disabled="${this.disabled}"
947
+ ?checked="${j(this.selected)}"
948
+ ?indeterminate="${this.indeterminate}"
949
+ tabindex="-1"
950
+ ></sl-checkbox>
951
+ `)}
952
+
953
+ <slot class="tree-item__label" part="label"></slot>
954
+ </div>
955
+
956
+ <div class="tree-item__children" part="children" role="group">
957
+ <slot name="children" @slotchange="${this.handleChildrenSlotChange}"></slot>
958
+ </div>
959
+ </div>
960
+ `;
961
+ }
962
+ };
963
+ F.styles = [a, be], F.dependencies = {
964
+ "sl-checkbox": x,
965
+ "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({
968
+ type: Boolean,
969
+ reflect: !0
970
+ })], F.prototype, "expanded", 2), n([O({
971
+ type: Boolean,
972
+ reflect: !0
973
+ })], F.prototype, "selected", 2), n([O({
974
+ type: Boolean,
975
+ reflect: !0
976
+ })], F.prototype, "disabled", 2), n([O({
977
+ type: Boolean,
978
+ 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
+ keyframes: [{
983
+ height: "0",
984
+ opacity: "0",
985
+ overflow: "hidden"
986
+ }, {
987
+ height: "auto",
988
+ opacity: "1",
989
+ overflow: "hidden"
990
+ }],
991
+ options: {
992
+ duration: 250,
993
+ easing: "cubic-bezier(0.4, 0.0, 0.2, 1)"
994
+ }
995
+ }), g("tree-item.collapse", {
996
+ keyframes: [{
997
+ height: "auto",
998
+ opacity: "1",
999
+ overflow: "hidden"
1000
+ }, {
1001
+ height: "0",
1002
+ opacity: "0",
1003
+ overflow: "hidden"
1004
+ }],
1005
+ options: {
1006
+ duration: 200,
1007
+ easing: "cubic-bezier(0.4, 0.0, 0.2, 1)"
1008
+ }
1009
+ });
1010
+ //#endregion
1011
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.G7B7WU5W.js
1012
+ var Se = C`
1013
+ :host {
1014
+ /*
1015
+ * These are actually used by tree item, but we define them here so they can more easily be set and all tree items
1016
+ * stay consistent.
1017
+ */
1018
+ --indent-guide-color: var(--sl-color-neutral-200);
1019
+ --indent-guide-offset: 0;
1020
+ --indent-guide-style: solid;
1021
+ --indent-guide-width: 0;
1022
+ --indent-size: var(--sl-spacing-large);
1023
+
1024
+ display: block;
1025
+
1026
+ /*
1027
+ * Tree item indentation uses the "em" unit to increment its width on each level, so setting the font size to zero
1028
+ * here removes the indentation for all the nodes on the first level.
1029
+ */
1030
+ font-size: 0;
1031
+ }
1032
+ `;
1033
+ //#endregion
1034
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.MSDIZVRW.js
1035
+ function Ce(e, t = !1) {
1036
+ function n(e) {
1037
+ let t = e.getChildrenItems({ includeDisabled: !1 });
1038
+ if (t.length) {
1039
+ let n = t.every((e) => e.selected), r = t.every((e) => !e.selected && !e.indeterminate);
1040
+ e.selected = n, e.indeterminate = !n && !r;
1041
+ }
1042
+ }
1043
+ function r(e) {
1044
+ let t = e.parentElement;
1045
+ xe.isTreeItem(t) && (n(t), r(t));
1046
+ }
1047
+ function i(e) {
1048
+ for (let n of e.getChildrenItems()) n.selected = t ? e.selected || n.selected : !n.disabled && e.selected, i(n);
1049
+ t && n(e);
1050
+ }
1051
+ i(e), r(e);
1052
+ }
1053
+ var I = class extends i {
1054
+ constructor() {
1055
+ super(), this.selection = "single", this.clickTarget = null, this.localize = new v(this), this.initTreeItem = (e) => {
1056
+ e.selectable = this.selection === "multiple", ["expand", "collapse"].filter((e) => !!this.querySelector(`[slot="${e}-icon"]`)).forEach((t) => {
1057
+ let n = e.querySelector(`[slot="${t}-icon"]`), r = this.getExpandButtonIcon(t);
1058
+ r && (n === null ? e.append(r) : n.hasAttribute("data-default") && n.replaceWith(r));
1059
+ });
1060
+ }, this.handleTreeChanged = (e) => {
1061
+ for (let t of e) {
1062
+ let e = [...t.addedNodes].filter(xe.isTreeItem), n = [...t.removedNodes].filter(xe.isTreeItem);
1063
+ e.forEach(this.initTreeItem), this.lastFocusedItem && n.includes(this.lastFocusedItem) && (this.lastFocusedItem = null);
1064
+ }
1065
+ }, this.handleFocusOut = (e) => {
1066
+ let t = e.relatedTarget;
1067
+ (!t || !this.contains(t)) && (this.tabIndex = 0);
1068
+ }, this.handleFocusIn = (e) => {
1069
+ 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);
1071
+ }, this.addEventListener("focusin", this.handleFocusIn), this.addEventListener("focusout", this.handleFocusOut), this.addEventListener("sl-lazy-change", this.handleSlotChange);
1072
+ }
1073
+ async connectedCallback() {
1074
+ super.connectedCallback(), this.setAttribute("role", "tree"), this.setAttribute("tabindex", "0"), await this.updateComplete, this.mutationObserver = new MutationObserver(this.handleTreeChanged), this.mutationObserver.observe(this, {
1075
+ childList: !0,
1076
+ subtree: !0
1077
+ });
1078
+ }
1079
+ disconnectedCallback() {
1080
+ var e;
1081
+ super.disconnectedCallback(), (e = this.mutationObserver) == null || e.disconnect();
1082
+ }
1083
+ getExpandButtonIcon(e) {
1084
+ let t = (e === "expand" ? this.expandedIconSlot : this.collapsedIconSlot).assignedElements({ flatten: !0 })[0];
1085
+ if (t) {
1086
+ let n = t.cloneNode(!0);
1087
+ return [n, ...n.querySelectorAll("[id]")].forEach((e) => e.removeAttribute("id")), n.setAttribute("data-default", ""), n.slot = `${e}-icon`, n;
1088
+ }
1089
+ return null;
1090
+ }
1091
+ selectItem(e) {
1092
+ let t = [...this.selectedItems];
1093
+ if (this.selection === "multiple") e.selected = !e.selected, e.lazy && (e.expanded = !0), Ce(e);
1094
+ else if (this.selection === "single" || e.isLeaf) {
1095
+ let t = this.getAllTreeItems();
1096
+ for (let n of t) n.selected = n === e;
1097
+ } else this.selection === "leaf" && (e.expanded = !e.expanded);
1098
+ let n = this.selectedItems;
1099
+ (t.length !== n.length || n.some((e) => !t.includes(e))) && Promise.all(n.map((e) => e.updateComplete)).then(() => {
1100
+ this.emit("sl-selection-change", { detail: { selection: n } });
1101
+ });
1102
+ }
1103
+ getAllTreeItems() {
1104
+ return [...this.querySelectorAll("sl-tree-item")];
1105
+ }
1106
+ focusItem(e) {
1107
+ e?.focus();
1108
+ }
1109
+ handleKeyDown(e) {
1110
+ if (![
1111
+ "ArrowDown",
1112
+ "ArrowUp",
1113
+ "ArrowRight",
1114
+ "ArrowLeft",
1115
+ "Home",
1116
+ "End",
1117
+ "Enter",
1118
+ " "
1119
+ ].includes(e.key) || e.composedPath().some((e) => ["input", "textarea"].includes((e?.tagName)?.toLowerCase()))) return;
1120
+ let t = this.getFocusableItems(), n = this.localize.dir() === "ltr", r = this.localize.dir() === "rtl";
1121
+ if (t.length > 0) {
1122
+ e.preventDefault();
1123
+ let i = t.findIndex((e) => e.matches(":focus")), a = t[i], o = (e) => {
1124
+ let n = t[re(e, 0, t.length - 1)];
1125
+ this.focusItem(n);
1126
+ }, s = (e) => {
1127
+ a.expanded = e;
1128
+ };
1129
+ e.key === "ArrowDown" ? o(i + 1) : e.key === "ArrowUp" ? o(i - 1) : n && e.key === "ArrowRight" || r && e.key === "ArrowLeft" ? !a || a.disabled || a.expanded || a.isLeaf && !a.lazy ? o(i + 1) : s(!0) : n && e.key === "ArrowLeft" || r && e.key === "ArrowRight" ? !a || a.disabled || a.isLeaf || !a.expanded ? o(i - 1) : s(!1) : e.key === "Home" ? o(0) : e.key === "End" ? o(t.length - 1) : (e.key === "Enter" || e.key === " ") && (a.disabled || this.selectItem(a));
1130
+ }
1131
+ }
1132
+ handleClick(e) {
1133
+ let t = e.target, n = t.closest("sl-tree-item"), r = e.composedPath().some((e) => (e?.classList)?.contains("tree-item__expand-button"));
1134
+ !n || n.disabled || t !== this.clickTarget || (r ? n.expanded = !n.expanded : this.selectItem(n));
1135
+ }
1136
+ handleMouseDown(e) {
1137
+ this.clickTarget = e.target;
1138
+ }
1139
+ handleSlotChange() {
1140
+ this.getAllTreeItems().forEach(this.initTreeItem);
1141
+ }
1142
+ async handleSelectionChange() {
1143
+ let e = this.selection === "multiple", t = this.getAllTreeItems();
1144
+ this.setAttribute("aria-multiselectable", e ? "true" : "false");
1145
+ for (let n of t) n.selectable = e;
1146
+ e && (await this.updateComplete, [...this.querySelectorAll(":scope > sl-tree-item")].forEach((e) => Ce(e, !0)));
1147
+ }
1148
+ get selectedItems() {
1149
+ return this.getAllTreeItems().filter((e) => e.selected);
1150
+ }
1151
+ getFocusableItems() {
1152
+ let e = this.getAllTreeItems(), t = /* @__PURE__ */ new Set();
1153
+ return e.filter((e) => {
1154
+ if (e.disabled) return !1;
1155
+ let n = e.parentElement?.closest("[role=treeitem]");
1156
+ return n && (!n.expanded || n.loading || t.has(n)) && t.add(e), !t.has(e);
1157
+ });
1158
+ }
1159
+ render() {
1160
+ return w`
1161
+ <div
1162
+ part="base"
1163
+ class="tree"
1164
+ @click=${this.handleClick}
1165
+ @keydown=${this.handleKeyDown}
1166
+ @mousedown=${this.handleMouseDown}
1167
+ >
1168
+ <slot @slotchange=${this.handleSlotChange}></slot>
1169
+ <span hidden aria-hidden="true"><slot name="expand-icon"></slot></span>
1170
+ <span hidden aria-hidden="true"><slot name="collapse-icon"></slot></span>
1171
+ </div>
1172
+ `;
1173
+ }
1174
+ };
1175
+ //#endregion
1176
+ //#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");
674
1178
  //#endregion
675
1179
  //#region src/components/webmapx-layer-tree.ts
676
- var E = class extends h {
1180
+ var we = class extends S {
677
1181
  constructor(...e) {
678
1182
  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;
679
1183
  }
680
1184
  static {
681
- this.styles = g`
1185
+ this.styles = C`
682
1186
  :host {
683
1187
  display: block;
684
1188
  height: auto; /* let parent control available height */
@@ -1140,7 +1644,7 @@ var E = class extends h {
1140
1644
  renderNode(e, t, n = "0") {
1141
1645
  if ((e.type === "getcapabilities" || e.type === "capabilities") && e.url) {
1142
1646
  let r = this.capsKey(e), i = this.capsCache.get(r), a = this.getChildSelectionContext(e, t, n), o;
1143
- return o = !i || i.status === "loading" ? _`<sl-tree-item disabled><sl-spinner style="font-size:0.85rem"></sl-spinner> Loading…</sl-tree-item>` : i.status === "error" ? _`<sl-tree-item disabled style="color:var(--sl-color-danger-600)">⚠ ${i.error}</sl-tree-item>` : _`${i.children.map((e, t) => this.renderNode(e, a, `${n}.${t}`))}`, _`
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`
1144
1648
  <sl-tree-item ?expanded=${e.expanded} data-node-key=${n}
1145
1649
  @sl-expand=${() => {
1146
1650
  this.fetchCapabilities(e);
@@ -1149,12 +1653,12 @@ var E = class extends h {
1149
1653
  ${o}
1150
1654
  </sl-tree-item>`;
1151
1655
  }
1152
- if (e.separator) return _`
1656
+ if (e.separator) return w`
1153
1657
  <sl-tree-item class="separator-item" data-node-key=${n} tabindex="-1" aria-hidden="true">
1154
1658
  <span class="tree-separator">${this.resolveNodeLabel(e)}</span>
1155
1659
  </sl-tree-item>`;
1156
1660
  let r = this.getChildSelectionContext(e, t, n);
1157
- if (this.nodeByKey.set(n, e), e.children && e.children.length > 0) return _`
1661
+ if (this.nodeByKey.set(n, e), e.children && e.children.length > 0) return w`
1158
1662
  <sl-tree-item ?expanded=${e.expanded} data-node-key=${n}>
1159
1663
  <span @click=${(e) => {
1160
1664
  let t = e.currentTarget.closest("sl-tree-item");
@@ -1165,11 +1669,11 @@ var E = class extends h {
1165
1669
  `;
1166
1670
  {
1167
1671
  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;
1168
- return _`
1672
+ return w`
1169
1673
  <sl-tree-item data-node-key=${n} @keydown=${(e) => {
1170
1674
  (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();
1171
1675
  }}>
1172
- ${t ? _`
1676
+ ${t ? w`
1173
1677
  <label class="layer-radio">
1174
1678
  <input
1175
1679
  type="radio"
@@ -1185,7 +1689,7 @@ var E = class extends h {
1185
1689
  />
1186
1690
  <span>${s}</span>
1187
1691
  </label>
1188
- ` : _`
1692
+ ` : w`
1189
1693
  <sl-checkbox
1190
1694
  ?checked=${e.checked}
1191
1695
  ?disabled=${a}
@@ -1244,8 +1748,8 @@ var E = class extends h {
1244
1748
  render() {
1245
1749
  this.nodeByKey.clear();
1246
1750
  let e = this.searchQuery.trim().toLowerCase(), t = e ? this.filterTree(this.effectiveTree, e) : this.effectiveTree;
1247
- return _`
1248
- ${this.showSearch ? _`
1751
+ return w`
1752
+ ${this.showSearch ? w`
1249
1753
  <div class="search">
1250
1754
  <input
1251
1755
  type="text"
@@ -1255,22 +1759,22 @@ var E = class extends h {
1255
1759
  .value=${this.searchQuery}
1256
1760
  @input=${this.handleSearchInput}
1257
1761
  />
1258
- ${this.searchQuery ? _`<button class="search-clear" @click=${this.handleSearchClear} aria-label="Clear search">&times;</button>` : _``}
1762
+ ${this.searchQuery ? w`<button class="search-clear" @click=${this.handleSearchClear} aria-label="Clear search">&times;</button>` : w``}
1259
1763
  </div>
1260
- ` : _``}
1764
+ ` : w``}
1261
1765
  <sl-tree @sl-expand=${this.handleTreeExpand}>
1262
1766
  ${t.map((e, t) => this.renderNode(e, void 0, `${t}`))}
1263
1767
  </sl-tree>
1264
1768
  `;
1265
1769
  }
1266
1770
  };
1267
- o([x({ type: Array })], E.prototype, "tree", void 0), o([x({
1771
+ d([O({ type: Array })], we.prototype, "tree", void 0), d([O({
1268
1772
  type: String,
1269
1773
  attribute: "tool-id"
1270
- })], E.prototype, "toolId", void 0), o([w()], E.prototype, "configTree", void 0), o([w()], E.prototype, "searchQuery", void 0), o([w()], E.prototype, "capsCache", void 0), E = o([b("webmapx-layer-tree")], E);
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);
1271
1775
  //#endregion
1272
1776
  //#region node_modules/@simonwep/pickr/dist/themes/nano.min.css
1273
- var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1777
+ var Te = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1274
1778
  (function(n, r) {
1275
1779
  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();
1276
1780
  })(self, (() => (() => {
@@ -1286,7 +1790,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1286
1790
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
1287
1791
  }
1288
1792
  }, t = {};
1289
- e.d(t, { default: () => ne });
1793
+ e.d(t, { default: () => oe });
1290
1794
  var n = {};
1291
1795
  function r(e, t, n, r, i = {}) {
1292
1796
  t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
@@ -1399,10 +1903,10 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1399
1903
  100 * i
1400
1904
  ];
1401
1905
  }
1402
- function v(e, t, n, r) {
1906
+ function ee(e, t, n, r) {
1403
1907
  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)))];
1404
1908
  }
1405
- function y(e, t, n) {
1909
+ function v(e, t, n) {
1406
1910
  t /= 100;
1407
1911
  let r = 2 * (t *= (n /= 100) < .5 ? n : 1 - n) / (n + t) * 100, i = 100 * (n + t);
1408
1912
  return [
@@ -1411,10 +1915,10 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1411
1915
  i
1412
1916
  ];
1413
1917
  }
1414
- function b(e) {
1918
+ function y(e) {
1415
1919
  return _(...e.match(/.{2}/g).map(((e) => parseInt(e, 16))));
1416
1920
  }
1417
- function x(e) {
1921
+ function b(e) {
1418
1922
  e = e.match(/^[a-zA-Z]+$/) ? function(e) {
1419
1923
  if (e.toLowerCase() === "black") return "#000";
1420
1924
  let t = document.createElement("canvas").getContext("2d");
@@ -1432,7 +1936,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1432
1936
  let [, e, t, a, o] = n(r);
1433
1937
  if (e > 100 || t > 100 || a > 100 || o > 100) break t;
1434
1938
  return {
1435
- values: v(e, t, a, o),
1939
+ values: ee(e, t, a, o),
1436
1940
  type: i
1437
1941
  };
1438
1942
  }
@@ -1450,7 +1954,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1450
1954
  e.length !== 4 && e.length !== 3 || (e = e.split("").map(((e) => e + e)).join(""));
1451
1955
  let t = e.substring(0, 6), n = e.substring(6);
1452
1956
  return n = n ? parseInt(n, 16) / 255 : void 0, {
1453
- values: [...b(t), n],
1957
+ values: [...y(t), n],
1454
1958
  a: n,
1455
1959
  type: i
1456
1960
  };
@@ -1459,7 +1963,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1459
1963
  let [, e, t, a, , o] = n(r);
1460
1964
  if (o = r[6] === "%" ? o / 100 : o, e > 360 || t > 100 || a > 100 || o < 0 || o > 1) break t;
1461
1965
  return {
1462
- values: [...y(e, t, a), o],
1966
+ values: [...v(e, t, a), o],
1463
1967
  a: o,
1464
1968
  type: i
1465
1969
  };
@@ -1484,7 +1988,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1484
1988
  type: null
1485
1989
  };
1486
1990
  }
1487
- function S(e = 0, t = 0, n = 0, r = 1) {
1991
+ function x(e = 0, t = 0, n = 0, r = 1) {
1488
1992
  let i = (e, t) => (n = -1) => t(~n ? e.map(((e) => Number(e.toFixed(n)))) : e), a = {
1489
1993
  h: e,
1490
1994
  s: t,
@@ -1525,12 +2029,12 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1525
2029
  }(a.h, a.s, a.v), t = a.a >= 1 ? "" : Number((255 * a.a).toFixed(0)).toString(16).toUpperCase().padStart(2, "0");
1526
2030
  return t && e.push(t), e.toString = () => `#${e.join("").toUpperCase()}`, e;
1527
2031
  },
1528
- clone: () => S(a.h, a.s, a.v, a.a)
2032
+ clone: () => x(a.h, a.s, a.v, a.a)
1529
2033
  };
1530
2034
  return a;
1531
2035
  }
1532
- let C = (e) => Math.max(Math.min(e, 1), 0);
1533
- function w(e) {
2036
+ let te = (e) => Math.max(Math.min(e, 1), 0);
2037
+ function ne(e) {
1534
2038
  let t = {
1535
2039
  options: Object.assign({
1536
2040
  lock: null,
@@ -1543,7 +2047,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1543
2047
  let { lock: n } = t.options, a = i === "ArrowUp", o = i === "ArrowRight", s = i === "ArrowDown", c = i === "ArrowLeft";
1544
2048
  if (r === "keydown" && (a || o || s || c)) {
1545
2049
  let r = 0, i = 0;
1546
- 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();
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();
1547
2051
  } else i.startsWith("Arrow") && (t.options.onstop(), e.preventDefault());
1548
2052
  }
1549
2053
  },
@@ -1564,7 +2068,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1564
2068
  x: c / s.width,
1565
2069
  y: l / s.height
1566
2070
  };
1567
- let u = C(c / s.width), d = C(l / s.height);
2071
+ let u = te(c / s.width), d = te(l / s.height);
1568
2072
  switch (i) {
1569
2073
  case "v": return n.onchange(u);
1570
2074
  case "h": return n.onchange(d);
@@ -1595,7 +2099,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1595
2099
  }, { options: n, _tapstart: r, _keyboard: o } = t;
1596
2100
  return i([n.wrapper, n.element], "mousedown", r), i([n.wrapper, n.element], "touchstart", r, { passive: !1 }), i(document, ["keydown", "keyup"], o), t;
1597
2101
  }
1598
- function ee(e = {}) {
2102
+ function re(e = {}) {
1599
2103
  e = Object.assign({
1600
2104
  onchange: () => 0,
1601
2105
  className: "",
@@ -1606,7 +2110,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1606
2110
  }));
1607
2111
  return { destroy: () => a(...t) };
1608
2112
  }
1609
- let te = {
2113
+ let ie = {
1610
2114
  variantFlipOrder: {
1611
2115
  start: "sme",
1612
2116
  middle: "mse",
@@ -1621,7 +2125,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1621
2125
  position: "bottom",
1622
2126
  margin: 8,
1623
2127
  padding: 0
1624
- }, T = (e, t, n) => {
2128
+ }, ae = (e, t, n) => {
1625
2129
  let r = typeof e != "object" || e instanceof HTMLElement ? {
1626
2130
  reference: e,
1627
2131
  popper: t,
@@ -1633,7 +2137,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1633
2137
  return ((e, t, n) => {
1634
2138
  let { container: r, arrow: i, margin: a, padding: o, position: s, variantFlipOrder: c, positionFlipOrder: l } = {
1635
2139
  container: document.documentElement.getBoundingClientRect(),
1636
- ...te,
2140
+ ...ie,
1637
2141
  ...n
1638
2142
  }, { left: u, top: d } = t.style;
1639
2143
  t.style.left = "0", t.style.top = "0";
@@ -1649,10 +2153,10 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1649
2153
  hs: f.top,
1650
2154
  hm: f.bottom - f.height / 2 - p.height / 2,
1651
2155
  he: f.bottom - p.height
1652
- }, [g, _ = "middle"] = s.split("-"), v = l[g], y = c[_], { top: b, left: x, bottom: S, right: C } = r;
1653
- for (let e of v) {
1654
- 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];
1655
- if (!(r < g || r + c + o > u)) for (let u of y) {
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) {
1656
2160
  let m = h[(n ? "v" : "h") + u];
1657
2161
  if (!(m < _ || m + l + o > d)) {
1658
2162
  if (m -= p[s], r -= p[a], t.style[s] = `${m}px`, t.style[a] = `${r}px`, i) {
@@ -1676,7 +2180,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1676
2180
  })(t, n, r);
1677
2181
  } };
1678
2182
  };
1679
- class ne {
2183
+ class oe {
1680
2184
  static utils = n;
1681
2185
  static version = "1.9.1";
1682
2186
  static I18N_DEFAULTS = {
@@ -1723,8 +2227,8 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1723
2227
  _recalc = !0;
1724
2228
  _nanopop = null;
1725
2229
  _root = null;
1726
- _color = S();
1727
- _lastColor = S();
2230
+ _color = x();
2231
+ _lastColor = x();
1728
2232
  _swatchColors = [];
1729
2233
  _setupAnimationFrame = null;
1730
2234
  _eventListener = {
@@ -1739,20 +2243,20 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1739
2243
  swatchselect: []
1740
2244
  };
1741
2245
  constructor(e) {
1742
- this.options = e = Object.assign({ ...ne.DEFAULT_OPTIONS }, e);
2246
+ this.options = e = Object.assign({ ...oe.DEFAULT_OPTIONS }, e);
1743
2247
  let { swatches: t, components: n, theme: r, sliders: i, lockOpacity: a, padding: o } = e;
1744
2248
  ["nano", "monolith"].includes(r) && !i && (e.sliders = "h"), n.interaction ||= {};
1745
2249
  let { preview: s, opacity: c, hue: l, palette: u } = n;
1746
2250
  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)));
1747
2251
  let { button: d, app: f } = this._root;
1748
- this._nanopop = T(d, f, { margin: o }), d.setAttribute("role", "button"), d.setAttribute("aria-label", this._t("btn:toggle"));
2252
+ this._nanopop = ae(d, f, { margin: o }), d.setAttribute("role", "button"), d.setAttribute("aria-label", this._t("btn:toggle"));
1749
2253
  let p = this;
1750
2254
  this._setupAnimationFrame = requestAnimationFrame((function t() {
1751
2255
  if (!f.offsetWidth) return requestAnimationFrame(t);
1752
2256
  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");
1753
2257
  }));
1754
2258
  }
1755
- static create = (e) => new ne(e);
2259
+ static create = (e) => new oe(e);
1756
2260
  _preBuild() {
1757
2261
  let { options: e } = this;
1758
2262
  for (let t of ["el", "container"]) e[t] = l(e[t]);
@@ -1771,7 +2275,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1771
2275
  }
1772
2276
  _buildComponents() {
1773
2277
  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 = {
1774
- palette: w({
2278
+ palette: ne({
1775
2279
  element: e._root.palette.picker,
1776
2280
  wrapper: e._root.palette.palette,
1777
2281
  onstop: () => e._emit("changestop", "slider", e),
@@ -1786,7 +2290,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1786
2290
  l.style.setProperty("--pcr-color", u);
1787
2291
  }
1788
2292
  }),
1789
- hue: w({
2293
+ hue: ne({
1790
2294
  lock: i === "v" ? "h" : "v",
1791
2295
  element: e._root.hue.picker,
1792
2296
  wrapper: e._root.hue.slider,
@@ -1797,7 +2301,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1797
2301
  e._recalc && (r.h = 360 * n), this.element.style.backgroundColor = `hsl(${r.h}, 100%, 50%)`, o.palette.trigger();
1798
2302
  }
1799
2303
  }),
1800
- opacity: w({
2304
+ opacity: ne({
1801
2305
  lock: r === "v" ? "h" : "v",
1802
2306
  element: e._root.opacity.picker,
1803
2307
  wrapper: e._root.opacity.slider,
@@ -1808,7 +2312,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1808
2312
  e._recalc && (r.a = Math.round(100 * n) / 100), this.element.style.background = `rgba(0, 0, 0, ${r.a})`, o.palette.trigger();
1809
2313
  }
1810
2314
  }),
1811
- selectable: ee({
2315
+ selectable: re({
1812
2316
  elements: e._root.interaction.options,
1813
2317
  className: "active",
1814
2318
  onchange(t) {
@@ -1917,14 +2421,14 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1917
2421
  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"));
1918
2422
  }
1919
2423
  _parseLocalColor(e) {
1920
- let { values: t, type: n, a: r } = x(e), { lockOpacity: i } = this.options, a = r !== void 0 && r !== 1;
2424
+ let { values: t, type: n, a: r } = b(e), { lockOpacity: i } = this.options, a = r !== void 0 && r !== 1;
1921
2425
  return t && t.length === 3 && (t[3] = void 0), {
1922
2426
  values: !t || i && a ? null : t,
1923
2427
  type: n
1924
2428
  };
1925
2429
  }
1926
2430
  _t(e) {
1927
- return this.options.i18n[e] || ne.I18N_DEFAULTS[e];
2431
+ return this.options.i18n[e] || oe.I18N_DEFAULTS[e];
1928
2432
  }
1929
2433
  _emit(e, ...t) {
1930
2434
  this._eventListener[e].forEach(((e) => e(...t, this)));
@@ -1939,7 +2443,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1939
2443
  addSwatch(e) {
1940
2444
  let { values: t } = this._parseLocalColor(e);
1941
2445
  if (t) {
1942
- 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")}"/>`);
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")}"/>`);
1943
2447
  return n.swatches.appendChild(a), e.push({
1944
2448
  el: a,
1945
2449
  color: r
@@ -1981,7 +2485,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
1981
2485
  setHSVA(e = 360, t = 0, n = 0, r = 1, i = !1) {
1982
2486
  let a = this._recalc;
1983
2487
  if (this._recalc = !1, e < 0 || e > 360 || t < 0 || t > 100 || n < 0 || n > 100 || r < 0 || r > 1) return !1;
1984
- this._color = S(e, t, n, r);
2488
+ this._color = x(e, t, n, r);
1985
2489
  let { hue: o, opacity: s, palette: c } = this._components;
1986
2490
  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;
1987
2491
  }
@@ -2019,9 +2523,9 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2019
2523
  }
2020
2524
  return t = t.default;
2021
2525
  })()));
2022
- })))(), 1), se, D = class extends s {
2526
+ })))(), 1), Ee, L = class extends f {
2023
2527
  static {
2024
- se = this;
2528
+ Ee = this;
2025
2529
  }
2026
2530
  constructor(...e) {
2027
2531
  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;
@@ -2030,7 +2534,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2030
2534
  this.collapsedLegendHeight = 180;
2031
2535
  }
2032
2536
  static {
2033
- this.styles = g`
2537
+ this.styles = C`
2034
2538
  :host { display: block; }
2035
2539
  .legend-wrap { display: flex; flex-direction: column; gap: 2px; }
2036
2540
  .legend-collapse {
@@ -2040,7 +2544,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2040
2544
  overflow: visible;
2041
2545
  }
2042
2546
  .legend-collapse.collapsed .legend-collapse-content {
2043
- max-height: ${se.collapsedLegendHeight}px;
2547
+ max-height: ${Ee.collapsedLegendHeight}px;
2044
2548
  overflow: hidden;
2045
2549
  }
2046
2550
  .legend-collapse.collapsed::after {
@@ -2135,17 +2639,17 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2135
2639
  this.legendOverflowing &&= !1;
2136
2640
  return;
2137
2641
  }
2138
- let e = this.renderRoot?.querySelector(".legend-collapse-content"), t = !!(e && e.scrollHeight > se.collapsedLegendHeight + 1);
2642
+ let e = this.renderRoot?.querySelector(".legend-collapse-content"), t = !!(e && e.scrollHeight > Ee.collapsedLegendHeight + 1);
2139
2643
  this.legendOverflowing !== t && (this.legendOverflowing = t);
2140
2644
  }
2141
2645
  renderCollapsibleLegend(e) {
2142
2646
  let t = this.collapsible && this.legendOverflowing && this.legendCollapsed, n = this.collapsible && this.legendOverflowing;
2143
- return _`
2647
+ return w`
2144
2648
  <div class="legend-collapse ${t ? "collapsed" : ""}">
2145
2649
  <div class="legend-collapse-content">
2146
2650
  ${e}
2147
2651
  </div>
2148
- ${n ? _`
2652
+ ${n ? w`
2149
2653
  <button
2150
2654
  type="button"
2151
2655
  class="legend-toggle"
@@ -2256,7 +2760,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2256
2760
  }
2257
2761
  renderZoomHint(e, t, n) {
2258
2762
  let r = n > t;
2259
- return _`<div class="legend-row"><span class="legend-label">${r ? "zoom out" : "zoom in"} to level ${r ? t : e} for display</span></div>`;
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>`;
2260
2764
  }
2261
2765
  renderCompositeLegend(e, t) {
2262
2766
  let n = [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = e.length === 1, o = Infinity, s = -Infinity;
@@ -2276,49 +2780,49 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2276
2780
  for (let [e, n] of Object.entries(u)) h[e] = this.isDataDriven(n) ? n : this.evalAtZoom(n, t);
2277
2781
  let g = {};
2278
2782
  for (let [e, n] of Object.entries(d)) g[e] = this.evalAtZoom(n, t);
2279
- let v = { ...h }, y = { ...g }, b = this.editOverrides[f];
2280
- b && (Object.assign(h, b), "text-size" in b && (g["text-size"] = b["text-size"]));
2281
- 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;
2282
- if (C && C.length > 1) {
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) {
2283
2787
  let e = `${l}|${f}`;
2284
2788
  if (r.has(e)) continue;
2285
- r.add(e), i.has(e) || i.set(e, [f]), a || n.push(_`<div class="sub-group-title">${m}</div>`);
2286
- let o = Array.isArray(S) ? S : null, s = o ? this.colorExprStopIndices(o) : null;
2287
- for (let e = 0; e < C.length; e++) {
2288
- let { label: i, paint: a } = C[e], c = {
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 = {
2289
2793
  ...h,
2290
- [x]: a
2794
+ [y]: a
2291
2795
  }, u = this.renderSwatch(l, c, t, g);
2292
2796
  if (!u) continue;
2293
2797
  let d = `${l}|${String(a)}`;
2294
2798
  if (r.has(d)) continue;
2295
2799
  r.add(d);
2296
- let p = s?.[e] ?? null, m = typeof a == "string" ? a : "#000", v = p !== null && o ? _`<button type="button" style="background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center"
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"
2297
2801
  @click=${(e) => {
2298
- e.stopPropagation(), this.openStopColorPicker(e.currentTarget, [f], x, o, p, m);
2802
+ e.stopPropagation(), this.openStopColorPicker(e.currentTarget, [f], y, o, p, m);
2299
2803
  }}>
2300
2804
  ${u}</button>` : u;
2301
- n.push(_`
2805
+ n.push(w`
2302
2806
  <div class="legend-row sub-row">
2303
- ${v}
2807
+ ${_}
2304
2808
  <span class="legend-label">${i}</span>
2305
2809
  </div>`);
2306
2810
  }
2307
2811
  } else {
2308
- let e = x ? String(v[x] ?? "#aaa") : "#aaa", a = `${l}|${e}`;
2812
+ let e = y ? String(_[y] ?? "#aaa") : "#aaa", a = `${l}|${e}`;
2309
2813
  if (l === "line") {
2310
- let t = v["line-dasharray"];
2814
+ let t = _["line-dasharray"];
2311
2815
  a = `line|${e}|${Array.isArray(t) ? t.join(",") : String(t ?? "")}`;
2312
2816
  } else if (l === "symbol") {
2313
- 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;
2314
- a = `symbol|${e}|${n}|${i}|${o}|${o > 0 ? String(v["text-halo-color"] ?? "") : ""}`;
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"] ?? "") : ""}`;
2315
2819
  }
2316
2820
  if (i.has(a) || i.set(a, []), i.get(a).push(f), r.has(a)) continue;
2317
2821
  r.add(a);
2318
2822
  let o = this.renderSwatch(l, h, t, g);
2319
2823
  if (!o) continue;
2320
2824
  let s = this.isEditableType(l, h), c = this.editorOpenKey === a;
2321
- if (n.push(_`
2825
+ if (n.push(w`
2322
2826
  <div class="legend-row ${s ? "editable" : ""}"
2323
2827
  @click=${s ? () => {
2324
2828
  this.editorOpenKey = c ? null : a;
@@ -2334,7 +2838,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2334
2838
  }
2335
2839
  }
2336
2840
  }
2337
- return _`<div class="legend-wrap">${n}</div>`;
2841
+ return w`<div class="legend-wrap">${n}</div>`;
2338
2842
  }
2339
2843
  resolveSwatchColor(e, t) {
2340
2844
  return typeof e == "string" ? e : t;
@@ -2342,30 +2846,30 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2342
2846
  renderSwatch(e, t, n, r) {
2343
2847
  if (e === "fill") {
2344
2848
  let e = this.resolveSwatchColor(t["fill-color"], "#000000");
2345
- return y`<svg width="20" height="12" style="flex-shrink:0">
2849
+ return E`<svg width="20" height="12" style="flex-shrink:0">
2346
2850
  <rect x="1" y="1" width="18" height="10" fill="${e}" fill-opacity="${Number(t["fill-opacity"] ?? .7)}"
2347
2851
  stroke="${String(t["fill-outline-color"] ?? e)}" stroke-width="1" rx="1"/>
2348
2852
  </svg>`;
2349
2853
  }
2350
- if (e === "fill-extrusion") return y`<svg width="20" height="12" style="flex-shrink:0">
2854
+ if (e === "fill-extrusion") return E`<svg width="20" height="12" style="flex-shrink:0">
2351
2855
  <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"/>
2352
2856
  <line x1="19" y1="1" x2="19" y2="11" stroke="rgba(0,0,0,0.3)" stroke-width="2"/>
2353
2857
  <line x1="1" y1="11" x2="19" y2="11" stroke="rgba(0,0,0,0.3)" stroke-width="2"/>
2354
2858
  </svg>`;
2355
- if (e === "line") return y`<svg width="20" height="12" style="flex-shrink:0">
2859
+ if (e === "line") return E`<svg width="20" height="12" style="flex-shrink:0">
2356
2860
  <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)}"
2357
2861
  stroke-dasharray="${Array.isArray(t["line-dasharray"]) ? t["line-dasharray"].join(" ") : ""}" stroke-linecap="round"/>
2358
2862
  </svg>`;
2359
2863
  if (e === "circle") {
2360
2864
  let e = String(t["circle-color"] ?? "#aaa");
2361
- return y`<svg width="20" height="12" style="flex-shrink:0">
2865
+ return E`<svg width="20" height="12" style="flex-shrink:0">
2362
2866
  <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)}"/>
2363
2867
  </svg>`;
2364
2868
  }
2365
2869
  if (e === "symbol") {
2366
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);
2367
- return y`<svg width="${l}" height="${a + 4}" style="flex-shrink:0">
2368
- ${n ? y`<text x="${l / 2}" y="${a}" text-anchor="middle"
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"
2369
2873
  font-size="${a}" font-weight="${s}" font-style="${c}"
2370
2874
  stroke="${n}" stroke-width="3" stroke-linejoin="round"
2371
2875
  fill="none" font-family="sans-serif">A</text>` : ""}
@@ -2374,9 +2878,9 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2374
2878
  fill="${e}" font-family="sans-serif">A</text>
2375
2879
  </svg>`;
2376
2880
  }
2377
- return e === "background" ? y`<svg width="20" height="12" style="flex-shrink:0">
2881
+ return e === "background" ? E`<svg width="20" height="12" style="flex-shrink:0">
2378
2882
  <rect x="1" y="1" width="18" height="10" fill="${String(t["background-color"] ?? "#eee")}" rx="1"/>
2379
- </svg>` : e === "raster" || e === "hillshade" ? y`<svg width="20" height="12" style="flex-shrink:0">
2883
+ </svg>` : e === "raster" || e === "hillshade" ? E`<svg width="20" height="12" style="flex-shrink:0">
2380
2884
  <defs><pattern id="rp" width="4" height="4" patternUnits="userSpaceOnUse">
2381
2885
  <rect width="2" height="2" fill="#ccc"/>
2382
2886
  <rect x="2" y="2" width="2" height="2" fill="#eee"/>
@@ -2435,7 +2939,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2435
2939
  renderBubbleLegend(e, t, n) {
2436
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) => {
2437
2941
  let n = Math.max(1, e.radius * 1), i = c - n - r, o = i - n;
2438
- return y`
2942
+ return E`
2439
2943
  <circle cx="${a}" cy="${i}" r="${n}"
2440
2944
  fill="${e.color}" fill-opacity="0.75"
2441
2945
  stroke="${t}" stroke-width="${r}"/>
@@ -2443,41 +2947,41 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2443
2947
  stroke="#999" stroke-width="0.5" stroke-dasharray="2 2"/>
2444
2948
  <text x="${l}" y="${o + 4}" font-size="9" fill="#555">${e.value}</text>
2445
2949
  `;
2446
- }), f = Math.max(14, Math.floor((o + 60) / e.length)), p = e.length * f, m = e.map((e, t) => y`<rect x="${t * f}" y="0" width="${f}" height="${8}" fill="${e.color}"/>
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}"/>
2447
2951
  <text x="${t * f + f / 2}" y="${17}" font-size="8"
2448
2952
  text-anchor="middle" fill="#555">${e.value}</text>`), h = e.every((t) => t.color === e[0].color);
2449
- return _`
2953
+ return w`
2450
2954
  <div class="legend-row" style="flex-direction:column;align-items:flex-start;gap:6px">
2451
- ${y`<svg width="${u}" height="${s}" style="overflow:visible">
2955
+ ${E`<svg width="${u}" height="${s}" style="overflow:visible">
2452
2956
  <line x1="${a}" y1="${c}" x2="${a}" y2="2" stroke="#bbb" stroke-width="1"/>
2453
2957
  ${d}
2454
2958
  </svg>`}
2455
- ${h ? "" : y`<svg width="${p}" height="${20}" style="overflow:visible">
2959
+ ${h ? "" : E`<svg width="${p}" height="${20}" style="overflow:visible">
2456
2960
  ${m}
2457
2961
  </svg>`}
2458
2962
  </div>`;
2459
2963
  }
2460
2964
  renderCircleRow(e, t, n, r, i) {
2461
2965
  let a = Math.min(Math.max(r, 2), 12), o = Math.min(n, 2), s = (a + o) * 2 + 2;
2462
- return _`
2966
+ return w`
2463
2967
  <div class="legend-row">
2464
- ${y`<svg width="${s}" height="${s}" style="flex-shrink:0">
2968
+ ${E`<svg width="${s}" height="${s}" style="flex-shrink:0">
2465
2969
  <circle cx="${s / 2}" cy="${s / 2}" r="${a}"
2466
2970
  fill="${e}" stroke="${t}" stroke-width="${o}"/>
2467
2971
  </svg>`}
2468
- ${i === null ? "" : _`<span class="legend-label">${i}</span>`}
2972
+ ${i === null ? "" : w`<span class="legend-label">${i}</span>`}
2469
2973
  </div>`;
2470
2974
  }
2471
2975
  renderFillRow(e, t, n, r, i) {
2472
- let a = y`<svg width="24" height="14" style="flex-shrink:0">
2976
+ let a = E`<svg width="24" height="14" style="flex-shrink:0">
2473
2977
  <rect x="1" y="1" width="22" height="12"
2474
2978
  fill="${e}" fill-opacity="${n}"
2475
2979
  stroke="${t}" stroke-width="1.5" rx="2"/>
2476
2980
  </svg>`;
2477
- return _`
2981
+ return w`
2478
2982
  <div class="legend-row">
2479
- ${i ? _`<button type="button" style="background:none;border:none;padding:0;cursor:pointer;display:flex;align-items:center" @click=${i}>${a}</button>` : a}
2480
- ${r === null ? "" : _`<span class="legend-label">${r}</span>`}
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>`}
2481
2985
  </div>`;
2482
2986
  }
2483
2987
  colorExprStopIndices(e) {
@@ -2507,30 +3011,30 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2507
3011
  }, !1);
2508
3012
  }
2509
3013
  renderLineRow(e, t, n, r) {
2510
- return _`
3014
+ return w`
2511
3015
  <div class="legend-row">
2512
- ${y`<svg width="24" height="14" style="flex-shrink:0">
3016
+ ${E`<svg width="24" height="14" style="flex-shrink:0">
2513
3017
  <line x1="2" y1="7" x2="22" y2="7"
2514
3018
  stroke="${e}" stroke-width="${Math.min(t, 4)}"
2515
3019
  stroke-dasharray="${n}" stroke-linecap="round"/>
2516
3020
  </svg>`}
2517
- ${r === null ? "" : _`<span class="legend-label">${r}</span>`}
3021
+ ${r === null ? "" : w`<span class="legend-label">${r}</span>`}
2518
3022
  </div>`;
2519
3023
  }
2520
3024
  renderEditableLineRow(e, t, n, r, i, a, o) {
2521
- return _`
3025
+ return w`
2522
3026
  <div class="legend-row">
2523
3027
  <button type="button" class="color-swatch" style="background:transparent; border:none; padding:0; width:24px; height:14px; flex-shrink:0; cursor:pointer;"
2524
3028
  @click=${(n) => {
2525
3029
  n.stopPropagation(), this.openStopColorPicker(n.currentTarget, e, "line-color", a, o, t);
2526
3030
  }}>
2527
- ${y`<svg width="24" height="14">
3031
+ ${E`<svg width="24" height="14">
2528
3032
  <line x1="2" y1="7" x2="22" y2="7"
2529
3033
  stroke="${t}" stroke-width="${Math.min(n, 4)}"
2530
3034
  stroke-dasharray="${r}" stroke-linecap="round"/>
2531
3035
  </svg>`}
2532
3036
  </button>
2533
- ${i === null ? "" : _`<span class="legend-label">${i}</span>`}
3037
+ ${i === null ? "" : w`<span class="legend-label">${i}</span>`}
2534
3038
  </div>`;
2535
3039
  }
2536
3040
  getAttrTranslations() {
@@ -2707,14 +3211,14 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2707
3211
  }
2708
3212
  openColorPicker(e, t, n, r, i, a = !0) {
2709
3213
  let o = `${t.join(",")}::${n}`, s = i ?? ((e) => this.setPaintOverride(t, n, e)), c = this.pickrInstances.get(o);
2710
- c ? (c.setColor(r), this.pickrOriginal.set(o, r)) : (c = oe.default.create({
3214
+ c ? (c.setColor(r), this.pickrOriginal.set(o, r)) : (c = Te.default.create({
2711
3215
  el: e,
2712
3216
  theme: "nano",
2713
3217
  default: r,
2714
3218
  useAsButton: !0,
2715
3219
  comparison: !1,
2716
3220
  appClass: "webmapx-pickr",
2717
- swatches: se.COLOR_PALETTE,
3221
+ swatches: Ee.COLOR_PALETTE,
2718
3222
  components: {
2719
3223
  preview: !0,
2720
3224
  opacity: !0,
@@ -2760,7 +3264,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2760
3264
  this.editOverrides = r, this.pendingPaintRaf === null && (this.pendingPaintRaf = requestAnimationFrame(() => this.flushPaintOverrides()));
2761
3265
  }
2762
3266
  renderRangeRow(e, t, n, r, i, a, o, s = "") {
2763
- return _`
3267
+ return w`
2764
3268
  <div class="style-editor-row">
2765
3269
  <label>${t}
2766
3270
  <input type="range" min=${i} max=${a} step=${o} .value=${String(r)}
@@ -2770,7 +3274,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2770
3274
  </div>`;
2771
3275
  }
2772
3276
  renderColorRow(e, t, n, r) {
2773
- return _`
3277
+ return w`
2774
3278
  <div class="style-editor-row">
2775
3279
  <label>${t}</label>
2776
3280
  <button type="button" class="color-swatch" style="background:${r}"
@@ -2784,11 +3288,11 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2784
3288
  let t = this.toCssColor(n["fill-outline-color"], i);
2785
3289
  s.push(this.renderColorRow(e, "outline color", "fill-outline-color", t));
2786
3290
  }
2787
- return s.push(this.renderRangeRow(e, "opacity", a, o, 0, 1, .05)), _`<div class="style-editor">${s}</div>`;
3291
+ return s.push(this.renderRangeRow(e, "opacity", a, o, 0, 1, .05)), w`<div class="style-editor">${s}</div>`;
2788
3292
  }
2789
3293
  if (t === "line") {
2790
3294
  let t = this.toCssColor(n["line-color"], "#000000"), r = Number(n["line-width"] ?? 2), i = Number(n["line-opacity"] ?? 1);
2791
- return _`<div class="style-editor">
3295
+ return w`<div class="style-editor">
2792
3296
  ${this.renderColorRow(e, "line color", "line-color", t)}
2793
3297
  ${this.renderRangeRow(e, "width", "line-width", r, .5, 10, .5, "px")}
2794
3298
  ${this.renderRangeRow(e, "opacity", "line-opacity", i, 0, 1, .05)}
@@ -2796,7 +3300,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2796
3300
  }
2797
3301
  if (t === "circle") {
2798
3302
  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);
2799
- return _`<div class="style-editor">
3303
+ return w`<div class="style-editor">
2800
3304
  ${this.renderRangeRow(e, "radius", "circle-radius", r, 1, 30, 1, "px")}
2801
3305
  ${this.renderColorRow(e, "fill color", "circle-color", t)}
2802
3306
  ${this.renderRangeRow(e, "opacity", "circle-opacity", o, 0, 1, .05)}
@@ -2806,17 +3310,17 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2806
3310
  }
2807
3311
  if (t === "symbol") {
2808
3312
  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");
2809
- return _`<div class="style-editor">
3313
+ return w`<div class="style-editor">
2810
3314
  ${this.renderRangeRow(e, "size", "text-size", i, 8, 32, 1, "px")}
2811
3315
  ${this.renderColorRow(e, "text color", "text-color", t)}
2812
3316
  ${this.renderRangeRow(e, "opacity", "text-opacity", r, 0, 1, .05)}
2813
3317
  ${a ? this.renderColorRow(e, "halo color", "text-halo-color", o) : ""}
2814
3318
  </div>`;
2815
3319
  }
2816
- return _``;
3320
+ return w``;
2817
3321
  }
2818
3322
  renderHillshadeTerrainCheckbox() {
2819
- return _`
3323
+ return w`
2820
3324
  <div class="style-editor-row" style="padding:2px 0">
2821
3325
  <input type="checkbox" id="hillshade-terrain-${this.layerId}" .checked=${this.terrainEnabled}
2822
3326
  @change=${(e) => this.toggleTerrainFromHillshade(e.target.checked)}>
@@ -2863,12 +3367,12 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2863
3367
  1 / 3,
2864
3368
  2 / 3,
2865
3369
  1
2866
- ].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) => ({
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) => ({
2867
3371
  value: this.formatNumber(e, g),
2868
3372
  color: o,
2869
- radius: Math.max(1, Math.round(_[t] * y))
2870
- })), x = /* @__PURE__ */ new Set(), S = b.filter((e) => !x.has(e.radius) && x.add(e.radius));
2871
- return [this.renderBubbleLegend(S, e, t)];
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)];
2872
3376
  }
2873
3377
  if (s) {
2874
3378
  let n = this.evalAtZoom(a, this.zoom), r = Math.min(Number(isFinite(Number(n)) ? n : 6), 20);
@@ -2908,15 +3412,15 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2908
3412
  return o && o.length === r.length ? this.renderEditableLineRow(e, u, c, a, l, t, o[s]) : this.renderLineRow(u, c, a, l);
2909
3413
  });
2910
3414
  }
2911
- return t === "symbol" ? [_`
3415
+ return t === "symbol" ? [w`
2912
3416
  <div class="legend-row">
2913
- ${y`<svg width="24" height="14" style="flex-shrink:0">
3417
+ ${E`<svg width="24" height="14" style="flex-shrink:0">
2914
3418
  <text x="12" y="11" text-anchor="middle" font-size="11"
2915
3419
  fill="${String(n["text-color"] ?? "#1f2937")}" font-family="sans-serif">A</text>
2916
3420
  </svg>`}
2917
- </div>`] : t === "raster" || t === "background" || t === "hillshade" ? [_`
3421
+ </div>`] : t === "raster" || t === "background" || t === "hillshade" ? [w`
2918
3422
  <div class="legend-row">
2919
- ${y`<svg width="24" height="14" style="flex-shrink:0">
3423
+ ${E`<svg width="24" height="14" style="flex-shrink:0">
2920
3424
  <defs>
2921
3425
  <pattern id="grid" width="4" height="4" patternUnits="userSpaceOnUse">
2922
3426
  <rect width="2" height="2" fill="#ccc"/>
@@ -2928,12 +3432,12 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2928
3432
  </div>`] : [];
2929
3433
  }
2930
3434
  render() {
2931
- if (!this.layerId) return _``;
3435
+ if (!this.layerId) return w``;
2932
3436
  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;
2933
3437
  if (this.zoom < o || this.zoom > s) return this.renderZoomHint(o, s, this.zoom);
2934
3438
  if (a && a.length > 0) {
2935
3439
  let e = this.renderCompositeLegend(a, this.zoom);
2936
- return a.length === 1 && typeof a[0]?.type == "string" && a[0].type === "hillshade" ? this.renderCollapsibleLegend(_`
3440
+ return a.length === 1 && typeof a[0]?.type == "string" && a[0].type === "hillshade" ? this.renderCollapsibleLegend(w`
2937
3441
  <div class="legend-wrap">
2938
3442
  ${e}
2939
3443
  ${this.renderHillshadeTerrainCheckbox()}
@@ -2954,9 +3458,9 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2954
3458
  ...n,
2955
3459
  ...f
2956
3460
  } : n, m = !a && u && this.isEditableType(t, p), h = this.editorOpenKey === this.layerId;
2957
- return this.renderCollapsibleLegend(_`
3461
+ return this.renderCollapsibleLegend(w`
2958
3462
  <div class="legend-wrap">
2959
- ${u ? _`
3463
+ ${u ? w`
2960
3464
  <div class=${m ? "editable" : ""} @click=${m ? () => {
2961
3465
  this.editorOpenKey = h ? null : this.layerId;
2962
3466
  } : null}>
@@ -2965,7 +3469,7 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2965
3469
  ${t === "hillshade" ? this.renderHillshadeTerrainCheckbox() : ""}
2966
3470
  ${m && h ? this.renderStyleEditor(d, t, p) : ""}
2967
3471
  ` : ""}
2968
- ${r ? _`
3472
+ ${r ? w`
2969
3473
  <img class="legend-img" src=${r} alt=${i}
2970
3474
  @error=${(e) => {
2971
3475
  let t = e.target, n = document.createElement("span");
@@ -2976,24 +3480,24 @@ var oe = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
2976
3480
  `);
2977
3481
  }
2978
3482
  };
2979
- o([x({
3483
+ d([O({
2980
3484
  type: String,
2981
3485
  attribute: "layer-id"
2982
- })], D.prototype, "layerId", void 0), o([x({
3486
+ })], L.prototype, "layerId", void 0), d([O({
2983
3487
  type: Boolean,
2984
3488
  reflect: !0
2985
- })], D.prototype, "collapsible", void 0), o([w()], D.prototype, "meta", void 0), o([w()], D.prototype, "zoom", void 0), o([w()], D.prototype, "legendCollapsed", void 0), o([w()], D.prototype, "legendOverflowing", void 0), o([w()], D.prototype, "editOverrides", void 0), o([w()], D.prototype, "editorOpenKey", void 0), o([w()], D.prototype, "terrainEnabled", void 0), D = se = o([b("webmapx-layer-legend")], D);
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);
2986
3490
  //#endregion
2987
3491
  //#region node_modules/dompurify/dist/purify.es.mjs
2988
- function O(e, t) {
3492
+ function De(e, t) {
2989
3493
  (t == null || t > e.length) && (t = e.length);
2990
3494
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2991
3495
  return r;
2992
3496
  }
2993
- function ce(e) {
3497
+ function Oe(e) {
2994
3498
  if (Array.isArray(e)) return e;
2995
3499
  }
2996
- function le(e, t) {
3500
+ function ke(e, t) {
2997
3501
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2998
3502
  if (n != null) {
2999
3503
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -3011,113 +3515,113 @@ function le(e, t) {
3011
3515
  return s;
3012
3516
  }
3013
3517
  }
3014
- function ue() {
3518
+ function Ae() {
3015
3519
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3016
3520
  }
3017
- function de(e, t) {
3018
- return ce(e) || le(e, t) || fe(e, t) || ue();
3521
+ function je(e, t) {
3522
+ return Oe(e) || ke(e, t) || Me(e, t) || Ae();
3019
3523
  }
3020
- function fe(e, t) {
3524
+ function Me(e, t) {
3021
3525
  if (e) {
3022
- if (typeof e == "string") return O(e, t);
3526
+ if (typeof e == "string") return De(e, t);
3023
3527
  var n = {}.toString.call(e).slice(8, -1);
3024
- 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) ? O(e, t) : void 0;
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;
3025
3529
  }
3026
3530
  }
3027
- var pe = Object.entries, me = Object.setPrototypeOf, he = Object.isFrozen, ge = Object.getPrototypeOf, _e = Object.getOwnPropertyDescriptor, k = Object.freeze, A = Object.seal, ve = Object.create, j = typeof Reflect < "u" && Reflect, ye = j.apply, M = j.construct;
3028
- k ||= function(e) {
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) {
3029
3533
  return e;
3030
- }, A ||= function(e) {
3534
+ }, z ||= function(e) {
3031
3535
  return e;
3032
- }, ye ||= function(e, t) {
3536
+ }, Be ||= function(e, t) {
3033
3537
  var n = [...arguments].slice(2);
3034
3538
  return e.apply(t, n);
3035
- }, M ||= function(e) {
3539
+ }, Ve ||= function(e) {
3036
3540
  return new e(...[...arguments].slice(1));
3037
3541
  };
3038
- var be = L(Array.prototype.forEach), xe = L(Array.prototype.lastIndexOf), Se = L(Array.prototype.pop), Ce = L(Array.prototype.push), we = L(Array.prototype.splice), Te = Array.isArray, Ee = L(String.prototype.toLowerCase), De = L(String.prototype.toString), Oe = L(String.prototype.match), ke = L(String.prototype.replace), Ae = L(String.prototype.indexOf), je = L(String.prototype.trim), Me = L(Number.prototype.toString), N = L(Boolean.prototype.toString), Ne = typeof BigInt > "u" ? null : L(BigInt.prototype.toString), Pe = typeof Symbol > "u" ? null : L(Symbol.prototype.toString), P = L(Object.prototype.hasOwnProperty), F = L(Object.prototype.toString), I = L(RegExp.prototype.test), Fe = Ie(TypeError);
3039
- function L(e) {
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) {
3040
3544
  return function(t) {
3041
3545
  t instanceof RegExp && (t.lastIndex = 0);
3042
3546
  var n = [...arguments].slice(1);
3043
- return ye(e, t, n);
3547
+ return Be(e, t, n);
3044
3548
  };
3045
3549
  }
3046
- function Ie(e) {
3550
+ function at(e) {
3047
3551
  return function() {
3048
- return M(e, [...arguments]);
3552
+ return Ve(e, [...arguments]);
3049
3553
  };
3050
3554
  }
3051
- function R(e, t) {
3052
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ee;
3053
- if (me && me(e, null), !Te(t)) return e;
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;
3054
3558
  let r = t.length;
3055
3559
  for (; r--;) {
3056
3560
  let i = t[r];
3057
3561
  if (typeof i == "string") {
3058
3562
  let e = n(i);
3059
- e !== i && (he(t) || (t[r] = e), i = e);
3563
+ e !== i && (Fe(t) || (t[r] = e), i = e);
3060
3564
  }
3061
3565
  e[i] = !0;
3062
3566
  }
3063
3567
  return e;
3064
3568
  }
3065
- function Le(e) {
3066
- for (let t = 0; t < e.length; t++) P(e, t) || (e[t] = null);
3569
+ function ot(e) {
3570
+ for (let t = 0; t < e.length; t++) B(e, t) || (e[t] = null);
3067
3571
  return e;
3068
3572
  }
3069
- function z(e) {
3070
- let t = ve(null);
3071
- for (let r of pe(e)) {
3072
- var n = de(r, 2);
3573
+ function G(e) {
3574
+ let t = Re(null);
3575
+ for (let r of Ne(e)) {
3576
+ var n = je(r, 2);
3073
3577
  let i = n[0], a = n[1];
3074
- P(e, i) && (Te(a) ? t[i] = Le(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = z(a) : t[i] = a);
3578
+ B(e, i) && (qe(a) ? t[i] = ot(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = G(a) : t[i] = a);
3075
3579
  }
3076
3580
  return t;
3077
3581
  }
3078
- function Re(e) {
3582
+ function st(e) {
3079
3583
  switch (typeof e) {
3080
3584
  case "string": return e;
3081
- case "number": return Me(e);
3082
- case "boolean": return N(e);
3083
- case "bigint": return Ne ? Ne(e) : "0";
3084
- case "symbol": return Pe ? Pe(e) : "Symbol()";
3085
- case "undefined": return F(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);
3086
3590
  case "function":
3087
3591
  case "object": {
3088
- if (e === null) return F(e);
3089
- let t = e, n = B(t, "toString");
3592
+ if (e === null) return V(e);
3593
+ let t = e, n = ct(t, "toString");
3090
3594
  if (typeof n == "function") {
3091
3595
  let e = n(t);
3092
- return typeof e == "string" ? e : F(e);
3596
+ return typeof e == "string" ? e : V(e);
3093
3597
  }
3094
- return F(e);
3598
+ return V(e);
3095
3599
  }
3096
- default: return F(e);
3600
+ default: return V(e);
3097
3601
  }
3098
3602
  }
3099
- function B(e, t) {
3603
+ function ct(e, t) {
3100
3604
  for (; e !== null;) {
3101
- let n = _e(e, t);
3605
+ let n = Le(e, t);
3102
3606
  if (n) {
3103
- if (n.get) return L(n.get);
3104
- if (typeof n.value == "function") return L(n.value);
3607
+ if (n.get) return U(n.get);
3608
+ if (typeof n.value == "function") return U(n.value);
3105
3609
  }
3106
- e = ge(e);
3610
+ e = Ie(e);
3107
3611
  }
3108
3612
  function n() {
3109
3613
  return null;
3110
3614
  }
3111
3615
  return n;
3112
3616
  }
3113
- function ze(e) {
3617
+ function lt(e) {
3114
3618
  try {
3115
- return I(e, ""), !0;
3619
+ return H(e, ""), !0;
3116
3620
  } catch {
3117
3621
  return !1;
3118
3622
  }
3119
3623
  }
3120
- var Be = k(/* @__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(".")), Ve = k(/* @__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(".")), He = k([
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([
3121
3625
  "feBlend",
3122
3626
  "feColorMatrix",
3123
3627
  "feComponentTransfer",
@@ -3143,7 +3647,7 @@ var Be = k(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3143
3647
  "feSpotLight",
3144
3648
  "feTile",
3145
3649
  "feTurbulence"
3146
- ]), Ue = k([
3650
+ ]), pt = R([
3147
3651
  "animate",
3148
3652
  "color-profile",
3149
3653
  "cursor",
@@ -3166,7 +3670,7 @@ var Be = k(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3166
3670
  "solidcolor",
3167
3671
  "unknown",
3168
3672
  "use"
3169
- ]), We = k(/* @__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(".")), Ge = k([
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([
3170
3674
  "maction",
3171
3675
  "maligngroup",
3172
3676
  "malignmark",
@@ -3182,13 +3686,13 @@ var Be = k(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3182
3686
  "annotation-xml",
3183
3687
  "mprescripts",
3184
3688
  "none"
3185
- ]), Ke = k(["#text"]), qe = k(/* @__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(".")), Je = k(/* @__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(".")), Ye = k(/* @__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(".")), Xe = k([
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([
3186
3690
  "xlink:href",
3187
3691
  "xml:id",
3188
3692
  "xlink:title",
3189
3693
  "xml:space",
3190
3694
  "xmlns:xlink"
3191
- ]), Ze = A(/{{[\w\W]*|^[\w\W]*}}/g), Qe = A(/<%[\w\W]*|^[\w\W]*%>/g), $e = A(/\${[\w\W]*/g), et = A(/^data-[\-\w.\u00B7-\uFFFF]+$/), tt = A(/^aria-[\-\w]+$/), nt = A(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), rt = A(/^(?:\w+script|data):/i), it = A(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), at = A(/^html$/i), ot = A(/^[a-z][.\w]*(-[.\w]+)+$/i), st = A(/<[/\w!]/g), ct = A(/<[/\w]/g), lt = A(/<\/no(script|embed|frames)/i), ut = A(/\/>/i), V = {
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 = {
3192
3696
  element: 1,
3193
3697
  attribute: 2,
3194
3698
  text: 3,
@@ -3201,9 +3705,9 @@ var Be = k(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3201
3705
  documentType: 10,
3202
3706
  documentFragment: 11,
3203
3707
  notation: 12
3204
- }, dt = function() {
3708
+ }, It = function() {
3205
3709
  return typeof window > "u" ? null : window;
3206
- }, ft = function(e, t) {
3710
+ }, Lt = function(e, t) {
3207
3711
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
3208
3712
  let n = null, r = "data-tt-policy-suffix";
3209
3713
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -3220,7 +3724,7 @@ var Be = k(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3220
3724
  } catch {
3221
3725
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
3222
3726
  }
3223
- }, pt = function() {
3727
+ }, Rt = function() {
3224
3728
  return {
3225
3729
  afterSanitizeAttributes: [],
3226
3730
  afterSanitizeElements: [],
@@ -3232,53 +3736,53 @@ var Be = k(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
3232
3736
  uponSanitizeElement: [],
3233
3737
  uponSanitizeShadowNode: []
3234
3738
  };
3235
- }, mt = function(e, t, n, r) {
3236
- return P(e, t) && Te(e[t]) ? R(r.base ? z(r.base) : {}, e[t], r.transform) : n;
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;
3237
3741
  };
3238
- function ht() {
3239
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : dt(), t = (e) => ht(e);
3240
- if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== V.document || !e.Element) return t.isSupported = !1, t;
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;
3241
3745
  let n = e.document, r = n, i = r.currentScript;
3242
3746
  e.DocumentFragment;
3243
3747
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
3244
3748
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
3245
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = B(d, "cloneNode"), p = B(d, "remove"), m = B(d, "nextSibling"), h = B(d, "childNodes"), g = B(d, "parentNode"), _ = B(d, "shadowRoot"), v = B(d, "attributes"), y = o && o.prototype ? B(o.prototype, "nodeType") : null, b = o && o.prototype ? B(o.prototype, "nodeName") : null;
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;
3246
3750
  if (typeof a == "function") {
3247
3751
  let e = n.createElement("template");
3248
3752
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
3249
3753
  }
3250
- let x, S = "", C, w = !1, ee = 0, te = function() {
3251
- if (ee > 0) throw Fe("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.");
3252
- }, T = function(e) {
3253
- te(), ee++;
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++;
3254
3758
  try {
3255
- return x.createHTML(e);
3759
+ return b.createHTML(e);
3256
3760
  } finally {
3257
- ee--;
3761
+ re--;
3258
3762
  }
3259
- }, ne = function(e) {
3260
- te(), ee++;
3763
+ }, oe = function(e) {
3764
+ ie(), re++;
3261
3765
  try {
3262
- return x.createScriptURL(e);
3766
+ return b.createScriptURL(e);
3263
3767
  } finally {
3264
- ee--;
3265
- }
3266
- }, re = function() {
3267
- return w ||= (C = ft(u, i), !0), C;
3268
- }, ie = n, ae = ie.implementation, E = ie.createNodeIterator, oe = ie.createDocumentFragment, se = ie.getElementsByTagName, D = r.importNode, O = pt();
3269
- t.isSupported = typeof pe == "function" && typeof g == "function" && ae && ae.createHTMLDocument !== void 0;
3270
- let ce = Ze, le = Qe, ue = $e, de = et, fe = tt, me = rt, he = it, ge = ot, _e = nt, j = null, ye = R({}, [
3271
- ...Be,
3272
- ...Ve,
3273
- ...He,
3274
- ...We,
3275
- ...Ke
3276
- ]), M = null, Me = R({}, [
3277
- ...qe,
3278
- ...Je,
3279
- ...Ye,
3280
- ...Xe
3281
- ]), N = Object.seal(ve(null, {
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,
3777
+ ...ft,
3778
+ ...mt,
3779
+ ...gt
3780
+ ]), M = null, ge = W({}, [
3781
+ ..._t,
3782
+ ...vt,
3783
+ ...yt,
3784
+ ...bt
3785
+ ]), N = Object.seal(Re(null, {
3282
3786
  tagNameCheck: {
3283
3787
  writable: !0,
3284
3788
  configurable: !1,
@@ -3297,7 +3801,7 @@ function ht() {
3297
3801
  enumerable: !0,
3298
3802
  value: !1
3299
3803
  }
3300
- })), Ne = null, Pe = null, F = Object.seal(ve(null, {
3804
+ })), _e = null, ve = null, P = Object.seal(Re(null, {
3301
3805
  tagCheck: {
3302
3806
  writable: !0,
3303
3807
  configurable: !1,
@@ -3310,14 +3814,14 @@ function ht() {
3310
3814
  enumerable: !0,
3311
3815
  value: null
3312
3816
  }
3313
- })), L = !0, Ie = !0, Le = !1, gt = !0, H = !1, _t = !0, vt = !1, yt = !1, U = null, W = null, bt = !1, G = !1, K = !1, q = !1, xt = !0, St = !1, Ct = "user-content-", wt = !0, Tt = !1, Et = {}, J = null, Dt = R({}, /* @__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(".")), Y = null, Ot = R({}, [
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({}, [
3314
3818
  "audio",
3315
3819
  "video",
3316
3820
  "img",
3317
3821
  "source",
3318
3822
  "image",
3319
3823
  "track"
3320
- ]), X = null, kt = R({}, [
3824
+ ]), et = null, tt = W({}, [
3321
3825
  "alt",
3322
3826
  "class",
3323
3827
  "for",
@@ -3332,223 +3836,223 @@ function ht() {
3332
3836
  "value",
3333
3837
  "style",
3334
3838
  "xmlns"
3335
- ]), At = "http://www.w3.org/1998/Math/MathML", jt = "http://www.w3.org/2000/svg", Z = "http://www.w3.org/1999/xhtml", Mt = Z, Nt = !1, Pt = null, Ft = R({}, [
3336
- At,
3337
- jt,
3338
- Z
3339
- ], De), It = k([
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([
3340
3844
  "mi",
3341
3845
  "mo",
3342
3846
  "mn",
3343
3847
  "ms",
3344
3848
  "mtext"
3345
- ]), Lt = R({}, It), Rt = k(["annotation-xml"]), zt = R({}, Rt), Bt = R({}, [
3849
+ ]), Ut = W({}, Ht), Wt = R(["annotation-xml"]), Gt = W({}, Wt), Kt = W({}, [
3346
3850
  "title",
3347
3851
  "style",
3348
3852
  "font",
3349
3853
  "a",
3350
3854
  "script"
3351
- ]), Vt = null, Ht = ["application/xhtml+xml", "text/html"], Q = null, Ut = null, Wt = n.createElement("form"), Gt = function(e) {
3855
+ ]), K = null, qt = ["application/xhtml+xml", "text/html"], q = null, J = null, Jt = n.createElement("form"), Yt = function(e) {
3352
3856
  return e instanceof RegExp || e instanceof Function;
3353
- }, $ = function() {
3857
+ }, Xt = function() {
3354
3858
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3355
- if (Ut && Ut === e) return;
3356
- (!e || typeof e != "object") && (e = {}), e = z(e), Vt = Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = Vt === "application/xhtml+xml" ? De : Ee, j = mt(e, "ALLOWED_TAGS", ye, { transform: Q }), M = mt(e, "ALLOWED_ATTR", Me, { transform: Q }), Pt = mt(e, "ALLOWED_NAMESPACES", Ft, { transform: De }), X = mt(e, "ADD_URI_SAFE_ATTR", kt, {
3357
- transform: Q,
3358
- base: kt
3359
- }), Y = mt(e, "ADD_DATA_URI_TAGS", Ot, {
3360
- transform: Q,
3361
- base: Ot
3362
- }), J = mt(e, "FORBID_CONTENTS", Dt, { transform: Q }), Ne = mt(e, "FORBID_TAGS", z({}), { transform: Q }), Pe = mt(e, "FORBID_ATTR", z({}), { transform: Q }), Et = P(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? z(e.USE_PROFILES) : e.USE_PROFILES : !1, L = e.ALLOW_ARIA_ATTR !== !1, Ie = e.ALLOW_DATA_ATTR !== !1, Le = e.ALLOW_UNKNOWN_PROTOCOLS || !1, gt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _t = e.SAFE_FOR_XML !== !1, vt = e.WHOLE_DOCUMENT || !1, G = e.RETURN_DOM || !1, K = e.RETURN_DOM_FRAGMENT || !1, q = e.RETURN_TRUSTED_TYPE || !1, bt = e.FORCE_BODY || !1, xt = e.SANITIZE_DOM !== !1, St = e.SANITIZE_NAMED_PROPS || !1, wt = e.KEEP_CONTENT !== !1, Tt = e.IN_PLACE || !1, _e = ze(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : nt, Mt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Z, Lt = P(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? z(e.MATHML_TEXT_INTEGRATION_POINTS) : R({}, It), zt = P(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? z(e.HTML_INTEGRATION_POINTS) : R({}, Rt);
3363
- let t = P(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? z(e.CUSTOM_ELEMENT_HANDLING) : ve(null);
3364
- if (N = ve(null), P(t, "tagNameCheck") && Gt(t.tagNameCheck) && (N.tagNameCheck = t.tagNameCheck), P(t, "attributeNameCheck") && Gt(t.attributeNameCheck) && (N.attributeNameCheck = t.attributeNameCheck), P(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), A(N), H && (Ie = !1), K && (G = !0), Et && (j = R({}, Ke), M = ve(null), Et.html === !0 && (R(j, Be), R(M, qe)), Et.svg === !0 && (R(j, Ve), R(M, Je), R(M, Xe)), Et.svgFilters === !0 && (R(j, He), R(M, Je), R(M, Xe)), Et.mathMl === !0 && (R(j, We), R(M, Ye), R(M, Xe))), F.tagCheck = null, F.attributeCheck = null, P(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? F.tagCheck = e.ADD_TAGS : Te(e.ADD_TAGS) && (j === ye && (j = z(j)), R(j, e.ADD_TAGS, Q))), P(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? F.attributeCheck = e.ADD_ATTR : Te(e.ADD_ATTR) && (M === Me && (M = z(M)), R(M, e.ADD_ATTR, Q))), P(e, "ADD_URI_SAFE_ATTR") && Te(e.ADD_URI_SAFE_ATTR) && R(X, e.ADD_URI_SAFE_ATTR, Q), P(e, "FORBID_CONTENTS") && Te(e.FORBID_CONTENTS) && (J === Dt && (J = z(J)), R(J, e.FORBID_CONTENTS, Q)), P(e, "ADD_FORBID_CONTENTS") && Te(e.ADD_FORBID_CONTENTS) && (J === Dt && (J = z(J)), R(J, e.ADD_FORBID_CONTENTS, Q)), wt && (j["#text"] = !0), vt && R(j, [
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, [
3365
3869
  "html",
3366
3870
  "head",
3367
3871
  "body"
3368
- ]), j.table && (R(j, ["tbody"]), delete Ne.tbody), e.TRUSTED_TYPES_POLICY) {
3369
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Fe("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
3370
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Fe("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
3371
- let t = x;
3372
- x = e.TRUSTED_TYPES_POLICY;
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;
3373
3877
  try {
3374
- S = T("");
3878
+ x = ae("");
3375
3879
  } catch (e) {
3376
- throw x = t, e;
3880
+ throw b = t, e;
3377
3881
  }
3378
- } else e.TRUSTED_TYPES_POLICY === null ? (x = void 0, S = "") : (x === void 0 && (x = re()), x && typeof S == "string" && (S = T("")));
3379
- k && k(e), Ut = e;
3380
- }, Kt = R({}, [
3381
- ...Ve,
3382
- ...He,
3383
- ...Ue
3384
- ]), qt = R({}, [...We, ...Ge]), Jt = function(e, t, n) {
3385
- return t.namespaceURI === Z ? e === "svg" : t.namespaceURI === At ? e === "svg" && (n === "annotation-xml" || Lt[n]) : !!Kt[e];
3386
- }, Yt = function(e, t, n) {
3387
- return t.namespaceURI === Z ? e === "math" : t.namespaceURI === jt ? e === "math" && zt[n] : !!qt[e];
3388
- }, Xt = function(e, t, n) {
3389
- return t.namespaceURI === jt && !zt[n] || t.namespaceURI === At && !Lt[n] ? !1 : !qt[e] && (Bt[e] || !Kt[e]);
3390
- }, Zt = function(e) {
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) {
3391
3895
  let t = g(e);
3392
3896
  (!t || !t.tagName) && (t = {
3393
- namespaceURI: Mt,
3897
+ namespaceURI: U,
3394
3898
  tagName: "template"
3395
3899
  });
3396
- let n = Ee(e.tagName), r = Ee(t.tagName);
3397
- return Pt[e.namespaceURI] ? e.namespaceURI === jt ? Jt(n, t, r) : e.namespaceURI === At ? Yt(n, t, r) : e.namespaceURI === Z ? Xt(n, t, r) : !!(Vt === "application/xhtml+xml" && Pt[e.namespaceURI]) : !1;
3398
- }, Qt = function(e) {
3399
- Ce(t.removed, { element: e });
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 });
3400
3904
  try {
3401
3905
  g(e).removeChild(e);
3402
3906
  } catch {
3403
- if (p(e), !g(e)) throw Fe("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
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");
3404
3908
  }
3405
- }, $t = function(e) {
3909
+ }, nn = function(e) {
3406
3910
  let t = h(e);
3407
3911
  if (t) {
3408
3912
  let e = [];
3409
- be(t, (t) => {
3410
- Ce(e, t);
3411
- }), be(e, (e) => {
3913
+ He(t, (t) => {
3914
+ Ge(e, t);
3915
+ }), He(e, (e) => {
3412
3916
  try {
3413
3917
  p(e);
3414
3918
  } catch {}
3415
3919
  });
3416
3920
  }
3417
- let n = v(e);
3921
+ let n = ee(e);
3418
3922
  if (n) for (let t = n.length - 1; t >= 0; --t) {
3419
3923
  let r = n[t], i = r && r.name;
3420
3924
  if (typeof i == "string") try {
3421
3925
  e.removeAttribute(i);
3422
3926
  } catch {}
3423
3927
  }
3424
- }, en = function(e, n) {
3928
+ }, Z = function(e, n) {
3425
3929
  try {
3426
- Ce(t.removed, {
3930
+ Ge(t.removed, {
3427
3931
  attribute: n.getAttributeNode(e),
3428
3932
  from: n
3429
3933
  });
3430
3934
  } catch {
3431
- Ce(t.removed, {
3935
+ Ge(t.removed, {
3432
3936
  attribute: null,
3433
3937
  from: n
3434
3938
  });
3435
3939
  }
3436
- if (n.removeAttribute(e), e === "is") if (G || K) try {
3437
- Qt(n);
3940
+ if (n.removeAttribute(e), e === "is") if (De || Oe) try {
3941
+ X(n);
3438
3942
  } catch {}
3439
3943
  else try {
3440
3944
  n.setAttribute(e, "");
3441
3945
  } catch {}
3442
- }, tn = function(e) {
3443
- let t = v(e);
3946
+ }, rn = function(e) {
3947
+ let t = ee(e);
3444
3948
  if (t) for (let n = t.length - 1; n >= 0; --n) {
3445
3949
  let r = t[n], i = r && r.name;
3446
- if (!(typeof i != "string" || M[Q(i)])) try {
3950
+ if (!(typeof i != "string" || M[q(i)])) try {
3447
3951
  e.removeAttribute(i);
3448
3952
  } catch {}
3449
3953
  }
3450
- }, nn = function(e) {
3954
+ }, an = function(e) {
3451
3955
  let t = [e];
3452
3956
  for (; t.length > 0;) {
3453
3957
  let e = t.pop();
3454
- (y ? y(e) : e.nodeType) === V.element && tn(e);
3958
+ (v ? v(e) : e.nodeType) === Ft.element && rn(e);
3455
3959
  let n = h(e);
3456
3960
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
3457
3961
  }
3458
- }, rn = function(e) {
3962
+ }, on = function(e) {
3459
3963
  let t = null, r = null;
3460
- if (bt) e = "<remove></remove>" + e;
3964
+ if (L) e = "<remove></remove>" + e;
3461
3965
  else {
3462
- let t = Oe(e, /^[\r\n\t ]+/);
3966
+ let t = Xe(e, /^[\r\n\t ]+/);
3463
3967
  r = t && t[0];
3464
3968
  }
3465
- Vt === "application/xhtml+xml" && Mt === Z && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
3466
- let i = x ? T(e) : e;
3467
- if (Mt === Z) try {
3468
- t = new l().parseFromString(i, Vt);
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);
3469
3973
  } catch {}
3470
3974
  if (!t || !t.documentElement) {
3471
- t = ae.createDocument(Mt, "template", null);
3975
+ t = le.createDocument(U, "template", null);
3472
3976
  try {
3473
- t.documentElement.innerHTML = Nt ? S : i;
3977
+ t.documentElement.innerHTML = at ? x : i;
3474
3978
  } catch {}
3475
3979
  }
3476
3980
  let a = t.body || t.documentElement;
3477
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Mt === Z ? se.call(t, vt ? "html" : "body")[0] : vt ? t.documentElement : a;
3478
- }, an = function(e) {
3479
- return E.call(e.ownerDocument || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
3480
- }, on = function(e) {
3481
- return e = ke(e, ce, " "), e = ke(e, le, " "), e = ke(e, ue, " "), e;
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;
3482
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
+ }, cn = function(e) {
3985
+ return e = Ze(e, E, " "), e = Ze(e, D, " "), e = Ze(e, de, " "), e;
3986
+ }, ln = function(e) {
3483
3987
  e.normalize();
3484
- let t = E.call(e.ownerDocument || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
3485
- for (; n;) n.data = on(n.data), n = t.nextNode();
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();
3486
3990
  let r = e.querySelectorAll?.call(e, "template");
3487
- r && be(r, (e) => {
3488
- ln(e.content) && sn(e.content);
3991
+ r && He(r, (e) => {
3992
+ dn(e.content) && ln(e.content);
3489
3993
  });
3490
- }, cn = function(e) {
3491
- let t = b ? b(e) : null;
3492
- return typeof t != "string" || Q(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);
3493
- }, ln = function(e) {
3494
- if (!y || typeof e != "object" || !e) return !1;
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
+ }, dn = function(e) {
3998
+ if (!v || typeof e != "object" || !e) return !1;
3495
3999
  try {
3496
- return y(e) === V.documentFragment;
4000
+ return v(e) === Ft.documentFragment;
3497
4001
  } catch {
3498
4002
  return !1;
3499
4003
  }
3500
- }, un = function(e) {
3501
- if (!y || typeof e != "object" || !e) return !1;
4004
+ }, Q = function(e) {
4005
+ if (!v || typeof e != "object" || !e) return !1;
3502
4006
  try {
3503
- return typeof y(e) == "number";
4007
+ return typeof v(e) == "number";
3504
4008
  } catch {
3505
4009
  return !1;
3506
4010
  }
3507
4011
  };
3508
- function dn(e, n, r) {
3509
- e.length !== 0 && be(e, (e) => {
3510
- e.call(t, n, r, Ut);
4012
+ function fn(e, n, r) {
4013
+ e.length !== 0 && He(e, (e) => {
4014
+ e.call(t, n, r, J);
3511
4015
  });
3512
4016
  }
3513
- let fn = function(e, t) {
3514
- return !!(_t && e.hasChildNodes() && !un(e.firstElementChild) && I(st, e.textContent) && I(st, e.innerHTML) || _t && e.namespaceURI === Z && t === "style" && un(e.firstElementChild) || e.nodeType === V.processingInstruction || _t && e.nodeType === V.comment && I(ct, e.data));
4017
+ 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));
3515
4019
  }, pn = function(e, t) {
3516
- if (!Ne[t] && _n(t) && (N.tagNameCheck instanceof RegExp && I(N.tagNameCheck, t) || N.tagNameCheck instanceof Function && N.tagNameCheck(t))) return !1;
3517
- if (wt && !J[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]) {
3518
4022
  let t = g(e), n = h(e);
3519
4023
  if (n && t) {
3520
4024
  let r = n.length;
3521
4025
  for (let i = r - 1; i >= 0; --i) {
3522
- let r = Tt ? n[i] : f(n[i], !0);
4026
+ let r = Fe ? n[i] : f(n[i], !0);
3523
4027
  t.insertBefore(r, m(e));
3524
4028
  }
3525
4029
  }
3526
4030
  }
3527
- return Qt(e), !0;
4031
+ return X(e), !0;
3528
4032
  }, mn = function(e) {
3529
- if (dn(O.beforeSanitizeElements, e, null), cn(e)) return Qt(e), !0;
3530
- let n = Q(b ? b(e) : e.nodeName);
3531
- if (dn(O.uponSanitizeElement, 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, {
3532
4036
  tagName: n,
3533
4037
  allowedTags: j
3534
- }), fn(e, n)) return Qt(e), !0;
3535
- if (Ne[n] || !(F.tagCheck instanceof Function && F.tagCheck(n)) && !j[n]) return pn(e, n);
3536
- if ((y ? y(e) : e.nodeType) === V.element && !Zt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && I(lt, e.innerHTML)) return Qt(e), !0;
3537
- if (H && e.nodeType === V.text) {
3538
- let n = on(e.textContent);
3539
- e.textContent !== n && (Ce(t.removed, { element: e.cloneNode() }), e.textContent = n);
3540
- }
3541
- return dn(O.afterSanitizeElements, e, null), !1;
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;
3542
4046
  }, hn = function(e, t, r) {
3543
- if (Pe[t] || xt && (t === "id" || t === "name") && (r in n || r in Wt)) return !1;
3544
- let i = M[t] || F.attributeCheck instanceof Function && F.attributeCheck(t, e);
3545
- if (!(Ie && I(de, t)) && !(L && I(fe, t))) {
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))) {
3546
4050
  if (!i) {
3547
- if (!(_n(e) && (N.tagNameCheck instanceof RegExp && I(N.tagNameCheck, e) || N.tagNameCheck instanceof Function && N.tagNameCheck(e)) && (N.attributeNameCheck instanceof RegExp && I(N.attributeNameCheck, t) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(t, e)) || t === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && I(N.tagNameCheck, r) || N.tagNameCheck instanceof Function && N.tagNameCheck(r)))) return !1;
3548
- } else if (!X[t] && !I(_e, ke(r, he, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Ae(r, "data:") === 0 && Y[e]) && !(Le && !I(me, ke(r, he, ""))) && r) return !1;
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;
3549
4053
  }
3550
4054
  return !0;
3551
- }, gn = R({}, [
4055
+ }, gn = W({}, [
3552
4056
  "annotation-xml",
3553
4057
  "color-profile",
3554
4058
  "font-face",
@@ -3558,64 +4062,64 @@ function ht() {
3558
4062
  "font-face-uri",
3559
4063
  "missing-glyph"
3560
4064
  ]), _n = function(e) {
3561
- return !gn[Ee(e)] && I(ge, e);
4065
+ return !gn[Je(e)] && H(pe, e);
3562
4066
  }, vn = function(e, t, n, r) {
3563
- if (x && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
3564
- case "TrustedHTML": return T(r);
3565
- case "TrustedScriptURL": return ne(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);
3566
4070
  }
3567
4071
  return r;
3568
4072
  }, yn = function(e, n, r, i) {
3569
4073
  try {
3570
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), cn(e) ? Qt(e) : Se(t.removed);
4074
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), un(e) ? X(e) : We(t.removed);
3571
4075
  } catch {
3572
- en(n, e);
4076
+ Z(n, e);
3573
4077
  }
3574
4078
  }, bn = function(e) {
3575
- dn(O.beforeSanitizeAttributes, e, null);
4079
+ fn(T.beforeSanitizeAttributes, e, null);
3576
4080
  let t = e.attributes;
3577
- if (!t || cn(e)) return;
4081
+ if (!t || un(e)) return;
3578
4082
  let n = {
3579
4083
  attrName: "",
3580
4084
  attrValue: "",
3581
4085
  keepAttr: !0,
3582
4086
  allowedAttributes: M,
3583
4087
  forceKeepAttr: void 0
3584
- }, r = t.length, i = Q(e.nodeName);
4088
+ }, r = t.length, i = q(e.nodeName);
3585
4089
  for (; r--;) {
3586
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Q(o), u = c, d = o === "value" ? u : je(u);
3587
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, dn(O.uponSanitizeAttribute, e, n), d = n.attrValue, St && (l === "id" || l === "name") && Ae(d, Ct) !== 0 && (en(o, e), d = Ct + d), _t && I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
3588
- en(o, e);
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);
3589
4093
  continue;
3590
4094
  }
3591
- if (l === "attributename" && Oe(d, "href")) {
3592
- en(o, e);
4095
+ if (l === "attributename" && Xe(d, "href")) {
4096
+ Z(o, e);
3593
4097
  continue;
3594
4098
  }
3595
4099
  if (!n.forceKeepAttr) {
3596
4100
  if (!n.keepAttr) {
3597
- en(o, e);
4101
+ Z(o, e);
3598
4102
  continue;
3599
4103
  }
3600
- if (!gt && I(ut, d)) {
3601
- en(o, e);
4104
+ if (!xe && H(Pt, d)) {
4105
+ Z(o, e);
3602
4106
  continue;
3603
4107
  }
3604
- if (H && (d = on(d)), !hn(i, l, d)) {
3605
- en(o, e);
4108
+ if (Se && (d = cn(d)), !hn(i, l, d)) {
4109
+ Z(o, e);
3606
4110
  continue;
3607
4111
  }
3608
4112
  d = vn(i, l, s, d), d !== u && yn(e, o, s, d);
3609
4113
  }
3610
4114
  }
3611
- dn(O.afterSanitizeAttributes, e, null);
4115
+ fn(T.afterSanitizeAttributes, e, null);
3612
4116
  }, xn = function(e) {
3613
- let t = null, n = an(e);
3614
- for (dn(O.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (dn(O.uponSanitizeShadowNode, t, null), mn(t), bn(t), ln(t.content) && xn(t.content), (y ? y(t) : t.nodeType) === V.element) {
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) {
3615
4119
  let e = _(t);
3616
- ln(e) && (Sn(e), xn(e));
4120
+ dn(e) && (Sn(e), xn(e));
3617
4121
  }
3618
- dn(O.afterSanitizeShadowDOM, e, null);
4122
+ fn(T.afterSanitizeShadowDOM, e, null);
3619
4123
  }, Sn = function(e) {
3620
4124
  let t = [{
3621
4125
  node: e,
@@ -3627,16 +4131,16 @@ function ht() {
3627
4131
  xn(e.shadow);
3628
4132
  continue;
3629
4133
  }
3630
- let n = e.node, r = (y ? y(n) : n.nodeType) === V.element, i = h(n);
4134
+ let n = e.node, r = (v ? v(n) : n.nodeType) === Ft.element, i = h(n);
3631
4135
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
3632
4136
  node: i[e],
3633
4137
  shadow: null
3634
4138
  });
3635
4139
  if (r) {
3636
- let e = b ? b(n) : null;
3637
- if (typeof e == "string" && Q(e) === "template") {
4140
+ let e = y ? y(n) : null;
4141
+ if (typeof e == "string" && q(e) === "template") {
3638
4142
  let e = n.content;
3639
- ln(e) && t.push({
4143
+ dn(e) && t.push({
3640
4144
  node: e,
3641
4145
  shadow: null
3642
4146
  });
@@ -3644,7 +4148,7 @@ function ht() {
3644
4148
  }
3645
4149
  if (r) {
3646
4150
  let e = _(n);
3647
- ln(e) && t.push({
4151
+ dn(e) && t.push({
3648
4152
  node: null,
3649
4153
  shadow: e
3650
4154
  }, {
@@ -3656,67 +4160,67 @@ function ht() {
3656
4160
  };
3657
4161
  return t.sanitize = function(e) {
3658
4162
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
3659
- if (Nt = !e, Nt && (e = "<!-->"), typeof e != "string" && !un(e) && (e = Re(e), typeof e != "string")) throw Fe("dirty is not a string, aborting");
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");
3660
4164
  if (!t.isSupported) return e;
3661
- yt ? (j = U, M = W) : $(n), (O.uponSanitizeElement.length > 0 || O.uponSanitizeAttribute.length > 0) && (j = z(j)), O.uponSanitizeAttribute.length > 0 && (M = z(M)), t.removed = [];
3662
- let c = Tt && typeof e != "string" && un(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);
3663
4167
  if (c) {
3664
- let t = b ? b(e) : e.nodeName;
4168
+ let t = y ? y(e) : e.nodeName;
3665
4169
  if (typeof t == "string") {
3666
- let e = Q(t);
3667
- if (!j[e] || Ne[e]) throw Fe("root node is forbidden and cannot be sanitized in-place");
4170
+ let e = q(t);
4171
+ if (!j[e] || _e[e]) throw it("root node is forbidden and cannot be sanitized in-place");
3668
4172
  }
3669
- if (cn(e)) throw Fe("root node is clobbered and cannot be sanitized in-place");
4173
+ if (un(e)) throw it("root node is clobbered and cannot be sanitized in-place");
3670
4174
  try {
3671
4175
  Sn(e);
3672
4176
  } catch (t) {
3673
- throw $t(e), t;
4177
+ throw nn(e), t;
3674
4178
  }
3675
- } else if (un(e)) i = rn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === V.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Sn(a);
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);
3676
4180
  else {
3677
- if (!G && !H && !vt && e.indexOf("<") === -1) return x && q ? T(e) : e;
3678
- if (i = rn(e), !i) return G ? null : q ? S : "";
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 : "";
3679
4183
  }
3680
- i && bt && Qt(i.firstChild);
3681
- let l = an(c ? e : i);
4184
+ i && L && X(i.firstChild);
4185
+ let l = sn(c ? e : i);
3682
4186
  try {
3683
- for (; o = l.nextNode();) mn(o), bn(o), ln(o.content) && xn(o.content);
4187
+ for (; o = l.nextNode();) mn(o), bn(o), dn(o.content) && xn(o.content);
3684
4188
  } catch (t) {
3685
- throw c && $t(e), t;
4189
+ throw c && nn(e), t;
3686
4190
  }
3687
- if (c) return be(t.removed, (e) => {
3688
- e.element && nn(e.element);
3689
- }), H && sn(e), e;
3690
- if (G) {
3691
- if (H && sn(i), K) for (s = oe.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
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);
3692
4196
  else s = i;
3693
- return (M.shadowroot || M.shadowrootmode) && (s = D.call(r, s, !0)), s;
4197
+ return (M.shadowroot || M.shadowrootmode) && (s = w.call(r, s, !0)), s;
3694
4198
  }
3695
- let u = vt ? i.outerHTML : i.innerHTML;
3696
- return vt && j["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && I(at, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = on(u)), x && q ? T(u) : u;
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;
3697
4201
  }, t.setConfig = function() {
3698
- $(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), yt = !0, U = j, W = M;
4202
+ Xt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), we = !0, Te = j, Ee = M;
3699
4203
  }, t.clearConfig = function() {
3700
- Ut = null, yt = !1, U = null, W = null, x = C, S = "";
4204
+ J = null, we = !1, Te = null, Ee = null, b = te, x = "";
3701
4205
  }, t.isValidAttribute = function(e, t, n) {
3702
- return Ut || $({}), hn(Q(e), Q(t), n);
4206
+ return J || Xt({}), hn(q(e), q(t), n);
3703
4207
  }, t.addHook = function(e, t) {
3704
- typeof t == "function" && P(O, e) && Ce(O[e], t);
4208
+ typeof t == "function" && B(T, e) && Ge(T[e], t);
3705
4209
  }, t.removeHook = function(e, t) {
3706
- if (P(O, e)) {
4210
+ if (B(T, e)) {
3707
4211
  if (t !== void 0) {
3708
- let n = xe(O[e], t);
3709
- return n === -1 ? void 0 : we(O[e], n, 1)[0];
4212
+ let n = Ue(T[e], t);
4213
+ return n === -1 ? void 0 : Ke(T[e], n, 1)[0];
3710
4214
  }
3711
- return Se(O[e]);
4215
+ return We(T[e]);
3712
4216
  }
3713
4217
  }, t.removeHooks = function(e) {
3714
- P(O, e) && (O[e] = []);
4218
+ B(T, e) && (T[e] = []);
3715
4219
  }, t.removeAllHooks = function() {
3716
- O = pt();
4220
+ T = Rt();
3717
4221
  }, t;
3718
4222
  }
3719
- var gt = ht(), H = /* @__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("."), _t = [
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 = [
3720
4224
  "href",
3721
4225
  "title",
3722
4226
  "src",
@@ -3724,10 +4228,10 @@ var gt = ht(), H = /* @__PURE__ */ "a.b.strong.i.em.u.s.p.br.span.div.ul.ol.li.h
3724
4228
  "width",
3725
4229
  "height"
3726
4230
  ];
3727
- function vt(e) {
3728
- let t = gt.sanitize(e, {
3729
- ALLOWED_TAGS: H,
3730
- ALLOWED_ATTR: _t,
4231
+ function Wt(e) {
4232
+ let t = Vt.sanitize(e, {
4233
+ ALLOWED_TAGS: Ht,
4234
+ ALLOWED_ATTR: Ut,
3731
4235
  ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
3732
4236
  }), n = new DOMParser().parseFromString(t, "text/html");
3733
4237
  return n.querySelectorAll("a[href]").forEach((e) => {
@@ -3736,12 +4240,12 @@ function vt(e) {
3736
4240
  }
3737
4241
  //#endregion
3738
4242
  //#region src/components/webmapx-layer-info-dialog.ts
3739
- var yt = /^https:\/\/\S+$/i, U = class extends h {
4243
+ var Gt = /^https:\/\/\S+$/i, Kt = class extends S {
3740
4244
  constructor(...e) {
3741
4245
  super(...e), this.dialogTitle = "", this.attribution = "", this.featureSummary = "", this.content = { kind: "none" }, this.fetchToken = 0;
3742
4246
  }
3743
4247
  static {
3744
- this.styles = g`
4248
+ this.styles = C`
3745
4249
  :host { display: block; }
3746
4250
 
3747
4251
  sl-dialog::part(panel) {
@@ -3804,13 +4308,13 @@ var yt = /^https:\/\/\S+$/i, U = class extends h {
3804
4308
  this.content = { kind: "none" };
3805
4309
  return;
3806
4310
  }
3807
- if (yt.test(i)) {
4311
+ if (Gt.test(i)) {
3808
4312
  this.loadFromUrl(i);
3809
4313
  return;
3810
4314
  }
3811
4315
  this.content = {
3812
4316
  kind: "html",
3813
- html: vt(i)
4317
+ html: Wt(i)
3814
4318
  };
3815
4319
  }
3816
4320
  close() {
@@ -3826,7 +4330,7 @@ var yt = /^https:\/\/\S+$/i, U = class extends h {
3826
4330
  if (t !== this.fetchToken) return;
3827
4331
  this.content = {
3828
4332
  kind: "html",
3829
- html: vt(r)
4333
+ html: Wt(r)
3830
4334
  };
3831
4335
  } catch {
3832
4336
  if (t !== this.fetchToken) return;
@@ -3838,22 +4342,22 @@ var yt = /^https:\/\/\S+$/i, U = class extends h {
3838
4342
  }
3839
4343
  renderContent() {
3840
4344
  switch (this.content.kind) {
3841
- case "none": return this.featureSummary ? null : _`<p class="placeholder">No detailed layer information available.</p>`;
3842
- case "loading": return _`<div class="loading"><sl-spinner></sl-spinner> Loading layer information…</div>`;
3843
- case "error": return _`<p class="placeholder">${this.content.message}</p>`;
3844
- case "html": return _`<div class="abstract">${ee(this.content.html)}</div>`;
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>`;
3845
4349
  }
3846
4350
  }
3847
4351
  render() {
3848
- return _`
4352
+ return w`
3849
4353
  <sl-dialog label=${this.dialogTitle}
3850
4354
  @sl-request-close=${(e) => {
3851
4355
  e.detail?.source === "overlay" && this.close();
3852
4356
  }}>
3853
4357
  ${this.renderContent()}
3854
- ${this.featureSummary || this.attribution ? _`<div class="layer-meta">
3855
- ${this.featureSummary ? _`<div class="feature-summary">${this.featureSummary}</div>` : null}
3856
- ${this.attribution ? _`<div class="attribution"><strong>Attribution:</strong> ${c(this.attribution)}</div>` : null}
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}
3857
4361
  </div>` : null}
3858
4362
  <div class="footer">
3859
4363
  <sl-button autofocus @click=${this.close}>Close</sl-button>
@@ -3862,15 +4366,15 @@ var yt = /^https:\/\/\S+$/i, U = class extends h {
3862
4366
  `;
3863
4367
  }
3864
4368
  };
3865
- o([w()], U.prototype, "dialogTitle", void 0), o([w()], U.prototype, "attribution", void 0), o([w()], U.prototype, "featureSummary", void 0), o([w()], U.prototype, "content", void 0), o([S("sl-dialog")], U.prototype, "dialog", void 0), U = o([b("webmapx-layer-info-dialog")], U);
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);
3866
4370
  //#endregion
3867
4371
  //#region src/components/webmapx-layer-style-dialog.ts
3868
- var W = class extends h {
4372
+ var K = class extends S {
3869
4373
  constructor(...e) {
3870
4374
  super(...e), this.dialogTitle = "Layer style", this.groups = [], this.analyses = {}, this.visibleAttributeTables = {};
3871
4375
  }
3872
4376
  static {
3873
- this.styles = g`
4377
+ this.styles = C`
3874
4378
  :host { display: block; }
3875
4379
 
3876
4380
  sl-dialog::part(panel) {
@@ -4205,13 +4709,13 @@ var W = class extends h {
4205
4709
  }
4206
4710
  renderValue(e) {
4207
4711
  let t = this.toValidUrl(e);
4208
- if (t) return _`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>`;
4712
+ if (t) return w`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>`;
4209
4713
  let n = this.formatValue(e);
4210
- return n === "" ? v : this.isDateTimeValue(e) ? _`<span class="no-wrap-value">${n}</span>` : n;
4714
+ return n === "" ? T : this.isDateTimeValue(e) ? w`<span class="no-wrap-value">${n}</span>` : n;
4211
4715
  }
4212
4716
  renderSampleValue(e) {
4213
4717
  let t = this.toValidUrl(e);
4214
- return t ? _`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>` : e;
4718
+ return t ? w`<a href=${t.href} target="_blank" rel="noopener noreferrer">${this.renderShortUrlLabel(t)}</a>` : e;
4215
4719
  }
4216
4720
  toValidUrl(e) {
4217
4721
  if (typeof e != "string") return null;
@@ -4243,29 +4747,29 @@ var W = class extends h {
4243
4747
  }
4244
4748
  renderAnalysis(e) {
4245
4749
  let t = this.analyses[e.sourceId];
4246
- return t ? _`
4750
+ return t ? w`
4247
4751
  <div class="attribute-analysis">
4248
4752
  <div class="analysis-row"><span class="analysis-label">Type</span><span class="analysis-value">${t.type}</span></div>
4249
4753
  <div class="analysis-row"><span class="analysis-label">Values</span><span class="analysis-value">${t.presentCount} present, ${t.missingCount} missing</span></div>
4250
4754
  <div class="analysis-row"><span class="analysis-label">Unique</span><span class="analysis-value">${t.uniqueCount}</span></div>
4251
- ${t.rangeLabel ? _`<div class="analysis-row"><span class="analysis-label">Range</span><span class="analysis-value">${t.rangeLabel}</span></div>` : null}
4252
- ${t.sampleValues.length > 0 ? _`<div class="analysis-row">
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">
4253
4757
  <span class="analysis-label">Sample</span>
4254
4758
  <span class="analysis-value">
4255
- ${t.sampleValues.map((e, t) => _`${t > 0 ? "; " : ""}${this.renderSampleValue(e)}`)}
4759
+ ${t.sampleValues.map((e, t) => w`${t > 0 ? "; " : ""}${this.renderSampleValue(e)}`)}
4256
4760
  </span>
4257
4761
  </div>` : null}
4258
4762
  </div>
4259
4763
  ` : null;
4260
4764
  }
4261
4765
  renderAttributeTable(e) {
4262
- return this.visibleAttributeTables[e.sourceId] ? e.featureRows.length === 0 ? _`<p class="placeholder">No loaded feature rows available.</p>` : _`
4766
+ return this.visibleAttributeTables[e.sourceId] ? e.featureRows.length === 0 ? w`<p class="placeholder">No loaded feature rows available.</p>` : w`
4263
4767
  <div class="attribute-table-wrap">
4264
4768
  <table class="attribute-table">
4265
4769
  <thead>
4266
4770
  <tr>
4267
4771
  <th>#</th>
4268
- ${e.attributes.map((t) => _`
4772
+ ${e.attributes.map((t) => w`
4269
4773
  <th class="attribute-heading">
4270
4774
  <button
4271
4775
  type="button"
@@ -4278,10 +4782,10 @@ var W = class extends h {
4278
4782
  </tr>
4279
4783
  </thead>
4280
4784
  <tbody>
4281
- ${e.featureRows.map((t, n) => _`
4785
+ ${e.featureRows.map((t, n) => w`
4282
4786
  <tr>
4283
4787
  <td class="feature-index-cell">${n + 1}</td>
4284
- ${e.attributes.map((e) => _`
4788
+ ${e.attributes.map((e) => w`
4285
4789
  <td class=${this.toValidUrl(t[e.name]) ? "feature-value-cell url-value-cell" : "feature-value-cell"}>
4286
4790
  ${this.renderValue(t[e.name])}
4287
4791
  </td>
@@ -4294,33 +4798,33 @@ var W = class extends h {
4294
4798
  ` : null;
4295
4799
  }
4296
4800
  render() {
4297
- return _`
4801
+ return w`
4298
4802
  <sl-dialog label=${this.dialogTitle}
4299
4803
  @sl-request-close=${(e) => {
4300
4804
  e.detail?.source === "overlay" && this.close();
4301
4805
  }}>
4302
- ${this.groups.length > 0 ? _`<div class="source-list">
4303
- ${this.groups.map((e) => _`
4806
+ ${this.groups.length > 0 ? w`<div class="source-list">
4807
+ ${this.groups.map((e) => w`
4304
4808
  <section class="source-group">
4305
4809
  <h3 class="source-title">${e.sourceId}</h3>
4306
4810
  <div class="source-meta">
4307
4811
  <span class="pill">${e.featureCountLabel}</span>
4308
- ${e.geometryTypes.map((e) => _`<span class="pill">${e}</span>`)}
4812
+ ${e.geometryTypes.map((e) => w`<span class="pill">${e}</span>`)}
4309
4813
  </div>
4310
4814
  <p class="subheading">Table</p>
4311
- ${e.attributes.length > 0 ? _`<div class="table-controls">
4815
+ ${e.attributes.length > 0 ? w`<div class="table-controls">
4312
4816
  <span class="table-hint">
4313
4817
  ${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."}
4314
4818
  </span>
4315
4819
  <sl-button size="small" @click=${() => this.toggleAttributeTable(e.sourceId)}>
4316
4820
  ${this.visibleAttributeTables[e.sourceId] ? "Hide table" : "Table"}
4317
4821
  </sl-button>
4318
- </div>` : _`<p class="placeholder">No attributes found in loaded features.</p>`}
4822
+ </div>` : w`<p class="placeholder">No attributes found in loaded features.</p>`}
4319
4823
  ${this.renderAttributeTable(e)}
4320
4824
  ${this.renderAnalysis(e)}
4321
4825
  <p class="subheading">Layers</p>
4322
4826
  <div class="style-targets">
4323
- ${e.layers.map((e) => _`
4827
+ ${e.layers.map((e) => w`
4324
4828
  <div class="style-target">
4325
4829
  <sl-icon name="palette"></sl-icon>
4326
4830
  <span class="target-label">${e.id}</span>
@@ -4330,7 +4834,7 @@ var W = class extends h {
4330
4834
  </div>
4331
4835
  </section>
4332
4836
  `)}
4333
- </div>` : _`<p class="placeholder">No editable style source found.</p>`}
4837
+ </div>` : w`<p class="placeholder">No editable style source found.</p>`}
4334
4838
  <div class="footer">
4335
4839
  <sl-button autofocus @click=${this.close}>Close</sl-button>
4336
4840
  </div>
@@ -4338,18 +4842,18 @@ var W = class extends h {
4338
4842
  `;
4339
4843
  }
4340
4844
  };
4341
- o([w()], W.prototype, "dialogTitle", void 0), o([w()], W.prototype, "groups", void 0), o([w()], W.prototype, "analyses", void 0), o([w()], W.prototype, "visibleAttributeTables", void 0), o([S("sl-dialog")], W.prototype, "dialog", void 0), W = o([b("webmapx-layer-style-dialog")], W);
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);
4342
4846
  //#endregion
4343
4847
  //#region src/components/webmapx-save-layers-dialog.ts
4344
- var bt, G = class extends h {
4848
+ var qt, q = class extends S {
4345
4849
  static {
4346
- bt = this;
4850
+ qt = this;
4347
4851
  }
4348
4852
  constructor(...e) {
4349
4853
  super(...e), this.items = [], this.filename = "map-layers", this.includeStyle = !0, this.zip = !0;
4350
4854
  }
4351
4855
  static {
4352
- this.styles = g`
4856
+ this.styles = C`
4353
4857
  :host { display: block; }
4354
4858
 
4355
4859
  sl-dialog::part(panel) {
@@ -4423,7 +4927,7 @@ var bt, G = class extends h {
4423
4927
  buildFileBases(e) {
4424
4928
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
4425
4929
  for (let r of e) {
4426
- let e = bt.sanitizeFileBase(r.layerId), i = e, a = 2;
4930
+ let e = qt.sanitizeFileBase(r.layerId), i = e, a = 2;
4427
4931
  for (; n.has(i);) i = `${e}_${a++}`;
4428
4932
  n.add(i), t.set(r.layerId, i);
4429
4933
  }
@@ -4466,14 +4970,14 @@ var bt, G = class extends h {
4466
4970
  this.downloadBlob(new Blob([r], { type: "application/geo+json" }), `${t}.geojson`), this.close();
4467
4971
  return;
4468
4972
  }
4469
- let n = [...e].reverse(), r = this.buildFileBases(n), i = new f(new d("application/zip"));
4973
+ let n = [...e].reverse(), r = this.buildFileBases(n), i = new ce(new se("application/zip"));
4470
4974
  for (let e of n) {
4471
4975
  let t = typeof e.data == "string" ? e.data : JSON.stringify(e.data, null, 2);
4472
- await i.add(`${r.get(e.layerId)}.geojson`, new u(t));
4976
+ await i.add(`${r.get(e.layerId)}.geojson`, new oe(t));
4473
4977
  }
4474
4978
  if (this.includeStyle) for (let e of n) {
4475
4979
  let t = this.buildStyleConfig(e, r.get(e.layerId));
4476
- await i.add(`${r.get(e.layerId)}_style.json`, new u(JSON.stringify(t, null, 2)));
4980
+ await i.add(`${r.get(e.layerId)}_style.json`, new oe(JSON.stringify(t, null, 2)));
4477
4981
  }
4478
4982
  this.downloadBlob(await i.close(), `${t}.zip`), this.close();
4479
4983
  }
@@ -4483,13 +4987,13 @@ var bt, G = class extends h {
4483
4987
  }
4484
4988
  render() {
4485
4989
  let e = this.selectedItems.length, t = this.singleFileEligible;
4486
- return _`
4990
+ return w`
4487
4991
  <sl-dialog label="Save layer(s)"
4488
4992
  @sl-request-close=${(e) => {
4489
4993
  e.detail?.source === "overlay" && this.close();
4490
4994
  }}>
4491
4995
  <div class="layer-list">
4492
- ${this.items.map((e) => _`
4996
+ ${this.items.map((e) => w`
4493
4997
  <div class="layer-row">
4494
4998
  <sl-checkbox
4495
4999
  ?checked=${e.checked}
@@ -4497,7 +5001,7 @@ var bt, G = class extends h {
4497
5001
  @sl-change=${(t) => this.toggleItem(e.layerId, t.target.checked)}
4498
5002
  >
4499
5003
  ${e.label}
4500
- ${e.data === null ? _`<span class="unsupported">(no exportable data)</span>` : null}
5004
+ ${e.data === null ? w`<span class="unsupported">(no exportable data)</span>` : null}
4501
5005
  </sl-checkbox>
4502
5006
  </div>
4503
5007
  `)}
@@ -4516,7 +5020,7 @@ var bt, G = class extends h {
4516
5020
  }}>
4517
5021
  Include style
4518
5022
  </sl-checkbox>
4519
- ${t ? _`
5023
+ ${t ? w`
4520
5024
  <sl-checkbox ?checked=${this.zip}
4521
5025
  @sl-change=${(e) => {
4522
5026
  this.zip = e.target.checked;
@@ -4536,15 +5040,15 @@ var bt, G = class extends h {
4536
5040
  `;
4537
5041
  }
4538
5042
  };
4539
- o([w()], G.prototype, "items", void 0), o([w()], G.prototype, "filename", void 0), o([w()], G.prototype, "includeStyle", void 0), o([w()], G.prototype, "zip", void 0), o([S("sl-dialog")], G.prototype, "dialog", void 0), o([S(".filename-input")], G.prototype, "filenameInput", void 0), G = bt = o([b("webmapx-save-layers-dialog")], G);
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);
4540
5044
  //#endregion
4541
5045
  //#region src/components/webmapx-permalink-dialog.ts
4542
- var K = class extends h {
5046
+ var J = class extends S {
4543
5047
  constructor(...e) {
4544
5048
  super(...e), this.url = "", this.hasConfig = !1, this.dynamicLayerIds = [], this.copied = !1;
4545
5049
  }
4546
5050
  static {
4547
- this.styles = g`
5051
+ this.styles = C`
4548
5052
  :host { display: block; }
4549
5053
 
4550
5054
  sl-dialog::part(panel) {
@@ -4593,9 +5097,9 @@ var K = class extends h {
4593
5097
  }, 2e3);
4594
5098
  }
4595
5099
  render() {
4596
- return _`
5100
+ return w`
4597
5101
  <sl-dialog label="Permalink">
4598
- ${this.dynamicLayerIds.length > 0 ? _`
5102
+ ${this.dynamicLayerIds.length > 0 ? w`
4599
5103
  <div class="warning">
4600
5104
  <sl-icon name="exclamation-triangle"></sl-icon>
4601
5105
  <span>
@@ -4605,7 +5109,7 @@ var K = class extends h {
4605
5109
  </span>
4606
5110
  </div>
4607
5111
  ` : null}
4608
- ${this.hasConfig ? null : _`
5112
+ ${this.hasConfig ? null : w`
4609
5113
  <div class="warning">
4610
5114
  <sl-icon name="exclamation-triangle"></sl-icon>
4611
5115
  <span>Config was not loaded from a URL — layer state may not restore for recipients using a different config.</span>
@@ -4623,11 +5127,11 @@ var K = class extends h {
4623
5127
  `;
4624
5128
  }
4625
5129
  };
4626
- o([w()], K.prototype, "url", void 0), o([w()], K.prototype, "hasConfig", void 0), o([w()], K.prototype, "dynamicLayerIds", void 0), o([w()], K.prototype, "copied", void 0), o([S("sl-dialog")], K.prototype, "dialog", void 0), K = o([b("webmapx-permalink-dialog")], K);
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);
4627
5131
  //#endregion
4628
5132
  //#region src/components/webmapx-layer-overview.ts
4629
- var q;
4630
- function xt(e) {
5133
+ var Jt;
5134
+ function Yt(e) {
4631
5135
  let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity, a = (e) => {
4632
5136
  if (typeof e[0] == "number") {
4633
5137
  let [a, o] = e;
@@ -4645,7 +5149,7 @@ function xt(e) {
4645
5149
  Math.min(85.05112878, i)
4646
5150
  ] : null;
4647
5151
  }
4648
- function St(e, t) {
5152
+ function Xt(e, t) {
4649
5153
  return e ? t ? [
4650
5154
  Math.min(e[0], t[0]),
4651
5155
  Math.min(e[1], t[1]),
@@ -4653,10 +5157,10 @@ function St(e, t) {
4653
5157
  Math.max(e[3], t[3])
4654
5158
  ] : e : t;
4655
5159
  }
4656
- function Ct(e) {
5160
+ function Zt(e) {
4657
5161
  if (!e) return 0;
4658
5162
  switch (e.type) {
4659
- case "GeometryCollection": return e.geometries.reduce((e, t) => e + Ct(t), 0);
5163
+ case "GeometryCollection": return e.geometries.reduce((e, t) => e + Zt(t), 0);
4660
5164
  case "Point": return 1;
4661
5165
  case "MultiPoint":
4662
5166
  case "LineString": return e.coordinates.length;
@@ -4666,16 +5170,16 @@ function Ct(e) {
4666
5170
  default: return 0;
4667
5171
  }
4668
5172
  }
4669
- function wt(e) {
5173
+ function Qt(e) {
4670
5174
  let t = /* @__PURE__ */ new Map(), n = 0;
4671
5175
  for (let r of e.features ?? []) {
4672
5176
  let e = r.geometry?.type ?? "unknown";
4673
- t.set(e, (t.get(e) ?? 0) + 1), n += Ct(r.geometry);
5177
+ t.set(e, (t.get(e) ?? 0) + 1), n += Zt(r.geometry);
4674
5178
  }
4675
5179
  let r = e.features?.length ?? 0, i = [...t.entries()].map(([e, t]) => `${e}: ${t}`).join(", ");
4676
5180
  return `${i && t.size > 1 ? `${r} features (${i})` : `${r} feature${r === 1 ? "" : "s"}${i ? ` (${[...t.keys()][0]})` : ""}`}, ${n} ${n === 1 ? "vertex" : "vertices"}`;
4677
5181
  }
4678
- function Tt(e, t) {
5182
+ function $t(e, t) {
4679
5183
  if (Array.isArray(t?.sublayers) && t.sublayers.length > 0) {
4680
5184
  let n = /* @__PURE__ */ new Set();
4681
5185
  for (let e of t.sublayers) typeof e.source == "string" && n.add(e.source);
@@ -4683,16 +5187,16 @@ function Tt(e, t) {
4683
5187
  }
4684
5188
  return typeof t?.sourceId == "string" ? [[t.sourceId]] : [];
4685
5189
  }
4686
- var Et = new Set([
5190
+ var en = new Set([
4687
5191
  "circle",
4688
5192
  "symbol",
4689
5193
  "label",
4690
5194
  "line",
4691
5195
  "fill",
4692
5196
  "fill-extrusion"
4693
- ]), J = class extends s {
5197
+ ]), Y = class extends f {
4694
5198
  static {
4695
- q = this;
5199
+ Jt = this;
4696
5200
  }
4697
5201
  constructor(...e) {
4698
5202
  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;
@@ -4707,7 +5211,7 @@ var Et = new Set([
4707
5211
  this.AUTO_SCROLL_INTERVAL_MS = 20;
4708
5212
  }
4709
5213
  static {
4710
- this.styles = g`
5214
+ this.styles = C`
4711
5215
  :host {
4712
5216
  display: block;
4713
5217
  box-sizing: border-box;
@@ -4978,7 +5482,7 @@ var Et = new Set([
4978
5482
  this.unsubscribeLayerAdd?.(), this.unsubscribeLayerRemove?.(), this.unsubscribeLayerAdd = null, this.unsubscribeLayerRemove = null;
4979
5483
  }
4980
5484
  render() {
4981
- return _`
5485
+ return w`
4982
5486
  <div class="panel">
4983
5487
  ${this.renderSection(this.overviewTitle, this.overviewLayers, "No active layers.", !0)}
4984
5488
  ${this.renderSection(this.backgroundTitle, this.backgroundLayers, "No base map selected.")}
@@ -4990,13 +5494,13 @@ var Et = new Set([
4990
5494
  `;
4991
5495
  }
4992
5496
  renderSection(e, t, n, r = !1) {
4993
- return _`
5497
+ return w`
4994
5498
  <section class="section">
4995
5499
  <h3 class="section-title">${e}</h3>
4996
- ${t.length > 0 ? _`
5500
+ ${t.length > 0 ? w`
4997
5501
  <div class="layer-list">
4998
- ${t.map((e) => _`
4999
- ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "above" ? _`<div class="drop-indicator"></div>` : null}
5502
+ ${t.map((e) => w`
5503
+ ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "above" ? w`<div class="drop-indicator"></div>` : null}
5000
5504
  <div class="layer-card" data-layer-id=${e.layerId}>
5001
5505
  <div class="layer-row">
5002
5506
  <sl-icon-button
@@ -5005,7 +5509,7 @@ var Et = new Set([
5005
5509
  label=${e.visible ? "Hide layer" : "Show layer"}
5006
5510
  @click=${() => this.handleVisibilityToggle(e.layerId)}
5007
5511
  ></sl-icon-button>
5008
- ${t.length > 1 ? _`
5512
+ ${t.length > 1 ? w`
5009
5513
  <span
5010
5514
  class="layer-label-drag"
5011
5515
  @pointerdown=${(e) => this.onDragHandlePointerDown(e)}
@@ -5013,7 +5517,7 @@ var Et = new Set([
5013
5517
  @pointerup=${(e) => this.onDragHandlePointerUp(e)}
5014
5518
  @pointercancel=${(e) => this.onDragHandlePointerUp(e)}
5015
5519
  ><span class="layer-label ${e.outOfZoom ? "out-of-zoom" : ""}">${e.label}</span></span>
5016
- ` : _`<span class="layer-label ${e.outOfZoom ? "out-of-zoom" : ""}">${e.label}</span>`}
5520
+ ` : w`<span class="layer-label ${e.outOfZoom ? "out-of-zoom" : ""}">${e.label}</span>`}
5017
5521
  <sl-icon-button
5018
5522
  class="collapse-toggle"
5019
5523
  name=${this.isLegendCollapsed(e.layerId) ? "chevron-right" : "chevron-down"}
@@ -5023,7 +5527,7 @@ var Et = new Set([
5023
5527
  </div>
5024
5528
  <div class="layer-details ${this.isLegendCollapsed(e.layerId) ? "collapsed" : ""}">
5025
5529
  <div class="layer-details-inner">
5026
- ${e.visible ? _`
5530
+ ${e.visible ? w`
5027
5531
  <div class="opacity-row">
5028
5532
  <sl-icon name="circle-half"></sl-icon>
5029
5533
  <input
@@ -5039,24 +5543,24 @@ var Et = new Set([
5039
5543
  <webmapx-layer-legend layer-id=${e.layerId}></webmapx-layer-legend>
5040
5544
  </div>
5041
5545
  ` : null}
5042
- ${e.topLevelGroup ? _`<div class="layer-meta">${e.topLevelGroup}</div>` : null}
5546
+ ${e.topLevelGroup ? w`<div class="layer-meta">${e.topLevelGroup}</div>` : null}
5043
5547
  <div class="layer-details-actions">
5044
5548
  <sl-icon-button
5045
5549
  name="info-circle"
5046
5550
  label="About this layer"
5047
5551
  @click=${() => this.handleShowLayerInfo(e.layerId, e.label)}
5048
5552
  ></sl-icon-button>
5049
- ${e.hasStyleDialog ? _`<sl-icon-button
5553
+ ${e.hasStyleDialog ? w`<sl-icon-button
5050
5554
  name="palette"
5051
5555
  label="Layer style"
5052
5556
  @click=${() => this.handleShowLayerStyle(e.layerId, e.label)}
5053
5557
  ></sl-icon-button>` : null}
5054
- ${e.hasExtent ? _`<sl-icon-button
5558
+ ${e.hasExtent ? w`<sl-icon-button
5055
5559
  name="zoom-in"
5056
5560
  label="Zoom to layer"
5057
5561
  @click=${() => this.handleZoomToLayer(e.layerId)}
5058
5562
  ></sl-icon-button>` : null}
5059
- ${r ? _`<sl-icon-button
5563
+ ${r ? w`<sl-icon-button
5060
5564
  class="delete-layer"
5061
5565
  name="trash"
5062
5566
  label="Delete layer"
@@ -5066,11 +5570,11 @@ var Et = new Set([
5066
5570
  </div>
5067
5571
  </div>
5068
5572
  </div>
5069
- ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "below" ? _`<div class="drop-indicator"></div>` : null}
5573
+ ${this.dropTargetLayerId === e.layerId && this.dropTargetPosition === "below" ? w`<div class="drop-indicator"></div>` : null}
5070
5574
  `)}
5071
5575
  </div>
5072
- ` : _`<div class="empty">${n}</div>`}
5073
- ${r ? _`
5576
+ ` : w`<div class="empty">${n}</div>`}
5577
+ ${r ? w`
5074
5578
  <div class="save-layers-row">
5075
5579
  <sl-tooltip content="Permalink">
5076
5580
  <sl-icon-button
@@ -5079,7 +5583,7 @@ var Et = new Set([
5079
5583
  @click=${() => this.handlePermalink()}
5080
5584
  ></sl-icon-button>
5081
5585
  </sl-tooltip>
5082
- ${t.length > 0 ? _`
5586
+ ${t.length > 0 ? w`
5083
5587
  <sl-tooltip content="Save layer(s)…">
5084
5588
  <sl-icon-button
5085
5589
  name="download"
@@ -5173,7 +5677,7 @@ var Et = new Set([
5173
5677
  }
5174
5678
  updateAutoScroll(e, t) {
5175
5679
  if (!t) return;
5176
- let n = t.getBoundingClientRect(), r = q.AUTO_SCROLL_EDGE_PX, i = null;
5680
+ let n = t.getBoundingClientRect(), r = Jt.AUTO_SCROLL_EDGE_PX, i = null;
5177
5681
  if (e < n.top + r ? i = "up" : e > n.bottom - r && (i = "down"), !i) {
5178
5682
  this.stopAutoScroll();
5179
5683
  return;
@@ -5192,17 +5696,17 @@ var Et = new Set([
5192
5696
  this.stopAutoScroll();
5193
5697
  return;
5194
5698
  }
5195
- t.scrollTop += n === "up" ? -q.AUTO_SCROLL_STEP_PX : q.AUTO_SCROLL_STEP_PX, e.timer = window.setTimeout(() => this.runAutoScrollStep(), q.AUTO_SCROLL_INTERVAL_MS);
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);
5196
5700
  }
5197
5701
  stopAutoScroll() {
5198
5702
  this.autoScrollState &&= (window.clearTimeout(this.autoScrollState.timer), null);
5199
5703
  }
5200
5704
  handlePermalink() {
5201
5705
  if (!this.adapter) return;
5202
- let e = this.adapter.getViewportState(), t = this.adapter.store.getState().mapLayers, a = Object.keys(t), o = a.filter((e) => t[e]?.visible === !1), s = /* @__PURE__ */ new Map();
5203
- for (let [e, n] of Object.entries(t)) typeof n.transparency == "number" && n.transparency !== 0 && s.set(e, n.transparency);
5204
- let c = i(this.closest("webmapx-map") ?? this.adapter), l = n(c), u = this.adapter.getProjection?.()?.name ?? null, d = a.filter((e) => t[e]?.dynamic === !0), f = r(c, a, o, e, s, u, l);
5205
- this.permalinkDialog?.open(f, !!l, d);
5706
+ 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
+ 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);
5206
5710
  }
5207
5711
  handleSaveLayers() {
5208
5712
  if (!this.adapter) return;
@@ -5274,18 +5778,18 @@ var Et = new Set([
5274
5778
  this.styleDialog?.open(r, this.getLayerStyleGroups(e, n));
5275
5779
  }
5276
5780
  getLayerFeatureSummary(e, t) {
5277
- let n = Tt(e, t), r = [];
5781
+ let n = $t(e, t), r = [];
5278
5782
  for (let e of n) for (let t of e) {
5279
5783
  let e = this.adapter?.getSourceData(t) ?? null;
5280
5784
  if (e && typeof e == "object") {
5281
- r.push(wt(e));
5785
+ r.push(Qt(e));
5282
5786
  break;
5283
5787
  }
5284
5788
  }
5285
- return r.length === 0 && t?.sourceData && typeof t.sourceData == "object" && r.push(wt(t.sourceData)), r.length > 0 ? r.join("; ") : void 0;
5789
+ return r.length === 0 && t?.sourceData && typeof t.sourceData == "object" && r.push(Qt(t.sourceData)), r.length > 0 ? r.join("; ") : void 0;
5286
5790
  }
5287
5791
  layerHasExtent(e, t) {
5288
- return Array.isArray(t?.bounds) && t.bounds.length === 4 ? !0 : Tt(e, t).some((e) => e.some((e) => this.adapter?.getSourceData(e) !== null));
5792
+ return Array.isArray(t?.bounds) && t.bounds.length === 4 ? !0 : $t(e, t).some((e) => e.some((e) => this.adapter?.getSourceData(e) !== null));
5289
5793
  }
5290
5794
  layerHasStyleDialog(e) {
5291
5795
  return this.getLayerStyleTargets("", e).length > 0;
@@ -5295,7 +5799,7 @@ var Et = new Set([
5295
5799
  if (Array.isArray(t?.sublayers) && t.sublayers.length > 0) this.collectStyleTargetsFromSublayers(e, t.sublayers, n);
5296
5800
  else {
5297
5801
  let r = typeof t?.layerType == "string" ? t.layerType : void 0, i = typeof t?.sourceId == "string" ? t.sourceId : "";
5298
- r && Et.has(r) && n.push({
5802
+ r && en.has(r) && n.push({
5299
5803
  id: e,
5300
5804
  type: r,
5301
5805
  sourceId: i
@@ -5307,7 +5811,7 @@ var Et = new Set([
5307
5811
  if (Array.isArray(t)) for (let r of t) {
5308
5812
  if (!r || typeof r != "object") continue;
5309
5813
  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;
5310
- i && a && Et.has(i) && n.push({
5814
+ i && a && en.has(i) && n.push({
5311
5815
  id: a,
5312
5816
  type: i,
5313
5817
  sourceId: s,
@@ -5415,7 +5919,7 @@ var Et = new Set([
5415
5919
  for (let t of e) {
5416
5920
  let e = this.adapter?.getSourceData(t) ?? null;
5417
5921
  if (e && typeof e == "object") {
5418
- n = xt(e);
5922
+ n = Yt(e);
5419
5923
  break;
5420
5924
  }
5421
5925
  }
@@ -5425,7 +5929,7 @@ var Et = new Set([
5425
5929
  if (this.layerExtentCache.has(e)) return this.layerExtentCache.get(e) ?? null;
5426
5930
  let t = this.adapter?.store.getState().mapLayers?.[e], n = null;
5427
5931
  if (Array.isArray(t?.bounds) && t.bounds.length === 4) n = t.bounds;
5428
- else for (let r of Tt(e, t)) n = St(n, this.getSourceExtent(r));
5932
+ else for (let r of $t(e, t)) n = Xt(n, this.getSourceExtent(r));
5429
5933
  return this.layerExtentCache.set(e, n), n;
5430
5934
  }
5431
5935
  handleZoomToLayer(e) {
@@ -5464,24 +5968,24 @@ var Et = new Set([
5464
5968
  } }, "UI"), this.applyVisibleLayers(this.store.getState());
5465
5969
  }
5466
5970
  };
5467
- o([x({
5971
+ d([O({
5468
5972
  type: String,
5469
5973
  attribute: "background-group-label"
5470
- })], J.prototype, "backgroundGroupLabel", void 0), o([x({
5974
+ })], Y.prototype, "backgroundGroupLabel", void 0), d([O({
5471
5975
  type: String,
5472
5976
  attribute: "background-title"
5473
- })], J.prototype, "backgroundTitle", void 0), o([x({
5977
+ })], Y.prototype, "backgroundTitle", void 0), d([O({
5474
5978
  type: String,
5475
5979
  attribute: "overview-title"
5476
- })], J.prototype, "overviewTitle", void 0), o([w()], J.prototype, "backgroundLayers", void 0), o([w()], J.prototype, "overviewLayers", void 0), o([w()], J.prototype, "layerTransparency", void 0), o([w()], J.prototype, "dropTargetLayerId", void 0), o([w()], J.prototype, "dropTargetPosition", void 0), o([S("webmapx-layer-info-dialog")], J.prototype, "infoDialog", void 0), o([S("webmapx-layer-style-dialog")], J.prototype, "styleDialog", void 0), o([S("webmapx-save-layers-dialog")], J.prototype, "saveLayersDialog", void 0), o([S("webmapx-permalink-dialog")], J.prototype, "permalinkDialog", void 0), J = q = o([b("webmapx-layer-overview")], J);
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);
5477
5981
  //#endregion
5478
5982
  //#region src/components/webmapx-spinner.ts
5479
- var Dt = class extends s {
5983
+ var tn = class extends f {
5480
5984
  constructor(...e) {
5481
5985
  super(...e), this.busy = !1, this.small = !1, this.nocolor = !1;
5482
5986
  }
5483
5987
  static {
5484
- this.styles = g`
5988
+ this.styles = C`
5485
5989
  :host {
5486
5990
  display: block;
5487
5991
  --webmapx-pointer-events: none;
@@ -5515,28 +6019,28 @@ var Dt = class extends s {
5515
6019
  this.busy = e.mapBusy;
5516
6020
  }
5517
6021
  render() {
5518
- return _`
6022
+ return w`
5519
6023
  <div class="spinner-container ${this.busy ? "visible" : ""}">
5520
6024
  <sl-spinner></sl-spinner>
5521
6025
  </div>
5522
6026
  `;
5523
6027
  }
5524
6028
  };
5525
- o([w()], Dt.prototype, "busy", void 0), o([x({
6029
+ d([A()], tn.prototype, "busy", void 0), d([O({
5526
6030
  type: Boolean,
5527
6031
  reflect: !0
5528
- })], Dt.prototype, "small", void 0), o([x({
6032
+ })], tn.prototype, "small", void 0), d([O({
5529
6033
  type: Boolean,
5530
6034
  reflect: !0
5531
- })], Dt.prototype, "nocolor", void 0), Dt = o([b("webmapx-spinner")], Dt);
6035
+ })], tn.prototype, "nocolor", void 0), tn = d([D("webmapx-spinner")], tn);
5532
6036
  //#endregion
5533
6037
  //#region src/components/webmapx-control-group.ts
5534
- var Y = class extends h {
6038
+ var X = class extends S {
5535
6039
  constructor(...e) {
5536
6040
  super(...e), this.orientation = "vertical", this.panelPosition = "after", this.alignment = "start", this.slotAnchorY = "top", this.panelActive = !1, this.priority = "normal", this.panelObserver = null;
5537
6041
  }
5538
6042
  static {
5539
- this.styles = g`
6043
+ this.styles = C`
5540
6044
  :host {
5541
6045
  display: flex;
5542
6046
  pointer-events: none;
@@ -5645,39 +6149,39 @@ var Y = class extends h {
5645
6149
  e.has("orientation") && this.updateToolbarOrientation(), e.has("slot") && this.updateSlotAnchor();
5646
6150
  }
5647
6151
  render() {
5648
- return _`<slot @slotchange=${this.handleSlotChange}></slot>`;
6152
+ return w`<slot @slotchange=${this.handleSlotChange}></slot>`;
5649
6153
  }
5650
6154
  };
5651
- o([x({
6155
+ d([O({
5652
6156
  type: String,
5653
6157
  reflect: !0
5654
- })], Y.prototype, "orientation", void 0), o([x({
6158
+ })], X.prototype, "orientation", void 0), d([O({
5655
6159
  type: String,
5656
6160
  reflect: !0,
5657
6161
  attribute: "panel-position"
5658
- })], Y.prototype, "panelPosition", void 0), o([x({
6162
+ })], X.prototype, "panelPosition", void 0), d([O({
5659
6163
  type: String,
5660
6164
  reflect: !0
5661
- })], Y.prototype, "alignment", void 0), o([x({
6165
+ })], X.prototype, "alignment", void 0), d([O({
5662
6166
  type: String,
5663
6167
  reflect: !0,
5664
6168
  attribute: "slot-anchor-y"
5665
- })], Y.prototype, "slotAnchorY", void 0), o([x({
6169
+ })], X.prototype, "slotAnchorY", void 0), d([O({
5666
6170
  type: Boolean,
5667
6171
  reflect: !0,
5668
6172
  attribute: "panel-active"
5669
- })], Y.prototype, "panelActive", void 0), o([x({
6173
+ })], X.prototype, "panelActive", void 0), d([O({
5670
6174
  type: String,
5671
6175
  reflect: !0
5672
- })], Y.prototype, "priority", void 0), o([C()], Y.prototype, "childrenElements", void 0), Y = o([b("webmapx-control-group")], Y);
6176
+ })], X.prototype, "priority", void 0), d([fe()], X.prototype, "childrenElements", void 0), X = d([D("webmapx-control-group")], X);
5673
6177
  //#endregion
5674
6178
  //#region src/components/webmapx-zoom-level.ts
5675
- var Ot = class extends s {
6179
+ var nn = class extends f {
5676
6180
  constructor(...e) {
5677
6181
  super(...e), this.currentZoom = null, this.inputValue = "", this.unsubscribeEvents = null;
5678
6182
  }
5679
6183
  static {
5680
- this.styles = g`
6184
+ this.styles = C`
5681
6185
  :host {
5682
6186
  position: relative;
5683
6187
  display: inline-flex;
@@ -5752,7 +6256,7 @@ var Ot = class extends s {
5752
6256
  !isNaN(e) && e >= 0 && this.adapter.setZoom(e);
5753
6257
  }
5754
6258
  render() {
5755
- return _`
6259
+ return w`
5756
6260
  <div class="tool-container">
5757
6261
  <label for="zoom-input">Zoom:</label>
5758
6262
  <input
@@ -5770,10 +6274,10 @@ var Ot = class extends s {
5770
6274
  `;
5771
6275
  }
5772
6276
  };
5773
- o([w()], Ot.prototype, "currentZoom", void 0), o([w()], Ot.prototype, "inputValue", void 0), Ot = o([b("webmapx-zoom-level")], Ot);
6277
+ d([A()], nn.prototype, "currentZoom", void 0), d([A()], nn.prototype, "inputValue", void 0), nn = d([D("webmapx-zoom-level")], nn);
5774
6278
  //#endregion
5775
6279
  //#region src/components/webmapx-navigation-control.ts
5776
- var X = class extends s {
6280
+ var Z = class extends f {
5777
6281
  constructor(...e) {
5778
6282
  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 = () => {
5779
6283
  if (!this.adapter) return;
@@ -5816,7 +6320,7 @@ var X = class extends s {
5816
6320
  };
5817
6321
  }
5818
6322
  static {
5819
- this.styles = g`
6323
+ this.styles = C`
5820
6324
  :host {
5821
6325
  display: inline-flex;
5822
6326
  pointer-events: auto;
@@ -5966,7 +6470,7 @@ var X = class extends s {
5966
6470
  let e = [];
5967
6471
  e.push(`rotate(${this.normalizeBearing(-this.bearing)}deg)`), this.visualizePitch && e.unshift(`rotateX(${this.pitch}deg)`);
5968
6472
  let t = e.join(" ");
5969
- return _`
6473
+ return w`
5970
6474
  <button
5971
6475
  class="nav-btn"
5972
6476
  @click=${this.handleCompassClick}
@@ -5982,12 +6486,12 @@ var X = class extends s {
5982
6486
  }
5983
6487
  render() {
5984
6488
  let e = this.showCompass && this.compassSupported, t = this.zoomMin ?? -Infinity, n = this.zoomMax ?? Infinity, r = this.currentZoom ?? 0;
5985
- return _`
6489
+ return w`
5986
6490
  <div class="nav-shell">
5987
- ${this.showZoom ? _`<button class="nav-btn" @click=${this.handleZoomIn} ?disabled=${r >= n} title="Zoom in">
6491
+ ${this.showZoom ? w`<button class="nav-btn" @click=${this.handleZoomIn} ?disabled=${r >= n} title="Zoom in">
5988
6492
  <span class="icon">+</span>
5989
6493
  </button>` : null}
5990
- ${this.showZoom ? _`<button class="nav-btn" @click=${this.handleZoomOut} ?disabled=${r <= t} title="Zoom out">
6494
+ ${this.showZoom ? w`<button class="nav-btn" @click=${this.handleZoomOut} ?disabled=${r <= t} title="Zoom out">
5991
6495
  <span class="icon">-</span>
5992
6496
  </button>` : null}
5993
6497
  ${e ? this.renderCompass() : null}
@@ -5995,30 +6499,30 @@ var X = class extends s {
5995
6499
  `;
5996
6500
  }
5997
6501
  };
5998
- o([x({
6502
+ d([O({
5999
6503
  type: String,
6000
6504
  reflect: !0
6001
- })], X.prototype, "orientation", void 0), o([x({
6505
+ })], Z.prototype, "orientation", void 0), d([O({
6002
6506
  type: Boolean,
6003
6507
  attribute: "show-compass",
6004
6508
  reflect: !0
6005
- })], X.prototype, "showCompass", void 0), o([x({
6509
+ })], Z.prototype, "showCompass", void 0), d([O({
6006
6510
  type: Boolean,
6007
6511
  attribute: "show-zoom",
6008
6512
  reflect: !0
6009
- })], X.prototype, "showZoom", void 0), o([x({
6513
+ })], Z.prototype, "showZoom", void 0), d([O({
6010
6514
  type: Boolean,
6011
6515
  attribute: "visualize-pitch",
6012
6516
  reflect: !0
6013
- })], X.prototype, "visualizePitch", void 0), o([w()], X.prototype, "currentZoom", void 0), o([w()], X.prototype, "bearing", void 0), o([w()], X.prototype, "pitch", void 0), o([w()], X.prototype, "compassSupported", void 0), X = o([b("webmapx-navigation-control")], X);
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);
6014
6518
  //#endregion
6015
6519
  //#region src/components/webmapx-scale-control.ts
6016
- var kt = class extends s {
6520
+ var rn = class extends f {
6017
6521
  constructor(...e) {
6018
6522
  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";
6019
6523
  }
6020
6524
  static {
6021
- this.styles = g`
6525
+ this.styles = C`
6022
6526
  :host {
6023
6527
  display: inline-flex;
6024
6528
  margin: var(--webmapx-tool-margin, 0);
@@ -6108,16 +6612,16 @@ var kt = class extends s {
6108
6612
  if (!a || a.status === "off-globe" || a.status === "failed") return this.lastUnprojectStatus = a?.status ?? "failed", null;
6109
6613
  if (this.lastZoom != null) {
6110
6614
  let t = n ?? this.lastCenter?.[1];
6111
- return At(this.lastZoom, t ?? 0) * e;
6615
+ return an(this.lastZoom, t ?? 0) * e;
6112
6616
  }
6113
6617
  let o = this.horizontalMetersAcrossBounds(this.lastBounds, n);
6114
6618
  return o && o > 0 && t > 0 ? o / t * e : null;
6115
6619
  }
6116
6620
  horizontalMetersAcrossBounds(e, t) {
6117
6621
  if (!e) return null;
6118
- let n = jt(t ?? (e.sw[1] + e.ne[1]) / 2), r = e.sw[0], i = e.ne[0], a = Z(i - r);
6622
+ let n = on(t ?? (e.sw[1] + e.ne[1]) / 2), r = e.sw[0], i = e.ne[0], a = sn(i - r);
6119
6623
  if (a <= 0) return null;
6120
- let o = Mt * Math.cos(n * Math.PI / 180), s = Math.abs(a) * o;
6624
+ let o = cn * Math.cos(n * Math.PI / 180), s = Math.abs(a) * o;
6121
6625
  return s > 0 ? s : null;
6122
6626
  }
6123
6627
  buildDisplay(e, t, n) {
@@ -6125,33 +6629,33 @@ var kt = class extends s {
6125
6629
  if (n === "imperial") {
6126
6630
  let n = e * 3.28084;
6127
6631
  if (n > 5280) {
6128
- let e = n / 5280, r = Pt(e);
6632
+ let e = n / 5280, r = un(e);
6129
6633
  return {
6130
6634
  widthPx: r / e * t,
6131
6635
  label: `${r} mi`
6132
6636
  };
6133
6637
  }
6134
- let r = Pt(n);
6638
+ let r = un(n);
6135
6639
  return {
6136
6640
  widthPx: r / n * t,
6137
6641
  label: `${r} ft`
6138
6642
  };
6139
6643
  }
6140
6644
  if (n === "nautical") {
6141
- let n = e / 1852, r = Pt(n);
6645
+ let n = e / 1852, r = un(n);
6142
6646
  return {
6143
6647
  widthPx: r / n * t,
6144
6648
  label: `${r} nm`
6145
6649
  };
6146
6650
  }
6147
6651
  if (e >= 1e3) {
6148
- let n = e / 1e3, r = Pt(n);
6652
+ let n = e / 1e3, r = un(n);
6149
6653
  return {
6150
6654
  widthPx: r / n * t,
6151
6655
  label: `${r} km`
6152
6656
  };
6153
6657
  }
6154
- let r = Pt(e);
6658
+ let r = un(e);
6155
6659
  return {
6156
6660
  widthPx: r / e * t,
6157
6661
  label: `${r} m`
@@ -6195,7 +6699,7 @@ var kt = class extends s {
6195
6699
  if (!isFinite(o) || (a = t, Math.abs(o - e) < .1)) break;
6196
6700
  o > e ? r = t : i = t;
6197
6701
  }
6198
- return jt(a);
6702
+ return on(a);
6199
6703
  }
6200
6704
  getTargetPixel(e) {
6201
6705
  let t = this.mapHost?.mapElement ?? this.mapHost;
@@ -6223,7 +6727,7 @@ var kt = class extends s {
6223
6727
  if (!this.attachedAdapter) return null;
6224
6728
  let l = this.attachedAdapter.unproject(s), u = this.attachedAdapter.unproject(c);
6225
6729
  if (!l || !u) return null;
6226
- let d = p(l, u) / 100;
6730
+ let d = le(l, u) / 100;
6227
6731
  return !isFinite(d) || d <= 0 ? null : { meters: d };
6228
6732
  }, c = n ?? o / 2, l = s(c, "primary");
6229
6733
  if (!l) {
@@ -6247,43 +6751,43 @@ var kt = class extends s {
6247
6751
  }
6248
6752
  render() {
6249
6753
  let e = this.barWidth <= 0, t = this.getSurfaceMetrics()?.width ?? this.getContainerWidth();
6250
- return _`
6754
+ return w`
6251
6755
  <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`}>
6252
6756
  <div class="scale-label ${e ? "muted" : ""}">${this.label}</div>
6253
6757
  </div>
6254
6758
  `;
6255
6759
  }
6256
6760
  };
6257
- o([x({
6761
+ d([O({
6258
6762
  type: Number,
6259
6763
  attribute: "max-width"
6260
- })], kt.prototype, "maxWidth", void 0), o([x({
6764
+ })], rn.prototype, "maxWidth", void 0), d([O({
6261
6765
  type: String,
6262
6766
  attribute: "unit"
6263
- })], kt.prototype, "unit", void 0), o([w()], kt.prototype, "barWidth", void 0), o([w()], kt.prototype, "label", void 0), kt = o([b("webmapx-scale-control")], kt);
6264
- function At(e, t) {
6265
- let n = jt(t) * Math.PI / 180;
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;
6266
6770
  return 40075016.68557849 * Math.cos(n) / (512 * 2 ** e);
6267
6771
  }
6268
- function jt(e) {
6772
+ function on(e) {
6269
6773
  return Math.max(-85.05112878, Math.min(85.05112878, e));
6270
6774
  }
6271
- function Z(e) {
6775
+ function sn(e) {
6272
6776
  let t = e;
6273
6777
  return t < 0 && (t += 360), t === 0 || t > 360 ? 360 : t;
6274
6778
  }
6275
- var Mt = 111319.49079327357;
6276
- function Nt(e) {
6779
+ var cn = 111319.49079327357;
6780
+ function ln(e) {
6277
6781
  let t = 10 ** Math.ceil(-Math.log(e) / Math.LN10);
6278
6782
  return Math.round(e * t) / t;
6279
6783
  }
6280
- function Pt(e) {
6784
+ function un(e) {
6281
6785
  let t = 10 ** (`${Math.floor(e)}`.length - 1), n = e / t;
6282
- return n = n >= 10 ? 10 : n >= 5 ? 5 : n >= 3 ? 3 : n >= 2 ? 2 : n >= 1 ? 1 : Nt(n), t * n;
6786
+ return n = n >= 10 ? 10 : n >= 5 ? 5 : n >= 3 ? 3 : n >= 2 ? 2 : n >= 1 ? 1 : ln(n), t * n;
6283
6787
  }
6284
6788
  //#endregion
6285
6789
  //#region src/components/webmapx-fullscreen-control.ts
6286
- var Ft = class extends s {
6790
+ var dn = class extends f {
6287
6791
  constructor(...e) {
6288
6792
  super(...e), this.isFullscreen = !1, this.handleFullscreenChange = () => {
6289
6793
  this.isFullscreen = document.fullscreenElement === this.fullscreenTarget();
@@ -6292,7 +6796,7 @@ var Ft = class extends s {
6292
6796
  };
6293
6797
  }
6294
6798
  static {
6295
- this.styles = g`
6799
+ this.styles = C`
6296
6800
  :host {
6297
6801
  display: inline-flex;
6298
6802
  pointer-events: auto;
@@ -6353,22 +6857,22 @@ var Ft = class extends s {
6353
6857
  onStateChanged() {}
6354
6858
  onConfigReady() {}
6355
6859
  fullscreenTarget() {
6356
- return a(this) ?? this;
6860
+ return u(this) ?? this;
6357
6861
  }
6358
6862
  render() {
6359
- return _`
6863
+ return w`
6360
6864
  <div class="nav-shell">
6361
6865
  <button class="nav-btn" @click=${this.handleToggle} title="${this.isFullscreen ? "Exit fullscreen" : "Fullscreen"}" aria-label="Toggle fullscreen">
6362
- ${this.isFullscreen ? _`<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>` : _`<svg viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg>`}
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>`}
6363
6867
  </button>
6364
6868
  </div>
6365
6869
  `;
6366
6870
  }
6367
6871
  };
6368
- o([w()], Ft.prototype, "isFullscreen", void 0), Ft = o([b("webmapx-fullscreen-control")], Ft);
6872
+ d([A()], dn.prototype, "isFullscreen", void 0), dn = d([D("webmapx-fullscreen-control")], dn);
6369
6873
  //#endregion
6370
6874
  //#region src/components/webmapx-attribution-control.ts
6371
- var It = class extends s {
6875
+ var Q = class extends f {
6372
6876
  constructor(...e) {
6373
6877
  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;
6374
6878
  }
@@ -6410,7 +6914,7 @@ var It = class extends s {
6410
6914
  t && i(t);
6411
6915
  continue;
6412
6916
  }
6413
- let o = l(a, e);
6917
+ let o = ae(a, e);
6414
6918
  o && i(o);
6415
6919
  }
6416
6920
  this.attributions = r, this.updateComplete.then(() => this._updateOverflow());
@@ -6439,23 +6943,23 @@ var It = class extends s {
6439
6943
  }, { passive: !0 });
6440
6944
  }
6441
6945
  render() {
6442
- return _`
6946
+ return w`
6443
6947
  <div class="attribution-shell" ?hidden=${!(this.attributions.length > 0)} role="region" aria-label="Map attributions">
6444
- ${this._showLeft ? _`<span class="overflow-indicator left" aria-hidden="true">‹</span>` : null}
6948
+ ${this._showLeft ? w`<span class="overflow-indicator left" aria-hidden="true">‹</span>` : null}
6445
6949
  <div class="attribution-scroll">
6446
6950
  <div class="attribution-inner">
6447
- ${this.attributions.map((e, t) => _`
6448
- ${c(e)}
6449
- ${t < this.attributions.length - 1 ? _`<span class="separator">•</span>` : null}
6951
+ ${this.attributions.map((e, t) => w`
6952
+ ${ie(e)}
6953
+ ${t < this.attributions.length - 1 ? w`<span class="separator">•</span>` : null}
6450
6954
  `)}
6451
6955
  </div>
6452
6956
  </div>
6453
- ${this._showRight ? _`<span class="overflow-indicator right" aria-hidden="true">›</span>` : null}
6957
+ ${this._showRight ? w`<span class="overflow-indicator right" aria-hidden="true">›</span>` : null}
6454
6958
  </div>
6455
6959
  `;
6456
6960
  }
6457
6961
  static {
6458
- this.styles = g`
6962
+ this.styles = C`
6459
6963
  :host {
6460
6964
  display: flex;
6461
6965
  justify-content: flex-end;
@@ -6531,15 +7035,419 @@ var It = class extends s {
6531
7035
  `;
6532
7036
  }
6533
7037
  };
6534
- o([w()], It.prototype, "attributions", void 0), o([w()], It.prototype, "_showLeft", void 0), o([w()], It.prototype, "_showRight", void 0), o([S(".attribution-scroll")], It.prototype, "_scrollEl", void 0), It = o([b("webmapx-attribution-control")], It);
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);
7039
+ //#endregion
7040
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.5D6IT2SR.js
7041
+ var fn = C`
7042
+ :host {
7043
+ --thumb-size: 20px;
7044
+ --tooltip-offset: 10px;
7045
+ --track-color-active: var(--sl-color-neutral-200);
7046
+ --track-color-inactive: var(--sl-color-neutral-200);
7047
+ --track-active-offset: 0%;
7048
+ --track-height: 6px;
7049
+
7050
+ display: block;
7051
+ }
7052
+
7053
+ .range {
7054
+ position: relative;
7055
+ }
7056
+
7057
+ .range__control {
7058
+ --percent: 0%;
7059
+ -webkit-appearance: none;
7060
+ border-radius: 3px;
7061
+ width: 100%;
7062
+ height: var(--track-height);
7063
+ background: transparent;
7064
+ line-height: var(--sl-input-height-medium);
7065
+ vertical-align: middle;
7066
+ margin: 0;
7067
+
7068
+ background-image: linear-gradient(
7069
+ to right,
7070
+ var(--track-color-inactive) 0%,
7071
+ var(--track-color-inactive) min(var(--percent), var(--track-active-offset)),
7072
+ var(--track-color-active) min(var(--percent), var(--track-active-offset)),
7073
+ var(--track-color-active) max(var(--percent), var(--track-active-offset)),
7074
+ var(--track-color-inactive) max(var(--percent), var(--track-active-offset)),
7075
+ var(--track-color-inactive) 100%
7076
+ );
7077
+ }
7078
+
7079
+ .range--rtl .range__control {
7080
+ background-image: linear-gradient(
7081
+ to left,
7082
+ var(--track-color-inactive) 0%,
7083
+ var(--track-color-inactive) min(var(--percent), var(--track-active-offset)),
7084
+ var(--track-color-active) min(var(--percent), var(--track-active-offset)),
7085
+ var(--track-color-active) max(var(--percent), var(--track-active-offset)),
7086
+ var(--track-color-inactive) max(var(--percent), var(--track-active-offset)),
7087
+ var(--track-color-inactive) 100%
7088
+ );
7089
+ }
7090
+
7091
+ /* Webkit */
7092
+ .range__control::-webkit-slider-runnable-track {
7093
+ width: 100%;
7094
+ height: var(--track-height);
7095
+ border-radius: 3px;
7096
+ border: none;
7097
+ }
7098
+
7099
+ .range__control::-webkit-slider-thumb {
7100
+ border: none;
7101
+ width: var(--thumb-size);
7102
+ height: var(--thumb-size);
7103
+ border-radius: 50%;
7104
+ background-color: var(--sl-color-primary-600);
7105
+ border: solid var(--sl-input-border-width) var(--sl-color-primary-600);
7106
+ -webkit-appearance: none;
7107
+ margin-top: calc(var(--thumb-size) / -2 + var(--track-height) / 2);
7108
+ cursor: pointer;
7109
+ }
7110
+
7111
+ .range__control:enabled::-webkit-slider-thumb:hover {
7112
+ background-color: var(--sl-color-primary-500);
7113
+ border-color: var(--sl-color-primary-500);
7114
+ }
7115
+
7116
+ .range__control:enabled:focus-visible::-webkit-slider-thumb {
7117
+ outline: var(--sl-focus-ring);
7118
+ outline-offset: var(--sl-focus-ring-offset);
7119
+ }
7120
+
7121
+ .range__control:enabled::-webkit-slider-thumb:active {
7122
+ background-color: var(--sl-color-primary-500);
7123
+ border-color: var(--sl-color-primary-500);
7124
+ cursor: grabbing;
7125
+ }
7126
+
7127
+ /* Firefox */
7128
+ .range__control::-moz-focus-outer {
7129
+ border: 0;
7130
+ }
7131
+
7132
+ .range__control::-moz-range-progress {
7133
+ background-color: var(--track-color-active);
7134
+ border-radius: 3px;
7135
+ height: var(--track-height);
7136
+ }
7137
+
7138
+ .range__control::-moz-range-track {
7139
+ width: 100%;
7140
+ height: var(--track-height);
7141
+ background-color: var(--track-color-inactive);
7142
+ border-radius: 3px;
7143
+ border: none;
7144
+ }
7145
+
7146
+ .range__control::-moz-range-thumb {
7147
+ border: none;
7148
+ height: var(--thumb-size);
7149
+ width: var(--thumb-size);
7150
+ border-radius: 50%;
7151
+ background-color: var(--sl-color-primary-600);
7152
+ border-color: var(--sl-color-primary-600);
7153
+ transition:
7154
+ var(--sl-transition-fast) border-color,
7155
+ var(--sl-transition-fast) background-color,
7156
+ var(--sl-transition-fast) color,
7157
+ var(--sl-transition-fast) box-shadow;
7158
+ cursor: pointer;
7159
+ }
7160
+
7161
+ .range__control:enabled::-moz-range-thumb:hover {
7162
+ background-color: var(--sl-color-primary-500);
7163
+ border-color: var(--sl-color-primary-500);
7164
+ }
7165
+
7166
+ .range__control:enabled:focus-visible::-moz-range-thumb {
7167
+ outline: var(--sl-focus-ring);
7168
+ outline-offset: var(--sl-focus-ring-offset);
7169
+ }
7170
+
7171
+ .range__control:enabled::-moz-range-thumb:active {
7172
+ background-color: var(--sl-color-primary-500);
7173
+ border-color: var(--sl-color-primary-500);
7174
+ cursor: grabbing;
7175
+ }
7176
+
7177
+ /* States */
7178
+ .range__control:focus-visible {
7179
+ outline: none;
7180
+ }
7181
+
7182
+ .range__control:disabled {
7183
+ opacity: 0.5;
7184
+ }
7185
+
7186
+ .range__control:disabled::-webkit-slider-thumb {
7187
+ cursor: not-allowed;
7188
+ }
7189
+
7190
+ .range__control:disabled::-moz-range-thumb {
7191
+ cursor: not-allowed;
7192
+ }
7193
+
7194
+ /* Tooltip output */
7195
+ .range__tooltip {
7196
+ position: absolute;
7197
+ z-index: var(--sl-z-index-tooltip);
7198
+ left: 0;
7199
+ border-radius: var(--sl-tooltip-border-radius);
7200
+ background-color: var(--sl-tooltip-background-color);
7201
+ font-family: var(--sl-tooltip-font-family);
7202
+ font-size: var(--sl-tooltip-font-size);
7203
+ font-weight: var(--sl-tooltip-font-weight);
7204
+ line-height: var(--sl-tooltip-line-height);
7205
+ color: var(--sl-tooltip-color);
7206
+ opacity: 0;
7207
+ padding: var(--sl-tooltip-padding);
7208
+ transition: var(--sl-transition-fast) opacity;
7209
+ pointer-events: none;
7210
+ }
7211
+
7212
+ .range__tooltip:after {
7213
+ content: '';
7214
+ position: absolute;
7215
+ width: 0;
7216
+ height: 0;
7217
+ left: 50%;
7218
+ translate: calc(-1 * var(--sl-tooltip-arrow-size));
7219
+ }
7220
+
7221
+ .range--tooltip-visible .range__tooltip {
7222
+ opacity: 1;
7223
+ }
7224
+
7225
+ /* Tooltip on top */
7226
+ .range--tooltip-top .range__tooltip {
7227
+ top: calc(-1 * var(--thumb-size) - var(--tooltip-offset));
7228
+ }
7229
+
7230
+ .range--tooltip-top .range__tooltip:after {
7231
+ border-top: var(--sl-tooltip-arrow-size) solid var(--sl-tooltip-background-color);
7232
+ border-left: var(--sl-tooltip-arrow-size) solid transparent;
7233
+ border-right: var(--sl-tooltip-arrow-size) solid transparent;
7234
+ top: 100%;
7235
+ }
7236
+
7237
+ /* Tooltip on bottom */
7238
+ .range--tooltip-bottom .range__tooltip {
7239
+ bottom: calc(-1 * var(--thumb-size) - var(--tooltip-offset));
7240
+ }
7241
+
7242
+ .range--tooltip-bottom .range__tooltip:after {
7243
+ border-bottom: var(--sl-tooltip-arrow-size) solid var(--sl-tooltip-background-color);
7244
+ border-left: var(--sl-tooltip-arrow-size) solid transparent;
7245
+ border-right: var(--sl-tooltip-arrow-size) solid transparent;
7246
+ bottom: 100%;
7247
+ }
7248
+
7249
+ @media (forced-colors: active) {
7250
+ .range__control,
7251
+ .range__tooltip {
7252
+ border: solid 1px transparent;
7253
+ }
7254
+
7255
+ .range__control::-webkit-slider-thumb {
7256
+ border: solid 1px transparent;
7257
+ }
7258
+
7259
+ .range__control::-moz-range-thumb {
7260
+ border: solid 1px transparent;
7261
+ }
7262
+
7263
+ .range__tooltip:after {
7264
+ display: none;
7265
+ }
7266
+ }
7267
+ `, $ = class extends i {
7268
+ 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;
7270
+ }
7271
+ get validity() {
7272
+ return this.input.validity;
7273
+ }
7274
+ get validationMessage() {
7275
+ return this.input.validationMessage;
7276
+ }
7277
+ connectedCallback() {
7278
+ super.connectedCallback(), this.resizeObserver = new ResizeObserver(() => this.syncRange()), this.value < this.min && (this.value = this.min), this.value > this.max && (this.value = this.max), this.updateComplete.then(() => {
7279
+ this.syncRange(), this.resizeObserver.observe(this.input);
7280
+ });
7281
+ }
7282
+ disconnectedCallback() {
7283
+ var e;
7284
+ super.disconnectedCallback(), (e = this.resizeObserver) == null || e.unobserve(this.input);
7285
+ }
7286
+ handleChange() {
7287
+ this.emit("sl-change");
7288
+ }
7289
+ handleInput() {
7290
+ this.value = parseFloat(this.input.value), this.emit("sl-input"), this.syncRange();
7291
+ }
7292
+ handleBlur() {
7293
+ this.hasFocus = !1, this.hasTooltip = !1, this.emit("sl-blur");
7294
+ }
7295
+ handleFocus() {
7296
+ this.hasFocus = !0, this.hasTooltip = !0, this.emit("sl-focus");
7297
+ }
7298
+ handleThumbDragStart() {
7299
+ this.hasTooltip = !0;
7300
+ }
7301
+ handleThumbDragEnd() {
7302
+ this.hasTooltip = !1;
7303
+ }
7304
+ syncProgress(e) {
7305
+ this.input.style.setProperty("--percent", `${e * 100}%`);
7306
+ }
7307
+ syncTooltip(e) {
7308
+ if (this.output !== null) {
7309
+ let t = this.input.offsetWidth, n = this.output.offsetWidth, r = getComputedStyle(this.input).getPropertyValue("--thumb-size"), i = this.localize.dir() === "rtl", a = t * e;
7310
+ if (i) {
7311
+ let i = `${t - a}px + ${e} * ${r}`;
7312
+ this.output.style.translate = `calc((${i} - ${n / 2}px - ${r} / 2))`;
7313
+ } else {
7314
+ let t = `${a}px - ${e} * ${r}`;
7315
+ this.output.style.translate = `calc(${t} - ${n / 2}px + ${r} / 2)`;
7316
+ }
7317
+ }
7318
+ }
7319
+ handleValueChange() {
7320
+ this.formControlController.updateValidity(), this.input.value = this.value.toString(), this.value = parseFloat(this.input.value), this.syncRange();
7321
+ }
7322
+ handleDisabledChange() {
7323
+ this.formControlController.setValidity(this.disabled);
7324
+ }
7325
+ syncRange() {
7326
+ let e = Math.max(0, (this.value - this.min) / (this.max - this.min));
7327
+ this.syncProgress(e), this.tooltip !== "none" && this.hasTooltip && this.updateComplete.then(() => this.syncTooltip(e));
7328
+ }
7329
+ handleInvalid(e) {
7330
+ this.formControlController.setValidity(!1), this.formControlController.emitInvalidEvent(e);
7331
+ }
7332
+ focus(e) {
7333
+ this.input.focus(e);
7334
+ }
7335
+ blur() {
7336
+ this.input.blur();
7337
+ }
7338
+ stepUp() {
7339
+ this.input.stepUp(), this.value !== Number(this.input.value) && (this.value = Number(this.input.value));
7340
+ }
7341
+ stepDown() {
7342
+ this.input.stepDown(), this.value !== Number(this.input.value) && (this.value = Number(this.input.value));
7343
+ }
7344
+ checkValidity() {
7345
+ return this.input.checkValidity();
7346
+ }
7347
+ getForm() {
7348
+ return this.formControlController.getForm();
7349
+ }
7350
+ reportValidity() {
7351
+ return this.input.reportValidity();
7352
+ }
7353
+ setCustomValidity(e) {
7354
+ this.input.setCustomValidity(e), this.formControlController.updateValidity();
7355
+ }
7356
+ render() {
7357
+ 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`
7359
+ <div
7360
+ part="form-control"
7361
+ class=${pe({
7362
+ "form-control": !0,
7363
+ "form-control--medium": !0,
7364
+ "form-control--has-label": n,
7365
+ "form-control--has-help-text": r
7366
+ })}
7367
+ >
7368
+ <label
7369
+ part="form-control-label"
7370
+ class="form-control__label"
7371
+ for="input"
7372
+ aria-hidden=${n ? "false" : "true"}
7373
+ >
7374
+ <slot name="label">${this.label}</slot>
7375
+ </label>
7376
+
7377
+ <div part="form-control-input" class="form-control-input">
7378
+ <div
7379
+ part="base"
7380
+ class=${pe({
7381
+ range: !0,
7382
+ "range--disabled": this.disabled,
7383
+ "range--focused": this.hasFocus,
7384
+ "range--rtl": this.localize.dir() === "rtl",
7385
+ "range--tooltip-visible": this.hasTooltip,
7386
+ "range--tooltip-top": this.tooltip === "top",
7387
+ "range--tooltip-bottom": this.tooltip === "bottom"
7388
+ })}
7389
+ @mousedown=${this.handleThumbDragStart}
7390
+ @mouseup=${this.handleThumbDragEnd}
7391
+ @touchstart=${this.handleThumbDragStart}
7392
+ @touchend=${this.handleThumbDragEnd}
7393
+ >
7394
+ <input
7395
+ part="input"
7396
+ id="input"
7397
+ class="range__control"
7398
+ title=${this.title}
7399
+ type="range"
7400
+ name=${me(this.name)}
7401
+ ?disabled=${this.disabled}
7402
+ min=${me(this.min)}
7403
+ max=${me(this.max)}
7404
+ step=${me(this.step)}
7405
+ .value=${j(this.value.toString())}
7406
+ aria-describedby="help-text"
7407
+ @change=${this.handleChange}
7408
+ @focus=${this.handleFocus}
7409
+ @input=${this.handleInput}
7410
+ @invalid=${this.handleInvalid}
7411
+ @blur=${this.handleBlur}
7412
+ />
7413
+ ${this.tooltip !== "none" && !this.disabled ? w`
7414
+ <output part="tooltip" class="range__tooltip">
7415
+ ${typeof this.tooltipFormatter == "function" ? this.tooltipFormatter(this.value) : this.value}
7416
+ </output>
7417
+ ` : ""}
7418
+ </div>
7419
+ </div>
7420
+
7421
+ <div
7422
+ part="form-control-help-text"
7423
+ id="help-text"
7424
+ class="form-control__help-text"
7425
+ aria-hidden=${r ? "false" : "true"}
7426
+ >
7427
+ <slot name="help-text">${this.helpText}</slot>
7428
+ </div>
7429
+ </div>
7430
+ `;
7431
+ }
7432
+ };
7433
+ //#endregion
7434
+ //#region node_modules/@shoelace-style/shoelace/dist/chunks/chunk.CKH4GVK3.js
7435
+ $.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({
7440
+ type: Boolean,
7441
+ 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");
6535
7443
  //#endregion
6536
7444
  //#region src/components/webmapx-tool-template.ts
6537
- var Lt = class extends s {
7445
+ var pn = class extends f {
6538
7446
  constructor(...e) {
6539
7447
  super(...e), this.bufferRadius = 0, this.isToolActive = !1, this.toolService = null;
6540
7448
  }
6541
7449
  static {
6542
- this.styles = g`
7450
+ this.styles = C`
6543
7451
  :host {
6544
7452
  display: inline-flex;
6545
7453
  pointer-events: auto;
@@ -6585,7 +7493,7 @@ var Lt = class extends s {
6585
7493
  this.toolService?.toggleTool();
6586
7494
  }
6587
7495
  render() {
6588
- return _`
7496
+ return w`
6589
7497
  <div class="tool-container">
6590
7498
  <div class="tool-title">Template Tool — Buffer</div>
6591
7499
  <div class="radius-row">
@@ -6609,14 +7517,14 @@ var Lt = class extends s {
6609
7517
  `;
6610
7518
  }
6611
7519
  };
6612
- o([w()], Lt.prototype, "bufferRadius", void 0), o([w()], Lt.prototype, "isToolActive", void 0), Lt = o([b("webmapx-tool-template")], Lt);
7520
+ d([A()], pn.prototype, "bufferRadius", void 0), d([A()], pn.prototype, "isToolActive", void 0), pn = d([D("webmapx-tool-template")], pn);
6613
7521
  //#endregion
6614
7522
  //#region src/components/webmapx-inset-map.ts
6615
- var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.05112878, Ht = 89.999, Q = 1, Ut = "viewport", Wt = "viewport-fill", Gt = "viewport-outline", $ = class extends h {
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 {
6616
7524
  constructor(...e) {
6617
- 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 = m(() => {
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(() => {
6618
7526
  this.doUpdateViewportRectangle(this.pendingViewportBounds), this.pendingViewportBounds = void 0;
6619
- }, 50), this.throttledRenderLog = m((e) => {}, 50), this.throttledApplyStateWithZoomOffset = m((e, t) => {
7527
+ }, 50), this.throttledRenderLog = ue((e) => {}, 50), this.throttledApplyStateWithZoomOffset = ue((e, t) => {
6620
7528
  this.applyState(e, t);
6621
7529
  }, 50);
6622
7530
  }
@@ -6624,7 +7532,7 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
6624
7532
  return this.renderRoot.querySelector(".inset-map");
6625
7533
  }
6626
7534
  static {
6627
- this.styles = g`
7535
+ this.styles = C`
6628
7536
  :host {
6629
7537
  display: inline-block;
6630
7538
  position: relative;
@@ -6716,29 +7624,29 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
6716
7624
  async doInitializeInset() {
6717
7625
  let e = this.insetContainer;
6718
7626
  if (!e) return;
6719
- let t = a(this);
7627
+ let t = u(this);
6720
7628
  if (!t) return;
6721
7629
  let n = await t.getAdapterAsync?.();
6722
7630
  if (!n) return;
6723
7631
  this.adapter = n, this.projectionMode = this.resolveProjectionMode(t);
6724
7632
  let r = this.adapter.store.getState();
6725
7633
  await this.waitForConfig(t);
6726
- let i = this.resolveInsetToolConfig(t), o = this.resolveInsetNumber("zoom-offset", this.zoomOffset, i.zoomOffset), s = this.resolveInsetNumber("base-scale", this.baseScale, i.baseScale), c = this.backgroundLayer ? this.resolveBackgroundFromLayer(t, this.backgroundLayer) : null, l = this.hasAttribute("style-url") ? this.styleUrl : c?.styleUrl ?? i.styleUrl, u = c ? c.background ?? null : this.resolveInsetBackground(i), d = {
6727
- styleUrl: l ?? Rt,
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 = {
7635
+ styleUrl: c ?? mn,
6728
7636
  center: r.mapCenter ?? [0, 0],
6729
- zoom: this.clampZoom((r.zoomLevel ?? 0) + o),
7637
+ zoom: this.clampZoom((r.zoomLevel ?? 0) + a),
6730
7638
  interactive: !1,
6731
- ...u ? {
6732
- tileUrl: u.url,
6733
- tileUrls: Array.isArray(u.tiles) ? u.tiles.filter((e) => typeof e == "string" && e.length > 0) : void 0,
6734
- tileAttribution: u.attribution,
6735
- tileSize: u.tileSize
7639
+ ...l ? {
7640
+ tileUrl: l.url,
7641
+ tileUrls: Array.isArray(l.tiles) ? l.tiles.filter((e) => typeof e == "string" && e.length > 0) : void 0,
7642
+ tileAttribution: l.attribution,
7643
+ tileSize: l.tileSize
6736
7644
  } : {}
6737
7645
  };
6738
- this.insetMap = this.adapter.mapFactory.createMap(e, d), e.style.setProperty("--webmapx-inset-scale", `${s}`), this.insetMap.onReady(() => {
6739
- this.setupViewportLayers(), this.applyState(r, o);
7646
+ this.insetMap = this.adapter.mapFactory.createMap(e, d), e.style.setProperty("--webmapx-inset-scale", `${o}`), this.insetMap.onReady(() => {
7647
+ this.setupViewportLayers(), this.applyState(r, a);
6740
7648
  }), this.unsubscribe = this.adapter.store.subscribe((e) => {
6741
- this.hasRelevantStateChange(e) && this.throttledApplyStateWithZoomOffset(e, o);
7649
+ this.hasRelevantStateChange(e) && this.throttledApplyStateWithZoomOffset(e, a);
6742
7650
  });
6743
7651
  }
6744
7652
  waitForConfig(e) {
@@ -6796,7 +7704,7 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
6796
7704
  t.length && t.reduce((e, [, t]) => Math.max(e, Math.abs(t)), 0) > 85.05212878 && (this.projectionMode = "geodetic");
6797
7705
  }
6798
7706
  maxViewportLat() {
6799
- return this.projectionMode === "geodetic" ? Ht : Vt;
7707
+ return this.projectionMode === "geodetic" ? vn : _n;
6800
7708
  }
6801
7709
  setupViewportLayers() {
6802
7710
  if (!this.insetMap) return;
@@ -6804,18 +7712,18 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
6804
7712
  type: "FeatureCollection",
6805
7713
  features: []
6806
7714
  };
6807
- this.viewportSource = this.insetMap.createSource(Ut, e), this.insetMap.createLayer({
6808
- id: Wt,
7715
+ this.viewportSource = this.insetMap.createSource(bn, e), this.insetMap.createLayer({
7716
+ id: xn,
6809
7717
  type: "fill",
6810
- sourceId: Ut,
7718
+ sourceId: bn,
6811
7719
  paint: {
6812
7720
  "fill-color": "#0f62fe",
6813
7721
  "fill-opacity": .15
6814
7722
  }
6815
7723
  }), this.insetMap.createLayer({
6816
- id: Gt,
7724
+ id: Sn,
6817
7725
  type: "line",
6818
- sourceId: Ut,
7726
+ sourceId: bn,
6819
7727
  paint: {
6820
7728
  "line-color": "#0f62fe",
6821
7729
  "line-width": 1.5
@@ -7031,7 +7939,7 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
7031
7939
  }
7032
7940
  estimateViewportWidthFromScreenSamples(e) {
7033
7941
  if (!this.adapter) return null;
7034
- let t = a(this)?.mapElement;
7942
+ let t = u(this)?.mapElement;
7035
7943
  if (!t) return null;
7036
7944
  let n = t.clientWidth, r = t.clientHeight;
7037
7945
  if (!Number.isFinite(n) || !Number.isFinite(r) || n <= 0 || r <= 0) return null;
@@ -7040,7 +7948,7 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
7040
7948
  }
7041
7949
  sampleViewportLongitudeRange(e) {
7042
7950
  if (!this.adapter || !this.adapter.store.getState().mapLoaded) return null;
7043
- let t = a(this)?.mapElement;
7951
+ let t = u(this)?.mapElement;
7044
7952
  if (!t) return null;
7045
7953
  let n = t.clientWidth, r = t.clientHeight;
7046
7954
  if (!Number.isFinite(n) || !Number.isFinite(r) || n <= 0 || r <= 0) return null;
@@ -7050,21 +7958,21 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
7050
7958
  .5,
7051
7959
  .68,
7052
7960
  .88
7053
- ], o = Array.from({ length: 21 }, (e, t) => t / 20), s = Infinity, c = -Infinity, l = !1;
7961
+ ], a = Array.from({ length: 21 }, (e, t) => t / 20), o = Infinity, s = -Infinity, c = !1;
7054
7962
  for (let t of i) {
7055
7963
  let i = [];
7056
- for (let e of o) {
7964
+ for (let e of a) {
7057
7965
  let a = n * e, o = r * t, s = this.adapter.unproject([a, o]);
7058
7966
  !s || !Number.isFinite(s[0]) || i.push(s[0]);
7059
7967
  }
7060
7968
  if (i.length < 2) continue;
7061
- let a = i.map((t) => this.normalizeLngAround(t, e)), u = this.unwrapLongitudeSeries(a), d = Math.min(...u), f = Math.max(...u);
7062
- Number.isFinite(d) && Number.isFinite(f) && (s = Math.min(s, d), c = Math.max(c, f), l = !0);
7969
+ let l = i.map((t) => this.normalizeLngAround(t, e)), u = this.unwrapLongitudeSeries(l), d = Math.min(...u), f = Math.max(...u);
7970
+ Number.isFinite(d) && Number.isFinite(f) && (o = Math.min(o, d), s = Math.max(s, f), c = !0);
7063
7971
  }
7064
- return !l || !Number.isFinite(s) || !Number.isFinite(c) ? null : {
7065
- minLon: s,
7066
- maxLon: c,
7067
- width: Math.max(0, c - s)
7972
+ return !c || !Number.isFinite(o) || !Number.isFinite(s) ? null : {
7973
+ minLon: o,
7974
+ maxLon: s,
7975
+ width: Math.max(0, s - o)
7068
7976
  };
7069
7977
  }
7070
7978
  unwrapLongitudeSeries(e) {
@@ -7179,29 +8087,29 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
7179
8087
  return !Number.isFinite(t) || !Number.isFinite(n) ? null : (n = this.clampLat(n), t = this.normalizeLng(t), [t, n]);
7180
8088
  }
7181
8089
  clampZoom(e) {
7182
- return Math.min(Bt, Math.max(zt, e));
8090
+ return Math.min(gn, Math.max(hn, e));
7183
8091
  }
7184
8092
  resolveViewState(e) {
7185
8093
  if (e <= 0) return {
7186
8094
  mapZoom: 0,
7187
8095
  scale: this.baseScale
7188
8096
  };
7189
- if (e <= Q) return {
8097
+ if (e <= yn) return {
7190
8098
  mapZoom: 0,
7191
- scale: this.baseScale + (1 - this.baseScale) * (e / Q)
8099
+ scale: this.baseScale + (1 - this.baseScale) * (e / yn)
7192
8100
  };
7193
- let t = e - Q;
8101
+ let t = e - yn;
7194
8102
  return {
7195
8103
  mapZoom: this.clampZoom(t),
7196
8104
  scale: 1
7197
8105
  };
7198
8106
  }
7199
8107
  render() {
7200
- return _`
8108
+ return w`
7201
8109
  <div class="inset-map-frame ${this._collapsed ? "hidden" : ""}" tabindex=${this.minimizable ? "0" : "-1"}>
7202
8110
  <div class="inset-map"></div>
7203
8111
  </div>
7204
- ${this.minimizable ? _`
8112
+ ${this.minimizable ? w`
7205
8113
  <div class="toggle-btn">
7206
8114
  <sl-icon-button
7207
8115
  name=${this._collapsed ? "arrows-angle-expand" : "arrows-angle-contract"}
@@ -7215,39 +8123,39 @@ var Rt = "https://demotiles.maplibre.org/style.json", zt = 0, Bt = 22, Vt = 85.0
7215
8123
  `;
7216
8124
  }
7217
8125
  };
7218
- o([x({
8126
+ d([O({
7219
8127
  type: Number,
7220
8128
  attribute: "zoom-offset"
7221
- })], $.prototype, "zoomOffset", void 0), o([x({
8129
+ })], Cn.prototype, "zoomOffset", void 0), d([O({
7222
8130
  type: String,
7223
8131
  attribute: "style-url"
7224
- })], $.prototype, "styleUrl", void 0), o([x({
8132
+ })], Cn.prototype, "styleUrl", void 0), d([O({
7225
8133
  type: String,
7226
8134
  attribute: "background-layer"
7227
- })], $.prototype, "backgroundLayer", void 0), o([x({
8135
+ })], Cn.prototype, "backgroundLayer", void 0), d([O({
7228
8136
  type: Number,
7229
8137
  attribute: "base-scale"
7230
- })], $.prototype, "baseScale", void 0), o([x({
8138
+ })], Cn.prototype, "baseScale", void 0), d([O({
7231
8139
  type: Boolean,
7232
8140
  attribute: "minimizable"
7233
- })], $.prototype, "minimizable", void 0), o([x({
8141
+ })], Cn.prototype, "minimizable", void 0), d([O({
7234
8142
  type: Boolean,
7235
8143
  reflect: !0,
7236
8144
  attribute: "collapsed"
7237
- })], $.prototype, "_collapsed", void 0), $ = o([b("webmapx-inset-map")], $);
8145
+ })], Cn.prototype, "_collapsed", void 0), Cn = d([D("webmapx-inset-map")], Cn);
7238
8146
  //#endregion
7239
8147
  //#region src/components/webmapx-active-adapter.ts
7240
- var Kt = {
8148
+ var wn = {
7241
8149
  maplibre: "MapLibre GL",
7242
8150
  openlayers: "OpenLayers",
7243
8151
  leaflet: "Leaflet",
7244
8152
  cesium: "Cesium"
7245
- }, qt = class extends s {
8153
+ }, Tn = class extends f {
7246
8154
  constructor(...e) {
7247
8155
  super(...e), this.adapterName = "—", this.engineVersion = "";
7248
8156
  }
7249
8157
  static {
7250
- this.styles = g`
8158
+ this.styles = C`
7251
8159
  :host { display: inline-block; }
7252
8160
  .badge {
7253
8161
  display: inline-flex;
@@ -7271,7 +8179,7 @@ var Kt = {
7271
8179
  }
7272
8180
  onStateChanged() {}
7273
8181
  onMapAttached(e) {
7274
- this.adapterName = Kt[e.engineId] ?? e.engineId;
8182
+ this.adapterName = wn[e.engineId] ?? e.engineId;
7275
8183
  let t = e.engineVersion?.split(".");
7276
8184
  this.engineVersion = t ? `${t[0]}.${t[1]}` : "";
7277
8185
  }
@@ -7279,7 +8187,7 @@ var Kt = {
7279
8187
  this.adapterName = "—", this.engineVersion = "";
7280
8188
  }
7281
8189
  render() {
7282
- return _`
8190
+ return w`
7283
8191
  <span class="badge">
7284
8192
  <span class="dot"></span>
7285
8193
  ${this.adapterName}${this.engineVersion ? ` ${this.engineVersion}` : ""}
@@ -7287,5 +8195,5 @@ var Kt = {
7287
8195
  `;
7288
8196
  }
7289
8197
  };
7290
- o([w()], qt.prototype, "adapterName", void 0), o([w()], qt.prototype, "engineVersion", void 0), qt = o([b("webmapx-active-adapter")], qt);
8198
+ d([A()], Tn.prototype, "adapterName", void 0), d([A()], Tn.prototype, "engineVersion", void 0), Tn = d([D("webmapx-active-adapter")], Tn);
7291
8199
  //#endregion