weg-shared-layout 0.0.52 → 0.0.53

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.
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h, c as createEvent, g as getElement } from './index-B5Q4zIrC.js';
1
+ import { r as registerInstance, h, c as createEvent, g as getElement, H as Host } from './index-DeWUZGfb.js';
2
2
 
3
3
  const LINK_TARGETS = new Set(['_blank', '_self', '_parent', '_top']);
4
4
  function parseJsonProp(value) {
@@ -375,13 +375,10 @@ const LOGO_SRC = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAFcCAYAAACQ
375
375
 
376
376
  const sharedCss = () => `:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}:root,:host{--weg-container-breakpoint-sm:40rem;--weg-container-breakpoint-md:48rem;--weg-container-breakpoint-lg:64rem;--weg-container-breakpoint-xl:80rem;--weg-container-breakpoint-2xl:86rem;--weg-container-max-vw:95vw;--weg-container-padding-inline:1rem}@media (width >= 48rem){:root,:host{--weg-container-padding-inline:2rem}}.container{width:100%;max-width:var(--weg-container-max-vw);margin-inline:auto;padding-inline:var(--weg-container-padding-inline)}@media (width >= 40rem){.container{max-width:min(var(--weg-container-breakpoint-sm), var(--weg-container-max-vw))}}@media (width >= 48rem){.container{max-width:min(var(--weg-container-breakpoint-md), var(--weg-container-max-vw))}}@media (width >= 64rem){.container{max-width:min(var(--weg-container-breakpoint-lg), var(--weg-container-max-vw))}}@media (width >= 80rem){.container{max-width:min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw))}}@media (width >= 86rem){.container{max-width:min(var(--weg-container-breakpoint-xl), var(--weg-container-max-vw))}}*,*::before,*::after{box-sizing:border-box}:host{display:block;--weg-font-family:ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';--weg-color-accent:#948eeb;--weg-purple-200:#cdcff8}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}`;
377
377
 
378
- const wegHeaderCss = () => `:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}.weg-header-shell{display:contents}.skip-to-content{position:fixed;top:-100%;left:0;z-index:10001;padding:0.75rem 1rem;background:#ffffff;color:#0f172a;font-family:var(--weg-font-family);font-weight:600;text-decoration:none;border:2px solid #312e81;border-radius:0 0 0.25rem 0;box-shadow:0 0.25rem 0.75rem rgba(17, 24, 39, 0.15)}.skip-to-content:focus,.skip-to-content:focus-visible{top:0;outline:2px solid var(--weg-color-accent);outline-offset:2px}.header{width:100%;border-bottom:2px solid var(--weg-color-accent);background:#ffffff;color:#0f172a;font-family:var(--weg-font-family)}@media (width >= 960px){.header{border-bottom-width:0.25rem}}:host{position:relative;z-index:20;display:block;height:var(--weg-header-height, auto)}.header--fixed{position:fixed;top:0;left:0;right:0;z-index:20;transform:translateY(0);transition:transform 0.25s ease}.header--fixed.header--hidden{transform:translateY(-100%)}@media (prefers-reduced-motion: reduce){.header--fixed{transition:none}}.header--menu-open{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;overflow:hidden}.header--menu-open .header-inner{flex:1 1 auto;flex-wrap:wrap;align-content:flex-start;min-height:0}.header--menu-open .main-nav-panel{display:block;flex:1 1 100%;width:100%;min-height:0;overflow-y:auto;border-top:1px solid #d8d4f7}@media (width >= 960px){.header--menu-open{position:static;inset:auto;z-index:auto;display:block;overflow:visible}.header--menu-open .header-inner{flex:unset;flex-wrap:nowrap;align-content:unset;min-height:unset}}.logo-link{display:inline-flex;align-items:center;text-decoration:none;outline:none}.logo-link:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:4px;border-radius:4px}.logo{height:2.5rem;width:auto}@media (width >= 960px){.logo{height:3rem}}@media (width >= 1280px){.logo{height:5rem}}.header-inner{display:flex;width:100%;min-width:0;align-items:center;justify-content:space-between;gap:0.75rem;padding-block:0.75rem;padding-inline:var(--weg-container-padding-inline)}@media (width >= 960px){.header-inner{flex-wrap:nowrap;gap:1.5rem;padding-block:1.25rem}}@media (width >= 1440px){.header-inner{padding-block:1.75rem}}.header-inner .logo-link{flex:1 1 auto;min-width:0;justify-content:center}@media (width >= 960px){.header-inner .logo-link{flex:0 0 auto;justify-content:flex-start}}.header-inner .logo{max-width:100%}.header-actions{display:flex;align-items:center;flex-shrink:0}@media (width >= 960px){.header-actions{display:none}}.main-nav-panel{display:none;margin-inline:-0.5rem}@media (width >= 960px){.main-nav-panel{display:flex;flex:1 1 auto;width:auto;min-width:0;justify-content:flex-end;overflow:visible;border-top:none}}.main-nav{padding:0 0 1.5rem}@media (width >= 960px){.main-nav{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:1rem;padding:0}}.main-nav__list{list-style:none;margin:0;padding:0}@media (width >= 960px){.main-nav__list{display:flex;align-items:center;flex-wrap:wrap;gap:0.5rem}}@media (width >= 1280px){.main-nav__list{gap:1.5rem}}.main-nav__item{border-bottom:1px solid #d8d4f7}@media (width >= 960px){.main-nav__item{border-bottom:none}}.main-nav__item--dropdown{position:static}.nav-dropdown{position:relative}.nav-link{display:block;width:100%;padding:1rem;font-weight:600;color:inherit;text-decoration:none;outline:none}.nav-link:hover{opacity:0.85}.nav-link:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px;border-radius:4px}.nav-link--active{background:var(--weg-purple-200)}.nav-dropdown__trigger{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;width:100%;padding:1rem;border:none;background:transparent;font:inherit;font-weight:600;color:inherit;text-align:left;cursor:pointer;outline:none}.nav-dropdown__trigger:hover{opacity:0.85}.nav-dropdown__trigger:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px;border-radius:4px}.nav-dropdown__trigger--open{background:transparent}.nav-dropdown__trigger--active{background:var(--weg-purple-200)}.toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:999rem;background:#312e81;color:#ffffff;flex-shrink:0}.nav-dropdown__panel{padding:0 0 0.75rem}@media (width >= 960px){.nav-dropdown__panel{position:absolute;top:calc(100% + 0.5rem);left:0;z-index:500;min-width:17.5rem;padding:0.75rem 0 0.75rem 0.75rem;border:1px solid #e2e8f0;border-radius:0.5rem;background:#f8fafc;box-shadow:0 0.25rem 1rem rgba(15, 23, 42, 0.08)}.nav-dropdown__panel::before{content:'';position:absolute;top:-0.5rem;left:0;right:0;height:0.5rem}}.nav-dropdown__accent{border-left:0.25rem solid var(--weg-color-accent);padding-left:0.75rem}.nav-dropdown__links{display:flex;flex-direction:column;gap:0.25rem;list-style:none;margin:0;padding:0}.nav-dropdown__link{display:block;padding:0.625rem 0;font-weight:400;color:inherit;text-decoration:none;outline:none}.nav-dropdown__link:hover{opacity:0.85}.nav-dropdown__link:focus-visible{outline:0.125rem solid var(--weg-color-accent);outline-offset:0.125rem;border-radius:0.25rem}.nav-dropdown__link--active{background:var(--weg-purple-200)}@media (width >= 960px){.nav-dropdown__link{padding:0.5rem;margin-right:0.75rem;border-radius:0.5rem;font-weight:600}.nav-dropdown__link:hover,.nav-dropdown__link:focus-visible{background:var(--weg-purple-200);opacity:1}.nav-dropdown__link--active{opacity:1}}@media (width >= 1280px){.nav-dropdown__link{padding:0.5rem 0.75rem}}.main-nav__item--auth>a{display:flex;align-items:center;gap:0.5rem;width:100%;padding:1rem}@media (width >= 960px){.nav-link,.nav-dropdown__trigger,.main-nav__item--auth>a{display:inline-flex;align-items:center;width:auto;padding:0.5rem;border-radius:0.5rem}.nav-link--active,.main-nav__item--auth>a.nav-link--active{background:var(--weg-purple-200)}.nav-dropdown__trigger{gap:0.5rem;cursor:pointer}.nav-dropdown__trigger--open{background:#f1f5f9}.nav-dropdown__trigger--active{background:var(--weg-purple-200)}}@media (width >= 1280px){.main-nav{font-size:1.25rem}.main-nav__item--auth>a{padding:0.5rem 0.75rem}}.sign-in-link,.sign-out-link,.auth-button{display:inline-flex;align-items:center;gap:0.5rem;font-weight:600;color:inherit;text-decoration:none;outline:none}.auth-button{padding:0;border:none;background:transparent;font:inherit;cursor:pointer}.sign-in-link:hover,.sign-out-link:hover,.auth-button:hover{opacity:0.85}.sign-in-link:focus-visible,.sign-out-link:focus-visible,.auth-button:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:4px;border-radius:4px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;padding:0;border:none;border-radius:0.5rem;background:transparent;color:inherit;cursor:pointer;text-decoration:none;outline:none}.icon-button:hover{background:#f1f5f9}.icon-button:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px}.menu-toggle{flex-shrink:0}@media (width >= 960px){.menu-toggle{display:none}}`;
378
+ const wegHeaderCss = () => `:host{--weg-breakpoint-sm:640px;--weg-breakpoint-md:960px;--weg-breakpoint-lg:1280px;--weg-breakpoint-xl:1440px}.weg-header-shell{display:contents}:host{display:block}:host(.weg-header--scroll-mode){min-height:4.25rem}@media (width >= 960px){:host(.weg-header--scroll-mode){min-height:5.75rem}}@media (width >= 1280px){:host(.weg-header--scroll-mode){min-height:7.75rem}}@media (width >= 1440px){:host(.weg-header--scroll-mode){min-height:8.75rem}}.skip-to-content{position:fixed;top:-100%;left:0;z-index:10001;padding:0.75rem 1rem;background:#ffffff;color:#0f172a;font-family:var(--weg-font-family);font-weight:600;text-decoration:none;border:2px solid #312e81;border-radius:0 0 0.25rem 0;box-shadow:0 0.25rem 0.75rem rgba(17, 24, 39, 0.15)}.skip-to-content:focus,.skip-to-content:focus-visible{top:0;outline:2px solid var(--weg-color-accent);outline-offset:2px}.header{width:100%;position:relative;z-index:1000;transition:transform 0.25s ease;border-bottom:2px solid var(--weg-color-accent);background:#ffffff;color:#0f172a;font-family:var(--weg-font-family)}.header--scroll-mode{position:fixed;top:0;left:0;right:0}.header--scroll-hidden{transform:translateY(-100%)}.header:not(.header--scroll-mode).header--scroll-hidden{transform:none}@media (prefers-reduced-motion: reduce){.header{transition:none}}@media (width >= 960px){.header{border-bottom-width:0.25rem}}.header--menu-open{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;transform:none;display:flex;flex-direction:column;overflow:hidden}.header--menu-open .header-inner{flex:1 1 auto;flex-wrap:wrap;align-content:flex-start;min-height:0}.header--menu-open .main-nav-panel{display:block;flex:1 1 100%;width:100%;min-height:0;overflow-y:auto;border-top:1px solid #d8d4f7}@media (width >= 960px){.header--menu-open{position:static;inset:auto;z-index:auto;display:block;overflow:visible}.header--menu-open .header-inner{flex:unset;flex-wrap:nowrap;align-content:unset;min-height:unset}}.logo-link{display:inline-flex;align-items:center;text-decoration:none;outline:none}.logo-link:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:4px;border-radius:4px}.logo{height:2.5rem;width:auto}@media (width >= 960px){.logo{height:3rem}}@media (width >= 1280px){.logo{height:5rem}}.header-inner{display:flex;width:100%;min-width:0;align-items:center;justify-content:space-between;gap:0.75rem;padding-block:0.75rem;padding-inline:var(--weg-container-padding-inline)}@media (width >= 960px){.header-inner{flex-wrap:nowrap;gap:1.5rem;padding-block:1.25rem}}@media (width >= 1440px){.header-inner{padding-block:1.75rem}}.header-inner .logo-link{flex:1 1 auto;min-width:0;justify-content:center}@media (width >= 960px){.header-inner .logo-link{flex:0 0 auto;justify-content:flex-start}}.header-inner .logo{max-width:100%}.header-actions{display:flex;align-items:center;flex-shrink:0}@media (width >= 960px){.header-actions{display:none}}.main-nav-panel{display:none;margin-inline:-0.5rem}@media (width >= 960px){.main-nav-panel{display:flex;flex:1 1 auto;width:auto;min-width:0;justify-content:flex-end;overflow:visible;border-top:none}}.main-nav{padding:0 0 1.5rem}@media (width >= 960px){.main-nav{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:1rem;padding:0}}.main-nav__list{list-style:none;margin:0;padding:0}@media (width >= 960px){.main-nav__list{display:flex;align-items:center;flex-wrap:wrap;gap:0.5rem}}@media (width >= 1280px){.main-nav__list{gap:1.5rem}}.main-nav__item{border-bottom:1px solid #d8d4f7}@media (width >= 960px){.main-nav__item{border-bottom:none}}.main-nav__item--dropdown{position:static}.nav-dropdown{position:relative}.nav-link{display:block;width:100%;padding:1rem;font-weight:600;color:inherit;text-decoration:none;outline:none}.nav-link:hover{opacity:0.85}.nav-link:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px;border-radius:4px}.nav-link--active{background:var(--weg-purple-200)}.nav-dropdown__trigger{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;width:100%;padding:1rem;border:none;background:transparent;font:inherit;font-weight:600;color:inherit;text-align:left;cursor:pointer;outline:none}.nav-dropdown__trigger:hover{opacity:0.85}.nav-dropdown__trigger:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px;border-radius:4px}.nav-dropdown__trigger--open{background:transparent}.nav-dropdown__trigger--active{background:var(--weg-purple-200)}.toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:999rem;background:#312e81;color:#ffffff;flex-shrink:0}.nav-dropdown__panel{padding:0 0 0.75rem}@media (width >= 960px){.nav-dropdown__panel{position:absolute;top:calc(100% + 0.5rem);left:0;z-index:500;min-width:17.5rem;padding:0.75rem 0 0.75rem 0.75rem;border:1px solid #e2e8f0;border-radius:0.5rem;background:#f8fafc;box-shadow:0 0.25rem 1rem rgba(15, 23, 42, 0.08)}.nav-dropdown__panel::before{content:'';position:absolute;top:-0.5rem;left:0;right:0;height:0.5rem}}.nav-dropdown__accent{border-left:0.25rem solid var(--weg-color-accent);padding-left:0.75rem}.nav-dropdown__links{display:flex;flex-direction:column;gap:0.25rem;list-style:none;margin:0;padding:0}.nav-dropdown__link{display:block;padding:0.625rem 0;font-weight:400;color:inherit;text-decoration:none;outline:none}.nav-dropdown__link:hover{opacity:0.85}.nav-dropdown__link:focus-visible{outline:0.125rem solid var(--weg-color-accent);outline-offset:0.125rem;border-radius:0.25rem}.nav-dropdown__link--active{background:var(--weg-purple-200)}@media (width >= 960px){.nav-dropdown__link{padding:0.5rem;margin-right:0.75rem;border-radius:0.5rem;font-weight:600}.nav-dropdown__link:hover,.nav-dropdown__link:focus-visible{background:var(--weg-purple-200);opacity:1}.nav-dropdown__link--active{opacity:1}}@media (width >= 1280px){.nav-dropdown__link{padding:0.5rem 0.75rem}}.main-nav__item--auth>a{display:flex;align-items:center;gap:0.5rem;width:100%;padding:1rem}@media (width >= 960px){.nav-link,.nav-dropdown__trigger,.main-nav__item--auth>a{display:inline-flex;align-items:center;width:auto;padding:0.5rem;border-radius:0.5rem}.nav-link--active,.main-nav__item--auth>a.nav-link--active{background:var(--weg-purple-200)}.nav-dropdown__trigger{gap:0.5rem;cursor:pointer}.nav-dropdown__trigger--open{background:#f1f5f9}.nav-dropdown__trigger--active{background:var(--weg-purple-200)}}@media (width >= 1280px){.main-nav{font-size:1.25rem}.main-nav__item--auth>a{padding:0.5rem 0.75rem}}.sign-in-link,.sign-out-link,.auth-button{display:inline-flex;align-items:center;gap:0.5rem;font-weight:600;color:inherit;text-decoration:none;outline:none}.auth-button{padding:0;border:none;background:transparent;font:inherit;cursor:pointer}.sign-in-link:hover,.sign-out-link:hover,.auth-button:hover{opacity:0.85}.sign-in-link:focus-visible,.sign-out-link:focus-visible,.auth-button:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:4px;border-radius:4px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;padding:0;border:none;border-radius:0.5rem;background:transparent;color:inherit;cursor:pointer;text-decoration:none;outline:none}.icon-button:hover{background:#f1f5f9}.icon-button:focus-visible{outline:2px solid var(--weg-color-accent);outline-offset:2px}.menu-toggle{flex-shrink:0}@media (width >= 960px){.menu-toggle{display:none}}`;
379
379
 
380
380
  const WEG_HOME = 'https://www.warwickemploymentgroup.com';
381
381
  const DEFAULT_ACCOUNT_HOME = 'https://account.warwickemploymentgroup.com';
382
- /** Stay visible while scrolling down through the first half of the viewport. */
383
- const HEADER_SCROLL_HIDE_THRESHOLD_VH = 0.5;
384
- const HEADER_SCROLL_DIRECTION_DELTA = 5;
385
382
  const DEFAULT_LOGO_HREF = `${WEG_HOME}/`;
386
383
  /** Placeholder href — sign-out is handled via `wegAuthClick`, not navigation. */
387
384
  const SIGN_OUT_HREF = '#';
@@ -487,6 +484,7 @@ const WegHeader = class {
487
484
  registerInstance(this, hostRef);
488
485
  this.wegAuthClick = createEvent(this, "wegAuthClick");
489
486
  }
487
+ static SCROLL_REVEAL_VIEWPORT_FRACTION = 0.5;
490
488
  /**
491
489
  * Layout payload, supplied by the host application.
492
490
  *
@@ -531,20 +529,19 @@ const WegHeader = class {
531
529
  resolved = EMPTY_HEADER;
532
530
  menuOpen = false;
533
531
  openDropdown = null;
534
- headerHidden = false;
535
532
  boundHandleDocumentClick = this.handleDocumentClick.bind(this);
536
533
  boundHandleViewportChange = this.handleViewportChange.bind(this);
537
534
  boundHandleHoverCapabilityChange = this.handleHoverCapabilityChange.bind(this);
538
535
  boundHandleScroll = this.handleScroll.bind(this);
539
- headerResizeObserver;
540
- lastScrollY = 0;
541
- scrollTicking = false;
542
536
  bodyScrollLocked = false;
543
537
  bodyScrollLockY = 0;
544
538
  hoverCloseTimer = null;
545
539
  hoverOpenEnabled = false;
546
540
  desktopMediaQuery;
547
541
  hoverCapableMediaQuery;
542
+ headerScrollMode = false;
543
+ headerScrollHidden = false;
544
+ lastScrollY = 0;
548
545
  resolve() {
549
546
  if (this.layout === undefined || this.layout === null) {
550
547
  this.resolved = EMPTY_HEADER;
@@ -561,69 +558,25 @@ const WegHeader = class {
561
558
  this.updateHoverDropdownEnabled();
562
559
  this.handleViewportChange();
563
560
  }
564
- componentDidLoad() {
565
- const header = this.el.shadowRoot?.querySelector('.header');
566
- if (!header)
567
- return;
568
- this.headerResizeObserver = new ResizeObserver(() => this.syncHeaderHeight());
569
- this.headerResizeObserver.observe(header);
570
- this.syncHeaderHeight();
571
- this.lastScrollY = window.scrollY;
572
- this.updateHeaderVisibility();
573
- }
574
561
  connectedCallback() {
575
562
  document.addEventListener('click', this.boundHandleDocumentClick);
563
+ }
564
+ componentDidLoad() {
565
+ this.lastScrollY = Math.max(0, window.scrollY);
576
566
  window.addEventListener('scroll', this.boundHandleScroll, { passive: true });
567
+ this.applyScrollState();
568
+ }
569
+ componentDidRender() {
570
+ this.applyScrollState();
577
571
  }
578
572
  disconnectedCallback() {
579
573
  document.removeEventListener('click', this.boundHandleDocumentClick);
580
574
  window.removeEventListener('scroll', this.boundHandleScroll);
581
575
  this.unlockBodyScroll();
582
- this.headerResizeObserver?.disconnect();
583
576
  this.desktopMediaQuery?.removeEventListener('change', this.boundHandleViewportChange);
584
577
  this.hoverCapableMediaQuery?.removeEventListener('change', this.boundHandleHoverCapabilityChange);
585
578
  this.cancelScheduledDropdownClose();
586
579
  }
587
- syncHeaderHeight() {
588
- if (this.isMobileMenuActive())
589
- return;
590
- const header = this.el.shadowRoot?.querySelector('.header');
591
- if (!header)
592
- return;
593
- this.el.style.setProperty('--weg-header-height', `${header.offsetHeight}px`);
594
- }
595
- handleScroll() {
596
- if (this.scrollTicking)
597
- return;
598
- this.scrollTicking = true;
599
- requestAnimationFrame(() => {
600
- this.scrollTicking = false;
601
- this.updateHeaderVisibility();
602
- });
603
- }
604
- updateHeaderVisibility() {
605
- if (this.isMobileMenuActive()) {
606
- if (this.headerHidden)
607
- this.headerHidden = false;
608
- return;
609
- }
610
- const scrollY = window.scrollY;
611
- const delta = scrollY - this.lastScrollY;
612
- const threshold = window.innerHeight * HEADER_SCROLL_HIDE_THRESHOLD_VH;
613
- let nextHidden = this.headerHidden;
614
- if (scrollY <= threshold) {
615
- nextHidden = false;
616
- }
617
- else if (Math.abs(delta) >= HEADER_SCROLL_DIRECTION_DELTA) {
618
- nextHidden = delta > 0;
619
- }
620
- this.lastScrollY = scrollY;
621
- if (nextHidden === this.headerHidden)
622
- return;
623
- if (nextHidden)
624
- this.closeDropdown();
625
- this.headerHidden = nextHidden;
626
- }
627
580
  /**
628
581
  * Desktop dropdowns open on hover when viewport is md+ and the device reports hover support.
629
582
  * Uses (hover: hover) only — not (pointer: fine), which breaks in DevTools and hybrid devices.
@@ -712,6 +665,65 @@ const WegHeader = class {
712
665
  isMobileMenuActive() {
713
666
  return this.menuOpen && !this.desktopMediaQuery?.matches;
714
667
  }
668
+ handleScroll() {
669
+ this.applyScrollState();
670
+ }
671
+ applyScrollState() {
672
+ if (this.isMobileMenuActive()) {
673
+ if (this.headerScrollHidden) {
674
+ this.headerScrollHidden = false;
675
+ }
676
+ if (this.headerScrollMode) {
677
+ this.headerScrollMode = false;
678
+ }
679
+ this.lastScrollY = Math.max(0, window.scrollY);
680
+ return;
681
+ }
682
+ const scrollY = Math.max(0, window.scrollY);
683
+ const threshold = this.getScrollRevealThreshold();
684
+ const pastRevealThreshold = scrollY >= threshold;
685
+ let nextScrollMode = this.headerScrollMode;
686
+ let nextHidden = this.headerScrollHidden;
687
+ if (!pastRevealThreshold) {
688
+ if (scrollY === 0) {
689
+ nextScrollMode = false;
690
+ nextHidden = false;
691
+ }
692
+ else if (this.headerScrollMode && !this.headerScrollHidden) {
693
+ // Keep a revealed header pinned while scrolling up toward the top.
694
+ nextScrollMode = true;
695
+ nextHidden = scrollY > this.lastScrollY;
696
+ }
697
+ else {
698
+ nextScrollMode = false;
699
+ nextHidden = false;
700
+ }
701
+ }
702
+ else if (scrollY === 0) {
703
+ nextScrollMode = false;
704
+ nextHidden = false;
705
+ }
706
+ else {
707
+ nextScrollMode = true;
708
+ if (scrollY > this.lastScrollY) {
709
+ nextHidden = true;
710
+ }
711
+ else if (scrollY < this.lastScrollY) {
712
+ nextHidden = false;
713
+ }
714
+ }
715
+ this.lastScrollY = scrollY;
716
+ if (nextScrollMode !== this.headerScrollMode) {
717
+ this.headerScrollMode = nextScrollMode;
718
+ }
719
+ if (nextHidden !== this.headerScrollHidden) {
720
+ this.headerScrollHidden = nextHidden;
721
+ }
722
+ }
723
+ getScrollRevealThreshold() {
724
+ const viewportHeight = window.visualViewport?.height ?? window.innerHeight;
725
+ return viewportHeight * WegHeader.SCROLL_REVEAL_VIEWPORT_FRACTION;
726
+ }
715
727
  watchLayout() {
716
728
  this.resolve();
717
729
  }
@@ -921,7 +933,6 @@ const WegHeader = class {
921
933
  }
922
934
  openMenu() {
923
935
  this.menuOpen = true;
924
- this.headerHidden = false;
925
936
  this.closeDropdown();
926
937
  if (!this.desktopMediaQuery?.matches) {
927
938
  this.lockBodyScroll();
@@ -936,8 +947,6 @@ const WegHeader = class {
936
947
  this.menuOpen = false;
937
948
  this.closeDropdown();
938
949
  this.unlockBodyScroll();
939
- this.syncHeaderHeight();
940
- this.updateHeaderVisibility();
941
950
  if (announce && wasMobileActive) {
942
951
  this.announceToScreenReader(`${MAIN_NAV_LABEL} closed.`);
943
952
  }
@@ -1120,12 +1129,12 @@ const WegHeader = class {
1120
1129
  const logoSrc = this.getLogoSrc();
1121
1130
  const closeMenu = () => this.closeMenu();
1122
1131
  const mobileMenuActive = this.isMobileMenuActive();
1123
- return (h("div", { key: '7de9456349faccdc02caa1458af12361c509881f', class: "weg-header-shell" }, h("a", { key: 'a2c27545363d362bbdeb80d830b0b757a1090585', class: "skip-to-content", href: "#", title: SKIP_TO_CONTENT_LABEL, onClick: (event) => this.handleSkipToContent(event) }, SKIP_TO_CONTENT_LABEL), h("header", { key: '592fccf957ad7e29f3113143e853a2d0a0d84b25', class: {
1132
+ return (h(Host, { key: 'ce97dfe33ac5f2576e1172ead666cc3e60fea46b', class: { 'weg-header--scroll-mode': this.headerScrollMode } }, h("div", { key: '3f79d9212732577f5f701aabfcc8cc8bd0a45646', class: "weg-header-shell" }, h("a", { key: '520d8ac6ba79472a23b1e558b02cd1d3b26b60cd', class: "skip-to-content", href: "#", title: SKIP_TO_CONTENT_LABEL, onClick: (event) => this.handleSkipToContent(event) }, SKIP_TO_CONTENT_LABEL), h("header", { key: '949e5d1505ae2603490391412e1295703d10a930', class: {
1124
1133
  header: true,
1125
- 'header--fixed': !mobileMenuActive,
1126
- 'header--hidden': this.headerHidden && !mobileMenuActive,
1127
1134
  'header--menu-open': mobileMenuActive,
1128
- } }, h("div", { key: 'b36223997721eb185813831b34fe59efeb8d55c7', class: "header-inner" }, h("div", { key: '032b4e9682d9a271a8be93e0f11125a1ee673680', class: "sr-only", "aria-live": "polite", "aria-atomic": "true", "data-weg-sr-live": true }), h("button", { key: 'c74ea7c3cb31fb21aa7d976a615487d7121739eb', type: "button", class: "menu-toggle icon-button", "aria-label": mobileMenuActive ? CLOSE_MAIN_NAV_LABEL : OPEN_MAIN_NAV_LABEL, "aria-expanded": mobileMenuActive ? 'true' : 'false', "aria-controls": "weg-header-main-nav", onClick: () => this.toggleMenu() }, mobileMenuActive ? h(CloseIcon, null) : h(HamburgerIcon, null)), h(Logo, { key: '0107f366b4e69e7ceddc05715b06a110bb9f22bc', href: logoHref, src: logoSrc }), h("div", { key: '6e273b0ea6b4f9f8ee4533af7b6df1c10a91ed9b', class: "header-actions" }, this.renderCompactAuth(mobileMenuActive ? closeMenu : undefined)), h("div", { key: '5c06b9fa77e50e9357bc6f5d27805c895ec4ea0c', class: "main-nav-panel", id: "weg-header-main-nav", role: mobileMenuActive ? 'dialog' : undefined, "aria-modal": mobileMenuActive ? 'true' : undefined, "aria-label": mobileMenuActive ? MAIN_NAV_LABEL : undefined }, this.renderNav(mobileMenuActive ? closeMenu : undefined))))));
1135
+ 'header--scroll-mode': this.headerScrollMode,
1136
+ 'header--scroll-hidden': this.headerScrollHidden && this.headerScrollMode,
1137
+ } }, h("div", { key: 'f43fcc66f9bd450580b2dcfe03a7daf9b804e573', class: "header-inner" }, h("div", { key: '4366f0e0c617e42f07857db3343e5a4d489abe83', class: "sr-only", "aria-live": "polite", "aria-atomic": "true", "data-weg-sr-live": true }), h("button", { key: '4cce3ca0a8a13d182367294ae0223b6c17e7dcba', type: "button", class: "menu-toggle icon-button", "aria-label": mobileMenuActive ? CLOSE_MAIN_NAV_LABEL : OPEN_MAIN_NAV_LABEL, "aria-expanded": mobileMenuActive ? 'true' : 'false', "aria-controls": "weg-header-main-nav", onClick: () => this.toggleMenu() }, mobileMenuActive ? h(CloseIcon, null) : h(HamburgerIcon, null)), h(Logo, { key: 'a2508570f7f2edc2fb2ea93f2cce779e63396422', href: logoHref, src: logoSrc }), h("div", { key: 'dbcab901c9eb1bcad0e5b38e3440a63a70b3f7a6', class: "header-actions" }, this.renderCompactAuth(mobileMenuActive ? closeMenu : undefined)), h("div", { key: 'c6e48c4221bf8d0501c9960ac09857b4b3fcd521', class: "main-nav-panel", id: "weg-header-main-nav", role: mobileMenuActive ? 'dialog' : undefined, "aria-modal": mobileMenuActive ? 'true' : undefined, "aria-label": mobileMenuActive ? MAIN_NAV_LABEL : undefined }, this.renderNav(mobileMenuActive ? closeMenu : undefined)))))));
1129
1138
  }
1130
1139
  static get watchers() { return {
1131
1140
  "layout": [{
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-B5Q4zIrC.js';
2
- export { s as setNonce } from './index-B5Q4zIrC.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-DeWUZGfb.js';
2
+ export { s as setNonce } from './index-DeWUZGfb.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  /*
@@ -17,5 +17,5 @@ var patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(async (options) => {
19
19
  await globalScripts();
20
- return bootstrapLazy([["weg-footer_2",[[513,"weg-footer",{"layout":[1],"resolved":[32]},null,{"layout":[{"watchLayout":0}]}],[513,"weg-header",{"layout":[1],"signedIn":[516,"signed-in"],"userName":[1,"user-name"],"accountBaseUrl":[1,"account-base-url"],"currentPath":[1,"current-path"],"resolved":[32],"menuOpen":[32],"openDropdown":[32],"headerHidden":[32]},[[8,"keydown","handleKeyDown"]],{"layout":[{"watchLayout":0}]}]]]], options);
20
+ return bootstrapLazy([["weg-footer_2",[[513,"weg-footer",{"layout":[1],"resolved":[32]},null,{"layout":[{"watchLayout":0}]}],[513,"weg-header",{"layout":[1],"signedIn":[516,"signed-in"],"userName":[1,"user-name"],"accountBaseUrl":[1,"account-base-url"],"currentPath":[1,"current-path"],"resolved":[32],"menuOpen":[32],"openDropdown":[32],"headerScrollMode":[32],"headerScrollHidden":[32]},[[8,"keydown","handleKeyDown"]],{"layout":[{"watchLayout":0}]}]]]], options);
21
21
  });
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import type { LayoutData, LayoutHeaderAuthAction } from '../../types/layout-data';
3
3
  export declare class WegHeader {
4
+ private static readonly SCROLL_REVEAL_VIEWPORT_FRACTION;
4
5
  /**
5
6
  * Layout payload, supplied by the host application.
6
7
  *
@@ -47,28 +48,25 @@ export declare class WegHeader {
47
48
  private resolved;
48
49
  private menuOpen;
49
50
  private openDropdown;
50
- private headerHidden;
51
51
  private boundHandleDocumentClick;
52
52
  private boundHandleViewportChange;
53
53
  private boundHandleHoverCapabilityChange;
54
54
  private boundHandleScroll;
55
- private headerResizeObserver?;
56
- private lastScrollY;
57
- private scrollTicking;
58
55
  private bodyScrollLocked;
59
56
  private bodyScrollLockY;
60
57
  private hoverCloseTimer;
61
58
  private hoverOpenEnabled;
62
59
  private desktopMediaQuery?;
63
60
  private hoverCapableMediaQuery?;
61
+ private headerScrollMode;
62
+ private headerScrollHidden;
63
+ private lastScrollY;
64
64
  private resolve;
65
65
  componentWillLoad(): void;
66
- componentDidLoad(): void;
67
66
  connectedCallback(): void;
67
+ componentDidLoad(): void;
68
+ componentDidRender(): void;
68
69
  disconnectedCallback(): void;
69
- private syncHeaderHeight;
70
- private handleScroll;
71
- private updateHeaderVisibility;
72
70
  /**
73
71
  * Desktop dropdowns open on hover when viewport is md+ and the device reports hover support.
74
72
  * Uses (hover: hover) only — not (pointer: fine), which breaks in DevTools and hybrid devices.
@@ -87,6 +85,9 @@ export declare class WegHeader {
87
85
  private announceSubmenuExpanded;
88
86
  private announceSubmenuCollapsed;
89
87
  private isMobileMenuActive;
88
+ private handleScroll;
89
+ private applyScrollState;
90
+ private getScrollRevealThreshold;
90
91
  protected watchLayout(): void;
91
92
  handleKeyDown(event: KeyboardEvent): void;
92
93
  private lockBodyScroll;
@@ -1,2 +1,2 @@
1
- var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",o="value",l="serialized:";function s(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var i,r=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=s(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(e)?t[e]=n.l.get(e):void 0!==o&&(t[e]=o)}}))},c=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},u=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&r(t,n))},f=(t,n)=>n in t,a=(t,n)=>(0,console.error)(t,n),d=new Map,p=new Map,h="s-id",$="sty-id",v="c-id",m="http://www.w3.org/1999/xlink",y="undefined"!=typeof window?window:{},b={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},g=t=>Promise.resolve(t),w=(()=>{try{return!!y.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),j=!!w&&(()=>!!y.document&&Object.getOwnPropertyDescriptor(y.document.adoptedStyleSheets,"length").writable)(),S=!1,O=[],k=[],x=(t,n)=>e=>{t.push(e),S||(S=!0,n&&4&b.u?C(M):b.raf(M))},E=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){a(t)}t.length=0},M=()=>{E(O),E(k),(S=O.length>0)&&b.raf(M)},C=t=>g().then(t),N=x(k,!0);function I(){const t=this.attachShadow({mode:"open"});void 0===i&&(i=null),i&&(j?t.adoptedStyleSheets.push(i):t.adoptedStyleSheets=[...t.adoptedStyleSheets,i])}var L=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=A(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=A(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]};function A(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function D(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var R=new WeakMap,T=(t,n,e)=>{let o=p.get(t);w&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,p.set(t,o)},U=(t,n)=>{var e,o,l;const s=P(n),i=p.get(s);if(!y.document)return s;if(t=11===t.nodeType?t:y.document,i)if("string"==typeof i){let l,r=R.get(t=t.head||t);r||R.set(t,r=new Set);const c=t.querySelector(`[${$}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=y.document.createElement("style"),l.textContent=i;const c=null!=(e=b.h)?e:D(y.document);if(null!=c&&l.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(w){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),j?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let n=R.get(t);if(n||R.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}if(j?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s),"host"in t){const n=t.querySelector(`[${$}="${s}"]`);n&&N((()=>n.remove()))}}}return s},P=t=>"sc-"+t.$,V=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),H=t=>"object"==(t=typeof t)||"function"===t,_=(t,n,...e)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!H(o))&&(o+=""),s&&i?r[r.length-1].v+=o:r.push(s?z(null,o):o),i=s)};if(c(e),n){n.key&&(l=n.key);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,r,B);const u=z(t,null);return u.m=n,r.length>0&&(u.j=r),u.S=l,u},z=(t,n)=>({u:0,O:t,v:null!=n?n:null,k:null,j:null,m:null,S:null}),W={},B={forEach:(t,n)=>t.map(F).forEach(n),map:(t,n)=>t.map(F).map(n).map(q)},F=t=>({vattrs:t.m,vchildren:t.j,vkey:t.S,vname:t.M,vtag:t.O,vtext:t.v}),q=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),_(t.vtag,n,...t.vchildren||[])}const n=z(t.vtag,t.vtext);return n.m=t.vattrs,n.j=t.vchildren,n.S=t.vkey,n.M=t.vname,n},Y=(t,n,e,o,l,s,i,r=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(v),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=J({u:0,C:u[0],N:u[1],I:u[2],L:u[3],O:s.tagName.toLowerCase(),k:s,m:{class:s.className||""}}),n.push(f),s.removeAttribute(v),t.j||(t.j=[]);const l=f.k.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.O&&Z(l,u[2],f,s,t,n,e,o,r),f.k["s-sn"]=l,f.k.removeAttribute("s-sn")),void 0!==f.L&&(t.j[f.L]=f),t=f,o&&"0"===f.I&&(o[f.L]=f.k)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)Y(t,n,e,o,l,s.shadowRoot.childNodes[a],i,r);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)Y(t,n,e,o,l,d[a],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=J({C:u[1],N:u[2],I:u[3],L:u[4]||"0",k:s,m:null,j:null,S:null,M:null,O:null,v:null}),"t"===c?(f.k=Q(s,3),f.k&&3===f.k.nodeType&&(f.v=f.k.textContent,n.push(f),s.remove(),i===f.C&&(t.j||(t.j=[]),t.j[f.L]=f),o&&"0"===f.I&&(o[f.L]=f.k))):"c"===c?(f.k=Q(s,8),f.k&&8===f.k.nodeType&&(n.push(f),s.remove())):f.C===i&&("s"===c?Z(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,o,r):"r"===c&&o&&s.remove()));else if(t&&"style"===t.O){const n=z(null,s.textContent);n.k=s,n.L="0",t.j=[n]}return t},G=(t,n)=>{if(1===t.nodeType){const e=t[h]||t.getAttribute(h);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)G(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)G(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},J=t=>({u:0,C:null,N:null,I:null,L:"0",k:null,m:null,j:null,S:null,M:null,O:null,v:null,...t});function Z(t,n,e,o,l,s,i,r,c){o["s-sr"]=!0,e.M=t||null,e.O="slot";const u=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";if(r&&y.document){const s=e.k=y.document.createElement(e.O);e.M&&e.k.setAttribute("name",t),l.k.shadowRoot&&u&&u!==e.C?A(l.k,"insertBefore")(s,A(l.k,"children")[0]):A(A(o,"parentNode"),"insertBefore")(s,o),K(c,n,t,o,e.C),o.remove(),"0"===e.I&&(r[e.L]=e.k)}else{const s=e.k,i=u&&u!==e.C&&l.k.shadowRoot;K(c,n,t,o,i?u:e.C),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(o),i&&l.k.insertBefore(s,l.k.children[0])}s.push(e),i.push(e),l.j||(l.j=[]),l.j[e.L]=e}var K=(t,n,e,o,l)=>{var s,i;let r=o.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},Q=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},X=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},tt=class l{static fromLocalValue(t){const n=t[e],s=o in t?t[o]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>l.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const o="object"==typeof n&&null!==n?l.fromLocalValue(n):n,s=l.fromLocalValue(e);t.set(o,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=l.fromLocalValue(n);return e;case"regexp":const{pattern:o,flags:i}=s;return RegExp(o,i);case"set":const r=new Set;for(const t of s)r.add(l.fromLocalValue(t));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>l.fromLocalValue(t)))}static isLocalValueObject(l){if("object"!=typeof l||null===l)return!1;if(!l.hasOwnProperty(e))return!1;const s=l[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||l.hasOwnProperty(o))}};var nt,et=(t,n)=>"string"==typeof t&&t.startsWith(l)?t=function(t){return"string"==typeof t&&t.startsWith(l)?tt.fromLocalValue(JSON.parse(function(t){const n=atob(t),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return(new TextDecoder).decode(e)}(t.slice(11)))):t}(t):null==t||H(t)?t:4&n?"false"!==t&&(""===t||!!t):1&n?t+"":t,ot=t=>{var n;return null==(n=c(t))?void 0:n.$hostElement$},lt=(t,n)=>{const e=ot(t);return{emit:t=>st(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},st=(t,n,e)=>{const o=b.ce(n,e);return t.dispatchEvent(o),o},it=(t,n,e,o,l,s,i)=>{if(e===o)return;let r=f(t,n),u=n.toLowerCase();if("class"===n){const n=t.classList,l=ct(e);let s=ct(o);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),l.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...l.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&jt(o,t);else if(r||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let l;{const n=c(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(l=t[1])}}return l||(l=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=o}catch(t){}return}{const i=H(o);if((r||i&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[n]!==o&&(t[n]=o);else{const l=null==o?"":o;"list"===n?r=!1:null!=e&&t[n]===l||("function"==typeof t.__lookupSetter__(n)?t[n]=l:t.setAttribute(n,l))}}catch(t){}let c=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,c=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(n)||(c?t.removeAttributeNS(m,n):t.removeAttribute(n)):(!r||4&s||l)&&!i&&1===t.nodeType&&(o=!0===o?"":o,c?t.setAttributeNS(m,n,o):t.setAttribute(n,o))}}else if(n="-"===n[2]?n.slice(3):f(y,u)?u.slice(2):u[2]+n.slice(3),e||o){const l=n.endsWith(ut);n=n.replace(ft,""),e&&b.rel(t,n,e,l),o&&b.ael(t,n,o,l)}},rt=/\s/,ct=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(rt):[]),ut="Capture",ft=RegExp(ut+"$"),at=(t,n,e,o)=>{const l=11===n.k.nodeType&&n.k.host?n.k.host:n.k,s=t&&t.m||{},i=n.m||{};for(const t of dt(Object.keys(s)))t in i||it(l,t,s[t],void 0,e,n.u,o);for(const t of dt(Object.keys(i)))it(l,t,s[t],i[t],e,n.u,o)};function dt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var pt=!1,ht=[],$t=[],vt=(t,n,e)=>{const o=n.j[e];let l,s,i=0;if(null!=o.v)l=o.k=y.document.createTextNode(o.v);else{if(pt||(pt="svg"===o.O),!y.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.k=y.document.createElementNS(pt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),pt&&"foreignObject"===o.O&&(pt=!1),at(null,o,pt),o.j){const n="template"===o.O?l.content:l;for(i=0;i<o.j.length;++i)s=vt(t,o,i),s&&n.appendChild(s)}"svg"===o.O?pt=!1:"foreignObject"===l.tagName&&(pt=!0)}return l["s-hn"]=nt,l},mt=(t,n,e,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===nt&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=vt(null,e,l),i&&(o[l].k=i,St(r,i,n)))},yt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;wt(n),t&&t.remove()}}},bt=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.S&&n.S&&(t.S=n.S),!0):t.S===n.S),gt=(t,n,e=!1)=>{const o=n.k=t.k,l=t.j,s=n.j,i=n.O,r=n.v;null==r?(at(t,n,pt="svg"===i||"foreignObject"!==i&&pt,e),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,$=o[0],v=o[h];const m="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==$)$=o[++c];else if(null==v)v=o[--h];else if(bt(d,$,l))gt(d,$,l),d=n[++r],$=o[++c];else if(bt(p,v,l))gt(p,v,l),p=n[--a],v=o[--h];else if(bt(d,v,l))gt(d,v,l),St(m,d.k,p.k.nextSibling),d=n[++r],v=o[--h];else if(bt(p,$,l))gt(p,$,l),St(m,p.k,d.k),p=n[--a],$=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].S&&n[f].S===$.S){u=f;break}u>=0?(i=n[u],i.O!==$.O?s=vt(n&&n[c],e,u):(gt(i,$,l),n[u]=void 0,s=i.k),$=o[++c]):(s=vt(n&&n[c],e,c),$=o[++c]),s&&St(d.k.parentNode,s,d.k)}r>a?mt(t,null==o[h+1]?null:o[h+1].k,e,o,c,h):c>h&&yt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.v&&(o.textContent=""),mt(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.j=l):yt(l,0,l.length-1),pt&&"svg"===i&&(pt=!1)):t.v!==r&&(o.data=r)},wt=t=>{t.m&&t.m.ref&&ht.push((()=>t.m.ref(null))),t.j&&t.j.map(wt)},jt=(t,n)=>{$t.push((()=>t(n)))},St=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),Ot=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.A=()=>{n["s-p"].splice(e-1,1),o()})))}},kt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ot(t,t.D);const e=()=>xt(t,n);if(!n)return N(e);queueMicrotask((()=>{e()}))},xt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.u|=256,t.R&&(t.R.map((([t,n])=>At(o,t,n,e))),t.R=void 0),t.T.length&&t.T.forEach((t=>t(e))),l=At(o,"componentWillLoad",void 0,e)):l=At(o,"componentWillUpdate",void 0,e),l=Et(l,(()=>At(o,"componentWillRender",void 0,e))),Et(l,(()=>Ct(t,o,n)))},Et=(t,n)=>Mt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Mt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ct=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=U(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);Nt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>It(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},Nt=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{const o=t.$hostElement$,l=t.o,s=t.U||z(null,null),i=(t=>t&&t.O===W)(n)?n:_(null,null,n);if(nt=o.tagName,l.P&&(i.m=i.m||{},l.P.forEach((([t,n])=>{i.m[n]=o[t]}))),e&&i.m)for(const t of Object.keys(i.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=o[t]);i.O=null,i.u|=4,t.U=i,i.k=s.k=o.shadowRoot||o,gt(s,i,e),ht.forEach((t=>t())),ht.length=0,$t.forEach((t=>t())),$t.length=0})(t,n,o)}catch(n){a(n,t.$hostElement$)}return null},It=t=>{const n=t.$hostElement$,e=t.i,o=t.D;At(e,"componentDidRender",void 0,n),64&t.u?At(e,"componentDidUpdate",void 0,n):(t.u|=64,Dt(n),At(e,"componentDidLoad",void 0,n),t.V(n),o||Lt()),t.A&&(t.A(),t.A=void 0),512&t.u&&C((()=>kt(t,!1))),t.u&=-517},Lt=()=>{var t;C((()=>st(y,"appload",{detail:{namespace:"weg-shared-layout"}}))),(null==(t=b.H)?void 0:t.size)&&b.H.clear()},At=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){a(t,o)}},Dt=t=>t.classList.add("hydrated"),Rt=(t,n,e,o)=>{const l=c(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=l.$hostElement$,i=l.l.get(n),r=l.u,u=l.i;if(e=et(e,o.t[n][0]),!(8&r&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e))){if(l.l.set(n,e),o._){const t=o._[n];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&r||1&s)&&(u?u[o](e,i,n):l.T.push((()=>{l.i[o](e,i,n)})))}catch(t){a(t,s)}}))}if(2&r){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,i,n)&&!(16&r))return;16&r||kt(l,!1)}}},Tt=(t,n,e)=>{var o,l;const i=t.prototype;{t.watchers&&!n._&&(n._=X(t.watchers)),t.deserializers&&!n.W&&(n.W=t.deserializers),t.serializers&&!n.B&&(n.B=t.serializers);const r=Object.entries(null!=(o=n.t)?o:{});if(r.map((([t,[o]])=>{if(31&o||2&e&&32&o){const{get:l,set:r}=s(i,t)||{};l&&(n.t[t][0]|=2048),r&&(n.t[t][0]|=4096),(1&e||!l)&&Object.defineProperty(i,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>c(this).l.get(n))(0,t);const e=c(this),o=e?e.i:i;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(l){const s=c(this);if(s){if(r)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),r.call(this,et(l,o)),void Rt(this,t,l=32&o?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Rt(this,t,l,n),void(1&e&&!s.i&&s.T.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const i=()=>{const e=s.i[t];!s.l.get(t)&&e&&s.l.set(t,e),s.i[t]=et(l,o),Rt(this,t,s.i[t],n)};s.i?i():s.T.push((()=>{i()}))}}}})}})),1&e){const e=new Map;i.attributeChangedCallback=function(t,o,l){b.jmp((()=>{var s;const u=e.get(t),f=c(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&l!==o){const i=f.i,r=null==(s=n._)?void 0:s[t];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=i[s]&&(128&e||1&r)&&i[s].call(i,l,o,t)}))}return}const a=r.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===l&&void 0===this[u];d&&(l=null!==l&&"false"!==l);const h=Object.getOwnPropertyDescriptor(i,u);p||l==this[u]||h.get&&!h.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n._)?l:{}),...r.filter((([t,n])=>31&n[0])).map((([t,o])=>{var l;const s=o[1]||t;return e.set(s,t),512&o[0]&&(null==(l=n.P)||l.push([t,s])),s}))]))}}return t},Ut=(t,n)=>{At(t,"connectedCallback",void 0,n)},Pt=t=>{if(!(1&b.u)){const n=c(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.u)_t(t,n,e.F),(null==n?void 0:n.i)?Ut(n.i,t):(null==n?void 0:n.q)&&n.q.then((()=>Ut(n.i,t)));else{let o;if(n.u|=1,o=t.getAttribute(h),o){if(1&e.u){const n=U(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,o)=>{var l,s,i,r;const u=t.shadowRoot,f=[],a=[],d=u?[]:null,p=z(n,null);p.k=t,!y.document||b.H&&b.H.size||G(y.document.body,b.H=new Map),t[h]=e,t.removeAttribute(h),o.U=Y(p,f,[],d,t,t,e,a);let $=0;const v=f.length;let m;for(;$<v;$++){m=f[$];const e=m.C+"."+m.N,o=b.H.get(e),s=m.k;if(u){if((null==(l=m.O)?void 0:(""+l).includes("-"))&&"slot-fb"!==m.O&&!m.k.shadowRoot){const t=c(m.k);if(t){const n=P(t.o),e=y.document.querySelector(`style[sty-id="${n}"]`);e&&d.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===m.O&&(s["s-cr"]=t["s-cr"]);"slot"===m.O&&(m.M=m.k["s-sn"]||m.k.name||null,m.j?(m.u|=2,m.k.childNodes.length||m.j.forEach((t=>{m.k.appendChild(t.k)}))):m.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt(m.N))),o&&!o["s-id"]&&b.H.delete(e)}const g=[],w=a.length;let j,S,O,k,x=0,E=0;for(;x<w;x++)if(j=a[x],j&&j.length)for(O=j.length,S=0;S<O;S++){if(k=j[S],g[k.hostId]||(g[k.hostId]=b.H.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(i=null==(s=j[S-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),L(k.node,k.slot,0,k.node["s-oo"]||E),(null==(r=k.node.parentElement)?void 0:r.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),E=(k.node["s-oo"]||E)+1}if(u&&!u.childNodes.length){let n=0;const e=d.length;if(e){for(;n<e;n++){const t=d[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,e.$,o,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Ot(n,n.D=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.u)){if(n.u|=32,e.Y){const l=((t,n)=>{const e=t.$.replace(/-/g,"_"),o=t.Y;if(!o)return;const l=d.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(d.set(o,t),t[e])),(t=>{a(t,n.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.$}#${n.G}" was not found`);o.isProxied||(e._=X(o.watchers),e.B=o.serializers,e.W=o.deserializers,Tt(o,e,2),o.isProxied=!0);const s=()=>{};n.u|=8;try{new o(n)}catch(n){a(n,t)}n.u&=-9,n.u|=128,s(),Ut(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=P(e);if(!p.has(n)){const o=()=>{};T(n,t,!!(1&e.u)),o()}}}const l=n.D,s=()=>kt(n,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(e){a(e,t),n.A&&(n.A(),n.A=void 0),n.V&&n.V(t)}})(t,n,e)}o()}},Vt=(t,n)=>{At(t,"disconnectedCallback",void 0,n||t)},Ht=(t,n={})=>{var e;if(!y.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=n.exclude||[],s=y.customElements,i=y.document.head,r=i.querySelector("meta[charset]"),u=y.document.createElement("style"),f=[];let a,d=!0;if(Object.assign(b,n),b.p=new URL(n.resourcesUrl||"./",y.document.baseURI).href,b.u|=2,(()=>{if(!y.document)return;const t=y.document.querySelectorAll(`[${$}]`);let n=0;for(;n<t.length;n++)T(t[n].getAttribute($),V(t[n].innerHTML),!0)})(),t.map((t=>{t[1].map((n=>{var e,i;const r={u:n[0],$:n[1],t:n[2],F:n[3]};r.t=n[2],r.F=n[3],r.P=[],r._=X(n[4]),r.B=null!=(e=n[5])?e:{},r.W=null!=(i=n[6])?i:{};const u=r.$,p=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,J:new Map};e.q=new Promise((t=>e.V=t)),t["s-p"]=[],t["s-rc"]=[],e.T=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,r),1&r.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${r.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else I.call(t,r)}connectedCallback(){const t=c(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,_t(this,t,r.F)),a&&(clearTimeout(a),a=null),d?f.push(this):b.jmp((()=>Pt(this))))}disconnectedCallback(){b.jmp((()=>(async t=>{if(!(1&b.u)){const n=c(t);(null==n?void 0:n.Z)&&(n.Z.map((t=>t())),n.Z=void 0),(null==n?void 0:n.i)?Vt(n.i,t):(null==n?void 0:n.q)&&n.q.then((()=>Vt(n.i,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),b.raf((()=>{var t;const n=c(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.U)?void 0:t.k)instanceof Node&&!n.U.k.isConnected&&delete n.U.k}))}componentOnReady(){var t;return null==(t=c(this))?void 0:t.q}};r.Y=t[0],l.includes(u)||s.get(u)||(o.push(u),s.define(u,Tt(p,r,1)))}))})),o.length>0&&(u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=b.h)?e:D(y.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):b.jmp((()=>a=setTimeout(Lt,30)))},_t=(t,n,e)=>{e&&y.document&&e.map((([e,o,l])=>{const s=Wt(y.document,t,e),i=zt(n,l),r=Bt(e);b.ael(s,o,i,r),(n.Z=n.Z||[]).push((()=>b.rel(s,o,i,r)))}))},zt=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.R=t.R||[]).push([n,e])}catch(n){a(n,t.$hostElement$)}},Wt=(t,n,e)=>8&e?y:n,Bt=t=>({passive:!!(1&t),capture:!!(2&t)}),Ft=t=>b.h=t;export{Ht as b,lt as c,ot as g,_ as h,g as p,u as r,Ft as s}
1
+ var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",o="value",l="serialized:";function s(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var i,r=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=s(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(e)?t[e]=n.l.get(e):void 0!==o&&(t[e]=o)}}))},c=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},u=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&r(t,n))},f=(t,n)=>n in t,a=(t,n)=>(0,console.error)(t,n),d=new Map,p=new Map,h="s-id",$="sty-id",v="c-id",m="http://www.w3.org/1999/xlink",y="undefined"!=typeof window?window:{},b={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},g=t=>Promise.resolve(t),w=(()=>{try{return!!y.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),j=!!w&&(()=>!!y.document&&Object.getOwnPropertyDescriptor(y.document.adoptedStyleSheets,"length").writable)(),S=!1,O=[],k=[],x=(t,n)=>e=>{t.push(e),S||(S=!0,n&&4&b.u?C(M):b.raf(M))},E=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){a(t)}t.length=0},M=()=>{E(O),E(k),(S=O.length>0)&&b.raf(M)},C=t=>g().then(t),N=x(k,!0);function I(){const t=this.attachShadow({mode:"open"});void 0===i&&(i=null),i&&(j?t.adoptedStyleSheets.push(i):t.adoptedStyleSheets=[...t.adoptedStyleSheets,i])}var L=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=A(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=A(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]};function A(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function D(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var R=new WeakMap,T=(t,n,e)=>{let o=p.get(t);w&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,p.set(t,o)},U=(t,n)=>{var e,o,l;const s=H(n),i=p.get(s);if(!y.document)return s;if(t=11===t.nodeType?t:y.document,i)if("string"==typeof i){let l,r=R.get(t=t.head||t);r||R.set(t,r=new Set);const c=t.querySelector(`[${$}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=y.document.createElement("style"),l.textContent=i;const c=null!=(e=b.h)?e:D(y.document);if(null!=c&&l.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(w){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),j?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let n=R.get(t);if(n||R.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}if(j?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s),"host"in t){const n=t.querySelector(`[${$}="${s}"]`);n&&N((()=>n.remove()))}}}return s},H=t=>"sc-"+t.$,P=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),V=t=>"object"==(t=typeof t)||"function"===t,_=(t,n,...e)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!V(o))&&(o+=""),s&&i?r[r.length-1].v+=o:r.push(s?z(null,o):o),i=s)};if(c(e),n){n.key&&(l=n.key);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,r,B);const u=z(t,null);return u.m=n,r.length>0&&(u.j=r),u.S=l,u},z=(t,n)=>({u:0,O:t,v:null!=n?n:null,k:null,j:null,m:null,S:null}),W={},B={forEach:(t,n)=>t.map(F).forEach(n),map:(t,n)=>t.map(F).map(n).map(q)},F=t=>({vattrs:t.m,vchildren:t.j,vkey:t.S,vname:t.M,vtag:t.O,vtext:t.v}),q=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),_(t.vtag,n,...t.vchildren||[])}const n=z(t.vtag,t.vtext);return n.m=t.vattrs,n.j=t.vchildren,n.S=t.vkey,n.M=t.vname,n},Y=(t,n,e,o,l,s,i,r=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(v),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=J({u:0,C:u[0],N:u[1],I:u[2],L:u[3],O:s.tagName.toLowerCase(),k:s,m:{class:s.className||""}}),n.push(f),s.removeAttribute(v),t.j||(t.j=[]);const l=f.k.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===f.O&&Z(l,u[2],f,s,t,n,e,o,r),f.k["s-sn"]=l,f.k.removeAttribute("s-sn")),void 0!==f.L&&(t.j[f.L]=f),t=f,o&&"0"===f.I&&(o[f.L]=f.k)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)Y(t,n,e,o,l,s.shadowRoot.childNodes[a],i,r);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)Y(t,n,e,o,l,d[a],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=J({C:u[1],N:u[2],I:u[3],L:u[4]||"0",k:s,m:null,j:null,S:null,M:null,O:null,v:null}),"t"===c?(f.k=Q(s,3),f.k&&3===f.k.nodeType&&(f.v=f.k.textContent,n.push(f),s.remove(),i===f.C&&(t.j||(t.j=[]),t.j[f.L]=f),o&&"0"===f.I&&(o[f.L]=f.k))):"c"===c?(f.k=Q(s,8),f.k&&8===f.k.nodeType&&(n.push(f),s.remove())):f.C===i&&("s"===c?Z(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,o,r):"r"===c&&o&&s.remove()));else if(t&&"style"===t.O){const n=z(null,s.textContent);n.k=s,n.L="0",t.j=[n]}return t},G=(t,n)=>{if(1===t.nodeType){const e=t[h]||t.getAttribute(h);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)G(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)G(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},J=t=>({u:0,C:null,N:null,I:null,L:"0",k:null,m:null,j:null,S:null,M:null,O:null,v:null,...t});function Z(t,n,e,o,l,s,i,r,c){o["s-sr"]=!0,e.M=t||null,e.O="slot";const u=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";if(r&&y.document){const s=e.k=y.document.createElement(e.O);e.M&&e.k.setAttribute("name",t),l.k.shadowRoot&&u&&u!==e.C?A(l.k,"insertBefore")(s,A(l.k,"children")[0]):A(A(o,"parentNode"),"insertBefore")(s,o),K(c,n,t,o,e.C),o.remove(),"0"===e.I&&(r[e.L]=e.k)}else{const s=e.k,i=u&&u!==e.C&&l.k.shadowRoot;K(c,n,t,o,i?u:e.C),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(o),i&&l.k.insertBefore(s,l.k.children[0])}s.push(e),i.push(e),l.j||(l.j=[]),l.j[e.L]=e}var K=(t,n,e,o,l)=>{var s,i;let r=o.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},Q=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},X=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},tt=class l{static fromLocalValue(t){const n=t[e],s=o in t?t[o]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>l.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const o="object"==typeof n&&null!==n?l.fromLocalValue(n):n,s=l.fromLocalValue(e);t.set(o,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=l.fromLocalValue(n);return e;case"regexp":const{pattern:o,flags:i}=s;return RegExp(o,i);case"set":const r=new Set;for(const t of s)r.add(l.fromLocalValue(t));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>l.fromLocalValue(t)))}static isLocalValueObject(l){if("object"!=typeof l||null===l)return!1;if(!l.hasOwnProperty(e))return!1;const s=l[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||l.hasOwnProperty(o))}};var nt,et=(t,n)=>"string"==typeof t&&t.startsWith(l)?t=function(t){return"string"==typeof t&&t.startsWith(l)?tt.fromLocalValue(JSON.parse(function(t){const n=atob(t),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return(new TextDecoder).decode(e)}(t.slice(11)))):t}(t):null==t||V(t)?t:4&n?"false"!==t&&(""===t||!!t):1&n?t+"":t,ot=t=>{var n;return null==(n=c(t))?void 0:n.$hostElement$},lt=(t,n)=>{const e=ot(t);return{emit:t=>st(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},st=(t,n,e)=>{const o=b.ce(n,e);return t.dispatchEvent(o),o},it=(t,n,e,o,l,s,i)=>{if(e===o)return;let r=f(t,n),u=n.toLowerCase();if("class"===n){const n=t.classList,l=ct(e);let s=ct(o);if((t["s-si"]||t["s-sc"])&&i){const e=t["s-sc"]||t["s-si"];s.push(e),l.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...l.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&jt(o,t);else if(r||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let l;{const n=c(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(l=t[1])}}return l||(l=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=o}catch(t){}return}{const i=V(o);if((r||i&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[n]!==o&&(t[n]=o);else{const l=null==o?"":o;"list"===n?r=!1:null!=e&&t[n]===l||("function"==typeof t.__lookupSetter__(n)?t[n]=l:t.setAttribute(n,l))}}catch(t){}let c=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,c=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(n)||(c?t.removeAttributeNS(m,n):t.removeAttribute(n)):(!r||4&s||l)&&!i&&1===t.nodeType&&(o=!0===o?"":o,c?t.setAttributeNS(m,n,o):t.setAttribute(n,o))}}else if(n="-"===n[2]?n.slice(3):f(y,u)?u.slice(2):u[2]+n.slice(3),e||o){const l=n.endsWith(ut);n=n.replace(ft,""),e&&b.rel(t,n,e,l),o&&b.ael(t,n,o,l)}},rt=/\s/,ct=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(rt):[]),ut="Capture",ft=RegExp(ut+"$"),at=(t,n,e,o)=>{const l=11===n.k.nodeType&&n.k.host?n.k.host:n.k,s=t&&t.m||{},i=n.m||{};for(const t of dt(Object.keys(s)))t in i||it(l,t,s[t],void 0,e,n.u,o);for(const t of dt(Object.keys(i)))it(l,t,s[t],i[t],e,n.u,o)};function dt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var pt=!1,ht=[],$t=[],vt=(t,n,e)=>{const o=n.j[e];let l,s,i=0;if(null!=o.v)l=o.k=y.document.createTextNode(o.v);else{if(pt||(pt="svg"===o.O),!y.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.k=y.document.createElementNS(pt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),pt&&"foreignObject"===o.O&&(pt=!1),at(null,o,pt),o.j){const n="template"===o.O?l.content:l;for(i=0;i<o.j.length;++i)s=vt(t,o,i),s&&n.appendChild(s)}"svg"===o.O?pt=!1:"foreignObject"===l.tagName&&(pt=!0)}return l["s-hn"]=nt,l},mt=(t,n,e,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===nt&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=vt(null,e,l),i&&(o[l].k=i,St(r,i,n)))},yt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;wt(n),t&&t.remove()}}},bt=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.S&&n.S&&(t.S=n.S),!0):t.S===n.S),gt=(t,n,e=!1)=>{const o=n.k=t.k,l=t.j,s=n.j,i=n.O,r=n.v;null==r?(at(t,n,pt="svg"===i||"foreignObject"!==i&&pt,e),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,$=o[0],v=o[h];const m="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==$)$=o[++c];else if(null==v)v=o[--h];else if(bt(d,$,l))gt(d,$,l),d=n[++r],$=o[++c];else if(bt(p,v,l))gt(p,v,l),p=n[--a],v=o[--h];else if(bt(d,v,l))gt(d,v,l),St(m,d.k,p.k.nextSibling),d=n[++r],v=o[--h];else if(bt(p,$,l))gt(p,$,l),St(m,p.k,d.k),p=n[--a],$=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].S&&n[f].S===$.S){u=f;break}u>=0?(i=n[u],i.O!==$.O?s=vt(n&&n[c],e,u):(gt(i,$,l),n[u]=void 0,s=i.k),$=o[++c]):(s=vt(n&&n[c],e,c),$=o[++c]),s&&St(d.k.parentNode,s,d.k)}r>a?mt(t,null==o[h+1]?null:o[h+1].k,e,o,c,h):c>h&&yt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.v&&(o.textContent=""),mt(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.j=l):yt(l,0,l.length-1),pt&&"svg"===i&&(pt=!1)):t.v!==r&&(o.data=r)},wt=t=>{t.m&&t.m.ref&&ht.push((()=>t.m.ref(null))),t.j&&t.j.map(wt)},jt=(t,n)=>{$t.push((()=>t(n)))},St=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),Ot=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.A=()=>{n["s-p"].splice(e-1,1),o()})))}},kt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ot(t,t.D);const e=()=>xt(t,n);if(!n)return N(e);queueMicrotask((()=>{e()}))},xt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.u|=256,t.R&&(t.R.map((([t,n])=>At(o,t,n,e))),t.R=void 0),t.T.length&&t.T.forEach((t=>t(e))),l=At(o,"componentWillLoad",void 0,e)):l=At(o,"componentWillUpdate",void 0,e),l=Et(l,(()=>At(o,"componentWillRender",void 0,e))),Et(l,(()=>Ct(t,o,n)))},Et=(t,n)=>Mt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Mt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ct=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=U(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);Nt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>It(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},Nt=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{const o=t.$hostElement$,l=t.o,s=t.U||z(null,null),i=(t=>t&&t.O===W)(n)?n:_(null,null,n);if(nt=o.tagName,l.H&&(i.m=i.m||{},l.H.forEach((([t,n])=>{i.m[n]=o[t]}))),e&&i.m)for(const t of Object.keys(i.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=o[t]);i.O=null,i.u|=4,t.U=i,i.k=s.k=o.shadowRoot||o,gt(s,i,e),ht.forEach((t=>t())),ht.length=0,$t.forEach((t=>t())),$t.length=0})(t,n,o)}catch(n){a(n,t.$hostElement$)}return null},It=t=>{const n=t.$hostElement$,e=t.i,o=t.D;At(e,"componentDidRender",void 0,n),64&t.u?At(e,"componentDidUpdate",void 0,n):(t.u|=64,Dt(n),At(e,"componentDidLoad",void 0,n),t.P(n),o||Lt()),t.A&&(t.A(),t.A=void 0),512&t.u&&C((()=>kt(t,!1))),t.u&=-517},Lt=()=>{var t;C((()=>st(y,"appload",{detail:{namespace:"weg-shared-layout"}}))),(null==(t=b.V)?void 0:t.size)&&b.V.clear()},At=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){a(t,o)}},Dt=t=>t.classList.add("hydrated"),Rt=(t,n,e,o)=>{const l=c(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=l.$hostElement$,i=l.l.get(n),r=l.u,u=l.i;if(e=et(e,o.t[n][0]),!(8&r&&void 0!==i||e===i||Number.isNaN(i)&&Number.isNaN(e))){if(l.l.set(n,e),o._){const t=o._[n];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&r||1&s)&&(u?u[o](e,i,n):l.T.push((()=>{l.i[o](e,i,n)})))}catch(t){a(t,s)}}))}if(2&r){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,i,n)&&!(16&r))return;16&r||kt(l,!1)}}},Tt=(t,n,e)=>{var o,l;const i=t.prototype;{t.watchers&&!n._&&(n._=X(t.watchers)),t.deserializers&&!n.W&&(n.W=t.deserializers),t.serializers&&!n.B&&(n.B=t.serializers);const r=Object.entries(null!=(o=n.t)?o:{});if(r.map((([t,[o]])=>{if(31&o||2&e&&32&o){const{get:l,set:r}=s(i,t)||{};l&&(n.t[t][0]|=2048),r&&(n.t[t][0]|=4096),(1&e||!l)&&Object.defineProperty(i,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>c(this).l.get(n))(0,t);const e=c(this),o=e?e.i:i;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(l){const s=c(this);if(s){if(r)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),r.call(this,et(l,o)),void Rt(this,t,l=32&o?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Rt(this,t,l,n),void(1&e&&!s.i&&s.T.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const i=()=>{const e=s.i[t];!s.l.get(t)&&e&&s.l.set(t,e),s.i[t]=et(l,o),Rt(this,t,s.i[t],n)};s.i?i():s.T.push((()=>{i()}))}}}})}})),1&e){const e=new Map;i.attributeChangedCallback=function(t,o,l){b.jmp((()=>{var s;const u=e.get(t),f=c(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&l!==o){const i=f.i,r=null==(s=n._)?void 0:s[t];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=i[s]&&(128&e||1&r)&&i[s].call(i,l,o,t)}))}return}const a=r.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===l&&void 0===this[u];d&&(l=null!==l&&"false"!==l);const h=Object.getOwnPropertyDescriptor(i,u);p||l==this[u]||h.get&&!h.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n._)?l:{}),...r.filter((([t,n])=>31&n[0])).map((([t,o])=>{var l;const s=o[1]||t;return e.set(s,t),512&o[0]&&(null==(l=n.H)||l.push([t,s])),s}))]))}}return t},Ut=(t,n)=>{At(t,"connectedCallback",void 0,n)},Ht=t=>{if(!(1&b.u)){const n=c(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.u)_t(t,n,e.F),(null==n?void 0:n.i)?Ut(n.i,t):(null==n?void 0:n.q)&&n.q.then((()=>Ut(n.i,t)));else{let o;if(n.u|=1,o=t.getAttribute(h),o){if(1&e.u){const n=U(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,o)=>{var l,s,i,r;const u=t.shadowRoot,f=[],a=[],d=u?[]:null,p=z(n,null);p.k=t,!y.document||b.V&&b.V.size||G(y.document.body,b.V=new Map),t[h]=e,t.removeAttribute(h),o.U=Y(p,f,[],d,t,t,e,a);let $=0;const v=f.length;let m;for(;$<v;$++){m=f[$];const e=m.C+"."+m.N,o=b.V.get(e),s=m.k;if(u){if((null==(l=m.O)?void 0:(""+l).includes("-"))&&"slot-fb"!==m.O&&!m.k.shadowRoot){const t=c(m.k);if(t){const n=H(t.o),e=y.document.querySelector(`style[sty-id="${n}"]`);e&&d.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===m.O&&(s["s-cr"]=t["s-cr"]);"slot"===m.O&&(m.M=m.k["s-sn"]||m.k.name||null,m.j?(m.u|=2,m.k.childNodes.length||m.j.forEach((t=>{m.k.appendChild(t.k)}))):m.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt(m.N))),o&&!o["s-id"]&&b.V.delete(e)}const g=[],w=a.length;let j,S,O,k,x=0,E=0;for(;x<w;x++)if(j=a[x],j&&j.length)for(O=j.length,S=0;S<O;S++){if(k=j[S],g[k.hostId]||(g[k.hostId]=b.V.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(i=null==(s=j[S-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),L(k.node,k.slot,0,k.node["s-oo"]||E),(null==(r=k.node.parentElement)?void 0:r.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),E=(k.node["s-oo"]||E)+1}if(u&&!u.childNodes.length){let n=0;const e=d.length;if(e){for(;n<e;n++){const t=d[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,e.$,o,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Ot(n,n.D=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.u)){if(n.u|=32,e.Y){const l=((t,n)=>{const e=t.$.replace(/-/g,"_"),o=t.Y;if(!o)return;const l=d.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(d.set(o,t),t[e])),(t=>{a(t,n.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.$}#${n.G}" was not found`);o.isProxied||(e._=X(o.watchers),e.B=o.serializers,e.W=o.deserializers,Tt(o,e,2),o.isProxied=!0);const s=()=>{};n.u|=8;try{new o(n)}catch(n){a(n,t)}n.u&=-9,n.u|=128,s(),Ut(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=H(e);if(!p.has(n)){const o=()=>{};T(n,t,!!(1&e.u)),o()}}}const l=n.D,s=()=>kt(n,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(e){a(e,t),n.A&&(n.A(),n.A=void 0),n.P&&n.P(t)}})(t,n,e)}o()}},Pt=(t,n)=>{At(t,"disconnectedCallback",void 0,n||t)},Vt=(t,n={})=>{var e;if(!y.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=n.exclude||[],s=y.customElements,i=y.document.head,r=i.querySelector("meta[charset]"),u=y.document.createElement("style"),f=[];let a,d=!0;if(Object.assign(b,n),b.p=new URL(n.resourcesUrl||"./",y.document.baseURI).href,b.u|=2,(()=>{if(!y.document)return;const t=y.document.querySelectorAll(`[${$}]`);let n=0;for(;n<t.length;n++)T(t[n].getAttribute($),P(t[n].innerHTML),!0)})(),t.map((t=>{t[1].map((n=>{var e,i;const r={u:n[0],$:n[1],t:n[2],F:n[3]};r.t=n[2],r.F=n[3],r.H=[],r._=X(n[4]),r.B=null!=(e=n[5])?e:{},r.W=null!=(i=n[6])?i:{};const u=r.$,p=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,J:new Map};e.q=new Promise((t=>e.P=t)),t["s-p"]=[],t["s-rc"]=[],e.T=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,r),1&r.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${r.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else I.call(t,r)}connectedCallback(){const t=c(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,_t(this,t,r.F)),a&&(clearTimeout(a),a=null),d?f.push(this):b.jmp((()=>Ht(this))))}disconnectedCallback(){b.jmp((()=>(async t=>{if(!(1&b.u)){const n=c(t);(null==n?void 0:n.Z)&&(n.Z.map((t=>t())),n.Z=void 0),(null==n?void 0:n.i)?Pt(n.i,t):(null==n?void 0:n.q)&&n.q.then((()=>Pt(n.i,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),b.raf((()=>{var t;const n=c(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.U)?void 0:t.k)instanceof Node&&!n.U.k.isConnected&&delete n.U.k}))}componentOnReady(){var t;return null==(t=c(this))?void 0:t.q}};r.Y=t[0],l.includes(u)||s.get(u)||(o.push(u),s.define(u,Tt(p,r,1)))}))})),o.length>0&&(u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=b.h)?e:D(y.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,r?r.nextSibling:i.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):b.jmp((()=>a=setTimeout(Lt,30)))},_t=(t,n,e)=>{e&&y.document&&e.map((([e,o,l])=>{const s=Wt(y.document,t,e),i=zt(n,l),r=Bt(e);b.ael(s,o,i,r),(n.Z=n.Z||[]).push((()=>b.rel(s,o,i,r)))}))},zt=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.R=t.R||[]).push([n,e])}catch(n){a(n,t.$hostElement$)}},Wt=(t,n,e)=>8&e?y:n,Bt=t=>({passive:!!(1&t),capture:!!(2&t)}),Ft=t=>b.h=t;export{W as H,Vt as b,lt as c,ot as g,_ as h,g as p,u as r,Ft as s}