@visma-swno/vsn-navigation 1.2.0-beta.2 → 1.2.0-beta.4

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.
@@ -305,10 +305,10 @@ var A = 0, Ae = (e) => (ge(((e, t) => Ee(ke, e, t))), T = Oe = e.sourceLocale, D
305
305
  if (typeof navigator > "u") return !1;
306
306
  let e = navigator.userAgentData?.platform ?? navigator.platform ?? "";
307
307
  return /mac/i.test(e);
308
- }, Pe = (e) => Ne() ? e.metaKey : e.ctrlKey, Fe = () => x("Choose a service"), Ie = () => x("Search"), Le = () => Ne() ? "Cmd+K" : "CTRL+K", Re = (e) => x(b`Type at least ${e} characters to search`), ze = () => x("Menu items"), Be = (e) => x(b`Load ${e} more`), Ve = () => x("VSN"), He = "survicate-sdk", Ue = "ui-components-feedback", We = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`;
308
+ }, Pe = (e) => !e.shiftKey && !e.altKey && (Ne() ? e.metaKey && !e.ctrlKey : e.ctrlKey && !e.metaKey), j = (e) => e.shiftKey || e.altKey || e.ctrlKey || e.metaKey, M = (e) => !j(e), Fe = () => x("Choose a service"), Ie = () => x("Search"), Le = () => Ne() ? "Cmd+K" : "CTRL+K", Re = (e) => x(b`Type at least ${e} characters to search`), ze = () => x("Menu items"), Be = (e) => x(b`Load ${e} more`), Ve = () => x("VSN"), He = "survicate-sdk", Ue = "ui-components-feedback", We = (e) => `https://survey.survicate.com/workspaces/${e}/web_surveys.js`;
309
309
  //#endregion
310
310
  //#region src/shared/icons.ts
