scb-wc 0.1.249 → 0.1.250

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/scb-wc.bundle.js CHANGED
@@ -14331,7 +14331,7 @@
14331
14331
  <div
14332
14332
  class="skeleton${this.variant===`circular`?` circle`:``} ${this.variant===`rounded`?` rounded`:``}"
14333
14333
  ><slot></slot></div>
14334
- `}},N([_({type:String})],Sf.prototype,`variant`,void 0),N([_({type:String})],Sf.prototype,`width`,void 0),N([_({type:String})],Sf.prototype,`height`,void 0),N([_({type:String,attribute:`border-size`})],Sf.prototype,`borderSize`,void 0),N([_({type:String,attribute:`assistive-text`})],Sf.prototype,`assistiveText`,void 0),N([_({type:String,reflect:!0})],Sf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Sf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Sf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Sf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Sf.prototype,`spacingRight`,void 0),Sf=N([a(`scb-skeleton`)],Sf)}));w(),b(),uc(),P();var wf,Tf=0,Ef=[0,2,4,8,12,16,20,24,32,40,48,64,80,96,120];(()=>{if(typeof window>`u`||typeof document>`u`||!(`customElements`in window)||document.head.querySelector(`style[data-scb-header-pre-upgrade]`))return;let e=document.createElement(`style`);e.setAttribute(`data-scb-header-pre-upgrade`,``),e.textContent=`
14334
+ `}},N([_({type:String})],Sf.prototype,`variant`,void 0),N([_({type:String})],Sf.prototype,`width`,void 0),N([_({type:String})],Sf.prototype,`height`,void 0),N([_({type:String,attribute:`border-size`})],Sf.prototype,`borderSize`,void 0),N([_({type:String,attribute:`assistive-text`})],Sf.prototype,`assistiveText`,void 0),N([_({type:String,reflect:!0})],Sf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Sf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Sf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Sf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Sf.prototype,`spacingRight`,void 0),Sf=N([a(`scb-skeleton`)],Sf)}));w(),b(),uc(),P();var wf,Tf=0,Ef=new Set([`search`,`actions`,`actions-desktop`,`actions-mobile`]),Df=[0,2,4,8,12,16,20,24,32,40,48,64,80,96,120];(()=>{if(typeof window>`u`||typeof document>`u`||!(`customElements`in window)||document.head.querySelector(`style[data-scb-header-pre-upgrade]`))return;let e=document.createElement(`style`);e.setAttribute(`data-scb-header-pre-upgrade`,``),e.textContent=`
14335
14335
  scb-header:not(:defined),
14336
14336
  scb-header[data-upgrading] {
14337
14337
  display: block;
@@ -14384,7 +14384,7 @@
14384
14384
  );
14385
14385
  }
14386
14386
  }
14387
- `,document.head.appendChild(e);let t=e=>{let t=String(e??``).trim();if(t){if(/^\d+$/.test(t)){let e=Math.max(0,Math.min(14,parseInt(t,10)));return`var(--spacing-${e}, ${Ef[e]}px)`}return t}},n=e=>{let t=String(e??``).trim();if(!t)return!1;try{let e=JSON.parse(t);return Array.isArray(e)&&e.length>0}catch{return!1}},r=e=>e!=null&&!/^(false|0|off|no)$/i.test(e.trim()),i=e=>{for(let t of Array.from(e.children)){let e=t.tagName.toLowerCase();if(e===`scb-header-tab`||e===`scb-dropdown`)return!0}return!1},a=e=>{i(e)||n(e.getAttribute(`tabs`))||r(e.getAttribute(`reserve-tabs`))||r(e.getAttribute(`layout-pending`))?e.setAttribute(`data-pre-has-tabs`,``):e.removeAttribute(`data-pre-has-tabs`);let a=t(e.getAttribute(`spacing`)),o=t(e.getAttribute(`spacing-top`))??a,s=t(e.getAttribute(`spacing-bottom`))??a,c=t(e.getAttribute(`padding-inline`)),l=t(e.getAttribute(`padding-inline-expanded`))??c;o?e.style.setProperty(`--scb-header-spacing-block-start`,o):e.style.removeProperty(`--scb-header-spacing-block-start`),s?e.style.setProperty(`--scb-header-spacing-block-end`,s):e.style.removeProperty(`--scb-header-spacing-block-end`),c?e.style.setProperty(`--scb-header-padding-inline`,c):e.style.removeProperty(`--scb-header-padding-inline`),l?e.style.setProperty(`--scb-header-padding-inline-expanded`,l):e.style.removeProperty(`--scb-header-padding-inline-expanded`);let u=(e.getAttribute(`logo-width`)??``).trim();u?e.style.setProperty(`--scb-header-pre-logo-w`,u):e.style.removeProperty(`--scb-header-pre-logo-w`);let d=(e.getAttribute(`logo-height`)??``).trim();d?e.style.setProperty(`--scb-header-pre-logo-img-h`,d):e.style.removeProperty(`--scb-header-pre-logo-img-h`);let f=(e.getAttribute(`search-height`)??``).trim();f?e.style.setProperty(`--scb-header-pre-control-size`,f):e.style.removeProperty(`--scb-header-pre-control-size`)};document.querySelectorAll(`scb-header`).forEach(a);let o=new MutationObserver(e=>{for(let t of e){if(t.type===`attributes`){let e=t.target;e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-header`&&a(e);continue}if(t.type===`childList`){let e=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let t of e){if(!(t instanceof HTMLElement))continue;if(t.tagName.toLowerCase()===`scb-header`){a(t);continue}let e=t.closest?.(`scb-header`);e&&a(e)}}}});o.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabs`,`spacing`,`spacing-top`,`spacing-bottom`,`padding-inline`,`padding-inline-expanded`,`logo-width`,`logo-height`,`logo-aspect-ratio`,`logo-alt`,`logotype-text`,`search-height`,`reserve-tabs`,`layout-pending`]}),customElements.whenDefined(`scb-header`).then(()=>{o.disconnect()})})();var Df={fromAttribute:e=>e==null||!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},Of={fromAttribute:e=>e!=null&&!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},kf={fromAttribute:e=>e===`small`||e===`medium`||e===`large`?e:`medium`,toAttribute:e=>{let t=String(e??``);return t===`small`||t===`medium`||t===`large`?t:null}},Z=class extends C{static{wf=this}constructor(){super(),this.maxWidth=`1440px`,this.size=lc[`scb-header`].size,this.logoText=``,this.logotypeText=``,this.logoAlt=``,this.logoHref=`/`,this.logoSrc=``,this.logoWidth=``,this.logoHeight=``,this.logoAspectRatio=``,this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.reserveTabs=!1,this.layoutPending=!1,this.utilityItems=[],this.searchButtonLabel=`Sök`,this.searchClearLabel=`Rensa sökfält`,this.searchCloseLabel=`Stäng sök`,this.menuButtonLabel=`Meny`,this.menuOpenLabel=`Öppna meny`,this.utilityNavigationLabel=`Funktionslänkar`,this.mainNavigationLabel=`Huvudnavigering`,this.deferDrawer=!1,this.showDrawer=!0,this.alwaysShowMenuButton=!1,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText=``,this._drawerId=`main-drawer`,this._menuExpanded=!1,this._searchId=`header-search`,this._drawerReady=!1,this._mobileSearchOpen=!1,this._initialUpgradeComplete=!1,this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._observedLayout=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this.layoutPending||this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{window.innerWidth>=this.BP_SM&&this._mobileSearchOpen&&this._setMobileSearchOpen(!1),this._scheduleMeasure()},this._onMenuSelect=e=>{e.stopPropagation();let t=e.detail;this.dispatchEvent(new CustomEvent(`scb-menu-select`,{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbmenuselect`,{detail:t,bubbles:!0,composed:!0}));let n=t?.item,r=typeof t?.href==`string`?t.href:typeof t?.itemHref==`string`?t.itemHref:typeof t?.item_href==`string`?t.item_href:``,i=n?n.getAttribute(`item-href`)??n.getAttribute(`href`)??``:``;String(r||i||``).trim()&&this._closeDrawerNow()},this._onMenuSelectAlias=e=>{e.stopPropagation()},this._collapsed=!1,this._unlockAtWidth=0,this._tabsCollapsed=!1,this._desktop=typeof window<`u`&&window.innerWidth>=wf.BP_MD_DEFAULT,this._hideLogoText=!1,this._slotWatchers=[],this._harvestPending=!1,this._harvest=(e={})=>{let t=Array.from(this.children),n=[],r=[],i=[],a=-1,o=!1,s=e=>({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??void 0,icon:e.getAttribute(`icon`)??void 0}),c=e=>{e.hasAttribute(`role`)&&e.removeAttribute(`role`),e.hasAttribute(`hidden`)||e.setAttribute(`hidden`,``),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`)};for(let e of t){let t=e.tagName.toLowerCase();if(this._isDrawerCloseNode(e)){this._syncDrawerCloseNode(e);continue}if(t===`scb-header-tab`){c(e);let t=e.getAttribute(`label`)??``,r=e.getAttribute(`href`),i=r&&r.trim()!==``?r:void 0;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length),n.push({kind:`tab`,label:t,href:i});continue}if(t===`scb-badge`){let t=e.querySelector(`scb-dropdown`);if(t){o=!0;let r=t.getAttribute(`label`)??``;(t.hasAttribute(`selected`)||t.getAttribute(`selected`)===`true`||t.getAttribute(`active`)===`true`||t.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let i=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==i&&e.setAttribute(`slot`,i),t.hasAttribute(`slot`)&&t.removeAttribute(`slot`),t.hasAttribute(`as-tab`)||t.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:i,label:r});continue}}if(t===`scb-dropdown`){o=!0;let t=e.getAttribute(`label`)??``;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let r=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==r&&e.setAttribute(`slot`,r),e.hasAttribute(`as-tab`)||e.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:r,label:t});continue}if(t===`scb-header-utility`){c(e),r.push({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??`#`,target:e.getAttribute(`target`)??void 0});continue}if(t===`scb-header-menu-group`){c(e);let t={label:e.getAttribute(`label`)??``,icon:e.getAttribute(`icon`)??void 0,children:[]};e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t.children.push(s(e))),i.push(t);continue}if(t===`scb-header-menu-item`){c(e),i.push(s(e));continue}e.hasAttribute(`slot`)||c(e)}let l=!this._sameNavItems(this._slotNavItems,n),u=!this._sameUtilityItems(this._slotUtils,r),d=!this._sameMenuNodes(this._slotMenu,i);l&&(this._slotNavItems=n),u&&(this._slotUtils=r),d&&(this._slotMenu=i),o&&this._ensureDropdownReady(),!this.hasAttribute(`active-tab`)&&a>=0&&this.activeTab!==a&&(this.activeTab=a),(e.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;let e=this._top,t=this._logoGroup;if(!e||!t)return;let n=window.innerWidth;this._desktop=n>=this.BP_MD;let r=e.clientWidth,i=this._overflows(this._util),a=!this._desktop||i;this._collapsed?!a&&r>=this._unlockAtWidth&&this._setCollapsed(!1):a&&(this._unlockAtWidth=r+this._HYST,this._setCollapsed(!0)),this._setTabsCollapsed(this._tabsOverflows());let o=!1;if(this.showSearch&&n>=this.BP_SM&&n<this.BP_MD&&this._searchWrap){let i=getComputedStyle(this._searchWrap),a=Math.max(this._num(i.minWidth,this._tokenPx(`--scb-header-search-min`,250)),this._tokenPx(`--scb-header-search-min`,250)),s=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),c=this.showDrawer&&(this.alwaysShowMenuButton||n<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx(`--icon-size-extra-extra-large`,48):0;o=t.getBoundingClientRect().width+s+a+s+c+8>r+.5}this._setHideSearch(o);let s=!1,c=this.renderRoot.querySelector(`.actions`),l=Array.from(c?.querySelectorAll(`.header-icon-button`)??[]).filter(e=>this._visible(e));if(l.length>0&&!this._visible(this._util)&&!this._visible(this._searchWrap)){let n=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),i=c?this._num(getComputedStyle(c).columnGap,0):0,a=l.reduce((e,t)=>e+t.getBoundingClientRect().width,0)+i*Math.max(0,l.length-1);this._hideLogoText&&this.removeAttribute(`data-hide-logo-text`);let o=t.getBoundingClientRect().width;this._hideLogoText&&this.setAttribute(`data-hide-logo-text`,``),s=o+n+a+(this._hideLogoText?this._HYST:0)>r+.5}this._setHideLogoText(s)},this._onGlobalFocusRingKeydown=e=>{e.key===`Tab`&&(this.toggleAttribute(`data-keyboard-focus`,!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute(`data-keyboard-focus`)},this._onLocalFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(`:focus-visible`)&&this._ensureFocusRingReady()},this._onDrawerOpened=()=>{this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent(`drawer-open`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`draweropen`,{bubbles:!0,composed:!0}))},this._onDrawerClosed=()=>{this._menuExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent(`drawer-close`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`drawerclose`,{bubbles:!0,composed:!0}))},this._onMenuClick=async e=>{this.showDrawer&&(this._setMobileSearchOpen(!1),this.dispatchEvent(new CustomEvent(`menu-click`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`menuclick`,{bubbles:!0,composed:!0})),!this._drawerReady&&(e.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{let e=!this._mobileSearchOpen;this._setMobileSearchOpen(e),e&&this.updateComplete.then(()=>{this.renderRoot.querySelector(`.mobile-search-panel .header-search-input`)?.focus?.()})},this._onTabClick=e=>{let t=e.currentTarget;if(!t)return;let n=t.tagName.toLowerCase()===`a`;if(n&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;let r=t.getAttribute(`data-index`),i=r==null?0:Number(r),a=this._getNavItems()[i];if(a?.kind===`dropdown`)return;this.activeTab=i;let o=a?.kind===`tab`?a.href??``:``,s=new CustomEvent(`tab-change`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0}),c=new CustomEvent(`tabchange`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(s)&&this.dispatchEvent(c))&&n&&e.preventDefault()},this._onDropdownTabActivate=e=>{let t=e.detail?.dataIndex,n=typeof t==`number`?t:typeof t==`string`?Number(t):this._readTabIndexFromEvent(e);if(n==null||!Number.isFinite(n))return;let r=this._getNavItems();n<0||n>=r.length||r[n]?.kind===`dropdown`&&(this.activeTab=n,this.dispatchEvent(new CustomEvent(`tab-change`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent(`tabchange`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=e=>{let t=e.key;if(t!==`ArrowLeft`&&t!==`ArrowRight`&&t!==`Home`&&t!==`End`)return;let n=this._getNavItems();if(!n.length)return;let r=this._readTabIndexFromEvent(e);if(r==null)return;let i=Math.max(0,Math.min(n.length-1,r));t===`ArrowRight`?i=(i+1)%n.length:t===`ArrowLeft`?i=(i-1+n.length)%n.length:t===`Home`?i=0:t===`End`&&(i=n.length-1),e.preventDefault(),this._focusTabAtIndex(i)},this._onNativeSearchInput=e=>{let t=e.currentTarget;this._emitSearchInput(t?.value??``)},this._onNativeSearchSubmit=e=>{e.preventDefault();let t=e.currentTarget?.querySelector(`.header-search-input`);this._emitSearchChange(t?.value??``)},this._onSearchClear=()=>{this.searchText=``,this.dispatchEvent(new CustomEvent(`search-text-change`,{detail:{value:``},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchtextchange`,{detail:{value:``},bubbles:!0,composed:!0}))},this._onNativeSearchClear=e=>{e.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{let t=(e.currentTarget?.closest(`form`))?.querySelector(`.header-search-input`);t&&(t.value=``),t?.focus()})};let e=++Tf;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}static{this._JSON_ARRAY={fromAttribute:e=>{if(e==null||e===``)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute:e=>e==null?null:JSON.stringify(e)}}requestLayout(){this.layoutPending||(this.setAttribute(`data-layout-settling`,``),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute(`data-layout-settling`))}))}static{this.BP_SM_DEFAULT=600}static{this.BP_MD_DEFAULT=840}get _HYST(){return this._tokenPx(`--spacing-11`,64)}get BP_SM(){return this._tokenPx(`--bp-sm`,wf.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx(`--bp-md`,wf.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}static{this.styles=p`
14387
+ `,document.head.appendChild(e);let t=e=>{let t=String(e??``).trim();if(t){if(/^\d+$/.test(t)){let e=Math.max(0,Math.min(14,parseInt(t,10)));return`var(--spacing-${e}, ${Df[e]}px)`}return t}},n=e=>{let t=String(e??``).trim();if(!t)return!1;try{let e=JSON.parse(t);return Array.isArray(e)&&e.length>0}catch{return!1}},r=e=>e!=null&&!/^(false|0|off|no)$/i.test(e.trim()),i=e=>{for(let t of Array.from(e.children)){if(Ef.has(t.getAttribute(`slot`)??``))continue;let e=t.tagName.toLowerCase();if(e===`scb-header-tab`||e===`scb-dropdown`)return!0}return!1},a=e=>{i(e)||n(e.getAttribute(`tabs`))||r(e.getAttribute(`reserve-tabs`))||r(e.getAttribute(`layout-pending`))?e.setAttribute(`data-pre-has-tabs`,``):e.removeAttribute(`data-pre-has-tabs`);let a=t(e.getAttribute(`spacing`)),o=t(e.getAttribute(`spacing-top`))??a,s=t(e.getAttribute(`spacing-bottom`))??a,c=t(e.getAttribute(`padding-inline`)),l=t(e.getAttribute(`padding-inline-expanded`))??c;o?e.style.setProperty(`--scb-header-spacing-block-start`,o):e.style.removeProperty(`--scb-header-spacing-block-start`),s?e.style.setProperty(`--scb-header-spacing-block-end`,s):e.style.removeProperty(`--scb-header-spacing-block-end`),c?e.style.setProperty(`--scb-header-padding-inline`,c):e.style.removeProperty(`--scb-header-padding-inline`),l?e.style.setProperty(`--scb-header-padding-inline-expanded`,l):e.style.removeProperty(`--scb-header-padding-inline-expanded`);let u=(e.getAttribute(`logo-width`)??``).trim();u?e.style.setProperty(`--scb-header-pre-logo-w`,u):e.style.removeProperty(`--scb-header-pre-logo-w`);let d=(e.getAttribute(`logo-height`)??``).trim();d?e.style.setProperty(`--scb-header-pre-logo-img-h`,d):e.style.removeProperty(`--scb-header-pre-logo-img-h`);let f=(e.getAttribute(`search-height`)??``).trim();f?e.style.setProperty(`--scb-header-pre-control-size`,f):e.style.removeProperty(`--scb-header-pre-control-size`)};document.querySelectorAll(`scb-header`).forEach(a);let o=new MutationObserver(e=>{for(let t of e){if(t.type===`attributes`){let e=t.target;e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-header`&&a(e);continue}if(t.type===`childList`){let e=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let t of e){if(!(t instanceof HTMLElement))continue;if(t.tagName.toLowerCase()===`scb-header`){a(t);continue}let e=t.closest?.(`scb-header`);e&&a(e)}}}});o.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabs`,`spacing`,`spacing-top`,`spacing-bottom`,`padding-inline`,`padding-inline-expanded`,`logo-width`,`logo-height`,`logo-aspect-ratio`,`logo-alt`,`logotype-text`,`search-height`,`reserve-tabs`,`layout-pending`]}),customElements.whenDefined(`scb-header`).then(()=>{o.disconnect()})})();var Of={fromAttribute:e=>e==null||!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},kf={fromAttribute:e=>e!=null&&!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},Af={fromAttribute:e=>e===`small`||e===`medium`||e===`large`?e:`medium`,toAttribute:e=>{let t=String(e??``);return t===`small`||t===`medium`||t===`large`?t:null}},Z=class extends C{static{wf=this}constructor(){super(),this.maxWidth=`1440px`,this.size=lc[`scb-header`].size,this.logoText=``,this.logotypeText=``,this.logoAlt=``,this.logoHref=`/`,this.logoSrc=``,this.logoWidth=``,this.logoHeight=``,this.logoAspectRatio=``,this.logoInvertDm=!1,this.banner=!1,this.tabs=[],this.activeTab=null,this.reserveTabs=!1,this.layoutPending=!1,this.utilityItems=[],this.searchButtonLabel=`Sök`,this.searchClearLabel=`Rensa sökfält`,this.searchCloseLabel=`Stäng sök`,this.menuButtonLabel=`Meny`,this.menuOpenLabel=`Öppna meny`,this.utilityNavigationLabel=`Funktionslänkar`,this.mainNavigationLabel=`Huvudnavigering`,this.deferDrawer=!1,this.showDrawer=!0,this.alwaysShowMenuButton=!1,this.showSearch=!0,this.includeUtilityInMenu=!1,this.drawerOverlay=!0,this.searchText=``,this._drawerId=`main-drawer`,this._menuExpanded=!1,this._searchId=`header-search`,this._drawerReady=!1,this._mobileSearchOpen=!1,this._initialUpgradeComplete=!1,this._slotNavItems=[],this._slotUtils=[],this._slotMenu=[],this._hasResponsiveActions=!1,this._observedLayout=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this.layoutPending||this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{window.innerWidth>=this.BP_SM&&this._mobileSearchOpen&&this._setMobileSearchOpen(!1),this._scheduleMeasure()},this._onMenuSelect=e=>{e.stopPropagation();let t=e.detail;this.dispatchEvent(new CustomEvent(`scb-menu-select`,{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbmenuselect`,{detail:t,bubbles:!0,composed:!0}));let n=t?.item,r=typeof t?.href==`string`?t.href:typeof t?.itemHref==`string`?t.itemHref:typeof t?.item_href==`string`?t.item_href:``,i=n?n.getAttribute(`item-href`)??n.getAttribute(`href`)??``:``;String(r||i||``).trim()&&this._closeDrawerNow()},this._onMenuSelectAlias=e=>{e.stopPropagation()},this._collapsed=!1,this._unlockAtWidth=0,this._tabsCollapsed=!1,this._desktop=typeof window<`u`&&window.innerWidth>=wf.BP_MD_DEFAULT,this._hideLogoText=!1,this._slotWatchers=[],this._harvestPending=!1,this._onActionsSlotChange=()=>{this._hasResponsiveActions=this._customActions.some(e=>e.slot!==`actions`),this._observeLayout(),this._scheduleMeasure()},this._harvest=(e={})=>{let t=Array.from(this.children);this._hasResponsiveActions=t.some(e=>{let t=e.getAttribute(`slot`)??``;return t!==`actions`&&Ef.has(t)});let n=[],r=[],i=[],a=-1,o=!1,s=e=>({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??void 0,icon:e.getAttribute(`icon`)??void 0}),c=e=>{e.hasAttribute(`role`)&&e.removeAttribute(`role`),e.hasAttribute(`hidden`)||e.setAttribute(`hidden`,``),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`)};for(let e of t){if(Ef.has(e.getAttribute(`slot`)??``))continue;let t=e.tagName.toLowerCase();if(this._isDrawerCloseNode(e)){this._syncDrawerCloseNode(e);continue}if(t===`scb-header-tab`){c(e);let t=e.getAttribute(`label`)??``,r=e.getAttribute(`href`),i=r&&r.trim()!==``?r:void 0;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length),n.push({kind:`tab`,label:t,href:i});continue}if(t===`scb-badge`){let t=e.querySelector(`scb-dropdown`);if(t){o=!0;let r=t.getAttribute(`label`)??``;(t.hasAttribute(`selected`)||t.getAttribute(`selected`)===`true`||t.getAttribute(`active`)===`true`||t.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let i=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==i&&e.setAttribute(`slot`,i),t.hasAttribute(`slot`)&&t.removeAttribute(`slot`),t.hasAttribute(`as-tab`)||t.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:i,label:r});continue}}if(t===`scb-dropdown`){o=!0;let t=e.getAttribute(`label`)??``;(e.hasAttribute(`selected`)||e.getAttribute(`selected`)===`true`||e.getAttribute(`active`)===`true`||e.getAttribute(`aria-current`)===`page`)&&a===-1&&(a=n.length);let r=`scb-header-tab-${n.length}`;e.getAttribute(`slot`)!==r&&e.setAttribute(`slot`,r),e.hasAttribute(`as-tab`)||e.setAttribute(`as-tab`,``),n.push({kind:`dropdown`,slotName:r,label:t});continue}if(t===`scb-header-utility`){c(e),r.push({label:e.getAttribute(`label`)??``,href:e.getAttribute(`href`)??`#`,target:e.getAttribute(`target`)??void 0});continue}if(t===`scb-header-menu-group`){c(e);let t={label:e.getAttribute(`label`)??``,icon:e.getAttribute(`icon`)??void 0,children:[]};e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t.children.push(s(e))),i.push(t);continue}if(t===`scb-header-menu-item`){c(e),i.push(s(e));continue}e.hasAttribute(`slot`)||c(e)}let l=!this._sameNavItems(this._slotNavItems,n),u=!this._sameUtilityItems(this._slotUtils,r),d=!this._sameMenuNodes(this._slotMenu,i);l&&(this._slotNavItems=n),u&&(this._slotUtils=r),d&&(this._slotMenu=i),o&&this._ensureDropdownReady(),!this.hasAttribute(`active-tab`)&&a>=0&&this.activeTab!==a&&(this.activeTab=a),(e.scheduleMeasure??!0)&&queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{if(this.layoutPending)return;let e=this._top,t=this._logoGroup;if(!e||!t)return;let n=window.innerWidth;this._desktop=n>=this.BP_MD;let r=e.clientWidth,i=this._overflows(this._util),a=!this._desktop||i;this._collapsed?!a&&r>=this._unlockAtWidth&&this._setCollapsed(!1):a&&(this._unlockAtWidth=r+this._HYST,this._setCollapsed(!0)),this._setTabsCollapsed(this._tabsOverflows());let o=this.renderRoot.querySelector(`.actions`),s=this._customActions;for(let e of s)e.slot===`actions`||e.getClientRects().length>0||(e.matches(`scb-dropdown`)&&e.removeAttribute(`open`),e.querySelectorAll(`scb-dropdown[open]`).forEach(e=>e.removeAttribute(`open`)));let c=s.filter(e=>!e.hidden&&(this._hasResponsiveActions?e.getClientRects().length>0:this._visible(e))),l=o?this._num(getComputedStyle(o).columnGap,0):0,u=!1;if(this.showSearch&&n>=this.BP_SM&&n<this.BP_MD&&this._searchWrap){let i=getComputedStyle(this._searchWrap),a=Math.max(this._num(i.minWidth,this._tokenPx(`--scb-header-search-min`,250)),this._tokenPx(`--scb-header-search-min`,250)),o=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),s=this.showDrawer&&(this.alwaysShowMenuButton||n<this.BP_MD||this._collapsed)?this._menuBtn?.getBoundingClientRect().width||this._tokenPx(`--icon-size-extra-extra-large`,48):0;u=t.getBoundingClientRect().width+o+a+o+s+c.reduce((e,t)=>e+t.getBoundingClientRect().width+l,0)+8>r+.5}this._setHideSearch(u);let d=!1,f=[...Array.from(o?.querySelectorAll(`.header-icon-button`)??[]),...c].filter(e=>this._visible(e));if(f.length>0&&!this._visible(this._util)&&!this._visible(this._searchWrap)){let n=this._num(getComputedStyle(e).gap,this._tokenPx(`--spacing-7`,24)),i=f.reduce((e,t)=>e+t.getBoundingClientRect().width,0)+l*Math.max(0,f.length-1);this._hideLogoText&&this.removeAttribute(`data-hide-logo-text`);let a=t.getBoundingClientRect().width;this._hideLogoText&&this.setAttribute(`data-hide-logo-text`,``),d=a+n+i+(this._hideLogoText?this._HYST:0)>r+.5}this._setHideLogoText(d)},this._onGlobalFocusRingKeydown=e=>{e.key===`Tab`&&(this.toggleAttribute(`data-keyboard-focus`,!0),this._ensureFocusRingReady())},this._onGlobalFocusRingPointerDown=()=>{this.removeAttribute(`data-keyboard-focus`)},this._onLocalFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(`:focus-visible`)&&this._ensureFocusRingReady()},this._onDrawerOpened=()=>{this._menuExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent(`drawer-open`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`draweropen`,{bubbles:!0,composed:!0}))},this._onDrawerClosed=()=>{this._menuExpanded=!1,this._syncMenuBtnAria(),this._hasResponsiveActions&&requestAnimationFrame(()=>{if(!this.isConnected||this._menuExpanded)return;let e=this.renderRoot.querySelector(`scb-drawer`),t=this.shadowRoot?.activeElement??this.ownerDocument.activeElement;(!t||t===this.ownerDocument.body||t===e||e?.contains(t))&&this._menuBtn?.focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent(`drawer-close`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`drawerclose`,{bubbles:!0,composed:!0}))},this._onMenuClick=async e=>{this.showDrawer&&(this._setMobileSearchOpen(!1),this.dispatchEvent(new CustomEvent(`menu-click`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`menuclick`,{bubbles:!0,composed:!0})),!this._drawerReady&&(e.stopPropagation(),await this._ensureDrawerReady(),await this.updateComplete,this._openDrawerNow()))},this._onMobileSearchToggle=()=>{let e=!this._mobileSearchOpen;this._setMobileSearchOpen(e),e&&this.updateComplete.then(()=>{this.renderRoot.querySelector(`.mobile-search-panel .header-search-input`)?.focus?.()})},this._onTabClick=e=>{let t=e.currentTarget;if(!t)return;let n=t.tagName.toLowerCase()===`a`;if(n&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;let r=t.getAttribute(`data-index`),i=r==null?0:Number(r),a=this._getNavItems()[i];if(a?.kind===`dropdown`)return;this.activeTab=i;let o=a?.kind===`tab`?a.href??``:``,s=new CustomEvent(`tab-change`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0}),c=new CustomEvent(`tabchange`,{detail:{index:i,href:o},bubbles:!0,composed:!0,cancelable:!0});!(this.dispatchEvent(s)&&this.dispatchEvent(c))&&n&&e.preventDefault()},this._onDropdownTabActivate=e=>{let t=e.detail?.dataIndex,n=typeof t==`number`?t:typeof t==`string`?Number(t):this._readTabIndexFromEvent(e);if(n==null||!Number.isFinite(n))return;let r=this._getNavItems();n<0||n>=r.length||r[n]?.kind===`dropdown`&&(this.activeTab=n,this.dispatchEvent(new CustomEvent(`tab-change`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent(`tabchange`,{detail:{index:n,href:``},bubbles:!0,composed:!0,cancelable:!0})))},this._onTabsKeydown=e=>{let t=e.key;if(t!==`ArrowLeft`&&t!==`ArrowRight`&&t!==`Home`&&t!==`End`)return;let n=this._getNavItems();if(!n.length)return;let r=this._readTabIndexFromEvent(e);if(r==null)return;let i=Math.max(0,Math.min(n.length-1,r));t===`ArrowRight`?i=(i+1)%n.length:t===`ArrowLeft`?i=(i-1+n.length)%n.length:t===`Home`?i=0:t===`End`&&(i=n.length-1),e.preventDefault(),this._focusTabAtIndex(i)},this._onNativeSearchInput=e=>{let t=e.currentTarget;this._emitSearchInput(t?.value??``)},this._onNativeSearchSubmit=e=>{e.preventDefault();let t=e.currentTarget?.querySelector(`.header-search-input`);this._emitSearchChange(t?.value??``)},this._onSearchClear=()=>{this.searchText=``,this.dispatchEvent(new CustomEvent(`search-text-change`,{detail:{value:``},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchtextchange`,{detail:{value:``},bubbles:!0,composed:!0}))},this._onNativeSearchClear=e=>{e.preventDefault(),this._onSearchClear(),this.updateComplete.then(()=>{let t=(e.currentTarget?.closest(`form`))?.querySelector(`.header-search-input`);t&&(t.value=``),t?.focus()})};let e=++Tf;this._drawerId=`scb-header-drawer-${e}`,this._searchId=`scb-header-search-${e}`}static{this._JSON_ARRAY={fromAttribute:e=>{if(e==null||e===``)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute:e=>e==null?null:JSON.stringify(e)}}requestLayout(){this.layoutPending||(this.setAttribute(`data-layout-settling`,``),this.updateComplete.then(()=>{this.isConnected&&(this._measure(),this.removeAttribute(`data-layout-settling`))}))}static{this.BP_SM_DEFAULT=600}static{this.BP_MD_DEFAULT=840}get _HYST(){return this._tokenPx(`--spacing-11`,64)}get BP_SM(){return this._tokenPx(`--bp-sm`,wf.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx(`--bp-md`,wf.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}static{this.styles=p`
14388
14388
  :host {
14389
14389
  /* Headertext: base text current. JSON-källa: src/tokens/source/typography.json. */
14390
14390
  --scb-header-search-text-font-weight-current: var(--scb-header-design-search-text-large-font-weight);
@@ -14811,6 +14811,28 @@
14811
14811
  min-width: 0;
14812
14812
  }
14813
14813
 
14814
+ slot[name='search'],
14815
+ slot[name='actions'],
14816
+ slot[name='actions-desktop'] {
14817
+ display: contents;
14818
+ }
14819
+
14820
+ slot[name='actions-mobile'] {
14821
+ display: none;
14822
+ }
14823
+
14824
+ @media (max-width: 839.98px) {
14825
+ slot[name='actions-desktop'] { display: none; }
14826
+ slot[name='actions-mobile'] { display: contents; }
14827
+ }
14828
+
14829
+ ::slotted([slot='search']),
14830
+ ::slotted([slot='actions']),
14831
+ ::slotted([slot='actions-desktop']),
14832
+ ::slotted([slot='actions-mobile']) {
14833
+ flex-shrink: 0;
14834
+ }
14835
+
14814
14836
  .utility {
14815
14837
  display: none;
14816
14838
  flex-wrap: nowrap;
@@ -14823,6 +14845,7 @@
14823
14845
  display: flex;
14824
14846
  }
14825
14847
  }
14848
+ :host([data-no-utility]) .utility,
14826
14849
  :host([data-collapsed]) .utility {
14827
14850
  display: none !important;
14828
14851
  }
@@ -15650,7 +15673,7 @@
15650
15673
  }
15651
15674
 
15652
15675
  /* design:bindings:scb-header:end */
15653
- `}get _top(){return this.renderRoot.querySelector(`.top-row`)}get _util(){return this.renderRoot.querySelector(`.utility`)}get _logoGroup(){return this.renderRoot.querySelector(`.logo-wrap`)||this.renderRoot.querySelector(`.logo-group`)}get _searchWrap(){return this.renderRoot.querySelector(`.search`)}get _menuBtn(){return this.renderRoot.querySelector(`.menu-trigger`)}get _tabsNav(){return this.renderRoot.querySelector(`.tabs-nav`)}_attachSlotObservers(){this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[];let e=[`label`,`href`,`icon`,`target`,`selected`,`aria-current`,`active`,`role`],t=t=>{let n=new MutationObserver(e=>{this._scheduleHarvest()});this._slotWatchers.push(n),n.observe(t,{attributes:!0,attributeFilter:e})},n=()=>{this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[];let e=Array.from(this.children);for(let r of e){let e=r.tagName.toLowerCase();if((e===`scb-header-tab`||e===`scb-dropdown`||e===`scb-header-utility`||e===`scb-header-menu-item`||e===`scb-header-menu-group`||e===`scb-badge`)&&t(r),e===`scb-badge`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0});let a=e.querySelector(`scb-dropdown`);a&&t(a);continue}if(e===`scb-header-menu-group`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0,subtree:!0}),e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t(e))}}},r=new MutationObserver(e=>{let t=!1;for(let n of e)if(n.type===`childList`){t=!0;break}t&&n(),this._scheduleHarvest()});this._slotMo=r,r.observe(this,{childList:!0}),n()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.kind!==i.kind||r.label!==i.label)return!1;if(r.kind===`tab`&&i.kind===`tab`){if((r.href??``)!==(i.href??``))return!1}else if(r.kind===`dropdown`&&i.kind===`dropdown`&&r.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||r.href!==i.href||(r.target??``)!==(i.target??``))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||(r.href??``)!==(i.href??``)||(r.icon??``)!==(i.icon??``)||!this._sameMenuNodes(r.children??[],i.children??[]))return!1}return!0}_isDrawerCloseNode(e){let t=e.tagName.toLowerCase(),n=e.getAttribute(`slot`);if(n===`drawer-close`)return!0;if(n||t!==`scb-icon-button`)return!1;let r=(e.getAttribute(`icon`)??``).trim().toLowerCase(),i=(e.getAttribute(`aria-label`)??``).trim().toLowerCase();return r===`close`||i.includes(`stäng`)||i.includes(`close`)}_syncDrawerCloseNode(e){e.getAttribute(`slot`)!==`drawer-close`&&e.setAttribute(`slot`,`drawer-close`),e.setAttribute(`data-drawer-close`,this._drawerId),e.setAttribute(`aria-controls`,this._drawerId),this._drawerReady?(e.removeAttribute(`hidden`),e.removeAttribute(`aria-hidden`)):(e.hasAttribute(`hidden`)||e.setAttribute(`hidden`,``),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`))}_syncDrawerCloseNodes(){for(let e of Array.from(this.children))this._isDrawerCloseNode(e)&&this._syncDrawerCloseNode(e)}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute(`data-collapsed`,``):this.removeAttribute(`data-collapsed`))}_setHideSearch(e){e?this.setAttribute(`data-hide-search`,``):this.removeAttribute(`data-hide-search`)}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute(`data-hide-logo-text`,``):this.removeAttribute(`data-hide-logo-text`))}_setMobileSearchOpen(e){this._mobileSearchOpen!==e&&(this._mobileSearchOpen=e,this.toggleAttribute(`data-mobile-search-open`,e))}_num(e,t){let n=Number.parseFloat(String(e??``).trim());return Number.isFinite(n)?n:t}_tokenPx(e,t){let n=getComputedStyle(this);return this._num(n.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!==`none`:!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}_tabsOverflows(){let e=this._tabsNav,t=e?.closest(`.tabs-row`);if(!e||!t||!this._desktop||!this.showDrawer)return!1;let n=t.querySelector(`.menu-trigger--tabs-right`),r=n&&(this.alwaysShowMenuButton||this._collapsed),i=r?n.getBoundingClientRect().width:0,a=r?this._num(getComputedStyle(t).columnGap,0):0,o=t.getBoundingClientRect().width-i-a;return e.getBoundingClientRect().width>o+.5}_setTabsCollapsed(e){if(this._tabsCollapsed===e)return;let t=this._tabsNav,n=e&&!!t?.contains(this.shadowRoot?.activeElement??null);if(e)for(let e of this._getNavItems()){if(e.kind!==`dropdown`)continue;let t=this._getDropdownForSlot(e.slotName);n||=t===document.activeElement,t?.removeAttribute(`open`)}this._tabsCollapsed=e,this.toggleAttribute(`data-tabs-collapsed`,e),n&&this.updateComplete.then(()=>this._menuBtn?.focus())}_observeLayout(){let e=[this._top,this._tabsNav,this._tabsNav?.closest(`.tabs-row`),this._menuBtn].filter(e=>!!e);if(!(e.length===this._observedLayout.length&&e.every((e,t)=>e===this._observedLayout[t]))){this._ro?.disconnect(),this._observedLayout=e;for(let t of e)this._ro?.observe(t,{box:`border-box`})}}connectedCallback(){super.connectedCallback(),window.addEventListener(`keydown`,this._onGlobalFocusRingKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalFocusRingPointerDown,!0),this._initialUpgradeComplete||this.setAttribute(`data-upgrading`,``),this._harvest({scheduleMeasure:!1}),this._attachSlotObservers()}_finishInitialUpgrade(){this._initialUpgradeComplete||(this._initialUpgradeComplete=!0,requestAnimationFrame(()=>{this.isConnected&&(this._measure(),this.removeAttribute(`data-upgrading`))}))}firstUpdated(){this._syncLandmarkAttributes(),this.renderRoot.addEventListener(`focusin`,this._onLocalFocusIn),this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),this.updateComplete.then(()=>{this._harvest({scheduleMeasure:!1}),this._attachSlotObservers(),this._syncDropdownTabs(),this._finishInitialUpgrade()}),this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._observeLayout(),window.addEventListener(`resize`,this._onWindowResize,{passive:!0})}updated(e){e.has(`searchMax`)&&this.style.setProperty(`--scb-header-search-max`,this.searchMax??`380px`),e.has(`searchMin`)&&this.style.setProperty(`--scb-header-search-min`,this.searchMin??`250px`),e.has(`searchHeight`)&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty(`--scb-search-height`,this.searchHeight.trim()):this.style.removeProperty(`--scb-search-height`)),(e.has(`logoWidth`)||e.has(`logoHeight`)||e.has(`logoAspectRatio`))&&this._applyLogoSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`))&&this._applySpacing(),(e.has(`paddingInline`)||e.has(`paddingInlineExpanded`))&&this._applyPaddingInline(),(e.has(`banner`)||e.has(`bannerLabel`))&&this._syncLandmarkAttributes(),(e.has(`utilityItems`)||e.has(`_collapsed`)||e.has(`_tabsCollapsed`)||e.has(`_desktop`)||e.has(`_mobileSearchOpen`)||e.has(`tabs`)||e.has(`logoText`)||e.has(`logotypeText`)||e.has(`logoSrc`)||e.has(`logoWidth`)||e.has(`logoHeight`)||e.has(`logoAspectRatio`)||e.has(`activeTab`)||e.has(`_slotNavItems`)||e.has(`_slotUtils`)||e.has(`_slotMenu`)||e.has(`showDrawer`)||e.has(`alwaysShowMenuButton`)||e.has(`showSearch`)||e.has(`layoutPending`)||e.has(`searchMax`)||e.has(`searchMin`)||e.has(`paddingInline`)||e.has(`paddingInlineExpanded`)||e.has(`size`))&&this.updateComplete.then(()=>{this._observeLayout(),this._scheduleMeasure()}),(e.has(`showDrawer`)||e.has(`deferDrawer`))&&this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),e.has(`showSearch`)&&!this.showSearch&&this._setMobileSearchOpen(!1),e.has(`layoutPending`)&&!this.layoutPending&&this.requestLayout(),(e.has(`activeTab`)||e.has(`_slotNavItems`)||e.has(`tabs`)||e.has(`size`))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._observedLayout=[],this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[],this.renderRoot.removeEventListener(`focusin`,this._onLocalFocusIn),window.removeEventListener(`keydown`,this._onGlobalFocusRingKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalFocusRingPointerDown,!0),window.removeEventListener(`resize`,this._onWindowResize),super.disconnectedCallback()}_mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t){if(/^\d+$/.test(t)){let e=Math.max(0,Math.min(14,parseInt(t,10)));return`var(--spacing-${e}, ${Ef[e]}px)`}return t}}_applySpacing(){let e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,n=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty(`--scb-header-spacing-block-start`,t):this.style.removeProperty(`--scb-header-spacing-block-start`),n?this.style.setProperty(`--scb-header-spacing-block-end`,n):this.style.removeProperty(`--scb-header-spacing-block-end`)}_applyPaddingInline(){let e=this._mapSpacingToken(this.paddingInline),t=this._mapSpacingToken(this.paddingInlineExpanded)??e;e?this.style.setProperty(`--scb-header-padding-inline`,e):this.style.removeProperty(`--scb-header-padding-inline`),t?this.style.setProperty(`--scb-header-padding-inline-expanded`,t):this.style.removeProperty(`--scb-header-padding-inline-expanded`)}_syncLandmarkAttributes(){let e=this.renderRoot.querySelector(`.header-landmark`);if(!e)return;if(!this.banner){e.removeAttribute(`role`),e.removeAttribute(`aria-label`);return}e.setAttribute(`role`,`banner`);let t=(this.bannerLabel??``).trim();t?e.setAttribute(`aria-label`,t):e.removeAttribute(`aria-label`)}_applyLogoSizing(){let e=(this.logoWidth??``).trim(),t=(this.logoHeight??``).trim(),n=(this.logoAspectRatio??``).trim();e?this.style.setProperty(`--scb-header-logo-img-w`,e):this.style.removeProperty(`--scb-header-logo-img-w`),t?this.style.setProperty(`--scb-header-logo-img-h`,t):e?this.style.setProperty(`--scb-header-logo-img-h`,`auto`):this.style.removeProperty(`--scb-header-logo-img-h`),n?this.style.setProperty(`--scb-header-logo-img-aspect-ratio`,n):this.style.removeProperty(`--scb-header-logo-img-aspect-ratio`)}_closeDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get(`md-focus-ring`)||(this._focusRingImportPromise??=Promise.resolve().then(()=>(j(),nc)),this._focusRingImportPromise.then(({ensureFocusRingReady:e})=>{e()}))}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??=Promise.all([Promise.resolve().then(()=>(gd(),pd)),Promise.resolve().then(()=>(hf(),pf)),Promise.resolve().then(()=>(Tu(),Cu)),Promise.resolve().then(()=>(bf(),gf)).then(e=>{this._drawerRenderer=e}),this._ensureDrawerSlotComponentsReady()]).then(()=>void 0),await this._drawerImportPromise,this._drawerReady=!0,this._syncDrawerCloseNodes())}_drawerSlotContains(e){return[...this.querySelectorAll(`[slot="drawer-menu"], [slot="drawer-close"]`)].some(t=>t.matches(e)||!!t.querySelector(e))}async _ensureDrawerSlotComponentsReady(){this.querySelector(`[slot="drawer-menu"], [slot="drawer-close"]`)&&await Promise.all([this._drawerSlotContains(`scb-button`)?Promise.resolve().then(()=>(Mc(),Dc)):Promise.resolve(),this._drawerSlotContains(`scb-icon-button`)?Promise.resolve().then(()=>(dl(),il)):Promise.resolve(),this._drawerSlotContains(`scb-skeleton`)?Promise.resolve().then(()=>(Cf(),xf)):Promise.resolve(),this._drawerSlotContains(`scb-grid`)?Promise.resolve().then(()=>(zd(),Ld)):Promise.resolve(),this._drawerSlotContains(`scb-grid-item`)?Promise.resolve().then(()=>(Nd(),Ad)):Promise.resolve()])}async _ensureDropdownReady(){customElements.get(`scb-dropdown`)||(this._dropdownImportPromise??=Promise.resolve().then(()=>(wd(),Cd)).then(()=>void 0),await this._dropdownImportPromise)}_syncMenuBtnAria(){this.renderRoot.querySelectorAll(`.menu-trigger`).forEach(e=>{e.setAttribute(`aria-expanded`,String(this._menuExpanded))})}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:`tab`,...e}))}_getDropdownForSlot(e){let t=this.querySelector(`[slot="${e}"]`);return t?t.tagName.toLowerCase()===`scb-dropdown`?t:t.querySelector(`scb-dropdown`):null}_syncDropdownTabs(){this._getNavItems().forEach((e,t)=>{if(e.kind!==`dropdown`)return;let n=this._getDropdownForSlot(e.slotName);if(!n)return;let r=String(t);n.getAttribute(`data-index`)!==r&&n.setAttribute(`data-index`,r),n.hasAttribute(`as-tab`)||n.setAttribute(`as-tab`,``);let i=this.size,a=n;a?.size!==i&&(a.size=i),t===this.activeTab?n.getAttribute(`aria-current`)!==`page`&&n.setAttribute(`aria-current`,`page`):n.hasAttribute(`aria-current`)&&n.removeAttribute(`aria-current`)})}_readTabIndexFromEvent(e){let t=e.composedPath?e.composedPath():[];for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-index`);if(t==null)continue;let n=Number(t);if(Number.isFinite(n))return n}return null}_focusTabAtIndex(e){let t=this._getNavItems()[e];if(t){if(t.kind===`dropdown`){this._getDropdownForSlot(t.slotName)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}}_syncFlags(e,t){this.toggleAttribute(`data-no-utility`,e),this.toggleAttribute(`data-no-search`,t)}_emitSearchInput(e){this.searchText=e,this.dispatchEvent(new CustomEvent(`search-input`,{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchinput`,{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`search-text-change`,{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchtextchange`,{detail:{value:this.searchText},bubbles:!0,composed:!0}))}_emitSearchChange(e,t){this.searchText=e,this.dispatchEvent(new CustomEvent(`search-change`,{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchchange`,{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0}))}_renderMenuButton(e=``,t=!1){let n=e?`menu-trigger ${e}`:`menu-trigger`,r=(this.menuButtonLabel??``).trim(),i=(this.menuOpenLabel??``).trim()||r,a=this._menuExpanded?`true`:`false`;return t?x`
15676
+ `}get _top(){return this.renderRoot.querySelector(`.top-row`)}get _util(){return this.renderRoot.querySelector(`.utility`)}get _logoGroup(){return this.renderRoot.querySelector(`.logo-wrap`)||this.renderRoot.querySelector(`.logo-group`)}get _searchWrap(){return this.renderRoot.querySelector(`.search`)}get _menuBtn(){return this.renderRoot.querySelector(`.menu-trigger`)}get _tabsNav(){return this.renderRoot.querySelector(`.tabs-nav`)}get _customActions(){return[...this.renderRoot.querySelectorAll(`slot`)].filter(e=>Ef.has(e.name)).flatMap(e=>e.assignedElements({flatten:!0})).filter(e=>e instanceof HTMLElement)}_attachSlotObservers(){this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[];let e=[`label`,`href`,`icon`,`target`,`selected`,`aria-current`,`active`,`role`],t=t=>{let n=new MutationObserver(e=>{this._scheduleHarvest()});this._slotWatchers.push(n),n.observe(t,{attributes:!0,attributeFilter:e})},n=()=>{this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[];let e=Array.from(this.children);for(let r of e){if(Ef.has(r.getAttribute(`slot`)??``))continue;let e=r.tagName.toLowerCase();if((e===`scb-header-tab`||e===`scb-dropdown`||e===`scb-header-utility`||e===`scb-header-menu-item`||e===`scb-header-menu-group`||e===`scb-badge`)&&t(r),e===`scb-badge`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0});let a=e.querySelector(`scb-dropdown`);a&&t(a);continue}if(e===`scb-header-menu-group`){let e=r,i=new MutationObserver(e=>{n(),this._scheduleHarvest()});this._slotWatchers.push(i),i.observe(e,{childList:!0,subtree:!0}),e.querySelectorAll(`scb-header-menu-item`).forEach(e=>t(e))}}},r=new MutationObserver(e=>{let t=!1;for(let n of e)if(n.type===`childList`){t=!0;break}t&&n(),this._scheduleHarvest()});this._slotMo=r,r.observe(this,{childList:!0}),n()}_sameNavItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.kind!==i.kind||r.label!==i.label)return!1;if(r.kind===`tab`&&i.kind===`tab`){if((r.href??``)!==(i.href??``))return!1}else if(r.kind===`dropdown`&&i.kind===`dropdown`&&r.slotName!==i.slotName)return!1}return!0}_sameUtilityItems(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||r.href!==i.href||(r.target??``)!==(i.target??``))return!1}return!0}_sameMenuNodes(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.label!==i.label||(r.href??``)!==(i.href??``)||(r.icon??``)!==(i.icon??``)||!this._sameMenuNodes(r.children??[],i.children??[]))return!1}return!0}_isDrawerCloseNode(e){let t=e.tagName.toLowerCase(),n=e.getAttribute(`slot`);if(n===`drawer-close`)return!0;if(n||t!==`scb-icon-button`)return!1;let r=(e.getAttribute(`icon`)??``).trim().toLowerCase(),i=(e.getAttribute(`aria-label`)??``).trim().toLowerCase();return r===`close`||i.includes(`stäng`)||i.includes(`close`)}_syncDrawerCloseNode(e){e.getAttribute(`slot`)!==`drawer-close`&&e.setAttribute(`slot`,`drawer-close`),e.setAttribute(`data-drawer-close`,this._drawerId),e.setAttribute(`aria-controls`,this._drawerId),this._drawerReady?(e.removeAttribute(`hidden`),e.removeAttribute(`aria-hidden`)):(e.hasAttribute(`hidden`)||e.setAttribute(`hidden`,``),e.getAttribute(`aria-hidden`)!==`true`&&e.setAttribute(`aria-hidden`,`true`))}_syncDrawerCloseNodes(){for(let e of Array.from(this.children))this._isDrawerCloseNode(e)&&this._syncDrawerCloseNode(e)}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute(`data-collapsed`,``):this.removeAttribute(`data-collapsed`))}_setHideSearch(e){e?this.setAttribute(`data-hide-search`,``):this.removeAttribute(`data-hide-search`)}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute(`data-hide-logo-text`,``):this.removeAttribute(`data-hide-logo-text`))}_setMobileSearchOpen(e){this._mobileSearchOpen!==e&&(this._mobileSearchOpen=e,this.toggleAttribute(`data-mobile-search-open`,e))}_num(e,t){let n=Number.parseFloat(String(e??``).trim());return Number.isFinite(n)?n:t}_tokenPx(e,t){let n=getComputedStyle(this);return this._num(n.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!==`none`:!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}_tabsOverflows(){let e=this._tabsNav,t=e?.closest(`.tabs-row`);if(!e||!t||!this._desktop||!this.showDrawer)return!1;let n=t.querySelector(`.menu-trigger--tabs-right`),r=n&&(this.alwaysShowMenuButton||this._collapsed),i=r?n.getBoundingClientRect().width:0,a=r?this._num(getComputedStyle(t).columnGap,0):0,o=t.getBoundingClientRect().width-i-a;return e.getBoundingClientRect().width>o+.5}_setTabsCollapsed(e){if(this._tabsCollapsed===e)return;let t=this._tabsNav,n=e&&!!t?.contains(this.shadowRoot?.activeElement??null);if(e)for(let e of this._getNavItems()){if(e.kind!==`dropdown`)continue;let t=this._getDropdownForSlot(e.slotName);n||=t===document.activeElement,t?.removeAttribute(`open`)}this._tabsCollapsed=e,this.toggleAttribute(`data-tabs-collapsed`,e),n&&this.updateComplete.then(()=>this._menuBtn?.focus())}_observeLayout(){if(!this._ro)return;let e=[this._top,this._tabsNav,this._tabsNav?.closest(`.tabs-row`),this._menuBtn,...this._customActions].filter(e=>!!e);if(!(e.length===this._observedLayout.length&&e.every((e,t)=>e===this._observedLayout[t]))){this._ro?.disconnect(),this._observedLayout=e;for(let t of e)this._ro?.observe(t,{box:`border-box`})}}connectedCallback(){super.connectedCallback(),window.addEventListener(`keydown`,this._onGlobalFocusRingKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalFocusRingPointerDown,!0),this._initialUpgradeComplete||this.setAttribute(`data-upgrading`,``),this._harvest({scheduleMeasure:!1}),this._attachSlotObservers()}_finishInitialUpgrade(){this._initialUpgradeComplete||(this._initialUpgradeComplete=!0,requestAnimationFrame(()=>{this.isConnected&&(this._measure(),this.removeAttribute(`data-upgrading`))}))}firstUpdated(){this._syncLandmarkAttributes(),this.renderRoot.addEventListener(`focusin`,this._onLocalFocusIn),this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),this.updateComplete.then(()=>{this._harvest({scheduleMeasure:!1}),this._attachSlotObservers(),this._syncDropdownTabs(),this._finishInitialUpgrade()}),this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._observeLayout(),window.addEventListener(`resize`,this._onWindowResize,{passive:!0})}updated(e){e.has(`searchMax`)&&this.style.setProperty(`--scb-header-search-max`,this.searchMax??`380px`),e.has(`searchMin`)&&this.style.setProperty(`--scb-header-search-min`,this.searchMin??`250px`),e.has(`searchHeight`)&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty(`--scb-search-height`,this.searchHeight.trim()):this.style.removeProperty(`--scb-search-height`)),(e.has(`logoWidth`)||e.has(`logoHeight`)||e.has(`logoAspectRatio`))&&this._applyLogoSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`))&&this._applySpacing(),(e.has(`paddingInline`)||e.has(`paddingInlineExpanded`))&&this._applyPaddingInline(),(e.has(`banner`)||e.has(`bannerLabel`))&&this._syncLandmarkAttributes(),(e.has(`utilityItems`)||e.has(`_collapsed`)||e.has(`_tabsCollapsed`)||e.has(`_desktop`)||e.has(`_mobileSearchOpen`)||e.has(`tabs`)||e.has(`logoText`)||e.has(`logotypeText`)||e.has(`logoSrc`)||e.has(`logoWidth`)||e.has(`logoHeight`)||e.has(`logoAspectRatio`)||e.has(`activeTab`)||e.has(`_slotNavItems`)||e.has(`_slotUtils`)||e.has(`_slotMenu`)||e.has(`_hasResponsiveActions`)||e.has(`showDrawer`)||e.has(`alwaysShowMenuButton`)||e.has(`showSearch`)||e.has(`layoutPending`)||e.has(`searchMax`)||e.has(`searchMin`)||e.has(`paddingInline`)||e.has(`paddingInlineExpanded`)||e.has(`size`))&&this.updateComplete.then(()=>{this._observeLayout(),this._scheduleMeasure()}),(e.has(`showDrawer`)||e.has(`deferDrawer`))&&this.showDrawer&&!this.deferDrawer&&this._ensureDrawerReady(),e.has(`showSearch`)&&!this.showSearch&&this._setMobileSearchOpen(!1),e.has(`layoutPending`)&&!this.layoutPending&&this.requestLayout(),(e.has(`activeTab`)||e.has(`_slotNavItems`)||e.has(`tabs`)||e.has(`size`))&&this.updateComplete.then(()=>{this._syncDropdownTabs()})}disconnectedCallback(){this._ro?.disconnect(),this._observedLayout=[],this._slotMo?.disconnect(),this._slotWatchers.forEach(e=>e.disconnect()),this._slotWatchers=[],this.renderRoot.removeEventListener(`focusin`,this._onLocalFocusIn),window.removeEventListener(`keydown`,this._onGlobalFocusRingKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalFocusRingPointerDown,!0),window.removeEventListener(`resize`,this._onWindowResize),super.disconnectedCallback()}_mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t){if(/^\d+$/.test(t)){let e=Math.max(0,Math.min(14,parseInt(t,10)));return`var(--spacing-${e}, ${Df[e]}px)`}return t}}_applySpacing(){let e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,n=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty(`--scb-header-spacing-block-start`,t):this.style.removeProperty(`--scb-header-spacing-block-start`),n?this.style.setProperty(`--scb-header-spacing-block-end`,n):this.style.removeProperty(`--scb-header-spacing-block-end`)}_applyPaddingInline(){let e=this._mapSpacingToken(this.paddingInline),t=this._mapSpacingToken(this.paddingInlineExpanded)??e;e?this.style.setProperty(`--scb-header-padding-inline`,e):this.style.removeProperty(`--scb-header-padding-inline`),t?this.style.setProperty(`--scb-header-padding-inline-expanded`,t):this.style.removeProperty(`--scb-header-padding-inline-expanded`)}_syncLandmarkAttributes(){let e=this.renderRoot.querySelector(`.header-landmark`);if(!e)return;if(!this.banner){e.removeAttribute(`role`),e.removeAttribute(`aria-label`);return}e.setAttribute(`role`,`banner`);let t=(this.bannerLabel??``).trim();t?e.setAttribute(`aria-label`,t):e.removeAttribute(`aria-label`)}_applyLogoSizing(){let e=(this.logoWidth??``).trim(),t=(this.logoHeight??``).trim(),n=(this.logoAspectRatio??``).trim();e?this.style.setProperty(`--scb-header-logo-img-w`,e):this.style.removeProperty(`--scb-header-logo-img-w`),t?this.style.setProperty(`--scb-header-logo-img-h`,t):e?this.style.setProperty(`--scb-header-logo-img-h`,`auto`):this.style.removeProperty(`--scb-header-logo-img-h`),n?this.style.setProperty(`--scb-header-logo-img-aspect-ratio`,n):this.style.removeProperty(`--scb-header-logo-img-aspect-ratio`)}_closeDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1)}_openDrawerNow(){let e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0)}_ensureFocusRingReady(){customElements.get(`md-focus-ring`)||(this._focusRingImportPromise??=Promise.resolve().then(()=>(j(),nc)),this._focusRingImportPromise.then(({ensureFocusRingReady:e})=>{e()}))}async _ensureDrawerReady(){this._drawerReady||(this._drawerImportPromise??=Promise.all([Promise.resolve().then(()=>(gd(),pd)),Promise.resolve().then(()=>(hf(),pf)),Promise.resolve().then(()=>(Tu(),Cu)),Promise.resolve().then(()=>(bf(),gf)).then(e=>{this._drawerRenderer=e}),this._ensureDrawerSlotComponentsReady()]).then(()=>void 0),await this._drawerImportPromise,this._drawerReady=!0,this._syncDrawerCloseNodes())}_drawerSlotContains(e){return[...this.querySelectorAll(`[slot="drawer-menu"], [slot="drawer-close"]`)].some(t=>t.matches(e)||!!t.querySelector(e))}async _ensureDrawerSlotComponentsReady(){this.querySelector(`[slot="drawer-menu"], [slot="drawer-close"]`)&&await Promise.all([this._drawerSlotContains(`scb-button`)?Promise.resolve().then(()=>(Mc(),Dc)):Promise.resolve(),this._drawerSlotContains(`scb-icon-button`)?Promise.resolve().then(()=>(dl(),il)):Promise.resolve(),this._drawerSlotContains(`scb-skeleton`)?Promise.resolve().then(()=>(Cf(),xf)):Promise.resolve(),this._drawerSlotContains(`scb-grid`)?Promise.resolve().then(()=>(zd(),Ld)):Promise.resolve(),this._drawerSlotContains(`scb-grid-item`)?Promise.resolve().then(()=>(Nd(),Ad)):Promise.resolve()])}async _ensureDropdownReady(){customElements.get(`scb-dropdown`)||(this._dropdownImportPromise??=Promise.resolve().then(()=>(wd(),Cd)).then(()=>void 0),await this._dropdownImportPromise)}_syncMenuBtnAria(){this.renderRoot.querySelectorAll(`.menu-trigger`).forEach(e=>{e.setAttribute(`aria-expanded`,String(this._menuExpanded))})}_getNavItems(){return this._slotNavItems.length?this._slotNavItems:(this.tabs??[]).map(e=>({kind:`tab`,...e}))}_getDropdownForSlot(e){let t=this.querySelector(`[slot="${e}"]`);return t?t.tagName.toLowerCase()===`scb-dropdown`?t:t.querySelector(`scb-dropdown`):null}_syncDropdownTabs(){this._getNavItems().forEach((e,t)=>{if(e.kind!==`dropdown`)return;let n=this._getDropdownForSlot(e.slotName);if(!n)return;let r=String(t);n.getAttribute(`data-index`)!==r&&n.setAttribute(`data-index`,r),n.hasAttribute(`as-tab`)||n.setAttribute(`as-tab`,``);let i=this.size,a=n;a?.size!==i&&(a.size=i),t===this.activeTab?n.getAttribute(`aria-current`)!==`page`&&n.setAttribute(`aria-current`,`page`):n.hasAttribute(`aria-current`)&&n.removeAttribute(`aria-current`)})}_readTabIndexFromEvent(e){let t=e.composedPath?e.composedPath():[];for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-index`);if(t==null)continue;let n=Number(t);if(Number.isFinite(n))return n}return null}_focusTabAtIndex(e){let t=this._getNavItems()[e];if(t){if(t.kind===`dropdown`){this._getDropdownForSlot(t.slotName)?.focus?.();return}this.renderRoot.querySelector(`.tab-link[data-index="${e}"]`)?.focus?.()}}_syncFlags(e,t){this.toggleAttribute(`data-no-utility`,e),this.toggleAttribute(`data-no-search`,t)}_emitSearchInput(e){this.searchText=e,this.dispatchEvent(new CustomEvent(`search-input`,{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchinput`,{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`search-text-change`,{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchtextchange`,{detail:{value:this.searchText},bubbles:!0,composed:!0}))}_emitSearchChange(e,t){this.searchText=e,this.dispatchEvent(new CustomEvent(`search-change`,{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`searchchange`,{detail:{value:this.searchText,active:t},bubbles:!0,composed:!0}))}_renderMenuButton(e=``,t=!1){let n=e?`menu-trigger ${e}`:`menu-trigger`,r=(this.menuButtonLabel??``).trim(),i=(this.menuOpenLabel??``).trim()||r,a=this._menuExpanded?`true`:`false`;return t?x`
15654
15677
  <button
15655
15678
  type="button"
15656
15679
  class=${`${n} header-icon-button`}
@@ -15743,6 +15766,7 @@
15743
15766
  </div>
15744
15767
 
15745
15768
  <div class="actions">
15769
+ <slot name="search" @slotchange=${this._onActionsSlotChange}></slot>
15746
15770
  <nav class="utility" aria-label=${te}>
15747
15771
  ${t.map(e=>x`
15748
15772
  <a
@@ -15774,7 +15798,11 @@
15774
15798
  <md-focus-ring aria-hidden="true"></md-focus-ring>
15775
15799
  </button>
15776
15800
  `:S}
15777
- ${m?this._renderMenuButton(``,!0):S}
15801
+ ${m&&!this._hasResponsiveActions?this._renderMenuButton(``,!0):S}
15802
+ <slot name="actions-desktop" @slotchange=${this._onActionsSlotChange}></slot>
15803
+ <slot name="actions" @slotchange=${this._onActionsSlotChange}></slot>
15804
+ <slot name="actions-mobile" @slotchange=${this._onActionsSlotChange}></slot>
15805
+ ${m&&this._hasResponsiveActions?this._renderMenuButton(``,!0):S}
15778
15806
  </div>
15779
15807
 
15780
15808
  ${this.showSearch&&this._mobileSearchOpen?x`
@@ -15889,7 +15917,7 @@
15889
15917
  </clipPath>
15890
15918
  </defs>
15891
15919
  </svg>
15892
- `}};N([_({type:String,attribute:`max-width`})],Z.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`padding-inline`,reflect:!0})],Z.prototype,`paddingInline`,void 0),N([_({type:String,attribute:`padding-inline-expanded`,reflect:!0})],Z.prototype,`paddingInlineExpanded`,void 0),N([_({type:String,reflect:!0})],Z.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Z.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Z.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,converter:kf})],Z.prototype,`size`,void 0),N([_({type:String,attribute:`logo-text`})],Z.prototype,`logoText`,void 0),N([_({type:String,attribute:`logotype-text`})],Z.prototype,`logotypeText`,void 0),N([_({type:String,attribute:`logo-alt`})],Z.prototype,`logoAlt`,void 0),N([_({type:String,attribute:`logo-href`})],Z.prototype,`logoHref`,void 0),N([_({type:String,attribute:`logo-src`})],Z.prototype,`logoSrc`,void 0),N([_({type:String,attribute:`logo-width`})],Z.prototype,`logoWidth`,void 0),N([_({type:String,attribute:`logo-height`})],Z.prototype,`logoHeight`,void 0),N([_({type:String,attribute:`logo-aspect-ratio`})],Z.prototype,`logoAspectRatio`,void 0),N([_({type:Boolean,attribute:`logo-invert-dm`,reflect:!0,converter:Of})],Z.prototype,`logoInvertDm`,void 0),N([_({type:Boolean,reflect:!0})],Z.prototype,`banner`,void 0),N([_({type:String,attribute:`banner-label`})],Z.prototype,`bannerLabel`,void 0),N([_({type:Array,attribute:`tabs`,converter:Z._JSON_ARRAY})],Z.prototype,`tabs`,void 0),N([_({type:Number,attribute:`active-tab`,reflect:!0})],Z.prototype,`activeTab`,void 0),N([_({type:Boolean,attribute:`reserve-tabs`,reflect:!0,converter:Of})],Z.prototype,`reserveTabs`,void 0),N([_({type:Number,attribute:`reserve-tabs-count`})],Z.prototype,`reserveTabsCount`,void 0),N([_({type:String,attribute:`reserve-tabs-widths`})],Z.prototype,`reserveTabsWidths`,void 0),N([_({type:Boolean,attribute:`layout-pending`,reflect:!0,converter:Of})],Z.prototype,`layoutPending`,void 0),N([_({type:Array,attribute:`utility-items`,converter:Z._JSON_ARRAY})],Z.prototype,`utilityItems`,void 0),N([_({type:String,attribute:`search-placeholder`})],Z.prototype,`searchPlaceholder`,void 0),N([_({type:String,attribute:`search-button-label`})],Z.prototype,`searchButtonLabel`,void 0),N([_({type:String,attribute:`search-clear-label`})],Z.prototype,`searchClearLabel`,void 0),N([_({type:String,attribute:`search-close-label`})],Z.prototype,`searchCloseLabel`,void 0),N([_({type:String,attribute:`menu-label`})],Z.prototype,`menuLabel`,void 0),N([_({type:String,attribute:`menu-button-label`})],Z.prototype,`menuButtonLabel`,void 0),N([_({type:String,attribute:`menu-open-label`})],Z.prototype,`menuOpenLabel`,void 0),N([_({type:String,attribute:`menu-sub-label`})],Z.prototype,`menuSubLabel`,void 0),N([_({type:String,attribute:`menu-section-label`})],Z.prototype,`menuSectionLabel`,void 0),N([_({type:String,attribute:`menu-search-placeholder`})],Z.prototype,`menuSearchPlaceholder`,void 0),N([_({type:String,attribute:`utility-navigation-label`})],Z.prototype,`utilityNavigationLabel`,void 0),N([_({type:String,attribute:`main-navigation-label`})],Z.prototype,`mainNavigationLabel`,void 0),N([_({type:Array,attribute:`menu-data`,converter:Z._JSON_ARRAY})],Z.prototype,`menuData`,void 0),N([_({type:Boolean,attribute:`defer-drawer`,reflect:!0,converter:Of})],Z.prototype,`deferDrawer`,void 0),N([_({type:Boolean,attribute:`show-drawer`,reflect:!0,converter:Df})],Z.prototype,`showDrawer`,void 0),N([_({type:Boolean,attribute:`always-show-menu-button`,reflect:!0,converter:Of})],Z.prototype,`alwaysShowMenuButton`,void 0),N([_({type:Boolean,attribute:`show-search`,reflect:!0,converter:Df})],Z.prototype,`showSearch`,void 0),N([_({type:Boolean,attribute:`include-utility-in-menu`,reflect:!0,converter:Of})],Z.prototype,`includeUtilityInMenu`,void 0),N([_({type:Boolean,attribute:`drawer-overlay`,reflect:!0,converter:Df})],Z.prototype,`drawerOverlay`,void 0),N([_({type:String,attribute:`search-max`})],Z.prototype,`searchMax`,void 0),N([_({type:String,attribute:`search-min`})],Z.prototype,`searchMin`,void 0),N([_({type:String,attribute:`search-height`})],Z.prototype,`searchHeight`,void 0),N([_({type:String,attribute:`search-text`,reflect:!0})],Z.prototype,`searchText`,void 0),N([v()],Z.prototype,`_drawerId`,void 0),N([v()],Z.prototype,`_menuExpanded`,void 0),N([v()],Z.prototype,`_searchId`,void 0),N([v()],Z.prototype,`_drawerReady`,void 0),N([v()],Z.prototype,`_mobileSearchOpen`,void 0),N([v()],Z.prototype,`_slotNavItems`,void 0),N([v()],Z.prototype,`_slotUtils`,void 0),N([v()],Z.prototype,`_slotMenu`,void 0),N([v()],Z.prototype,`_collapsed`,void 0),N([v()],Z.prototype,`_tabsCollapsed`,void 0),N([v()],Z.prototype,`_desktop`,void 0),N([v()],Z.prototype,`_hideLogoText`,void 0),Z=wf=N([a(`scb-header`)],Z),w(),b(),uc(),P();var Af={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},jf,Mf,Nf;function Pf(){return jf??=Promise.resolve().then(()=>(j(),nc)),jf}function Ff(){return Mf??=Promise.resolve().then(()=>(Ec(),Sc)),Mf}function If(){return Nf??=Promise.resolve().then(()=>(D(),zi)),Nf}var Lf=class extends C{constructor(...e){super(...e),this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.keyfigure=0,this.subtitle=``,this.supportingText=``,this.cardHref=``,this.href=``,this.icon=``,this.size=lc[`scb-keyfigure-card`].size,this.unit=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.sizing=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,Pf().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=e=>{let t=this.__effectiveHref;(e.key===`Enter`||e.key===` `)&&t&&(e.preventDefault(),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{let t=this.__effectiveHref;t&&((!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),!e.target.closest(`a`)&&this.__navigate(t,e))}}static{this.styles=p`
15920
+ `}};N([_({type:String,attribute:`max-width`})],Z.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`padding-inline`,reflect:!0})],Z.prototype,`paddingInline`,void 0),N([_({type:String,attribute:`padding-inline-expanded`,reflect:!0})],Z.prototype,`paddingInlineExpanded`,void 0),N([_({type:String,reflect:!0})],Z.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Z.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Z.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,converter:Af})],Z.prototype,`size`,void 0),N([_({type:String,attribute:`logo-text`})],Z.prototype,`logoText`,void 0),N([_({type:String,attribute:`logotype-text`})],Z.prototype,`logotypeText`,void 0),N([_({type:String,attribute:`logo-alt`})],Z.prototype,`logoAlt`,void 0),N([_({type:String,attribute:`logo-href`})],Z.prototype,`logoHref`,void 0),N([_({type:String,attribute:`logo-src`})],Z.prototype,`logoSrc`,void 0),N([_({type:String,attribute:`logo-width`})],Z.prototype,`logoWidth`,void 0),N([_({type:String,attribute:`logo-height`})],Z.prototype,`logoHeight`,void 0),N([_({type:String,attribute:`logo-aspect-ratio`})],Z.prototype,`logoAspectRatio`,void 0),N([_({type:Boolean,attribute:`logo-invert-dm`,reflect:!0,converter:kf})],Z.prototype,`logoInvertDm`,void 0),N([_({type:Boolean,reflect:!0})],Z.prototype,`banner`,void 0),N([_({type:String,attribute:`banner-label`})],Z.prototype,`bannerLabel`,void 0),N([_({type:Array,attribute:`tabs`,converter:Z._JSON_ARRAY})],Z.prototype,`tabs`,void 0),N([_({type:Number,attribute:`active-tab`,reflect:!0})],Z.prototype,`activeTab`,void 0),N([_({type:Boolean,attribute:`reserve-tabs`,reflect:!0,converter:kf})],Z.prototype,`reserveTabs`,void 0),N([_({type:Number,attribute:`reserve-tabs-count`})],Z.prototype,`reserveTabsCount`,void 0),N([_({type:String,attribute:`reserve-tabs-widths`})],Z.prototype,`reserveTabsWidths`,void 0),N([_({type:Boolean,attribute:`layout-pending`,reflect:!0,converter:kf})],Z.prototype,`layoutPending`,void 0),N([_({type:Array,attribute:`utility-items`,converter:Z._JSON_ARRAY})],Z.prototype,`utilityItems`,void 0),N([_({type:String,attribute:`search-placeholder`})],Z.prototype,`searchPlaceholder`,void 0),N([_({type:String,attribute:`search-button-label`})],Z.prototype,`searchButtonLabel`,void 0),N([_({type:String,attribute:`search-clear-label`})],Z.prototype,`searchClearLabel`,void 0),N([_({type:String,attribute:`search-close-label`})],Z.prototype,`searchCloseLabel`,void 0),N([_({type:String,attribute:`menu-label`})],Z.prototype,`menuLabel`,void 0),N([_({type:String,attribute:`menu-button-label`})],Z.prototype,`menuButtonLabel`,void 0),N([_({type:String,attribute:`menu-open-label`})],Z.prototype,`menuOpenLabel`,void 0),N([_({type:String,attribute:`menu-sub-label`})],Z.prototype,`menuSubLabel`,void 0),N([_({type:String,attribute:`menu-section-label`})],Z.prototype,`menuSectionLabel`,void 0),N([_({type:String,attribute:`menu-search-placeholder`})],Z.prototype,`menuSearchPlaceholder`,void 0),N([_({type:String,attribute:`utility-navigation-label`})],Z.prototype,`utilityNavigationLabel`,void 0),N([_({type:String,attribute:`main-navigation-label`})],Z.prototype,`mainNavigationLabel`,void 0),N([_({type:Array,attribute:`menu-data`,converter:Z._JSON_ARRAY})],Z.prototype,`menuData`,void 0),N([_({type:Boolean,attribute:`defer-drawer`,reflect:!0,converter:kf})],Z.prototype,`deferDrawer`,void 0),N([_({type:Boolean,attribute:`show-drawer`,reflect:!0,converter:Of})],Z.prototype,`showDrawer`,void 0),N([_({type:Boolean,attribute:`always-show-menu-button`,reflect:!0,converter:kf})],Z.prototype,`alwaysShowMenuButton`,void 0),N([_({type:Boolean,attribute:`show-search`,reflect:!0,converter:Of})],Z.prototype,`showSearch`,void 0),N([_({type:Boolean,attribute:`include-utility-in-menu`,reflect:!0,converter:kf})],Z.prototype,`includeUtilityInMenu`,void 0),N([_({type:Boolean,attribute:`drawer-overlay`,reflect:!0,converter:Of})],Z.prototype,`drawerOverlay`,void 0),N([_({type:String,attribute:`search-max`})],Z.prototype,`searchMax`,void 0),N([_({type:String,attribute:`search-min`})],Z.prototype,`searchMin`,void 0),N([_({type:String,attribute:`search-height`})],Z.prototype,`searchHeight`,void 0),N([_({type:String,attribute:`search-text`,reflect:!0})],Z.prototype,`searchText`,void 0),N([v()],Z.prototype,`_drawerId`,void 0),N([v()],Z.prototype,`_menuExpanded`,void 0),N([v()],Z.prototype,`_searchId`,void 0),N([v()],Z.prototype,`_drawerReady`,void 0),N([v()],Z.prototype,`_mobileSearchOpen`,void 0),N([v()],Z.prototype,`_slotNavItems`,void 0),N([v()],Z.prototype,`_slotUtils`,void 0),N([v()],Z.prototype,`_slotMenu`,void 0),N([v()],Z.prototype,`_hasResponsiveActions`,void 0),N([v()],Z.prototype,`_collapsed`,void 0),N([v()],Z.prototype,`_tabsCollapsed`,void 0),N([v()],Z.prototype,`_desktop`,void 0),N([v()],Z.prototype,`_hideLogoText`,void 0),Z=wf=N([a(`scb-header`)],Z),w(),b(),uc(),P();var jf={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Mf,Nf,Pf;function Ff(){return Mf??=Promise.resolve().then(()=>(j(),nc)),Mf}function If(){return Nf??=Promise.resolve().then(()=>(Ec(),Sc)),Nf}function Lf(){return Pf??=Promise.resolve().then(()=>(D(),zi)),Pf}var Rf=class extends C{constructor(...e){super(...e),this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.keyfigure=0,this.subtitle=``,this.supportingText=``,this.cardHref=``,this.href=``,this.icon=``,this.size=lc[`scb-keyfigure-card`].size,this.unit=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.sizing=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,Ff().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=e=>{let t=this.__effectiveHref;(e.key===`Enter`||e.key===` `)&&t&&(e.preventDefault(),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{let t=this.__effectiveHref;t&&((!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),!e.target.closest(`a`)&&this.__navigate(t,e))}}static{this.styles=p`
15893
15921
  /*
15894
15922
  Designbrygga:
15895
15923
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -16279,7 +16307,7 @@
16279
16307
  --scb-keyfigure-card-design-supporting-font-weight: var(--scb-keyfigure-card-design-supporting-large-font-weight);
16280
16308
  }
16281
16309
  /* design:bindings:scb-keyfigure-card:end */
16282
- `}formatNumber(e){if(typeof e==`number`)return e.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `);let t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `)}firstUpdated(){this.__applyInnerSizing(),this.__applySpacing(),this.__ensureSlottedIconDeps()}get __effectiveHref(){return(this.cardHref||this.href||``).trim()}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__slottedText(e){return Array.from(this.querySelectorAll(`[slot="${e}"]`)).map(e=>e.textContent?.trim()??``).filter(Boolean).join(` `)}async __ensureSlottedIconDeps(){let e=this.querySelector(`[slot="icon"]`);e&&(e.localName===`md-icon`||e.querySelector?.(`md-icon`))&&await If()}__ensureRipple(e){if(this.__effectiveHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,Ff().then(({ensureRippleReady:e})=>e()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}}async __syncRipple(){let e=this.renderRoot.querySelector(`md-ripple`),t=this.renderRoot.querySelector(`.scb-keyfigure-card`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await Ff();await i(e,t,n,r)}render(){let e=this.__effectiveHref,t=!!e,n=this.formatNumber(this.keyfigure),r=(this.unit||``).trim(),i=r?`${n} ${r}`:n,a=this.__hasSlottedContent(`icon`),o=this.__hasSlottedContent(`subtitle`),s=this.__hasSlottedContent(`supporting-text`),c=o?this.__slottedText(`subtitle`):this.subtitle,l=this.supportingText,u=o||!!c,d=s||!!l;return x`
16310
+ `}formatNumber(e){if(typeof e==`number`)return e.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `);let t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString(`sv-SE`).replace(/\u00A0/g,` `)}firstUpdated(){this.__applyInnerSizing(),this.__applySpacing(),this.__ensureSlottedIconDeps()}get __effectiveHref(){return(this.cardHref||this.href||``).trim()}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__slottedText(e){return Array.from(this.querySelectorAll(`[slot="${e}"]`)).map(e=>e.textContent?.trim()??``).filter(Boolean).join(` `)}async __ensureSlottedIconDeps(){let e=this.querySelector(`[slot="icon"]`);e&&(e.localName===`md-icon`||e.querySelector?.(`md-icon`))&&await Lf()}__ensureRipple(e){if(this.__effectiveHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,If().then(({ensureRippleReady:e})=>e()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}}async __syncRipple(){let e=this.renderRoot.querySelector(`md-ripple`),t=this.renderRoot.querySelector(`.scb-keyfigure-card`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await If();await i(e,t,n,r)}render(){let e=this.__effectiveHref,t=!!e,n=this.formatNumber(this.keyfigure),r=(this.unit||``).trim(),i=r?`${n} ${r}`:n,a=this.__hasSlottedContent(`icon`),o=this.__hasSlottedContent(`subtitle`),s=this.__hasSlottedContent(`supporting-text`),c=o?this.__slottedText(`subtitle`):this.subtitle,l=this.supportingText,u=o||!!c,d=s||!!l;return x`
16283
16311
  <div
16284
16312
  class="scb-keyfigure-card ${t?`clickable`:``} ${this.size}"
16285
16313
  role=${t?`link`:`group`}
@@ -16320,7 +16348,7 @@
16320
16348
  </div>
16321
16349
 
16322
16350
  ${t&&this.__focusRingLoaded?x`<md-focus-ring></md-focus-ring>`:``}
16323
- `}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.scb-keyfigure-card`);e&&(this.width&&this.width.trim()!==``?(e.style.inlineSize=`100%`,e.style.maxInlineSize=`100%`):(e.style.removeProperty(`inline-size`),e.style.removeProperty(`max-inline-size`)),this.height&&this.height.trim()!==``||this.sizing===`stretch`?e.style.blockSize=`100%`:e.style.removeProperty(`block-size`),this.maxHeight&&this.maxHeight.trim()!==``?e.style.maxBlockSize=`100%`:e.style.removeProperty(`max-block-size`))}updated(e){super.updated(e),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),(e.has(`width`)||e.has(`height`)||e.has(`maxHeight`)||e.has(`sizing`))&&this.__applyInnerSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-keyfigure-card-spacing-block-start`,t):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-start`),n?this.style.setProperty(`--scb-keyfigure-card-spacing-block-end`,n):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-end`),r?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-start`),i?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-end`)}__dispatchNavigateEvents(e,t){let n={href:e},r=new CustomEvent(`card-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),i=new CustomEvent(`cardnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(r)&&this.dispatchEvent(i)}__navigate(e,t){this.__dispatchNavigateEvents(e,t)&&(window.location.href=e)}};N([_({attribute:`keyfigure`})],Lf.prototype,`keyfigure`,void 0),N([_({type:String,attribute:`subtitle`})],Lf.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],Lf.prototype,`supportingText`,void 0),N([_({type:String,attribute:`card-href`})],Lf.prototype,`cardHref`,void 0),N([_({type:String,attribute:`href`})],Lf.prototype,`href`,void 0),N([_({type:String})],Lf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Lf.prototype,`size`,void 0),N([_({type:String})],Lf.prototype,`unit`,void 0),N([_({type:String,reflect:!0})],Lf.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Lf.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],Lf.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],Lf.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0,converter:Af})],Lf.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Lf.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Lf.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Lf.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Lf.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Lf.prototype,`spacingRight`,void 0),Lf=N([a(`scb-keyfigure-card`)],Lf),w(),b(),pl(),j(),P();var Rf=class extends C{constructor(...e){super(...e),this.href=``,this.ariaLabel=``,this.variant=`filled`,this.inverse=!1,this.external=!1,this.#e=e=>{ac(e);let t=e.composedPath()[0];!(t instanceof HTMLElement)||!t.matches(`:focus-visible`)||customElements.whenDefined(`md-focus-ring`).then(()=>{this.toggleAttribute(`data-native-focus-ring-ready`,!0);let e=this.renderRoot.querySelector(`md-focus-ring`);e.visible=t.matches(`:focus-visible`)})}}static{this.styles=p`
16351
+ `}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.scb-keyfigure-card`);e&&(this.width&&this.width.trim()!==``?(e.style.inlineSize=`100%`,e.style.maxInlineSize=`100%`):(e.style.removeProperty(`inline-size`),e.style.removeProperty(`max-inline-size`)),this.height&&this.height.trim()!==``||this.sizing===`stretch`?e.style.blockSize=`100%`:e.style.removeProperty(`block-size`),this.maxHeight&&this.maxHeight.trim()!==``?e.style.maxBlockSize=`100%`:e.style.removeProperty(`max-block-size`))}updated(e){super.updated(e),e.has(`width`)&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty(`inline-size`)),e.has(`maxWidth`)&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty(`max-inline-size`)),e.has(`height`)&&(this.height?this.style.blockSize=this.height:this.style.removeProperty(`block-size`)),e.has(`maxHeight`)&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty(`max-block-size`)),(e.has(`width`)||e.has(`height`)||e.has(`maxHeight`)||e.has(`sizing`))&&this.__applyInnerSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-keyfigure-card-spacing-block-start`,t):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-start`),n?this.style.setProperty(`--scb-keyfigure-card-spacing-block-end`,n):this.style.removeProperty(`--scb-keyfigure-card-spacing-block-end`),r?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-start`),i?this.style.setProperty(`--scb-keyfigure-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-keyfigure-card-spacing-inline-end`)}__dispatchNavigateEvents(e,t){let n={href:e},r=new CustomEvent(`card-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),i=new CustomEvent(`cardnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(r)&&this.dispatchEvent(i)}__navigate(e,t){this.__dispatchNavigateEvents(e,t)&&(window.location.href=e)}};N([_({attribute:`keyfigure`})],Rf.prototype,`keyfigure`,void 0),N([_({type:String,attribute:`subtitle`})],Rf.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],Rf.prototype,`supportingText`,void 0),N([_({type:String,attribute:`card-href`})],Rf.prototype,`cardHref`,void 0),N([_({type:String,attribute:`href`})],Rf.prototype,`href`,void 0),N([_({type:String})],Rf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`size`,void 0),N([_({type:String})],Rf.prototype,`unit`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Rf.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],Rf.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0,converter:jf})],Rf.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Rf.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Rf.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Rf.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Rf.prototype,`spacingRight`,void 0),Rf=N([a(`scb-keyfigure-card`)],Rf),w(),b(),pl(),j(),P();var zf=class extends C{constructor(...e){super(...e),this.href=``,this.ariaLabel=``,this.variant=`filled`,this.inverse=!1,this.external=!1,this.#e=e=>{ac(e);let t=e.composedPath()[0];!(t instanceof HTMLElement)||!t.matches(`:focus-visible`)||customElements.whenDefined(`md-focus-ring`).then(()=>{this.toggleAttribute(`data-native-focus-ring-ready`,!0);let e=this.renderRoot.querySelector(`md-focus-ring`);e.visible=t.matches(`:focus-visible`)})}}static{this.styles=p`
16324
16352
  :host {
16325
16353
  display: inline-flex;
16326
16354
  inline-size: fit-content;
@@ -16542,7 +16570,7 @@
16542
16570
  </span>
16543
16571
  <md-focus-ring aria-hidden="true"></md-focus-ring>
16544
16572
  </a>
16545
- `}#e};N([_({type:String,reflect:!0})],Rf.prototype,`href`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`target`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`rel`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`download`,void 0),N([_({type:String,attribute:`aria-label`})],Rf.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0})],Rf.prototype,`inverse`,void 0),N([_({type:Boolean,reflect:!0})],Rf.prototype,`external`,void 0),Rf=N([a(`scb-link-button`)],Rf),hf(),w(),b(),P();var zf=class extends C{constructor(...e){super(...e),this.href=``,this.dataHref=``,this.disabled=!1,this.__onClick=e=>{if(e.defaultPrevented)return;if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}let t=(this.href||``).trim();if(t){if(t.startsWith(`#`)){typeof window<`u`&&(window.location.hash=t.slice(1));return}if((this.getAttribute(`target`)||``).trim()===`_blank`){window.open(t,`_blank`,`noopener,noreferrer`);return}window.location.href=t}},this.__onKeyDown=e=>{if(!this.disabled){if(e.key===`Enter`){e.preventDefault(),this.click();return}e.key===` `&&e.preventDefault()}},this.__onKeyUp=e=>{this.disabled||e.key===` `&&(e.preventDefault(),this.click())}}static{this.styles=p`
16573
+ `}#e};N([_({type:String,reflect:!0})],zf.prototype,`href`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`target`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`rel`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`download`,void 0),N([_({type:String,attribute:`aria-label`})],zf.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0})],zf.prototype,`inverse`,void 0),N([_({type:Boolean,reflect:!0})],zf.prototype,`external`,void 0),zf=N([a(`scb-link-button`)],zf),hf(),w(),b(),P();var Bf=class extends C{constructor(...e){super(...e),this.href=``,this.dataHref=``,this.disabled=!1,this.__onClick=e=>{if(e.defaultPrevented)return;if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}let t=(this.href||``).trim();if(t){if(t.startsWith(`#`)){typeof window<`u`&&(window.location.hash=t.slice(1));return}if((this.getAttribute(`target`)||``).trim()===`_blank`){window.open(t,`_blank`,`noopener,noreferrer`);return}window.location.href=t}},this.__onKeyDown=e=>{if(!this.disabled){if(e.key===`Enter`){e.preventDefault(),this.click();return}e.key===` `&&e.preventDefault()}},this.__onKeyUp=e=>{this.disabled||e.key===` `&&(e.preventDefault(),this.click())}}static{this.styles=p`
16546
16574
  :host {
16547
16575
  display: inline-flex;
16548
16576
  align-items: center;
@@ -16569,7 +16597,7 @@
16569
16597
  .label {
16570
16598
  pointer-events: none;
16571
16599
  }
16572
- `}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,this.__onClick),this.addEventListener(`keydown`,this.__onKeyDown),this.addEventListener(`keyup`,this.__onKeyUp),this.__syncA11y()}disconnectedCallback(){this.removeEventListener(`click`,this.__onClick),this.removeEventListener(`keydown`,this.__onKeyDown),this.removeEventListener(`keyup`,this.__onKeyUp),super.disconnectedCallback()}updated(){this.__syncA11y()}__syncA11y(){let e=!!(this.href||``).trim();if(this.disabled){this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1,this.removeAttribute(`role`);return}this.removeAttribute(`aria-disabled`),this.tabIndex=0,this.setAttribute(`role`,e?`link`:`button`)}render(){return x`<span class="label"><slot></slot></span>`}};N([_({type:String})],zf.prototype,`href`,void 0),N([_({type:String,attribute:`data-href`})],zf.prototype,`dataHref`,void 0),N([_({type:Boolean,reflect:!0})],zf.prototype,`disabled`,void 0),zf=N([a(`scb-nav-item`)],zf),w(),b(),E(),j(),P();var Bf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},Vf=class extends C{constructor(...e){super(...e),this.__itemsEl=null,this.__resizeObserver=null,this.__resizeRaf=null,this.__canScrollLeft=!1,this.__canScrollRight=!1,this.label=``,this.activeHref=``,this.activateOnClick=!0,this.scrollShadow=!1,this.leftScrollButtonLabel=`Scrolla vänster`,this.rightScrollButtonLabel=`Scrolla höger`,this.sticky=!1,this.stickyTop=`0px`,this.stickyZIndex=5,this.stickyBackground=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__autoAriaLabel=!1,this.__itemIdPrefix=`scb-nav-${Math.random().toString(36).slice(2)}`,this.__itemIdCounter=0,this.__onSlotChange=async()=>{await this.__decorateItems(),this.__applyActiveHref(),this.__scheduleScrollControlUpdate()},this.__scrollLeft=()=>{this.__scrollBy(-this.__getScrollStep())},this.__scrollRight=()=>{this.__scrollBy(this.__getScrollStep())},this.__onWheel=e=>{if(e.ctrlKey)return;let t=this.__itemsEl;if(!t)return;let n=t.scrollWidth-t.clientWidth;if(n<=1)return;let r=this.__normalizeWheelDelta(e);if(r===0)return;let i=Math.max(0,Math.min(n,t.scrollLeft+r));i!==t.scrollLeft&&(e.preventDefault(),t.scrollLeft=i,this.__updateScrollControls())},this.__onItemsScroll=()=>{this.__updateScrollControls()},this.__onClick=e=>{let t=e.composedPath().find(e=>e instanceof HTMLElement&&(e.tagName===`A`||e.tagName===`BUTTON`||e.tagName===`SCB-NAV-ITEM`));if(!t)return;let n=this.__getItemHref(t);this.dispatchEvent(new CustomEvent(`scb-nav-select`,{bubbles:!0,composed:!0,detail:{item:t,href:n}})),this.dispatchEvent(new CustomEvent(`scbnavselect`,{bubbles:!0,composed:!0,detail:{item:t,href:n}})),this.activateOnClick&&n&&(this.activeHref=n)}}static{this.styles=p`
16600
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,this.__onClick),this.addEventListener(`keydown`,this.__onKeyDown),this.addEventListener(`keyup`,this.__onKeyUp),this.__syncA11y()}disconnectedCallback(){this.removeEventListener(`click`,this.__onClick),this.removeEventListener(`keydown`,this.__onKeyDown),this.removeEventListener(`keyup`,this.__onKeyUp),super.disconnectedCallback()}updated(){this.__syncA11y()}__syncA11y(){let e=!!(this.href||``).trim();if(this.disabled){this.setAttribute(`aria-disabled`,`true`),this.tabIndex=-1,this.removeAttribute(`role`);return}this.removeAttribute(`aria-disabled`),this.tabIndex=0,this.setAttribute(`role`,e?`link`:`button`)}render(){return x`<span class="label"><slot></slot></span>`}};N([_({type:String})],Bf.prototype,`href`,void 0),N([_({type:String,attribute:`data-href`})],Bf.prototype,`dataHref`,void 0),N([_({type:Boolean,reflect:!0})],Bf.prototype,`disabled`,void 0),Bf=N([a(`scb-nav-item`)],Bf),w(),b(),E(),j(),P();var Vf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},Hf=class extends C{constructor(...e){super(...e),this.__itemsEl=null,this.__resizeObserver=null,this.__resizeRaf=null,this.__canScrollLeft=!1,this.__canScrollRight=!1,this.label=``,this.activeHref=``,this.activateOnClick=!0,this.scrollShadow=!1,this.leftScrollButtonLabel=`Scrolla vänster`,this.rightScrollButtonLabel=`Scrolla höger`,this.sticky=!1,this.stickyTop=`0px`,this.stickyZIndex=5,this.stickyBackground=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__autoAriaLabel=!1,this.__itemIdPrefix=`scb-nav-${Math.random().toString(36).slice(2)}`,this.__itemIdCounter=0,this.__onSlotChange=async()=>{await this.__decorateItems(),this.__applyActiveHref(),this.__scheduleScrollControlUpdate()},this.__scrollLeft=()=>{this.__scrollBy(-this.__getScrollStep())},this.__scrollRight=()=>{this.__scrollBy(this.__getScrollStep())},this.__onWheel=e=>{if(e.ctrlKey)return;let t=this.__itemsEl;if(!t)return;let n=t.scrollWidth-t.clientWidth;if(n<=1)return;let r=this.__normalizeWheelDelta(e);if(r===0)return;let i=Math.max(0,Math.min(n,t.scrollLeft+r));i!==t.scrollLeft&&(e.preventDefault(),t.scrollLeft=i,this.__updateScrollControls())},this.__onItemsScroll=()=>{this.__updateScrollControls()},this.__onClick=e=>{let t=e.composedPath().find(e=>e instanceof HTMLElement&&(e.tagName===`A`||e.tagName===`BUTTON`||e.tagName===`SCB-NAV-ITEM`));if(!t)return;let n=this.__getItemHref(t);this.dispatchEvent(new CustomEvent(`scb-nav-select`,{bubbles:!0,composed:!0,detail:{item:t,href:n}})),this.dispatchEvent(new CustomEvent(`scbnavselect`,{bubbles:!0,composed:!0,detail:{item:t,href:n}})),this.activateOnClick&&n&&(this.activeHref=n)}}static{this.styles=p`
16573
16601
  /*
16574
16602
  Designbrygga:
16575
16603
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -16895,7 +16923,7 @@
16895
16923
  </button>
16896
16924
  `:``}
16897
16925
  </div>
16898
- `}};N([v()],Vf.prototype,`__canScrollLeft`,void 0),N([v()],Vf.prototype,`__canScrollRight`,void 0),N([_({type:String})],Vf.prototype,`label`,void 0),N([_({type:String,attribute:`active-href`})],Vf.prototype,`activeHref`,void 0),N([_({type:Boolean,attribute:`activate-on-click`,converter:Bf})],Vf.prototype,`activateOnClick`,void 0),N([_({type:Boolean,attribute:`scroll-shadow`,converter:Bf})],Vf.prototype,`scrollShadow`,void 0),N([_({type:String,attribute:`left-scroll-button-label`})],Vf.prototype,`leftScrollButtonLabel`,void 0),N([_({type:String,attribute:`right-scroll-button-label`})],Vf.prototype,`rightScrollButtonLabel`,void 0),N([_({type:Boolean,reflect:!0})],Vf.prototype,`sticky`,void 0),N([_({type:String,attribute:`sticky-top`})],Vf.prototype,`stickyTop`,void 0),N([_({type:Number,attribute:`sticky-z-index`})],Vf.prototype,`stickyZIndex`,void 0),N([_({type:String,attribute:`sticky-background`})],Vf.prototype,`stickyBackground`,void 0),N([_({type:String,reflect:!0})],Vf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Vf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Vf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Vf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Vf.prototype,`spacingRight`,void 0),Vf=N([a(`scb-nav`)],Vf),w(),b(),gl(),Mc(),dl(),D(),cc(),P();var Hf=class extends C{constructor(...e){super(...e),this.variant=`icon-text`,this.alignment=`start`,this.page=1,this.totalPages=0,this.pagingHref=``,this.baseUri=``,this.paginationAriaLabel=`Paginering`,this.currentAriaLabel=`Nuvarande sida, `,this.pagingNumberAriaLabel=`Gå till sida `,this.previousLabel=`Föregående`,this.nextLabel=`Nästa`,this.previousAriaLabel=`Föregående sida`,this.nextAriaLabel=`Nästa sida`,this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{let e=(this.getBoundingClientRect().width||window.innerWidth)<=768||window.innerWidth<=768;this.isNarrow!==e&&(this.isNarrow=e)}}static{this.styles=[p`
16926
+ `}};N([v()],Hf.prototype,`__canScrollLeft`,void 0),N([v()],Hf.prototype,`__canScrollRight`,void 0),N([_({type:String})],Hf.prototype,`label`,void 0),N([_({type:String,attribute:`active-href`})],Hf.prototype,`activeHref`,void 0),N([_({type:Boolean,attribute:`activate-on-click`,converter:Vf})],Hf.prototype,`activateOnClick`,void 0),N([_({type:Boolean,attribute:`scroll-shadow`,converter:Vf})],Hf.prototype,`scrollShadow`,void 0),N([_({type:String,attribute:`left-scroll-button-label`})],Hf.prototype,`leftScrollButtonLabel`,void 0),N([_({type:String,attribute:`right-scroll-button-label`})],Hf.prototype,`rightScrollButtonLabel`,void 0),N([_({type:Boolean,reflect:!0})],Hf.prototype,`sticky`,void 0),N([_({type:String,attribute:`sticky-top`})],Hf.prototype,`stickyTop`,void 0),N([_({type:Number,attribute:`sticky-z-index`})],Hf.prototype,`stickyZIndex`,void 0),N([_({type:String,attribute:`sticky-background`})],Hf.prototype,`stickyBackground`,void 0),N([_({type:String,reflect:!0})],Hf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Hf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Hf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Hf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Hf.prototype,`spacingRight`,void 0),Hf=N([a(`scb-nav`)],Hf),w(),b(),gl(),Mc(),dl(),D(),cc(),P();var Uf=class extends C{constructor(...e){super(...e),this.variant=`icon-text`,this.alignment=`start`,this.page=1,this.totalPages=0,this.pagingHref=``,this.baseUri=``,this.paginationAriaLabel=`Paginering`,this.currentAriaLabel=`Nuvarande sida, `,this.pagingNumberAriaLabel=`Gå till sida `,this.previousLabel=`Föregående`,this.nextLabel=`Nästa`,this.previousAriaLabel=`Föregående sida`,this.nextAriaLabel=`Nästa sida`,this.isNarrow=window.innerWidth<=768,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onResize=()=>{let e=(this.getBoundingClientRect().width||window.innerWidth)<=768||window.innerWidth<=768;this.isNarrow!==e&&(this.isNarrow=e)}}static{this.styles=[p`
16899
16927
  :host {
16900
16928
  display: block;
16901
16929
  width: 100%;
@@ -17285,7 +17313,7 @@
17285
17313
  ${p}
17286
17314
  </div>
17287
17315
  </nav>
17288
- `}};N([_({type:String})],Hf.prototype,`variant`,void 0),N([_({type:String})],Hf.prototype,`alignment`,void 0),N([_({type:Number})],Hf.prototype,`page`,void 0),N([_({type:Number,attribute:`total-pages`})],Hf.prototype,`totalPages`,void 0),N([_({type:String,attribute:`paging-href`})],Hf.prototype,`pagingHref`,void 0),N([_({type:String,attribute:`base-uri`})],Hf.prototype,`baseUri`,void 0),N([_({type:String,attribute:`pagination-aria-label`})],Hf.prototype,`paginationAriaLabel`,void 0),N([_({type:String,attribute:`current-aria-label`})],Hf.prototype,`currentAriaLabel`,void 0),N([_({type:String,attribute:`paging-number-aria-label`})],Hf.prototype,`pagingNumberAriaLabel`,void 0),N([_({type:String,attribute:`previous-label`})],Hf.prototype,`previousLabel`,void 0),N([_({type:String,attribute:`next-label`})],Hf.prototype,`nextLabel`,void 0),N([_({type:String,attribute:`previous-aria-label`})],Hf.prototype,`previousAriaLabel`,void 0),N([_({type:String,attribute:`next-aria-label`})],Hf.prototype,`nextAriaLabel`,void 0),N([_({type:Boolean})],Hf.prototype,`isNarrow`,void 0),N([_({type:String})],Hf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`})],Hf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`})],Hf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`})],Hf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`})],Hf.prototype,`spacingRight`,void 0),Hf=N([a(`scb-pagination`)],Hf),w(),b(),P();var Uf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},Wf=class extends C{constructor(...e){super(...e),this.id=``,this.type=`circular`,this.progress=25,this.isStatic=!0,this.loadingLabel=`Laddar`,this.progressLabel=`Förlopp`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isSyncingAria=!1,this._defaultAriaLabelApplied=!1,this._defaultAriaValueTextApplied=!1}static{this.styles=[p`
17316
+ `}};N([_({type:String})],Uf.prototype,`variant`,void 0),N([_({type:String})],Uf.prototype,`alignment`,void 0),N([_({type:Number})],Uf.prototype,`page`,void 0),N([_({type:Number,attribute:`total-pages`})],Uf.prototype,`totalPages`,void 0),N([_({type:String,attribute:`paging-href`})],Uf.prototype,`pagingHref`,void 0),N([_({type:String,attribute:`base-uri`})],Uf.prototype,`baseUri`,void 0),N([_({type:String,attribute:`pagination-aria-label`})],Uf.prototype,`paginationAriaLabel`,void 0),N([_({type:String,attribute:`current-aria-label`})],Uf.prototype,`currentAriaLabel`,void 0),N([_({type:String,attribute:`paging-number-aria-label`})],Uf.prototype,`pagingNumberAriaLabel`,void 0),N([_({type:String,attribute:`previous-label`})],Uf.prototype,`previousLabel`,void 0),N([_({type:String,attribute:`next-label`})],Uf.prototype,`nextLabel`,void 0),N([_({type:String,attribute:`previous-aria-label`})],Uf.prototype,`previousAriaLabel`,void 0),N([_({type:String,attribute:`next-aria-label`})],Uf.prototype,`nextAriaLabel`,void 0),N([_({type:Boolean})],Uf.prototype,`isNarrow`,void 0),N([_({type:String})],Uf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`})],Uf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`})],Uf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`})],Uf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`})],Uf.prototype,`spacingRight`,void 0),Uf=N([a(`scb-pagination`)],Uf),w(),b(),P();var Wf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},Gf=class extends C{constructor(...e){super(...e),this.id=``,this.type=`circular`,this.progress=25,this.isStatic=!0,this.loadingLabel=`Laddar`,this.progressLabel=`Förlopp`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isSyncingAria=!1,this._defaultAriaLabelApplied=!1,this._defaultAriaValueTextApplied=!1}static{this.styles=[p`
17289
17317
  .circular {
17290
17318
  display: flex;
17291
17319
  align-items: center;
@@ -17385,7 +17413,7 @@
17385
17413
  </div>
17386
17414
  `}
17387
17415
  </div>
17388
- `}};N([_({type:String})],Wf.prototype,`id`,void 0),N([_({type:String,reflect:!0})],Wf.prototype,`type`,void 0),N([_({type:Number,reflect:!0})],Wf.prototype,`progress`,void 0),N([_({type:Boolean,attribute:`is-static`,converter:Uf})],Wf.prototype,`isStatic`,void 0),N([_({type:String,attribute:`loading-label`})],Wf.prototype,`loadingLabel`,void 0),N([_({type:String,attribute:`progress-label`})],Wf.prototype,`progressLabel`,void 0),N([_({type:String,reflect:!0})],Wf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Wf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Wf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Wf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Wf.prototype,`spacingRight`,void 0),Wf=N([a(`scb-progress-indicator`)],Wf),E(),w(),b(),j(),Ol(),P();var Gf=class extends C{constructor(...e){super(...e),this.width=`100%`,this.active=!1,this.current=!1,this.disabled=!1,this.href=``,this.label=``,this.position=`top`,this._stepId=`scb-step-${Math.random().toString(36).slice(2)}`,this._showTooltip=()=>{let e=this.renderRoot.querySelector(`.tooltip`),t=this.renderRoot.querySelector(`.progress-step`);!this.label||this.disabled||!Sl(e,t,`hint`)||this._adjustTooltipPosition()},this._hideTooltip=()=>{z(this.renderRoot.querySelector(`.tooltip`))},this._adjustTooltipPosition=()=>{let e=this.renderRoot.querySelector(`.tooltip`),t=this.renderRoot.querySelector(`.progress-step`);if(!e||!t||!wl(e))return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.position===`top`,a=n.bottom+10+r.height<=window.innerHeight-8,o=n.top-10-r.height>=8,s=i?a||!o:!o&&a,c=Math.min(Math.max(n.left+(n.width-r.width)/2,8),Math.max(8,window.innerWidth-r.width-8)),l=s?Math.min(n.bottom+10,window.innerHeight-r.height-8):Math.max(8,n.top-10-r.height);e.classList.toggle(`top`,s),e.classList.toggle(`bottom`,!s),e.classList.remove(`tooltip-left`,`tooltip-right`),e.style.left=`${c}px`,e.style.right=``,e.style.top=`${l}px`,e.style.bottom=`auto`,e.style.transform=`none`}}static{this.styles=p`
17416
+ `}};N([_({type:String})],Gf.prototype,`id`,void 0),N([_({type:String,reflect:!0})],Gf.prototype,`type`,void 0),N([_({type:Number,reflect:!0})],Gf.prototype,`progress`,void 0),N([_({type:Boolean,attribute:`is-static`,converter:Wf})],Gf.prototype,`isStatic`,void 0),N([_({type:String,attribute:`loading-label`})],Gf.prototype,`loadingLabel`,void 0),N([_({type:String,attribute:`progress-label`})],Gf.prototype,`progressLabel`,void 0),N([_({type:String,reflect:!0})],Gf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Gf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Gf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Gf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Gf.prototype,`spacingRight`,void 0),Gf=N([a(`scb-progress-indicator`)],Gf),E(),w(),b(),j(),Ol(),P();var Kf=class extends C{constructor(...e){super(...e),this.width=`100%`,this.active=!1,this.current=!1,this.disabled=!1,this.href=``,this.label=``,this.position=`top`,this._stepId=`scb-step-${Math.random().toString(36).slice(2)}`,this._showTooltip=()=>{let e=this.renderRoot.querySelector(`.tooltip`),t=this.renderRoot.querySelector(`.progress-step`);!this.label||this.disabled||!Sl(e,t,`hint`)||this._adjustTooltipPosition()},this._hideTooltip=()=>{z(this.renderRoot.querySelector(`.tooltip`))},this._adjustTooltipPosition=()=>{let e=this.renderRoot.querySelector(`.tooltip`),t=this.renderRoot.querySelector(`.progress-step`);if(!e||!t||!wl(e))return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.position===`top`,a=n.bottom+10+r.height<=window.innerHeight-8,o=n.top-10-r.height>=8,s=i?a||!o:!o&&a,c=Math.min(Math.max(n.left+(n.width-r.width)/2,8),Math.max(8,window.innerWidth-r.width-8)),l=s?Math.min(n.bottom+10,window.innerHeight-r.height-8):Math.max(8,n.top-10-r.height);e.classList.toggle(`top`,s),e.classList.toggle(`bottom`,!s),e.classList.remove(`tooltip-left`,`tooltip-right`),e.style.left=`${c}px`,e.style.right=``,e.style.top=`${l}px`,e.style.bottom=`auto`,e.style.transform=`none`}}static{this.styles=p`
17389
17417
  :host {
17390
17418
  display: block;
17391
17419
  width: var(--progress-step-width, 100%);
@@ -17553,7 +17581,7 @@
17553
17581
  `}
17554
17582
  ${this.disabled?``:x`<md-focus-ring for="${this._stepId}"></md-focus-ring>`}
17555
17583
  ${this.label&&!this.disabled?x`<div class="tooltip ${this.position===`bottom`?`bottom`:`top`}">${this.label}</div>`:``}
17556
- `}};N([_({type:String})],Gf.prototype,`width`,void 0),N([_({type:Boolean,reflect:!0})],Gf.prototype,`active`,void 0),N([_({type:Boolean,reflect:!0})],Gf.prototype,`current`,void 0),N([_({type:Boolean,reflect:!0})],Gf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Gf.prototype,`href`,void 0),N([_({type:String})],Gf.prototype,`label`,void 0),N([_({type:String})],Gf.prototype,`position`,void 0),N([v()],Gf.prototype,`_stepId`,void 0),Gf=N([a(`scb-progress-step`)],Gf),w(),b(),P();var Kf=class extends C{constructor(...e){super(...e),this.progressWidth=23,this.height=`normal`,this.position=`top`,this.ariaLabel=`Förloppssteg`,this.ariaLabelledby=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.syncSteps=()=>{let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0}).filter(e=>e instanceof Gf),n=this.clampPercent(this.progressWidth),r=t.map(e=>this.parseStepWidth(e.width)).reduce((e,t)=>{let n=e.length>0?e[e.length-1]:0;return e.push(n+t),e},[]),i=r.findIndex(e=>n<=e),a=i===-1?t.length-1:Math.max(0,i);t.forEach((e,i)=>{let o=r[i]??0;e.position=this.position,e.active=o<=n+2,e.current=i===a,e.setAttribute(`aria-posinset`,String(i+1)),e.setAttribute(`aria-setsize`,String(t.length)),i===t.length-1?e.classList.add(`last-step`):e.classList.remove(`last-step`)})}}static{this.styles=p`
17584
+ `}};N([_({type:String})],Kf.prototype,`width`,void 0),N([_({type:Boolean,reflect:!0})],Kf.prototype,`active`,void 0),N([_({type:Boolean,reflect:!0})],Kf.prototype,`current`,void 0),N([_({type:Boolean,reflect:!0})],Kf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Kf.prototype,`href`,void 0),N([_({type:String})],Kf.prototype,`label`,void 0),N([_({type:String})],Kf.prototype,`position`,void 0),N([v()],Kf.prototype,`_stepId`,void 0),Kf=N([a(`scb-progress-step`)],Kf),w(),b(),P();var qf=class extends C{constructor(...e){super(...e),this.progressWidth=23,this.height=`normal`,this.position=`top`,this.ariaLabel=`Förloppssteg`,this.ariaLabelledby=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.syncSteps=()=>{let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0}).filter(e=>e instanceof Kf),n=this.clampPercent(this.progressWidth),r=t.map(e=>this.parseStepWidth(e.width)).reduce((e,t)=>{let n=e.length>0?e[e.length-1]:0;return e.push(n+t),e},[]),i=r.findIndex(e=>n<=e),a=i===-1?t.length-1:Math.max(0,i);t.forEach((e,i)=>{let o=r[i]??0;e.position=this.position,e.active=o<=n+2,e.current=i===a,e.setAttribute(`aria-posinset`,String(i+1)),e.setAttribute(`aria-setsize`,String(t.length)),i===t.length-1?e.classList.add(`last-step`):e.classList.remove(`last-step`)})}}static{this.styles=p`
17557
17585
  :host {
17558
17586
  display: block;
17559
17587
  width: 100%;
@@ -17630,7 +17658,7 @@
17630
17658
  <slot @slotchange=${this.syncSteps}></slot>
17631
17659
  </div>
17632
17660
  </nav>
17633
- `}};N([_({type:Number,reflect:!0,attribute:`progress-width`})],Kf.prototype,`progressWidth`,void 0),N([_({type:String,reflect:!0})],Kf.prototype,`height`,void 0),N([_({type:String,reflect:!0})],Kf.prototype,`position`,void 0),N([_({type:String,attribute:`aria-label`})],Kf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-labelledby`})],Kf.prototype,`ariaLabelledby`,void 0),N([_({type:String,reflect:!0})],Kf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Kf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Kf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Kf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Kf.prototype,`spacingRight`,void 0),Kf=N([a(`scb-progress-stepper`)],Kf),w(),b(),P();var qf=class extends C{constructor(...e){super(...e),this.navSelector=``,this.offsetTop=0,this.offsetBottom=0,this.updateHash=!0,this.activeId=``,this.layout=``,this.sidebarNavWidth=`320px`,this.sidebarHeight=`560px`,this.stackHeight=``,this.sidebarNavTop=`0px`,this.contentPadding=`0px`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__navEl=null,this.__contentEl=null,this.__contentShellEl=null,this.__links=[],this.__observer=null,this.__fallbackScrollRoot=null,this.__entries=new Map,this.__rafId=null,this.__scrollRafId=null,this.__hashAllowUpdates=!1,this.__hashBaselineReady=!1,this.__hashBaselinePos=0,this.__hashBaselineRafId=null,this.__hashScrollRoot=null,this.__hashSuspend=!1,this.__hashInitialApplied=!1,this.__onHashScrollBound=()=>this.__onHashScroll(),this.__scrollAnimSeq=0,this.__syncingActiveId=!1,this.__slotsResolvedOnce=!1,this.__motionMeasureEl=null,this.__focusableRafId=null,this.__autoOffsetTop=0,this.__autoOffsetRafId=null,this.__navResizeObserver=null,this.__onNavClickBound=e=>this.__onNavClick(e),this.__onScrollFallbackBound=()=>this.__updateActiveFromRects(),this.__onResizeBound=()=>{this.__requestActiveRecalc(),this.__requestAutoOffsetMeasure()},this.__onSlotChange=()=>{let e=this.__navEl;this.__teardown(),this.__resolveSlots(),this.__requestEnsureContentFocusable(),this.__navEl&&this.__navEl.addEventListener(`click`,this.__onNavClickBound,!0),(e!==this.__navEl||!this.__links.length)&&this.__collectLinks(),this.__requestAutoOffsetMeasure(),this.__rebuildObserver(),this.__attachHashScrollRoot(),this.__applyInitialHashIfAny(),!this.__hashInitialApplied&&this.activeId&&this.__applyActiveId(this.activeId,{updateHash:!1,scrollToTarget:!1}),this.__slotsResolvedOnce=!0}}static{this.properties={navSelector:{type:String,attribute:`nav-selector`},offsetTop:{type:Number,attribute:`offset-top`},offsetBottom:{type:Number,attribute:`offset-bottom`},updateHash:{type:Boolean,attribute:`update-hash`,converter:{fromAttribute:e=>{if(e===null)return!0;let t=e.trim().toLowerCase();return!(t===`false`||t===`0`||t===`no`)},toAttribute:e=>e?``:null}},activeId:{type:String,attribute:`active-id`,reflect:!0},layout:{type:String,reflect:!0},sidebarNavWidth:{type:String,attribute:`sidebar-nav-width`},sidebarHeight:{type:String,attribute:`sidebar-height`},stackHeight:{type:String,attribute:`stack-height`},sidebarNavTop:{type:String,attribute:`sidebar-nav-top`},contentPadding:{type:String,attribute:`content-padding`},spacing:{type:String,reflect:!0},spacingTop:{type:String,attribute:`spacing-top`,reflect:!0},spacingBottom:{type:String,attribute:`spacing-bottom`,reflect:!0},spacingLeft:{type:String,attribute:`spacing-left`,reflect:!0},spacingRight:{type:String,attribute:`spacing-right`,reflect:!0}}}static{this.styles=p`
17661
+ `}};N([_({type:Number,reflect:!0,attribute:`progress-width`})],qf.prototype,`progressWidth`,void 0),N([_({type:String,reflect:!0})],qf.prototype,`height`,void 0),N([_({type:String,reflect:!0})],qf.prototype,`position`,void 0),N([_({type:String,attribute:`aria-label`})],qf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-labelledby`})],qf.prototype,`ariaLabelledby`,void 0),N([_({type:String,reflect:!0})],qf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],qf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],qf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],qf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],qf.prototype,`spacingRight`,void 0),qf=N([a(`scb-progress-stepper`)],qf),w(),b(),P();var Jf=class extends C{constructor(...e){super(...e),this.navSelector=``,this.offsetTop=0,this.offsetBottom=0,this.updateHash=!0,this.activeId=``,this.layout=``,this.sidebarNavWidth=`320px`,this.sidebarHeight=`560px`,this.stackHeight=``,this.sidebarNavTop=`0px`,this.contentPadding=`0px`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__navEl=null,this.__contentEl=null,this.__contentShellEl=null,this.__links=[],this.__observer=null,this.__fallbackScrollRoot=null,this.__entries=new Map,this.__rafId=null,this.__scrollRafId=null,this.__hashAllowUpdates=!1,this.__hashBaselineReady=!1,this.__hashBaselinePos=0,this.__hashBaselineRafId=null,this.__hashScrollRoot=null,this.__hashSuspend=!1,this.__hashInitialApplied=!1,this.__onHashScrollBound=()=>this.__onHashScroll(),this.__scrollAnimSeq=0,this.__syncingActiveId=!1,this.__slotsResolvedOnce=!1,this.__motionMeasureEl=null,this.__focusableRafId=null,this.__autoOffsetTop=0,this.__autoOffsetRafId=null,this.__navResizeObserver=null,this.__onNavClickBound=e=>this.__onNavClick(e),this.__onScrollFallbackBound=()=>this.__updateActiveFromRects(),this.__onResizeBound=()=>{this.__requestActiveRecalc(),this.__requestAutoOffsetMeasure()},this.__onSlotChange=()=>{let e=this.__navEl;this.__teardown(),this.__resolveSlots(),this.__requestEnsureContentFocusable(),this.__navEl&&this.__navEl.addEventListener(`click`,this.__onNavClickBound,!0),(e!==this.__navEl||!this.__links.length)&&this.__collectLinks(),this.__requestAutoOffsetMeasure(),this.__rebuildObserver(),this.__attachHashScrollRoot(),this.__applyInitialHashIfAny(),!this.__hashInitialApplied&&this.activeId&&this.__applyActiveId(this.activeId,{updateHash:!1,scrollToTarget:!1}),this.__slotsResolvedOnce=!0}}static{this.properties={navSelector:{type:String,attribute:`nav-selector`},offsetTop:{type:Number,attribute:`offset-top`},offsetBottom:{type:Number,attribute:`offset-bottom`},updateHash:{type:Boolean,attribute:`update-hash`,converter:{fromAttribute:e=>{if(e===null)return!0;let t=e.trim().toLowerCase();return!(t===`false`||t===`0`||t===`no`)},toAttribute:e=>e?``:null}},activeId:{type:String,attribute:`active-id`,reflect:!0},layout:{type:String,reflect:!0},sidebarNavWidth:{type:String,attribute:`sidebar-nav-width`},sidebarHeight:{type:String,attribute:`sidebar-height`},stackHeight:{type:String,attribute:`stack-height`},sidebarNavTop:{type:String,attribute:`sidebar-nav-top`},contentPadding:{type:String,attribute:`content-padding`},spacing:{type:String,reflect:!0},spacingTop:{type:String,attribute:`spacing-top`,reflect:!0},spacingBottom:{type:String,attribute:`spacing-bottom`,reflect:!0},spacingLeft:{type:String,attribute:`spacing-left`,reflect:!0},spacingRight:{type:String,attribute:`spacing-right`,reflect:!0}}}static{this.styles=p`
17634
17662
  :host {
17635
17663
  display: contents;
17636
17664
  }
@@ -17717,7 +17745,7 @@
17717
17745
  `}return x`
17718
17746
  <slot name="nav" @slotchange=${this.__onSlotChange}></slot>
17719
17747
  <slot name="content" @slotchange=${this.__onSlotChange}></slot>
17720
- `}};qf=N([a(`scb-scrollspy`)],qf),w(),b(),D(),E(),j(),P();var Jf=class extends C{constructor(...e){super(...e),this.label=``,this.value=``,this.selected=!1,this.icon=``,this.href=``,this.disabled=!1,this.onHostKeydown=e=>{if(!this.href||this.isEffectivelyDisabled||e.code!==`Space`&&e.code!==`Enter`&&e.code!==`NumpadEnter`)return;let t=this.shadowRoot?.querySelector(`a[href]`);t&&(e.preventDefault(),e.stopPropagation(),t.click())}}get isEffectivelyDisabled(){let e=this.parentElement?.hasAttribute?.(`disabled`);return this.disabled||!!e}get hasDefaultSlotContent(){return Array.from(this.childNodes).some(e=>e.nodeType===1||e.nodeType===3&&(e.textContent??``).trim()!==``)}connectedCallback(){super.connectedCallback(),this.addEventListener(`focusin`,ac)}static{this.styles=p`
17748
+ `}};Jf=N([a(`scb-scrollspy`)],Jf),w(),b(),D(),E(),j(),P();var Yf=class extends C{constructor(...e){super(...e),this.label=``,this.value=``,this.selected=!1,this.icon=``,this.href=``,this.disabled=!1,this.onHostKeydown=e=>{if(!this.href||this.isEffectivelyDisabled||e.code!==`Space`&&e.code!==`Enter`&&e.code!==`NumpadEnter`)return;let t=this.shadowRoot?.querySelector(`a[href]`);t&&(e.preventDefault(),e.stopPropagation(),t.click())}}get isEffectivelyDisabled(){let e=this.parentElement?.hasAttribute?.(`disabled`);return this.disabled||!!e}get hasDefaultSlotContent(){return Array.from(this.childNodes).some(e=>e.nodeType===1||e.nodeType===3&&(e.textContent??``).trim()!==``)}connectedCallback(){super.connectedCallback(),this.addEventListener(`focusin`,ac)}static{this.styles=p`
17721
17749
  :host {
17722
17750
  display: block;
17723
17751
  block-size: 100%;
@@ -17821,7 +17849,7 @@
17821
17849
  ${this.selected?t&&n?a:t?x`${a}<md-icon>${this.icon}</md-icon>`:a:t?x`<md-icon>${this.icon}</md-icon>`:n?o:``}
17822
17850
  ${n?x`<span>${r}</span>`:``}
17823
17851
  <md-focus-ring inward></md-focus-ring>
17824
- `;return this.href?x`<a class="${i}" href="${this.href}" aria-disabled="${e?`true`:`false`}" tabindex="-1">${s}</a>`:x`<div class="${i}" aria-disabled="${e?`true`:`false`}">${s}</div>`}updateInteractiveAttributes(){this.setAttribute(`tabindex`,this.disabled?`-1`:`0`),this.setAttribute(`role`,this.href?`link`:`button`)}firstUpdated(){this.addEventListener(`keydown`,this.onHostKeydown),this.updateInteractiveAttributes()}disconnectedCallback(){this.removeEventListener(`focusin`,ac),this.removeEventListener(`keydown`,this.onHostKeydown),super.disconnectedCallback()}updated(e){super.updated(e),(e.has(`disabled`)||e.has(`href`))&&this.updateInteractiveAttributes()}};N([_({type:String,reflect:!0})],Jf.prototype,`label`,void 0),N([_({type:String,reflect:!0})],Jf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Jf.prototype,`selected`,void 0),N([_({type:String,reflect:!0})],Jf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Jf.prototype,`href`,void 0),N([_({type:Boolean,reflect:!0})],Jf.prototype,`disabled`,void 0),Jf=N([a(`scb-segmented-item`)],Jf),w(),b(),uc(),P();var Yf=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.variant=`single-select`,this.layout=`horizontal`,this.size=lc[`scb-segmented-button`].size,this.value=``,this.values=[],this.disabled=!1,this.required=!1,this.name=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialValue=``,this._initialValues=[],this._customValidationMessage=``,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
17852
+ `;return this.href?x`<a class="${i}" href="${this.href}" aria-disabled="${e?`true`:`false`}" tabindex="-1">${s}</a>`:x`<div class="${i}" aria-disabled="${e?`true`:`false`}">${s}</div>`}updateInteractiveAttributes(){this.setAttribute(`tabindex`,this.disabled?`-1`:`0`),this.setAttribute(`role`,this.href?`link`:`button`)}firstUpdated(){this.addEventListener(`keydown`,this.onHostKeydown),this.updateInteractiveAttributes()}disconnectedCallback(){this.removeEventListener(`focusin`,ac),this.removeEventListener(`keydown`,this.onHostKeydown),super.disconnectedCallback()}updated(e){super.updated(e),(e.has(`disabled`)||e.has(`href`))&&this.updateInteractiveAttributes()}};N([_({type:String,reflect:!0})],Yf.prototype,`label`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Yf.prototype,`selected`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`href`,void 0),N([_({type:Boolean,reflect:!0})],Yf.prototype,`disabled`,void 0),Yf=N([a(`scb-segmented-item`)],Yf),w(),b(),uc(),P();var Xf=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.variant=`single-select`,this.layout=`horizontal`,this.size=lc[`scb-segmented-button`].size,this.value=``,this.values=[],this.disabled=!1,this.required=!1,this.name=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formResetHandler=null,this._initialValue=``,this._initialValues=[],this._customValidationMessage=``,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
17825
17853
  :host {
17826
17854
  --scb-segmented-button-width: 100%;
17827
17855
  --scb-segmented-button-height: var(--scb-segmented-button-control-size-medium, var(--scb-segmented-button-design-height-medium));
@@ -17996,7 +18024,7 @@
17996
18024
  --scb-segmented-button-design-gap: var(--scb-segmented-button-design-gap-large);
17997
18025
  }
17998
18026
  /* design:bindings:scb-segmented-button:end */
17999
- `}connectedCallback(){super.connectedCallback(),this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.updateSegments(),this._syncFormValue()},this._form.addEventListener(`reset`,this._formResetHandler,!0))}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}firstUpdated(){this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],this.updateSegments();let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>{this.updateSegments()}),e.addEventListener(`click`,e=>this.onSlotClick(e)),e.addEventListener(`focus`,()=>{this.dispatchEvent(new CustomEvent(`focus`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`blur`,()=>{this.dispatchEvent(new CustomEvent(`blur`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`keydown`,e=>{if(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`){let t=e.target;if(t&&t.closest){let n=t.closest(`scb-segmented-item`);n&&!n.hasAttribute(`disabled`)&&!this.disabled&&(this.onSlotClick(e),e.preventDefault())}}})),this._syncFormValue(),this._syncValidity(),this.#t()}updated(e){super.updated(e),this.updateSegments(),(e.has(`value`)||e.has(`values`)||e.has(`disabled`)||e.has(`variant`)||e.has(`name`))&&(this._syncFormValue(),this._syncValidity()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t()}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;let n=t.closest(`scb-segmented-item`);if(!n||this.disabled||n.hasAttribute(`disabled`))return;let r=n.getAttribute(`value`)||``;r&&(this.variant===`multi-select`?(this.values.indexOf(r)===-1?this.values=[...this.values,r]:this.values=this.values.filter(e=>e!==r),this.dispatchEvent(new CustomEvent(`change`,{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):r!==this.value&&(this.value=r,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r},bubbles:!0,composed:!0})),this.updateSegments()),this.#e(e,n))}#e(e,t){!(e instanceof MouseEvent)||e.detail===0||queueMicrotask(()=>{document.activeElement===t&&t.blur()})}updateSegments(){let e=this.shadowRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{if(e.tagName===`SCB-SEGMENTED-ITEM`){this.layout===`responsive`?e.setAttribute(`data-scb-segmented-layout`,`responsive`):e.removeAttribute(`data-scb-segmented-layout`);let t=e.getAttribute(`value`)||``;if(t){let n=!1;n=this.variant===`multi-select`?!!this.values&&this.values.includes(t):t===this.value,e.setAttribute(`aria-pressed`,n?`true`:`false`),n?e.setAttribute(`selected`,`true`):e.removeAttribute(`selected`)}this.disabled&&e.setAttribute(`disabled`,`true`)}})}formDisabledCallback(e){this.disabled=e}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required?this.variant===`multi-select`?this.values.length===0?`Välj minst ett alternativ.`:``:this.value?``:`Välj ett alternativ.`:``}_syncValidity(){if(!this._internals)return;let e=this.disabled?``:this._getValidationMessage();e?(this._internals.setValidity({valueMissing:!0},e),this.setAttribute(`aria-invalid`,`true`)):(this._internals.setValidity({}),this.removeAttribute(`aria-invalid`))}checkValidity(){return!this._getValidationMessage()}reportValidity(){return this._syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this._syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant===`multi-select`){if(!this.values||this.values.length===0){this._internals.setFormValue(null);return}let e=new FormData;for(let t of this.values)e.append(this.name,t);this._internals.setFormValue(e)}else{if(!this.value){this._internals.setFormValue(null);return}this._internals.setFormValue(this.value)}}}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#t(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-segmented-button-spacing-block-start`,t):this.style.removeProperty(`--scb-segmented-button-spacing-block-start`),n?this.style.setProperty(`--scb-segmented-button-spacing-block-end`,n):this.style.removeProperty(`--scb-segmented-button-spacing-block-end`),r?this.style.setProperty(`--scb-segmented-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-segmented-button-spacing-inline-start`),i?this.style.setProperty(`--scb-segmented-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-segmented-button-spacing-inline-end`)}render(){return x`<slot></slot>`}};N([_({type:String,reflect:!0})],Yf.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`layout`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`value`,void 0),N([_({type:Array})],Yf.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Yf.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Yf.prototype,`required`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Yf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Yf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Yf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Yf.prototype,`spacingRight`,void 0),Yf=N([a(`scb-segmented-button`)],Yf),w(),b(),E(),j(),P();var Xf=class extends C{constructor(...e){super(...e),this.value=``,this.disabled=!1,this.showCheckbox=!1,this.checked=!1,this.showRadio=!1,this.label=``,this.noHighlightSelected=!1}connectedCallback(){super.connectedCallback(),this.addEventListener(`focusin`,ac)}updated(){this.setAttribute(`role`,`option`),this.setAttribute(`aria-selected`,this.checked?`true`:`false`),this.disabled?this.setAttribute(`aria-disabled`,`true`):this.removeAttribute(`aria-disabled`)}disconnectedCallback(){this.removeEventListener(`focusin`,ac),super.disconnectedCallback()}static{this.styles=p`
18027
+ `}connectedCallback(){super.connectedCallback(),this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.updateSegments(),this._syncFormValue()},this._form.addEventListener(`reset`,this._formResetHandler,!0))}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),super.disconnectedCallback()}firstUpdated(){this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],this.updateSegments();let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>{this.updateSegments()}),e.addEventListener(`click`,e=>this.onSlotClick(e)),e.addEventListener(`focus`,()=>{this.dispatchEvent(new CustomEvent(`focus`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`blur`,()=>{this.dispatchEvent(new CustomEvent(`blur`,{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener(`keydown`,e=>{if(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`){let t=e.target;if(t&&t.closest){let n=t.closest(`scb-segmented-item`);n&&!n.hasAttribute(`disabled`)&&!this.disabled&&(this.onSlotClick(e),e.preventDefault())}}})),this._syncFormValue(),this._syncValidity(),this.#t()}updated(e){super.updated(e),this.updateSegments(),(e.has(`value`)||e.has(`values`)||e.has(`disabled`)||e.has(`variant`)||e.has(`name`))&&(this._syncFormValue(),this._syncValidity()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#t()}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;let n=t.closest(`scb-segmented-item`);if(!n||this.disabled||n.hasAttribute(`disabled`))return;let r=n.getAttribute(`value`)||``;r&&(this.variant===`multi-select`?(this.values.indexOf(r)===-1?this.values=[...this.values,r]:this.values=this.values.filter(e=>e!==r),this.dispatchEvent(new CustomEvent(`change`,{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):r!==this.value&&(this.value=r,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r},bubbles:!0,composed:!0})),this.updateSegments()),this.#e(e,n))}#e(e,t){!(e instanceof MouseEvent)||e.detail===0||queueMicrotask(()=>{document.activeElement===t&&t.blur()})}updateSegments(){let e=this.shadowRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{if(e.tagName===`SCB-SEGMENTED-ITEM`){this.layout===`responsive`?e.setAttribute(`data-scb-segmented-layout`,`responsive`):e.removeAttribute(`data-scb-segmented-layout`);let t=e.getAttribute(`value`)||``;if(t){let n=!1;n=this.variant===`multi-select`?!!this.values&&this.values.includes(t):t===this.value,e.setAttribute(`aria-pressed`,n?`true`:`false`),n?e.setAttribute(`selected`,`true`):e.removeAttribute(`selected`)}this.disabled&&e.setAttribute(`disabled`,`true`)}})}formDisabledCallback(e){this.disabled=e}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required?this.variant===`multi-select`?this.values.length===0?`Välj minst ett alternativ.`:``:this.value?``:`Välj ett alternativ.`:``}_syncValidity(){if(!this._internals)return;let e=this.disabled?``:this._getValidationMessage();e?(this._internals.setValidity({valueMissing:!0},e),this.setAttribute(`aria-invalid`,`true`)):(this._internals.setValidity({}),this.removeAttribute(`aria-invalid`))}checkValidity(){return!this._getValidationMessage()}reportValidity(){return this._syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=e,this._syncValidity()}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant===`multi-select`){if(!this.values||this.values.length===0){this._internals.setFormValue(null);return}let e=new FormData;for(let t of this.values)e.append(this.name,t);this._internals.setFormValue(e)}else{if(!this.value){this._internals.setFormValue(null);return}this._internals.setFormValue(this.value)}}}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#t(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-segmented-button-spacing-block-start`,t):this.style.removeProperty(`--scb-segmented-button-spacing-block-start`),n?this.style.setProperty(`--scb-segmented-button-spacing-block-end`,n):this.style.removeProperty(`--scb-segmented-button-spacing-block-end`),r?this.style.setProperty(`--scb-segmented-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-segmented-button-spacing-inline-start`),i?this.style.setProperty(`--scb-segmented-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-segmented-button-spacing-inline-end`)}render(){return x`<slot></slot>`}};N([_({type:String,reflect:!0})],Xf.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Xf.prototype,`layout`,void 0),N([_({type:String,reflect:!0})],Xf.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Xf.prototype,`value`,void 0),N([_({type:Array})],Xf.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Xf.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Xf.prototype,`required`,void 0),N([_({type:String,reflect:!0})],Xf.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Xf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Xf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Xf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Xf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Xf.prototype,`spacingRight`,void 0),Xf=N([a(`scb-segmented-button`)],Xf),w(),b(),E(),j(),P();var Zf=class extends C{constructor(...e){super(...e),this.value=``,this.disabled=!1,this.showCheckbox=!1,this.checked=!1,this.showRadio=!1,this.label=``,this.noHighlightSelected=!1}connectedCallback(){super.connectedCallback(),this.addEventListener(`focusin`,ac)}updated(){this.setAttribute(`role`,`option`),this.setAttribute(`aria-selected`,this.checked?`true`:`false`),this.disabled?this.setAttribute(`aria-disabled`,`true`):this.removeAttribute(`aria-disabled`)}disconnectedCallback(){this.removeEventListener(`focusin`,ac),super.disconnectedCallback()}static{this.styles=p`
18000
18028
  :host {
18001
18029
  /* Fälttext: base text current. JSON-källa: src/tokens/source/typography.json. */
18002
18030
  --scb-fields-text-font-weight-current: var(--scb-fields-text-medium-font-weight, var(--scb-fields-text-medium-weight, var(--scb-fields-text-font-weight, var(--scb-fields-text-weight))));
@@ -18205,7 +18233,7 @@
18205
18233
  <div class="label">${this.label?this.label:x`<slot></slot>`}</div>
18206
18234
  <md-focus-ring inward></md-focus-ring>
18207
18235
  </div>
18208
- `}};N([_({type:String})],Xf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Xf.prototype,`disabled`,void 0),N([_({type:Boolean})],Xf.prototype,`showCheckbox`,void 0),N([_({type:Boolean})],Xf.prototype,`checked`,void 0),N([_({type:Boolean})],Xf.prototype,`showRadio`,void 0),N([_({type:String})],Xf.prototype,`label`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Xf.prototype,`noHighlightSelected`,void 0),Xf=N([a(`scb-select-option`)],Xf),w(),pl(),b(),D(),yc(),dl(),Nl(),j(),Ol(),uc(),cc(),P();var Q=class extends C{static{this.formAssociated=!0}constructor(){super(),this._optionsObserver=null,this._internals=null,this.focusedIndex=-1,this.variant=`single-select`,this.value=``,this.values=[],this.disabled=!1,this.required=!1,this.error=!1,this.open=!1,this.label=``,this.name=``,this.placeholder=``,this.supportingText=``,this.errorText=``,this.helpText=``,this.helpLabel=`Visa hjälptext`,this.withRadiobuttons=!1,this.noHighlightSelected=!1,this.size=lc[`scb-select`].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.zIndex=void 0,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._initialValues=[],this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._selectId=`scb-select-${Math.random().toString(36).slice(2,11)}`,this._placementFrame=0,this._optionsPlacement=`below`,this._activeOption=null,this._onDocumentClick=e=>{if(!this.open)return;let t=e.composedPath();if(!t.includes(this)){let e=t.find(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-select`);if(e&&e!==this){this._setOpen(!1);return}this._setOpen(!1),requestAnimationFrame(()=>{this.open||this._focusTrigger()})}},this._scheduleOptionsPlacement=()=>{!this.open||!this.isConnected||(this._placementFrame&&cancelAnimationFrame(this._placementFrame),this._placementFrame=requestAnimationFrame(()=>{this._placementFrame=0,this._updateOptionsPlacement()}))},this._onSlotClick=e=>{let t=this._getOptions(),n=e.composedPath(),r=t.find(e=>n.includes(e));r&&(this._selectOption(r),this._focusTrigger(),e.stopPropagation())},this._onKeyDown=e=>{if(e.key===`Tab`&&this.open){this._setOpen(!1),this._syncOptionsPopover();return}if(e.key===`Escape`&&this.open){e.preventDefault(),e.stopPropagation(),this._setOpen(!1),this._focusTrigger();return}if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=e.key===`ArrowDown`?1:-1;if(!this.open){this._setOpen(!0,{keyboard:!0}),this.updateComplete.then(()=>{this._setFocusedIndex(this._getInitialFocusedIndex(),{scroll:!1}),this.focusedIndex>=0&&e.key===`ArrowUp`&&this._moveFocusedIndex(-1)});return}this._moveFocusedIndex(t);return}if((e.key===`Home`||e.key===`End`)&&this.open){e.preventDefault(),e.stopPropagation();let t=this._getOptions(),n=t.findIndex(e=>!e.disabled);if(e.key===`End`){for(let e=t.length-1;e>=0;--e)if(!t[e]?.disabled){n=e;break}}this._setFocusedIndex(n);return}if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),this.open){let e=this._getFocusedOption();e&&this._selectOption(e);return}this._setOpen(!0,{keyboard:!0})}},this._onOptionKeyDown=e=>{if(e.key===`Escape`&&this.open){e.preventDefault(),e.stopPropagation(),this._setOpen(!1),this._focusTrigger();return}if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=this._getOptions(),n=e.composedPath(),r=t.find(e=>n.includes(e));r&&this._selectOption(r)}},`attachInternals`in this&&(this._internals=this.attachInternals())}_syncDensityForSize(){this.size===`extra-small`?this.setAttribute(`data-density`,`-5`):this.size===`small`?this.setAttribute(`data-density`,`-4`):this.size===`medium`?this.setAttribute(`data-density`,`-2`):this.removeAttribute(`data-density`)}static{this.styles=p`
18236
+ `}};N([_({type:String})],Zf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Zf.prototype,`disabled`,void 0),N([_({type:Boolean})],Zf.prototype,`showCheckbox`,void 0),N([_({type:Boolean})],Zf.prototype,`checked`,void 0),N([_({type:Boolean})],Zf.prototype,`showRadio`,void 0),N([_({type:String})],Zf.prototype,`label`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Zf.prototype,`noHighlightSelected`,void 0),Zf=N([a(`scb-select-option`)],Zf),w(),pl(),b(),D(),yc(),dl(),Nl(),j(),Ol(),uc(),cc(),P();var Q=class extends C{static{this.formAssociated=!0}constructor(){super(),this._optionsObserver=null,this._internals=null,this.focusedIndex=-1,this.variant=`single-select`,this.value=``,this.values=[],this.disabled=!1,this.required=!1,this.error=!1,this.open=!1,this.label=``,this.name=``,this.placeholder=``,this.supportingText=``,this.errorText=``,this.helpText=``,this.helpLabel=`Visa hjälptext`,this.withRadiobuttons=!1,this.noHighlightSelected=!1,this.size=lc[`scb-select`].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.zIndex=void 0,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._initialValues=[],this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._selectId=`scb-select-${Math.random().toString(36).slice(2,11)}`,this._placementFrame=0,this._optionsPlacement=`below`,this._activeOption=null,this._onDocumentClick=e=>{if(!this.open)return;let t=e.composedPath();if(!t.includes(this)){let e=t.find(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-select`);if(e&&e!==this){this._setOpen(!1);return}this._setOpen(!1),requestAnimationFrame(()=>{this.open||this._focusTrigger()})}},this._scheduleOptionsPlacement=()=>{!this.open||!this.isConnected||(this._placementFrame&&cancelAnimationFrame(this._placementFrame),this._placementFrame=requestAnimationFrame(()=>{this._placementFrame=0,this._updateOptionsPlacement()}))},this._onSlotClick=e=>{let t=this._getOptions(),n=e.composedPath(),r=t.find(e=>n.includes(e));r&&(this._selectOption(r),this._focusTrigger(),e.stopPropagation())},this._onKeyDown=e=>{if(e.key===`Tab`&&this.open){this._setOpen(!1),this._syncOptionsPopover();return}if(e.key===`Escape`&&this.open){e.preventDefault(),e.stopPropagation(),this._setOpen(!1),this._focusTrigger();return}if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=e.key===`ArrowDown`?1:-1;if(!this.open){this._setOpen(!0,{keyboard:!0}),this.updateComplete.then(()=>{this._setFocusedIndex(this._getInitialFocusedIndex(),{scroll:!1}),this.focusedIndex>=0&&e.key===`ArrowUp`&&this._moveFocusedIndex(-1)});return}this._moveFocusedIndex(t);return}if((e.key===`Home`||e.key===`End`)&&this.open){e.preventDefault(),e.stopPropagation();let t=this._getOptions(),n=t.findIndex(e=>!e.disabled);if(e.key===`End`){for(let e=t.length-1;e>=0;--e)if(!t[e]?.disabled){n=e;break}}this._setFocusedIndex(n);return}if(e.key===`Enter`||e.key===` `){if(e.preventDefault(),this.open){let e=this._getFocusedOption();e&&this._selectOption(e);return}this._setOpen(!0,{keyboard:!0})}},this._onOptionKeyDown=e=>{if(e.key===`Escape`&&this.open){e.preventDefault(),e.stopPropagation(),this._setOpen(!1),this._focusTrigger();return}if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=this._getOptions(),n=e.composedPath(),r=t.find(e=>n.includes(e));r&&this._selectOption(r)}},`attachInternals`in this&&(this._internals=this.attachInternals())}_syncDensityForSize(){this.size===`extra-small`?this.setAttribute(`data-density`,`-5`):this.size===`small`?this.setAttribute(`data-density`,`-4`):this.size===`medium`?this.setAttribute(`data-density`,`-2`):this.removeAttribute(`data-density`)}static{this.styles=p`
18209
18237
  :host {
18210
18238
  /* Fälttext: base text current. JSON-källa: src/tokens/source/typography.json. */
18211
18239
  --scb-fields-text-font-weight-current: var(--scb-select-design-text-medium-font-weight);
@@ -18926,7 +18954,7 @@
18926
18954
  <slot @slotchange="${()=>{this.requestUpdate(),this._scheduleOptionsPlacement()}}"></slot>
18927
18955
  </div>
18928
18956
  </div>
18929
- `}};N([_({type:String})],Q.prototype,`variant`,void 0),N([_({type:String})],Q.prototype,`value`,void 0),N([_({type:Array})],Q.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`open`,void 0),N([_({type:String})],Q.prototype,`label`,void 0),N([_({type:String})],Q.prototype,`name`,void 0),N([_({type:String})],Q.prototype,`placeholder`,void 0),N([_({type:String,attribute:`supporting-text`})],Q.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],Q.prototype,`errorText`,void 0),N([_({type:String,attribute:`help-text`})],Q.prototype,`helpText`,void 0),N([_({type:String,attribute:`help-label`})],Q.prototype,`helpLabel`,void 0),N([_({type:Boolean,attribute:`with-radiobuttons`})],Q.prototype,`withRadiobuttons`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Q.prototype,`noHighlightSelected`,void 0),N([_({type:String,reflect:!0})],Q.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Q.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Q.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Q.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Q.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Q.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`z-index`})],Q.prototype,`zIndex`,void 0),N([v()],Q.prototype,`_optionsPlacement`,void 0),N([v()],Q.prototype,`_activeOption`,void 0),Q=N([a(`scb-select`)],Q),Cf(),w(),b(),pc(),P();var Zf=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._hasCapturedInitialValues=!1,this._initialValue=20,this._initialValueStart=0,this._initialValueEnd=100,this._errorTextId=`scb-slider-error-${Math.random().toString(36).slice(2)}`,this.ticks=!1,this.step=5,this.value=20,this.range=!1,this.valueStart=0,this.valueEnd=100,this.min=0,this.max=100,this.labeled=!0,this.disabled=!1,this.name=``,this.ariaLabel=``,this.ariaLabelStart=``,this.ariaLabelEnd=``,this.error=!1,this.errorText=``,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
18957
+ `}};N([_({type:String})],Q.prototype,`variant`,void 0),N([_({type:String})],Q.prototype,`value`,void 0),N([_({type:Array})],Q.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`open`,void 0),N([_({type:String})],Q.prototype,`label`,void 0),N([_({type:String})],Q.prototype,`name`,void 0),N([_({type:String})],Q.prototype,`placeholder`,void 0),N([_({type:String,attribute:`supporting-text`})],Q.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],Q.prototype,`errorText`,void 0),N([_({type:String,attribute:`help-text`})],Q.prototype,`helpText`,void 0),N([_({type:String,attribute:`help-label`})],Q.prototype,`helpLabel`,void 0),N([_({type:Boolean,attribute:`with-radiobuttons`})],Q.prototype,`withRadiobuttons`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Q.prototype,`noHighlightSelected`,void 0),N([_({type:String,reflect:!0})],Q.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Q.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Q.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Q.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Q.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Q.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`z-index`})],Q.prototype,`zIndex`,void 0),N([v()],Q.prototype,`_optionsPlacement`,void 0),N([v()],Q.prototype,`_activeOption`,void 0),Q=N([a(`scb-select`)],Q),Cf(),w(),b(),pc(),P();var Qf=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._hasCapturedInitialValues=!1,this._initialValue=20,this._initialValueStart=0,this._initialValueEnd=100,this._errorTextId=`scb-slider-error-${Math.random().toString(36).slice(2)}`,this.ticks=!1,this.step=5,this.value=20,this.range=!1,this.valueStart=0,this.valueEnd=100,this.min=0,this.max=100,this.labeled=!0,this.disabled=!1,this.name=``,this.ariaLabel=``,this.ariaLabelStart=``,this.ariaLabelEnd=``,this.error=!1,this.errorText=``,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
18930
18958
  :host {
18931
18959
  display: block;
18932
18960
  color: var(--md-sys-color-on-surface, var(--n-10));
@@ -19029,7 +19057,7 @@
19029
19057
  ></md-slider>
19030
19058
  ${e?x`<p id=${this._errorTextId} class="slider-error-text">${e}</p>`:S}
19031
19059
  </div>
19032
- `}};N([_({type:Boolean})],Zf.prototype,`ticks`,void 0),N([_({type:Number})],Zf.prototype,`step`,void 0),N([_({type:Number,reflect:!0})],Zf.prototype,`value`,void 0),N([_({type:Boolean})],Zf.prototype,`range`,void 0),N([_({type:Number,attribute:`value-start`})],Zf.prototype,`valueStart`,void 0),N([_({type:Number,attribute:`value-end`})],Zf.prototype,`valueEnd`,void 0),N([_({type:Number,reflect:!0})],Zf.prototype,`min`,void 0),N([_({type:Number,reflect:!0})],Zf.prototype,`max`,void 0),N([_({type:Boolean})],Zf.prototype,`labeled`,void 0),N([_({type:String,attribute:`value-label`})],Zf.prototype,`valueLabel`,void 0),N([_({type:String,attribute:`value-label-start`})],Zf.prototype,`valueLabelStart`,void 0),N([_({type:String,attribute:`value-label-end`})],Zf.prototype,`valueLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Zf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Zf.prototype,`name`,void 0),N([_({type:String,attribute:`name-start`,reflect:!0})],Zf.prototype,`nameStart`,void 0),N([_({type:String,attribute:`name-end`,reflect:!0})],Zf.prototype,`nameEnd`,void 0),N([_({type:String,attribute:`aria-label`})],Zf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-label-start`})],Zf.prototype,`ariaLabelStart`,void 0),N([_({type:String,attribute:`aria-label-end`})],Zf.prototype,`ariaLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Zf.prototype,`error`,void 0),N([_({type:String,attribute:`error-text`})],Zf.prototype,`errorText`,void 0),Zf=N([a(`scb-slider`)],Zf),w(),b(),cc(),dl(),Mc(),Ol(),P();var Qf=class extends C{constructor(...e){super(...e),this.message=``,this.open=!1,this.actionText=``,this.showClose=!1,this.closeLabel=`Stäng meddelande`,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
19060
+ `}};N([_({type:Boolean})],Qf.prototype,`ticks`,void 0),N([_({type:Number})],Qf.prototype,`step`,void 0),N([_({type:Number,reflect:!0})],Qf.prototype,`value`,void 0),N([_({type:Boolean})],Qf.prototype,`range`,void 0),N([_({type:Number,attribute:`value-start`})],Qf.prototype,`valueStart`,void 0),N([_({type:Number,attribute:`value-end`})],Qf.prototype,`valueEnd`,void 0),N([_({type:Number,reflect:!0})],Qf.prototype,`min`,void 0),N([_({type:Number,reflect:!0})],Qf.prototype,`max`,void 0),N([_({type:Boolean})],Qf.prototype,`labeled`,void 0),N([_({type:String,attribute:`value-label`})],Qf.prototype,`valueLabel`,void 0),N([_({type:String,attribute:`value-label-start`})],Qf.prototype,`valueLabelStart`,void 0),N([_({type:String,attribute:`value-label-end`})],Qf.prototype,`valueLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Qf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Qf.prototype,`name`,void 0),N([_({type:String,attribute:`name-start`,reflect:!0})],Qf.prototype,`nameStart`,void 0),N([_({type:String,attribute:`name-end`,reflect:!0})],Qf.prototype,`nameEnd`,void 0),N([_({type:String,attribute:`aria-label`})],Qf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-label-start`})],Qf.prototype,`ariaLabelStart`,void 0),N([_({type:String,attribute:`aria-label-end`})],Qf.prototype,`ariaLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Qf.prototype,`error`,void 0),N([_({type:String,attribute:`error-text`})],Qf.prototype,`errorText`,void 0),Qf=N([a(`scb-slider`)],Qf),w(),b(),cc(),dl(),Mc(),Ol(),P();var $f=class extends C{constructor(...e){super(...e),this.message=``,this.open=!1,this.actionText=``,this.showClose=!1,this.closeLabel=`Stäng meddelande`,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
19033
19061
  :host {
19034
19062
  position: relative;
19035
19063
  display: block;
@@ -19217,7 +19245,7 @@
19217
19245
  `:``}
19218
19246
  `}
19219
19247
  </div>
19220
- `}};N([_({type:String})],Qf.prototype,`message`,void 0),N([_({type:Boolean,reflect:!0})],Qf.prototype,`open`,void 0),N([_({type:String,attribute:`action-text`})],Qf.prototype,`actionText`,void 0),N([_({type:Boolean,attribute:`show-close`})],Qf.prototype,`showClose`,void 0),N([_({type:String,attribute:`close-label`})],Qf.prototype,`closeLabel`,void 0),N([_({type:Boolean,reflect:!0})],Qf.prototype,`fixed`,void 0),N([_({type:Boolean})],Qf.prototype,`fadeout`,void 0),N([_({type:Boolean,attribute:`with-longer-action`})],Qf.prototype,`withLongerAction`,void 0),N([_({type:String,reflect:!0})],Qf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Qf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Qf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Qf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Qf.prototype,`spacingRight`,void 0),Qf=N([a(`scb-snackbar`)],Qf),w(),b(),D(),P();var $f=class extends C{constructor(...e){super(...e),this.status=``,this.label=``,this.showIcon=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
19248
+ `}};N([_({type:String})],$f.prototype,`message`,void 0),N([_({type:Boolean,reflect:!0})],$f.prototype,`open`,void 0),N([_({type:String,attribute:`action-text`})],$f.prototype,`actionText`,void 0),N([_({type:Boolean,attribute:`show-close`})],$f.prototype,`showClose`,void 0),N([_({type:String,attribute:`close-label`})],$f.prototype,`closeLabel`,void 0),N([_({type:Boolean,reflect:!0})],$f.prototype,`fixed`,void 0),N([_({type:Boolean})],$f.prototype,`fadeout`,void 0),N([_({type:Boolean,attribute:`with-longer-action`})],$f.prototype,`withLongerAction`,void 0),N([_({type:String,reflect:!0})],$f.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],$f.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],$f.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],$f.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],$f.prototype,`spacingRight`,void 0),$f=N([a(`scb-snackbar`)],$f),w(),b(),D(),P();var ep=class extends C{constructor(...e){super(...e),this.status=``,this.label=``,this.showIcon=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
19221
19249
  :host {
19222
19250
  display: inline-block;
19223
19251
  border-radius: var(--scb-status-pill-design-surface-radius-medium);
@@ -19286,7 +19314,7 @@
19286
19314
  `}mapSpacingToken(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}applySpacing(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,n=this.mapSpacingToken(this.spacingBottom)??e,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-status-pill-spacing-block-start`,t):this.style.removeProperty(`--scb-status-pill-spacing-block-start`),n?this.style.setProperty(`--scb-status-pill-spacing-block-end`,n):this.style.removeProperty(`--scb-status-pill-spacing-block-end`),r?this.style.setProperty(`--scb-status-pill-spacing-inline-start`,r):this.style.removeProperty(`--scb-status-pill-spacing-inline-start`),i?this.style.setProperty(`--scb-status-pill-spacing-inline-end`,i):this.style.removeProperty(`--scb-status-pill-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),this.applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){return x`
19287
19315
  ${this.showIcon?this.status===`success`?x`<md-icon>check_circle</md-icon>`:this.status===`warning`?x`<md-icon>warning</md-icon>`:this.status===`error`?x`<md-icon>error</md-icon>`:``:``}
19288
19316
  <span class="label">${this.label}</span>
19289
- `}};N([_({type:String,reflect:!0})],$f.prototype,`status`,void 0),N([_({type:String,reflect:!0})],$f.prototype,`label`,void 0),N([_({type:Boolean,attribute:`show-icon`,reflect:!0})],$f.prototype,`showIcon`,void 0),N([_({type:String,reflect:!0})],$f.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],$f.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],$f.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],$f.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],$f.prototype,`spacingRight`,void 0),$f=N([a(`scb-status-pill`)],$f),w(),b(),D(),E(),j(),P();var ep=class extends C{constructor(...e){super(...e),this.label=``,this.subLabel=``,this.symbolVariant=`number`,this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant=`horizontal`,this.widthWeight=1,this.icon=``,this.__nativeFocusRingReady=!1,this.__nativeFocusRingPending=!1,this.__onFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(`:focus-visible`)&&this.__ensureNativeFocusRing()},this.__onFocusOut=()=>{this.__syncInteractiveParts()}}static{this.styles=p`
19317
+ `}};N([_({type:String,reflect:!0})],ep.prototype,`status`,void 0),N([_({type:String,reflect:!0})],ep.prototype,`label`,void 0),N([_({type:Boolean,attribute:`show-icon`,reflect:!0})],ep.prototype,`showIcon`,void 0),N([_({type:String,reflect:!0})],ep.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],ep.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],ep.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],ep.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],ep.prototype,`spacingRight`,void 0),ep=N([a(`scb-status-pill`)],ep),w(),b(),D(),E(),j(),P();var tp=class extends C{constructor(...e){super(...e),this.label=``,this.subLabel=``,this.symbolVariant=`number`,this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant=`horizontal`,this.widthWeight=1,this.icon=``,this.__nativeFocusRingReady=!1,this.__nativeFocusRingPending=!1,this.__onFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(`:focus-visible`)&&this.__ensureNativeFocusRing()},this.__onFocusOut=()=>{this.__syncInteractiveParts()}}static{this.styles=p`
19290
19318
  :host {
19291
19319
  font-family: var(--brand-font);
19292
19320
  --scb-step-slide-from-x: 0px;
@@ -19718,7 +19746,7 @@
19718
19746
  <div class="sub-label" data-label="${this.subLabel}"><span class="sub-label-text">${this.subLabel}</span></div>
19719
19747
  </div>
19720
19748
  </div>
19721
- `}}};N([_({type:String,reflect:!0})],ep.prototype,`label`,void 0),N([_({type:String,reflect:!0,attribute:`sub-label`})],ep.prototype,`subLabel`,void 0),N([_({type:String,reflect:!0,attribute:`symbol-variant`})],ep.prototype,`symbolVariant`,void 0),N([_({type:Number,reflect:!0})],ep.prototype,`number`,void 0),N([_({type:Boolean,reflect:!0})],ep.prototype,`active`,void 0),N([_({type:Boolean,reflect:!0})],ep.prototype,`completed`,void 0),N([_({type:Boolean,reflect:!0,attribute:`change-on-completed`})],ep.prototype,`changeOnCompleted`,void 0),N([_({type:Boolean,reflect:!0})],ep.prototype,`islast`,void 0),N([_({type:String,reflect:!0})],ep.prototype,`variant`,void 0),N([_({type:Number,reflect:!0,attribute:`width-weight`})],ep.prototype,`widthWeight`,void 0),N([_({type:String})],ep.prototype,`icon`,void 0),ep=N([a(`scb-step`)],ep),w(),b(),uc(),P();var tp=class extends C{constructor(...e){super(...e),this.type=``,this.label=``,this.changeOnCompleted=!1,this.variant=`horizontal`,this.symbolVariant=`number`,this.size=lc[`scb-stepper`].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.activeIndex=0,this.#t=0,this._onKeyNav=e=>{let t=this._getSteps(),n=this.activeIndex,r=n;e.detail.key===`ArrowRight`||e.detail.key===`ArrowDown`?r=n<t.length-1?n+1:0:e.detail.key===`ArrowLeft`||e.detail.key===`ArrowUp`?r=n>0?n-1:t.length-1:e.detail.key===`Home`?r=0:e.detail.key===`End`&&(r=t.length-1),r!==n&&(this._onStepClick(r),setTimeout(()=>{let e=t[r].shadowRoot?.querySelector(`.scb-step-content`);e&&`focus`in e&&typeof e.focus==`function`&&e.focus()},0))},this._onStepContainerClick=e=>{let t=this._getSteps(),n=e.composedPath(),r=t.findIndex(e=>n.includes(e));r!==-1&&this._onStepClick(r)},this._onSlotChange=()=>{let e=this._getSteps();if(e.length===0){this.activeIndex=0;return}this.activeIndex>e.length-1?this.activeIndex=e.length-1:this.activeIndex<0&&(this.activeIndex=0),this._updateSteps(),this.#i()}}#e;#t;static{this.styles=p`
19749
+ `}}};N([_({type:String,reflect:!0})],tp.prototype,`label`,void 0),N([_({type:String,reflect:!0,attribute:`sub-label`})],tp.prototype,`subLabel`,void 0),N([_({type:String,reflect:!0,attribute:`symbol-variant`})],tp.prototype,`symbolVariant`,void 0),N([_({type:Number,reflect:!0})],tp.prototype,`number`,void 0),N([_({type:Boolean,reflect:!0})],tp.prototype,`active`,void 0),N([_({type:Boolean,reflect:!0})],tp.prototype,`completed`,void 0),N([_({type:Boolean,reflect:!0,attribute:`change-on-completed`})],tp.prototype,`changeOnCompleted`,void 0),N([_({type:Boolean,reflect:!0})],tp.prototype,`islast`,void 0),N([_({type:String,reflect:!0})],tp.prototype,`variant`,void 0),N([_({type:Number,reflect:!0,attribute:`width-weight`})],tp.prototype,`widthWeight`,void 0),N([_({type:String})],tp.prototype,`icon`,void 0),tp=N([a(`scb-step`)],tp),w(),b(),uc(),P();var np=class extends C{constructor(...e){super(...e),this.type=``,this.label=``,this.changeOnCompleted=!1,this.variant=`horizontal`,this.symbolVariant=`number`,this.size=lc[`scb-stepper`].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.activeIndex=0,this.#t=0,this._onKeyNav=e=>{let t=this._getSteps(),n=this.activeIndex,r=n;e.detail.key===`ArrowRight`||e.detail.key===`ArrowDown`?r=n<t.length-1?n+1:0:e.detail.key===`ArrowLeft`||e.detail.key===`ArrowUp`?r=n>0?n-1:t.length-1:e.detail.key===`Home`?r=0:e.detail.key===`End`&&(r=t.length-1),r!==n&&(this._onStepClick(r),setTimeout(()=>{let e=t[r].shadowRoot?.querySelector(`.scb-step-content`);e&&`focus`in e&&typeof e.focus==`function`&&e.focus()},0))},this._onStepContainerClick=e=>{let t=this._getSteps(),n=e.composedPath(),r=t.findIndex(e=>n.includes(e));r!==-1&&this._onStepClick(r)},this._onSlotChange=()=>{let e=this._getSteps();if(e.length===0){this.activeIndex=0;return}this.activeIndex>e.length-1?this.activeIndex=e.length-1:this.activeIndex<0&&(this.activeIndex=0),this._updateSteps(),this.#i()}}#e;#t;static{this.styles=p`
19722
19750
  :host {
19723
19751
  --scb-stepper-width: 100%;
19724
19752
  --scb-stepper-height: 100%;
@@ -20082,7 +20110,7 @@
20082
20110
  >
20083
20111
  <slot @slotchange=${this._onSlotChange}></slot>
20084
20112
  </div>
20085
- `}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<`u`&&(this.#e=new ResizeObserver(()=>{this.#i()}),this.#e.observe(this))}disconnectedCallback(){this.#e&&=(this.#e.disconnect(),void 0),this.#t&&=(cancelAnimationFrame(this.#t),0),super.disconnectedCallback()}#n(){let e=this.#r(this.spacing),t=this.#r(this.spacingTop)??e,n=this.#r(this.spacingBottom)??e,r=this.#r(this.spacingLeft),i=this.#r(this.spacingRight);t?this.style.setProperty(`--scb-stepper-spacing-block-start`,t):this.style.removeProperty(`--scb-stepper-spacing-block-start`),n?this.style.setProperty(`--scb-stepper-spacing-block-end`,n):this.style.removeProperty(`--scb-stepper-spacing-block-end`),r?this.style.setProperty(`--scb-stepper-spacing-inline-start`,r):this.style.removeProperty(`--scb-stepper-spacing-inline-start`),i?this.style.setProperty(`--scb-stepper-spacing-inline-end`,i):this.style.removeProperty(`--scb-stepper-spacing-inline-end`)}#r(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#i(){this.#t||=requestAnimationFrame(()=>{this.#t=0,this.#a()})}#a(){let e=this._getSteps();e.length!==0&&e.forEach(e=>{let t=e.shadowRoot;if(!t)return;let n=t.querySelector(`.label`),r=t.querySelector(`.scb-step-content`);if(!n)return;if(this.variant!==`horizontal`){n.style.removeProperty(`max-width`),n.style.removeProperty(`white-space`),n.style.removeProperty(`word-break`),n.style.removeProperty(`overflow-wrap`);return}n.style.maxWidth=`none`,n.style.whiteSpace=`nowrap`,n.style.wordBreak=`normal`,n.style.overflowWrap=`normal`;let i=r?.clientWidth??e.clientWidth;i>0&&n.scrollWidth>i&&(n.style.maxWidth=`100%`,n.style.whiteSpace=`normal`,n.style.wordBreak=`break-word`,n.style.overflowWrap=`anywhere`)})}};N([_({type:String,reflect:!0})],tp.prototype,`type`,void 0),N([_({type:String,reflect:!0})],tp.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0,attribute:`change-on-completed`})],tp.prototype,`changeOnCompleted`,void 0),N([_({type:String,reflect:!0})],tp.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`symbol-variant`})],tp.prototype,`symbolVariant`,void 0),N([_({type:String,reflect:!0})],tp.prototype,`size`,void 0),N([_({type:String,reflect:!0})],tp.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],tp.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],tp.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],tp.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],tp.prototype,`spacingRight`,void 0),N([_({type:Number,reflect:!0,attribute:`active-index`})],tp.prototype,`activeIndex`,void 0),tp=N([a(`scb-stepper`)],tp),w(),b(),dl(),cc(),P();var np=96,rp=32,ip=class extends C{constructor(...e){super(...e),this.dataSorting=!1,this.columnWidthMode=`auto`,this._sortedColumn=null,this._sortDirection=`asc`,this._columnWidthFrame=null,this._onSlotChange=()=>{this._attachThListeners()}}static{this.styles=p`
20113
+ `}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<`u`&&(this.#e=new ResizeObserver(()=>{this.#i()}),this.#e.observe(this))}disconnectedCallback(){this.#e&&=(this.#e.disconnect(),void 0),this.#t&&=(cancelAnimationFrame(this.#t),0),super.disconnectedCallback()}#n(){let e=this.#r(this.spacing),t=this.#r(this.spacingTop)??e,n=this.#r(this.spacingBottom)??e,r=this.#r(this.spacingLeft),i=this.#r(this.spacingRight);t?this.style.setProperty(`--scb-stepper-spacing-block-start`,t):this.style.removeProperty(`--scb-stepper-spacing-block-start`),n?this.style.setProperty(`--scb-stepper-spacing-block-end`,n):this.style.removeProperty(`--scb-stepper-spacing-block-end`),r?this.style.setProperty(`--scb-stepper-spacing-inline-start`,r):this.style.removeProperty(`--scb-stepper-spacing-inline-start`),i?this.style.setProperty(`--scb-stepper-spacing-inline-end`,i):this.style.removeProperty(`--scb-stepper-spacing-inline-end`)}#r(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#i(){this.#t||=requestAnimationFrame(()=>{this.#t=0,this.#a()})}#a(){let e=this._getSteps();e.length!==0&&e.forEach(e=>{let t=e.shadowRoot;if(!t)return;let n=t.querySelector(`.label`),r=t.querySelector(`.scb-step-content`);if(!n)return;if(this.variant!==`horizontal`){n.style.removeProperty(`max-width`),n.style.removeProperty(`white-space`),n.style.removeProperty(`word-break`),n.style.removeProperty(`overflow-wrap`);return}n.style.maxWidth=`none`,n.style.whiteSpace=`nowrap`,n.style.wordBreak=`normal`,n.style.overflowWrap=`normal`;let i=r?.clientWidth??e.clientWidth;i>0&&n.scrollWidth>i&&(n.style.maxWidth=`100%`,n.style.whiteSpace=`normal`,n.style.wordBreak=`break-word`,n.style.overflowWrap=`anywhere`)})}};N([_({type:String,reflect:!0})],np.prototype,`type`,void 0),N([_({type:String,reflect:!0})],np.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0,attribute:`change-on-completed`})],np.prototype,`changeOnCompleted`,void 0),N([_({type:String,reflect:!0})],np.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`symbol-variant`})],np.prototype,`symbolVariant`,void 0),N([_({type:String,reflect:!0})],np.prototype,`size`,void 0),N([_({type:String,reflect:!0})],np.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],np.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],np.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],np.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],np.prototype,`spacingRight`,void 0),N([_({type:Number,reflect:!0,attribute:`active-index`})],np.prototype,`activeIndex`,void 0),np=N([a(`scb-stepper`)],np),w(),b(),dl(),cc(),P();var rp=96,ip=32,ap=class extends C{constructor(...e){super(...e),this.dataSorting=!1,this.columnWidthMode=`auto`,this._sortedColumn=null,this._sortDirection=`asc`,this._columnWidthFrame=null,this._onSlotChange=()=>{this._attachThListeners()}}static{this.styles=p`
20086
20114
  :host {
20087
20115
  display: block;
20088
20116
  color: var(--scb-tables-content-color, var(--md-sys-color-on-surface));
@@ -20169,7 +20197,7 @@
20169
20197
  <div class="scb-table-scroll-wrapper">
20170
20198
  <slot @slotchange=${this._onSlotChange}></slot>
20171
20199
  </div>
20172
- `}firstUpdated(){let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners())}updated(e){e.has(`dataSorting`)&&(this.dataSorting||(this._sortedColumn=null,this._sortDirection=`asc`),this._attachThListeners()),e.has(`columnWidthMode`)&&this._queueColumnWidthUpdate(),this.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>{e.setAttribute(`size`,M(this,`--scb-table-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`))})}disconnectedCallback(){super.disconnectedCallback(),this._columnWidthFrame!==null&&(cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=null)}_getTbody(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e,n=t.tagName.toLowerCase()===`tbody`?t:t.querySelector(`tbody`);if(n)return n}return null}_getTables(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return[];let t=e.assignedNodes({flatten:!0}),n=[];return t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e;t.tagName.toLowerCase()===`table`&&n.push(t),n.push(...Array.from(t.querySelectorAll(`table`)))}}),n}_attachThListeners(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[],o=[];t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=Array.from(e.querySelectorAll(`thead`));n.push(...t),t.forEach(e=>{r.push(...Array.from(e.querySelectorAll(`th`)))}),i.push(...e.querySelectorAll(`th`)),a.push(...e.querySelectorAll(`td`)),o.push(...e.querySelectorAll(`tr`))}}),n.forEach(e=>{e.style.borderTop=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`}),i.forEach(e=>{let t=r.indexOf(e),n=t!==-1;e.style.textAlign=`left`,e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.position=`relative`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-header-font)`,e.style.fontSize=`var(--scb-table-header-font-size)`,e.style.lineHeight=`var(--scb-table-header-line-height)`,e.style.fontWeight=`var(--scb-table-header-font-weight)`,e.style.letterSpacing=`var(--scb-table-header-letter-spacing)`,e.style.verticalAlign=`bottom`,e.style.borderRight=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.borderBottom=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`,this._removeGeneratedSortMarkup(e),e.hasAttribute(`scope`)||(n?e.setAttribute(`scope`,`col`):e.closest(`tbody`)&&e.setAttribute(`scope`,`row`));let i=this._getOrCreateHeaderLabel(e,t),a=this._getHeaderLabelText(e,i,t);if((i instanceof HTMLParagraphElement||i.getAttribute(`data-scb-generated-label`)===`true`)&&this._applyGeneratedCellTextReset(i),this.dataSorting&&n){e.setAttribute(`aria-sort`,this._getHeaderAriaSort(t));let n=document.createElement(`scb-icon-button`);n.className=`scb-sort-icon`,n.onclick=()=>this._onThClick(t),n.setAttribute(`variant`,`standard`),n.setAttribute(`size`,M(this,`--scb-table-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`)),n.setAttribute(`aria-label`,this._getSortButtonLabel(a,t)),n.style.alignSelf=`end`,this._sortedColumn===t?(n.setAttribute(`variant`,`filled-tonal`),n.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(n.setAttribute(`icon`,`swap_horiz`),n.style.transform+=` rotate(90deg)`),this._wrapHeaderWithSortControl(e,i,n)}else e.removeAttribute(`aria-sort`)}),a.forEach(e=>{e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--scb-tables-outline-color, var(--md-sys-color-outline-variant))`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-cell-font)`,e.style.fontSize=`var(--scb-table-cell-font-size)`,e.style.lineHeight=`var(--scb-table-cell-line-height)`,e.style.fontWeight=`var(--scb-table-cell-font-weight)`,e.style.letterSpacing=`var(--scb-table-cell-letter-spacing)`,e.style.borderRight=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.borderBottom=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`}),o.forEach(e=>{let t=Array.from(e.cells);t.forEach((e,n)=>{e.style.borderRight=n===t.length-1?`none`:`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`})});let s=this._getTbody();s&&Array.from(s.querySelectorAll(`tr`)).forEach((e,t)=>{let n=t%2==0?`var(--scb-tables-alternate-surface-color, var(--md-sys-color-surface-container))`:`var(--scb-tables-surface-color, var(--md-sys-color-surface))`;Array.from(e.cells).forEach(e=>{e.style.backgroundColor=n})}),this._queueColumnWidthUpdate()}_applyGeneratedCellTextReset(e){e.style.margin=`0`,e.style.color=`inherit`,e.style.fontFamily=`inherit`,e.style.fontSize=`inherit`,e.style.lineHeight=`inherit`,e.style.fontWeight=`inherit`,e.style.letterSpacing=`inherit`}_removeGeneratedSortMarkup(e){e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let t=e.querySelector(`:scope > [data-scb-sort-header="true"]`);if(!(t instanceof HTMLElement))return;let n=t.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement){t.replaceWith(n);return}t.remove()}_getOrCreateHeaderLabel(e,t){let n=e.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement)return n;let r=e.querySelector(`:scope > p`);if(r instanceof HTMLParagraphElement)return r.setAttribute(`data-scb-sort-label`,`true`),r;let i=Array.from(e.children).find(e=>e instanceof HTMLElement&&!e.matches(`scb-icon-button.scb-sort-icon`));if(i)return i.setAttribute(`data-scb-sort-label`,`true`),i;let a=this._getNormalizedText(e.textContent),o=a||this._getNormalizedText(e.getAttribute(`aria-label`))||this._getFallbackColumnLabel(t),s=document.createElement(`p`);return s.setAttribute(`data-scb-sort-label`,`true`),s.setAttribute(`data-scb-generated-label`,`true`),s.textContent=o,a||(s.setAttribute(`data-scb-visually-hidden-label`,`true`),this._applyVisuallyHiddenStyles(s)),e.textContent=``,e.appendChild(s),s}_getHeaderLabelText(e,t,n){return this._getNormalizedText(t.textContent)||this._getNormalizedText(e.getAttribute(`aria-label`))||this._getFallbackColumnLabel(n)}_getFallbackColumnLabel(e){return`kolumn ${Math.max(e,0)+1}`}_applyVisuallyHiddenStyles(e){e.style.position=`absolute`,e.style.width=`1px`,e.style.height=`1px`,e.style.padding=`0`,e.style.margin=`-1px`,e.style.overflow=`hidden`,e.style.whiteSpace=`nowrap`,e.style.clip=`rect(0, 0, 0, 0)`,e.style.clipPath=`inset(50%)`,e.style.border=`0`}_wrapHeaderWithSortControl(e,t,n){let r=document.createElement(`div`);r.setAttribute(`data-scb-sort-header`,`true`),r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(t),r.appendChild(n),e.appendChild(r)}_getNormalizedText(e){return(e??``).replace(/\s+/g,` `).trim()}_queueColumnWidthUpdate(){this._columnWidthFrame!==null&&cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=requestAnimationFrame(()=>{this._columnWidthFrame=null,this._applyColumnWidthMode()})}_applyColumnWidthMode(){this._getTables().forEach(e=>{if(this._removeGeneratedColGroup(e),e.style.tableLayout=``,e.style.width=``,e.style.minWidth=``,e.style.maxWidth=``,this.columnWidthMode!==`header`)return;let t=Array.from(e.querySelectorAll(`thead tr`)),n=t[t.length-1];if(!n)return;let r=Array.from(n.cells).map((t,n)=>{let r=this._measureCellContentWidth(t),i=this._measureColumnReadableBodyWidth(e,n),a=Math.max(r,i);return`${Math.ceil(a>0?Math.max(a,np):0)}px`}),i=r.reduce((e,t)=>e+parseFloat(t),0);this._applyGeneratedColGroup(e,r),e.style.tableLayout=`fixed`,e.style.width=`${Math.ceil(i)}px`,e.style.minWidth=`${Math.ceil(i)}px`,e.style.maxWidth=`none`})}_applyGeneratedColGroup(e,t){let n=document.createElement(`colgroup`);n.setAttribute(`data-scb-generated-column-widths`,`true`),t.forEach(e=>{let t=document.createElement(`col`);t.style.width=e,t.style.minWidth=e,n.appendChild(t)}),e.insertBefore(n,e.firstChild)}_removeGeneratedColGroup(e){e.querySelector(`colgroup[data-scb-generated-column-widths="true"]`)?.remove()}_measureCellContentWidth(e){let t=e.firstElementChild?.cloneNode(!0)??document.createElement(`span`);e.firstElementChild||(t.textContent=e.textContent??``);let n=window.getComputedStyle(e),r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`-99999px`,r.style.top=`0`,r.style.visibility=`hidden`,r.style.pointerEvents=`none`,r.style.width=`max-content`,r.style.maxWidth=`none`,r.style.whiteSpace=`nowrap`,r.style.fontFamily=n.fontFamily,r.style.fontSize=n.fontSize,r.style.fontWeight=n.fontWeight,r.style.lineHeight=n.lineHeight,r.style.letterSpacing=n.letterSpacing,t instanceof HTMLElement&&(t.style.width=`max-content`,t.style.maxWidth=`none`,t.style.whiteSpace=`nowrap`),r.appendChild(t),document.body.appendChild(r);let i=parseFloat(n.paddingLeft||`0`),a=parseFloat(n.paddingRight||`0`),o=parseFloat(n.borderLeftWidth||`0`),s=parseFloat(n.borderRightWidth||`0`),c=r.getBoundingClientRect().width+i+a+o+s;return document.body.removeChild(r),c}_measureColumnReadableBodyWidth(e,t){return Array.from(e.querySelectorAll(`tbody tr`)).reduce((e,n)=>{let r=n.cells[t];if(!r)return e;let i=(r.textContent??``).replace(/\s+/g,` `).trim().split(` `).filter(Boolean).reduce((e,t)=>Math.max(e,this._measureCellTextWidth(r,t)),0),a=i>0?i+rp:0;return Math.max(e,a)},0)}_measureCellTextWidth(e,t){let n=window.getComputedStyle(e),r=document.createElement(`span`);r.textContent=t,r.style.position=`absolute`,r.style.left=`-99999px`,r.style.top=`0`,r.style.visibility=`hidden`,r.style.pointerEvents=`none`,r.style.whiteSpace=`nowrap`,r.style.fontFamily=n.fontFamily,r.style.fontSize=n.fontSize,r.style.fontWeight=n.fontWeight,r.style.lineHeight=n.lineHeight,r.style.letterSpacing=n.letterSpacing,document.body.appendChild(r);let i=parseFloat(n.paddingLeft||`0`),a=parseFloat(n.paddingRight||`0`),o=parseFloat(n.borderLeftWidth||`0`),s=parseFloat(n.borderRightWidth||`0`),c=r.getBoundingClientRect().width+i+a+o+s;return document.body.removeChild(r),c}_onThClick(e){this.dataSorting&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners(),this.dispatchEvent(new CustomEvent(`tablesortchange`,{detail:{sortedColumn:this._sortedColumn,sortDirection:this._sortDirection},bubbles:!0,composed:!0})))}_getHeaderAriaSort(e){return this._sortedColumn===e?this._sortDirection===`asc`?`ascending`:`descending`:`none`}_getSortButtonLabel(e,t){return`Sortera ${e||`kolumn ${t+1}`} ${this._sortedColumn===t&&this._sortDirection===`asc`?`fallande`:`stigande`}`}_sortTable(e,t){let n=this._getTbody();if(!n)return;let r=Array.from(n.querySelectorAll(`tr`));r.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)}),r.forEach(e=>n.appendChild(e))}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}};N([_({type:Boolean,attribute:`data-sorting`})],ip.prototype,`dataSorting`,void 0),N([_({type:String,attribute:`column-width-mode`})],ip.prototype,`columnWidthMode`,void 0),ip=N([a(`scb-table`)],ip),w(),b(),dl(),Tu(),cc(),P();var ap=class extends C{constructor(...e){super(...e),this.searchTerm=``,this.pagination=!1,this.filteringSearch=!1,this.noScroll=!1,this.pageSize=10,this.disableSorting=[],this.currentPage=1,this.totalRows=0,this._sortedColumn=null,this._sortDirection=`asc`,this._filteredRows=null,this._tbodyObserver=null,this._observedTbody=null,this._pendingTableRefresh=!1,this._suppressTbodyObserver=!1,this._initialTableRefreshFrame=0,this._onSlotChange=()=>{this._attachTbodyObserver(),this._refreshFromTableContent()},this._onPaginationChange=e=>{let t=e.detail;t&&typeof t.page==`number`&&this._changePage(t.page)}}static{this.styles=p`
20200
+ `}firstUpdated(){let e=this.shadowRoot?.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners())}updated(e){e.has(`dataSorting`)&&(this.dataSorting||(this._sortedColumn=null,this._sortDirection=`asc`),this._attachThListeners()),e.has(`columnWidthMode`)&&this._queueColumnWidthUpdate(),this.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>{e.setAttribute(`size`,M(this,`--scb-table-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`))})}disconnectedCallback(){super.disconnectedCallback(),this._columnWidthFrame!==null&&(cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=null)}_getTbody(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e,n=t.tagName.toLowerCase()===`tbody`?t:t.querySelector(`tbody`);if(n)return n}return null}_getTables(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return[];let t=e.assignedNodes({flatten:!0}),n=[];return t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e;t.tagName.toLowerCase()===`table`&&n.push(t),n.push(...Array.from(t.querySelectorAll(`table`)))}}),n}_attachThListeners(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[],o=[];t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=Array.from(e.querySelectorAll(`thead`));n.push(...t),t.forEach(e=>{r.push(...Array.from(e.querySelectorAll(`th`)))}),i.push(...e.querySelectorAll(`th`)),a.push(...e.querySelectorAll(`td`)),o.push(...e.querySelectorAll(`tr`))}}),n.forEach(e=>{e.style.borderTop=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`}),i.forEach(e=>{let t=r.indexOf(e),n=t!==-1;e.style.textAlign=`left`,e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.position=`relative`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-header-font)`,e.style.fontSize=`var(--scb-table-header-font-size)`,e.style.lineHeight=`var(--scb-table-header-line-height)`,e.style.fontWeight=`var(--scb-table-header-font-weight)`,e.style.letterSpacing=`var(--scb-table-header-letter-spacing)`,e.style.verticalAlign=`bottom`,e.style.borderRight=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.borderBottom=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`,this._removeGeneratedSortMarkup(e),e.hasAttribute(`scope`)||(n?e.setAttribute(`scope`,`col`):e.closest(`tbody`)&&e.setAttribute(`scope`,`row`));let i=this._getOrCreateHeaderLabel(e,t),a=this._getHeaderLabelText(e,i,t);if((i instanceof HTMLParagraphElement||i.getAttribute(`data-scb-generated-label`)===`true`)&&this._applyGeneratedCellTextReset(i),this.dataSorting&&n){e.setAttribute(`aria-sort`,this._getHeaderAriaSort(t));let n=document.createElement(`scb-icon-button`);n.className=`scb-sort-icon`,n.onclick=()=>this._onThClick(t),n.setAttribute(`variant`,`standard`),n.setAttribute(`size`,M(this,`--scb-table-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`)),n.setAttribute(`aria-label`,this._getSortButtonLabel(a,t)),n.style.alignSelf=`end`,this._sortedColumn===t?(n.setAttribute(`variant`,`filled-tonal`),n.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(n.setAttribute(`icon`,`swap_horiz`),n.style.transform+=` rotate(90deg)`),this._wrapHeaderWithSortControl(e,i,n)}else e.removeAttribute(`aria-sort`)}),a.forEach(e=>{e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--scb-tables-outline-color, var(--md-sys-color-outline-variant))`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-cell-font)`,e.style.fontSize=`var(--scb-table-cell-font-size)`,e.style.lineHeight=`var(--scb-table-cell-line-height)`,e.style.fontWeight=`var(--scb-table-cell-font-weight)`,e.style.letterSpacing=`var(--scb-table-cell-letter-spacing)`,e.style.borderRight=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.borderBottom=`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`,e.style.overflowWrap=`normal`,e.style.wordBreak=`normal`,e.style.hyphens=`manual`}),o.forEach(e=>{let t=Array.from(e.cells);t.forEach((e,n)=>{e.style.borderRight=n===t.length-1?`none`:`1px solid var(--scb-tables-strong-outline-color, var(--md-sys-color-on-surface))`})});let s=this._getTbody();s&&Array.from(s.querySelectorAll(`tr`)).forEach((e,t)=>{let n=t%2==0?`var(--scb-tables-alternate-surface-color, var(--md-sys-color-surface-container))`:`var(--scb-tables-surface-color, var(--md-sys-color-surface))`;Array.from(e.cells).forEach(e=>{e.style.backgroundColor=n})}),this._queueColumnWidthUpdate()}_applyGeneratedCellTextReset(e){e.style.margin=`0`,e.style.color=`inherit`,e.style.fontFamily=`inherit`,e.style.fontSize=`inherit`,e.style.lineHeight=`inherit`,e.style.fontWeight=`inherit`,e.style.letterSpacing=`inherit`}_removeGeneratedSortMarkup(e){e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let t=e.querySelector(`:scope > [data-scb-sort-header="true"]`);if(!(t instanceof HTMLElement))return;let n=t.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement){t.replaceWith(n);return}t.remove()}_getOrCreateHeaderLabel(e,t){let n=e.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement)return n;let r=e.querySelector(`:scope > p`);if(r instanceof HTMLParagraphElement)return r.setAttribute(`data-scb-sort-label`,`true`),r;let i=Array.from(e.children).find(e=>e instanceof HTMLElement&&!e.matches(`scb-icon-button.scb-sort-icon`));if(i)return i.setAttribute(`data-scb-sort-label`,`true`),i;let a=this._getNormalizedText(e.textContent),o=a||this._getNormalizedText(e.getAttribute(`aria-label`))||this._getFallbackColumnLabel(t),s=document.createElement(`p`);return s.setAttribute(`data-scb-sort-label`,`true`),s.setAttribute(`data-scb-generated-label`,`true`),s.textContent=o,a||(s.setAttribute(`data-scb-visually-hidden-label`,`true`),this._applyVisuallyHiddenStyles(s)),e.textContent=``,e.appendChild(s),s}_getHeaderLabelText(e,t,n){return this._getNormalizedText(t.textContent)||this._getNormalizedText(e.getAttribute(`aria-label`))||this._getFallbackColumnLabel(n)}_getFallbackColumnLabel(e){return`kolumn ${Math.max(e,0)+1}`}_applyVisuallyHiddenStyles(e){e.style.position=`absolute`,e.style.width=`1px`,e.style.height=`1px`,e.style.padding=`0`,e.style.margin=`-1px`,e.style.overflow=`hidden`,e.style.whiteSpace=`nowrap`,e.style.clip=`rect(0, 0, 0, 0)`,e.style.clipPath=`inset(50%)`,e.style.border=`0`}_wrapHeaderWithSortControl(e,t,n){let r=document.createElement(`div`);r.setAttribute(`data-scb-sort-header`,`true`),r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(t),r.appendChild(n),e.appendChild(r)}_getNormalizedText(e){return(e??``).replace(/\s+/g,` `).trim()}_queueColumnWidthUpdate(){this._columnWidthFrame!==null&&cancelAnimationFrame(this._columnWidthFrame),this._columnWidthFrame=requestAnimationFrame(()=>{this._columnWidthFrame=null,this._applyColumnWidthMode()})}_applyColumnWidthMode(){this._getTables().forEach(e=>{if(this._removeGeneratedColGroup(e),e.style.tableLayout=``,e.style.width=``,e.style.minWidth=``,e.style.maxWidth=``,this.columnWidthMode!==`header`)return;let t=Array.from(e.querySelectorAll(`thead tr`)),n=t[t.length-1];if(!n)return;let r=Array.from(n.cells).map((t,n)=>{let r=this._measureCellContentWidth(t),i=this._measureColumnReadableBodyWidth(e,n),a=Math.max(r,i);return`${Math.ceil(a>0?Math.max(a,rp):0)}px`}),i=r.reduce((e,t)=>e+parseFloat(t),0);this._applyGeneratedColGroup(e,r),e.style.tableLayout=`fixed`,e.style.width=`${Math.ceil(i)}px`,e.style.minWidth=`${Math.ceil(i)}px`,e.style.maxWidth=`none`})}_applyGeneratedColGroup(e,t){let n=document.createElement(`colgroup`);n.setAttribute(`data-scb-generated-column-widths`,`true`),t.forEach(e=>{let t=document.createElement(`col`);t.style.width=e,t.style.minWidth=e,n.appendChild(t)}),e.insertBefore(n,e.firstChild)}_removeGeneratedColGroup(e){e.querySelector(`colgroup[data-scb-generated-column-widths="true"]`)?.remove()}_measureCellContentWidth(e){let t=e.firstElementChild?.cloneNode(!0)??document.createElement(`span`);e.firstElementChild||(t.textContent=e.textContent??``);let n=window.getComputedStyle(e),r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`-99999px`,r.style.top=`0`,r.style.visibility=`hidden`,r.style.pointerEvents=`none`,r.style.width=`max-content`,r.style.maxWidth=`none`,r.style.whiteSpace=`nowrap`,r.style.fontFamily=n.fontFamily,r.style.fontSize=n.fontSize,r.style.fontWeight=n.fontWeight,r.style.lineHeight=n.lineHeight,r.style.letterSpacing=n.letterSpacing,t instanceof HTMLElement&&(t.style.width=`max-content`,t.style.maxWidth=`none`,t.style.whiteSpace=`nowrap`),r.appendChild(t),document.body.appendChild(r);let i=parseFloat(n.paddingLeft||`0`),a=parseFloat(n.paddingRight||`0`),o=parseFloat(n.borderLeftWidth||`0`),s=parseFloat(n.borderRightWidth||`0`),c=r.getBoundingClientRect().width+i+a+o+s;return document.body.removeChild(r),c}_measureColumnReadableBodyWidth(e,t){return Array.from(e.querySelectorAll(`tbody tr`)).reduce((e,n)=>{let r=n.cells[t];if(!r)return e;let i=(r.textContent??``).replace(/\s+/g,` `).trim().split(` `).filter(Boolean).reduce((e,t)=>Math.max(e,this._measureCellTextWidth(r,t)),0),a=i>0?i+ip:0;return Math.max(e,a)},0)}_measureCellTextWidth(e,t){let n=window.getComputedStyle(e),r=document.createElement(`span`);r.textContent=t,r.style.position=`absolute`,r.style.left=`-99999px`,r.style.top=`0`,r.style.visibility=`hidden`,r.style.pointerEvents=`none`,r.style.whiteSpace=`nowrap`,r.style.fontFamily=n.fontFamily,r.style.fontSize=n.fontSize,r.style.fontWeight=n.fontWeight,r.style.lineHeight=n.lineHeight,r.style.letterSpacing=n.letterSpacing,document.body.appendChild(r);let i=parseFloat(n.paddingLeft||`0`),a=parseFloat(n.paddingRight||`0`),o=parseFloat(n.borderLeftWidth||`0`),s=parseFloat(n.borderRightWidth||`0`),c=r.getBoundingClientRect().width+i+a+o+s;return document.body.removeChild(r),c}_onThClick(e){this.dataSorting&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners(),this.dispatchEvent(new CustomEvent(`tablesortchange`,{detail:{sortedColumn:this._sortedColumn,sortDirection:this._sortDirection},bubbles:!0,composed:!0})))}_getHeaderAriaSort(e){return this._sortedColumn===e?this._sortDirection===`asc`?`ascending`:`descending`:`none`}_getSortButtonLabel(e,t){return`Sortera ${e||`kolumn ${t+1}`} ${this._sortedColumn===t&&this._sortDirection===`asc`?`fallande`:`stigande`}`}_sortTable(e,t){let n=this._getTbody();if(!n)return;let r=Array.from(n.querySelectorAll(`tr`));r.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)}),r.forEach(e=>n.appendChild(e))}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}};N([_({type:Boolean,attribute:`data-sorting`})],ap.prototype,`dataSorting`,void 0),N([_({type:String,attribute:`column-width-mode`})],ap.prototype,`columnWidthMode`,void 0),ap=N([a(`scb-table`)],ap),w(),b(),dl(),Tu(),cc(),P();var op=class extends C{constructor(...e){super(...e),this.searchTerm=``,this.pagination=!1,this.filteringSearch=!1,this.noScroll=!1,this.pageSize=10,this.disableSorting=[],this.currentPage=1,this.totalRows=0,this._sortedColumn=null,this._sortDirection=`asc`,this._filteredRows=null,this._tbodyObserver=null,this._observedTbody=null,this._pendingTableRefresh=!1,this._suppressTbodyObserver=!1,this._initialTableRefreshFrame=0,this._onSlotChange=()=>{this._attachTbodyObserver(),this._refreshFromTableContent()},this._onPaginationChange=e=>{let t=e.detail;t&&typeof t.page==`number`&&this._changePage(t.page)}}static{this.styles=p`
20173
20201
  :host {
20174
20202
  display: block;
20175
20203
  color: var(--scb-tables-content-color, var(--md-sys-color-on-surface));
@@ -20294,7 +20322,7 @@
20294
20322
  ></scb-pagination>
20295
20323
  `:``}
20296
20324
  </div>
20297
- `}_onSearchInput(e){let t=e.target.value;this.searchTerm=t,this._filterTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0}))}_filterTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r=n,i=this._getTopLevelRows(r),a=this.searchTerm.trim().toLowerCase();if(!a)this._filteredRows=null,i.forEach(e=>e.style.display=``),this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this.pagination&&this._paginateTable(),this._sortedColumn!==null&&this._sortTable(this._sortedColumn,this._sortDirection);else{this._filteredRows=i.filter(e=>this._getRowSearchText(e).toLowerCase().includes(a)),i.forEach(e=>e.style.display=`none`);let e=this._filteredRows;this._sortedColumn!==null&&(e=[...e],e.sort((e,t)=>{let n=this._getCellSortableValue(e.children[this._sortedColumn]),r=this._getCellSortableValue(t.children[this._sortedColumn]);return this._compareCellValues(n,r,this._sortDirection)}),this._filteredRows=e),this.totalRows=this._filteredRows.length,this._ensureCurrentPageWithinBounds(),this.pagination?this._paginateTable():this._filteredRows.forEach(e=>e.style.display=``)}}firstUpdated(){let e=this.shadowRoot.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners(),this._attachTbodyObserver(),this._initialTableRefreshFrame=requestAnimationFrame(()=>{this._initialTableRefreshFrame=0,this.isConnected&&this._refreshFromTableContent()}))}updated(e){super.updated(e),e.has(`disableSorting`)&&this._sortedColumn!==null&&!this._isColumnSortable(this._sortedColumn)&&(this._sortedColumn=null,this._sortDirection=`asc`),(e.has(`searchTerm`)||e.has(`currentPage`)||e.has(`pageSize`)||e.has(`filteringSearch`)||e.has(`pagination`)||e.has(`disableSorting`))&&this.updateComplete.then(()=>{this.isConnected&&this._refreshFromTableContent()}),this.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>{e.setAttribute(`size`,M(this,`--scb-table-advanced-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`))})}_disconnectTbodyObserver(){this._tbodyObserver&&=(this._tbodyObserver.disconnect(),null),this._observedTbody=null}_attachTbodyObserver(){let e=this._getTbody();if(!e){this._disconnectTbodyObserver();return}this._observedTbody!==e&&(this._disconnectTbodyObserver(),this._observedTbody=e,this._tbodyObserver=new MutationObserver(()=>{this._suppressTbodyObserver||this._scheduleTableRefresh()}),this._tbodyObserver.observe(e,{childList:!0,subtree:!0,characterData:!0}))}_scheduleTableRefresh(){this._pendingTableRefresh||(this._pendingTableRefresh=!0,queueMicrotask(()=>{this._pendingTableRefresh=!1,this._refreshFromTableContent()}))}_refreshFromTableContent(){if(this._attachTbodyObserver(),this.filteringSearch){this._filterTable();return}if(this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this._sortedColumn!==null){this._sortTable(this._sortedColumn,this._sortDirection);return}this.pagination&&this._paginateTable()}_ensureCurrentPageWithinBounds(){let e=Math.max(1,Math.ceil(this.totalRows/this.pageSize)),t=Math.min(Math.max(1,this.currentPage),e);t!==this.currentPage&&(this.currentPage=t)}_getTbody(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);if(t)return t}return null}_getTopLevelRows(e){return Array.from(e.children).filter(e=>e instanceof HTMLTableRowElement)}_attachThListeners(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(Array.from(e.querySelectorAll(`thead`)).forEach(e=>{n.push(...Array.from(e.querySelectorAll(`th`)))}),r.push(...e.querySelectorAll(`th`)),i.push(...e.querySelectorAll(`td`)),a.push(...e.querySelectorAll(`tr`)))}),r.forEach(e=>{let t=n.indexOf(e),r=t!==-1;e.style.textAlign=`left`,e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.position=`relative`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-header-font)`,e.style.fontSize=`var(--scb-table-header-font-size)`,e.style.lineHeight=`var(--scb-table-header-line-height)`,e.style.fontWeight=`var(--scb-table-header-font-weight)`,e.style.letterSpacing=`var(--scb-table-header-letter-spacing)`,e.style.verticalAlign=`middle`,this._removeGeneratedSortMarkup(e),e.hasAttribute(`scope`)||(r?e.setAttribute(`scope`,`col`):e.closest(`tbody`)&&e.setAttribute(`scope`,`row`));let i=this._getOrCreateHeaderLabel(e,t);if((i instanceof HTMLParagraphElement||i.getAttribute(`data-scb-generated-label`)===`true`)&&this._applyGeneratedCellTextReset(i),!r){e.removeAttribute(`aria-sort`);return}if(!this._isColumnSortable(t)){e.removeAttribute(`aria-sort`);return}e.setAttribute(`aria-sort`,this._getHeaderAriaSort(t));let a=this._getNormalizedText(i.textContent)||`kolumn ${Math.max(t,0)+1}`,o=document.createElement(`scb-icon-button`);o.className=`scb-sort-icon`,o.onclick=()=>this._onThClick(t),o.setAttribute(`variant`,`standard`),o.setAttribute(`size`,M(this,`--scb-table-advanced-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`)),o.setAttribute(`aria-label`,this._getSortButtonLabel(a,t)),o.style.alignSelf=`center`,this._sortedColumn===t?(o.setAttribute(`variant`,`filled-tonal`),o.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(o.setAttribute(`icon`,`swap_horiz`),o.style.transform+=` rotate(90deg)`),this._wrapHeaderWithSortControl(e,i,o)}),i.forEach(e=>{e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--scb-tables-outline-color, var(--md-sys-color-outline-variant))`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-cell-font)`,e.style.fontSize=`var(--scb-table-cell-font-size)`,e.style.lineHeight=`var(--scb-table-cell-line-height)`,e.style.fontWeight=`var(--scb-table-cell-font-weight)`,e.style.letterSpacing=`var(--scb-table-cell-letter-spacing)`}),a.forEach((e,t)=>{t%2==1&&e.querySelectorAll(`td`).forEach(e=>{e.style.backgroundColor=`var(--scb-background-row)`});let n=e.querySelectorAll(`th`);n.length>0&&n.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===n.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``});let r=e.querySelectorAll(`td`);r.length>0&&r.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===r.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``})}),this.pagination&&this._paginateTable()}_applyGeneratedCellTextReset(e){e.style.margin=`0`,e.style.color=`inherit`,e.style.fontFamily=`inherit`,e.style.fontSize=`inherit`,e.style.lineHeight=`inherit`,e.style.fontWeight=`inherit`,e.style.letterSpacing=`inherit`}_removeGeneratedSortMarkup(e){e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let t=e.querySelector(`:scope > [data-scb-sort-header="true"]`);if(!(t instanceof HTMLElement))return;let n=t.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement){t.replaceWith(n);return}t.remove()}_getOrCreateHeaderLabel(e,t){let n=e.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement)return n;let r=e.querySelector(`:scope > p`);if(r instanceof HTMLParagraphElement)return r.setAttribute(`data-scb-sort-label`,`true`),r;let i=Array.from(e.children).find(e=>e instanceof HTMLElement&&!e.matches(`scb-icon-button.scb-sort-icon`));if(i)return i.setAttribute(`data-scb-sort-label`,`true`),i;let a=document.createElement(`p`);return a.setAttribute(`data-scb-sort-label`,`true`),a.setAttribute(`data-scb-generated-label`,`true`),a.textContent=this._getNormalizedText(e.textContent)||`kolumn ${Math.max(t,0)+1}`,e.textContent=``,e.appendChild(a),a}_wrapHeaderWithSortControl(e,t,n){let r=document.createElement(`div`);r.setAttribute(`data-scb-sort-header`,`true`),r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(t),r.appendChild(n),e.appendChild(r)}_getNormalizedText(e){return(e??``).replace(/\s+/g,` `).trim()}_onThClick(e){this._isColumnSortable(e)&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners())}_getHeaderAriaSort(e){return this._sortedColumn===e?this._sortDirection===`asc`?`ascending`:`descending`:`none`}_getSortButtonLabel(e,t){return`Sortera ${e||`kolumn ${t+1}`} ${this._sortedColumn===t&&this._sortDirection===`asc`?`fallande`:`stigande`}`}_isColumnSortable(e){return!(Array.isArray(this.disableSorting)?this.disableSorting:[]).some(t=>Number(t)===e)}_sortTable(e,t){if(!this._isColumnSortable(e))return;let n=this.shadowRoot.querySelector(`slot`);if(!n)return;let r=n.assignedNodes({flatten:!0}),i=null;if(r.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(i=t)}}),!i)return;let a;a=this._filteredRows?[...this._filteredRows]:this._getTopLevelRows(i),a.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)});let o=this._tbodyObserver!==null;o&&this._disconnectTbodyObserver();try{a.forEach(e=>i.appendChild(e))}finally{o&&this._attachTbodyObserver()}this._filteredRows&&(this._filteredRows=a,this.totalRows=this._filteredRows.length),this.pagination&&this._paginateTable()}_getRowSearchText(e){return Array.from(e.cells).map(e=>this._getCellSortableValue(e)).join(` `)}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}_updateTotalRows(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),n&&(this.totalRows=this._getTopLevelRows(n).length,this._ensureCurrentPageWithinBounds())}_paginateTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r;r=this._filteredRows?this._filteredRows:this._getTopLevelRows(n),this._getTopLevelRows(n).forEach(e=>e.style.display=`none`);let i=(this.currentPage-1)*this.pageSize,a=i+this.pageSize;r.slice(i,a).forEach(e=>e.style.display=``)}_changePage(e){let t=Math.ceil(this.totalRows/this.pageSize);e<1||e>t||(this.currentPage=e,this._paginateTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0})),this.requestUpdate())}};N([_({type:String})],ap.prototype,`searchTerm`,void 0),N([_({type:Boolean,attribute:`with-pagination`})],ap.prototype,`pagination`,void 0),N([_({type:Boolean,attribute:`with-filtering-search`})],ap.prototype,`filteringSearch`,void 0),N([_({type:Boolean,attribute:`no-scroll`})],ap.prototype,`noScroll`,void 0),N([_({type:Number,attribute:`page-size`})],ap.prototype,`pageSize`,void 0),N([_({type:Array,attribute:`disable-sorting`})],ap.prototype,`disableSorting`,void 0),N([_({type:Number})],ap.prototype,`currentPage`,void 0),N([_({type:Number})],ap.prototype,`totalRows`,void 0),ap=N([a(`scb-table-advanced`)],ap),b(),w(),D(),P();var op=class extends Ms{constructor(...e){super(...e),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute(`aria-selected`,this.active?`true`:`false`),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Ms.styles,p`
20325
+ `}_onSearchInput(e){let t=e.target.value;this.searchTerm=t,this._filterTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0}))}_filterTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r=n,i=this._getTopLevelRows(r),a=this.searchTerm.trim().toLowerCase();if(!a)this._filteredRows=null,i.forEach(e=>e.style.display=``),this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this.pagination&&this._paginateTable(),this._sortedColumn!==null&&this._sortTable(this._sortedColumn,this._sortDirection);else{this._filteredRows=i.filter(e=>this._getRowSearchText(e).toLowerCase().includes(a)),i.forEach(e=>e.style.display=`none`);let e=this._filteredRows;this._sortedColumn!==null&&(e=[...e],e.sort((e,t)=>{let n=this._getCellSortableValue(e.children[this._sortedColumn]),r=this._getCellSortableValue(t.children[this._sortedColumn]);return this._compareCellValues(n,r,this._sortDirection)}),this._filteredRows=e),this.totalRows=this._filteredRows.length,this._ensureCurrentPageWithinBounds(),this.pagination?this._paginateTable():this._filteredRows.forEach(e=>e.style.display=``)}}firstUpdated(){let e=this.shadowRoot.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners(),this._attachTbodyObserver(),this._initialTableRefreshFrame=requestAnimationFrame(()=>{this._initialTableRefreshFrame=0,this.isConnected&&this._refreshFromTableContent()}))}updated(e){super.updated(e),e.has(`disableSorting`)&&this._sortedColumn!==null&&!this._isColumnSortable(this._sortedColumn)&&(this._sortedColumn=null,this._sortDirection=`asc`),(e.has(`searchTerm`)||e.has(`currentPage`)||e.has(`pageSize`)||e.has(`filteringSearch`)||e.has(`pagination`)||e.has(`disableSorting`))&&this.updateComplete.then(()=>{this.isConnected&&this._refreshFromTableContent()}),this.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>{e.setAttribute(`size`,M(this,`--scb-table-advanced-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`))})}_disconnectTbodyObserver(){this._tbodyObserver&&=(this._tbodyObserver.disconnect(),null),this._observedTbody=null}_attachTbodyObserver(){let e=this._getTbody();if(!e){this._disconnectTbodyObserver();return}this._observedTbody!==e&&(this._disconnectTbodyObserver(),this._observedTbody=e,this._tbodyObserver=new MutationObserver(()=>{this._suppressTbodyObserver||this._scheduleTableRefresh()}),this._tbodyObserver.observe(e,{childList:!0,subtree:!0,characterData:!0}))}_scheduleTableRefresh(){this._pendingTableRefresh||(this._pendingTableRefresh=!0,queueMicrotask(()=>{this._pendingTableRefresh=!1,this._refreshFromTableContent()}))}_refreshFromTableContent(){if(this._attachTbodyObserver(),this.filteringSearch){this._filterTable();return}if(this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this._sortedColumn!==null){this._sortTable(this._sortedColumn,this._sortDirection);return}this.pagination&&this._paginateTable()}_ensureCurrentPageWithinBounds(){let e=Math.max(1,Math.ceil(this.totalRows/this.pageSize)),t=Math.min(Math.max(1,this.currentPage),e);t!==this.currentPage&&(this.currentPage=t)}_getTbody(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);if(t)return t}return null}_getTopLevelRows(e){return Array.from(e.children).filter(e=>e instanceof HTMLTableRowElement)}_attachThListeners(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(Array.from(e.querySelectorAll(`thead`)).forEach(e=>{n.push(...Array.from(e.querySelectorAll(`th`)))}),r.push(...e.querySelectorAll(`th`)),i.push(...e.querySelectorAll(`td`)),a.push(...e.querySelectorAll(`tr`)))}),r.forEach(e=>{let t=n.indexOf(e),r=t!==-1;e.style.textAlign=`left`,e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.position=`relative`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-header-font)`,e.style.fontSize=`var(--scb-table-header-font-size)`,e.style.lineHeight=`var(--scb-table-header-line-height)`,e.style.fontWeight=`var(--scb-table-header-font-weight)`,e.style.letterSpacing=`var(--scb-table-header-letter-spacing)`,e.style.verticalAlign=`middle`,this._removeGeneratedSortMarkup(e),e.hasAttribute(`scope`)||(r?e.setAttribute(`scope`,`col`):e.closest(`tbody`)&&e.setAttribute(`scope`,`row`));let i=this._getOrCreateHeaderLabel(e,t);if((i instanceof HTMLParagraphElement||i.getAttribute(`data-scb-generated-label`)===`true`)&&this._applyGeneratedCellTextReset(i),!r){e.removeAttribute(`aria-sort`);return}if(!this._isColumnSortable(t)){e.removeAttribute(`aria-sort`);return}e.setAttribute(`aria-sort`,this._getHeaderAriaSort(t));let a=this._getNormalizedText(i.textContent)||`kolumn ${Math.max(t,0)+1}`,o=document.createElement(`scb-icon-button`);o.className=`scb-sort-icon`,o.onclick=()=>this._onThClick(t),o.setAttribute(`variant`,`standard`),o.setAttribute(`size`,M(this,`--scb-table-advanced-design-sort-icon-button-size-medium`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`)),o.setAttribute(`aria-label`,this._getSortButtonLabel(a,t)),o.style.alignSelf=`center`,this._sortedColumn===t?(o.setAttribute(`variant`,`filled-tonal`),o.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(o.setAttribute(`icon`,`swap_horiz`),o.style.transform+=` rotate(90deg)`),this._wrapHeaderWithSortControl(e,i,o)}),i.forEach(e=>{e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--scb-tables-outline-color, var(--md-sys-color-outline-variant))`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-cell-font)`,e.style.fontSize=`var(--scb-table-cell-font-size)`,e.style.lineHeight=`var(--scb-table-cell-line-height)`,e.style.fontWeight=`var(--scb-table-cell-font-weight)`,e.style.letterSpacing=`var(--scb-table-cell-letter-spacing)`}),a.forEach((e,t)=>{t%2==1&&e.querySelectorAll(`td`).forEach(e=>{e.style.backgroundColor=`var(--scb-background-row)`});let n=e.querySelectorAll(`th`);n.length>0&&n.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===n.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``});let r=e.querySelectorAll(`td`);r.length>0&&r.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===r.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``})}),this.pagination&&this._paginateTable()}_applyGeneratedCellTextReset(e){e.style.margin=`0`,e.style.color=`inherit`,e.style.fontFamily=`inherit`,e.style.fontSize=`inherit`,e.style.lineHeight=`inherit`,e.style.fontWeight=`inherit`,e.style.letterSpacing=`inherit`}_removeGeneratedSortMarkup(e){e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let t=e.querySelector(`:scope > [data-scb-sort-header="true"]`);if(!(t instanceof HTMLElement))return;let n=t.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement){t.replaceWith(n);return}t.remove()}_getOrCreateHeaderLabel(e,t){let n=e.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement)return n;let r=e.querySelector(`:scope > p`);if(r instanceof HTMLParagraphElement)return r.setAttribute(`data-scb-sort-label`,`true`),r;let i=Array.from(e.children).find(e=>e instanceof HTMLElement&&!e.matches(`scb-icon-button.scb-sort-icon`));if(i)return i.setAttribute(`data-scb-sort-label`,`true`),i;let a=document.createElement(`p`);return a.setAttribute(`data-scb-sort-label`,`true`),a.setAttribute(`data-scb-generated-label`,`true`),a.textContent=this._getNormalizedText(e.textContent)||`kolumn ${Math.max(t,0)+1}`,e.textContent=``,e.appendChild(a),a}_wrapHeaderWithSortControl(e,t,n){let r=document.createElement(`div`);r.setAttribute(`data-scb-sort-header`,`true`),r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(t),r.appendChild(n),e.appendChild(r)}_getNormalizedText(e){return(e??``).replace(/\s+/g,` `).trim()}_onThClick(e){this._isColumnSortable(e)&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners())}_getHeaderAriaSort(e){return this._sortedColumn===e?this._sortDirection===`asc`?`ascending`:`descending`:`none`}_getSortButtonLabel(e,t){return`Sortera ${e||`kolumn ${t+1}`} ${this._sortedColumn===t&&this._sortDirection===`asc`?`fallande`:`stigande`}`}_isColumnSortable(e){return!(Array.isArray(this.disableSorting)?this.disableSorting:[]).some(t=>Number(t)===e)}_sortTable(e,t){if(!this._isColumnSortable(e))return;let n=this.shadowRoot.querySelector(`slot`);if(!n)return;let r=n.assignedNodes({flatten:!0}),i=null;if(r.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(i=t)}}),!i)return;let a;a=this._filteredRows?[...this._filteredRows]:this._getTopLevelRows(i),a.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)});let o=this._tbodyObserver!==null;o&&this._disconnectTbodyObserver();try{a.forEach(e=>i.appendChild(e))}finally{o&&this._attachTbodyObserver()}this._filteredRows&&(this._filteredRows=a,this.totalRows=this._filteredRows.length),this.pagination&&this._paginateTable()}_getRowSearchText(e){return Array.from(e.cells).map(e=>this._getCellSortableValue(e)).join(` `)}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}_updateTotalRows(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),n&&(this.totalRows=this._getTopLevelRows(n).length,this._ensureCurrentPageWithinBounds())}_paginateTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r;r=this._filteredRows?this._filteredRows:this._getTopLevelRows(n),this._getTopLevelRows(n).forEach(e=>e.style.display=`none`);let i=(this.currentPage-1)*this.pageSize,a=i+this.pageSize;r.slice(i,a).forEach(e=>e.style.display=``)}_changePage(e){let t=Math.ceil(this.totalRows/this.pageSize);e<1||e>t||(this.currentPage=e,this._paginateTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0})),this.requestUpdate())}};N([_({type:String})],op.prototype,`searchTerm`,void 0),N([_({type:Boolean,attribute:`with-pagination`})],op.prototype,`pagination`,void 0),N([_({type:Boolean,attribute:`with-filtering-search`})],op.prototype,`filteringSearch`,void 0),N([_({type:Boolean,attribute:`no-scroll`})],op.prototype,`noScroll`,void 0),N([_({type:Number,attribute:`page-size`})],op.prototype,`pageSize`,void 0),N([_({type:Array,attribute:`disable-sorting`})],op.prototype,`disableSorting`,void 0),N([_({type:Number})],op.prototype,`currentPage`,void 0),N([_({type:Number})],op.prototype,`totalRows`,void 0),op=N([a(`scb-table-advanced`)],op),b(),w(),D(),P();var sp=class extends Ms{constructor(...e){super(...e),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute(`aria-selected`,this.active?`true`:`false`),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Ms.styles,p`
20298
20326
  :host {
20299
20327
  /* Styrpunkter och tokenbindningar finns i komponentens component.json. */
20300
20328
  --md-primary-tab-container-height: var(--scb-tabs-design-height-medium);
@@ -20328,7 +20356,7 @@
20328
20356
  :host([icon-only]) slot:not([name='icon']) {
20329
20357
  display: none;
20330
20358
  }
20331
- `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],op.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],op.prototype,`iconOnly`,void 0),N([_({type:Boolean,reflect:!0,attribute:`inline-icon`})],op.prototype,`inlineIcon`,void 0),op=N([a(`scb-primary-tab`)],op),b(),w(),D(),P();var sp=class extends Fs{constructor(...e){super(...e),this.iconOnly=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Fs.styles,p`
20359
+ `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],sp.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],sp.prototype,`iconOnly`,void 0),N([_({type:Boolean,reflect:!0,attribute:`inline-icon`})],sp.prototype,`inlineIcon`,void 0),sp=N([a(`scb-primary-tab`)],sp),b(),w(),D(),P();var cp=class extends Fs{constructor(...e){super(...e),this.iconOnly=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Fs.styles,p`
20332
20360
  :host {
20333
20361
  /* Styrpunkter och tokenbindningar finns i komponentens component.json. */
20334
20362
  --md-secondary-tab-container-height: var(--scb-tabs-design-height-medium);
@@ -20348,7 +20376,7 @@
20348
20376
  :host([icon-only]) slot:not([name='icon']) {
20349
20377
  display: none;
20350
20378
  }
20351
- `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],sp.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],sp.prototype,`iconOnly`,void 0),sp=N([a(`scb-secondary-tab`)],sp),b(),w(),P();var cp=class extends zs{constructor(...e){super(...e),this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isDispatching=!1,this._onChange=e=>{if(!e.composed&&!this._isDispatching){e.stopPropagation(),this._isDispatching=!0;let t=e.target.activeTabIndex;this.dispatchEvent(new CustomEvent(`change`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`tabschange`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this._isDispatching=!1}}}static{this.styles=[...zs.styles,p`
20379
+ `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],cp.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],cp.prototype,`iconOnly`,void 0),cp=N([a(`scb-secondary-tab`)],cp),b(),w(),P();var lp=class extends zs{constructor(...e){super(...e),this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isDispatching=!1,this._onChange=e=>{if(!e.composed&&!this._isDispatching){e.stopPropagation(),this._isDispatching=!0;let t=e.target.activeTabIndex;this.dispatchEvent(new CustomEvent(`change`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`tabschange`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this._isDispatching=!1}}}static{this.styles=[...zs.styles,p`
20352
20380
  :host {
20353
20381
  /* Styrpunkter och tokenbindningar finns i komponentens component.json. */
20354
20382
  --md-primary-tab-container-height: var(--scb-tabs-design-height-medium);
@@ -20413,7 +20441,7 @@
20413
20441
  }
20414
20442
 
20415
20443
  /* design:bindings:scb-tabs:end */
20416
- `]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tablist`)}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`change`,this._onChange),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}#e(){let e=this.#t(this.spacing),t=this.#t(this.spacingTop)??e,n=this.#t(this.spacingBottom)??e,r=this.#t(this.spacingLeft),i=this.#t(this.spacingRight);t?this.style.setProperty(`--scb-tabs-spacing-block-start`,t):this.style.removeProperty(`--scb-tabs-spacing-block-start`),n?this.style.setProperty(`--scb-tabs-spacing-block-end`,n):this.style.removeProperty(`--scb-tabs-spacing-block-end`),r?this.style.setProperty(`--scb-tabs-spacing-inline-start`,r):this.style.removeProperty(`--scb-tabs-spacing-inline-start`),i?this.style.setProperty(`--scb-tabs-spacing-inline-end`,i):this.style.removeProperty(`--scb-tabs-spacing-inline-end`)}#t(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};N([_({type:String,reflect:!0,attribute:`aria-label`})],cp.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],cp.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],cp.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],cp.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],cp.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],cp.prototype,`spacingRight`,void 0),cp=N([a(`scb-tabs`)],cp),w(),b(),Ru(),yc(),D(),E(),j(),P();var lp,up=class extends C{static{lp=this}constructor(...e){super(...e),this.expanded=!1,this.label=``,this.supportingText=``,this.current=!1,this.itemHref=`#`,this.noDivider=!1,this._unique=lp._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{let e=this.renderRoot.querySelector(`slot:not([name])`),t=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==t&&(this._slotHasContent=t,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;let e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{let t=this.closest(`scb-toc`),n=Array.from(t?.querySelectorAll(`scb-toc-item`)||[]).map(e=>({host:e,label:e.renderRoot.querySelector(`.toc-item-label`)||null})).filter(e=>!!e.label),r=n.findIndex(e=>e.host===this);if(r<0)return;let i=e.currentTarget?.classList?.contains(`toc-chevron-button`)??!1;switch(e.key){case`Enter`:case` `:if(!i)return;e.preventDefault(),this._toggleAccordion();break;case`ArrowDown`:e.preventDefault(),r<n.length-1&&n[r+1].label.focus();break;case`ArrowUp`:e.preventDefault(),r>0&&n[r-1].label.focus();break;case`Home`:e.preventDefault(),n.length&&n[0].label.focus();break;case`End`:e.preventDefault(),n.length&&n[n.length-1].label.focus();break}}}setExpanded(e){this.expanded!==e&&(this.expanded=e)}static{this._uidPrefix=`uid-${Math.random().toString(36).slice(2)}`}static{this._uidSeq=0}static _uid(){return globalThis.crypto?.randomUUID?.()??`${lp._uidPrefix}-${++lp._uidSeq}`}static{this.styles=[p`
20444
+ `]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tablist`)}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`change`,this._onChange),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}#e(){let e=this.#t(this.spacing),t=this.#t(this.spacingTop)??e,n=this.#t(this.spacingBottom)??e,r=this.#t(this.spacingLeft),i=this.#t(this.spacingRight);t?this.style.setProperty(`--scb-tabs-spacing-block-start`,t):this.style.removeProperty(`--scb-tabs-spacing-block-start`),n?this.style.setProperty(`--scb-tabs-spacing-block-end`,n):this.style.removeProperty(`--scb-tabs-spacing-block-end`),r?this.style.setProperty(`--scb-tabs-spacing-inline-start`,r):this.style.removeProperty(`--scb-tabs-spacing-inline-start`),i?this.style.setProperty(`--scb-tabs-spacing-inline-end`,i):this.style.removeProperty(`--scb-tabs-spacing-inline-end`)}#t(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};N([_({type:String,reflect:!0,attribute:`aria-label`})],lp.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],lp.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],lp.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],lp.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],lp.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],lp.prototype,`spacingRight`,void 0),lp=N([a(`scb-tabs`)],lp),w(),b(),Ru(),yc(),D(),E(),j(),P();var up,dp=class extends C{static{up=this}constructor(...e){super(...e),this.expanded=!1,this.label=``,this.supportingText=``,this.current=!1,this.itemHref=`#`,this.noDivider=!1,this._unique=up._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._trailingSlotHasContent=!1,this._onSlotChange=()=>{let e=this.renderRoot.querySelector(`slot:not([name])`),t=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==t&&(this._slotHasContent=t,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;let e=!this.expanded;this.setExpanded(e)},this._onKeyDown=e=>{let t=this.closest(`scb-toc`),n=Array.from(t?.querySelectorAll(`scb-toc-item`)||[]).map(e=>({host:e,label:e.renderRoot.querySelector(`.toc-item-label`)||null})).filter(e=>!!e.label),r=n.findIndex(e=>e.host===this);if(r<0)return;let i=e.currentTarget?.classList?.contains(`toc-chevron-button`)??!1;switch(e.key){case`Enter`:case` `:if(!i)return;e.preventDefault(),this._toggleAccordion();break;case`ArrowDown`:e.preventDefault(),r<n.length-1&&n[r+1].label.focus();break;case`ArrowUp`:e.preventDefault(),r>0&&n[r-1].label.focus();break;case`Home`:e.preventDefault(),n.length&&n[0].label.focus();break;case`End`:e.preventDefault(),n.length&&n[n.length-1].label.focus();break}}}setExpanded(e){this.expanded!==e&&(this.expanded=e)}static{this._uidPrefix=`uid-${Math.random().toString(36).slice(2)}`}static{this._uidSeq=0}static _uid(){return globalThis.crypto?.randomUUID?.()??`${up._uidPrefix}-${++up._uidSeq}`}static{this.styles=[p`
20417
20445
  :host {
20418
20446
  display: block;
20419
20447
  --scb-toc-transition-duration: var(--motion-duration-short, 150ms);
@@ -20715,7 +20743,7 @@
20715
20743
 
20716
20744
  ${this.noDivider?``:x`<scb-divider></scb-divider>`}
20717
20745
  </div>
20718
- `}};N([_({type:Boolean,reflect:!0})],up.prototype,`expanded`,void 0),N([_({type:String,reflect:!0})],up.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],up.prototype,`supportingText`,void 0),N([_({type:Boolean,reflect:!0})],up.prototype,`current`,void 0),N([_({type:String,attribute:`item-href`})],up.prototype,`itemHref`,void 0),N([_({type:Boolean,attribute:`no-divider`})],up.prototype,`noDivider`,void 0),up=lp=N([a(`scb-toc-item`)],up),w(),b(),P();var dp=class extends C{constructor(...e){super(...e),this.label=`Innehållsförteckning`,this.singleOpen=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=[p`
20746
+ `}};N([_({type:Boolean,reflect:!0})],dp.prototype,`expanded`,void 0),N([_({type:String,reflect:!0})],dp.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],dp.prototype,`supportingText`,void 0),N([_({type:Boolean,reflect:!0})],dp.prototype,`current`,void 0),N([_({type:String,attribute:`item-href`})],dp.prototype,`itemHref`,void 0),N([_({type:Boolean,attribute:`no-divider`})],dp.prototype,`noDivider`,void 0),dp=up=N([a(`scb-toc-item`)],dp),w(),b(),P();var fp=class extends C{constructor(...e){super(...e),this.label=`Innehållsförteckning`,this.singleOpen=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=[p`
20719
20747
  :host {
20720
20748
  display: block;
20721
20749
  /* Vertikalt avstånd styrs av spacing-attributen via CSS-variabler */
@@ -20739,8 +20767,8 @@
20739
20767
  <slot @slotchange=${this.#t}></slot>
20740
20768
  </div>
20741
20769
  </nav>
20742
- `}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName===`SCB-TOC-ITEM`)}#e(e){if(!this.singleOpen)return;let t=e;if(!t.detail?.expanded)return;let n=t.target;!n||n.tagName!==`SCB-TOC-ITEM`||this._getDirectItems().forEach(e=>{e!==n&&e.expanded&&e.setExpanded(!1)})}#t(){this.#r(),this.#n()}#n(){if(!this.singleOpen)return;let e=this._getDirectItems().filter(e=>e.expanded);e.length<=1||e.slice(1).forEach(e=>e.setExpanded(!1))}#r(){let e=this._getDirectItems(),t=String(e.length);e.forEach((e,n)=>{e.setAttribute(`role`,`listitem`),e.setAttribute(`aria-posinset`,String(n+1)),e.setAttribute(`aria-setsize`,t)})}#i(){let e=this.#a(this.spacing),t=this.#a(this.spacingTop)??e,n=this.#a(this.spacingBottom)??e,r=this.#a(this.spacingLeft),i=this.#a(this.spacingRight);t?this.style.setProperty(`--scb-toc-spacing-block-start`,t):this.style.removeProperty(`--scb-toc-spacing-block-start`),n?this.style.setProperty(`--scb-toc-spacing-block-end`,n):this.style.removeProperty(`--scb-toc-spacing-block-end`),r?this.style.setProperty(`--scb-toc-spacing-inline-start`,r):this.style.removeProperty(`--scb-toc-spacing-inline-start`),i?this.style.setProperty(`--scb-toc-spacing-inline-end`,i):this.style.removeProperty(`--scb-toc-spacing-inline-end`)}#a(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};N([_({type:String,reflect:!0})],dp.prototype,`label`,void 0),N([_({type:Boolean,attribute:`single-open`,reflect:!0})],dp.prototype,`singleOpen`,void 0),N([_({type:String,reflect:!0})],dp.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],dp.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],dp.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],dp.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],dp.prototype,`spacingRight`,void 0),dp=N([a(`scb-toc`)],dp),vt(),Gt();var fp={},pp=Ut(class extends Wt{constructor(){super(...arguments),this.ot=fp}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every(((e,t)=>e===this.ot[t])))return rt}else if(this.ot===t)return rt;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});vt(),Gt();var mp=class extends Wt{constructor(e){if(super(e),this.it=S,e.type!==Ht.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===S||e==null)return this._t=void 0,this.it=e;if(e===rt)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};mp.directiveName=`unsafeHTML`,mp.resultType=1,Ut(mp),Gt();var hp=class extends mp{};hp.directiveName=`unsafeSVG`,hp.resultType=2;var gp=Ut(hp),_p=(e,t,n=`1.25`)=>{let r=document.createElementNS(e,`path`);return r.setAttribute(`d`,t),r.setAttribute(`class`,`scb-viz-highcharts-pattern__mark`),r.setAttribute(`stroke-width`,n),r.setAttribute(`stroke-linecap`,`square`),r},vp=(e,t,n,r)=>{let i=document.createElementNS(e,`circle`);return i.setAttribute(`cx`,t),i.setAttribute(`cy`,n),i.setAttribute(`r`,r),i.setAttribute(`class`,`scb-viz-highcharts-pattern__mark--dot`),i},yp=(e,t,n,r,i)=>{let a=document.createElementNS(e,`rect`);return a.setAttribute(`x`,t),a.setAttribute(`y`,n),a.setAttribute(`width`,r),a.setAttribute(`height`,i),a.setAttribute(`class`,`scb-viz-highcharts-pattern__mark--square`),a},bp={dashStyles:[`Solid`,`ShortDash`,`ShortDot`,`ShortDashDot`,`ShortDashDotDot`,`Dot`,`LongDash`,`LongDashDot`,`Dash`,`DashDot`],markerSymbols:[`circle`,`diamond`,`square`,`triangle`,`triangle-down`],defaultPatternKind:`grid`,patterns:[{kind:`diagonal`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M-2,8 l10,-10 M0,10 l10,-10 M8,12 l4,-4`))}},{kind:`dots`,appendMarks:(e,t)=>{e.appendChild(vp(t,`2`,`2`,`1.2`)),e.appendChild(vp(t,`7`,`7`,`1.2`))}},{kind:`cross`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M0,0 L10,10 M10,0 L0,10`))}},{kind:`vertical`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M2,0 L2,10 M7,0 L7,10`))}},{kind:`horizontal`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M0,2 L10,2 M0,7 L10,7`))}},{kind:`grid`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M0,0 L10,0 M0,5 L10,5 M0,10 L10,10`,`1`))}},{kind:`diagonal-reverse`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M0,0 L10,10 M-2,2 L8,12 M2,-2 L12,8`))}},{kind:`dots-dense`,appendMarks:(e,t)=>{e.appendChild(vp(t,`2`,`2`,`1`)),e.appendChild(vp(t,`7`,`2`,`1`)),e.appendChild(vp(t,`2`,`7`,`1`)),e.appendChild(vp(t,`7`,`7`,`1`))}},{kind:`checker`,appendMarks:(e,t)=>{e.appendChild(yp(t,`0`,`0`,`4`,`4`)),e.appendChild(yp(t,`5`,`5`,`4`,`4`))}},{kind:`zigzag`,appendMarks:(e,t)=>{e.appendChild(_p(t,`M-2,8 L2,4 L6,8 L10,4 L14,8 M-2,3 L2,-1 L6,3 L10,-1 L14,3`))}}]};function xp(){return bp.patterns.map(({kind:e})=>e)}function Sp(e){return bp.patterns.find(({kind:t})=>t===e)||bp.patterns.find(({kind:e})=>e===bp.defaultPatternKind)||bp.patterns[0]}function Cp(e,t,n){let r=Sp(n);return r?.appendMarks(e,t),r?.kind||n}function wp(e){let t=bp.dashStyles,n=bp.markerSymbols,r=xp();return{dashStyle:t[e%t.length],markerSymbol:n[e%n.length],patternKind:r[e%r.length]}}function Tp(e){return wp(e)}function Ep(e,t){let n=``,r=t&&t.options&&typeof t.options==`object`?t.options:{},i=t&&t.userOptions&&typeof t.userOptions==`object`?t.userOptions:{},a=e&&e.options&&typeof e.options==`object`?e.options:{},o=a.custom&&typeof a.custom==`object`?a.custom:{},s=e&&e.custom&&typeof e.custom==`object`?e.custom:{};return r.chart&&typeof r.chart.id==`string`?n=r.chart.id:i.chart&&typeof i.chart.id==`string`&&(n=i.chart.id),n=String(n||``).trim().toLowerCase(),n===`grouped-column`||n===`grouped-bar`||r.custom&&r.custom.scbVizGroupedClustered===!0||o.scbVizGroupedCategory===!0||o.scbVizGroupedCategoryLegend===!0||s.scbVizGroupedCategory===!0||s.scbVizGroupedCategoryLegend===!0||e&&e._scbVizGroupedCategoryLegendItem===!0?!0:Dp(e)}function Dp(e){return Array.isArray(e?.points)&&e.points.some(e=>{let t=e&&e.custom&&typeof e.custom==`object`?e.custom:{};return typeof t.scbVizGroup==`string`&&t.scbVizGroup.trim()})}function Op(e){let t=[e?.colorIndex,e?.options?.colorIndex,e?.userOptions?.colorIndex,e?.series?.colorIndex,e?.series?.options?.colorIndex].find(e=>Number.isInteger(e));return Number.isInteger(t)?Number(t):null}function kp(e){return!e||typeof e!=`object`?{indexByKey:{},nextIndex:0}:((!e.scbVizGroupedSeriesDifferentiationStore||typeof e.scbVizGroupedSeriesDifferentiationStore!=`object`)&&(e.scbVizGroupedSeriesDifferentiationStore={indexByKey:{},nextIndex:0}),e.scbVizGroupedSeriesDifferentiationStore)}function Ap(e,t){let n=Op(e);if(Number.isInteger(n))return`color:${n}`;let r=e?.custom&&typeof e.custom==`object`&&typeof e.custom.scbVizGroup==`string`?e.custom.scbVizGroup.trim():``;if(r)return`group:${r}`;let i=typeof e?.name==`string`?e.name.trim():``;if(i)return`name:${i}`;let a=typeof e?.series?.name==`string`?e.series.name.trim():``;return a?`series:${a}`:`fallback:${t}`}function jp(e,t,n){let r=Op(e);if(typeof r==`number`&&Number.isInteger(r))return r;let i=kp(t),a=Ap(e,n);return Object.prototype.hasOwnProperty.call(i.indexByKey,a)||(i.indexByKey[a]=i.nextIndex,i.nextIndex+=1),i.indexByKey[a]}function Mp(e,t,n){let r=jp(e,t,n);return{variantIndex:r,...Tp(r)}}function Np(e){return e.getCurrentPrintableView()!==`diagram`||!e.chart?.series?.length||!e.isHighchartsStyledMode(e.chart)?!1:e.chart.series.some(t=>e.getSeriesDifferentiationGroup(t,e.chart)!==null)}function Pp(e){let t=e?.element??e;return t instanceof SVGElement?t:null}function Fp(e){return!!(e?.styledMode||e?.renderer?.styledMode||e?.options?.chart?.styledMode)}function Ip(e){if(e?.container instanceof SVGSVGElement)return e.container;let t=e?.renderTo?.querySelector(`svg`)??e?.container?.querySelector?.(`svg`);return t instanceof SVGSVGElement?t:null}function Lp(e,t){let n=Pp(e);return Array.from(n?.classList??[]).find(e=>/^highcharts-color-\d+$/.test(e))??`highcharts-color-${t}`}function Rp(e,t){let n=Pp(e);n&&(n.setAttribute(`data-scb-viz-role`,t.role),t.dashStyle?n.setAttribute(`data-scb-viz-dash-style`,t.dashStyle):n.removeAttribute(`data-scb-viz-dash-style`),t.patternKind?n.setAttribute(`data-scb-viz-pattern-kind`,t.patternKind):n.removeAttribute(`data-scb-viz-pattern-kind`))}function zp(e){let t=Pp(e);t&&(t.removeAttribute(`data-scb-viz-role`),t.removeAttribute(`data-scb-viz-dash-style`),t.removeAttribute(`data-scb-viz-pattern-kind`))}function Bp(e,t){let n=Pp(e);if(!n||!t)return;let r=Array.from(n.classList).find(e=>/^highcharts-color-\d+$/.test(e));r!==t&&(r&&(n.classList.remove(r),n.setAttribute(`data-scb-viz-prev-color-class`,r)),n.classList.add(t),n.setAttribute(`data-scb-viz-added-color-class`,t))}function Vp(e){let t=Pp(e);if(!t)return;let n=t.getAttribute(`data-scb-viz-added-color-class`),r=t.getAttribute(`data-scb-viz-prev-color-class`);n&&(t.classList.remove(n),t.removeAttribute(`data-scb-viz-added-color-class`)),r&&(t.classList.add(r),t.removeAttribute(`data-scb-viz-prev-color-class`))}function Hp(e){let t=[],n=[],r=Pp(e?.legendItem?.group),i=(e,t)=>{let n=Pp(t);!n||e.includes(n)||e.push(n)};if(i(t,e?.legendLine),i(t,e?.legendItem?.line),i(n,e?.legendSymbol),i(n,e?.legendItem?.symbol),i(n,e?.legendArea),i(n,e?.legendItem?.area),r){let e=r.querySelector(`.highcharts-graph, .highcharts-legend-graph, line`);e&&i(t,e),r.querySelectorAll(`rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path`).forEach(e=>{i(n,e)})}return{graphTargets:t,fillTargets:n.filter(e=>!t.includes(e))}}function Up(e,t,n){let r=Ip(e);if(!r)return;let i=`http://www.w3.org/2000/svg`,a=r.querySelector(`defs`);a instanceof SVGDefsElement||(a=document.createElementNS(i,`defs`),r.insertBefore(a,r.firstChild));let o=`scb-viz-pattern-${t}-${n}`;if(a.querySelector(`#${o}`))return;let s=document.createElementNS(i,`pattern`);s.setAttribute(`id`,o),s.setAttribute(`patternUnits`,`userSpaceOnUse`),s.setAttribute(`width`,`10`),s.setAttribute(`height`,`10`),s.classList.add(t);let c=document.createElementNS(i,`rect`);c.setAttribute(`x`,`0`),c.setAttribute(`y`,`0`),c.setAttribute(`width`,`10`),c.setAttribute(`height`,`10`),c.setAttribute(`class`,`scb-viz-highcharts-pattern__background`),s.appendChild(c),Cp(s,i,n),a.appendChild(s)}var Wp={brandAssetFill:`#fff`,vizExportBackgroundFallback:`#ffffff`,vizExportTransparentBackground:`rgba(0, 0, 0, 0)`,vizPrintBackground:`#fff`,vizPrintText:`#1f1f1f`,vizPrintTableBorder:`#c5c7d0`,vizPrintTableRowStripe:`#f5f5f5`},Gp=e=>{let t=getComputedStyle(e).backgroundColor;return t&&t!==Wp.vizExportTransparentBackground?t:Wp.vizExportBackgroundFallback};function Kp({lang:e,title:t}){let n=e===`en`?`visualization`:`visualisering`;return(t||n).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||n}function qp(e,t){let n=t===`csv`?e.lang===`en`?`-table`:`-tabell`:``;return`${Kp(e)}${n}.${t}`}function Jp(e=document){return e}function Yp(e=document){let t=Jp(e);return t.fullscreenElement||t.webkitFullscreenElement||null}function Xp(e){return!!(e.requestFullscreen||e.webkitRequestFullscreen)}async function Zp(e,t=document){if(!Xp(e))return;let n=Jp(t),r=Yp(t);if(r===e){n.exitFullscreen?await n.exitFullscreen():n.webkitExitFullscreen&&await n.webkitExitFullscreen();return}r&&(n.exitFullscreen?await n.exitFullscreen():n.webkitExitFullscreen&&await n.webkitExitFullscreen()),e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen&&await e.webkitRequestFullscreen()}async function Qp(e,t=document){let n=t.createElement(`iframe`);n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.right=`0`,n.style.bottom=`0`,n.style.width=`0`,n.style.height=`0`,n.style.border=`0`,n.style.visibility=`hidden`,t.body.appendChild(n);let r=()=>{n.remove()},i=n.contentDocument,a=n.contentWindow;if(!i||!a){r();return}i.open(),i.write(e),i.close();let o=Array.from(i.images||[]);await Promise.all(o.map(e=>e.complete?Promise.resolve():new Promise(t=>{e.addEventListener(`load`,()=>t(null),{once:!0}),e.addEventListener(`error`,()=>t(null),{once:!0})})));let s=()=>{a.removeEventListener(`afterprint`,s),r()};a.addEventListener(`afterprint`,s,{once:!0}),setTimeout(()=>{a.focus(),a.print(),setTimeout(r,1e3)},50)}async function $p(e,t){e.setAttribute(`data-scb-viz-force-light`,``),await new Promise(e=>requestAnimationFrame(()=>e(null)));try{return await t()}finally{e.removeAttribute(`data-scb-viz-force-light`)}}function em(e,t){let n=t===`en`?`,`:`;`,r=e=>`"${String(e??``).replace(/\r?\n/g,` `).replace(/"/g,`""`)}"`,i=`\uFEFF${e.map(e=>e.map(r).join(n)).join(`\r
20743
- `)}`;return new Blob([i],{type:`text/csv;charset=utf-8;`})}async function tm(e,t,n){let r=await im(e,t);return r?lm(r,n===`jpeg`?`image/jpeg`:`image/png`,n===`jpeg`?.92:void 0):null}async function nm(e,t,n){let r=await im(e,t);return r?r.toDataURL(n===`jpeg`?`image/jpeg`:`image/png`,n===`jpeg`?.92:void 0):null}function rm(e,t,n=document){let r=URL.createObjectURL(e),i=n.createElement(`a`);i.href=r,i.download=t,n.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}async function im(e,t){let n=Gp(t);if(e instanceof HTMLCanvasElement){let t=e.width||Math.round(e.getBoundingClientRect().width),r=e.height||Math.round(e.getBoundingClientRect().height);if(!t||!r)return null;let i=document.createElement(`canvas`);i.width=t,i.height=r;let a=i.getContext(`2d`);return a?(a.fillStyle=n,a.fillRect(0,0,t,r),a.drawImage(e,0,0,t,r),i):null}if(e instanceof HTMLImageElement){let t=e.naturalWidth||e.width,r=e.naturalHeight||e.height;return!t||!r?null:sm(e.currentSrc||e.src,t,r,n)}let{width:r,height:i,serialized:a}=am(e);if(!r||!i||!a)return null;let o=new Blob([a],{type:`image/svg+xml;charset=utf-8`}),s=URL.createObjectURL(o);try{return await sm(s,r,i,n)}finally{URL.revokeObjectURL(s)}}function am(e){let t=e.cloneNode(!0),n=e.getBoundingClientRect(),r=e.viewBox?.baseVal,i=Math.round(r?.width||n.width||Number(e.getAttribute(`width`))||0),a=Math.round(r?.height||n.height||Number(e.getAttribute(`height`))||0);return t.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),t.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`),!t.getAttribute(`width`)&&i&&t.setAttribute(`width`,String(i)),!t.getAttribute(`height`)&&a&&t.setAttribute(`height`,String(a)),!t.getAttribute(`viewBox`)&&i&&a&&t.setAttribute(`viewBox`,`0 0 ${i} ${a}`),om(e,t),t.querySelectorAll(`.highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point`).forEach(e=>e.remove()),{width:i,height:a,serialized:new XMLSerializer().serializeToString(t)}}function om(e,t){let n=getComputedStyle(e),r=``;for(let e=0;e<n.length;e+=1){let t=n[e],i=n.getPropertyValue(t);i&&(r+=`${t}:${i};`)}r&&t.setAttribute(`style`,r);let i=Array.from(e.children),a=Array.from(t.children);for(let e=0;e<i.length;e+=1){let t=i[e],n=a[e];t&&n&&om(t,n)}}async function sm(e,t,n,r){let i=Math.max(1,Math.min(2,window.devicePixelRatio||1)),a=Math.max(1,Math.round(t)),o=Math.max(1,Math.round(n)),s=document.createElement(`canvas`);s.width=Math.max(1,Math.round(a*i)),s.height=Math.max(1,Math.round(o*i));let c=s.getContext(`2d`);if(!c)return null;let l=await cm(e);return l?(c.scale(i,i),c.fillStyle=r,c.fillRect(0,0,a,o),c.drawImage(l,0,0,a,o),s):null}function cm(e){return new Promise(t=>{let n=new Image;n.crossOrigin=`anonymous`,n.onload=()=>t(n),n.onerror=()=>t(null),n.src=e})}function lm(e,t,n){return new Promise(r=>{e.toBlob(e=>r(e),t,n)})}var um=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;clip:rect(0, 0, 0, 0);clip-path:inset(50%);border:0;`;function dm(e){return e===0?`Radrubrik`:`Kolumn ${e+1}`}function fm(e){return(e??``).replace(/\s+/g,` `).trim()}function pm(e,t,n,r){let i=e.html||n(e.text);return fm(i)?i:`<span class="visually-hidden" style="${um}">${n(r.getEmptyHeaderLabel?.(t)??dm(t))}</span>`}function mm(e,t,n={}){return`<table class="scb-viz-print-table">${e.headers.length?`<thead><tr>${e.headers.map((r,i)=>`<th scope="col" class="${e.alignments[i]===`right`?`align-right`:`align-left`}"><span class="scb-viz-print-table-heading-text">${pm(r,i,t,n)}</span></th>`).join(``)}</tr></thead>`:``}${`<tbody>${e.rows.map((n,r)=>{let i=e.rowHeaderRows[r]===!0;return`<tr>${n.map((n,r)=>{let a=e.alignments[r]===`right`?`align-right`:`align-left`,o=n.html||t(n.text);return r===0&&i?`<th scope="row" class="${a}">${o}</th>`:`<td class="${a}">${o}</td>`}).join(``)}</tr>`}).join(``)}</tbody>`}</table>`}function hm(e){let t=[];if(e.description&&t.push(`
20770
+ `}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName===`SCB-TOC-ITEM`)}#e(e){if(!this.singleOpen)return;let t=e;if(!t.detail?.expanded)return;let n=t.target;!n||n.tagName!==`SCB-TOC-ITEM`||this._getDirectItems().forEach(e=>{e!==n&&e.expanded&&e.setExpanded(!1)})}#t(){this.#r(),this.#n()}#n(){if(!this.singleOpen)return;let e=this._getDirectItems().filter(e=>e.expanded);e.length<=1||e.slice(1).forEach(e=>e.setExpanded(!1))}#r(){let e=this._getDirectItems(),t=String(e.length);e.forEach((e,n)=>{e.setAttribute(`role`,`listitem`),e.setAttribute(`aria-posinset`,String(n+1)),e.setAttribute(`aria-setsize`,t)})}#i(){let e=this.#a(this.spacing),t=this.#a(this.spacingTop)??e,n=this.#a(this.spacingBottom)??e,r=this.#a(this.spacingLeft),i=this.#a(this.spacingRight);t?this.style.setProperty(`--scb-toc-spacing-block-start`,t):this.style.removeProperty(`--scb-toc-spacing-block-start`),n?this.style.setProperty(`--scb-toc-spacing-block-end`,n):this.style.removeProperty(`--scb-toc-spacing-block-end`),r?this.style.setProperty(`--scb-toc-spacing-inline-start`,r):this.style.removeProperty(`--scb-toc-spacing-inline-start`),i?this.style.setProperty(`--scb-toc-spacing-inline-end`,i):this.style.removeProperty(`--scb-toc-spacing-inline-end`)}#a(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}};N([_({type:String,reflect:!0})],fp.prototype,`label`,void 0),N([_({type:Boolean,attribute:`single-open`,reflect:!0})],fp.prototype,`singleOpen`,void 0),N([_({type:String,reflect:!0})],fp.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],fp.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],fp.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],fp.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],fp.prototype,`spacingRight`,void 0),fp=N([a(`scb-toc`)],fp),vt(),Gt();var pp={},mp=Ut(class extends Wt{constructor(){super(...arguments),this.ot=pp}render(e,t){return t()}update(e,[t,n]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every(((e,t)=>e===this.ot[t])))return rt}else if(this.ot===t)return rt;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,n)}});vt(),Gt();var hp=class extends Wt{constructor(e){if(super(e),this.it=S,e.type!==Ht.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===S||e==null)return this._t=void 0,this.it=e;if(e===rt)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};hp.directiveName=`unsafeHTML`,hp.resultType=1,Ut(hp),Gt();var gp=class extends hp{};gp.directiveName=`unsafeSVG`,gp.resultType=2;var _p=Ut(gp),vp=(e,t,n=`1.25`)=>{let r=document.createElementNS(e,`path`);return r.setAttribute(`d`,t),r.setAttribute(`class`,`scb-viz-highcharts-pattern__mark`),r.setAttribute(`stroke-width`,n),r.setAttribute(`stroke-linecap`,`square`),r},yp=(e,t,n,r)=>{let i=document.createElementNS(e,`circle`);return i.setAttribute(`cx`,t),i.setAttribute(`cy`,n),i.setAttribute(`r`,r),i.setAttribute(`class`,`scb-viz-highcharts-pattern__mark--dot`),i},bp=(e,t,n,r,i)=>{let a=document.createElementNS(e,`rect`);return a.setAttribute(`x`,t),a.setAttribute(`y`,n),a.setAttribute(`width`,r),a.setAttribute(`height`,i),a.setAttribute(`class`,`scb-viz-highcharts-pattern__mark--square`),a},xp={dashStyles:[`Solid`,`ShortDash`,`ShortDot`,`ShortDashDot`,`ShortDashDotDot`,`Dot`,`LongDash`,`LongDashDot`,`Dash`,`DashDot`],markerSymbols:[`circle`,`diamond`,`square`,`triangle`,`triangle-down`],defaultPatternKind:`grid`,patterns:[{kind:`diagonal`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M-2,8 l10,-10 M0,10 l10,-10 M8,12 l4,-4`))}},{kind:`dots`,appendMarks:(e,t)=>{e.appendChild(yp(t,`2`,`2`,`1.2`)),e.appendChild(yp(t,`7`,`7`,`1.2`))}},{kind:`cross`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M0,0 L10,10 M10,0 L0,10`))}},{kind:`vertical`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M2,0 L2,10 M7,0 L7,10`))}},{kind:`horizontal`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M0,2 L10,2 M0,7 L10,7`))}},{kind:`grid`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M0,0 L10,0 M0,5 L10,5 M0,10 L10,10`,`1`))}},{kind:`diagonal-reverse`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M0,0 L10,10 M-2,2 L8,12 M2,-2 L12,8`))}},{kind:`dots-dense`,appendMarks:(e,t)=>{e.appendChild(yp(t,`2`,`2`,`1`)),e.appendChild(yp(t,`7`,`2`,`1`)),e.appendChild(yp(t,`2`,`7`,`1`)),e.appendChild(yp(t,`7`,`7`,`1`))}},{kind:`checker`,appendMarks:(e,t)=>{e.appendChild(bp(t,`0`,`0`,`4`,`4`)),e.appendChild(bp(t,`5`,`5`,`4`,`4`))}},{kind:`zigzag`,appendMarks:(e,t)=>{e.appendChild(vp(t,`M-2,8 L2,4 L6,8 L10,4 L14,8 M-2,3 L2,-1 L6,3 L10,-1 L14,3`))}}]};function Sp(){return xp.patterns.map(({kind:e})=>e)}function Cp(e){return xp.patterns.find(({kind:t})=>t===e)||xp.patterns.find(({kind:e})=>e===xp.defaultPatternKind)||xp.patterns[0]}function wp(e,t,n){let r=Cp(n);return r?.appendMarks(e,t),r?.kind||n}function Tp(e){let t=xp.dashStyles,n=xp.markerSymbols,r=Sp();return{dashStyle:t[e%t.length],markerSymbol:n[e%n.length],patternKind:r[e%r.length]}}function Ep(e){return Tp(e)}function Dp(e,t){let n=``,r=t&&t.options&&typeof t.options==`object`?t.options:{},i=t&&t.userOptions&&typeof t.userOptions==`object`?t.userOptions:{},a=e&&e.options&&typeof e.options==`object`?e.options:{},o=a.custom&&typeof a.custom==`object`?a.custom:{},s=e&&e.custom&&typeof e.custom==`object`?e.custom:{};return r.chart&&typeof r.chart.id==`string`?n=r.chart.id:i.chart&&typeof i.chart.id==`string`&&(n=i.chart.id),n=String(n||``).trim().toLowerCase(),n===`grouped-column`||n===`grouped-bar`||r.custom&&r.custom.scbVizGroupedClustered===!0||o.scbVizGroupedCategory===!0||o.scbVizGroupedCategoryLegend===!0||s.scbVizGroupedCategory===!0||s.scbVizGroupedCategoryLegend===!0||e&&e._scbVizGroupedCategoryLegendItem===!0?!0:Op(e)}function Op(e){return Array.isArray(e?.points)&&e.points.some(e=>{let t=e&&e.custom&&typeof e.custom==`object`?e.custom:{};return typeof t.scbVizGroup==`string`&&t.scbVizGroup.trim()})}function kp(e){let t=[e?.colorIndex,e?.options?.colorIndex,e?.userOptions?.colorIndex,e?.series?.colorIndex,e?.series?.options?.colorIndex].find(e=>Number.isInteger(e));return Number.isInteger(t)?Number(t):null}function Ap(e){return!e||typeof e!=`object`?{indexByKey:{},nextIndex:0}:((!e.scbVizGroupedSeriesDifferentiationStore||typeof e.scbVizGroupedSeriesDifferentiationStore!=`object`)&&(e.scbVizGroupedSeriesDifferentiationStore={indexByKey:{},nextIndex:0}),e.scbVizGroupedSeriesDifferentiationStore)}function jp(e,t){let n=kp(e);if(Number.isInteger(n))return`color:${n}`;let r=e?.custom&&typeof e.custom==`object`&&typeof e.custom.scbVizGroup==`string`?e.custom.scbVizGroup.trim():``;if(r)return`group:${r}`;let i=typeof e?.name==`string`?e.name.trim():``;if(i)return`name:${i}`;let a=typeof e?.series?.name==`string`?e.series.name.trim():``;return a?`series:${a}`:`fallback:${t}`}function Mp(e,t,n){let r=kp(e);if(typeof r==`number`&&Number.isInteger(r))return r;let i=Ap(t),a=jp(e,n);return Object.prototype.hasOwnProperty.call(i.indexByKey,a)||(i.indexByKey[a]=i.nextIndex,i.nextIndex+=1),i.indexByKey[a]}function Np(e,t,n){let r=Mp(e,t,n);return{variantIndex:r,...Ep(r)}}function Pp(e){return e.getCurrentPrintableView()!==`diagram`||!e.chart?.series?.length||!e.isHighchartsStyledMode(e.chart)?!1:e.chart.series.some(t=>e.getSeriesDifferentiationGroup(t,e.chart)!==null)}function Fp(e){let t=e?.element??e;return t instanceof SVGElement?t:null}function Ip(e){return!!(e?.styledMode||e?.renderer?.styledMode||e?.options?.chart?.styledMode)}function Lp(e){if(e?.container instanceof SVGSVGElement)return e.container;let t=e?.renderTo?.querySelector(`svg`)??e?.container?.querySelector?.(`svg`);return t instanceof SVGSVGElement?t:null}function Rp(e,t){let n=Fp(e);return Array.from(n?.classList??[]).find(e=>/^highcharts-color-\d+$/.test(e))??`highcharts-color-${t}`}function zp(e,t){let n=Fp(e);n&&(n.setAttribute(`data-scb-viz-role`,t.role),t.dashStyle?n.setAttribute(`data-scb-viz-dash-style`,t.dashStyle):n.removeAttribute(`data-scb-viz-dash-style`),t.patternKind?n.setAttribute(`data-scb-viz-pattern-kind`,t.patternKind):n.removeAttribute(`data-scb-viz-pattern-kind`))}function Bp(e){let t=Fp(e);t&&(t.removeAttribute(`data-scb-viz-role`),t.removeAttribute(`data-scb-viz-dash-style`),t.removeAttribute(`data-scb-viz-pattern-kind`))}function Vp(e,t){let n=Fp(e);if(!n||!t)return;let r=Array.from(n.classList).find(e=>/^highcharts-color-\d+$/.test(e));r!==t&&(r&&(n.classList.remove(r),n.setAttribute(`data-scb-viz-prev-color-class`,r)),n.classList.add(t),n.setAttribute(`data-scb-viz-added-color-class`,t))}function Hp(e){let t=Fp(e);if(!t)return;let n=t.getAttribute(`data-scb-viz-added-color-class`),r=t.getAttribute(`data-scb-viz-prev-color-class`);n&&(t.classList.remove(n),t.removeAttribute(`data-scb-viz-added-color-class`)),r&&(t.classList.add(r),t.removeAttribute(`data-scb-viz-prev-color-class`))}function Up(e){let t=[],n=[],r=Fp(e?.legendItem?.group),i=(e,t)=>{let n=Fp(t);!n||e.includes(n)||e.push(n)};if(i(t,e?.legendLine),i(t,e?.legendItem?.line),i(n,e?.legendSymbol),i(n,e?.legendItem?.symbol),i(n,e?.legendArea),i(n,e?.legendItem?.area),r){let e=r.querySelector(`.highcharts-graph, .highcharts-legend-graph, line`);e&&i(t,e),r.querySelectorAll(`rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path`).forEach(e=>{i(n,e)})}return{graphTargets:t,fillTargets:n.filter(e=>!t.includes(e))}}function Wp(e,t,n){let r=Lp(e);if(!r)return;let i=`http://www.w3.org/2000/svg`,a=r.querySelector(`defs`);a instanceof SVGDefsElement||(a=document.createElementNS(i,`defs`),r.insertBefore(a,r.firstChild));let o=`scb-viz-pattern-${t}-${n}`;if(a.querySelector(`#${o}`))return;let s=document.createElementNS(i,`pattern`);s.setAttribute(`id`,o),s.setAttribute(`patternUnits`,`userSpaceOnUse`),s.setAttribute(`width`,`10`),s.setAttribute(`height`,`10`),s.classList.add(t);let c=document.createElementNS(i,`rect`);c.setAttribute(`x`,`0`),c.setAttribute(`y`,`0`),c.setAttribute(`width`,`10`),c.setAttribute(`height`,`10`),c.setAttribute(`class`,`scb-viz-highcharts-pattern__background`),s.appendChild(c),wp(s,i,n),a.appendChild(s)}var Gp={brandAssetFill:`#fff`,vizExportBackgroundFallback:`#ffffff`,vizExportTransparentBackground:`rgba(0, 0, 0, 0)`,vizPrintBackground:`#fff`,vizPrintText:`#1f1f1f`,vizPrintTableBorder:`#c5c7d0`,vizPrintTableRowStripe:`#f5f5f5`},Kp=e=>{let t=getComputedStyle(e).backgroundColor;return t&&t!==Gp.vizExportTransparentBackground?t:Gp.vizExportBackgroundFallback};function qp({lang:e,title:t}){let n=e===`en`?`visualization`:`visualisering`;return(t||n).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||n}function Jp(e,t){let n=t===`csv`?e.lang===`en`?`-table`:`-tabell`:``;return`${qp(e)}${n}.${t}`}function Yp(e=document){return e}function Xp(e=document){let t=Yp(e);return t.fullscreenElement||t.webkitFullscreenElement||null}function Zp(e){return!!(e.requestFullscreen||e.webkitRequestFullscreen)}async function Qp(e,t=document){if(!Zp(e))return;let n=Yp(t),r=Xp(t);if(r===e){n.exitFullscreen?await n.exitFullscreen():n.webkitExitFullscreen&&await n.webkitExitFullscreen();return}r&&(n.exitFullscreen?await n.exitFullscreen():n.webkitExitFullscreen&&await n.webkitExitFullscreen()),e.requestFullscreen?await e.requestFullscreen():e.webkitRequestFullscreen&&await e.webkitRequestFullscreen()}async function $p(e,t=document){let n=t.createElement(`iframe`);n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.right=`0`,n.style.bottom=`0`,n.style.width=`0`,n.style.height=`0`,n.style.border=`0`,n.style.visibility=`hidden`,t.body.appendChild(n);let r=()=>{n.remove()},i=n.contentDocument,a=n.contentWindow;if(!i||!a){r();return}i.open(),i.write(e),i.close();let o=Array.from(i.images||[]);await Promise.all(o.map(e=>e.complete?Promise.resolve():new Promise(t=>{e.addEventListener(`load`,()=>t(null),{once:!0}),e.addEventListener(`error`,()=>t(null),{once:!0})})));let s=()=>{a.removeEventListener(`afterprint`,s),r()};a.addEventListener(`afterprint`,s,{once:!0}),setTimeout(()=>{a.focus(),a.print(),setTimeout(r,1e3)},50)}async function em(e,t){e.setAttribute(`data-scb-viz-force-light`,``),await new Promise(e=>requestAnimationFrame(()=>e(null)));try{return await t()}finally{e.removeAttribute(`data-scb-viz-force-light`)}}function tm(e,t){let n=t===`en`?`,`:`;`,r=e=>`"${String(e??``).replace(/\r?\n/g,` `).replace(/"/g,`""`)}"`,i=`\uFEFF${e.map(e=>e.map(r).join(n)).join(`\r
20771
+ `)}`;return new Blob([i],{type:`text/csv;charset=utf-8;`})}async function nm(e,t,n){let r=await am(e,t);return r?um(r,n===`jpeg`?`image/jpeg`:`image/png`,n===`jpeg`?.92:void 0):null}async function rm(e,t,n){let r=await am(e,t);return r?r.toDataURL(n===`jpeg`?`image/jpeg`:`image/png`,n===`jpeg`?.92:void 0):null}function im(e,t,n=document){let r=URL.createObjectURL(e),i=n.createElement(`a`);i.href=r,i.download=t,n.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),0)}async function am(e,t){let n=Kp(t);if(e instanceof HTMLCanvasElement){let t=e.width||Math.round(e.getBoundingClientRect().width),r=e.height||Math.round(e.getBoundingClientRect().height);if(!t||!r)return null;let i=document.createElement(`canvas`);i.width=t,i.height=r;let a=i.getContext(`2d`);return a?(a.fillStyle=n,a.fillRect(0,0,t,r),a.drawImage(e,0,0,t,r),i):null}if(e instanceof HTMLImageElement){let t=e.naturalWidth||e.width,r=e.naturalHeight||e.height;return!t||!r?null:cm(e.currentSrc||e.src,t,r,n)}let{width:r,height:i,serialized:a}=om(e);if(!r||!i||!a)return null;let o=new Blob([a],{type:`image/svg+xml;charset=utf-8`}),s=URL.createObjectURL(o);try{return await cm(s,r,i,n)}finally{URL.revokeObjectURL(s)}}function om(e){let t=e.cloneNode(!0),n=e.getBoundingClientRect(),r=e.viewBox?.baseVal,i=Math.round(r?.width||n.width||Number(e.getAttribute(`width`))||0),a=Math.round(r?.height||n.height||Number(e.getAttribute(`height`))||0);return t.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),t.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`),!t.getAttribute(`width`)&&i&&t.setAttribute(`width`,String(i)),!t.getAttribute(`height`)&&a&&t.setAttribute(`height`,String(a)),!t.getAttribute(`viewBox`)&&i&&a&&t.setAttribute(`viewBox`,`0 0 ${i} ${a}`),sm(e,t),t.querySelectorAll(`.highcharts-tooltip, .highcharts-contextmenu, .highcharts-a11y-proxy-container, .highcharts-a11y-dummy-point`).forEach(e=>e.remove()),{width:i,height:a,serialized:new XMLSerializer().serializeToString(t)}}function sm(e,t){let n=getComputedStyle(e),r=``;for(let e=0;e<n.length;e+=1){let t=n[e],i=n.getPropertyValue(t);i&&(r+=`${t}:${i};`)}r&&t.setAttribute(`style`,r);let i=Array.from(e.children),a=Array.from(t.children);for(let e=0;e<i.length;e+=1){let t=i[e],n=a[e];t&&n&&sm(t,n)}}async function cm(e,t,n,r){let i=Math.max(1,Math.min(2,window.devicePixelRatio||1)),a=Math.max(1,Math.round(t)),o=Math.max(1,Math.round(n)),s=document.createElement(`canvas`);s.width=Math.max(1,Math.round(a*i)),s.height=Math.max(1,Math.round(o*i));let c=s.getContext(`2d`);if(!c)return null;let l=await lm(e);return l?(c.scale(i,i),c.fillStyle=r,c.fillRect(0,0,a,o),c.drawImage(l,0,0,a,o),s):null}function lm(e){return new Promise(t=>{let n=new Image;n.crossOrigin=`anonymous`,n.onload=()=>t(n),n.onerror=()=>t(null),n.src=e})}function um(e,t,n){return new Promise(r=>{e.toBlob(e=>r(e),t,n)})}var dm=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;clip:rect(0, 0, 0, 0);clip-path:inset(50%);border:0;`;function fm(e){return e===0?`Radrubrik`:`Kolumn ${e+1}`}function pm(e){return(e??``).replace(/\s+/g,` `).trim()}function mm(e,t,n,r){let i=e.html||n(e.text);return pm(i)?i:`<span class="visually-hidden" style="${dm}">${n(r.getEmptyHeaderLabel?.(t)??fm(t))}</span>`}function hm(e,t,n={}){return`<table class="scb-viz-print-table">${e.headers.length?`<thead><tr>${e.headers.map((r,i)=>`<th scope="col" class="${e.alignments[i]===`right`?`align-right`:`align-left`}"><span class="scb-viz-print-table-heading-text">${mm(r,i,t,n)}</span></th>`).join(``)}</tr></thead>`:``}${`<tbody>${e.rows.map((n,r)=>{let i=e.rowHeaderRows[r]===!0;return`<tr>${n.map((n,r)=>{let a=e.alignments[r]===`right`?`align-right`:`align-left`,o=n.html||t(n.text);return r===0&&i?`<th scope="row" class="${a}">${o}</th>`:`<td class="${a}">${o}</td>`}).join(``)}</tr>`}).join(``)}</tbody>`}</table>`}function gm(e){let t=[];if(e.description&&t.push(`
20744
20772
  <section class="print-section">
20745
20773
  <h2>${e.escapeHtml(e.descriptionLabel)}</h2>
20746
20774
  <div class="body-text-rich">${e.renderRichTextHtml(e.description)}</div>
@@ -20772,7 +20800,7 @@
20772
20800
  <h2>${e.escapeHtml(e.moreAboutStatsLabel)}</h2>
20773
20801
  ${n.join(``)}
20774
20802
  </section>
20775
- `)}return t.join(``)}function gm(e){let t=e.escapeHtml;return`<!doctype html>
20803
+ `)}return t.join(``)}function _m(e){let t=e.escapeHtml;return`<!doctype html>
20776
20804
  <html lang="${t(e.lang||`sv`)}">
20777
20805
  <head>
20778
20806
  <meta charset="utf-8">
@@ -20794,10 +20822,10 @@
20794
20822
  --scb-viz-print-table-line-height: 1.5;
20795
20823
  --scb-viz-print-table-header-font-weight: var(--weight-bold, 700);
20796
20824
  --scb-viz-print-table-row-header-font-weight: var(--weight-regular, 400);
20797
- --scb-viz-print-background: ${Wp.vizPrintBackground};
20798
- --scb-viz-print-text: ${Wp.vizPrintText};
20799
- --scb-viz-print-table-border: ${Wp.vizPrintTableBorder};
20800
- --scb-viz-print-table-row-stripe: ${Wp.vizPrintTableRowStripe};
20825
+ --scb-viz-print-background: ${Gp.vizPrintBackground};
20826
+ --scb-viz-print-text: ${Gp.vizPrintText};
20827
+ --scb-viz-print-table-border: ${Gp.vizPrintTableBorder};
20828
+ --scb-viz-print-table-row-stripe: ${Gp.vizPrintTableRowStripe};
20801
20829
  }
20802
20830
  @page { margin: 16mm; }
20803
20831
  * { box-sizing: border-box; }
@@ -20873,7 +20901,7 @@
20873
20901
  ${e.footerHtml||``}
20874
20902
  </article>
20875
20903
  </body>
20876
- </html>`}var _m=new Set([`a`,`b`,`br`,`em`,`i`,`strong`,`sub`,`sup`,`u`]),vm=new Set([`http:`,`https:`,`mailto:`,`tel:`]),ym=new Set([`_blank`,`_self`]),bm=new Set([`nofollow`,`noopener`,`noreferrer`]);function xm(e){let t=(e??``).trim();if(!t)return null;let n=t.replace(/[\u0000-\u0020\u007f-\u009f]/g,``),r=/^[a-z][a-z0-9+.-]*:/i.exec(n)?.[0].toLowerCase();return r&&!vm.has(r)?null:t}function Sm(e){let t=xm(e.getAttribute(`href`)),n=(e.getAttribute(`target`)??``).trim().toLowerCase(),r=(e.getAttribute(`rel`)??``).toLowerCase().split(/\s+/).filter(e=>bm.has(e));if(!t){e.removeAttribute(`href`),e.removeAttribute(`target`),e.removeAttribute(`rel`);return}e.setAttribute(`href`,t),ym.has(n)?e.setAttribute(`target`,n):e.removeAttribute(`target`),n===`_blank`&&r.push(`noopener`,`noreferrer`);let i=[...new Set(r)];i.length?e.setAttribute(`rel`,i.join(` `)):e.removeAttribute(`rel`)}function Cm(e){let t=e.trim();if(!t||typeof document>`u`)return;let n=document.createElement(`template`);return n.innerHTML=t,n.content.querySelectorAll(`base, button, embed, form, iframe, input, link, math, meta, object, script, select, style, svg, template, textarea`).forEach(e=>e.remove()),Array.from(n.content.querySelectorAll(`*`)).reverse().forEach(e=>{let t=e.tagName.toLowerCase();if(!_m.has(t)){e.replaceWith(...Array.from(e.childNodes));return}Array.from(e.attributes).forEach(n=>{t===`a`&&[`href`,`rel`,`target`,`title`].includes(n.name.toLowerCase())||e.removeAttribute(n.name)}),t===`a`&&Sm(e)}),n}function wm(e){if(e&&typeof e==`object`&&`html`in e&&`text`in e){let t=typeof e.html==`string`?Cm(e.html):void 0;return{html:t?.innerHTML.trim()??``,text:typeof e.text==`string`?e.text:``,fragment:t?.content}}return{html:``,text:e==null?``:String(e)}}function Tm(e){if(!e)return;let t=e.assignedElements({flatten:!0}),n=[];t.forEach(e=>{if(e.tagName===`TABLE`){n.push(e);return}e.querySelectorAll(`table`).forEach(e=>n.push(e))});let r=n[0];if(!r)return;let i=[],a=[],o=[],s=e=>e?(e.textContent??``).replace(/\s+/g,` `).trim():``,c=e=>{if(!e)return{html:``,text:``};let{html:t,text:n}=wm({html:(e.innerHTML??``).trim(),text:s(e)});return{html:t,text:n}},l=r.querySelector(`thead tr`);l&&Array.from(l.querySelectorAll(`th, td`)).forEach(e=>{i.push(c(e))});let u=Array.from(r.querySelectorAll(`tbody tr`)),d=u.length>0?u:Array.from(r.querySelectorAll(`tr`)).filter(e=>e.closest(`thead`)===null);if(d.forEach(e=>{let t=Array.from(e.querySelectorAll(`th, td`));if(t.length===0)return;o.push(t[0].tagName===`TH`&&e.closest(`thead`)===null&&e.closest(`tfoot`)===null);let n=[];t.forEach(e=>n.push(c(e))),a.push(n)}),!l&&a.length>0){let e=a[0],t=d[0],n=Array.from(t?.querySelectorAll(`th, td`)??[]);n.length>0&&n.every(e=>e.tagName===`TH`)&&t?.closest(`tbody`)===null&&(i.splice(0,i.length,...e),a.shift(),o.shift())}return{headers:i.length>0?i:void 0,rows:a,rowHeaderRows:o.length>0?o:void 0}}function Em(e,t){let n=Math.max(e.headers?.length??0,...e.rows.map(e=>e.length)),r=[];for(let i=0;i<n;i+=1){if(i===0){r.push(`left`);continue}let n=e.rows.map(e=>wm(e[i]).text).filter(e=>e!==``&&e!=null),a=n.length>0&&n.every(e=>t(e)!==null);r.push(a?`right`:`left`)}return r}function Dm(e,t){let n=t.normalizeCell??wm,r=t.formatCell??(e=>n(e)),i=t.inferAlignments(e),a=Math.max(e.headers?.length??0,...e.rows.map(e=>e.length));return{alignments:i,colCount:a,headers:(e.headers??[]).map(e=>n(e)),rows:e.rows.map(e=>{let t=e.map((e,t)=>r(e,t,i));for(;t.length<a;)t.push({html:``,text:``});return t}),rowHeaderRows:e.rowHeaderRows??[]}}function Om(e,t=wm){let n=[];return e.headers?.length&&n.push(e.headers.map(e=>t(e).text)),e.rows.forEach(e=>{n.push(e.map(e=>t(e).text))}),n}w(),b(),yl(),Ru(),dl(),Sd(),vd(),P();var km=new Set([`extra-small`,`small`,`medium`,`large`]),Am=new Set([`tiny`,`extra-small`,`small`,`medium`,`large`]),jm=new Set([`small`,`medium`,`large`]),Mm=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
20904
+ </html>`}var vm=new Set([`a`,`b`,`br`,`em`,`i`,`strong`,`sub`,`sup`,`u`]),ym=new Set([`http:`,`https:`,`mailto:`,`tel:`]),bm=new Set([`_blank`,`_self`]),xm=new Set([`nofollow`,`noopener`,`noreferrer`]);function Sm(e){let t=(e??``).trim();if(!t)return null;let n=t.replace(/[\u0000-\u0020\u007f-\u009f]/g,``),r=/^[a-z][a-z0-9+.-]*:/i.exec(n)?.[0].toLowerCase();return r&&!ym.has(r)?null:t}function Cm(e){let t=Sm(e.getAttribute(`href`)),n=(e.getAttribute(`target`)??``).trim().toLowerCase(),r=(e.getAttribute(`rel`)??``).toLowerCase().split(/\s+/).filter(e=>xm.has(e));if(!t){e.removeAttribute(`href`),e.removeAttribute(`target`),e.removeAttribute(`rel`);return}e.setAttribute(`href`,t),bm.has(n)?e.setAttribute(`target`,n):e.removeAttribute(`target`),n===`_blank`&&r.push(`noopener`,`noreferrer`);let i=[...new Set(r)];i.length?e.setAttribute(`rel`,i.join(` `)):e.removeAttribute(`rel`)}function wm(e){let t=e.trim();if(!t||typeof document>`u`)return;let n=document.createElement(`template`);return n.innerHTML=t,n.content.querySelectorAll(`base, button, embed, form, iframe, input, link, math, meta, object, script, select, style, svg, template, textarea`).forEach(e=>e.remove()),Array.from(n.content.querySelectorAll(`*`)).reverse().forEach(e=>{let t=e.tagName.toLowerCase();if(!vm.has(t)){e.replaceWith(...Array.from(e.childNodes));return}Array.from(e.attributes).forEach(n=>{t===`a`&&[`href`,`rel`,`target`,`title`].includes(n.name.toLowerCase())||e.removeAttribute(n.name)}),t===`a`&&Cm(e)}),n}function Tm(e){if(e&&typeof e==`object`&&`html`in e&&`text`in e){let t=typeof e.html==`string`?wm(e.html):void 0;return{html:t?.innerHTML.trim()??``,text:typeof e.text==`string`?e.text:``,fragment:t?.content}}return{html:``,text:e==null?``:String(e)}}function Em(e){if(!e)return;let t=e.assignedElements({flatten:!0}),n=[];t.forEach(e=>{if(e.tagName===`TABLE`){n.push(e);return}e.querySelectorAll(`table`).forEach(e=>n.push(e))});let r=n[0];if(!r)return;let i=[],a=[],o=[],s=e=>e?(e.textContent??``).replace(/\s+/g,` `).trim():``,c=e=>{if(!e)return{html:``,text:``};let{html:t,text:n}=Tm({html:(e.innerHTML??``).trim(),text:s(e)});return{html:t,text:n}},l=r.querySelector(`thead tr`);l&&Array.from(l.querySelectorAll(`th, td`)).forEach(e=>{i.push(c(e))});let u=Array.from(r.querySelectorAll(`tbody tr`)),d=u.length>0?u:Array.from(r.querySelectorAll(`tr`)).filter(e=>e.closest(`thead`)===null);if(d.forEach(e=>{let t=Array.from(e.querySelectorAll(`th, td`));if(t.length===0)return;o.push(t[0].tagName===`TH`&&e.closest(`thead`)===null&&e.closest(`tfoot`)===null);let n=[];t.forEach(e=>n.push(c(e))),a.push(n)}),!l&&a.length>0){let e=a[0],t=d[0],n=Array.from(t?.querySelectorAll(`th, td`)??[]);n.length>0&&n.every(e=>e.tagName===`TH`)&&t?.closest(`tbody`)===null&&(i.splice(0,i.length,...e),a.shift(),o.shift())}return{headers:i.length>0?i:void 0,rows:a,rowHeaderRows:o.length>0?o:void 0}}function Dm(e,t){let n=Math.max(e.headers?.length??0,...e.rows.map(e=>e.length)),r=[];for(let i=0;i<n;i+=1){if(i===0){r.push(`left`);continue}let n=e.rows.map(e=>Tm(e[i]).text).filter(e=>e!==``&&e!=null),a=n.length>0&&n.every(e=>t(e)!==null);r.push(a?`right`:`left`)}return r}function Om(e,t){let n=t.normalizeCell??Tm,r=t.formatCell??(e=>n(e)),i=t.inferAlignments(e),a=Math.max(e.headers?.length??0,...e.rows.map(e=>e.length));return{alignments:i,colCount:a,headers:(e.headers??[]).map(e=>n(e)),rows:e.rows.map(e=>{let t=e.map((e,t)=>r(e,t,i));for(;t.length<a;)t.push({html:``,text:``});return t}),rowHeaderRows:e.rowHeaderRows??[]}}function km(e,t=Tm){let n=[];return e.headers?.length&&n.push(e.headers.map(e=>t(e).text)),e.rows.forEach(e=>{n.push(e.map(e=>t(e).text))}),n}w(),b(),yl(),Ru(),dl(),Sd(),vd(),P();var Am=new Set([`extra-small`,`small`,`medium`,`large`]),jm=new Set([`tiny`,`extra-small`,`small`,`medium`,`large`]),Mm=new Set([`small`,`medium`,`large`]),Nm=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
20877
20905
  viewBox="0 0 727.3 87.3" style="enable-background:new 0 0 727.3 87.3;" xml:space="preserve" fill="currentColor">
20878
20906
  <style type="text/css">
20879
20907
  .st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}
@@ -20988,7 +21016,7 @@
20988
21016
  <path d="M688.2,24.4h5.8v6h-5.8V24.4z M688.2,36.6h5.8v30.1h-5.8V36.6z"/>
20989
21017
  <path d="M701.8,24.4h5.8v26.3h0.1l11.2-14.1h7l-10,11.7l11.4,18.3H720l-7.7-14l-4.6,5.4v8.7h-5.8V24.4H701.8z"/>
20990
21018
  </svg>
20991
- `,Nm=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;clip:rect(0, 0, 0, 0);clip-path:inset(50%);border:0;`,Pm=0,$=class extends C{constructor(...e){super(...e),this.variant=`Standard`,this.selectedChip=`Diagram`,this.title=``,this.subtitle=``,this.description=``,this.comment=``,this.source=``,this.sourceDataHref=``,this.sourceDataLinkText=``,this.footnote=``,this.lang=`sv`,this.imageHref=``,this.imageAlt=``,this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth=``,this.containerMaxWidth=``,this.contentHeight=``,this.toggleHeightMode=`stable`,this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._isFullscreen=!1,this._tableDataRefreshFrame=0,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._fullscreenDiagramSizingFrame=0,this._fullscreenDiagramHeight=``,this._instanceId=`scb-viz-${++Pm}`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentFullscreenChange=()=>{this._syncFullscreenState()},this._onWindowResize=()=>{this._isFullscreen&&this.#c()},this._onToggleFullscreenClick=async()=>{this._closeActionsMenu(),await this._toggleFullscreen()},this._onActionsMenuOpen=()=>{this._actionsMenuOpen=!0,!this._isActionsMenuPinnedForPreview()&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})},this._onActionsMenuClose=()=>{let e=this._actionsMenuOpen;this._actionsMenuOpen=!1,e&&!this._isActionsMenuPinnedForPreview()&&requestAnimationFrame(()=>{this._focusMenuButton()})},this._onDocumentPointerDown=e=>{if(!this._actionsMenuOpen||this._isActionsMenuPinnedForPreview())return;let t=e.composedPath(),n=this.shadowRoot?.querySelector(`.actions-menu`);n&&t.includes(n)||this._closeActionsMenu()},this._onDocumentKeyDown=e=>{!this._actionsMenuOpen||this._isActionsMenuPinnedForPreview()||e.key===`Escape`&&(e.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await this.#v()},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await this.#m(`png`))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await this.#m(`jpeg`))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),this.#y())},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),this.#p()}}applyViewModel(e){if(!e||typeof e!=`object`)throw Error(`scb-viz: ScbVizViewModel måste vara ett objekt.`);if(!e.metadata||typeof e.metadata!=`object`)throw Error(`scb-viz: metadata saknas i ScbVizViewModel.`);if(!e.options||typeof e.options!=`object`)throw Error(`scb-viz: options saknas i ScbVizViewModel.`);if(![`chart`,`table`,`image`].includes(e.selectedView))throw Error(`scb-viz: selectedView är ${JSON.stringify(e.selectedView)}, men måste vara chart, table eller image.`);if(e.selectedView===`table`&&!e.table)throw Error(`scb-viz: selectedView är "table", men table saknas i ScbVizViewModel.`);if(e.selectedView===`image`&&!e.image)throw Error(`scb-viz: selectedView är "image", men image saknas i ScbVizViewModel.`);let t=e.metadata,n=e.options;this.variant=e.selectedView===`image`?`Image`:e.selectedView===`table`&&!n.showViewToggle?`Table`:`Standard`,this.selectedChip=e.selectedView===`chart`?`Diagram`:e.selectedView===`table`?`Table`:null,this.lang=n.language?.trim()||`sv`,this.title=t.title||``,this.subtitle=t.subtitle||``,this.description=t.description||``,this.comment=t.comment||``,this.source=t.source||``,this.sourceDataHref=t.sourceDataHref||``,this.sourceDataLinkText=t.sourceDataLinkText||``,this.footnote=t.footnote||``,this.imageHref=e.image?.src||``,this.imageAlt=e.image?.alt||``,this.officialStatistics=n.officialStatistics,this.disableToggle=!n.showViewToggle,this.contentHeight=n.contentHeight?.trim()||``,this.contentMaxWidth=n.contentMaxWidth?.trim()||``,this.tableData=e.table?.data,this.valueFormat=e.table?.valueFormat,this.timeFormat=e.table?.timeFormat}refreshTableData(){this._readTableDataFromSlot()}get descriptionLabel(){return this.lang===`en`?`Description of the chart`:`Beskrivning av diagrammet`}get moreAboutStatsLabel(){return this.lang===`en`?`More about the statistics`:`Mer om statistiken`}get commentLabel(){return this.lang===`en`?`Comments`:`Kommentar`}get sourceLabel(){return this.lang===`en`?`Source`:`Källa`}get footnoteLabel(){return this.lang===`en`?`Footnotes`:`Fotnot`}get officialStatisticsLabel(){return this.lang===`en`?`Official statistics of Sweden`:`Sveriges officiella statistik`}get officialStatisticsTitle(){return this.lang===`en`?`Part of Official statistics of Sweden`:`Tillhör Sveriges officiella statistik`}get officialStatisticsAlt(){return this.lang===`en`?`Read more about Official statistics of Sweden`:`Läs mer om Sveriges officiella statistik`}get actionsMenuLabel(){return this.lang===`en`?`Open menu`:`Öppna meny`}get printLabel(){return this.lang===`en`?`Print`:`Skriv ut`}get downloadPngLabel(){return this.lang===`en`?`Download PNG`:`Ladda ner PNG`}get downloadJpgLabel(){return this.lang===`en`?`Download JPG`:`Ladda ner JPG`}get downloadCsvLabel(){return this.lang===`en`?`Download CSV`:`Ladda ner CSV`}get enableSeriesDifferentiationLabel(){return this.lang===`en`?`Show symbols and patterns`:`Visa symboler och mönster`}get disableSeriesDifferentiationLabel(){return this.lang===`en`?`Hide symbols and patterns`:`Dölj symboler och mönster`}get enterFullscreenLabel(){return this.lang===`en`?`View fullscreen`:`Visa i helskärm`}get exitFullscreenLabel(){return this.lang===`en`?`Exit fullscreen`:`Avsluta helskärm`}_getImageAltText(){return this.imageAlt||(this.lang===`en`?`Chart image`:`Diagrambild`)}_getTitleId(){return this.title?`${this._instanceId}-title`:void 0}_getSubtitleId(){return this.subtitle?`${this._instanceId}-subtitle`:void 0}_getDescriptionId(){return this.description?`${this._instanceId}-description`:void 0}_getContentAriaLabelledBy(){let e=[this._getTitleId(),this._getSubtitleId()].filter(Boolean);return e.length?e.join(` `):void 0}_getContentAriaDescribedBy(){let e=[this._getDescriptionId()].filter(Boolean);return e.length?e.join(` `):void 0}static{this.styles=p`
21019
+ `,Pm=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;clip:rect(0, 0, 0, 0);clip-path:inset(50%);border:0;`,Fm=0,$=class extends C{constructor(...e){super(...e),this.variant=`Standard`,this.selectedChip=`Diagram`,this.title=``,this.subtitle=``,this.description=``,this.comment=``,this.source=``,this.sourceDataHref=``,this.sourceDataLinkText=``,this.footnote=``,this.lang=`sv`,this.imageHref=``,this.imageAlt=``,this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth=``,this.containerMaxWidth=``,this.contentHeight=``,this.toggleHeightMode=`stable`,this._actionsMenuOpen=!1,this._seriesDifferentiationEnabled=!1,this._isFullscreen=!1,this._tableDataRefreshFrame=0,this._seriesDifferentiationSnapshots=new WeakMap,this._diagramReflowFrame=0,this._fullscreenDiagramSizingFrame=0,this._fullscreenDiagramHeight=``,this._instanceId=`scb-viz-${++Fm}`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._onDocumentFullscreenChange=()=>{this._syncFullscreenState()},this._onWindowResize=()=>{this._isFullscreen&&this.#c()},this._onToggleFullscreenClick=async()=>{this._closeActionsMenu(),await this._toggleFullscreen()},this._onActionsMenuOpen=()=>{this._actionsMenuOpen=!0,!this._isActionsMenuPinnedForPreview()&&requestAnimationFrame(()=>{this._focusFirstMenuItem()})},this._onActionsMenuClose=()=>{let e=this._actionsMenuOpen;this._actionsMenuOpen=!1,e&&!this._isActionsMenuPinnedForPreview()&&requestAnimationFrame(()=>{this._focusMenuButton()})},this._onDocumentPointerDown=e=>{if(!this._actionsMenuOpen||this._isActionsMenuPinnedForPreview())return;let t=e.composedPath(),n=this.shadowRoot?.querySelector(`.actions-menu`);n&&t.includes(n)||this._closeActionsMenu()},this._onDocumentKeyDown=e=>{!this._actionsMenuOpen||this._isActionsMenuPinnedForPreview()||e.key===`Escape`&&(e.preventDefault(),this._closeActionsMenu(),this._focusMenuButton())},this._onPrintClick=async()=>{this._closeActionsMenu(),await this.#v()},this._onDownloadPngClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await this.#m(`png`))},this._onDownloadJpgClick=async()=>{this._canExportRaster()&&(this._closeActionsMenu(),await this.#m(`jpeg`))},this._onDownloadCsvClick=()=>{this._canExportCsv()&&(this._closeActionsMenu(),this.#y())},this._onToggleSeriesDifferentiationClick=()=>{this._seriesDifferentiationEnabled=!this._seriesDifferentiationEnabled,this._closeActionsMenu(),this.#p()}}applyViewModel(e){if(!e||typeof e!=`object`)throw Error(`scb-viz: ScbVizViewModel måste vara ett objekt.`);if(!e.metadata||typeof e.metadata!=`object`)throw Error(`scb-viz: metadata saknas i ScbVizViewModel.`);if(!e.options||typeof e.options!=`object`)throw Error(`scb-viz: options saknas i ScbVizViewModel.`);if(![`chart`,`table`,`image`].includes(e.selectedView))throw Error(`scb-viz: selectedView är ${JSON.stringify(e.selectedView)}, men måste vara chart, table eller image.`);if(e.selectedView===`table`&&!e.table)throw Error(`scb-viz: selectedView är "table", men table saknas i ScbVizViewModel.`);if(e.selectedView===`image`&&!e.image)throw Error(`scb-viz: selectedView är "image", men image saknas i ScbVizViewModel.`);let t=e.metadata,n=e.options;this.variant=e.selectedView===`image`?`Image`:e.selectedView===`table`&&!n.showViewToggle?`Table`:`Standard`,this.selectedChip=e.selectedView===`chart`?`Diagram`:e.selectedView===`table`?`Table`:null,this.lang=n.language?.trim()||`sv`,this.title=t.title||``,this.subtitle=t.subtitle||``,this.description=t.description||``,this.comment=t.comment||``,this.source=t.source||``,this.sourceDataHref=t.sourceDataHref||``,this.sourceDataLinkText=t.sourceDataLinkText||``,this.footnote=t.footnote||``,this.imageHref=e.image?.src||``,this.imageAlt=e.image?.alt||``,this.officialStatistics=n.officialStatistics,this.disableToggle=!n.showViewToggle,this.contentHeight=n.contentHeight?.trim()||``,this.contentMaxWidth=n.contentMaxWidth?.trim()||``,this.tableData=e.table?.data,this.valueFormat=e.table?.valueFormat,this.timeFormat=e.table?.timeFormat}refreshTableData(){this._readTableDataFromSlot()}get descriptionLabel(){return this.lang===`en`?`Description of the chart`:`Beskrivning av diagrammet`}get moreAboutStatsLabel(){return this.lang===`en`?`More about the statistics`:`Mer om statistiken`}get commentLabel(){return this.lang===`en`?`Comments`:`Kommentar`}get sourceLabel(){return this.lang===`en`?`Source`:`Källa`}get footnoteLabel(){return this.lang===`en`?`Footnotes`:`Fotnot`}get officialStatisticsLabel(){return this.lang===`en`?`Official statistics of Sweden`:`Sveriges officiella statistik`}get officialStatisticsTitle(){return this.lang===`en`?`Part of Official statistics of Sweden`:`Tillhör Sveriges officiella statistik`}get officialStatisticsAlt(){return this.lang===`en`?`Read more about Official statistics of Sweden`:`Läs mer om Sveriges officiella statistik`}get actionsMenuLabel(){return this.lang===`en`?`Open menu`:`Öppna meny`}get printLabel(){return this.lang===`en`?`Print`:`Skriv ut`}get downloadPngLabel(){return this.lang===`en`?`Download PNG`:`Ladda ner PNG`}get downloadJpgLabel(){return this.lang===`en`?`Download JPG`:`Ladda ner JPG`}get downloadCsvLabel(){return this.lang===`en`?`Download CSV`:`Ladda ner CSV`}get enableSeriesDifferentiationLabel(){return this.lang===`en`?`Show symbols and patterns`:`Visa symboler och mönster`}get disableSeriesDifferentiationLabel(){return this.lang===`en`?`Hide symbols and patterns`:`Dölj symboler och mönster`}get enterFullscreenLabel(){return this.lang===`en`?`View fullscreen`:`Visa i helskärm`}get exitFullscreenLabel(){return this.lang===`en`?`Exit fullscreen`:`Avsluta helskärm`}_getImageAltText(){return this.imageAlt||(this.lang===`en`?`Chart image`:`Diagrambild`)}_getTitleId(){return this.title?`${this._instanceId}-title`:void 0}_getSubtitleId(){return this.subtitle?`${this._instanceId}-subtitle`:void 0}_getDescriptionId(){return this.description?`${this._instanceId}-description`:void 0}_getContentAriaLabelledBy(){let e=[this._getTitleId(),this._getSubtitleId()].filter(Boolean);return e.length?e.join(` `):void 0}_getContentAriaDescribedBy(){let e=[this._getDescriptionId()].filter(Boolean);return e.length?e.join(` `):void 0}static{this.styles=p`
20992
21020
  :host {
20993
21021
  display: block;
20994
21022
  box-sizing: border-box;
@@ -21572,12 +21600,12 @@
21572
21600
  }
21573
21601
 
21574
21602
  /* design:bindings:scb-viz:end */
21575
- `}connectedCallback(){super.connectedCallback(),document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.addEventListener(`keydown`,this._onDocumentKeyDown),document.addEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.addEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.addEventListener(`resize`,this._onWindowResize),window.visualViewport?.addEventListener(`resize`,this._onWindowResize)}firstUpdated(e){this._scheduleTableDataRefresh(),this.#b(),this.#S(),this.#u(),this._syncChipClass(),this.#e(),this.#r(),this._syncFullscreenState(),this.#c()}updated(e){super.updated(e),(e.has(`selectedChip`)||e.has(`variant`))&&(this._syncChipClass(),this._closeActionsMenu()),e.has(`selectedChip`)&&this._dispatchSelectedChipChanged(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#b(),e.has(`containerMaxWidth`)&&this.#S(),e.has(`variant`)&&this.#e(),(e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`variant`))&&this.#u(),(e.has(`selectedChip`)||e.has(`variant`)||e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`_isFullscreen`))&&this.#r(),(e.has(`selectedChip`)||e.has(`variant`))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#p()}),(e.has(`title`)||e.has(`subtitle`)||e.has(`description`)||e.has(`comment`)||e.has(`source`)||e.has(`sourceDataHref`)||e.has(`sourceDataLinkText`)||e.has(`footnote`)||e.has(`officialStatistics`)||e.has(`selectedChip`)||e.has(`variant`)||e.has(`_isFullscreen`))&&this.#c()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.removeEventListener(`keydown`,this._onDocumentKeyDown),document.removeEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.removeEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.removeEventListener(`resize`,this._onWindowResize),window.visualViewport?.removeEventListener(`resize`,this._onWindowResize),this.#t(),this.#n(),this.#s(),cancelAnimationFrame(this._tableDataRefreshFrame),this._tableDataMutationObserver?.disconnect(),this._tableDataMutationObserver=void 0}_scheduleTableDataRefresh(){cancelAnimationFrame(this._tableDataRefreshFrame),this._tableDataRefreshFrame=requestAnimationFrame(()=>{this._tableDataRefreshFrame=0,this.isConnected&&this._readTableDataFromSlot()})}_onTableSlotChange(e){this._scheduleTableDataRefresh()}_onDiagramSlotChange(){this.#u(),this.#r(),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#p()}),this.requestUpdate()}#e(){if(this.#t(),typeof ResizeObserver>`u`)return;let e=this.shadowRoot?.querySelector(`.diagram-content`);e&&(this._diagramResizeObserver=new ResizeObserver(()=>{this.#r()}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(e))}#t(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0}#n(){this._diagramReflowFrame&&=(cancelAnimationFrame(this._diagramReflowFrame),0)}#r(){this.variant!==`Standard`||this.selectedChip!==`Diagram`||(this.#n(),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,this.#o()})}))}#i(e){let t=e?.getAttribute(`data-highcharts-chart`);if(!t)return;let n=Number.parseInt(t,10);return Number.isNaN(n)?void 0:n}#a(e){for(let t of e){let e=this.#i(t);if(e!==void 0)return e;let n=t.querySelector(`[data-highcharts-chart]`),r=this.#i(n);if(r!==void 0)return r}}#o(){if(this.variant!==`Standard`||this.selectedChip!==`Diagram`)return;let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);if(!e)return;let t=e.assignedElements({flatten:!0});if(t.length===0)return;let n=this.#a(t);if(n===void 0)return;let r=window.Highcharts?.charts?.[n];r&&(r.setSize?.(null,null,!1),r.reflow?.(),this._seriesDifferentiationEnabled&&this.#p())}_normalizeRenderableCell(e){return wm(e)}_readTableDataFromSlot(e){let t=e||this.shadowRoot?.querySelector(`slot[name="table"]`);this._observeTableDataMutations(t),this._slottedTableData=Tm(t)}_observeTableDataMutations(e){if(this._tableDataMutationObserver?.disconnect(),this._tableDataMutationObserver=void 0,!e||typeof MutationObserver>`u`)return;let t=e.assignedElements({flatten:!0});t.length&&(this._tableDataMutationObserver=new MutationObserver(()=>{this._scheduleTableDataRefresh()}),t.forEach(e=>{this._tableDataMutationObserver?.observe(e,{childList:!0,characterData:!0,subtree:!0})}))}_inferTableAlignments(e){return Em(e,e=>this._parseTableNumericValue(e))}_parseTableNumericValue(e){if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=String(e).replace(/[  \s]+/g,``).trim();if(!t)return null;t.endsWith(`%`)&&(t=t.slice(0,-1));let n=t.lastIndexOf(`,`),r=t.lastIndexOf(`.`);if(n>-1&&r>-1?t=n>r?t.replace(/\./g,``).replace(`,`,`.`):t.replace(/,/g,``):n>-1&&(t=t.replace(`,`,`.`)),!/^-?\d+(?:\.\d+)?$/.test(t))return null;let i=Number(t);return Number.isFinite(i)?i:null}_formatTableCell(e,t,n){let r=this._normalizeRenderableCell(e);if(r.html)return r;let i=r.text;if(!i)return r;if(t===0){let e=this._normalizeTimeFormat(this.timeFormat),t=this._formatCategoryTimeLabel(i,e);return t===null?r:{html:``,text:t}}if(n[t]!==`right`)return r;if(this._shouldPreserveSourceValueFormatting(this.valueFormat)){let e=this._localizeAutomaticNumericText(i);return e===null?r:{html:``,text:e}}let a=this._parseTableNumericValue(i);if(a===null)return r;let o=this._normalizeValueFormat(this.valueFormat),s=this._formatValueForDisplay(a,o,!0);return s===null?r:{html:``,text:s}}#s(){this._fullscreenDiagramSizingFrame&&=(cancelAnimationFrame(this._fullscreenDiagramSizingFrame),0)}#c(){this.#s(),this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=0,this.#l()})})}_getViewportHeight(){return Math.round(window.visualViewport?.height||window.innerHeight||document.documentElement.clientHeight||0)}_readCssLength(e){let t=Number.parseFloat(e||`0`);return Number.isFinite(t)?t:0}_getElementOuterHeight(e){let t=this.shadowRoot?.querySelector(e);if(!t)return 0;let n=getComputedStyle(t);return t.getBoundingClientRect().height+this._readCssLength(n.marginTop)+this._readCssLength(n.marginBottom)}_getFullscreenDiagramHeight(){if(!this._isFullscreen||this.variant!==`Standard`||this.selectedChip!==`Diagram`)return``;let e=this._getViewportHeight();if(!e)return``;let t=getComputedStyle(this),n=this._readCssLength(t.paddingTop)+this._readCssLength(t.paddingBottom)+this._getElementOuterHeight(`.header`)+this._getElementOuterHeight(`.actions-row`)+this._getElementOuterHeight(`.footer`)+16,r=Math.floor(e-n);return!Number.isFinite(r)||r<=0?``:`${Math.max(320,r)}px`}#l(){let e=this._getFullscreenDiagramHeight();this._fullscreenDiagramHeight!==e&&(this._fullscreenDiagramHeight=e,this.#u(),this.#r())}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||``}_getResolvedDiagramHeight(){return this._fullscreenDiagramHeight||this.contentHeight?.trim()||``}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()}_getResolvedToggleHeightMode(){return this.toggleHeightMode===`auto`?`auto`:`stable`}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||`600px`}#u(){let e=this.variant===`Standard`?this._getResolvedDiagramHeight():``,t=this.variant===`Standard`&&this._getResolvedToggleHeightMode()===`stable`?this._getResolvedStandardContentHeight():``;this.variant===`Standard`?this.style.setProperty(`--scb-viz-diagram-min-height`,e||`600px`):this.style.removeProperty(`--scb-viz-diagram-min-height`),e?(this.style.setProperty(`--scb-viz-diagram-height`,e),this.style.setProperty(`--scb-viz-diagram-overflow`,`hidden`)):(this.style.removeProperty(`--scb-viz-diagram-height`),this.style.removeProperty(`--scb-viz-diagram-overflow`)),t?this.style.setProperty(`--scb-viz-standard-content-height`,t):this.style.removeProperty(`--scb-viz-standard-content-height`)}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getResolvedTableView(e){return Dm(e,{inferAlignments:e=>this._inferTableAlignments(e),normalizeCell:e=>this._normalizeRenderableCell(e),formatCell:(e,t,n)=>this._formatTableCell(e,t,n)})}_getDiagramAssignedElements(){let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);return e?e.assignedElements({flatten:!0}):[]}_findExportableVisualElement(e){for(let t of e){if(t instanceof SVGSVGElement||t instanceof HTMLCanvasElement||t instanceof HTMLImageElement)return t;let e=t.querySelector(`svg, canvas, img`);if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e}return null}_getExportableVisualElement(){if(this.variant===`Table`)return null;if(this.variant===`Image`){let e=this.shadowRoot?.querySelector(`.image-content img`);return e instanceof HTMLImageElement?e:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}_getDefaultValueFormat(){return{type:`number`,scale:`auto`,decimals:0,decimalSeparator:this.lang===`en`?`.`:`,`}}_normalizeValueFormat(e){let t=this._getDefaultValueFormat(),n=e&&typeof e==`object`?e:{};return{type:[`number`,`currency`,`percent`].includes(String(n.type))?String(n.type):t.type,scale:[`auto`,`raw`,`thousands`,`millions`,`billions`].includes(String(n.scale))?String(n.scale):t.scale,decimals:Number.isFinite(Number(n.decimals))?Math.max(0,Math.min(20,Number(n.decimals))):t.decimals,decimalSeparator:String(n.decimalSeparator)===`.`?`.`:String(n.decimalSeparator)===`,`?`,`:t.decimalSeparator}}_shouldPreserveSourceValueFormatting(e){let t=this._normalizeValueFormat(e);return t.type===`number`&&t.scale===`auto`}_normalizeTimeFormat(e){let t={mode:`raw`,display:`raw`},n=e&&typeof e==`object`?e:{},r=[`raw`,`year`,`monthCode`,`quarterCode`,`weekCode`,`tertialCode`],i=typeof n.mode==`string`?n.mode:t.mode,a=typeof n.display==`string`?n.display:t.display;r.includes(i)||(i=t.mode);let o={raw:[`raw`],year:[`raw`,`year`],monthCode:[`raw`,`iso-month`,`short-month`,`long-month`],quarterCode:[`raw`,`quarter-compact`,`quarter-short`,`quarter-long`],weekCode:[`raw`,`week-compact`,`week-long`],tertialCode:[`raw`,`tertial-compact`,`tertial-short`,`tertial-long`]};return o[i].includes(a)||(a=o[i][0]),i===`raw`&&(a=`raw`),{mode:i,display:a}}_getShortMonthNames(){return[`jan`,`feb`,`mar`,`apr`,`maj`,`jun`,`jul`,`aug`,`sep`,`okt`,`nov`,`dec`]}_getLongMonthNames(){return[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`]}_formatCategoryTimeLabel(e,t){if(!e||t.mode===`raw`||t.display===`raw`)return null;if(t.mode===`year`){let t=/^\s*(\d{4})\s*$/.exec(e);return t?t[1]:null}if(t.mode===`monthCode`){let n=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2])-1,i=n[1],a=String(r+1).padStart(2,`0`);return t.display===`iso-month`?`${i}-${a}`:t.display===`short-month`?`${this._getShortMonthNames()[r]} ${i}`:t.display===`long-month`?`${this._getLongMonthNames()[r]} ${i}`:e}if(t.mode===`quarterCode`){let n=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(e);if(!n)return null;let r=Number(n[3]),i=n[1];return t.display===`quarter-compact`?`${i} K${r}`:t.display===`quarter-short`?`kv ${r} ${i}`:t.display===`quarter-long`?`${[`första`,`andra`,`tredje`,`fjärde`][r-1]} kvartalet ${i}`:e}if(t.mode===`weekCode`){let n=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`week-compact`?`${i} v. ${r}`:t.display===`week-long`?`vecka ${r} ${i}`:e}if(t.mode===`tertialCode`){let n=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`tertial-compact`?`${i} T${r}`:t.display===`tertial-short`?`tertial ${r} ${i}`:t.display===`tertial-long`?`${[`första`,`andra`,`tredje`][r-1]} tertialet ${i}`:e}return null}_localizeAutomaticNumericText(e){let t=this._normalizeValueFormat(this.valueFormat),n=String(e??``).trim();if(!n||n===`..`||n===`...`)return null;let r=n.replace(/[  \s]/g,``);if(!/^-?\d+(?:[.,]\d+)?$/.test(r))return null;let i=t.decimalSeparator===`.`?`.`:`,`;return i===`.`&&r.indexOf(`,`)!==-1?r.replace(`,`,`.`):i===`,`&&r.indexOf(`.`)!==-1?r.replace(`.`,`,`):r}_formatLocalizedNumber(e,t,n){let r=new Intl.NumberFormat(this.lang===`en`?`en-GB`:`sv-SE`,{minimumFractionDigits:t,maximumFractionDigits:t}),i=n===`.`||n===`,`?n:this.lang===`en`?`.`:`,`;return r.formatToParts(e).map(e=>e.type===`decimal`?i:e.value).join(``)}_formatValueForDisplay(e,t,n){if(!Number.isFinite(e))return null;let r={raw:1,thousands:1e3,millions:1e6,billions:1e9},i={raw:``,thousands:this.lang===`en`?`k`:`t`,millions:this.lang===`en`?`M`:`mn`,billions:this.lang===`en`?`B`:`md`},a=t.scale;if(a===`auto`){let t=Math.abs(e);a=t>=1e9?`billions`:t>=1e6?`millions`:t>=1e3?`thousands`:`raw`}let o=e/(r[a]||1),s=this._formatLocalizedNumber(o,t.decimals,t.decimalSeparator);t.type===`percent`?s=`${s} %`:t.type===`currency`&&(s=n?`${s} kr`:s);let c=i[a]||``;return c&&(s=`${s} ${c}`),s}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!==`diagram`)return;let e=this.#a(this._getDiagramAssignedElements());if(e!==void 0)return window.Highcharts?.charts?.[e]}_getSeriesDifferentiationGroup(e,t){let n=String(e?.type||e?.options?.type||t?.options?.chart?.type||``).trim().toLowerCase();return[`line`,`spline`,`scatter`].includes(n)?`line`:[`area`,`areaspline`].includes(n)?`area`:[`column`,`bar`].includes(n)?this._isGroupedSeriesDifferentiationChart(e,t)?`grouped-fill`:`fill`:[`pie`,`variablepie`].includes(n)?`point-fill`:null}_getSeriesDifferentiationVariantByIndex(e){return Tp(e)}_isGroupedSeriesDifferentiationChart(e,t){return Ep(e,t)}_usesGroupedPointDifferentiation(e){return Dp(e)}_getGroupedSeriesDifferentiationVariant(e,t,n){let r=Mp(e,t,n);return{...r,variantIndex:typeof r.variantIndex==`number`?r.variantIndex:n}}_applyGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach((t,n)=>{let r=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(r,e))return;let{variantIndex:i,patternKind:a}=this._getGroupedSeriesDifferentiationVariant(t,e,n),o=this._getHighchartsColorClassName(t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,i);this._getLegendSeriesDifferentiationTargets(t).fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:a}),this._setSeriesDifferentiationColorClass(e,o)}),this._ensureStyledModeSeriesPattern(e,o,a)})}_clearGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach(t=>{let n=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(n,e))return;let r=this._getLegendSeriesDifferentiationTargets(t);r.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),r.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})})}_shouldShowSeriesDifferentiationAction(){return Np({chart:this._getCurrentHighchartsChart(),getCurrentPrintableView:()=>this._getCurrentPrintableView(),getSeriesDifferentiationGroup:(e,t)=>this._getSeriesDifferentiationGroup(e,t),isHighchartsStyledMode:e=>this._isHighchartsStyledMode(e)})}_getSeriesDifferentiationSnapshotStore(e){let t=this._seriesDifferentiationSnapshots.get(e);return t||(t=new Map,this._seriesDifferentiationSnapshots.set(e,t)),t}_cloneSeriesOptionValue(e){return Array.isArray(e)?e.map(e=>this._cloneSeriesOptionValue(e)):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,this._cloneSeriesOptionValue(t)])):e}_captureSeriesDifferentiationSnapshot(e){let t=this._cloneSeriesOptionValue(e?.options?.marker),n=this._cloneSeriesOptionValue(e?.resetA11yMarkerOptions),r=this._cloneSeriesOptionValue(e?.userOptions?.marker),i=t?.states,a=e?.a11yMarkersForced===!0&&n&&Object.keys(n).length>0||i?.normal?.opacity===0&&n&&Object.keys(n).length>0?n:r;return{marker:a&&Object.keys(a).length>0?a:t&&Object.keys(t).length>0?t:{enabled:!1}}}_isHighchartsStyledMode(e){return Fp(e)}_getHighchartsSvgRoot(e){return Ip(e)}_getHighchartsColorClassName(e,t){return Lp(e,t)}_setSeriesDifferentiationMetadata(e,t){Rp(e,t)}_clearSeriesDifferentiationMetadata(e){zp(e)}_setSeriesDifferentiationColorClass(e,t){Bp(e,t)}_clearSeriesDifferentiationColorClass(e){Vp(e)}_getLegendSeriesDifferentiationTargets(e){return Hp(e)}_ensureStyledModeSeriesPattern(e,t,n){Up(e,t,n)}_applyStyledModeSeriesDifferentiation(e){let t=this._getHighchartsSvgRoot(e);if(!t)return;t.classList.add(`scb-viz-series-differentiation-enabled`);let n=xp(),r=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((t,i)=>{let a=this._getSeriesDifferentiationGroup(t,e);if(!a)return;let o=String(t?.index??i);r.has(o)||r.set(o,this._captureSeriesDifferentiationSnapshot(t));let s=a===`grouped-fill`&&this._usesGroupedPointDifferentiation(t),c=a===`grouped-fill`?this._getGroupedSeriesDifferentiationVariant(t,e,i):{variantIndex:i,...this._getSeriesDifferentiationVariantByIndex(i)},{dashStyle:l,markerSymbol:u,patternKind:d}=c,f=this._getHighchartsColorClassName(t?.graph??t?.area??t?.group,c.variantIndex),p=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graph,{role:`graph`,dashStyle:l}),a===`area`&&(this._setSeriesDifferentiationMetadata(t?.area,{role:`area`,patternKind:d}),this._setSeriesDifferentiationColorClass(t?.area,f),this._ensureStyledModeSeriesPattern(e,f,d)),a===`fill`&&(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d)),a===`grouped-fill`&&(s?t.points?.forEach((t,n)=>{let r=this._getGroupedSeriesDifferentiationVariant(t,e,n),i=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r.variantIndex);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:r.patternKind}),this._setSeriesDifferentiationColorClass(t?.graphic,i),this._ensureStyledModeSeriesPattern(e,i,r.patternKind)}):(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d))),a===`point-fill`&&t.points?.forEach((t,r)=>{let i=n[r%n.length],a=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r),o=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(t?.graphic,a),this._ensureStyledModeSeriesPattern(e,a,i),o.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(e,a)})}),(a===`line`||a===`area`)&&p.graphTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-symbol`,dashStyle:l})}),(a===`area`||a===`fill`||a===`grouped-fill`&&!s)&&p.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e,f)}),(a===`line`||a===`area`)&&t.update({marker:{enabled:!0,symbol:u}},!1)}),this._applyGroupedLegendSeriesDifferentiation(e),e.redraw(!1)}_restoreStyledModeSeriesDifferentiation(e){this._getHighchartsSvgRoot(e)?.classList.remove(`scb-viz-series-differentiation-enabled`);let t=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((n,r)=>{let i=this._getSeriesDifferentiationGroup(n,e);if(!i)return;let a=this._getLegendSeriesDifferentiationTargets(n);if(this._clearSeriesDifferentiationMetadata(n?.graph),this._clearSeriesDifferentiationMetadata(n?.area),this._clearSeriesDifferentiationColorClass(n?.area),n.points?.forEach(e=>{let t=this._getLegendSeriesDifferentiationTargets(e);this._clearSeriesDifferentiationMetadata(e?.graphic),this._clearSeriesDifferentiationColorClass(e?.graphic),t.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),t.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})}),a.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),a.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)}),i===`line`||i===`area`){let e=t.get(String(n?.index??r));n.update({marker:this._cloneSeriesOptionValue(e?.marker)},!1)}}),this._clearGroupedLegendSeriesDifferentiation(e),e.redraw(!1),this._seriesDifferentiationSnapshots.delete(e)}#d(e){this._isHighchartsStyledMode(e)&&this._applyStyledModeSeriesDifferentiation(e)}#f(e){this._isHighchartsStyledMode(e)&&this._restoreStyledModeSeriesDifferentiation(e)}#p(){let e=this._getCurrentHighchartsChart();if(e){if(this._seriesDifferentiationEnabled){this.#d(e);return}this.#f(e)}}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_getInternalComponentSize(e,t,n){let r=getComputedStyle(this).getPropertyValue(e).trim();return n.has(r)?r:t}_buildExportFileName(e){return qp({lang:this.lang,title:this.title},e)}_getFullscreenTarget(){return this}_getCurrentFullscreenElement(){return Yp()}_isFullscreenSupported(){return Xp(this._getFullscreenTarget())}_syncFullscreenState(){let e=this._getCurrentFullscreenElement()===this._getFullscreenTarget();this._isFullscreen=e,this.toggleAttribute(`data-scb-viz-fullscreen`,e),this.#c(),this.#r()}async _toggleFullscreen(){await Zp(this._getFullscreenTarget())}_renderActionsMenu(){let e=this._getCurrentPrintableView(),t=this._canExportRaster(),n=this._canExportCsv(),r=t&&(e===`diagram`||e===`image`),i=n&&e===`table`,a=this._shouldShowSeriesDifferentiationAction(),o=`${this._instanceId}-actions-menu`;return x`
21603
+ `}connectedCallback(){super.connectedCallback(),document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.addEventListener(`keydown`,this._onDocumentKeyDown),document.addEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.addEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.addEventListener(`resize`,this._onWindowResize),window.visualViewport?.addEventListener(`resize`,this._onWindowResize)}firstUpdated(e){this._scheduleTableDataRefresh(),this.#b(),this.#S(),this.#u(),this._syncChipClass(),this.#e(),this.#r(),this._syncFullscreenState(),this.#c()}updated(e){super.updated(e),(e.has(`selectedChip`)||e.has(`variant`))&&(this._syncChipClass(),this._closeActionsMenu()),e.has(`selectedChip`)&&this._dispatchSelectedChipChanged(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#b(),e.has(`containerMaxWidth`)&&this.#S(),e.has(`variant`)&&this.#e(),(e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`variant`))&&this.#u(),(e.has(`selectedChip`)||e.has(`variant`)||e.has(`contentMaxWidth`)||e.has(`contentHeight`)||e.has(`toggleHeightMode`)||e.has(`_isFullscreen`))&&this.#r(),(e.has(`selectedChip`)||e.has(`variant`))&&this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#p()}),(e.has(`title`)||e.has(`subtitle`)||e.has(`description`)||e.has(`comment`)||e.has(`source`)||e.has(`sourceDataHref`)||e.has(`sourceDataLinkText`)||e.has(`footnote`)||e.has(`officialStatistics`)||e.has(`selectedChip`)||e.has(`variant`)||e.has(`_isFullscreen`))&&this.#c()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0),document.removeEventListener(`keydown`,this._onDocumentKeyDown),document.removeEventListener(`fullscreenchange`,this._onDocumentFullscreenChange),document.removeEventListener(`webkitfullscreenchange`,this._onDocumentFullscreenChange),window.removeEventListener(`resize`,this._onWindowResize),window.visualViewport?.removeEventListener(`resize`,this._onWindowResize),this.#t(),this.#n(),this.#s(),cancelAnimationFrame(this._tableDataRefreshFrame),this._tableDataMutationObserver?.disconnect(),this._tableDataMutationObserver=void 0}_scheduleTableDataRefresh(){cancelAnimationFrame(this._tableDataRefreshFrame),this._tableDataRefreshFrame=requestAnimationFrame(()=>{this._tableDataRefreshFrame=0,this.isConnected&&this._readTableDataFromSlot()})}_onTableSlotChange(e){this._scheduleTableDataRefresh()}_onDiagramSlotChange(){this.#u(),this.#r(),this._seriesDifferentiationEnabled&&requestAnimationFrame(()=>{this.#p()}),this.requestUpdate()}#e(){if(this.#t(),typeof ResizeObserver>`u`)return;let e=this.shadowRoot?.querySelector(`.diagram-content`);e&&(this._diagramResizeObserver=new ResizeObserver(()=>{this.#r()}),this._diagramResizeObserver.observe(this),this._diagramResizeObserver.observe(e))}#t(){this._diagramResizeObserver?.disconnect(),this._diagramResizeObserver=void 0}#n(){this._diagramReflowFrame&&=(cancelAnimationFrame(this._diagramReflowFrame),0)}#r(){this.variant!==`Standard`||this.selectedChip!==`Diagram`||(this.#n(),this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=requestAnimationFrame(()=>{this._diagramReflowFrame=0,this.#o()})}))}#i(e){let t=e?.getAttribute(`data-highcharts-chart`);if(!t)return;let n=Number.parseInt(t,10);return Number.isNaN(n)?void 0:n}#a(e){for(let t of e){let e=this.#i(t);if(e!==void 0)return e;let n=t.querySelector(`[data-highcharts-chart]`),r=this.#i(n);if(r!==void 0)return r}}#o(){if(this.variant!==`Standard`||this.selectedChip!==`Diagram`)return;let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);if(!e)return;let t=e.assignedElements({flatten:!0});if(t.length===0)return;let n=this.#a(t);if(n===void 0)return;let r=window.Highcharts?.charts?.[n];r&&(r.setSize?.(null,null,!1),r.reflow?.(),this._seriesDifferentiationEnabled&&this.#p())}_normalizeRenderableCell(e){return Tm(e)}_readTableDataFromSlot(e){let t=e||this.shadowRoot?.querySelector(`slot[name="table"]`);this._observeTableDataMutations(t),this._slottedTableData=Em(t)}_observeTableDataMutations(e){if(this._tableDataMutationObserver?.disconnect(),this._tableDataMutationObserver=void 0,!e||typeof MutationObserver>`u`)return;let t=e.assignedElements({flatten:!0});t.length&&(this._tableDataMutationObserver=new MutationObserver(()=>{this._scheduleTableDataRefresh()}),t.forEach(e=>{this._tableDataMutationObserver?.observe(e,{childList:!0,characterData:!0,subtree:!0})}))}_inferTableAlignments(e){return Dm(e,e=>this._parseTableNumericValue(e))}_parseTableNumericValue(e){if(e==null)return null;if(typeof e==`number`)return Number.isFinite(e)?e:null;let t=String(e).replace(/[  \s]+/g,``).trim();if(!t)return null;t.endsWith(`%`)&&(t=t.slice(0,-1));let n=t.lastIndexOf(`,`),r=t.lastIndexOf(`.`);if(n>-1&&r>-1?t=n>r?t.replace(/\./g,``).replace(`,`,`.`):t.replace(/,/g,``):n>-1&&(t=t.replace(`,`,`.`)),!/^-?\d+(?:\.\d+)?$/.test(t))return null;let i=Number(t);return Number.isFinite(i)?i:null}_formatTableCell(e,t,n){let r=this._normalizeRenderableCell(e);if(r.html)return r;let i=r.text;if(!i)return r;if(t===0){let e=this._normalizeTimeFormat(this.timeFormat),t=this._formatCategoryTimeLabel(i,e);return t===null?r:{html:``,text:t}}if(n[t]!==`right`)return r;if(this._shouldPreserveSourceValueFormatting(this.valueFormat)){let e=this._localizeAutomaticNumericText(i);return e===null?r:{html:``,text:e}}let a=this._parseTableNumericValue(i);if(a===null)return r;let o=this._normalizeValueFormat(this.valueFormat),s=this._formatValueForDisplay(a,o,!0);return s===null?r:{html:``,text:s}}#s(){this._fullscreenDiagramSizingFrame&&=(cancelAnimationFrame(this._fullscreenDiagramSizingFrame),0)}#c(){this.#s(),this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=requestAnimationFrame(()=>{this._fullscreenDiagramSizingFrame=0,this.#l()})})}_getViewportHeight(){return Math.round(window.visualViewport?.height||window.innerHeight||document.documentElement.clientHeight||0)}_readCssLength(e){let t=Number.parseFloat(e||`0`);return Number.isFinite(t)?t:0}_getElementOuterHeight(e){let t=this.shadowRoot?.querySelector(e);if(!t)return 0;let n=getComputedStyle(t);return t.getBoundingClientRect().height+this._readCssLength(n.marginTop)+this._readCssLength(n.marginBottom)}_getFullscreenDiagramHeight(){if(!this._isFullscreen||this.variant!==`Standard`||this.selectedChip!==`Diagram`)return``;let e=this._getViewportHeight();if(!e)return``;let t=getComputedStyle(this),n=this._readCssLength(t.paddingTop)+this._readCssLength(t.paddingBottom)+this._getElementOuterHeight(`.header`)+this._getElementOuterHeight(`.actions-row`)+this._getElementOuterHeight(`.footer`)+16,r=Math.floor(e-n);return!Number.isFinite(r)||r<=0?``:`${Math.max(320,r)}px`}#l(){let e=this._getFullscreenDiagramHeight();this._fullscreenDiagramHeight!==e&&(this._fullscreenDiagramHeight=e,this.#u(),this.#r())}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||``}_getResolvedDiagramHeight(){return this._fullscreenDiagramHeight||this.contentHeight?.trim()||``}_getResolvedDiagramScrollerWidth(){return this._getResolvedContentMaxWidth()}_getResolvedToggleHeightMode(){return this.toggleHeightMode===`auto`?`auto`:`stable`}_getResolvedStandardContentHeight(){return this._getResolvedDiagramHeight()||`600px`}#u(){let e=this.variant===`Standard`?this._getResolvedDiagramHeight():``,t=this.variant===`Standard`&&this._getResolvedToggleHeightMode()===`stable`?this._getResolvedStandardContentHeight():``;this.variant===`Standard`?this.style.setProperty(`--scb-viz-diagram-min-height`,e||`600px`):this.style.removeProperty(`--scb-viz-diagram-min-height`),e?(this.style.setProperty(`--scb-viz-diagram-height`,e),this.style.setProperty(`--scb-viz-diagram-overflow`,`hidden`)):(this.style.removeProperty(`--scb-viz-diagram-height`),this.style.removeProperty(`--scb-viz-diagram-overflow`)),t?this.style.setProperty(`--scb-viz-standard-content-height`,t):this.style.removeProperty(`--scb-viz-standard-content-height`)}_getResolvedTableData(){return this.tableData??this._slottedTableData}_getResolvedTableView(e){return Om(e,{inferAlignments:e=>this._inferTableAlignments(e),normalizeCell:e=>this._normalizeRenderableCell(e),formatCell:(e,t,n)=>this._formatTableCell(e,t,n)})}_getDiagramAssignedElements(){let e=this.shadowRoot?.querySelector(`slot[name="diagram"]`);return e?e.assignedElements({flatten:!0}):[]}_findExportableVisualElement(e){for(let t of e){if(t instanceof SVGSVGElement||t instanceof HTMLCanvasElement||t instanceof HTMLImageElement)return t;let e=t.querySelector(`svg, canvas, img`);if(e instanceof SVGSVGElement||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)return e}return null}_getExportableVisualElement(){if(this.variant===`Table`)return null;if(this.variant===`Image`){let e=this.shadowRoot?.querySelector(`.image-content img`);return e instanceof HTMLImageElement?e:null}return this._findExportableVisualElement(this._getDiagramAssignedElements())}_getDefaultValueFormat(){return{type:`number`,scale:`auto`,decimals:0,decimalSeparator:this.lang===`en`?`.`:`,`}}_normalizeValueFormat(e){let t=this._getDefaultValueFormat(),n=e&&typeof e==`object`?e:{};return{type:[`number`,`currency`,`percent`].includes(String(n.type))?String(n.type):t.type,scale:[`auto`,`raw`,`thousands`,`millions`,`billions`].includes(String(n.scale))?String(n.scale):t.scale,decimals:Number.isFinite(Number(n.decimals))?Math.max(0,Math.min(20,Number(n.decimals))):t.decimals,decimalSeparator:String(n.decimalSeparator)===`.`?`.`:String(n.decimalSeparator)===`,`?`,`:t.decimalSeparator}}_shouldPreserveSourceValueFormatting(e){let t=this._normalizeValueFormat(e);return t.type===`number`&&t.scale===`auto`}_normalizeTimeFormat(e){let t={mode:`raw`,display:`raw`},n=e&&typeof e==`object`?e:{},r=[`raw`,`year`,`monthCode`,`quarterCode`,`weekCode`,`tertialCode`],i=typeof n.mode==`string`?n.mode:t.mode,a=typeof n.display==`string`?n.display:t.display;r.includes(i)||(i=t.mode);let o={raw:[`raw`],year:[`raw`,`year`],monthCode:[`raw`,`iso-month`,`short-month`,`long-month`],quarterCode:[`raw`,`quarter-compact`,`quarter-short`,`quarter-long`],weekCode:[`raw`,`week-compact`,`week-long`],tertialCode:[`raw`,`tertial-compact`,`tertial-short`,`tertial-long`]};return o[i].includes(a)||(a=o[i][0]),i===`raw`&&(a=`raw`),{mode:i,display:a}}_getShortMonthNames(){return[`jan`,`feb`,`mar`,`apr`,`maj`,`jun`,`jul`,`aug`,`sep`,`okt`,`nov`,`dec`]}_getLongMonthNames(){return[`januari`,`februari`,`mars`,`april`,`maj`,`juni`,`juli`,`augusti`,`september`,`oktober`,`november`,`december`]}_formatCategoryTimeLabel(e,t){if(!e||t.mode===`raw`||t.display===`raw`)return null;if(t.mode===`year`){let t=/^\s*(\d{4})\s*$/.exec(e);return t?t[1]:null}if(t.mode===`monthCode`){let n=/^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2])-1,i=n[1],a=String(r+1).padStart(2,`0`);return t.display===`iso-month`?`${i}-${a}`:t.display===`short-month`?`${this._getShortMonthNames()[r]} ${i}`:t.display===`long-month`?`${this._getLongMonthNames()[r]} ${i}`:e}if(t.mode===`quarterCode`){let n=/^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(e);if(!n)return null;let r=Number(n[3]),i=n[1];return t.display===`quarter-compact`?`${i} K${r}`:t.display===`quarter-short`?`kv ${r} ${i}`:t.display===`quarter-long`?`${[`första`,`andra`,`tredje`,`fjärde`][r-1]} kvartalet ${i}`:e}if(t.mode===`weekCode`){let n=/^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`week-compact`?`${i} v. ${r}`:t.display===`week-long`?`vecka ${r} ${i}`:e}if(t.mode===`tertialCode`){let n=/^\s*(\d{4})T(0?[1-3])\s*$/i.exec(e);if(!n)return null;let r=Number(n[2]),i=n[1];return t.display===`tertial-compact`?`${i} T${r}`:t.display===`tertial-short`?`tertial ${r} ${i}`:t.display===`tertial-long`?`${[`första`,`andra`,`tredje`][r-1]} tertialet ${i}`:e}return null}_localizeAutomaticNumericText(e){let t=this._normalizeValueFormat(this.valueFormat),n=String(e??``).trim();if(!n||n===`..`||n===`...`)return null;let r=n.replace(/[  \s]/g,``);if(!/^-?\d+(?:[.,]\d+)?$/.test(r))return null;let i=t.decimalSeparator===`.`?`.`:`,`;return i===`.`&&r.indexOf(`,`)!==-1?r.replace(`,`,`.`):i===`,`&&r.indexOf(`.`)!==-1?r.replace(`.`,`,`):r}_formatLocalizedNumber(e,t,n){let r=new Intl.NumberFormat(this.lang===`en`?`en-GB`:`sv-SE`,{minimumFractionDigits:t,maximumFractionDigits:t}),i=n===`.`||n===`,`?n:this.lang===`en`?`.`:`,`;return r.formatToParts(e).map(e=>e.type===`decimal`?i:e.value).join(``)}_formatValueForDisplay(e,t,n){if(!Number.isFinite(e))return null;let r={raw:1,thousands:1e3,millions:1e6,billions:1e9},i={raw:``,thousands:this.lang===`en`?`k`:`t`,millions:this.lang===`en`?`M`:`mn`,billions:this.lang===`en`?`B`:`md`},a=t.scale;if(a===`auto`){let t=Math.abs(e);a=t>=1e9?`billions`:t>=1e6?`millions`:t>=1e3?`thousands`:`raw`}let o=e/(r[a]||1),s=this._formatLocalizedNumber(o,t.decimals,t.decimalSeparator);t.type===`percent`?s=`${s} %`:t.type===`currency`&&(s=n?`${s} kr`:s);let c=i[a]||``;return c&&(s=`${s} ${c}`),s}_getCurrentHighchartsChart(){if(this._getCurrentPrintableView()!==`diagram`)return;let e=this.#a(this._getDiagramAssignedElements());if(e!==void 0)return window.Highcharts?.charts?.[e]}_getSeriesDifferentiationGroup(e,t){let n=String(e?.type||e?.options?.type||t?.options?.chart?.type||``).trim().toLowerCase();return[`line`,`spline`,`scatter`].includes(n)?`line`:[`area`,`areaspline`].includes(n)?`area`:[`column`,`bar`].includes(n)?this._isGroupedSeriesDifferentiationChart(e,t)?`grouped-fill`:`fill`:[`pie`,`variablepie`].includes(n)?`point-fill`:null}_getSeriesDifferentiationVariantByIndex(e){return Ep(e)}_isGroupedSeriesDifferentiationChart(e,t){return Dp(e,t)}_usesGroupedPointDifferentiation(e){return Op(e)}_getGroupedSeriesDifferentiationVariant(e,t,n){let r=Np(e,t,n);return{...r,variantIndex:typeof r.variantIndex==`number`?r.variantIndex:n}}_applyGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach((t,n)=>{let r=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(r,e))return;let{variantIndex:i,patternKind:a}=this._getGroupedSeriesDifferentiationVariant(t,e,n),o=this._getHighchartsColorClassName(t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,i);this._getLegendSeriesDifferentiationTargets(t).fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:a}),this._setSeriesDifferentiationColorClass(e,o)}),this._ensureStyledModeSeriesPattern(e,o,a)})}_clearGroupedLegendSeriesDifferentiation(e){(Array.isArray(e?.legend?.allItems)?e.legend.allItems:[]).forEach(t=>{let n=t&&t.series?t.series:t;if(!this._isGroupedSeriesDifferentiationChart(n,e))return;let r=this._getLegendSeriesDifferentiationTargets(t);r.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),r.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})})}_shouldShowSeriesDifferentiationAction(){return Pp({chart:this._getCurrentHighchartsChart(),getCurrentPrintableView:()=>this._getCurrentPrintableView(),getSeriesDifferentiationGroup:(e,t)=>this._getSeriesDifferentiationGroup(e,t),isHighchartsStyledMode:e=>this._isHighchartsStyledMode(e)})}_getSeriesDifferentiationSnapshotStore(e){let t=this._seriesDifferentiationSnapshots.get(e);return t||(t=new Map,this._seriesDifferentiationSnapshots.set(e,t)),t}_cloneSeriesOptionValue(e){return Array.isArray(e)?e.map(e=>this._cloneSeriesOptionValue(e)):e&&typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,this._cloneSeriesOptionValue(t)])):e}_captureSeriesDifferentiationSnapshot(e){let t=this._cloneSeriesOptionValue(e?.options?.marker),n=this._cloneSeriesOptionValue(e?.resetA11yMarkerOptions),r=this._cloneSeriesOptionValue(e?.userOptions?.marker),i=t?.states,a=e?.a11yMarkersForced===!0&&n&&Object.keys(n).length>0||i?.normal?.opacity===0&&n&&Object.keys(n).length>0?n:r;return{marker:a&&Object.keys(a).length>0?a:t&&Object.keys(t).length>0?t:{enabled:!1}}}_isHighchartsStyledMode(e){return Ip(e)}_getHighchartsSvgRoot(e){return Lp(e)}_getHighchartsColorClassName(e,t){return Rp(e,t)}_setSeriesDifferentiationMetadata(e,t){zp(e,t)}_clearSeriesDifferentiationMetadata(e){Bp(e)}_setSeriesDifferentiationColorClass(e,t){Vp(e,t)}_clearSeriesDifferentiationColorClass(e){Hp(e)}_getLegendSeriesDifferentiationTargets(e){return Up(e)}_ensureStyledModeSeriesPattern(e,t,n){Wp(e,t,n)}_applyStyledModeSeriesDifferentiation(e){let t=this._getHighchartsSvgRoot(e);if(!t)return;t.classList.add(`scb-viz-series-differentiation-enabled`);let n=Sp(),r=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((t,i)=>{let a=this._getSeriesDifferentiationGroup(t,e);if(!a)return;let o=String(t?.index??i);r.has(o)||r.set(o,this._captureSeriesDifferentiationSnapshot(t));let s=a===`grouped-fill`&&this._usesGroupedPointDifferentiation(t),c=a===`grouped-fill`?this._getGroupedSeriesDifferentiationVariant(t,e,i):{variantIndex:i,...this._getSeriesDifferentiationVariantByIndex(i)},{dashStyle:l,markerSymbol:u,patternKind:d}=c,f=this._getHighchartsColorClassName(t?.graph??t?.area??t?.group,c.variantIndex),p=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graph,{role:`graph`,dashStyle:l}),a===`area`&&(this._setSeriesDifferentiationMetadata(t?.area,{role:`area`,patternKind:d}),this._setSeriesDifferentiationColorClass(t?.area,f),this._ensureStyledModeSeriesPattern(e,f,d)),a===`fill`&&(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d)),a===`grouped-fill`&&(s?t.points?.forEach((t,n)=>{let r=this._getGroupedSeriesDifferentiationVariant(t,e,n),i=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r.variantIndex);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:r.patternKind}),this._setSeriesDifferentiationColorClass(t?.graphic,i),this._ensureStyledModeSeriesPattern(e,i,r.patternKind)}):(t.points?.forEach(e=>{this._setSeriesDifferentiationMetadata(e?.graphic,{role:`fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e?.graphic,f)}),this._ensureStyledModeSeriesPattern(e,f,d))),a===`point-fill`&&t.points?.forEach((t,r)=>{let i=n[r%n.length],a=this._getHighchartsColorClassName(t?.graphic??t?.legendSymbol??t?.legendItem?.symbol??t?.legendItem?.group,r),o=this._getLegendSeriesDifferentiationTargets(t);this._setSeriesDifferentiationMetadata(t?.graphic,{role:`fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(t?.graphic,a),this._ensureStyledModeSeriesPattern(e,a,i),o.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:i}),this._setSeriesDifferentiationColorClass(e,a)})}),(a===`line`||a===`area`)&&p.graphTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-symbol`,dashStyle:l})}),(a===`area`||a===`fill`||a===`grouped-fill`&&!s)&&p.fillTargets.forEach(e=>{this._setSeriesDifferentiationMetadata(e,{role:`legend-fill`,patternKind:d}),this._setSeriesDifferentiationColorClass(e,f)}),(a===`line`||a===`area`)&&t.update({marker:{enabled:!0,symbol:u}},!1)}),this._applyGroupedLegendSeriesDifferentiation(e),e.redraw(!1)}_restoreStyledModeSeriesDifferentiation(e){this._getHighchartsSvgRoot(e)?.classList.remove(`scb-viz-series-differentiation-enabled`);let t=this._getSeriesDifferentiationSnapshotStore(e);e.series?.forEach((n,r)=>{let i=this._getSeriesDifferentiationGroup(n,e);if(!i)return;let a=this._getLegendSeriesDifferentiationTargets(n);if(this._clearSeriesDifferentiationMetadata(n?.graph),this._clearSeriesDifferentiationMetadata(n?.area),this._clearSeriesDifferentiationColorClass(n?.area),n.points?.forEach(e=>{let t=this._getLegendSeriesDifferentiationTargets(e);this._clearSeriesDifferentiationMetadata(e?.graphic),this._clearSeriesDifferentiationColorClass(e?.graphic),t.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),t.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)})}),a.graphTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e)}),a.fillTargets.forEach(e=>{this._clearSeriesDifferentiationMetadata(e),this._clearSeriesDifferentiationColorClass(e)}),i===`line`||i===`area`){let e=t.get(String(n?.index??r));n.update({marker:this._cloneSeriesOptionValue(e?.marker)},!1)}}),this._clearGroupedLegendSeriesDifferentiation(e),e.redraw(!1),this._seriesDifferentiationSnapshots.delete(e)}#d(e){this._isHighchartsStyledMode(e)&&this._applyStyledModeSeriesDifferentiation(e)}#f(e){this._isHighchartsStyledMode(e)&&this._restoreStyledModeSeriesDifferentiation(e)}#p(){let e=this._getCurrentHighchartsChart();if(e){if(this._seriesDifferentiationEnabled){this.#d(e);return}this.#f(e)}}_canExportRaster(){return this._getExportableVisualElement()!==null}_canExportCsv(){return!!this._getResolvedTableData()?.rows?.length}_getInternalComponentSize(e,t,n){let r=getComputedStyle(this).getPropertyValue(e).trim();return n.has(r)?r:t}_buildExportFileName(e){return Jp({lang:this.lang,title:this.title},e)}_getFullscreenTarget(){return this}_getCurrentFullscreenElement(){return Xp()}_isFullscreenSupported(){return Zp(this._getFullscreenTarget())}_syncFullscreenState(){let e=this._getCurrentFullscreenElement()===this._getFullscreenTarget();this._isFullscreen=e,this.toggleAttribute(`data-scb-viz-fullscreen`,e),this.#c(),this.#r()}async _toggleFullscreen(){await Qp(this._getFullscreenTarget())}_renderActionsMenu(){let e=this._getCurrentPrintableView(),t=this._canExportRaster(),n=this._canExportCsv(),r=t&&(e===`diagram`||e===`image`),i=n&&e===`table`,a=this._shouldShowSeriesDifferentiationAction(),o=`${this._instanceId}-actions-menu`;return x`
21576
21604
  <div class="actions-menu">
21577
21605
  <scb-icon-button
21578
21606
  icon="more_vert"
21579
21607
  variant="outlined"
21580
- size=${this._getInternalComponentSize(`--scb-viz-design-actions-icon-button-size-medium`,`small`,Am)}
21608
+ size=${this._getInternalComponentSize(`--scb-viz-design-actions-icon-button-size-medium`,`small`,jm)}
21581
21609
  label=${this.actionsMenuLabel}
21582
21610
  title=${this.actionsMenuLabel}
21583
21611
  aria-label=${this.actionsMenuLabel}
@@ -21587,7 +21615,7 @@
21587
21615
  ></scb-icon-button>
21588
21616
  <scb-options-menu
21589
21617
  id=${o}
21590
- size=${this._getInternalComponentSize(`--scb-viz-design-options-menu-size-medium`,`small`,jm)}
21618
+ size=${this._getInternalComponentSize(`--scb-viz-design-options-menu-size-medium`,`small`,Mm)}
21591
21619
  ?open=${this._actionsMenuOpen}
21592
21620
  aria-label=${this.actionsMenuLabel}
21593
21621
  @open=${this._onActionsMenuOpen}
@@ -21644,7 +21672,7 @@
21644
21672
  ${this.variant===`Standard`&&!this.disableToggle?x`
21645
21673
  <div class="flipp-wrapper">
21646
21674
  <scb-segmented-button
21647
- size=${this._getInternalComponentSize(`--scb-viz-design-segmented-button-size-medium`,`small`,km)}
21675
+ size=${this._getInternalComponentSize(`--scb-viz-design-segmented-button-size-medium`,`small`,Am)}
21648
21676
  .value=${this.selectedChip||``}
21649
21677
  @change=${e=>this._onSegmentedChange(e)}
21650
21678
  >
@@ -21675,9 +21703,9 @@
21675
21703
  </div>
21676
21704
  `:t}_renderTable(){let e=this._getResolvedTableData();if(!e||!e.rows||e.rows.length===0)return null;let t=this._getResolvedTableView(e),n=[this.title,this.subtitle].map(e=>typeof e==`string`?e.trim():``).filter(Boolean).join(`. `),r=({html:e,text:t})=>[e,t],i=JSON.stringify([t.headers.map(r),t.rows.map(e=>e.map(r)),t.alignments,t.rowHeaderRows]);return x`
21677
21705
  <scb-table part="table" column-width-mode="header">
21678
- ${pp([n,this.lang,i],()=>this._createTable(t,n))}
21706
+ ${mp([n,this.lang,i],()=>this._createTable(t,n))}
21679
21707
  </scb-table>
21680
- `}_createTable({alignments:e,headers:t,rows:n,rowHeaderRows:r},i){let a=this.ownerDocument.createElement(`table`);if(a.className=`scb-viz-table`,i){let e=a.createCaption();e.className=`visually-hidden`,e.textContent=i}if(t.length){let n=a.createTHead().insertRow();t.forEach((t,r)=>{let i=this._createTableCell(t,e[r],`col`);if(!t.html&&!t.text.trim()){let e=this.ownerDocument.createElement(`span`);e.className=`visually-hidden`,e.style.cssText=Nm,e.textContent=this._getEmptyTableHeaderLabel(r),i.replaceChildren(e)}n.append(i)})}let o=a.createTBody();return n.forEach((t,n)=>{let i=o.insertRow();t.forEach((t,a)=>{let o=a===0&&r[n]===!0?`row`:void 0;i.append(this._createTableCell(t,e[a],o))})}),a}_createTableCell(e,t,n){let r=this.ownerDocument.createElement(n?`th`:`td`);return r.className=t===`right`?`align-right`:`align-left`,n&&(r.scope=n),e.html&&e.fragment?r.append(e.fragment):r.textContent=e.text,r}_getEmptyTableHeaderLabel(e){return e===0?this.lang===`en`?`Row header`:`Radrubrik`:this.lang===`en`?`Column ${e+1}`:`Kolumn ${e+1}`}_renderRichText(e){let t=typeof e==`string`?e.replace(/\r\n?/g,`
21708
+ `}_createTable({alignments:e,headers:t,rows:n,rowHeaderRows:r},i){let a=this.ownerDocument.createElement(`table`);if(a.className=`scb-viz-table`,i){let e=a.createCaption();e.className=`visually-hidden`,e.textContent=i}if(t.length){let n=a.createTHead().insertRow();t.forEach((t,r)=>{let i=this._createTableCell(t,e[r],`col`);if(!t.html&&!t.text.trim()){let e=this.ownerDocument.createElement(`span`);e.className=`visually-hidden`,e.style.cssText=Pm,e.textContent=this._getEmptyTableHeaderLabel(r),i.replaceChildren(e)}n.append(i)})}let o=a.createTBody();return n.forEach((t,n)=>{let i=o.insertRow();t.forEach((t,a)=>{let o=a===0&&r[n]===!0?`row`:void 0;i.append(this._createTableCell(t,e[a],o))})}),a}_createTableCell(e,t,n){let r=this.ownerDocument.createElement(n?`th`:`td`);return r.className=t===`right`?`align-right`:`align-left`,n&&(r.scope=n),e.html&&e.fragment?r.append(e.fragment):r.textContent=e.text,r}_getEmptyTableHeaderLabel(e){return e===0?this.lang===`en`?`Row header`:`Radrubrik`:this.lang===`en`?`Column ${e+1}`:`Kolumn ${e+1}`}_renderRichText(e){let t=typeof e==`string`?e.replace(/\r\n?/g,`
21681
21709
  `):``,n=t.split(/\n{2,}/).filter(e=>e!==``);return n.length?x`${n.map(e=>x`<p class="body-text-paragraph">${e.split(`
21682
21710
  `).map((e,t)=>x`${t>0?x`<br />`:``}${e}`)}</p>`)}`:t}_escapeHtml(e){return String(e??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}_renderRichTextHtml(e){let t=typeof e==`string`?e.replace(/\r\n?/g,`
21683
21711
  `):``,n=t.split(/\n{2,}/).filter(e=>e!==``);return n.length?n.map(e=>`<p class="body-text-paragraph">${e.split(`
@@ -21719,7 +21747,7 @@
21719
21747
  aria-label="${this.officialStatisticsAlt}"
21720
21748
  >
21721
21749
  <span class="sos-logotype-small" aria-hidden="true">
21722
- ${gp(Mm)}
21750
+ ${_p(Nm)}
21723
21751
  </span>
21724
21752
  </a>
21725
21753
  `:``}
@@ -21727,7 +21755,7 @@
21727
21755
  `}_renderMoreAboutStatsScreen(e){return this._hasMoreAboutStats(e)?x`
21728
21756
  <div class="footer-statistics-screen">
21729
21757
  <scb-divider></scb-divider>
21730
- <scb-accordion size=${this._getInternalComponentSize(`--scb-viz-design-accordion-component-size-medium`,`large`,jm)}>
21758
+ <scb-accordion size=${this._getInternalComponentSize(`--scb-viz-design-accordion-component-size-medium`,`large`,Mm)}>
21731
21759
  <scb-accordion-item title="${this.moreAboutStatsLabel}">
21732
21760
  ${this._renderMoreAboutStatsContent(e)}
21733
21761
  </scb-accordion-item>
@@ -21841,7 +21869,7 @@
21841
21869
  ></slot>
21842
21870
  <slot></slot>
21843
21871
  </div>
21844
- `}}}_syncChipClass(){let e=this.variant===`Standard`;this.classList.toggle(`chip-diagram`,e&&this.selectedChip===`Diagram`),this.classList.toggle(`chip-table`,e&&this.selectedChip===`Table`)}_dispatchSelectedChipChanged(){let e={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent(`selected-chip-changed`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`selectedchipchanged`,{detail:e,bubbles:!0,composed:!0}))}_onSegmentedChange(e){let t=e.detail?.value;this.selectedChip===t?this.selectedChip=null:this.selectedChip=t}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){(this.shadowRoot?.querySelector(`.actions-menu scb-icon-button`))?.focus()}_isActionsMenuPinnedForPreview(){return this.shadowRoot?.querySelector(`.actions-menu scb-options-menu`)?.inSb===!0}_focusFirstMenuItem(){let e=this.shadowRoot?.querySelector(`scb-options-menu-item`),t=()=>{e?.shadowRoot?.querySelector(`li`)?.focus()};e?.updateComplete?e.updateComplete.then(t):t()}_onActionsMenuItemKeyDown(e,t){e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),t())}_getExportSurfaceTarget(){return this.shadowRoot?.querySelector(`.viz-container`)??this}async#m(e){let t=this._getExportableVisualElement();if(!t)return;let n=await tm(t,this._getExportSurfaceTarget(),e);n&&rm(n,this._buildExportFileName(e===`jpeg`?`jpg`:`png`))}_getCurrentPrintableView(){return this.variant===`Table`?`table`:this.variant===`Image`?`image`:this.selectedChip===`Table`?`table`:`diagram`}#h(e){return mm(this._getResolvedTableView(e),e=>this._escapeHtml(e),{getEmptyHeaderLabel:e=>this._getEmptyTableHeaderLabel(e)})}#g(){return hm({comment:this.comment,commentLabel:this.commentLabel,description:this.description,descriptionLabel:this.descriptionLabel,escapeHtml:e=>this._escapeHtml(e),footnote:this.footnote,footnoteLabel:this.footnoteLabel,moreAboutStatsLabel:this.moreAboutStatsLabel,officialStatistics:this.officialStatistics,renderRichTextHtml:e=>this._renderRichTextHtml(e),sosLogotypeSvg:Mm,source:this.source,sourceLabel:this.sourceLabel,sourceDataLink:this._getSourceDataLink()})}#_(e){return gm({contentHtml:e,escapeHtml:e=>this._escapeHtml(e),footerHtml:this.#g(),lang:this.lang,subtitle:this.subtitle,title:this.title})}async#v(){await $p(this,async()=>{let e=this._getCurrentPrintableView(),t=``;if(e===`table`){let e=this._getResolvedTableData();if(!e?.rows?.length)return;t=this.#h(e)}else if(e===`image`){let e=this.shadowRoot?.querySelector(`.image-content img`),n=e?.currentSrc||e?.src||this.imageHref;if(!n)return;t=`<img class="viz-image" src="${this._escapeHtml(n)}" alt="${this._escapeHtml(this._getImageAltText())}">`}else{let e=this._getExportableVisualElement();if(!e)return;let n=await nm(e,this._getExportSurfaceTarget(),`png`);if(!n)return;t=`<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`}await Qp(this.#_(t))})}#y(){let e=this._getResolvedTableData();e?.rows?.length&&rm(em(Om(e,e=>this._normalizeRenderableCell(e)),this.lang),this._buildExportFileName(`csv`))}#b(){let e=this.#x(this.spacing),t=this.#x(this.spacingTop)??e,n=this.#x(this.spacingBottom)??e,r=this.#x(this.spacingLeft),i=this.#x(this.spacingRight);t?this.style.setProperty(`--scb-viz-spacing-block-start`,t):this.style.removeProperty(`--scb-viz-spacing-block-start`),n?this.style.setProperty(`--scb-viz-spacing-block-end`,n):this.style.removeProperty(`--scb-viz-spacing-block-end`),r?this.style.setProperty(`--scb-viz-spacing-inline-start`,r):this.style.removeProperty(`--scb-viz-spacing-inline-start`),i?this.style.setProperty(`--scb-viz-spacing-inline-end`,i):this.style.removeProperty(`--scb-viz-spacing-inline-end`)}#x(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#S(){let e=this.containerMaxWidth?.trim();e?this.style.setProperty(`--scb-viz-container-max-width`,e):this.style.removeProperty(`--scb-viz-container-max-width`)}};N([_({type:String,reflect:!0})],$.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`selected-chip`})],$.prototype,`selectedChip`,void 0),N([_({type:String,reflect:!0})],$.prototype,`title`,void 0),N([_({type:String,reflect:!0})],$.prototype,`subtitle`,void 0),N([_({type:String,reflect:!0})],$.prototype,`description`,void 0),N([_({type:String,reflect:!0})],$.prototype,`comment`,void 0),N([_({type:String,reflect:!0})],$.prototype,`source`,void 0),N([_({type:String,attribute:`source-data-href`})],$.prototype,`sourceDataHref`,void 0),N([_({type:String,attribute:`source-data-link-text`})],$.prototype,`sourceDataLinkText`,void 0),N([_({type:String,reflect:!0})],$.prototype,`footnote`,void 0),N([_({type:String,reflect:!0,attribute:`lang`})],$.prototype,`lang`,void 0),N([_({type:String,reflect:!0,attribute:`image-href`})],$.prototype,`imageHref`,void 0),N([_({type:String,reflect:!0,attribute:`image-alt`})],$.prototype,`imageAlt`,void 0),N([_({type:Boolean,reflect:!0,attribute:`official-statistics`})],$.prototype,`officialStatistics`,void 0),N([_({type:Boolean,reflect:!0,attribute:`disable-toggle`})],$.prototype,`disableToggle`,void 0),N([_({type:String,attribute:`content-max-width`})],$.prototype,`contentMaxWidth`,void 0),N([_({type:String,attribute:`container-max-width`})],$.prototype,`containerMaxWidth`,void 0),N([_({type:String,attribute:`content-height`})],$.prototype,`contentHeight`,void 0),N([_({type:String,reflect:!0,attribute:`toggle-height-mode`})],$.prototype,`toggleHeightMode`,void 0),N([_({attribute:!1})],$.prototype,`tableData`,void 0),N([_({attribute:!1})],$.prototype,`valueFormat`,void 0),N([_({attribute:!1})],$.prototype,`timeFormat`,void 0),N([v()],$.prototype,`_slottedTableData`,void 0),N([v()],$.prototype,`_actionsMenuOpen`,void 0),N([v()],$.prototype,`_seriesDifferentiationEnabled`,void 0),N([v()],$.prototype,`_isFullscreen`,void 0),N([_({type:String,reflect:!0})],$.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],$.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],$.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],$.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],$.prototype,`spacingRight`,void 0),$=N([a(`scb-viz`)],$),_c(),Mc(),Fc(),Wc(),yl(),Ru(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),ff(),vd(),Sd(),bd(),Tu(),Kc(),Nl(),_c(),Mc(),Fc(),Wc(),yl(),Ru(),gd(),wd(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),hf(),ff(),vd(),Sd(),bd(),Tu(),Cf(),Kc(),Nl();function Fm(e){if(!e.querySelector(`a, sup`))return e.textContent?.trim()??``;let t=e=>{if(e.nodeType===Node.TEXT_NODE)return[e.textContent??``];if(!(e instanceof Element))return[];let n=Array.from(e.childNodes).flatMap(t);return e.localName===`sup`?[{tag:`sup`,children:n}]:e.localName===`a`?[{tag:`a`,children:n,href:e.getAttribute(`href`),title:e.getAttribute(`title`)||void 0,ariaLabel:e.getAttribute(`aria-label`)||void 0}]:n};return Array.from(e.childNodes).flatMap(t)}var Im=e=>e.scope===`row`||e.classList.contains(`forspalt`)||e.tagName===`TH`&&!e.scope;function Lm(e,t=1/0){let n=e.tHead?Array.from(e.tHead.rows):[];if(!e.tHead)for(let t of Array.from(e.rows)){if(!t.cells.length||!Array.from(t.cells).every(e=>e.tagName===`TH`))break;n.push(t)}if(!n.length)return;let r=new Set(n),i=Array.from(e.rows).filter(e=>!r.has(e));if(!i.length||i.length>t)return;let a=i.reduce((e,t)=>{let n=Array.from(t.cells).findIndex(e=>!Im(e));return Math.max(e,n<0?t.cells.length:n)},1),o=i[0].cells.length-a;if((i.length+n.length+1)*o>t)return;let s=new Set(Array.from(e.querySelectorAll(`[id]`),e=>e.id));if(e.querySelector(`table, button, input, select, textarea, [tabindex], [contenteditable], [role]`)||Array.from(e.querySelectorAll(`*`)).some(e=>e.localName.includes(`-`))||Array.from(e.querySelectorAll(`a`)).some(e=>{let t=e.getAttribute(`href`)||``,n;try{n=decodeURIComponent(t.slice(1))}catch{return!0}return!e.closest(`th, td`)||s.has(n)||!t.startsWith(`#`)||e.getAttribute(`href`)===`#`||e.hasAttribute(`target`)||e.hasAttribute(`download`)||e.getAttributeNames().some(e=>e.startsWith(`on`))||e.hasAttribute(`aria-labelledby`)||e.hasAttribute(`aria-describedby`)})||e.getAttribute(`role`)&&e.getAttribute(`role`)!==`table`)return;let c=n.map(()=>[]),l=n.map((e,t)=>{let r=0;return Array.from(e.cells).map(e=>{for(;c[t][r];)r++;let i=e.cloneNode(!0);i.querySelectorAll(`[hidden], .visually-hidden, .sr-only`).forEach(e=>e.remove());let a=e.textContent?.trim()??``,o=!!a&&!i.textContent?.trim(),s={text:a,content:Fm(e),visuallyHidden:o,ariaLabel:e.getAttribute(`aria-label`)||(o?a:void 0),column:r,colSpan:e.colSpan,rowSpan:e.rowSpan||n.length-t},l=r+s.colSpan,u=t+s.rowSpan;if(l>256||u>c.length)throw RangeError(`header-grid`);for(let e=t;e<u;e++)for(let t=r;t<l;t++){if(c[e][t])throw RangeError(`header-grid`);c[e][t]=s}return r=l,s})}),u=c[0].length;if(u<2||c.some(e=>e.length!==u||Array.from({length:u},(t,n)=>!e[n]).some(Boolean))||a>=u||i.some(e=>e.cells.length!==u||Array.from(e.cells).some(e=>e.colSpan!==1||e.rowSpan!==1)||!Array.from(e.cells).slice(0,a).some(e=>e.textContent?.trim())||Array.from(e.cells).slice(a).some(e=>e.tagName===`TH`||Im(e))))return;if(i.some(e=>Array.from(e.cells).slice(a).every(e=>!e.textContent?.trim()))){let e=i.map(e=>JSON.stringify(Array.from(e.cells).slice(0,a).map(e=>e.textContent?.trim())));if(new Set(e).size!==e.length)return}let d=Array.from({length:u-a},(e,t)=>[...new Set(c.map(e=>e[t+a]))].filter(e=>e.text));if(!d.some(e=>!e.length))return{label:e.getAttribute(`aria-label`)||e.caption?.textContent?.trim()||``,headings:l,columns:d,stubCount:a,rows:i.map(e=>({stubs:Array.from(e.cells).slice(0,a).map(Fm),values:Array.from(e.cells).slice(a).map(Fm)}))}}w(),b(),pl(),P();var Rm=200,zm=new WeakSet,Bm=p`
21872
+ `}}}_syncChipClass(){let e=this.variant===`Standard`;this.classList.toggle(`chip-diagram`,e&&this.selectedChip===`Diagram`),this.classList.toggle(`chip-table`,e&&this.selectedChip===`Table`)}_dispatchSelectedChipChanged(){let e={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent(`selected-chip-changed`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`selectedchipchanged`,{detail:e,bubbles:!0,composed:!0}))}_onSegmentedChange(e){let t=e.detail?.value;this.selectedChip===t?this.selectedChip=null:this.selectedChip=t}_closeActionsMenu(){this._actionsMenuOpen=!1}_focusMenuButton(){(this.shadowRoot?.querySelector(`.actions-menu scb-icon-button`))?.focus()}_isActionsMenuPinnedForPreview(){return this.shadowRoot?.querySelector(`.actions-menu scb-options-menu`)?.inSb===!0}_focusFirstMenuItem(){let e=this.shadowRoot?.querySelector(`scb-options-menu-item`),t=()=>{e?.shadowRoot?.querySelector(`li`)?.focus()};e?.updateComplete?e.updateComplete.then(t):t()}_onActionsMenuItemKeyDown(e,t){e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),t())}_getExportSurfaceTarget(){return this.shadowRoot?.querySelector(`.viz-container`)??this}async#m(e){let t=this._getExportableVisualElement();if(!t)return;let n=await nm(t,this._getExportSurfaceTarget(),e);n&&im(n,this._buildExportFileName(e===`jpeg`?`jpg`:`png`))}_getCurrentPrintableView(){return this.variant===`Table`?`table`:this.variant===`Image`?`image`:this.selectedChip===`Table`?`table`:`diagram`}#h(e){return hm(this._getResolvedTableView(e),e=>this._escapeHtml(e),{getEmptyHeaderLabel:e=>this._getEmptyTableHeaderLabel(e)})}#g(){return gm({comment:this.comment,commentLabel:this.commentLabel,description:this.description,descriptionLabel:this.descriptionLabel,escapeHtml:e=>this._escapeHtml(e),footnote:this.footnote,footnoteLabel:this.footnoteLabel,moreAboutStatsLabel:this.moreAboutStatsLabel,officialStatistics:this.officialStatistics,renderRichTextHtml:e=>this._renderRichTextHtml(e),sosLogotypeSvg:Nm,source:this.source,sourceLabel:this.sourceLabel,sourceDataLink:this._getSourceDataLink()})}#_(e){return _m({contentHtml:e,escapeHtml:e=>this._escapeHtml(e),footerHtml:this.#g(),lang:this.lang,subtitle:this.subtitle,title:this.title})}async#v(){await em(this,async()=>{let e=this._getCurrentPrintableView(),t=``;if(e===`table`){let e=this._getResolvedTableData();if(!e?.rows?.length)return;t=this.#h(e)}else if(e===`image`){let e=this.shadowRoot?.querySelector(`.image-content img`),n=e?.currentSrc||e?.src||this.imageHref;if(!n)return;t=`<img class="viz-image" src="${this._escapeHtml(n)}" alt="${this._escapeHtml(this._getImageAltText())}">`}else{let e=this._getExportableVisualElement();if(!e)return;let n=await rm(e,this._getExportSurfaceTarget(),`png`);if(!n)return;t=`<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`}await $p(this.#_(t))})}#y(){let e=this._getResolvedTableData();e?.rows?.length&&im(tm(km(e,e=>this._normalizeRenderableCell(e)),this.lang),this._buildExportFileName(`csv`))}#b(){let e=this.#x(this.spacing),t=this.#x(this.spacingTop)??e,n=this.#x(this.spacingBottom)??e,r=this.#x(this.spacingLeft),i=this.#x(this.spacingRight);t?this.style.setProperty(`--scb-viz-spacing-block-start`,t):this.style.removeProperty(`--scb-viz-spacing-block-start`),n?this.style.setProperty(`--scb-viz-spacing-block-end`,n):this.style.removeProperty(`--scb-viz-spacing-block-end`),r?this.style.setProperty(`--scb-viz-spacing-inline-start`,r):this.style.removeProperty(`--scb-viz-spacing-inline-start`),i?this.style.setProperty(`--scb-viz-spacing-inline-end`,i):this.style.removeProperty(`--scb-viz-spacing-inline-end`)}#x(e){if(!e)return;let t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}#S(){let e=this.containerMaxWidth?.trim();e?this.style.setProperty(`--scb-viz-container-max-width`,e):this.style.removeProperty(`--scb-viz-container-max-width`)}};N([_({type:String,reflect:!0})],$.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`selected-chip`})],$.prototype,`selectedChip`,void 0),N([_({type:String,reflect:!0})],$.prototype,`title`,void 0),N([_({type:String,reflect:!0})],$.prototype,`subtitle`,void 0),N([_({type:String,reflect:!0})],$.prototype,`description`,void 0),N([_({type:String,reflect:!0})],$.prototype,`comment`,void 0),N([_({type:String,reflect:!0})],$.prototype,`source`,void 0),N([_({type:String,attribute:`source-data-href`})],$.prototype,`sourceDataHref`,void 0),N([_({type:String,attribute:`source-data-link-text`})],$.prototype,`sourceDataLinkText`,void 0),N([_({type:String,reflect:!0})],$.prototype,`footnote`,void 0),N([_({type:String,reflect:!0,attribute:`lang`})],$.prototype,`lang`,void 0),N([_({type:String,reflect:!0,attribute:`image-href`})],$.prototype,`imageHref`,void 0),N([_({type:String,reflect:!0,attribute:`image-alt`})],$.prototype,`imageAlt`,void 0),N([_({type:Boolean,reflect:!0,attribute:`official-statistics`})],$.prototype,`officialStatistics`,void 0),N([_({type:Boolean,reflect:!0,attribute:`disable-toggle`})],$.prototype,`disableToggle`,void 0),N([_({type:String,attribute:`content-max-width`})],$.prototype,`contentMaxWidth`,void 0),N([_({type:String,attribute:`container-max-width`})],$.prototype,`containerMaxWidth`,void 0),N([_({type:String,attribute:`content-height`})],$.prototype,`contentHeight`,void 0),N([_({type:String,reflect:!0,attribute:`toggle-height-mode`})],$.prototype,`toggleHeightMode`,void 0),N([_({attribute:!1})],$.prototype,`tableData`,void 0),N([_({attribute:!1})],$.prototype,`valueFormat`,void 0),N([_({attribute:!1})],$.prototype,`timeFormat`,void 0),N([v()],$.prototype,`_slottedTableData`,void 0),N([v()],$.prototype,`_actionsMenuOpen`,void 0),N([v()],$.prototype,`_seriesDifferentiationEnabled`,void 0),N([v()],$.prototype,`_isFullscreen`,void 0),N([_({type:String,reflect:!0})],$.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],$.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],$.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],$.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],$.prototype,`spacingRight`,void 0),$=N([a(`scb-viz`)],$),_c(),Mc(),Fc(),Wc(),yl(),Ru(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),ff(),vd(),Sd(),bd(),Tu(),Kc(),Nl(),_c(),Mc(),Fc(),Wc(),yl(),Ru(),gd(),wd(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),hf(),ff(),vd(),Sd(),bd(),Tu(),Cf(),Kc(),Nl();function Im(e){if(!e.querySelector(`a, sup`))return e.textContent?.trim()??``;let t=e=>{if(e.nodeType===Node.TEXT_NODE)return[e.textContent??``];if(!(e instanceof Element))return[];let n=Array.from(e.childNodes).flatMap(t);return e.localName===`sup`?[{tag:`sup`,children:n}]:e.localName===`a`?[{tag:`a`,children:n,href:e.getAttribute(`href`),title:e.getAttribute(`title`)||void 0,ariaLabel:e.getAttribute(`aria-label`)||void 0}]:n};return Array.from(e.childNodes).flatMap(t)}var Lm=e=>e.scope===`row`||e.classList.contains(`forspalt`)||e.tagName===`TH`&&!e.scope;function Rm(e,t=1/0){let n=e.tHead?Array.from(e.tHead.rows):[];if(!e.tHead)for(let t of Array.from(e.rows)){if(!t.cells.length||!Array.from(t.cells).every(e=>e.tagName===`TH`))break;n.push(t)}if(!n.length)return;let r=new Set(n),i=Array.from(e.rows).filter(e=>!r.has(e));if(!i.length||i.length>t)return;let a=i.reduce((e,t)=>{let n=Array.from(t.cells).findIndex(e=>!Lm(e));return Math.max(e,n<0?t.cells.length:n)},1),o=i[0].cells.length-a;if((i.length+n.length+1)*o>t)return;let s=new Set(Array.from(e.querySelectorAll(`[id]`),e=>e.id));if(e.querySelector(`table, button, input, select, textarea, [tabindex], [contenteditable], [role]`)||Array.from(e.querySelectorAll(`*`)).some(e=>e.localName.includes(`-`))||Array.from(e.querySelectorAll(`a`)).some(e=>{let t=e.getAttribute(`href`)||``,n;try{n=decodeURIComponent(t.slice(1))}catch{return!0}return!e.closest(`th, td`)||s.has(n)||!t.startsWith(`#`)||e.getAttribute(`href`)===`#`||e.hasAttribute(`target`)||e.hasAttribute(`download`)||e.getAttributeNames().some(e=>e.startsWith(`on`))||e.hasAttribute(`aria-labelledby`)||e.hasAttribute(`aria-describedby`)})||e.getAttribute(`role`)&&e.getAttribute(`role`)!==`table`)return;let c=n.map(()=>[]),l=n.map((e,t)=>{let r=0;return Array.from(e.cells).map(e=>{for(;c[t][r];)r++;let i=e.cloneNode(!0);i.querySelectorAll(`[hidden], .visually-hidden, .sr-only`).forEach(e=>e.remove());let a=e.textContent?.trim()??``,o=!!a&&!i.textContent?.trim(),s={text:a,content:Im(e),visuallyHidden:o,ariaLabel:e.getAttribute(`aria-label`)||(o?a:void 0),column:r,colSpan:e.colSpan,rowSpan:e.rowSpan||n.length-t},l=r+s.colSpan,u=t+s.rowSpan;if(l>256||u>c.length)throw RangeError(`header-grid`);for(let e=t;e<u;e++)for(let t=r;t<l;t++){if(c[e][t])throw RangeError(`header-grid`);c[e][t]=s}return r=l,s})}),u=c[0].length;if(u<2||c.some(e=>e.length!==u||Array.from({length:u},(t,n)=>!e[n]).some(Boolean))||a>=u||i.some(e=>e.cells.length!==u||Array.from(e.cells).some(e=>e.colSpan!==1||e.rowSpan!==1)||!Array.from(e.cells).slice(0,a).some(e=>e.textContent?.trim())||Array.from(e.cells).slice(a).some(e=>e.tagName===`TH`||Lm(e))))return;if(i.some(e=>Array.from(e.cells).slice(a).every(e=>!e.textContent?.trim()))){let e=i.map(e=>JSON.stringify(Array.from(e.cells).slice(0,a).map(e=>e.textContent?.trim())));if(new Set(e).size!==e.length)return}let d=Array.from({length:u-a},(e,t)=>[...new Set(c.map(e=>e[t+a]))].filter(e=>e.text));if(!d.some(e=>!e.length))return{label:e.getAttribute(`aria-label`)||e.caption?.textContent?.trim()||``,headings:l,columns:d,stubCount:a,rows:i.map(e=>({stubs:Array.from(e.cells).slice(0,a).map(Im),values:Array.from(e.cells).slice(a).map(Im)}))}}w(),b(),pl(),P();var zm=200,Bm=new WeakSet,Vm=p`
21845
21873
  scb-table-next > table {
21846
21874
  box-sizing: border-box;
21847
21875
  inline-size: 100%;
@@ -21880,7 +21908,7 @@
21880
21908
  scb-table-next > table > tbody > tr:hover > * { background: var(--scb-tables-alternate-surface-color); }
21881
21909
  scb-table-next > table a { color: inherit; text-decoration: underline; }
21882
21910
  scb-table-next > table a:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
21883
- `,Vm=class extends C{constructor(...e){super(...e),this._mobile=!1,this._widthReady=!1}static{this.styles=p`
21911
+ `,Hm=class extends C{constructor(...e){super(...e),this._mobile=!1,this._widthReady=!1}static{this.styles=p`
21884
21912
  :host {
21885
21913
  display: block;
21886
21914
  min-inline-size: 0;
@@ -21957,12 +21985,12 @@
21957
21985
  }
21958
21986
  .mobile .group.first > th { padding-block-start: calc(var(--spacing-8) + var(--spacing-2)); }
21959
21987
  .mobile .last > * { padding-block-end: calc(var(--spacing-8) + var(--spacing-2)); }
21960
- `}connectedCallback(){super.connectedCallback();let e=this.getRootNode();if(!zm.has(e)){let t=this.ownerDocument.createElement(`style`);t.textContent=Bm.cssText,(e instanceof Document?e.head:e).appendChild(t),zm.add(e)}this._observer=new MutationObserver(()=>this._queueRead()),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0,attributes:!0,attributeFilter:[`colspan`,`rowspan`,`aria-label`,`role`,`tabindex`,`contenteditable`,`scope`,`class`,`hidden`,`href`,`title`,`id`,`target`,`download`,`aria-labelledby`,`aria-describedby`]}),this._resize=new ResizeObserver(([e])=>{let t=e.contentRect.width;if(t<=0){this._widthReady=!1;return}let n=t<=575,r=n!==this._mobile;this._mobile=n,(!this._widthReady||r)&&(this._widthReady=!0,this._read())}),this._resize.observe(this)}disconnectedCallback(){this._observer?.disconnect(),this._resize?.disconnect(),this._frame!==void 0&&cancelAnimationFrame(this._frame),this._frame=void 0,this._widthReady=!1,super.disconnectedCallback()}_queueRead(){!this._mobile||!this._widthReady||this._frame!==void 0||(this._frame=requestAnimationFrame(()=>{this._frame=void 0,this._read()}))}_read(){if(!this._widthReady)return;if(!this._mobile){this._model=void 0;return}let e=this.querySelectorAll(`table`);try{this._model=e.length===1?Lm(e[0],Rm):void 0}catch(e){if(!(e instanceof RangeError))throw e;this._model=void 0}}_content(e){return typeof e==`string`?e:e.map(e=>typeof e==`string`?e:e.tag===`sup`?x`<sup>${this._content(e.children)}</sup>`:x`<a href=${e.href} title=${R(e.title)} aria-label=${R(e.ariaLabel)}>${this._content(e.children)}</a>`)}_mobileRows(e){let t=[],n=e.headings.flat().filter(t=>(t.text||t.ariaLabel)&&t.column+t.colSpan<=e.stubCount),r=n.map(e=>e.ariaLabel||e.text).join(` `),i=n.filter(e=>!e.visuallyHidden&&e.text),a=[],o=[];return e.columns.forEach((s,c)=>{let l=0;for(;l<s.length&&s[l]===a[l];)l++;o.length=l,s.forEach((e,n)=>{if(n<l)return;let r=`group-${c}-${n}`;o.push(r);let i=n===0?`outer`:`group${l===0?` first`:``}`;t.push(x`<tr class=${i}><th id=${r} aria-label=${R(e.ariaLabel)} scope="col" colspan="2">${this._content(e.content)}</th></tr>`)});let u=n.length?`stub-heading-${c}`:void 0;u&&(o.push(u),t.push(x`<tr class="stub-headings"><th id=${u} scope="col" colspan="2" aria-label=${R(r)}>${i.map((e,t)=>x`${t?` `:S}<span>${this._content(e.content)}</span>`)}</th></tr>`)),e.rows.forEach((n,r)=>{let i=`mobile-row-${c}-${r}`;t.push(x`<tr class=${r===e.rows.length-1?`last`:``}>
21988
+ `}connectedCallback(){super.connectedCallback();let e=this.getRootNode();if(!Bm.has(e)){let t=this.ownerDocument.createElement(`style`);t.textContent=Vm.cssText,(e instanceof Document?e.head:e).appendChild(t),Bm.add(e)}this._observer=new MutationObserver(()=>this._queueRead()),this._observer.observe(this,{childList:!0,characterData:!0,subtree:!0,attributes:!0,attributeFilter:[`colspan`,`rowspan`,`aria-label`,`role`,`tabindex`,`contenteditable`,`scope`,`class`,`hidden`,`href`,`title`,`id`,`target`,`download`,`aria-labelledby`,`aria-describedby`]}),this._resize=new ResizeObserver(([e])=>{let t=e.contentRect.width;if(t<=0){this._widthReady=!1;return}let n=t<=575,r=n!==this._mobile;this._mobile=n,(!this._widthReady||r)&&(this._widthReady=!0,this._read())}),this._resize.observe(this)}disconnectedCallback(){this._observer?.disconnect(),this._resize?.disconnect(),this._frame!==void 0&&cancelAnimationFrame(this._frame),this._frame=void 0,this._widthReady=!1,super.disconnectedCallback()}_queueRead(){!this._mobile||!this._widthReady||this._frame!==void 0||(this._frame=requestAnimationFrame(()=>{this._frame=void 0,this._read()}))}_read(){if(!this._widthReady)return;if(!this._mobile){this._model=void 0;return}let e=this.querySelectorAll(`table`);try{this._model=e.length===1?Rm(e[0],zm):void 0}catch(e){if(!(e instanceof RangeError))throw e;this._model=void 0}}_content(e){return typeof e==`string`?e:e.map(e=>typeof e==`string`?e:e.tag===`sup`?x`<sup>${this._content(e.children)}</sup>`:x`<a href=${e.href} title=${R(e.title)} aria-label=${R(e.ariaLabel)}>${this._content(e.children)}</a>`)}_mobileRows(e){let t=[],n=e.headings.flat().filter(t=>(t.text||t.ariaLabel)&&t.column+t.colSpan<=e.stubCount),r=n.map(e=>e.ariaLabel||e.text).join(` `),i=n.filter(e=>!e.visuallyHidden&&e.text),a=[],o=[];return e.columns.forEach((s,c)=>{let l=0;for(;l<s.length&&s[l]===a[l];)l++;o.length=l,s.forEach((e,n)=>{if(n<l)return;let r=`group-${c}-${n}`;o.push(r);let i=n===0?`outer`:`group${l===0?` first`:``}`;t.push(x`<tr class=${i}><th id=${r} aria-label=${R(e.ariaLabel)} scope="col" colspan="2">${this._content(e.content)}</th></tr>`)});let u=n.length?`stub-heading-${c}`:void 0;u&&(o.push(u),t.push(x`<tr class="stub-headings"><th id=${u} scope="col" colspan="2" aria-label=${R(r)}>${i.map((e,t)=>x`${t?` `:S}<span>${this._content(e.content)}</span>`)}</th></tr>`)),e.rows.forEach((n,r)=>{let i=`mobile-row-${c}-${r}`;t.push(x`<tr class=${r===e.rows.length-1?`last`:``}>
21961
21989
  <th class="stub" scope="row" id=${i} headers=${R(u)}>${n.stubs.filter(e=>e!==``).map((e,t)=>x`${t?` `:S}${this._content(e)}`)}</th>
21962
21990
  <td headers=${[...o,i].join(` `)}>${this._content(n.values[c])}</td></tr>`)}),a=s}),t}render(){let e=this._model;return x`<div class="scroll" tabindex="0" ?hidden=${!!e}><slot @slotchange=${this._queueRead}></slot></div>
21963
21991
  ${e?x`<table class="mobile" aria-label=${R(e.label||void 0)}>
21964
21992
  <tbody>${this._mobileRows(e)}</tbody>
21965
- </table>`:S}`}};N([v()],Vm.prototype,`_model`,void 0),N([v()],Vm.prototype,`_mobile`,void 0),Vm=N([a(`scb-table-next`)],Vm),w(),b(),P();var Hm=class extends C{constructor(...e){super(...e),this.target=``,this.heading=``}static{this.styles=p`:host { display: none !important; }`}connectedCallback(){super.connectedCallback(),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<slot></slot>`}};N([_({type:String,reflect:!0})],Hm.prototype,`target`,void 0),N([_({type:String,reflect:!0})],Hm.prototype,`heading`,void 0),Hm=N([a(`scb-tour-step`)],Hm),w(),b(),Ol(),Mc(),dl(),P();var Um={fromAttribute:e=>e!==null&&e!==`false`,toAttribute:e=>e?``:null},Wm=class extends C{constructor(...e){super(...e),this.open=!1,this.autoStart=!1,this.storageKey=``,this.step=0,this.closeLabel=`Stäng guiden`,this.previousLabel=`Föregående`,this.nextLabel=`Nästa`,this.doneLabel=`Klart`,this.stepLabel=`{current} av {total}`,this._steps=[],this._stepObserver=new MutationObserver(()=>this._readSteps()),this._autoStartAttempted=!1,this._startRequest=0,this._shownStorageKey=``,this._operation=0,this._frame=0,this._scrollRoots=[],this._resizeObserver=new ResizeObserver(()=>this._schedulePosition()),this._startOnLoad=async()=>{if(!this.isConnected||document.readyState!==`complete`||!this.autoStart||this.open||this._autoStartAttempted)return;this._autoStartAttempted=!0;let e=this._startRequest,t=this.storageKey;try{if(t&&localStorage.getItem(t)===`seen`)return}catch{}await this.updateComplete;let n=this._findTarget(this._steps[0]?.target);n?.localName.includes(`-`)&&(await customElements.whenDefined(n.localName),await n.updateComplete),this.isConnected&&this.autoStart&&!this.open&&e===this._startRequest&&t===this.storageKey&&this.start()},this._schedulePosition=()=>{cancelAnimationFrame(this._frame),this._frame=requestAnimationFrame(()=>this._position())},this._onResize=()=>{this._target?.scrollIntoView({block:`center`,inline:`nearest`,behavior:`instant`}),this._schedulePosition()},this._next=()=>{this.step>=this._steps.length-1?this._close(`complete`):this.step++},this._onKeydown=e=>{e.key!==`Escape`||!this.open||(e.preventDefault(),e.stopPropagation(),this.close())}}static{this.styles=p`
21993
+ </table>`:S}`}};N([v()],Hm.prototype,`_model`,void 0),N([v()],Hm.prototype,`_mobile`,void 0),Hm=N([a(`scb-table-next`)],Hm),w(),b(),P();var Um=class extends C{constructor(...e){super(...e),this.target=``,this.heading=``}static{this.styles=p`:host { display: none !important; }`}connectedCallback(){super.connectedCallback(),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<slot></slot>`}};N([_({type:String,reflect:!0})],Um.prototype,`target`,void 0),N([_({type:String,reflect:!0})],Um.prototype,`heading`,void 0),Um=N([a(`scb-tour-step`)],Um),w(),b(),Ol(),Mc(),dl(),P();var Wm={fromAttribute:e=>e!==null&&e!==`false`,toAttribute:e=>e?``:null},Gm=class extends C{constructor(...e){super(...e),this.open=!1,this.autoStart=!1,this.storageKey=``,this.step=0,this.closeLabel=`Stäng guiden`,this.previousLabel=`Föregående`,this.nextLabel=`Nästa`,this.doneLabel=`Klart`,this.stepLabel=`{current} av {total}`,this._steps=[],this._stepObserver=new MutationObserver(()=>this._readSteps()),this._autoStartAttempted=!1,this._startRequest=0,this._shownStorageKey=``,this._operation=0,this._frame=0,this._scrollRoots=[],this._resizeObserver=new ResizeObserver(()=>this._schedulePosition()),this._startOnLoad=async()=>{if(!this.isConnected||document.readyState!==`complete`||!this.autoStart||this.open||this._autoStartAttempted)return;this._autoStartAttempted=!0;let e=this._startRequest,t=this.storageKey;try{if(t&&localStorage.getItem(t)===`seen`)return}catch{}await this.updateComplete;let n=this._findTarget(this._steps[0]?.target);n?.localName.includes(`-`)&&(await customElements.whenDefined(n.localName),await n.updateComplete),this.isConnected&&this.autoStart&&!this.open&&e===this._startRequest&&t===this.storageKey&&this.start()},this._schedulePosition=()=>{cancelAnimationFrame(this._frame),this._frame=requestAnimationFrame(()=>this._position())},this._onResize=()=>{this._target?.scrollIntoView({block:`center`,inline:`nearest`,behavior:`instant`}),this._schedulePosition()},this._next=()=>{this.step>=this._steps.length-1?this._close(`complete`):this.step++},this._onKeydown=e=>{e.key!==`Escape`||!this.open||(e.preventDefault(),e.stopPropagation(),this.close())}}static{this.styles=p`
21966
21994
  :host { display: block; }
21967
21995
  .surface {
21968
21996
  display: none;
@@ -22046,7 +22074,7 @@
22046
22074
  }
22047
22075
 
22048
22076
  /* design:bindings:scb-tour:end */
22049
- `}connectedCallback(){super.connectedCallback(),this._readSteps(),this._stepObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`target`,`heading`]}),document.readyState!==`complete`&&window.addEventListener(`load`,this._startOnLoad,{once:!0})}disconnectedCallback(){this._startRequest++,this._stepObserver.disconnect(),window.removeEventListener(`load`,this._startOnLoad),this._hide(),super.disconnectedCallback()}updated(e){this.open&&e.has(`open`)&&(this._autoStartAttempted=!0,this._startRequest++),this.open?(e.has(`open`)||e.has(`step`)||e.has(`_steps`))&&this._showStep():this._hide(),this._startOnLoad()}_readSteps(){this._steps=Array.from(this.children).filter(e=>e instanceof Hm).map(e=>({target:e.target,heading:e.heading,content:(e.textContent??``).replace(/\s+/g,` `).trim()}))}_findTarget(e){if(!e)return null;try{let t=this.querySelector(e)??this.getRootNode().querySelector(e);return t instanceof HTMLElement?t:null}catch{return null}}start(){this._autoStartAttempted=!0,this._startRequest++,this.step=0,this.open=!0}close(){this._autoStartAttempted=!0,this._startRequest++,this._close(`dismiss`)}_close(e){if(this.open){if(this._shownStorageKey&&e!==`target-unavailable`)try{localStorage.setItem(this._shownStorageKey,`seen`)}catch{}this.open=!1,this._hide(),this.dispatchEvent(new CustomEvent(`close`,{detail:{reason:e,step:this.step},bubbles:!0,composed:!0}))}}_hide(){this._operation++,cancelAnimationFrame(this._frame),this._resizeObserver.disconnect(),window.removeEventListener(`resize`,this._onResize),window.removeEventListener(`scroll`,this._schedulePosition,!0),this._scrollRoots.forEach(e=>e.removeEventListener(`scroll`,this._schedulePosition,!0)),this._scrollRoots=[];let e=this.shadowRoot?.querySelector(`.surface`),t=e?.contains(this.shadowRoot?.activeElement??null);z(e),t&&this._returnFocus?.isConnected&&this._returnFocus.focus({preventScroll:!0}),this._returnFocus=void 0,this._target=void 0,this._shownStorageKey=``}async _showStep(){let e=++this._operation;if(await this.updateComplete,!this.open||e!==this._operation)return;let t=Math.max(0,Math.min(this._steps.length-1,Math.trunc(this.step)||0));if(this.step!==t){this.step=t;return}let n=this._steps[t],r=this._findTarget(n?.target);if(!r||!this._isVisible(r)){this._close(`target-unavailable`);return}let i=this.shadowRoot.querySelector(`.surface`);if(!i.matches(`:popover-open`)){this._shownStorageKey=this.storageKey;let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;e instanceof HTMLElement&&(this._returnFocus=e)}this._target=r;let a=r.getBoundingClientRect();if((a.top<0||a.bottom>innerHeight||a.left<0||a.right>innerWidth)&&r.scrollIntoView({block:`center`,inline:`nearest`,behavior:`instant`}),!Sl(i,r)){this._close(`target-unavailable`);return}this._resizeObserver.disconnect(),this._resizeObserver.observe(r),this._resizeObserver.observe(i),window.addEventListener(`resize`,this._onResize),window.addEventListener(`scroll`,this._schedulePosition,!0),this._scrollRoots.forEach(e=>e.removeEventListener(`scroll`,this._schedulePosition,!0)),this._scrollRoots=[];let o=r.getRootNode();for(;o instanceof ShadowRoot;)o.addEventListener(`scroll`,this._schedulePosition,!0),this._scrollRoots.push(o),o=o.host.getRootNode();this._position(),i.focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent(`stepchange`,{detail:{step:t,total:this._steps.length},bubbles:!0,composed:!0}))}_isVisible(e){let t=getComputedStyle(e),n=e.getBoundingClientRect();return e.isConnected&&t.visibility!==`hidden`&&n.width>0&&n.height>0}_position(){let e=this._target,t=this.shadowRoot?.querySelector(`.surface`);if(!this.open||!t||!e)return;if(!this._isVisible(e)){this._close(`target-unavailable`);return}let n=getComputedStyle(this),r=Number.parseFloat(n.getPropertyValue(`--spacing-4`))||12,i=Number.parseFloat(n.getPropertyValue(`--scb-tour-design-anchor-gap-medium`))||12,a=e.getBoundingClientRect(),o=t.getBoundingClientRect(),s=innerHeight-a.bottom-i,c=a.top-i,l=s>=o.height+r||s>=c?`bottom`:`top`;t.style.setProperty(`--available-height`,`calc(${Math.max(0,(l===`bottom`?innerHeight-a.bottom:a.top)-r)}px - var(--scb-tour-design-anchor-gap-medium))`);let u=Math.max(r,Math.min(a.left+a.width/2-o.width/2,innerWidth-o.width-r));t.style.left=`${u}px`,t.style.top=l===`bottom`?`calc(${a.bottom}px + var(--scb-tour-design-anchor-gap-medium))`:`calc(${a.top}px - var(--scb-tour-design-anchor-gap-medium))`,t.dataset.side=l,t.style.setProperty(`--anchor-x`,`${a.left+a.width/2-u}px`)}render(){let e=this._steps[this.step],t=this.stepLabel.replace(`{current}`,String(this.step+1)).replace(`{total}`,String(this._steps.length));return x`
22077
+ `}connectedCallback(){super.connectedCallback(),this._readSteps(),this._stepObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:[`target`,`heading`]}),document.readyState!==`complete`&&window.addEventListener(`load`,this._startOnLoad,{once:!0})}disconnectedCallback(){this._startRequest++,this._stepObserver.disconnect(),window.removeEventListener(`load`,this._startOnLoad),this._hide(),super.disconnectedCallback()}updated(e){this.open&&e.has(`open`)&&(this._autoStartAttempted=!0,this._startRequest++),this.open?(e.has(`open`)||e.has(`step`)||e.has(`_steps`))&&this._showStep():this._hide(),this._startOnLoad()}_readSteps(){this._steps=Array.from(this.children).filter(e=>e instanceof Um).map(e=>({target:e.target,heading:e.heading,content:(e.textContent??``).replace(/\s+/g,` `).trim()}))}_findTarget(e){if(!e)return null;try{let t=this.querySelector(e)??this.getRootNode().querySelector(e);return t instanceof HTMLElement?t:null}catch{return null}}start(){this._autoStartAttempted=!0,this._startRequest++,this.step=0,this.open=!0}close(){this._autoStartAttempted=!0,this._startRequest++,this._close(`dismiss`)}_close(e){if(this.open){if(this._shownStorageKey&&e!==`target-unavailable`)try{localStorage.setItem(this._shownStorageKey,`seen`)}catch{}this.open=!1,this._hide(),this.dispatchEvent(new CustomEvent(`close`,{detail:{reason:e,step:this.step},bubbles:!0,composed:!0}))}}_hide(){this._operation++,cancelAnimationFrame(this._frame),this._resizeObserver.disconnect(),window.removeEventListener(`resize`,this._onResize),window.removeEventListener(`scroll`,this._schedulePosition,!0),this._scrollRoots.forEach(e=>e.removeEventListener(`scroll`,this._schedulePosition,!0)),this._scrollRoots=[];let e=this.shadowRoot?.querySelector(`.surface`),t=e?.contains(this.shadowRoot?.activeElement??null);z(e),t&&this._returnFocus?.isConnected&&this._returnFocus.focus({preventScroll:!0}),this._returnFocus=void 0,this._target=void 0,this._shownStorageKey=``}async _showStep(){let e=++this._operation;if(await this.updateComplete,!this.open||e!==this._operation)return;let t=Math.max(0,Math.min(this._steps.length-1,Math.trunc(this.step)||0));if(this.step!==t){this.step=t;return}let n=this._steps[t],r=this._findTarget(n?.target);if(!r||!this._isVisible(r)){this._close(`target-unavailable`);return}let i=this.shadowRoot.querySelector(`.surface`);if(!i.matches(`:popover-open`)){this._shownStorageKey=this.storageKey;let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;e instanceof HTMLElement&&(this._returnFocus=e)}this._target=r;let a=r.getBoundingClientRect();if((a.top<0||a.bottom>innerHeight||a.left<0||a.right>innerWidth)&&r.scrollIntoView({block:`center`,inline:`nearest`,behavior:`instant`}),!Sl(i,r)){this._close(`target-unavailable`);return}this._resizeObserver.disconnect(),this._resizeObserver.observe(r),this._resizeObserver.observe(i),window.addEventListener(`resize`,this._onResize),window.addEventListener(`scroll`,this._schedulePosition,!0),this._scrollRoots.forEach(e=>e.removeEventListener(`scroll`,this._schedulePosition,!0)),this._scrollRoots=[];let o=r.getRootNode();for(;o instanceof ShadowRoot;)o.addEventListener(`scroll`,this._schedulePosition,!0),this._scrollRoots.push(o),o=o.host.getRootNode();this._position(),i.focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent(`stepchange`,{detail:{step:t,total:this._steps.length},bubbles:!0,composed:!0}))}_isVisible(e){let t=getComputedStyle(e),n=e.getBoundingClientRect();return e.isConnected&&t.visibility!==`hidden`&&n.width>0&&n.height>0}_position(){let e=this._target,t=this.shadowRoot?.querySelector(`.surface`);if(!this.open||!t||!e)return;if(!this._isVisible(e)){this._close(`target-unavailable`);return}let n=getComputedStyle(this),r=Number.parseFloat(n.getPropertyValue(`--spacing-4`))||12,i=Number.parseFloat(n.getPropertyValue(`--scb-tour-design-anchor-gap-medium`))||12,a=e.getBoundingClientRect(),o=t.getBoundingClientRect(),s=innerHeight-a.bottom-i,c=a.top-i,l=s>=o.height+r||s>=c?`bottom`:`top`;t.style.setProperty(`--available-height`,`calc(${Math.max(0,(l===`bottom`?innerHeight-a.bottom:a.top)-r)}px - var(--scb-tour-design-anchor-gap-medium))`);let u=Math.max(r,Math.min(a.left+a.width/2-o.width/2,innerWidth-o.width-r));t.style.left=`${u}px`,t.style.top=l===`bottom`?`calc(${a.bottom}px + var(--scb-tour-design-anchor-gap-medium))`:`calc(${a.top}px - var(--scb-tour-design-anchor-gap-medium))`,t.dataset.side=l,t.style.setProperty(`--anchor-x`,`${a.left+a.width/2-u}px`)}render(){let e=this._steps[this.step],t=this.stepLabel.replace(`{current}`,String(this.step+1)).replace(`{total}`,String(this._steps.length));return x`
22050
22078
  <slot name="trigger" @click=${e=>{e.defaultPrevented||this.start()}}></slot>
22051
22079
  <slot></slot>
22052
22080
  <section class="surface" part="surface" popover="manual" role="dialog" tabindex="-1"
@@ -22067,4 +22095,4 @@
22067
22095
  </div>
22068
22096
  </div>
22069
22097
  </section>
22070
- `}};N([_({type:Boolean,reflect:!0,converter:Um})],Wm.prototype,`open`,void 0),N([_({type:Boolean,attribute:`auto-start`,converter:Um})],Wm.prototype,`autoStart`,void 0),N([_({type:String,attribute:`storage-key`})],Wm.prototype,`storageKey`,void 0),N([_({type:Number,reflect:!0})],Wm.prototype,`step`,void 0),N([_({attribute:`close-label`})],Wm.prototype,`closeLabel`,void 0),N([_({attribute:`previous-label`})],Wm.prototype,`previousLabel`,void 0),N([_({attribute:`next-label`})],Wm.prototype,`nextLabel`,void 0),N([_({attribute:`done-label`})],Wm.prototype,`doneLabel`,void 0),N([_({attribute:`step-label`})],Wm.prototype,`stepLabel`,void 0),N([v()],Wm.prototype,`_steps`,void 0),Wm=N([a(`scb-tour`)],Wm),_c(),Mc(),Fc(),Wc(),yc(),yl(),Ru(),gd(),wd(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),hf(),ff(),vd(),Sd(),bd(),Tu(),Cf(),Kc(),Nl(),j(),Ec(),Ol(),_c(),Mc(),Fc(),Wc(),yc(),yl(),Ru(),gd(),wd(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),hf(),ff(),vd(),Sd(),bd(),Tu(),Cf(),Kc(),Nl(),cc(),j(),Ec(),Ol()})();
22098
+ `}};N([_({type:Boolean,reflect:!0,converter:Wm})],Gm.prototype,`open`,void 0),N([_({type:Boolean,attribute:`auto-start`,converter:Wm})],Gm.prototype,`autoStart`,void 0),N([_({type:String,attribute:`storage-key`})],Gm.prototype,`storageKey`,void 0),N([_({type:Number,reflect:!0})],Gm.prototype,`step`,void 0),N([_({attribute:`close-label`})],Gm.prototype,`closeLabel`,void 0),N([_({attribute:`previous-label`})],Gm.prototype,`previousLabel`,void 0),N([_({attribute:`next-label`})],Gm.prototype,`nextLabel`,void 0),N([_({attribute:`done-label`})],Gm.prototype,`doneLabel`,void 0),N([_({attribute:`step-label`})],Gm.prototype,`stepLabel`,void 0),N([v()],Gm.prototype,`_steps`,void 0),Gm=N([a(`scb-tour`)],Gm),_c(),Mc(),Fc(),Wc(),yc(),yl(),Ru(),gd(),wd(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),hf(),ff(),vd(),Sd(),bd(),Tu(),Cf(),Kc(),Nl(),j(),Ec(),Ol(),_c(),Mc(),Fc(),Wc(),yc(),yl(),Ru(),gd(),wd(),Nd(),zd(),Id(),dl(),gl(),Qc(),rl(),cf(),uf(),hf(),ff(),vd(),Sd(),bd(),Tu(),Cf(),Kc(),Nl(),cc(),j(),Ec(),Ol()})();