311
- function j(e, t = 24, r) {
311
+ function N(e, t = 24, r) {
312
312
  return n`<svg
313
313
  xmlns="http://www.w3.org/2000/svg"
314
314
  width="${t}"
@@ -386,7 +386,7 @@ var tt = i`
386
386
  <path d="m7 9 5-5 5 5"/>
387
387
  `, nt = i`
388
388
  <path d="m18 15-6-6-6 6"/>
389
- `, M = i`
389
+ `, P = i`
390
390
  <path d="m6 9 6 6 6-6"/>
391
391
  `, rt = i`
392
392
  <circle cx="11" cy="11" r="8"/>
@@ -417,7 +417,7 @@ var ot = i`
417
417
  `;
418
418
  //#endregion
419
419
  //#region \0@oxc-project+runtime@0.127.0/helpers/decorate.js
420
- function N(e, t, n, r) {
420
+ function F(e, t, n, r) {
421
421
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
422
422
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
423
423
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -425,9 +425,9 @@ function N(e, t, n, r) {
425
425
  }
426
426
  //#endregion
427
427
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-item.ts
428
- var P, F = class extends e {
428
+ var I, L = class extends e {
429
429
  static {
430
- P = this;
430
+ I = this;
431
431
  }
432
432
  static {
433
433
  this.styles = [h];
@@ -452,7 +452,7 @@ var P, F = class extends e {
452
452
  }
453
453
  }, this._onItemMouseLeave = () => {
454
454
  this._showTooltip = !1;
455
- }, this._tooltipId = `vsn-side-menu-item-tooltip-${P._idCounter++}`;
455
+ }, this._tooltipId = `vsn-side-menu-item-tooltip-${I._idCounter++}`;
456
456
  }
457
457
  willUpdate(e) {
458
458
  let t = this.tree;
@@ -477,7 +477,7 @@ var P, F = class extends e {
477
477
  <div class="ga-tooltip ga-tooltip--right-center w-34 max-w-135">${this.tree?.label}</div>
478
478
  </div>
479
479
  <span class="ga-side-navigation__item-icon">
480
- ${e ? this._isExpanded ? j(M, 16) : j(ot, 16) : ""}
480
+ ${e ? this._isExpanded ? N(P, 16) : N(ot, 16) : ""}
481
481
  </span>
482
482
  <div class="ga-side-navigation__item-content">
483
483
  <div class="ga-side-navigation__item-label">${this.tree?.label}</div>
@@ -511,7 +511,7 @@ var P, F = class extends e {
511
511
  this._isExpanded = !this._isExpanded, e.preventDefault(), e.stopPropagation();
512
512
  return;
513
513
  }
514
- if (e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
514
+ if (e.button !== 0 || j(e)) return;
515
515
  e.preventDefault(), e.stopPropagation();
516
516
  let n = new CustomEvent("vsn-menu-item-changed", {
517
517
  bubbles: !0,
@@ -521,13 +521,13 @@ var P, F = class extends e {
521
521
  this.dispatchEvent(n);
522
522
  }
523
523
  };
524
- N([s({ attribute: !1 })], F.prototype, "tree", void 0), N([s({ type: Number })], F.prototype, "level", void 0), N([ue({
524
+ F([s({ attribute: !1 })], L.prototype, "tree", void 0), F([s({ type: Number })], L.prototype, "level", void 0), F([ue({
525
525
  context: de,
526
526
  subscribe: !0
527
- }), l()], F.prototype, "_currentActiveId", void 0), N([l()], F.prototype, "_isActive", void 0), N([l()], F.prototype, "_isExpanded", void 0), N([l()], F.prototype, "_showTooltip", void 0), N([l()], F.prototype, "_tooltipPos", void 0), N([c(".ga-side-navigation__item-label")], F.prototype, "_labelEl", void 0), F = P = N([o("vsn-menu-item")], F);
527
+ }), l()], L.prototype, "_currentActiveId", void 0), F([l()], L.prototype, "_isActive", void 0), F([l()], L.prototype, "_isExpanded", void 0), F([l()], L.prototype, "_showTooltip", void 0), F([l()], L.prototype, "_tooltipPos", void 0), F([c(".ga-side-navigation__item-label")], L.prototype, "_labelEl", void 0), L = I = F([o("vsn-menu-item")], L);
528
528
  //#endregion
529
529
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu.ts
530
- var I = class extends e {
530
+ var R = class extends e {
531
531
  constructor(...e) {
532
532
  super(...e), this.items = [], this._currentActiveId = "", this.currentItem = "";
533
533
  }
@@ -556,108 +556,118 @@ var I = class extends e {
556
556
  return n`<vsn-menu-item .tree=${e}></vsn-menu-item>`;
557
557
  }
558
558
  };
559
- N([s({ attribute: !1 })], I.prototype, "items", void 0), N([le({ context: de }), l()], I.prototype, "_currentActiveId", void 0), N([s()], I.prototype, "currentItem", void 0), I = N([o("vsn-menu")], I);
559
+ F([s({ attribute: !1 })], R.prototype, "items", void 0), F([le({ context: de }), l()], R.prototype, "_currentActiveId", void 0), F([s()], R.prototype, "currentItem", void 0), R = F([o("vsn-menu")], R);
560
560
  //#endregion
561
561
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-button.ts
562
- var L = class extends e {
562
+ var z = class extends e {
563
563
  constructor(...e) {
564
- super(...e), this.label = "", this._onKeydown = (e) => {
565
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.click());
564
+ super(...e), this.label = "", this.closeOnClick = !1, this._onKeydown = (e) => {
565
+ e.defaultPrevented || M(e) && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.click());
566
+ }, this._onClick = (e) => {
567
+ e.defaultPrevented || e.button !== 0 || j(e) || this.closeOnClick && this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
568
+ bubbles: !0,
569
+ composed: !0
570
+ }));
566
571
  };
567
572
  }
568
573
  static {
569
574
  this.styles = [t`
570
- /* Every dimension multiplies by --ga-base-scaling-factor (default 1) so the
571
- whole component scales uniformly with the host's density setting.
572
- Layout spacing lives on the inner .row, NOT on :host — a consuming app's
573
- reset (* { margin: 0; padding: 0 }) overrides :host but can't reach the shadow. */
574
- :host {
575
- display: block;
576
- border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
577
- }
575
+ /* Every dimension multiplies by --ga-base-scaling-factor (default 1) so the
576
+ whole component scales uniformly with the host's density setting.
577
+ Layout spacing lives on the inner .row, NOT on :host — a consuming app's
578
+ reset (* { margin: 0; padding: 0 }) overrides :host but can't reach the shadow. */
578
579
 
579
- :host(:hover) {
580
- background-color: var(--ga-color-surface-action-hover-2);
581
- }
580
+ :host {
581
+ display: block;
582
+ border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
583
+ cursor: pointer;
584
+ }
582
585
 
583
- :host(:focus-visible) {
584
- outline: calc(2px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-focus);
585
- outline-offset: calc(4px * var(--ga-base-scaling-factor, 1));
586
- }
586
+ :host(:hover) {
587
+ background-color: var(--ga-color-surface-action-hover-2);
588
+ }
587
589
 
588
- .row {
589
- display: flex;
590
- align-items: center;
591
- /* spacing-04 padding-block + 20px label line-height = 44px row,
592
- matching Gaia's .ga-side-navigation__item (py-3 / px-4 / gap-3). */
593
- gap: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
594
- padding-block: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
595
- padding-inline: calc(var(--ga-size-spacing-05) * var(--ga-base-scaling-factor, 1));
596
- }
590
+ :host(:focus-visible) {
591
+ outline: calc(2px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-focus);
592
+ outline-offset: calc(4px * var(--ga-base-scaling-factor, 1));
593
+ }
597
594
 
598
- .icon {
599
- width: calc(1rem * var(--ga-base-scaling-factor, 1));
600
- flex-shrink: 0;
601
- color: var(--ga-color-icon-primary);
602
- display: inline-flex;
603
- align-items: center;
604
- }
595
+ .row {
596
+ display: flex;
597
+ align-items: center;
598
+ /* spacing-04 padding-block + 20px label line-height = 44px row,
599
+ matching Gaia's .ga-side-navigation__item (py-3 / px-4 / gap-3). */
600
+ gap: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
601
+ padding-block: calc(var(--ga-size-spacing-04) * var(--ga-base-scaling-factor, 1));
602
+ padding-inline: calc(var(--ga-size-spacing-05) * var(--ga-base-scaling-factor, 1));
603
+ }
605
604
 
606
- .label {
607
- flex: 1;
608
- display: inline-flex;
609
- overflow: hidden;
610
- white-space: nowrap;
611
- text-overflow: ellipsis;
612
- font-family: Inter, ui-sans-serif, system-ui, sans-serif;
613
- font-feature-settings: 'liga' 1, 'calt' 1;
614
- font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
615
- line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
616
- letter-spacing: calc(var(--ga-text-md-letter-spacing) * var(--ga-base-scaling-factor, 1));
617
- color: var(--ga-color-text-action);
618
- }
605
+ .icon {
606
+ width: calc(1rem * var(--ga-base-scaling-factor, 1));
607
+ flex-shrink: 0;
608
+ color: var(--ga-color-icon-primary);
609
+ display: inline-flex;
610
+ align-items: center;
611
+ }
619
612
 
620
- slot[name="kbd"]::slotted(kbd) {
621
- display: inline-flex;
622
- align-items: center;
623
- justify-content: center;
624
- gap: calc(0.125rem * var(--ga-base-scaling-factor, 1));
625
- flex-shrink: 0;
626
- cursor: default;
627
- border: calc(1px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-disabled);
628
- border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
629
- background-color: var(--ga-color-white);
630
- /* !important: the <kbd> is host-provided slotted content, so a
631
- consuming app's * { padding: 0 } reset overrides ::slotted normal
632
- rules. We can't move it to an inner shadow element (it's the
633
- host's element), so important is the accepted defense here. */
634
- padding-inline: calc(var(--ga-size-spacing-02) * var(--ga-base-scaling-factor, 1)) !important;
635
- padding-block: calc(1px * var(--ga-base-scaling-factor, 1)) !important;
636
- font-family: Inter, ui-sans-serif, system-ui, sans-serif;
637
- font-size: calc(var(--ga-text-xs-font-size) * var(--ga-base-scaling-factor, 1));
638
- line-height: calc(var(--ga-text-xs-line-height) * var(--ga-base-scaling-factor, 1));
639
- letter-spacing: calc(var(--ga-text-xs-letter-spacing) * var(--ga-base-scaling-factor, 1));
640
- color: var(--ga-color-text-body);
641
- }
642
- `];
613
+ .label {
614
+ flex: 1;
615
+ display: inline-flex;
616
+ overflow: hidden;
617
+ white-space: nowrap;
618
+ text-overflow: ellipsis;
619
+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;
620
+ font-feature-settings: 'liga' 1, 'calt' 1;
621
+ font-size: calc(var(--ga-text-md-font-size) * var(--ga-base-scaling-factor, 1));
622
+ line-height: calc(var(--ga-text-md-line-height) * var(--ga-base-scaling-factor, 1));
623
+ letter-spacing: calc(var(--ga-text-md-letter-spacing) * var(--ga-base-scaling-factor, 1));
624
+ color: var(--ga-color-text-action);
625
+ }
626
+
627
+ slot[name="kbd"]::slotted(kbd) {
628
+ display: inline-flex;
629
+ align-items: center;
630
+ justify-content: center;
631
+ gap: calc(0.125rem * var(--ga-base-scaling-factor, 1));
632
+ flex-shrink: 0;
633
+ cursor: default;
634
+ border: calc(1px * var(--ga-base-scaling-factor, 1)) solid var(--ga-color-border-disabled);
635
+ border-radius: calc(var(--ga-radius) * var(--ga-base-scaling-factor, 1));
636
+ background-color: var(--ga-color-white);
637
+ /* !important: the <kbd> is host-provided slotted content, so a
638
+ consuming app's * { padding: 0 } reset overrides ::slotted normal
639
+ rules. We can't move it to an inner shadow element (it's the
640
+ host's element), so important is the accepted defense here. */
641
+ padding-inline: calc(var(--ga-size-spacing-02) * var(--ga-base-scaling-factor, 1)) !important;
642
+ padding-block: calc(1px * var(--ga-base-scaling-factor, 1)) !important;
643
+ font-family: Inter, ui-sans-serif, system-ui, sans-serif;
644
+ font-size: calc(var(--ga-text-xs-font-size) * var(--ga-base-scaling-factor, 1));
645
+ line-height: calc(var(--ga-text-xs-line-height) * var(--ga-base-scaling-factor, 1));
646
+ letter-spacing: calc(var(--ga-text-xs-letter-spacing) * var(--ga-base-scaling-factor, 1));
647
+ color: var(--ga-color-text-body);
648
+ }
649
+ `];
643
650
  }
644
651
  connectedCallback() {
645
- super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("keydown", this._onKeydown);
652
+ super.connectedCallback(), this.hasAttribute("tabindex") || this.setAttribute("tabindex", "0"), this.addEventListener("keydown", this._onKeydown), this.addEventListener("click", this._onClick);
646
653
  }
647
654
  disconnectedCallback() {
648
- this.removeEventListener("keydown", this._onKeydown), super.disconnectedCallback();
655
+ this.removeEventListener("keydown", this._onKeydown), this.removeEventListener("click", this._onClick), super.disconnectedCallback();
649
656
  }
650
657
  render() {
651
658
  return n`
652
- <div class="row">
653
- <span class="icon"><slot name="icon"></slot></span>
654
- <span class="label">${this.label}</span>
655
- <slot name="kbd"></slot>
656
- </div>
657
- `;
659
+ <div class="row">
660
+ <span class="icon"><slot name="icon"></slot></span>
661
+ <span class="label">${this.label}</span>
662
+ <slot name="kbd"></slot>
663
+ </div>
664
+ `;
658
665
  }
659
666
  };
660
- N([s()], L.prototype, "label", void 0), L = N([o("vsn-menu-button")], L);
667
+ F([s()], z.prototype, "label", void 0), F([s({
668
+ type: Boolean,
669
+ attribute: "close-on-click"
670
+ })], z.prototype, "closeOnClick", void 0), z = F([o("vsn-menu-button")], z);
661
671
  //#endregion
662
672
  //#region src/components/vsn-side-bar/vsn-menu/vsn-menu-separator.ts
663
673
  var st = class extends e {
@@ -683,29 +693,30 @@ var st = class extends e {
683
693
  return n`<div class="line"></div>`;
684
694
  }
685
695
  };
686
- st = N([o("vsn-menu-separator")], st);
696
+ st = F([o("vsn-menu-separator")], st);
687
697
  //#endregion
688
698
  //#region src/components/vsn-side-bar/vsn-footer/vsn-footer.keyboard.ts
689
699
  var ct = class {
690
700
  constructor(e) {
691
701
  this._prevExpanded = !1, this.onUserKeydown = (e) => {
692
- e.key === "Enter" || e.key === " " ? (e.preventDefault(), this.host.expanded = !this.host.expanded) : e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1);
702
+ e.defaultPrevented || (M(e) && (e.key === "Enter" || e.key === " ") ? (e.preventDefault(), this.host.expanded = !this.host.expanded) : M(e) && e.key === "Escape" && this.host.expanded && (e.preventDefault(), this.host.expanded = !1));
693
703
  }, this.onDropdownKeydown = (e) => {
694
- if (e.key === "Escape") {
704
+ if (e.defaultPrevented) return;
705
+ if (M(e) && e.key === "Escape") {
695
706
  e.preventDefault(), this._closeAndRefocus();
696
707
  return;
697
708
  }
698
- if (e.key === "Enter" || e.key === " ") {
709
+ if (M(e) && (e.key === "Enter" || e.key === " ")) {
699
710
  let t = e.target;
700
711
  t instanceof HTMLElement && t.classList.contains("ga-side-navigation__footer-dropdown-item") && (e.preventDefault(), t.click());
701
712
  return;
702
713
  }
703
- if (e.key === "Tab" && !e.shiftKey) {
714
+ if (M(e) && e.key === "Tab") {
704
715
  let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__footer-dropdown-item")), n = t[t.length - 1];
705
716
  n && e.target === n && (this.host.expanded = !1);
706
717
  return;
707
718
  }
708
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
719
+ if (j(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
709
720
  e.preventDefault();
710
721
  let t = this.host.querySelector(".ga-side-navigation__footer-dropdown");
711
722
  if (!t) return;
@@ -795,7 +806,7 @@ var pt = {
795
806
  }, mt = () => ({
796
807
  profile: x("My profile"),
797
808
  logout: x("Log out")
798
- }), R = class extends e {
809
+ }), B = class extends e {
799
810
  static {
800
811
  this.styles = [h, ut];
801
812
  }
@@ -851,7 +862,7 @@ var pt = {
851
862
  </div>
852
863
 
853
864
  <span class="ga-side-navigation__user-action">
854
- ${this.expanded ? j(nt, 16) : j(tt, 16)}
865
+ ${this.expanded ? N(nt, 16) : N(tt, 16)}
855
866
  </span>
856
867
 
857
868
  </div>
@@ -865,14 +876,14 @@ var pt = {
865
876
  ${this._items.map((e) => {
866
877
  let t = n`
867
878
  <span class="ga-side-navigation__footer-dropdown-icon">
868
- ${j(pt[e.id], 16)}
879
+ ${N(pt[e.id], 16)}
869
880
  </span>
870
881
  <span class="ga-side-navigation__footer-dropdown-title">
871
882
  ${e.label}
872
883
  </span>
873
884
  ${e.external ? n`
874
885
  <span class="ga-side-navigation__footer-dropdown-trail">
875
- ${j(et, 16)}
886
+ ${N(et, 16)}
876
887
  </span>
877
888
  ` : r}
878
889
  `;
@@ -920,52 +931,55 @@ var pt = {
920
931
  @error=${() => {
921
932
  this._avatarFailed = !0;
922
933
  }} />` : n`<span class="ga-side-navigation__user-avatar vsn-side-navigation__user-avatar--icon">
923
- ${j(Qe, 24)}
934
+ ${N(Qe, 24)}
924
935
  </span>`;
925
936
  }
926
937
  };
927
- N([s({ attribute: !1 })], R.prototype, "user", void 0), N([s()], R.prototype, "profilePictureBaseUrl", void 0), N([s()], R.prototype, "myProfileUrl", void 0), N([s({
938
+ F([s({ attribute: !1 })], B.prototype, "user", void 0), F([s()], B.prototype, "profilePictureBaseUrl", void 0), F([s()], B.prototype, "myProfileUrl", void 0), F([s({
928
939
  type: Boolean,
929
940
  reflect: !0
930
- })], R.prototype, "expanded", void 0), N([l()], R.prototype, "_avatarFailed", void 0), R = N([S(), o("vsn-footer")], R);
941
+ })], B.prototype, "expanded", void 0), F([l()], B.prototype, "_avatarFailed", void 0), B = F([S(), o("vsn-footer")], B);
931
942
  //#endregion
932
943
  //#region src/components/vsn-side-bar/vsn-header/vsn-header.keyboard.ts
933
944
  var ht = class {
934
945
  constructor(e) {
935
946
  this.onSwitcherKeydown = (e) => {
936
- if (e.key === "Enter" || e.key === " ") {
937
- if (e.preventDefault(), this.host.expanded && !this.host.canClose) return;
938
- (this.host.expanded || this.host.hasAvailableItems || this.host.modulesLoading) && (this.host.expanded = !this.host.expanded);
939
- return;
940
- }
941
- if (e.key === "ArrowDown" && !this.host.expanded) {
942
- if (!this.host.hasAvailableItems) return;
943
- e.preventDefault(), this.host.expanded = !0;
944
- return;
945
- }
946
- if (e.key === "Escape" && this.host.expanded) {
947
- if (!this.host.canClose) return;
948
- e.preventDefault(), this.host.expanded = !1;
947
+ if (!e.defaultPrevented) {
948
+ if (M(e) && (e.key === "Enter" || e.key === " ")) {
949
+ if (e.preventDefault(), this.host.expanded && !this.host.canClose) return;
950
+ (this.host.expanded || this.host.hasAvailableItems || this.host.modulesLoading) && (this.host.expanded = !this.host.expanded);
951
+ return;
952
+ }
953
+ if (M(e) && e.key === "ArrowDown" && !this.host.expanded) {
954
+ if (!this.host.hasAvailableItems) return;
955
+ e.preventDefault(), this.host.expanded = !0;
956
+ return;
957
+ }
958
+ if (M(e) && e.key === "Escape" && this.host.expanded) {
959
+ if (!this.host.canClose) return;
960
+ e.preventDefault(), this.host.expanded = !1;
961
+ }
949
962
  }
950
963
  }, this.host = e, e.addController(this);
951
964
  }
952
965
  hostConnected() {}
953
- }, gt = ".ga-side-navigation__switcher:focus{outline-offset:2px;outline:2px solid #3b82f6}", z = class extends e {
966
+ }, gt = ".ga-side-navigation__switcher:focus{outline-offset:2px;outline:2px solid #3b82f6}", V = class extends e {
954
967
  constructor(...e) {
955
968
  super(...e), this.items = [], this.loading = !1, this._handleKeydown = (e) => {
956
- if (e.key === "Escape") {
969
+ if (e.defaultPrevented) return;
970
+ if (M(e) && e.key === "Escape") {
957
971
  e.preventDefault(), this.dispatchEvent(new CustomEvent("close-request", {
958
972
  bubbles: !0,
959
973
  composed: !0
960
974
  }));
961
975
  return;
962
976
  }
963
- if (e.key === "Enter" || e.key === " ") {
977
+ if (M(e) && (e.key === "Enter" || e.key === " ")) {
964
978
  let t = e.target;
965
979
  t instanceof HTMLElement && t.classList.contains("ga-side-navigation__switcher-dropdown-item") && (e.preventDefault(), t.click());
966
980
  return;
967
981
  }
968
- if (e.key === "Tab" && !e.shiftKey) {
982
+ if (M(e) && e.key === "Tab") {
969
983
  let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item")), n = t[t.length - 1];
970
984
  n && e.target === n && this.dispatchEvent(new CustomEvent("tab-exit", {
971
985
  bubbles: !0,
@@ -973,7 +987,7 @@ var ht = class {
973
987
  }));
974
988
  return;
975
989
  }
976
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
990
+ if (j(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
977
991
  e.preventDefault();
978
992
  let t = Array.from(this.querySelectorAll(".ga-side-navigation__switcher-dropdown-item"));
979
993
  if (t.length === 0) return;
@@ -1031,7 +1045,7 @@ var ht = class {
1031
1045
  `;
1032
1046
  }
1033
1047
  };
1034
- N([s({ attribute: !1 })], z.prototype, "items", void 0), N([s({ type: Boolean })], z.prototype, "loading", void 0), z = N([S(), o("vsn-switcher-menu")], z);
1048
+ F([s({ attribute: !1 })], V.prototype, "items", void 0), F([s({ type: Boolean })], V.prototype, "loading", void 0), V = F([S(), o("vsn-switcher-menu")], V);
1035
1049
  //#endregion
1036
1050
  //#region src/components/vsn-side-bar/vsn-search/vsn-search.css.ts
1037
1051
  var _t = t`
@@ -1083,7 +1097,7 @@ var _t = t`
1083
1097
  .ga-side-navigation__search input::placeholder {
1084
1098
  color: var(--ga-color-text-disable-selected);
1085
1099
  }
1086
- `, B = class extends e {
1100
+ `, H = class extends e {
1087
1101
  constructor(...e) {
1088
1102
  super(...e), this.shortcut = "", this.value = "", this.loading = !1, this._emitSearch = () => {
1089
1103
  this._canSearch && this.dispatchEvent(new CustomEvent("vsn-search-submit", {
@@ -1091,14 +1105,13 @@ var _t = t`
1091
1105
  bubbles: !0,
1092
1106
  composed: !0
1093
1107
  }));
1094
- }, this._emitEscape = () => {
1095
- this.dispatchEvent(new CustomEvent("vsn-search-escape", {
1096
- detail: { value: this.value },
1108
+ }, this._emitSearchCleared = () => {
1109
+ this.dispatchEvent(new CustomEvent("vsn-search-cleared", {
1097
1110
  bubbles: !0,
1098
1111
  composed: !0
1099
1112
  }));
1100
1113
  }, this._handleEscape = (e) => {
1101
- e.key === "Escape" && this._emitEscape();
1114
+ e.defaultPrevented || M(e) && e.key === "Escape" && this.value.length > 0 && (e.preventDefault(), this._emitSearchCleared());
1102
1115
  };
1103
1116
  }
1104
1117
  createRenderRoot() {
@@ -1123,7 +1136,7 @@ var _t = t`
1123
1136
  }));
1124
1137
  }
1125
1138
  _handleEnter(e) {
1126
- e.key === "Enter" && this._emitSearch();
1139
+ e.defaultPrevented || M(e) && e.key === "Enter" && this._emitSearch();
1127
1140
  }
1128
1141
  render() {
1129
1142
  let e = this.value.length > 0 && this.value.length < 3;
@@ -1135,16 +1148,17 @@ var _t = t`
1135
1148
  aria-label=${x("Search")}
1136
1149
  ?disabled=${!this._canSearch}
1137
1150
  @click=${this._emitSearch}>
1138
- ${j(rt, 24)}
1151
+ ${N(rt, 24)}
1139
1152
  </button>
1140
1153
  <input type="search"
1141
- .placeholder=${Ie()}
1142
- .value=${this.value}
1143
- @input=${this._handleInput}
1144
- @keydown=${this._handleEnter} />
1154
+ .placeholder=${Ie()}
1155
+ .value=${this.value}
1156
+ @input=${this._handleInput}
1157
+ @keydown=${this._handleEnter}/>
1145
1158
  ${this._trailingSlot()}
1146
1159
  </div>
1147
- ${u(e, () => n`<div class="vsn-search__helper">${Re(3)}</div>`)}
1160
+ ${u(e, () => n`
1161
+ <div class="vsn-search__helper">${Re(3)}</div>`)}
1148
1162
  `;
1149
1163
  }
1150
1164
  _trailingSlot() {
@@ -1161,8 +1175,8 @@ var _t = t`
1161
1175
  _clearButton() {
1162
1176
  return n`
1163
1177
  <button class="vsn-search__clear" aria-label=${x("Clear search")}
1164
- @click=${this._emitEscape}>
1165
- ${j(it, 16)}
1178
+ @click=${this._emitSearchCleared}>
1179
+ ${N(it, 16)}
1166
1180
  </button>
1167
1181
  `;
1168
1182
  }
@@ -1170,10 +1184,10 @@ var _t = t`
1170
1184
  return n`<kbd class="ga-side-navigation__search-shortcut">${this.shortcut}</kbd>`;
1171
1185
  }
1172
1186
  };
1173
- N([s()], B.prototype, "shortcut", void 0), N([s()], B.prototype, "value", void 0), N([s({ type: Boolean })], B.prototype, "loading", void 0), B = N([S(), o("vsn-search")], B);
1187
+ F([s()], H.prototype, "shortcut", void 0), F([s()], H.prototype, "value", void 0), F([s({ type: Boolean })], H.prototype, "loading", void 0), H = F([S(), o("vsn-search")], H);
1174
1188
  //#endregion
1175
1189
  //#region src/components/vsn-side-bar/vsn-header/vsn-header.ts
1176
- var V = class extends e {
1190
+ var U = class extends e {
1177
1191
  createRenderRoot() {
1178
1192
  return this;
1179
1193
  }
@@ -1201,7 +1215,7 @@ var V = class extends e {
1201
1215
  <span class="ga-side-navigation__switcher-title">${e.title}</span>
1202
1216
  ${u(this.canClose, () => n`
1203
1217
  <span class="ga-side-navigation__switcher-action">
1204
- ${this.expanded ? j(M, 16) : j(tt, 16)}
1218
+ ${this.expanded ? N(P, 16) : N(tt, 16)}
1205
1219
  </span>
1206
1220
  `)}
1207
1221
  </div>
@@ -1219,7 +1233,7 @@ var V = class extends e {
1219
1233
 
1220
1234
  ${u(this.search?.enabled, () => n`
1221
1235
  <vsn-search
1222
- .shortcut=${this.search?.shortcut ?? Le()}
1236
+ .shortcut=${Le()}
1223
1237
  .value=${this.searchValue}
1224
1238
  .loading=${this.searchLoading}>
1225
1239
  </vsn-search>`)}
@@ -1282,10 +1296,10 @@ var V = class extends e {
1282
1296
  this.canClose && (this.expanded = !1);
1283
1297
  }
1284
1298
  };
1285
- N([s({ attribute: !1 })], V.prototype, "modules", void 0), N([s()], V.prototype, "activeModuleId", void 0), N([s()], V.prototype, "activeModuleLabel", void 0), N([s({ type: Boolean })], V.prototype, "modulesLoading", void 0), N([s({ type: Boolean })], V.prototype, "hasMenu", void 0), N([s({ attribute: !1 })], V.prototype, "search", void 0), N([s()], V.prototype, "searchValue", void 0), N([s({ type: Boolean })], V.prototype, "searchLoading", void 0), N([s({
1299
+ F([s({ attribute: !1 })], U.prototype, "modules", void 0), F([s()], U.prototype, "activeModuleId", void 0), F([s()], U.prototype, "activeModuleLabel", void 0), F([s({ type: Boolean })], U.prototype, "modulesLoading", void 0), F([s({ type: Boolean })], U.prototype, "hasMenu", void 0), F([s({ attribute: !1 })], U.prototype, "search", void 0), F([s()], U.prototype, "searchValue", void 0), F([s({ type: Boolean })], U.prototype, "searchLoading", void 0), F([s({
1286
1300
  type: Boolean,
1287
1301
  reflect: !0
1288
- })], V.prototype, "expanded", void 0), V = N([S(), o("vsn-header")], V);
1302
+ })], U.prototype, "expanded", void 0), U = F([S(), o("vsn-header")], U);
1289
1303
  //#endregion
1290
1304
  //#region src/components/vsn-side-bar/vsn-search-results/vsn-search-results.css.ts
1291
1305
  var vt = t`
@@ -1360,7 +1374,7 @@ var vt = t`
1360
1374
  `, yt = class {
1361
1375
  constructor(e) {
1362
1376
  this.onResultsKeydown = (e) => {
1363
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1377
+ if (e.defaultPrevented || j(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1364
1378
  e.preventDefault();
1365
1379
  let t = Array.from(this.host.querySelectorAll(".ga-side-navigation__search-results-item"));
1366
1380
  if (t.length === 0) return;
@@ -1371,7 +1385,7 @@ var vt = t`
1371
1385
  }, this.host = e, e.addController(this);
1372
1386
  }
1373
1387
  hostConnected() {}
1374
- }, H = class extends e {
1388
+ }, W = class extends e {
1375
1389
  constructor(...e) {
1376
1390
  super(...e), this.loadingMore = !1, this._keyboard = new yt(this);
1377
1391
  }
@@ -1450,7 +1464,7 @@ var vt = t`
1450
1464
  }));
1451
1465
  }
1452
1466
  };
1453
- N([s({ attribute: !1 })], H.prototype, "results", void 0), N([s()], H.prototype, "errorMessage", void 0), N([s()], H.prototype, "nextCursor", void 0), N([s({ type: Boolean })], H.prototype, "loadingMore", void 0), H = N([S(), o("vsn-search-results")], H);
1467
+ F([s({ attribute: !1 })], W.prototype, "results", void 0), F([s()], W.prototype, "errorMessage", void 0), F([s()], W.prototype, "nextCursor", void 0), F([s({ type: Boolean })], W.prototype, "loadingMore", void 0), W = F([S(), o("vsn-search-results")], W);
1454
1468
  //#endregion
1455
1469
  //#region src/components/vsn-side-bar/vsn-template/vsn-template.css.ts
1456
1470
  var bt = t`
@@ -1496,7 +1510,7 @@ var bt = t`
1496
1510
  `;
1497
1511
  }
1498
1512
  };
1499
- St = N([S(), o("vsn-template")], St);
1513
+ St = F([S(), o("vsn-template")], St);
1500
1514
  //#endregion
1501
1515
  //#region src/components/vsn-side-bar/vsn-error-state/vsn-error-state.css.ts
1502
1516
  var Ct = t`
@@ -1548,7 +1562,7 @@ var Ct = t`
1548
1562
  render() {
1549
1563
  return n`
1550
1564
  <div class="vsn-error-state" role="alert" aria-live="assertive">
1551
- <div class="vsn-error-state__icon">${j(at, 24)}</div>
1565
+ <div class="vsn-error-state__icon">${N(at, 24)}</div>
1552
1566
  <div class="vsn-error-state__title">${x("Loading error")}</div>
1553
1567
  <div class="vsn-error-state__message">${x("We're unable to load the menu.")}</div>
1554
1568
  <div class="vsn-error-state__hint">${x("Please check your internet connection and try again.")}</div>
@@ -1557,7 +1571,7 @@ var Ct = t`
1557
1571
  `;
1558
1572
  }
1559
1573
  };
1560
- wt = N([S(), o("vsn-error-state")], wt);
1574
+ wt = F([S(), o("vsn-error-state")], wt);
1561
1575
  //#endregion
1562
1576
  //#region src/components/vsn-side-bar/vsn-search-scopes/vsn-search-scopes.css.ts
1563
1577
  var Tt = t`
@@ -1581,12 +1595,12 @@ var Tt = t`
1581
1595
  text-overflow: ellipsis;
1582
1596
  }
1583
1597
  }
1584
- `, U, W = class extends e {
1598
+ `, Et, G = class extends e {
1585
1599
  static {
1586
- U = this;
1600
+ Et = this;
1587
1601
  }
1588
1602
  constructor(...e) {
1589
- super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++U._counter}`;
1603
+ super(...e), this.scopes = [], this.selectedScopeId = "", this._name = `vsn-search-scope-${++Et._counter}`;
1590
1604
  }
1591
1605
  createRenderRoot() {
1592
1606
  return this;
@@ -1628,16 +1642,16 @@ var Tt = t`
1628
1642
  }));
1629
1643
  }
1630
1644
  };
1631
- N([s({ attribute: !1 })], W.prototype, "scopes", void 0), N([s()], W.prototype, "selectedScopeId", void 0), W = U = N([S(), o("vsn-search-scopes")], W);
1645
+ F([s({ attribute: !1 })], G.prototype, "scopes", void 0), F([s()], G.prototype, "selectedScopeId", void 0), G = Et = F([S(), o("vsn-search-scopes")], G);
1632
1646
  //#endregion
1633
1647
  //#region src/shared/lang/locale-codes.ts
1634
- var Et = "en", Dt = [
1648
+ var Dt = "en", Ot = [
1635
1649
  "da",
1636
1650
  "fi",
1637
1651
  "nl",
1638
1652
  "no",
1639
1653
  "sv"
1640
- ], Ot = /* @__PURE__ */ p({ templates: () => kt }), kt = {
1654
+ ], kt = /* @__PURE__ */ p({ templates: () => At }), At = {
1641
1655
  s09a45db408570a7a: "Min profil",
1642
1656
  s119f9875b7d4cdfc: "Har du brug for hjælp? Kontakt support.",
1643
1657
  s1228605ee65ddefa: b`${0} resultat`,
@@ -1667,7 +1681,7 @@ var Et = "en", Dt = [
1667
1681
  sfbf31f663cef6cc2: "Prøv andre søgeord eller tjek stavningen.",
1668
1682
  s7c510419ea376840: "VSN",
1669
1683
  s38385cd359b17f7a: "Loading modules"
1670
- }, At = /* @__PURE__ */ p({ templates: () => jt }), jt = {
1684
+ }, jt = /* @__PURE__ */ p({ templates: () => Mt }), Mt = {
1671
1685
  s09a45db408570a7a: "Oma profiili",
1672
1686
  s119f9875b7d4cdfc: "Tarvitsetko apua? Ota yhteyttä tukeen.",
1673
1687
  s1228605ee65ddefa: b`${0} tulos`,
@@ -1697,7 +1711,7 @@ var Et = "en", Dt = [
1697
1711
  sfbf31f663cef6cc2: "Kokeile eri hakusanoja tai tarkista kirjoitusasu.",
1698
1712
  s7c510419ea376840: "VSN",
1699
1713
  s38385cd359b17f7a: "Loading modules"
1700
- }, Mt = /* @__PURE__ */ p({ templates: () => Nt }), Nt = {
1714
+ }, Nt = /* @__PURE__ */ p({ templates: () => Pt }), Pt = {
1701
1715
  s09a45db408570a7a: "Mijn profiel",
1702
1716
  s119f9875b7d4cdfc: "Hulp nodig? Neem contact op met ondersteuning.",
1703
1717
  s1228605ee65ddefa: b`${0} resultaat`,
@@ -1727,7 +1741,7 @@ var Et = "en", Dt = [
1727
1741
  sfbf31f663cef6cc2: "Probeer andere zoekwoorden of controleer de spelling.",
1728
1742
  s7c510419ea376840: "VSN",
1729
1743
  s38385cd359b17f7a: "Loading modules"
1730
- }, Pt = /* @__PURE__ */ p({ templates: () => Ft }), Ft = {
1744
+ }, Ft = /* @__PURE__ */ p({ templates: () => It }), It = {
1731
1745
  s09a45db408570a7a: "Min profil",
1732
1746
  s119f9875b7d4cdfc: "Trenger du hjelp? Kontakt støtte.",
1733
1747
  s1228605ee65ddefa: b`${0} resultat`,
@@ -1757,7 +1771,7 @@ var Et = "en", Dt = [
1757
1771
  sfbf31f663cef6cc2: "Prøv andre søkeord eller sjekk stavemåten.",
1758
1772
  s7c510419ea376840: "VSN",
1759
1773
  s38385cd359b17f7a: "Loading modules"
1760
- }, It = /* @__PURE__ */ p({ templates: () => Lt }), Lt = {
1774
+ }, Lt = /* @__PURE__ */ p({ templates: () => Rt }), Rt = {
1761
1775
  s09a45db408570a7a: "Min profil",
1762
1776
  s119f9875b7d4cdfc: "Behöver du hjälp? Kontakta support.",
1763
1777
  s1228605ee65ddefa: b`${0} resultat`,
@@ -1787,17 +1801,17 @@ var Et = "en", Dt = [
1787
1801
  sfbf31f663cef6cc2: "Prova andra sökord eller kontrollera stavningen.",
1788
1802
  s7c510419ea376840: "VSN",
1789
1803
  s38385cd359b17f7a: "Loading modules"
1790
- }, Rt = {
1791
- da: Ot,
1792
- fi: At,
1793
- nl: Mt,
1794
- no: Pt,
1795
- sv: It
1796
- }, { getLocale: zt, setLocale: Bt } = Ae({
1797
- sourceLocale: Et,
1798
- targetLocales: Dt,
1799
- loadLocale: (e) => Rt[e] ? Promise.resolve(Rt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
1800
- }), Vt = t`
1804
+ }, zt = {
1805
+ da: kt,
1806
+ fi: jt,
1807
+ nl: Nt,
1808
+ no: Ft,
1809
+ sv: Lt
1810
+ }, { getLocale: Bt, setLocale: Vt } = Ae({
1811
+ sourceLocale: Dt,
1812
+ targetLocales: Ot,
1813
+ loadLocale: (e) => zt[e] ? Promise.resolve(zt[e]) : Promise.reject(/* @__PURE__ */ Error(`Unknown locale: ${e}`))
1814
+ }), Ht = t`
1801
1815
  @layer components {
1802
1816
  .vsn-switcher-anchor {
1803
1817
  position: relative;
@@ -1811,7 +1825,7 @@ var Et = "en", Dt = [
1811
1825
  z-index: 10;
1812
1826
  }
1813
1827
  }
1814
- `, Ht = t`
1828
+ `, Ut = t`
1815
1829
  .vsn-spinner {
1816
1830
  display: inline-block;
1817
1831
  flex-shrink: 0;
@@ -1831,7 +1845,7 @@ var Et = "en", Dt = [
1831
1845
  @keyframes vsn-spin {
1832
1846
  to { transform: rotate(360deg); }
1833
1847
  }
1834
- `, Ut = class {
1848
+ `, Wt = class {
1835
1849
  constructor(e, t, n) {
1836
1850
  this._onHostClick = (e) => {
1837
1851
  let t = this._host.renderRoot.querySelector(this._clickedSelector);
@@ -1844,14 +1858,14 @@ var Et = "en", Dt = [
1844
1858
  hostDisconnected() {
1845
1859
  this._host.removeEventListener("click", this._onHostClick);
1846
1860
  }
1847
- }, Wt = "button:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"])", Gt = class {
1861
+ }, Gt = "button:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"])", Kt = class {
1848
1862
  constructor(e) {
1849
1863
  this.onKeydown = (e) => {
1850
- if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1864
+ if (e.defaultPrevented || j(e) || e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1851
1865
  let t = this.host.renderRoot.querySelector("slot[name=\"nav-footer\"]");
1852
1866
  if (!t) return;
1853
1867
  let n = [];
1854
- for (let e of t.assignedElements({ flatten: !0 })) e.matches(Wt) && n.push(e), n.push(...Array.from(e.querySelectorAll(Wt)));
1868
+ for (let e of t.assignedElements({ flatten: !0 })) e.matches(Gt) && n.push(e), n.push(...Array.from(e.querySelectorAll(Gt)));
1855
1869
  if (n.length === 0) return;
1856
1870
  let r = e.composedPath()[0];
1857
1871
  if (!(r instanceof HTMLElement)) return;
@@ -1863,18 +1877,18 @@ var Et = "en", Dt = [
1863
1877
  }, this.host = e, e.addController(this);
1864
1878
  }
1865
1879
  hostConnected() {}
1866
- }, G = class extends e {
1880
+ }, K = class extends e {
1867
1881
  static {
1868
1882
  this.styles = [
1869
1883
  h,
1870
- Vt,
1884
+ Ht,
1871
1885
  ut,
1872
1886
  _t,
1873
1887
  vt,
1874
1888
  Tt,
1875
1889
  bt,
1876
1890
  Ct,
1877
- Ht,
1891
+ Ut,
1878
1892
  t`
1879
1893
  :host {
1880
1894
  position: absolute;
@@ -1889,7 +1903,7 @@ var Et = "en", Dt = [
1889
1903
  ];
1890
1904
  }
1891
1905
  constructor() {
1892
- super(), this.modules = [], this.modulesLoading = !1, this.lang = "en", this.error = !1, this.open = !1, this._searchQuery = "", this._searchLoading = !1, this._activeScopeId = "menu", this._searchLoadingMore = !1, this._navFooterKeyboard = new Gt(this), this._onNavigate = (e) => {
1906
+ super(), this.modules = [], this.modulesLoading = !1, this.lang = "en", this.error = !1, this.open = !1, this._searchQuery = "", this._searchLoading = !1, this._activeScopeId = "menu", this._searchLoadingMore = !1, this._navFooterKeyboard = new Kt(this), this._onNavigate = (e) => {
1893
1907
  this._searchQuery = "", this._searchResults = void 0, this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1894
1908
  bubbles: !0,
1895
1909
  composed: !0
@@ -1906,13 +1920,13 @@ var Et = "en", Dt = [
1906
1920
  }));
1907
1921
  }, this._onScopeChanged = (e) => {
1908
1922
  this._activeScopeId = e.detail.scopeId, this._runSearch(this._searchQuery, this._activeScopeId);
1909
- }, new Ut(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1923
+ }, new Wt(this, ".ga-side-navigation", () => this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1910
1924
  bubbles: !0,
1911
1925
  composed: !0
1912
1926
  })));
1913
1927
  }
1914
1928
  willUpdate(e) {
1915
- e.has("lang") && Bt(this.lang).catch(console.error), e.has("open") && e.get("open") && !this.open && (this._searchQuery = "", this._activeScopeId = "menu", this._clearSearchState(), this.renderRoot.querySelector("vsn-header")?.reset(), this.renderRoot.querySelector("vsn-footer")?.reset());
1929
+ e.has("lang") && Vt(this.lang).catch(console.error), e.has("open") && e.get("open") && !this.open && (this._searchQuery = "", this._activeScopeId = "menu", this._clearSearchState(), this.renderRoot.querySelector("vsn-header")?.reset(), this.renderRoot.querySelector("vsn-footer")?.reset());
1916
1930
  }
1917
1931
  async focusSearch() {
1918
1932
  await this.updateComplete, this.menu?.search?.enabled && this.renderRoot.querySelector("vsn-search")?.focus();
@@ -1923,11 +1937,8 @@ var Et = "en", Dt = [
1923
1937
  _onSearchSubmit(e) {
1924
1938
  this._runSearch(e.detail.query, this._activeScopeId);
1925
1939
  }
1926
- _onSearchEscape(e) {
1927
- e.detail.value.length > 0 ? (this._searchQuery = "", this._clearSearchState(), this.focusSearch()) : this.dispatchEvent(new CustomEvent("vsn-side-bar-close", {
1928
- bubbles: !0,
1929
- composed: !0
1930
- }));
1940
+ _onSearchCleared() {
1941
+ this._searchQuery = "", this._clearSearchState(), this.focusSearch();
1931
1942
  }
1932
1943
  _clearSearchState() {
1933
1944
  this._searchAbort?.abort(), this._searchAbort = void 0, this._searchResults = void 0, this._searchLoading = !1, this._searchLoadingMore = !1, this._searchError = void 0, this._searchNextCursor = void 0;
@@ -2013,43 +2024,47 @@ var Et = "en", Dt = [
2013
2024
  ${this.header()}
2014
2025
  ${this.scopesGroup()}
2015
2026
  ${e === "error" ? this.errorState() : e === "loading" ? this.loadingState() : e === "results" ? this.searchResults() : this.renderMenu(this.menu)}
2016
- ${e === "menu" ? n`<slot name="nav-footer"></slot>` : n``}
2027
+ ${e === "menu" ? n`
2028
+ <slot name="nav-footer"></slot>` : n``}
2017
2029
  ${this.auth ? this.footer(this.auth) : ""}
2018
2030
  </div>
2019
2031
  `;
2020
2032
  }
2021
2033
  searchResults() {
2022
- return n`<vsn-search-results
2023
- class="flex-1 min-h-0"
2024
- .results=${this._searchResults}
2025
- .errorMessage=${this._searchError}
2026
- .nextCursor=${this._searchNextCursor}
2027
- .loadingMore=${this._searchLoadingMore}>
2028
- </vsn-search-results>`;
2034
+ return n`
2035
+ <vsn-search-results
2036
+ class="flex-1 min-h-0"
2037
+ .results=${this._searchResults}
2038
+ .errorMessage=${this._searchError}
2039
+ .nextCursor=${this._searchNextCursor}
2040
+ .loadingMore=${this._searchLoadingMore}>
2041
+ </vsn-search-results>`;
2029
2042
  }
2030
2043
  loadingState() {
2031
- return n`<vsn-template class="flex-1 min-h-0"></vsn-template>`;
2044
+ return n`
2045
+ <vsn-template class="flex-1 min-h-0"></vsn-template>`;
2032
2046
  }
2033
2047
  errorState() {
2034
- return n`<vsn-error-state class="flex-1 min-h-0"></vsn-error-state>`;
2048
+ return n`
2049
+ <vsn-error-state class="flex-1 min-h-0"></vsn-error-state>`;
2035
2050
  }
2036
2051
  header() {
2037
2052
  let e = this.menu?.items.length ? this.menu.search : void 0;
2038
2053
  return n`
2039
- <vsn-header
2040
- .modules=${this.modules}
2041
- .activeModuleId=${this.activeModuleId}
2042
- .activeModuleLabel=${this.activeModuleLabel}
2043
- .modulesLoading=${this.modulesLoading}
2044
- .hasMenu=${(this.menu?.items.length ?? 0) > 0}
2045
- .search=${e}
2046
- .searchValue=${this._searchQuery}
2047
- .searchLoading=${this._searchLoading}
2048
- @vsn-search-input=${this._onSearchInput}
2049
- @vsn-search-submit=${this._onSearchSubmit}
2050
- @vsn-search-escape=${this._onSearchEscape}
2051
- >
2052
- </vsn-header>`;
2054
+ <vsn-header
2055
+ .modules=${this.modules}
2056
+ .activeModuleId=${this.activeModuleId}
2057
+ .activeModuleLabel=${this.activeModuleLabel}
2058
+ .modulesLoading=${this.modulesLoading}
2059
+ .hasMenu=${(this.menu?.items.length ?? 0) > 0}
2060
+ .search=${e}
2061
+ .searchValue=${this._searchQuery}
2062
+ .searchLoading=${this._searchLoading}
2063
+ @vsn-search-input=${this._onSearchInput}
2064
+ @vsn-search-submit=${this._onSearchSubmit}
2065
+ @vsn-search-cleared=${this._onSearchCleared}
2066
+ >
2067
+ </vsn-header>`;
2053
2068
  }
2054
2069
  scopesGroup() {
2055
2070
  if (!this.menu?.search?.enabled) return n``;
@@ -2069,27 +2084,28 @@ var Et = "en", Dt = [
2069
2084
  `;
2070
2085
  }
2071
2086
  renderMenu(e) {
2072
- return n`<vsn-menu class="flex-1 min-h-0" .items=${e?.items ?? []} .currentItem=${e?.currentItem ?? ""}></vsn-menu>`;
2087
+ return n`
2088
+ <vsn-menu class="flex-1 min-h-0" .items=${e?.items ?? []} .currentItem=${e?.currentItem ?? ""}></vsn-menu>`;
2073
2089
  }
2074
2090
  footer(e) {
2075
2091
  return n`
2076
2092
  <vsn-footer
2077
- .user=${e.user}
2078
- .profilePictureBaseUrl=${e.profilePictureBaseUrl}
2079
- .myProfileUrl=${e.myProfileUrl}>
2093
+ .user=${e.user}
2094
+ .profilePictureBaseUrl=${e.profilePictureBaseUrl}
2095
+ .myProfileUrl=${e.myProfileUrl}>
2080
2096
  </vsn-footer>
2081
2097
  `;
2082
2098
  }
2083
2099
  };
2084
- N([s({ attribute: !1 })], G.prototype, "modules", void 0), N([s()], G.prototype, "activeModuleId", void 0), N([s()], G.prototype, "activeModuleLabel", void 0), N([s({ type: Boolean })], G.prototype, "modulesLoading", void 0), N([s()], G.prototype, "lang", void 0), N([s({ attribute: !1 })], G.prototype, "auth", void 0), N([s({ type: Boolean })], G.prototype, "error", void 0), N([s({
2100
+ F([s({ attribute: !1 })], K.prototype, "modules", void 0), F([s()], K.prototype, "activeModuleId", void 0), F([s()], K.prototype, "activeModuleLabel", void 0), F([s({ type: Boolean })], K.prototype, "modulesLoading", void 0), F([s()], K.prototype, "lang", void 0), F([s({ attribute: !1 })], K.prototype, "auth", void 0), F([s({ type: Boolean })], K.prototype, "error", void 0), F([s({
2085
2101
  type: Boolean,
2086
2102
  reflect: !0
2087
- })], G.prototype, "open", void 0), N([s({ attribute: !1 })], G.prototype, "menu", void 0), N([l()], G.prototype, "_searchQuery", void 0), N([l()], G.prototype, "_searchResults", void 0), N([l()], G.prototype, "_searchLoading", void 0), N([l()], G.prototype, "_activeScopeId", void 0), N([l()], G.prototype, "_searchError", void 0), N([l()], G.prototype, "_searchNextCursor", void 0), N([l()], G.prototype, "_searchLoadingMore", void 0), G = N([o("vsn-side-bar")], G);
2103
+ })], K.prototype, "open", void 0), F([s({ attribute: !1 })], K.prototype, "menu", void 0), F([l()], K.prototype, "_searchQuery", void 0), F([l()], K.prototype, "_searchResults", void 0), F([l()], K.prototype, "_searchLoading", void 0), F([l()], K.prototype, "_activeScopeId", void 0), F([l()], K.prototype, "_searchError", void 0), F([l()], K.prototype, "_searchNextCursor", void 0), F([l()], K.prototype, "_searchLoadingMore", void 0), K = F([o("vsn-side-bar")], K);
2088
2104
  //#endregion
2089
2105
  //#region src/components/vsn-top-bar/vsn-breadcrumb-menu-item.ts
2090
- var K, q = class extends e {
2106
+ var q, J = class extends e {
2091
2107
  static {
2092
- K = this;
2108
+ q = this;
2093
2109
  }
2094
2110
  static {
2095
2111
  this.styles = h;
@@ -2116,7 +2132,7 @@ var K, q = class extends e {
2116
2132
  e.preventDefault(), e.stopPropagation(), this._isExpanded = !this._isExpanded;
2117
2133
  return;
2118
2134
  }
2119
- if (!this.tree || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
2135
+ if (!this.tree || e.button !== 0 || j(e)) return;
2120
2136
  e.preventDefault(), e.stopPropagation();
2121
2137
  let t = [...this.ancestorPath, this.tree];
2122
2138
  this.dispatchEvent(new CustomEvent("vsn-breadcrumb-menu-leaf-select", {
@@ -2124,7 +2140,7 @@ var K, q = class extends e {
2124
2140
  bubbles: !0,
2125
2141
  composed: !0
2126
2142
  }));
2127
- }, this._tooltipId = `vsn-menu-item-tooltip-${K._idCounter++}`;
2143
+ }, this._tooltipId = `vsn-menu-item-tooltip-${q._idCounter++}`;
2128
2144
  }
2129
2145
  createRenderRoot() {
2130
2146
  return this;
@@ -2150,7 +2166,7 @@ var K, q = class extends e {
2150
2166
  <div class="ga-tooltip ga-tooltip--right-start" style="white-space: nowrap">${e}</div>
2151
2167
  </div>
2152
2168
  <span class="ga-side-navigation__item-icon">
2153
- ${this._isParent() ? this._isExpanded ? j(M, 16) : j(ot, 16) : ""}
2169
+ ${this._isParent() ? this._isExpanded ? N(P, 16) : N(ot, 16) : ""}
2154
2170
  </span>
2155
2171
  <div class="ga-side-navigation__item-content">
2156
2172
  <div class="ga-side-navigation__item-label">${e}</div>
@@ -2174,10 +2190,10 @@ var K, q = class extends e {
2174
2190
  if (this.tree && _(this.tree)) return this.tree.items.length > 0;
2175
2191
  }
2176
2192
  };
2177
- N([s({ attribute: !1 })], q.prototype, "tree", void 0), N([s({ type: Number })], q.prototype, "level", void 0), N([s({ type: Array })], q.prototype, "ancestorPath", void 0), N([l()], q.prototype, "_isExpanded", void 0), N([l()], q.prototype, "_showTooltip", void 0), N([l()], q.prototype, "_tooltipPos", void 0), N([c(".ga-side-navigation__item-label")], q.prototype, "_labelEl", void 0), q = K = N([o("vsn-breadcrumb-menu-item")], q);
2193
+ F([s({ attribute: !1 })], J.prototype, "tree", void 0), F([s({ type: Number })], J.prototype, "level", void 0), F([s({ type: Array })], J.prototype, "ancestorPath", void 0), F([l()], J.prototype, "_isExpanded", void 0), F([l()], J.prototype, "_showTooltip", void 0), F([l()], J.prototype, "_tooltipPos", void 0), F([c(".ga-side-navigation__item-label")], J.prototype, "_labelEl", void 0), J = q = F([o("vsn-breadcrumb-menu-item")], J);
2178
2194
  //#endregion
2179
2195
  //#region src/components/vsn-top-bar/vsn-breadcrumb-menu.ts
2180
- var J = class extends e {
2196
+ var qt = class extends e {
2181
2197
  static {
2182
2198
  this.styles = h;
2183
2199
  }
@@ -2197,7 +2213,7 @@ var J = class extends e {
2197
2213
  `;
2198
2214
  }
2199
2215
  };
2200
- N([s({ attribute: !1 })], J.prototype, "treeList", void 0), J = N([o("vsn-breadcrumb-menu")], J);
2216
+ F([s({ attribute: !1 })], qt.prototype, "treeList", void 0), qt = F([o("vsn-breadcrumb-menu")], qt);
2201
2217
  //#endregion
2202
2218
  //#region src/components/vsn-top-bar/vsn-breadcrumbs.ts
2203
2219
  var Y = class extends e {
@@ -2520,10 +2536,10 @@ var Y = class extends e {
2520
2536
  `;
2521
2537
  }
2522
2538
  };
2523
- N([s({ attribute: !1 })], Y.prototype, "tree", void 0), N([s({ type: Array })], Y.prototype, "modules", void 0), N([s()], Y.prototype, "activeModuleId", void 0), N([l()], Y.prototype, "_openPopoverId", void 0), N([l()], Y.prototype, "_displayMode", void 0), N([l()], Y.prototype, "_overflowCount", void 0), N([l()], Y.prototype, "_tooltip", void 0), Y = N([S(), o("vsn-breadcrumbs")], Y);
2539
+ F([s({ attribute: !1 })], Y.prototype, "tree", void 0), F([s({ type: Array })], Y.prototype, "modules", void 0), F([s()], Y.prototype, "activeModuleId", void 0), F([l()], Y.prototype, "_openPopoverId", void 0), F([l()], Y.prototype, "_displayMode", void 0), F([l()], Y.prototype, "_overflowCount", void 0), F([l()], Y.prototype, "_tooltip", void 0), Y = F([S(), o("vsn-breadcrumbs")], Y);
2524
2540
  //#endregion
2525
2541
  //#region src/components/vsn-top-bar/vsn-ai-assistant.ts
2526
- var Kt = class extends e {
2542
+ var Jt = class extends e {
2527
2543
  static {
2528
2544
  this.styles = h;
2529
2545
  }
@@ -2540,12 +2556,12 @@ var Kt = class extends e {
2540
2556
  render() {
2541
2557
  return n`
2542
2558
  <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open AI assistant")} @click=${this._handleClick}>
2543
- <span class="ga-icon">${j(Ke)}</span>
2559
+ <span class="ga-icon">${N(Ke)}</span>
2544
2560
  </button>
2545
2561
  `;
2546
2562
  }
2547
2563
  };
2548
- Kt = N([S(), o("vsn-ai-assistant")], Kt);
2564
+ Jt = F([S(), o("vsn-ai-assistant")], Jt);
2549
2565
  //#endregion
2550
2566
  //#region src/components/vsn-top-bar/vsn-feedback.ts
2551
2567
  var X = class extends e {
@@ -2591,7 +2607,7 @@ var X = class extends e {
2591
2607
  render() {
2592
2608
  return this._compact ? n`
2593
2609
  <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Send feedback")} @click=${this._handleClick}>
2594
- <span class="ga-icon">${j(Ye)}</span>
2610
+ <span class="ga-icon">${N(Ye)}</span>
2595
2611
  </button>
2596
2612
  ` : n`
2597
2613
  <button type="button" class="ga-button ga-button--secondary" aria-label=${x("Send feedback")} @click=${this._handleClick}>
@@ -2600,10 +2616,10 @@ var X = class extends e {
2600
2616
  `;
2601
2617
  }
2602
2618
  };
2603
- N([l()], X.prototype, "_compact", void 0), N([s({ attribute: !1 })], X.prototype, "feedback", void 0), N([s({ attribute: !1 })], X.prototype, "auth", void 0), X = N([S(), o("vsn-feedback")], X);
2619
+ F([l()], X.prototype, "_compact", void 0), F([s({ attribute: !1 })], X.prototype, "feedback", void 0), F([s({ attribute: !1 })], X.prototype, "auth", void 0), X = F([S(), o("vsn-feedback")], X);
2604
2620
  //#endregion
2605
2621
  //#region src/components/vsn-top-bar/vsn-home.ts
2606
- var Z = class extends e {
2622
+ var Yt = class extends e {
2607
2623
  static {
2608
2624
  this.styles = h;
2609
2625
  }
@@ -2624,15 +2640,15 @@ var Z = class extends e {
2624
2640
  render() {
2625
2641
  return this.landingPageUrl ? n`
2626
2642
  <a href=${this.landingPageUrl} class="ga-button ga-button--ghost ga-button--icon-only" aria-label=${x("Home")} @click=${this._handleClick}>
2627
- <span class="ga-icon">${j(Xe)}</span>
2643
+ <span class="ga-icon">${N(Xe)}</span>
2628
2644
  </a>
2629
2645
  ` : r;
2630
2646
  }
2631
2647
  };
2632
- N([s({ attribute: "landing-page-url" })], Z.prototype, "landingPageUrl", void 0), Z = N([S(), o("vsn-home")], Z);
2648
+ F([s({ attribute: "landing-page-url" })], Yt.prototype, "landingPageUrl", void 0), Yt = F([S(), o("vsn-home")], Yt);
2633
2649
  //#endregion
2634
2650
  //#region src/components/vsn-top-bar/vsn-menu-toggle.ts
2635
- var qt = class extends e {
2651
+ var Xt = class extends e {
2636
2652
  constructor(...e) {
2637
2653
  super(...e), this._tooltip = null, this._onMouseEnter = (e) => {
2638
2654
  let t = e.currentTarget.getBoundingClientRect();
@@ -2662,7 +2678,7 @@ var qt = class extends e {
2662
2678
  render() {
2663
2679
  return n`
2664
2680
  <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Open menu")} aria-describedby=${this._tooltip ? "vsn-menu-toggle-tooltip" : r} @click=${this._handleClick} @mouseenter=${this._onMouseEnter} @mouseleave=${this._onMouseLeave}>
2665
- <span class="ga-icon">${j(Ge)}</span>
2681
+ <span class="ga-icon">${N(Ge)}</span>
2666
2682
  </button>
2667
2683
  ${this._tooltip ? n`
2668
2684
  <div id="vsn-menu-toggle-tooltip" role="tooltip" style="position: fixed; left: ${this._tooltip.x}px; top: ${this._tooltip.y}px; pointer-events: none; z-index: 9999;">
@@ -2672,10 +2688,10 @@ var qt = class extends e {
2672
2688
  `;
2673
2689
  }
2674
2690
  };
2675
- N([l()], qt.prototype, "_tooltip", void 0), qt = N([S(), o("vsn-menu-toggle")], qt);
2691
+ F([l()], Xt.prototype, "_tooltip", void 0), Xt = F([S(), o("vsn-menu-toggle")], Xt);
2676
2692
  //#endregion
2677
2693
  //#region src/components/vsn-top-bar/vsn-notifications.ts
2678
- var Jt = class extends e {
2694
+ var Z = class extends e {
2679
2695
  constructor(...e) {
2680
2696
  super(...e), this.notificationActive = !1;
2681
2697
  }
@@ -2696,19 +2712,19 @@ var Jt = class extends e {
2696
2712
  let e = this.notificationActive ? Je : qe;
2697
2713
  return n`
2698
2714
  <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Notifications")} @click=${this._handleClick}>
2699
- <span class="ga-icon">${j(e)}</span>
2715
+ <span class="ga-icon">${N(e)}</span>
2700
2716
  </button>
2701
2717
  `;
2702
2718
  }
2703
2719
  };
2704
- N([s({
2720
+ F([s({
2705
2721
  type: Boolean,
2706
2722
  attribute: "notification-active",
2707
2723
  reflect: !0
2708
- })], Jt.prototype, "notificationActive", void 0), Jt = N([S(), o("vsn-notifications")], Jt);
2724
+ })], Z.prototype, "notificationActive", void 0), Z = F([S(), o("vsn-notifications")], Z);
2709
2725
  //#endregion
2710
2726
  //#region src/components/vsn-top-bar/vsn-help.ts
2711
- function Yt(e) {
2727
+ function Zt(e) {
2712
2728
  try {
2713
2729
  let t = new URL(e);
2714
2730
  return t.protocol === "https:" || t.protocol === "http:";
@@ -2716,7 +2732,7 @@ function Yt(e) {
2716
2732
  return !1;
2717
2733
  }
2718
2734
  }
2719
- var Xt = class extends e {
2735
+ var Qt = class extends e {
2720
2736
  static {
2721
2737
  this.styles = h;
2722
2738
  }
@@ -2731,18 +2747,18 @@ var Xt = class extends e {
2731
2747
  }));
2732
2748
  }
2733
2749
  render() {
2734
- return this.helpUrl && Yt(this.helpUrl) ? n`
2750
+ return this.helpUrl && Zt(this.helpUrl) ? n`
2735
2751
  <a href=${this.helpUrl} rel="noopener noreferrer" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")}>
2736
- <span class="ga-icon">${j(Ze)}</span>
2752
+ <span class="ga-icon">${N(Ze)}</span>
2737
2753
  </a>
2738
2754
  ` : n`
2739
2755
  <button type="button" class="ga-button ga-button--secondary ga-button--icon-only" aria-label=${x("Help")} @click=${this._handleClick}>
2740
- <span class="ga-icon">${j(Ze)}</span>
2756
+ <span class="ga-icon">${N(Ze)}</span>
2741
2757
  </button>
2742
2758
  `;
2743
2759
  }
2744
2760
  };
2745
- N([s({ attribute: "help-url" })], Xt.prototype, "helpUrl", void 0), Xt = N([S(), o("vsn-help")], Xt);
2761
+ F([s({ attribute: "help-url" })], Qt.prototype, "helpUrl", void 0), Qt = F([S(), o("vsn-help")], Qt);
2746
2762
  //#endregion
2747
2763
  //#region src/components/vsn-top-bar/vsn-top-bar.ts
2748
2764
  var Q = class extends e {
@@ -2750,7 +2766,7 @@ var Q = class extends e {
2750
2766
  super(...e), this.modules = [], this.feedback = null, this.showHelp = !1, this.showNotification = !1, this.notificationActive = !1, this.lang = "en";
2751
2767
  }
2752
2768
  willUpdate(e) {
2753
- e.has("lang") && Bt(this.lang).catch(console.error);
2769
+ e.has("lang") && Vt(this.lang).catch(console.error);
2754
2770
  }
2755
2771
  focusMenuToggle() {
2756
2772
  this.renderRoot.querySelector("vsn-menu-toggle")?.focus();
@@ -2852,26 +2868,28 @@ var Q = class extends e {
2852
2868
  `;
2853
2869
  }
2854
2870
  };
2855
- N([s({ attribute: !1 })], Q.prototype, "tree", void 0), N([s({ type: Array })], Q.prototype, "modules", void 0), N([s()], Q.prototype, "activeModuleId", void 0), N([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), N([s({ attribute: !1 })], Q.prototype, "feedback", void 0), N([s({ attribute: !1 })], Q.prototype, "auth", void 0), N([s({
2871
+ F([s({ attribute: !1 })], Q.prototype, "tree", void 0), F([s({ type: Array })], Q.prototype, "modules", void 0), F([s()], Q.prototype, "activeModuleId", void 0), F([s({ attribute: "landing-page-url" })], Q.prototype, "landingPageUrl", void 0), F([s({ attribute: !1 })], Q.prototype, "feedback", void 0), F([s({ attribute: !1 })], Q.prototype, "auth", void 0), F([s({
2856
2872
  type: Boolean,
2857
2873
  attribute: "show-help"
2858
- })], Q.prototype, "showHelp", void 0), N([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), N([s({
2874
+ })], Q.prototype, "showHelp", void 0), F([s({ attribute: "help-url" })], Q.prototype, "helpUrl", void 0), F([s({
2859
2875
  type: Boolean,
2860
2876
  attribute: "show-notification"
2861
- })], Q.prototype, "showNotification", void 0), N([s({
2877
+ })], Q.prototype, "showNotification", void 0), F([s({
2862
2878
  type: Boolean,
2863
2879
  attribute: "notification-active"
2864
- })], Q.prototype, "notificationActive", void 0), N([s()], Q.prototype, "lang", void 0), Q = N([o("vsn-top-bar")], Q);
2880
+ })], Q.prototype, "notificationActive", void 0), F([s()], Q.prototype, "lang", void 0), Q = F([o("vsn-top-bar")], Q);
2865
2881
  //#endregion
2866
2882
  //#region src/components/vsn-navigation.ts
2867
2883
  var $ = class extends e {
2868
2884
  constructor(...e) {
2869
- super(...e), this.lang = "en", this.showHelp = !1, this.feedback = null, this.showNotification = !1, this.notificationActive = !1, this._currentItem = "", this._sideBarOpen = !1, this._resolvedModules = [], this._modulesLoading = !1, this._modulesLoadToken = 0, this._restoreFocusToToggle = !1, this._onShortcut = (e) => {
2870
- !Pe(e) || e.key.toLowerCase() !== "k" || (e.preventDefault(), this._openAndFocusSearch());
2871
- }, this._onDocEscape = (e) => {
2872
- if (e.key !== "Escape" || !this._sideBarOpen) return;
2873
- let t = document.activeElement;
2874
- t && t !== document.body || (this._closeSideBar(), this._restoreFocusToToggle = !0);
2885
+ super(...e), this.lang = "en", this.showHelp = !1, this.feedback = null, this.showNotification = !1, this.notificationActive = !1, this.open = !1, this._currentItem = "", this._resolvedModules = [], this._modulesLoading = !1, this._modulesLoadToken = 0, this._restoreFocusToToggle = !1, this._onShortcut = (e) => {
2886
+ e.defaultPrevented || !Pe(e) || e.key.toLowerCase() !== "k" || (e.preventDefault(), this.dispatchEvent(new CustomEvent("vsn-open", {
2887
+ cancelable: !0,
2888
+ bubbles: !0,
2889
+ composed: !0
2890
+ })) && this._openAndFocusSearch());
2891
+ }, this._onEscape = (e) => {
2892
+ e.defaultPrevented || this.open && M(e) && e.key === "Escape" && (e.preventDefault(), this.open = !1);
2875
2893
  };
2876
2894
  }
2877
2895
  _resolveModules() {
@@ -2938,29 +2956,32 @@ var $ = class extends e {
2938
2956
  };
2939
2957
  }
2940
2958
  _onToggleSideBar() {
2941
- this._sideBarOpen ? this._closeSideBar() : this._openAndFocusSearch();
2959
+ this.open ? this._closeSideBar() : this._openAndFocusSearch();
2942
2960
  }
2943
2961
  _openAndFocusSearch() {
2944
- this._sideBarOpen = !0, this.updateComplete.then(() => this.renderRoot.querySelector("vsn-side-bar")?.focusSearch());
2945
- }
2946
- _onSideBarClose() {
2947
- this._closeSideBar();
2962
+ this.open = !0, this.updateComplete.then(() => this.renderRoot.querySelector("vsn-side-bar")?.focusSearch());
2948
2963
  }
2949
2964
  _closeSideBar() {
2950
- let e = this.renderRoot.querySelector("vsn-side-bar");
2951
- this._restoreFocusToToggle = e?.matches(":focus-within") ?? !1, this._sideBarOpen = !1;
2965
+ this.open = !1;
2966
+ }
2967
+ update(e) {
2968
+ if (e.has("open") && e.get("open") && !this.open) {
2969
+ let e = this.renderRoot.querySelector("vsn-side-bar");
2970
+ this._restoreFocusToToggle = e?.matches(":focus-within") ?? !1;
2971
+ }
2972
+ super.update(e);
2952
2973
  }
2953
2974
  updated(e) {
2954
- e.has("_sideBarOpen") && e.get("_sideBarOpen") && !this._sideBarOpen && this._restoreFocusToToggle && this.renderRoot.querySelector("vsn-top-bar")?.focusMenuToggle();
2975
+ e.has("open") && e.get("open") && !this.open && this._restoreFocusToToggle && this.renderRoot.querySelector("vsn-top-bar")?.focusMenuToggle();
2955
2976
  }
2956
2977
  connectedCallback() {
2957
- super.connectedCallback(), document.addEventListener("keydown", this._onShortcut), document.addEventListener("keydown", this._onDocEscape);
2978
+ super.connectedCallback(), document.addEventListener("keydown", this._onShortcut), document.addEventListener("keydown", this._onEscape);
2958
2979
  }
2959
2980
  disconnectedCallback() {
2960
- document.removeEventListener("keydown", this._onShortcut), document.removeEventListener("keydown", this._onDocEscape), super.disconnectedCallback();
2981
+ document.removeEventListener("keydown", this._onShortcut), document.removeEventListener("keydown", this._onEscape), super.disconnectedCallback();
2961
2982
  }
2962
2983
  _onTopBarClick(e) {
2963
- this._sideBarOpen && (e.composedPath().some((e) => e.tagName?.toUpperCase() === "VSN-MENU-TOGGLE") || this._closeSideBar());
2984
+ this.open && (e.composedPath().some((e) => e.tagName?.toUpperCase() === "VSN-MENU-TOGGLE") || (this.open = !1));
2964
2985
  }
2965
2986
  render() {
2966
2987
  return n`
@@ -2978,7 +2999,7 @@ var $ = class extends e {
2978
2999
  ?notification-active=${this.notificationActive}
2979
3000
  @toggle-side-bar=${this._onToggleSideBar}
2980
3001
  @click=${this._onTopBarClick}
2981
- @vsn-breadcrumb-dropdown-open=${this._onSideBarClose}
3002
+ @vsn-breadcrumb-dropdown-open=${this._closeSideBar}
2982
3003
  >
2983
3004
  <slot name="context-selector" slot="context-selector"></slot>
2984
3005
  </vsn-top-bar>
@@ -2991,8 +3012,8 @@ var $ = class extends e {
2991
3012
  .activeModuleLabel=${this.modules?.activeModuleLabel}
2992
3013
  .modulesLoading=${this._modulesLoading}
2993
3014
  .auth=${this.auth}
2994
- ?open=${this._sideBarOpen}
2995
- @vsn-side-bar-close=${this._onSideBarClose}
3015
+ ?open=${this.open}
3016
+ @vsn-side-bar-close=${this._closeSideBar}
2996
3017
  >
2997
3018
  <slot name="nav-footer" slot="nav-footer"></slot>
2998
3019
  </vsn-side-bar>
@@ -3003,15 +3024,19 @@ var $ = class extends e {
3003
3024
  `;
3004
3025
  }
3005
3026
  };
3006
- N([s()], $.prototype, "lang", void 0), N([s({ attribute: !1 })], $.prototype, "tree", void 0), N([s({ attribute: !1 })], $.prototype, "modules", void 0), N([s({ attribute: !1 })], $.prototype, "auth", void 0), N([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), N([s({
3027
+ F([s()], $.prototype, "lang", void 0), F([s({ attribute: !1 })], $.prototype, "tree", void 0), F([s({ attribute: !1 })], $.prototype, "modules", void 0), F([s({ attribute: !1 })], $.prototype, "auth", void 0), F([s({ attribute: "landing-page-url" })], $.prototype, "landingPageUrl", void 0), F([s({
3007
3028
  type: Boolean,
3008
3029
  attribute: "show-help"
3009
- })], $.prototype, "showHelp", void 0), N([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), N([s({ attribute: !1 })], $.prototype, "feedback", void 0), N([s({
3030
+ })], $.prototype, "showHelp", void 0), F([s({ attribute: "help-url" })], $.prototype, "helpUrl", void 0), F([s({ attribute: !1 })], $.prototype, "feedback", void 0), F([s({
3010
3031
  type: Boolean,
3011
3032
  attribute: "show-notification"
3012
- })], $.prototype, "showNotification", void 0), N([s({
3033
+ })], $.prototype, "showNotification", void 0), F([s({
3013
3034
  type: Boolean,
3014
3035
  attribute: "notification-active"
3015
- })], $.prototype, "notificationActive", void 0), N([l()], $.prototype, "_currentItem", void 0), N([l()], $.prototype, "_sideBarOpen", void 0), N([l()], $.prototype, "_resolvedModules", void 0), N([l()], $.prototype, "_modulesLoading", void 0), $ = N([o("vsn-navigation")], $);
3036
+ })], $.prototype, "notificationActive", void 0), F([s({
3037
+ type: Boolean,
3038
+ attribute: "open",
3039
+ reflect: !0
3040
+ })], $.prototype, "open", void 0), F([l()], $.prototype, "_currentItem", void 0), F([l()], $.prototype, "_resolvedModules", void 0), F([l()], $.prototype, "_modulesLoading", void 0), $ = F([o("vsn-navigation")], $);
3016
3041
  //#endregion
3017
3042
  export { v as SearchError, $ as VSNNavigation, g as isTreeLeaf, _ as isTreeParent };