scb-wc 0.1.238 → 0.1.239

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
@@ -2393,7 +2393,7 @@
2393
2393
  `:S}
2394
2394
  </label>
2395
2395
  <slot></slot>
2396
- `}__getVisibleSupportingText(){return this.error?this._validationMessage||this.errorText||`Ogiltigt val.`:this.supportingText}},N([_({type:Boolean,reflect:!0})],zc.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`indeterminate`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`checked`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`error`,void 0),N([_({type:String})],zc.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],zc.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],zc.prototype,`errorText`,void 0),N([_({type:String,reflect:!0,attribute:`aria-label`})],zc.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-controls`})],zc.prototype,`ariaControls`,void 0),N([_({type:String,attribute:`aria-expanded`})],zc.prototype,`ariaExpanded`,void 0),N([_({type:String})],zc.prototype,`name`,void 0),N([_({type:String})],zc.prototype,`value`,void 0),N([_({type:String,reflect:!0})],zc.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],zc.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],zc.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],zc.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],zc.prototype,`spacingRight`,void 0),zc=N([a(`scb-checkbox`)],zc)})),Vc=n({ScbSwitch:()=>I}),I,Hc=t((()=>{w(),b(),Ss(),D(),P(),I=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.label=``,this.ariaLabel=``,this.ariaControls=null,this.ariaExpanded=null,this.icons=!1,this.selected=!1,this.required=!1,this.error=!1,this.disabled=!1,this.supportingText=``,this.errorText=``,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.name=``,this.value=`on`,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialSelected=!1,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,`attachInternals`in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._initialSelected=this.selected,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.selected=this._initialSelected,this.error=!1,this._hasValidationBeenReported=!1,this.__syncFormValue(),this.__syncValidity()},this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`reset`,this._formResetHandler,!0),this._form.addEventListener(`submit`,this._formSubmitHandler,!0)),this.__syncFormValue()}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),super.disconnectedCallback()}static{this.styles=p`
2396
+ `}__getVisibleSupportingText(){return this.error?this._validationMessage||this.errorText||`Ogiltigt val.`:this.supportingText}},N([_({type:Boolean,reflect:!0})],zc.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`indeterminate`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`checked`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],zc.prototype,`error`,void 0),N([_({type:String})],zc.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],zc.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],zc.prototype,`errorText`,void 0),N([_({type:String,reflect:!0,attribute:`aria-label`})],zc.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-controls`})],zc.prototype,`ariaControls`,void 0),N([_({type:String,attribute:`aria-expanded`})],zc.prototype,`ariaExpanded`,void 0),N([_({type:String})],zc.prototype,`name`,void 0),N([_({type:String})],zc.prototype,`value`,void 0),N([_({type:String,reflect:!0})],zc.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],zc.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],zc.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],zc.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],zc.prototype,`spacingRight`,void 0),zc=N([a(`scb-checkbox`)],zc)})),Vc=n({ScbSwitch:()=>Hc}),Hc,Uc=t((()=>{w(),b(),Ss(),D(),P(),Hc=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.label=``,this.ariaLabel=``,this.ariaControls=null,this.ariaExpanded=null,this.icons=!1,this.selected=!1,this.required=!1,this.error=!1,this.disabled=!1,this.supportingText=``,this.errorText=``,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.name=``,this.value=`on`,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialSelected=!1,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,`attachInternals`in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._initialSelected=this.selected,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.selected=this._initialSelected,this.error=!1,this._hasValidationBeenReported=!1,this.__syncFormValue(),this.__syncValidity()},this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`reset`,this._formResetHandler,!0),this._form.addEventListener(`submit`,this._formSubmitHandler,!0)),this.__syncFormValue()}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),super.disconnectedCallback()}static{this.styles=p`
2397
2397
  :host {
2398
2398
  /* Valtext: base text current. JSON-källa: src/tokens/source/typography.json. */
2399
2399
  --scb-choices-text-font-weight-current: var(--scb-switch-design-text-medium-font-weight);
@@ -2576,7 +2576,7 @@
2576
2576
  </label>
2577
2577
  `:i}
2578
2578
  ${n?x`<span id="switch-supporting-text" class="supporting-text">${n}</span>`:S}
2579
- `}__getVisibleSupportingText(){return this.error?this._validationMessage||this.errorText||`Ogiltigt val.`:this.supportingText}},N([_({type:String})],I.prototype,`label`,void 0),N([_({type:String,reflect:!0,attribute:`aria-label`})],I.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-controls`})],I.prototype,`ariaControls`,void 0),N([_({type:String,attribute:`aria-expanded`})],I.prototype,`ariaExpanded`,void 0),N([_({type:Boolean,reflect:!0})],I.prototype,`icons`,void 0),N([_({type:Boolean,reflect:!0})],I.prototype,`selected`,void 0),N([_({type:Boolean,reflect:!0})],I.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],I.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],I.prototype,`disabled`,void 0),N([_({type:String,attribute:`supporting-text`})],I.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],I.prototype,`errorText`,void 0),N([_({type:Boolean,reflect:!0,attribute:`full-width`})],I.prototype,`fullWidth`,void 0),N([_({type:String,reflect:!0})],I.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],I.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],I.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],I.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],I.prototype,`spacingRight`,void 0),N([_({type:String})],I.prototype,`name`,void 0),N([_({type:String})],I.prototype,`value`,void 0),I=N([a(`scb-switch`)],I)}));function Uc(){return Gc??=Promise.resolve().then(()=>(j(),nc)),Gc}function Wc(){return Kc??=Promise.resolve().then(()=>(Sc(),vc)),Kc}var Gc,Kc,qc,L,Jc=t((()=>{w(),b(),uc(),cc(),P(),qc=`data-scb-list-managed-tabindex`,L=class extends C{constructor(...e){super(...e),this.type=`text`,this.href=``,this.itemHref=``,this.target=``,this.disabled=!1,this.label=``,this.supportingText=``,this.overline=``,this.leading=!1,this.leadingVariant=``,this.leadingIcon=``,this.avatarLabel=``,this.avatarAlt=``,this.avatarVariant=`icon`,this.avatarSrc=``,this.imgHrefImage=``,this.trailing=!1,this.trailingVariant=``,this.trailingIcon=``,this.trailingCheckboxAriaLabel=``,this.trailingSwitchLabel=``,this.trailingSwitchAriaLabel=``,this.trailingSwitchWidth=``,this.trailingSwitchSelected=!1,this.size=lc[`scb-list-item`].size,this.density=0,this.noDivider=!1,this.__managedTabindex=!1,this.__scbCheckboxLoaded=!1,this.__scbSwitchLoaded=!1,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__focusVisibleRaf=null,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__syncRipple=async()=>{let e=this.renderRoot.querySelector(`md-ripple`),t=this.renderRoot.querySelector(`.row`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await Wc();await i(e,t,n,r)},this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__onFocusIn=()=>{this.__scheduleFocusVisibleSync()},this.__onFocusOut=()=>{this.__scheduleFocusVisibleSync()},this.__onPointerDown=()=>{this.toggleAttribute(`data-focus-visible`,!1)},this.__onLazyFocusRingKeydown=e=>{e.key===`Tab`&&Uc().then(({ensureFocusRingOnTab:t})=>t(e))},this.onRowClick=()=>{if(this.disabled||(this.type===`link`&&!this.disabled&&(!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),this.type===`link`&&(this.href||this.itemHref)))return;let e=this.shadowRoot?.querySelector(`scb-checkbox`),t=this.shadowRoot?.querySelector(`scb-switch`);if(e&&(e.checked=!e.checked),t){let e=!this.trailingSwitchSelected;t.selected=e,this.__setTrailingSwitchSelected(e,!0)}},this.__onTrailingSwitchChange=e=>{let t=e.detail?.selected,n=typeof t==`boolean`?t:e.currentTarget?.selected??!1;this.__setTrailingSwitchSelected(n,!0)},this.__onKeydown=e=>{if(!e.defaultPrevented&&!this.disabled&&(e.key===`Enter`||e.key===` `)){if(this.type===`link`){let t=this.shadowRoot?.querySelector(`a[href]`);if(t){e.preventDefault(),t.click();return}}e.preventDefault(),this.onRowClick()}}}static get styles(){return p`
2579
+ `}__getVisibleSupportingText(){return this.error?this._validationMessage||this.errorText||`Ogiltigt val.`:this.supportingText}},N([_({type:String})],Hc.prototype,`label`,void 0),N([_({type:String,reflect:!0,attribute:`aria-label`})],Hc.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-controls`})],Hc.prototype,`ariaControls`,void 0),N([_({type:String,attribute:`aria-expanded`})],Hc.prototype,`ariaExpanded`,void 0),N([_({type:Boolean,reflect:!0})],Hc.prototype,`icons`,void 0),N([_({type:Boolean,reflect:!0})],Hc.prototype,`selected`,void 0),N([_({type:Boolean,reflect:!0})],Hc.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],Hc.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],Hc.prototype,`disabled`,void 0),N([_({type:String,attribute:`supporting-text`})],Hc.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],Hc.prototype,`errorText`,void 0),N([_({type:Boolean,reflect:!0,attribute:`full-width`})],Hc.prototype,`fullWidth`,void 0),N([_({type:String,reflect:!0})],Hc.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Hc.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Hc.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Hc.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Hc.prototype,`spacingRight`,void 0),N([_({type:String})],Hc.prototype,`name`,void 0),N([_({type:String})],Hc.prototype,`value`,void 0),Hc=N([a(`scb-switch`)],Hc)}));function Wc(){return Kc??=Promise.resolve().then(()=>(j(),nc)),Kc}function Gc(){return qc??=Promise.resolve().then(()=>(Sc(),vc)),qc}var Kc,qc,Jc,I,Yc=t((()=>{w(),b(),uc(),cc(),P(),Jc=`data-scb-list-managed-tabindex`,I=class extends C{constructor(...e){super(...e),this.type=`text`,this.href=``,this.itemHref=``,this.target=``,this.disabled=!1,this.label=``,this.supportingText=``,this.overline=``,this.leading=!1,this.leadingVariant=``,this.leadingIcon=``,this.avatarLabel=``,this.avatarAlt=``,this.avatarVariant=`icon`,this.avatarSrc=``,this.imgHrefImage=``,this.trailing=!1,this.trailingVariant=``,this.trailingIcon=``,this.trailingCheckboxAriaLabel=``,this.trailingSwitchLabel=``,this.trailingSwitchAriaLabel=``,this.trailingSwitchWidth=``,this.trailingSwitchSelected=!1,this.size=lc[`scb-list-item`].size,this.density=0,this.noDivider=!1,this.__managedTabindex=!1,this.__scbCheckboxLoaded=!1,this.__scbSwitchLoaded=!1,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__focusVisibleRaf=null,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__syncRipple=async()=>{let e=this.renderRoot.querySelector(`md-ripple`),t=this.renderRoot.querySelector(`.row`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await Gc();await i(e,t,n,r)},this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__onFocusIn=()=>{this.__scheduleFocusVisibleSync()},this.__onFocusOut=()=>{this.__scheduleFocusVisibleSync()},this.__onPointerDown=()=>{this.toggleAttribute(`data-focus-visible`,!1)},this.__onLazyFocusRingKeydown=e=>{e.key===`Tab`&&Wc().then(({ensureFocusRingOnTab:t})=>t(e))},this.onRowClick=()=>{if(this.disabled||(this.type===`link`&&!this.disabled&&(!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),this.type===`link`&&(this.href||this.itemHref)))return;let e=this.shadowRoot?.querySelector(`scb-checkbox`),t=this.shadowRoot?.querySelector(`scb-switch`);if(e&&(e.checked=!e.checked),t){let e=!this.trailingSwitchSelected;t.selected=e,this.__setTrailingSwitchSelected(e,!0)}},this.__onTrailingSwitchChange=e=>{let t=e.detail?.selected,n=typeof t==`boolean`?t:e.currentTarget?.selected??!1;this.__setTrailingSwitchSelected(n,!0)},this.__onKeydown=e=>{if(!e.defaultPrevented&&!this.disabled&&(e.key===`Enter`||e.key===` `)){if(this.type===`link`){let t=this.shadowRoot?.querySelector(`a[href]`);if(t){e.preventDefault(),t.click();return}}e.preventDefault(),this.onRowClick()}}}static get styles(){return p`
2580
2580
  /*
2581
2581
  Designbrygga:
2582
2582
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -2964,7 +2964,7 @@
2964
2964
  --scb-list-item-design-list-item-link-gap: var(--scb-list-item-design-list-item-link-gap-large);
2965
2965
  }
2966
2966
  /* design:bindings:scb-list-item:end */
2967
- `}async firstUpdated(){await this.__ensureDepsLoaded(),this.addEventListener(`focusin`,this.__onFocusIn),this.addEventListener(`focusout`,this.__onFocusOut),this.addEventListener(`pointerdown`,this.__onPointerDown,!0),this.addEventListener(`keydown`,this.__onLazyFocusRingKeydown),this.addEventListener(`keydown`,this.__onKeydown)}disconnectedCallback(){this.removeEventListener(`focusin`,this.__onFocusIn),this.removeEventListener(`focusout`,this.__onFocusOut),this.removeEventListener(`pointerdown`,this.__onPointerDown,!0),this.removeEventListener(`keydown`,this.__onLazyFocusRingKeydown),this.removeEventListener(`keydown`,this.__onKeydown),this.__focusVisibleRaf!==null&&(cancelAnimationFrame(this.__focusVisibleRaf),this.__focusVisibleRaf=null),super.disconnectedCallback()}updated(e){super.updated(e),(e.has(`leading`)||e.has(`leadingVariant`)||e.has(`trailing`)||e.has(`trailingVariant`)||e.has(`type`)||e.has(`target`))&&this.__ensureDepsLoaded()}async __ensureDepsLoaded(){this.trailing&&this.trailingVariant===`checkbox`&&!this.__scbCheckboxLoaded&&(await Promise.resolve().then(()=>(Bc(),Mc)),this.__scbCheckboxLoaded=!0),this.trailing&&this.trailingVariant===`switch`&&!this.__scbSwitchLoaded&&(await Promise.resolve().then(()=>(Hc(),Vc)),this.__scbSwitchLoaded=!0)}__ensureRipple(e){if(!(this.type!==`link`||this.disabled)){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,Wc().then(({ensureRippleReady:e})=>e()).then(()=>{this.disabled||(this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple()))}))}}__scheduleFocusVisibleSync(){this.__focusVisibleRaf!==null&&cancelAnimationFrame(this.__focusVisibleRaf),this.__focusVisibleRaf=requestAnimationFrame(()=>{this.__focusVisibleRaf=null;let e=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null,t=this.matches(`:focus-visible`)||e instanceof HTMLElement&&e.matches(`:focus-visible`);this.toggleAttribute(`data-focus-visible`,t),t&&this.__ensureFocusRing()})}__ensureFocusRing(){this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,Uc().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))}__setTrailingSwitchSelected(e,t){this.trailingSwitchSelected=e,t&&this.dispatchEvent(new CustomEvent(`trailing-switch-change`,{detail:{selected:e},bubbles:!0,composed:!0}))}render(){let e=this.closest(`scb-list, scb-list-card, scb-card[type="list"]`)?.getAttribute(`size`),t=this.density===-4?`small`:this.density===-2?`medium`:`large`,n=this.size||e||t,r=M(this,`--scb-list-item-design-leading-avatar-component-size-${n}`,[`small`,`medium`,`large`,`extra-large`],`medium`),i=this.leading?(()=>{switch(this.leadingVariant){case`icon`:return this.leadingIcon?x`<div class="leading"><span class="material-icon" aria-hidden="true">${this.leadingIcon}</span></div>`:S;case`avatar`:return x`
2967
+ `}async firstUpdated(){await this.__ensureDepsLoaded(),this.addEventListener(`focusin`,this.__onFocusIn),this.addEventListener(`focusout`,this.__onFocusOut),this.addEventListener(`pointerdown`,this.__onPointerDown,!0),this.addEventListener(`keydown`,this.__onLazyFocusRingKeydown),this.addEventListener(`keydown`,this.__onKeydown)}disconnectedCallback(){this.removeEventListener(`focusin`,this.__onFocusIn),this.removeEventListener(`focusout`,this.__onFocusOut),this.removeEventListener(`pointerdown`,this.__onPointerDown,!0),this.removeEventListener(`keydown`,this.__onLazyFocusRingKeydown),this.removeEventListener(`keydown`,this.__onKeydown),this.__focusVisibleRaf!==null&&(cancelAnimationFrame(this.__focusVisibleRaf),this.__focusVisibleRaf=null),super.disconnectedCallback()}updated(e){super.updated(e),(e.has(`leading`)||e.has(`leadingVariant`)||e.has(`trailing`)||e.has(`trailingVariant`)||e.has(`type`)||e.has(`target`))&&this.__ensureDepsLoaded()}async __ensureDepsLoaded(){this.trailing&&this.trailingVariant===`checkbox`&&!this.__scbCheckboxLoaded&&(await Promise.resolve().then(()=>(Bc(),Mc)),this.__scbCheckboxLoaded=!0),this.trailing&&this.trailingVariant===`switch`&&!this.__scbSwitchLoaded&&(await Promise.resolve().then(()=>(Uc(),Vc)),this.__scbSwitchLoaded=!0)}__ensureRipple(e){if(!(this.type!==`link`||this.disabled)){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,Gc().then(({ensureRippleReady:e})=>e()).then(()=>{this.disabled||(this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple()))}))}}__scheduleFocusVisibleSync(){this.__focusVisibleRaf!==null&&cancelAnimationFrame(this.__focusVisibleRaf),this.__focusVisibleRaf=requestAnimationFrame(()=>{this.__focusVisibleRaf=null;let e=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null,t=this.matches(`:focus-visible`)||e instanceof HTMLElement&&e.matches(`:focus-visible`);this.toggleAttribute(`data-focus-visible`,t),t&&this.__ensureFocusRing()})}__ensureFocusRing(){this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,Wc().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))}__setTrailingSwitchSelected(e,t){this.trailingSwitchSelected=e,t&&this.dispatchEvent(new CustomEvent(`trailing-switch-change`,{detail:{selected:e},bubbles:!0,composed:!0}))}render(){let e=this.closest(`scb-list, scb-list-card, scb-card[type="list"]`)?.getAttribute(`size`),t=this.density===-4?`small`:this.density===-2?`medium`:`large`,n=this.size||e||t,r=M(this,`--scb-list-item-design-leading-avatar-component-size-${n}`,[`small`,`medium`,`large`,`extra-large`],`medium`),i=this.leading?(()=>{switch(this.leadingVariant){case`icon`:return this.leadingIcon?x`<div class="leading"><span class="material-icon" aria-hidden="true">${this.leadingIcon}</span></div>`:S;case`avatar`:return x`
2968
2968
  <div class="leading">
2969
2969
  <scb-avatar
2970
2970
  label=${this.avatarLabel}
@@ -3020,7 +3020,7 @@
3020
3020
  </div>
3021
3021
 
3022
3022
  ${this.__focusRingLoaded?x`<md-focus-ring></md-focus-ring>`:S}
3023
- `}},N([_({type:String,reflect:!0,attribute:`type`})],L.prototype,`type`,void 0),N([_({type:String})],L.prototype,`href`,void 0),N([_({type:String,attribute:`item-href`})],L.prototype,`itemHref`,void 0),N([_({type:String,attribute:`target`})],L.prototype,`target`,void 0),N([_({type:Boolean,attribute:`disabled`,reflect:!0})],L.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],L.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],L.prototype,`supportingText`,void 0),N([_({type:String,attribute:`overline`})],L.prototype,`overline`,void 0),N([_({type:Boolean})],L.prototype,`leading`,void 0),N([_({type:String,attribute:`leading-variant`,reflect:!0})],L.prototype,`leadingVariant`,void 0),N([_({type:String,attribute:`leading-icon`})],L.prototype,`leadingIcon`,void 0),N([_({type:String,attribute:`avatar-label`})],L.prototype,`avatarLabel`,void 0),N([_({type:String,attribute:`avatar-alt`})],L.prototype,`avatarAlt`,void 0),N([_({type:String,attribute:`avatar-variant`})],L.prototype,`avatarVariant`,void 0),N([_({type:String,attribute:`avatar-src`})],L.prototype,`avatarSrc`,void 0),N([_({type:String,reflect:!0,attribute:`img-href-image`})],L.prototype,`imgHrefImage`,void 0),N([_({type:Boolean})],L.prototype,`trailing`,void 0),N([_({type:String,attribute:`trailing-variant`,reflect:!0})],L.prototype,`trailingVariant`,void 0),N([_({type:String,attribute:`trailing-icon`})],L.prototype,`trailingIcon`,void 0),N([_({type:String,attribute:`trailing-checkbox-aria-label`})],L.prototype,`trailingCheckboxAriaLabel`,void 0),N([_({type:String,attribute:`trailing-switch-label`})],L.prototype,`trailingSwitchLabel`,void 0),N([_({type:String,attribute:`trailing-switch-aria-label`})],L.prototype,`trailingSwitchAriaLabel`,void 0),N([_({type:String,attribute:`trailing-switch-width`})],L.prototype,`trailingSwitchWidth`,void 0),N([_({type:Boolean,attribute:`trailing-switch-selected`,reflect:!0})],L.prototype,`trailingSwitchSelected`,void 0),N([_({type:String,reflect:!0})],L.prototype,`size`,void 0),N([_({type:Number,reflect:!0})],L.prototype,`density`,void 0),N([_({type:Boolean,attribute:`no-divider`,reflect:!0})],L.prototype,`noDivider`,void 0),N([_({type:Boolean,attribute:qc})],L.prototype,`__managedTabindex`,void 0),L=N([a(`scb-list-item`)],L)})),Yc=n({ScbList:()=>Qc}),Xc,Zc,Qc,$c=t((()=>{w(),b(),Jc(),uc(),P(),Xc=`data-scb-list-managed-tabindex`,Zc=`data-scb-list-managed-role`,Qc=class extends C{constructor(...e){super(...e),this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size=lc[`scb-list`].size,this._onSlotChange=()=>this._setupItems()}firstUpdated(){this._setupItems(),this._applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing()}_getItems(){return(this._slotEl?.assignedElements({flatten:!0})??[]).filter(e=>e instanceof HTMLElement)}_isItemDisabled(e){return e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}_isRovingItem(e){return this._isItemDisabled(e)?!1:e.localName===`scb-list-item`?e.getAttribute(`type`)===`link`:e.matches(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])`)}_shouldManageListItemRole(e){return e.hasAttribute(`role`)&&!e.hasAttribute(Zc)?!1:e.localName===`li`||e.localName===`scb-list-item`||!e.matches(`a[href], button, input, select, textarea, summary, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])`)}_setupItems(){let e=this._getItems(),t=e.filter(e=>this._isRovingItem(e)),n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0]??null;e.forEach(e=>{if(this._shouldManageListItemRole(e)?(e.setAttribute(`role`,`listitem`),e.setAttribute(Zc,``)):e.hasAttribute(Zc)&&(e.removeAttribute(`role`),e.removeAttribute(Zc)),!this._isRovingItem(e)){e.hasAttribute(Xc)&&(e.removeAttribute(`tabindex`),e.removeAttribute(Xc));return}e.setAttribute(Xc,``),e.setAttribute(`tabindex`,e===n?`0`:`-1`)});let r=this.renderRoot?.querySelector(`.list`);r&&!r.hasAttribute(`data-kbd`)&&(r.setAttribute(`data-kbd`,`true`),r.addEventListener(`keydown`,e=>this._onKeyDown(e)))}_onKeyDown(e){let t=this._getItems().filter(e=>this._isRovingItem(e));if(!t.length)return;let n=t.findIndex(e=>e.getAttribute(`tabindex`)===`0`),r=e=>{let n=(e%t.length+t.length)%t.length;t.forEach(e=>e.setAttribute(`tabindex`,`-1`));let r=t[n];r.setAttribute(`tabindex`,`0`),r.focus()};switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),r(n<0?0:n+1);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),r(n<0?0:n-1);break;case`Home`:e.preventDefault(),r(0);break;case`End`:e.preventDefault(),r(t.length-1);break;default:break}}_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.marginBlockStart=t:this.style.removeProperty(`margin-block-start`),n?this.style.marginBlockEnd=n:this.style.removeProperty(`margin-block-end`),r?this.style.marginInlineStart=r:this.style.removeProperty(`margin-inline-start`),i?this.style.marginInlineEnd=i:this.style.removeProperty(`margin-inline-end`)}static{this.styles=[p`
3023
+ `}},N([_({type:String,reflect:!0,attribute:`type`})],I.prototype,`type`,void 0),N([_({type:String})],I.prototype,`href`,void 0),N([_({type:String,attribute:`item-href`})],I.prototype,`itemHref`,void 0),N([_({type:String,attribute:`target`})],I.prototype,`target`,void 0),N([_({type:Boolean,attribute:`disabled`,reflect:!0})],I.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],I.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],I.prototype,`supportingText`,void 0),N([_({type:String,attribute:`overline`})],I.prototype,`overline`,void 0),N([_({type:Boolean})],I.prototype,`leading`,void 0),N([_({type:String,attribute:`leading-variant`,reflect:!0})],I.prototype,`leadingVariant`,void 0),N([_({type:String,attribute:`leading-icon`})],I.prototype,`leadingIcon`,void 0),N([_({type:String,attribute:`avatar-label`})],I.prototype,`avatarLabel`,void 0),N([_({type:String,attribute:`avatar-alt`})],I.prototype,`avatarAlt`,void 0),N([_({type:String,attribute:`avatar-variant`})],I.prototype,`avatarVariant`,void 0),N([_({type:String,attribute:`avatar-src`})],I.prototype,`avatarSrc`,void 0),N([_({type:String,reflect:!0,attribute:`img-href-image`})],I.prototype,`imgHrefImage`,void 0),N([_({type:Boolean})],I.prototype,`trailing`,void 0),N([_({type:String,attribute:`trailing-variant`,reflect:!0})],I.prototype,`trailingVariant`,void 0),N([_({type:String,attribute:`trailing-icon`})],I.prototype,`trailingIcon`,void 0),N([_({type:String,attribute:`trailing-checkbox-aria-label`})],I.prototype,`trailingCheckboxAriaLabel`,void 0),N([_({type:String,attribute:`trailing-switch-label`})],I.prototype,`trailingSwitchLabel`,void 0),N([_({type:String,attribute:`trailing-switch-aria-label`})],I.prototype,`trailingSwitchAriaLabel`,void 0),N([_({type:String,attribute:`trailing-switch-width`})],I.prototype,`trailingSwitchWidth`,void 0),N([_({type:Boolean,attribute:`trailing-switch-selected`,reflect:!0})],I.prototype,`trailingSwitchSelected`,void 0),N([_({type:String,reflect:!0})],I.prototype,`size`,void 0),N([_({type:Number,reflect:!0})],I.prototype,`density`,void 0),N([_({type:Boolean,attribute:`no-divider`,reflect:!0})],I.prototype,`noDivider`,void 0),N([_({type:Boolean,attribute:Jc})],I.prototype,`__managedTabindex`,void 0),I=N([a(`scb-list-item`)],I)})),Xc=n({ScbList:()=>$c}),Zc,Qc,$c,el=t((()=>{w(),b(),Yc(),uc(),P(),Zc=`data-scb-list-managed-tabindex`,Qc=`data-scb-list-managed-role`,$c=class extends C{constructor(...e){super(...e),this.noDivider=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size=lc[`scb-list`].size,this._onSlotChange=()=>this._setupItems()}firstUpdated(){this._setupItems(),this._applySpacing()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing()}_getItems(){return(this._slotEl?.assignedElements({flatten:!0})??[]).filter(e=>e instanceof HTMLElement)}_isItemDisabled(e){return e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}_isRovingItem(e){return this._isItemDisabled(e)?!1:e.localName===`scb-list-item`?e.getAttribute(`type`)===`link`:e.matches(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])`)}_shouldManageListItemRole(e){return e.hasAttribute(`role`)&&!e.hasAttribute(Qc)?!1:e.localName===`li`||e.localName===`scb-list-item`||!e.matches(`a[href], button, input, select, textarea, summary, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"])`)}_setupItems(){let e=this._getItems(),t=e.filter(e=>this._isRovingItem(e)),n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0]??null;e.forEach(e=>{if(this._shouldManageListItemRole(e)?(e.setAttribute(`role`,`listitem`),e.setAttribute(Qc,``)):e.hasAttribute(Qc)&&(e.removeAttribute(`role`),e.removeAttribute(Qc)),!this._isRovingItem(e)){e.hasAttribute(Zc)&&(e.removeAttribute(`tabindex`),e.removeAttribute(Zc));return}e.setAttribute(Zc,``),e.setAttribute(`tabindex`,e===n?`0`:`-1`)});let r=this.renderRoot?.querySelector(`.list`);r&&!r.hasAttribute(`data-kbd`)&&(r.setAttribute(`data-kbd`,`true`),r.addEventListener(`keydown`,e=>this._onKeyDown(e)))}_onKeyDown(e){let t=this._getItems().filter(e=>this._isRovingItem(e));if(!t.length)return;let n=t.findIndex(e=>e.getAttribute(`tabindex`)===`0`),r=e=>{let n=(e%t.length+t.length)%t.length;t.forEach(e=>e.setAttribute(`tabindex`,`-1`));let r=t[n];r.setAttribute(`tabindex`,`0`),r.focus()};switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),r(n<0?0:n+1);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),r(n<0?0:n-1);break;case`Home`:e.preventDefault(),r(0);break;case`End`:e.preventDefault(),r(t.length-1);break;default:break}}_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.marginBlockStart=t:this.style.removeProperty(`margin-block-start`),n?this.style.marginBlockEnd=n:this.style.removeProperty(`margin-block-end`),r?this.style.marginInlineStart=r:this.style.removeProperty(`margin-inline-start`),i?this.style.marginInlineEnd=i:this.style.removeProperty(`margin-inline-end`)}static{this.styles=[p`
3024
3024
  /*
3025
3025
  Designbrygga:
3026
3026
  - Containerpadding och bakgrund ligger här.
@@ -3070,7 +3070,7 @@
3070
3070
  <div class="list" role="list">
3071
3071
  <slot @slotchange=${this._onSlotChange}></slot>
3072
3072
  </div>
3073
- `}},N([_({type:Boolean,attribute:`no-divider`,reflect:!0})],Qc.prototype,`noDivider`,void 0),N([_({type:String,reflect:!0})],Qc.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Qc.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Qc.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Qc.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Qc.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],Qc.prototype,`size`,void 0),N([y(`slot`)],Qc.prototype,`_slotEl`,void 0),Qc=N([a(`scb-list`)],Qc)})),el=n({ScbIconButton:()=>R});function tl(){return rl??=Promise.resolve().then(()=>(j(),nc)),rl}function nl(){return il??=Promise.resolve().then(()=>(Sc(),vc)),il}var rl,il,R,al=t((()=>{w(),b(),uc(),P(),R=class extends C{constructor(...e){super(...e),this.icon=`home`,this.ariaLabel=``,this.variant=`standard`,this.size=lc[`scb-icon-button`].size,this.toggle=!1,this.selected=!1,this.toggleofficon=`add`,this.toggleonicon=`remove`,this.disabled=!1,this.href=``,this.target=``,this.rel=``,this.__filledValue=!1,this.__focusRingReady=!1,this.__focusRingImportRequested=!1,this.__rippleReady=!1,this.__pendingRippleClick=!1,this.__ensureFocusRing=()=>{this.__focusRingReady||this.__focusRingImportRequested||(this.__focusRingImportRequested=!0,tl().then(({ensureFocusRingReady:e})=>(e(),customElements.whenDefined(`md-focus-ring`))).then(()=>{this.__focusRingReady=!0,this.toggleAttribute(`data-native-focus-ring-ready`,!0),this.requestUpdate(),this.updateComplete.then(()=>this.__syncInteractiveState())}))},this.__onFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(`:focus-visible`)&&this.__ensureFocusRing()},this.__ensureRipple=(e,t=!1)=>{this.__rippleReady||this.disabled||(e&&(this.__pendingRippleEvent=e),t&&(this.__pendingRippleClick=!0),nl().then(({ensureRippleReady:e})=>e()).then(()=>{this.disabled||(this.__rippleReady=!0,this.toggleAttribute(`data-native-ripple-ready`,!0),this.requestUpdate(),this.updateComplete.then(()=>this.__replayRippleState()))}))},this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__onClick=e=>{if(this.disabled){e.preventDefault(),e.stopPropagation();return}this.toggle&&(this.selected=!this.selected,this.dispatchEvent(new CustomEvent(`change`,{detail:{selected:this.selected},bubbles:!0,composed:!0}))),this.__ensureRipple(void 0,!0)}}get filled(){return this.__filledValue}set filled(e){let t=!!e,n=this.__filledValue;n!==t&&(this.__filledValue=t,this.requestUpdate(`filled`,n),this.requestUpdate(`iconFilled`,n))}get iconFilled(){return this.__filledValue}set iconFilled(e){let t=!!e,n=this.__filledValue;n!==t&&(this.__filledValue=t,this.requestUpdate(`iconFilled`,n),this.requestUpdate(`filled`,n))}firstUpdated(){this.#e(),this.__syncInteractiveState()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),(this.__focusRingReady||this.__rippleReady)&&this.updateComplete.then(()=>this.__syncInteractiveState())}focus(e){let t=this.__getNativeControl();if(t){t.focus(e);return}super.focus(e)}__getNativeControl(){return this.renderRoot.querySelector(`.native-icon-button`)}__syncInteractiveState(){let e=this.__getNativeControl(),t=this.renderRoot.querySelector(`md-focus-ring`);t&&e&&(t.control=e,t.visible=e.matches(`:focus-visible`));let n=this.renderRoot.querySelector(`md-ripple`);n&&e&&(n.control=e)}async __replayRippleState(){let e=this.renderRoot.querySelector(`md-ripple`),t=this.__getNativeControl(),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await nl();await i(e,t,n,r),this.__syncInteractiveState()}__effectiveLabel(){return(this.ariaLabel||this.getAttribute(`aria-label`)||``).trim()||this.__currentIcon()||S}__currentIcon(){return this.toggle?this.selected?this.toggleonicon:this.toggleofficon:this.icon}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}#e(){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-icon-button-spacing-block-start`,t):this.style.removeProperty(`--scb-icon-button-spacing-block-start`),n?this.style.setProperty(`--scb-icon-button-spacing-block-end`,n):this.style.removeProperty(`--scb-icon-button-spacing-block-end`),r?this.style.setProperty(`--scb-icon-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-icon-button-spacing-inline-start`),i?this.style.setProperty(`--scb-icon-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-icon-button-spacing-inline-end`)}static{this.styles=p`
3073
+ `}},N([_({type:Boolean,attribute:`no-divider`,reflect:!0})],$c.prototype,`noDivider`,void 0),N([_({type:String,reflect:!0})],$c.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],$c.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],$c.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],$c.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],$c.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],$c.prototype,`size`,void 0),N([y(`slot`)],$c.prototype,`_slotEl`,void 0),$c=N([a(`scb-list`)],$c)})),tl=n({ScbIconButton:()=>ol});function nl(){return il??=Promise.resolve().then(()=>(j(),nc)),il}function rl(){return al??=Promise.resolve().then(()=>(Sc(),vc)),al}var il,al,ol,sl=t((()=>{w(),b(),uc(),P(),ol=class extends C{constructor(...e){super(...e),this.icon=`home`,this.ariaLabel=``,this.variant=`standard`,this.size=lc[`scb-icon-button`].size,this.toggle=!1,this.selected=!1,this.toggleofficon=`add`,this.toggleonicon=`remove`,this.disabled=!1,this.href=``,this.target=``,this.rel=``,this.__filledValue=!1,this.__focusRingReady=!1,this.__focusRingImportRequested=!1,this.__rippleReady=!1,this.__pendingRippleClick=!1,this.__ensureFocusRing=()=>{this.__focusRingReady||this.__focusRingImportRequested||(this.__focusRingImportRequested=!0,nl().then(({ensureFocusRingReady:e})=>(e(),customElements.whenDefined(`md-focus-ring`))).then(()=>{this.__focusRingReady=!0,this.toggleAttribute(`data-native-focus-ring-ready`,!0),this.requestUpdate(),this.updateComplete.then(()=>this.__syncInteractiveState())}))},this.__onFocusIn=e=>{let t=e.composedPath()[0];t instanceof HTMLElement&&t.matches(`:focus-visible`)&&this.__ensureFocusRing()},this.__ensureRipple=(e,t=!1)=>{this.__rippleReady||this.disabled||(e&&(this.__pendingRippleEvent=e),t&&(this.__pendingRippleClick=!0),rl().then(({ensureRippleReady:e})=>e()).then(()=>{this.disabled||(this.__rippleReady=!0,this.toggleAttribute(`data-native-ripple-ready`,!0),this.requestUpdate(),this.updateComplete.then(()=>this.__replayRippleState()))}))},this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__onClick=e=>{if(this.disabled){e.preventDefault(),e.stopPropagation();return}this.toggle&&(this.selected=!this.selected,this.dispatchEvent(new CustomEvent(`change`,{detail:{selected:this.selected},bubbles:!0,composed:!0}))),this.__ensureRipple(void 0,!0)}}get filled(){return this.__filledValue}set filled(e){let t=!!e,n=this.__filledValue;n!==t&&(this.__filledValue=t,this.requestUpdate(`filled`,n),this.requestUpdate(`iconFilled`,n))}get iconFilled(){return this.__filledValue}set iconFilled(e){let t=!!e,n=this.__filledValue;n!==t&&(this.__filledValue=t,this.requestUpdate(`iconFilled`,n),this.requestUpdate(`filled`,n))}firstUpdated(){this.#e(),this.__syncInteractiveState()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),(this.__focusRingReady||this.__rippleReady)&&this.updateComplete.then(()=>this.__syncInteractiveState())}focus(e){let t=this.__getNativeControl();if(t){t.focus(e);return}super.focus(e)}__getNativeControl(){return this.renderRoot.querySelector(`.native-icon-button`)}__syncInteractiveState(){let e=this.__getNativeControl(),t=this.renderRoot.querySelector(`md-focus-ring`);t&&e&&(t.control=e,t.visible=e.matches(`:focus-visible`));let n=this.renderRoot.querySelector(`md-ripple`);n&&e&&(n.control=e)}async __replayRippleState(){let e=this.renderRoot.querySelector(`md-ripple`),t=this.__getNativeControl(),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await rl();await i(e,t,n,r),this.__syncInteractiveState()}__effectiveLabel(){return(this.ariaLabel||this.getAttribute(`aria-label`)||``).trim()||this.__currentIcon()||S}__currentIcon(){return this.toggle?this.selected?this.toggleonicon:this.toggleofficon:this.icon}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}#e(){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-icon-button-spacing-block-start`,t):this.style.removeProperty(`--scb-icon-button-spacing-block-start`),n?this.style.setProperty(`--scb-icon-button-spacing-block-end`,n):this.style.removeProperty(`--scb-icon-button-spacing-block-end`),r?this.style.setProperty(`--scb-icon-button-spacing-inline-start`,r):this.style.removeProperty(`--scb-icon-button-spacing-inline-start`),i?this.style.setProperty(`--scb-icon-button-spacing-inline-end`,i):this.style.removeProperty(`--scb-icon-button-spacing-inline-end`)}static{this.styles=p`
3074
3074
  :host {
3075
3075
  display: inline-flex;
3076
3076
  margin-block-start: var(--scb-icon-button-spacing-block-start, 0);
@@ -3359,7 +3359,7 @@
3359
3359
  ${this.__rippleReady?x`<md-ripple aria-hidden="true"></md-ripple>`:S}
3360
3360
  ${this.__focusRingReady?x`<md-focus-ring aria-hidden="true"></md-focus-ring>`:S}
3361
3361
  </span>
3362
- `}},N([_({type:String})],R.prototype,`icon`,void 0),N([_({type:Boolean,reflect:!0})],R.prototype,`filled`,null),N([_({type:Boolean,attribute:`icon-filled`,reflect:!0})],R.prototype,`iconFilled`,null),N([_({type:String,attribute:`aria-label`})],R.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],R.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],R.prototype,`size`,void 0),N([_({type:Boolean,reflect:!0})],R.prototype,`toggle`,void 0),N([_({type:Boolean,reflect:!0})],R.prototype,`selected`,void 0),N([_({type:String})],R.prototype,`toggleofficon`,void 0),N([_({type:String})],R.prototype,`toggleonicon`,void 0),N([_({type:Boolean,reflect:!0})],R.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],R.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],R.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],R.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],R.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],R.prototype,`spacingRight`,void 0),N([_({type:String})],R.prototype,`href`,void 0),N([_({type:String})],R.prototype,`target`,void 0),N([_({type:String})],R.prototype,`rel`,void 0),R=N([a(`scb-icon-button`)],R)})),ol,sl=t((()=>{vt(),ol=e=>e??S})),cl=t((()=>{sl()})),ll=n({ScbLink:()=>ul}),ul,dl=t((()=>{w(),b(),cl(),j(),P(),ul=class extends C{constructor(...e){super(...e),this.href=``,this.disabled=!1,this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.#t=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`)})},this.#n=e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())}}static{this.styles=p`
3362
+ `}},N([_({type:String})],ol.prototype,`icon`,void 0),N([_({type:Boolean,reflect:!0})],ol.prototype,`filled`,null),N([_({type:Boolean,attribute:`icon-filled`,reflect:!0})],ol.prototype,`iconFilled`,null),N([_({type:String,attribute:`aria-label`})],ol.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],ol.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],ol.prototype,`size`,void 0),N([_({type:Boolean,reflect:!0})],ol.prototype,`toggle`,void 0),N([_({type:Boolean,reflect:!0})],ol.prototype,`selected`,void 0),N([_({type:String})],ol.prototype,`toggleofficon`,void 0),N([_({type:String})],ol.prototype,`toggleonicon`,void 0),N([_({type:Boolean,reflect:!0})],ol.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],ol.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],ol.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],ol.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],ol.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],ol.prototype,`spacingRight`,void 0),N([_({type:String})],ol.prototype,`href`,void 0),N([_({type:String})],ol.prototype,`target`,void 0),N([_({type:String})],ol.prototype,`rel`,void 0),ol=N([a(`scb-icon-button`)],ol)})),L,cl=t((()=>{vt(),L=e=>e??S})),ll=t((()=>{cl()})),ul=n({ScbLink:()=>dl}),dl,fl=t((()=>{w(),b(),ll(),j(),P(),dl=class extends C{constructor(...e){super(...e),this.href=``,this.disabled=!1,this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.#t=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`)})},this.#n=e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())}}static{this.styles=p`
3363
3363
  /*
3364
3364
  Designstyrning:
3365
3365
  - scb-link är en textlänk och ärver normalt font-size, line-height, tracking och weight från texten runt omkring.
@@ -3448,16 +3448,16 @@
3448
3448
  `}firstUpdated(){this.#e()}updated(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}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}#e(){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-link-spacing-block-start`,t):this.style.removeProperty(`--scb-link-spacing-block-start`),n?this.style.setProperty(`--scb-link-spacing-block-end`,n):this.style.removeProperty(`--scb-link-spacing-block-end`),r?this.style.setProperty(`--scb-link-spacing-inline-start`,r):this.style.removeProperty(`--scb-link-spacing-inline-start`),i?this.style.setProperty(`--scb-link-spacing-inline-end`,i):this.style.removeProperty(`--scb-link-spacing-inline-end`)}render(){let e=this.target===`_blank`&&!this.rel?`noopener noreferrer`:this.rel;return x`
3449
3449
  <a
3450
3450
  part="anchor"
3451
- href=${ol(this.disabled?void 0:this.href||void 0)}
3452
- target=${ol(this.target)}
3453
- rel=${ol(e)}
3454
- download=${ol(this.download)}
3451
+ href=${L(this.disabled?void 0:this.href||void 0)}
3452
+ target=${L(this.target)}
3453
+ rel=${L(e)}
3454
+ download=${L(this.download)}
3455
3455
  aria-disabled=${this.disabled?`true`:`false`}
3456
- aria-label=${ol(this.ariaLabel||void 0)}
3456
+ aria-label=${L(this.ariaLabel||void 0)}
3457
3457
  @click=${this.#n}
3458
3458
  @focusin=${this.#t}
3459
3459
  ><slot></slot><md-focus-ring aria-hidden="true"></md-focus-ring></a>
3460
- `}#t;#n},N([_({type:String,reflect:!0})],ul.prototype,`href`,void 0),N([_({type:String,reflect:!0})],ul.prototype,`target`,void 0),N([_({type:String,reflect:!0})],ul.prototype,`rel`,void 0),N([_({type:String,reflect:!0})],ul.prototype,`download`,void 0),N([_({type:Boolean,reflect:!0})],ul.prototype,`disabled`,void 0),N([_({type:String,attribute:`aria-label`})],ul.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],ul.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],ul.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],ul.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],ul.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],ul.prototype,`spacingRight`,void 0),ul=N([a(`scb-link`)],ul)})),fl=n({ScbChip:()=>pl}),pl,ml=t((()=>{w(),b(),P(),pl=class extends C{static{this.formAssociated=!0}constructor(){super(),this.variant=`assist`,this.staticVariant=`filled`,this.label=``,this.icon=``,this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.disableToggle=!1,this.href=``,this.target=``,this.name=``,this.value=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._internals=null,this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1,this._onFilterClick=e=>{if(this.disableToggle){let t=e.currentTarget;t&&(t.selected=this.selected),e.preventDefault();return}this._toggleSelected()},`attachInternals`in this&&(this._internals=this.attachInternals())}updated(e){super.updated(e),(e.has(`variant`)||e.has(`icon`))&&this.__ensureDepsLoaded(),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.dispatchEvent(new CustomEvent(`disabled-changed`,{detail:{disabled:this.disabled},bubbles:!0,composed:!0}))),e.has(`variant`)&&this.dispatchEvent(new CustomEvent(`variant-changed`,{detail:{variant:this.variant},bubbles:!0,composed:!0})),e.has(`staticVariant`)&&this.dispatchEvent(new CustomEvent(`static-variant-changed`,{detail:{staticVariant:this.staticVariant},bubbles:!0,composed:!0})),e.has(`label`)&&this.dispatchEvent(new CustomEvent(`label-changed`,{detail:{label:this.label},bubbles:!0,composed:!0})),e.has(`elevated`)&&this.dispatchEvent(new CustomEvent(`elevated-changed`,{detail:{elevated:this.elevated},bubbles:!0,composed:!0})),e.has(`selected`)&&this.dispatchEvent(new CustomEvent(`selected-changed`,{detail:{selected:this.selected},bubbles:!0,composed:!0})),e.has(`icon`)&&this.dispatchEvent(new CustomEvent(`icon-changed`,{detail:{icon:this.icon},bubbles:!0,composed:!0})),(e.has(`selected`)||e.has(`disabled`)||e.has(`variant`)||e.has(`value`)||e.has(`name`))&&this._updateFormValue(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}firstUpdated(){this.__ensureDepsLoaded(),this.#e(),this._updateFormValue()}async __ensureDepsLoaded(){let e=this.variant===`assist`||this.variant===`filter`?this.variant:null;if(e&&!this.__loadedVariants.has(e)){switch(e){case`assist`:await Promise.resolve().then(()=>(Nr(),jr));break;case`filter`:await Promise.resolve().then(()=>(ri(),ti));break}this.__loadedVariants.add(e)}e&&!this._insideChipSet&&!this.__chipSetLoaded&&(await Promise.resolve().then(()=>(Br(),Rr)),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>(D(),zi)),this.__iconLoaded=!0)}static{this.styles=p`
3460
+ `}#t;#n},N([_({type:String,reflect:!0})],dl.prototype,`href`,void 0),N([_({type:String,reflect:!0})],dl.prototype,`target`,void 0),N([_({type:String,reflect:!0})],dl.prototype,`rel`,void 0),N([_({type:String,reflect:!0})],dl.prototype,`download`,void 0),N([_({type:Boolean,reflect:!0})],dl.prototype,`disabled`,void 0),N([_({type:String,attribute:`aria-label`})],dl.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],dl.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],dl.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],dl.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],dl.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],dl.prototype,`spacingRight`,void 0),dl=N([a(`scb-link`)],dl)})),pl=n({ScbChip:()=>ml}),ml,hl=t((()=>{w(),b(),P(),ml=class extends C{static{this.formAssociated=!0}constructor(){super(),this.variant=`assist`,this.staticVariant=`filled`,this.label=``,this.icon=``,this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.disableToggle=!1,this.href=``,this.target=``,this.name=``,this.value=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._internals=null,this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1,this._onFilterClick=e=>{if(this.disableToggle){let t=e.currentTarget;t&&(t.selected=this.selected),e.preventDefault();return}this._toggleSelected()},`attachInternals`in this&&(this._internals=this.attachInternals())}updated(e){super.updated(e),(e.has(`variant`)||e.has(`icon`))&&this.__ensureDepsLoaded(),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.dispatchEvent(new CustomEvent(`disabled-changed`,{detail:{disabled:this.disabled},bubbles:!0,composed:!0}))),e.has(`variant`)&&this.dispatchEvent(new CustomEvent(`variant-changed`,{detail:{variant:this.variant},bubbles:!0,composed:!0})),e.has(`staticVariant`)&&this.dispatchEvent(new CustomEvent(`static-variant-changed`,{detail:{staticVariant:this.staticVariant},bubbles:!0,composed:!0})),e.has(`label`)&&this.dispatchEvent(new CustomEvent(`label-changed`,{detail:{label:this.label},bubbles:!0,composed:!0})),e.has(`elevated`)&&this.dispatchEvent(new CustomEvent(`elevated-changed`,{detail:{elevated:this.elevated},bubbles:!0,composed:!0})),e.has(`selected`)&&this.dispatchEvent(new CustomEvent(`selected-changed`,{detail:{selected:this.selected},bubbles:!0,composed:!0})),e.has(`icon`)&&this.dispatchEvent(new CustomEvent(`icon-changed`,{detail:{icon:this.icon},bubbles:!0,composed:!0})),(e.has(`selected`)||e.has(`disabled`)||e.has(`variant`)||e.has(`value`)||e.has(`name`))&&this._updateFormValue(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}firstUpdated(){this.__ensureDepsLoaded(),this.#e(),this._updateFormValue()}async __ensureDepsLoaded(){let e=this.variant===`assist`||this.variant===`filter`?this.variant:null;if(e&&!this.__loadedVariants.has(e)){switch(e){case`assist`:await Promise.resolve().then(()=>(Nr(),jr));break;case`filter`:await Promise.resolve().then(()=>(ri(),ti));break}this.__loadedVariants.add(e)}e&&!this._insideChipSet&&!this.__chipSetLoaded&&(await Promise.resolve().then(()=>(Br(),Rr)),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>(D(),zi)),this.__iconLoaded=!0)}static{this.styles=p`
3461
3461
  :host {
3462
3462
  display: inline-block;
3463
3463
  --scb-chip-container-height: var(--scb-chip-design-height-medium);
@@ -3636,7 +3636,7 @@
3636
3636
  >
3637
3637
  ${e}
3638
3638
  </md-filter-chip>
3639
- `;default:return x``}}_toggleSelected(){this.selected=!this.selected,this._updateFormValue()}_onRemove(e){e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent(`remove`,{detail:{label:this.label},bubbles:!0,composed:!0}))}_forward(e){this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail,bubbles:!0,composed:!0}))}_updateFormValue(){if(!this._internals)return;if(!(this.variant===`filter`&&this.selected&&!this.disabled&&this.name)){this._internals.setFormValue(null),this._internals.setValidity({});return}let e=this.value||this.label||``;this._internals.setFormValue(e,this.name),this._internals.setValidity({})}formDisabledCallback(e){this.disabled=e}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}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-chip-spacing-block-start`,a):this.style.removeProperty(`--scb-chip-spacing-block-start`),o?this.style.setProperty(`--scb-chip-spacing-block-end`,o):this.style.removeProperty(`--scb-chip-spacing-block-end`),r?this.style.setProperty(`--scb-chip-spacing-inline-start`,r):this.style.removeProperty(`--scb-chip-spacing-inline-start`),i?this.style.setProperty(`--scb-chip-spacing-inline-end`,i):this.style.removeProperty(`--scb-chip-spacing-inline-end`)}},N([_({type:String,reflect:!0})],pl.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`static-variant`})],pl.prototype,`staticVariant`,void 0),N([_({type:String})],pl.prototype,`label`,void 0),N([_({type:String})],pl.prototype,`icon`,void 0),N([_({type:Boolean,reflect:!0})],pl.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],pl.prototype,`elevated`,void 0),N([_({type:Boolean,reflect:!0})],pl.prototype,`removable`,void 0),N([_({type:Boolean,reflect:!0})],pl.prototype,`selected`,void 0),N([_({type:Boolean,reflect:!0,attribute:`disable-toggle`})],pl.prototype,`disableToggle`,void 0),N([_({type:String})],pl.prototype,`href`,void 0),N([_({type:String})],pl.prototype,`target`,void 0),N([_({type:String})],pl.prototype,`name`,void 0),N([_({type:String})],pl.prototype,`value`,void 0),N([_({type:String,reflect:!0})],pl.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],pl.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],pl.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],pl.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],pl.prototype,`spacingRight`,void 0),pl=N([a(`scb-chip`)],pl)}));function hl(e){let t=(xl.get(e)??0)+1;return xl.set(e,t),t}function gl(e){let t=getComputedStyle(e),n=e=>e.endsWith(`ms`)?Number.parseFloat(e):Number.parseFloat(e)*1e3,r=t.transitionDuration.split(`,`).map(e=>n(e.trim())),i=t.transitionDelay.split(`,`).map(e=>n(e.trim()));return r.reduce((e,t,n)=>{let r=i[n%i.length]??0;return Math.max(e,t+r)},0)}function _l(e,t,n=`manual`){if(!e)return!1;hl(e);let r=e;if(typeof r.showPopover!=`function`)return!1;if(e.setAttribute(`popover`,n),!e.matches(`:popover-open`))try{r.showPopover(t?{source:t}:void 0)}catch{return!1}return e.matches(`:popover-open`)}function z(e){if(!e)return;hl(e);let t=e;if(typeof t.hidePopover==`function`&&e.matches(`:popover-open`))try{t.hidePopover()}catch{}e.removeAttribute(`popover`)}function vl(e,t,n){if(!e)return;let r=hl(e);requestAnimationFrame(async()=>{let i=n??e,a=gl(i),o=i.getAnimations().filter(e=>e.playState!==`finished`);o.length>0?await Promise.allSettled(o.map(e=>e.finished)):a>0&&await new Promise(e=>setTimeout(e,a)),xl.get(e)===r&&(z(e),t?.())})}function yl(e){return!!e?.matches(`:popover-open`)}function bl(e){let t=e=>{for(let n of e.querySelectorAll(`*`))n.shadowRoot&&t(n.shadowRoot),n.matches(`[popover]`)&&yl(n)&&z(n),n.matches(Sl)&&`open`in n&&n.open&&(n.open=!1)};t(e)}var xl,Sl,Cl=t((()=>{xl=new WeakMap,Sl=[`scb-datepicker`,`scb-dialog`,`scb-drawer`,`scb-dropdown`,`scb-options-menu`,`scb-options-sub-menu`,`scb-overlay`,`scb-search`,`scb-select`,`scb-tooltip`].join(`,`)})),wl=n({ScbTooltip:()=>Dl}),Tl,El,Dl,Ol=t((()=>{w(),b(),D(),Cl(),cc(),P(),Tl=0,El=`data-scb-tooltip-managed-action-size`,Dl=class extends C{constructor(...e){super(...e),this.variant=`plain`,this.arrow=null,this.supportingtext=``,this.label=``,this.trigger=`hover`,this.position=`top`,this.open=!1,this.delay=.25,this.offset=0,this.maxWidth=`300px`,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition=`top`,this._tooltipId=`scb-tooltip-${++Tl}`,this._buttonDepsLoaded=!1,this._listeningForPositionChanges=!1,this._listeningForDismiss=!1,this._onWindowReposition=()=>{if(!this.open)return;let e=this._getTooltipElement(),t=this._triggerEl;!e||!t||this._positionTooltip(e,t)},this._onDocumentKeyDown=e=>{e.key!==`Escape`||!this.open||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1))},this._onDocumentPointerDown=e=>{this.open&&(e.composedPath().includes(this)||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1)))},this._ensureButtonDepsIfNeeded=()=>{this._syncRichActionButtonSizes(),!this._buttonDepsLoaded&&this.querySelector(`[slot="scb-tooltip-button"]`)&&(this._buttonDepsLoaded=!0,Promise.resolve().then(()=>(Oc(),Cc)))},this._onTriggerMouseEnter=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerFocus=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerKeyDown=e=>{e.key===`Tab`&&(this._hoverActive=!1,this._clickActive=!1,this._setOpenState(!1),z(this._getTooltipElement()))},this._onTooltipMouseEnter=()=>{this._hasTooltipContent()&&(this.trigger===`hover`||this.trigger===`hover-click`)&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTooltipMouseLeave=()=>{(this.trigger===`hover`||this.trigger===`hover-click`)&&(this._hoverActive=!1,this._clickActive||this._setOpenState(!1))},this._onTriggerClick=()=>{this._hasTooltipContent()&&(this._clickActive=!this._clickActive,this._clickActive?this._setOpenState(!0):this._hoverActive||this._setOpenState(!1))}}_syncRichActionButtonSizes(){let e=M(this,`--scb-tooltip-design-rich-action-button-size-medium`,[`small`,`medium`,`large`],`medium`),t=this.querySelectorAll(`:scope > scb-button[slot="scb-tooltip-button"]`);for(let n of t){let t=n.getAttribute(El);if(t!==null&&n.getAttribute(`size`)!==t){n.removeAttribute(El);continue}(!n.hasAttribute(`size`)||t!==null)&&(n.setAttribute(`size`,e),n.setAttribute(El,e))}}static{this.styles=p`
3639
+ `;default:return x``}}_toggleSelected(){this.selected=!this.selected,this._updateFormValue()}_onRemove(e){e.preventDefault(),e.stopPropagation(),this.dispatchEvent(new CustomEvent(`remove`,{detail:{label:this.label},bubbles:!0,composed:!0}))}_forward(e){this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail,bubbles:!0,composed:!0}))}_updateFormValue(){if(!this._internals)return;if(!(this.variant===`filter`&&this.selected&&!this.disabled&&this.name)){this._internals.setFormValue(null),this._internals.setValidity({});return}let e=this.value||this.label||``;this._internals.setFormValue(e,this.name),this._internals.setValidity({})}formDisabledCallback(e){this.disabled=e}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}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-chip-spacing-block-start`,a):this.style.removeProperty(`--scb-chip-spacing-block-start`),o?this.style.setProperty(`--scb-chip-spacing-block-end`,o):this.style.removeProperty(`--scb-chip-spacing-block-end`),r?this.style.setProperty(`--scb-chip-spacing-inline-start`,r):this.style.removeProperty(`--scb-chip-spacing-inline-start`),i?this.style.setProperty(`--scb-chip-spacing-inline-end`,i):this.style.removeProperty(`--scb-chip-spacing-inline-end`)}},N([_({type:String,reflect:!0})],ml.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`static-variant`})],ml.prototype,`staticVariant`,void 0),N([_({type:String})],ml.prototype,`label`,void 0),N([_({type:String})],ml.prototype,`icon`,void 0),N([_({type:Boolean,reflect:!0})],ml.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],ml.prototype,`elevated`,void 0),N([_({type:Boolean,reflect:!0})],ml.prototype,`removable`,void 0),N([_({type:Boolean,reflect:!0})],ml.prototype,`selected`,void 0),N([_({type:Boolean,reflect:!0,attribute:`disable-toggle`})],ml.prototype,`disableToggle`,void 0),N([_({type:String})],ml.prototype,`href`,void 0),N([_({type:String})],ml.prototype,`target`,void 0),N([_({type:String})],ml.prototype,`name`,void 0),N([_({type:String})],ml.prototype,`value`,void 0),N([_({type:String,reflect:!0})],ml.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],ml.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],ml.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],ml.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],ml.prototype,`spacingRight`,void 0),ml=N([a(`scb-chip`)],ml)}));function gl(e){let t=(Sl.get(e)??0)+1;return Sl.set(e,t),t}function _l(e){let t=getComputedStyle(e),n=e=>e.endsWith(`ms`)?Number.parseFloat(e):Number.parseFloat(e)*1e3,r=t.transitionDuration.split(`,`).map(e=>n(e.trim())),i=t.transitionDelay.split(`,`).map(e=>n(e.trim()));return r.reduce((e,t,n)=>{let r=i[n%i.length]??0;return Math.max(e,t+r)},0)}function vl(e,t,n=`manual`){if(!e)return!1;gl(e);let r=e;if(typeof r.showPopover!=`function`)return!1;if(e.setAttribute(`popover`,n),!e.matches(`:popover-open`))try{r.showPopover(t?{source:t}:void 0)}catch{return!1}return e.matches(`:popover-open`)}function R(e){if(!e)return;gl(e);let t=e;if(typeof t.hidePopover==`function`&&e.matches(`:popover-open`))try{t.hidePopover()}catch{}e.removeAttribute(`popover`)}function yl(e,t,n){if(!e)return;let r=gl(e);requestAnimationFrame(async()=>{let i=n??e,a=_l(i),o=i.getAnimations().filter(e=>e.playState!==`finished`);o.length>0?await Promise.allSettled(o.map(e=>e.finished)):a>0&&await new Promise(e=>setTimeout(e,a)),Sl.get(e)===r&&(R(e),t?.())})}function bl(e){return!!e?.matches(`:popover-open`)}function xl(e){let t=e=>{for(let n of e.querySelectorAll(`*`))n.shadowRoot&&t(n.shadowRoot),n.matches(`[popover]`)&&bl(n)&&R(n),n.matches(Cl)&&`open`in n&&n.open&&(n.open=!1)};t(e)}var Sl,Cl,wl=t((()=>{Sl=new WeakMap,Cl=[`scb-datepicker`,`scb-dialog`,`scb-drawer`,`scb-dropdown`,`scb-options-menu`,`scb-options-sub-menu`,`scb-overlay`,`scb-search`,`scb-select`,`scb-tooltip`].join(`,`)})),Tl=n({ScbTooltip:()=>Ol}),El,Dl,Ol,kl=t((()=>{w(),b(),D(),wl(),cc(),P(),El=0,Dl=`data-scb-tooltip-managed-action-size`,Ol=class extends C{constructor(...e){super(...e),this.variant=`plain`,this.arrow=null,this.supportingtext=``,this.label=``,this.trigger=`hover`,this.position=`top`,this.open=!1,this.delay=.25,this.offset=0,this.maxWidth=`300px`,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition=`top`,this._tooltipId=`scb-tooltip-${++El}`,this._buttonDepsLoaded=!1,this._listeningForPositionChanges=!1,this._listeningForDismiss=!1,this._onWindowReposition=()=>{if(!this.open)return;let e=this._getTooltipElement(),t=this._triggerEl;!e||!t||this._positionTooltip(e,t)},this._onDocumentKeyDown=e=>{e.key!==`Escape`||!this.open||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1))},this._onDocumentPointerDown=e=>{this.open&&(e.composedPath().includes(this)||(this._clickActive=!1,this._hoverActive=!1,this._setOpenState(!1)))},this._ensureButtonDepsIfNeeded=()=>{this._syncRichActionButtonSizes(),!this._buttonDepsLoaded&&this.querySelector(`[slot="scb-tooltip-button"]`)&&(this._buttonDepsLoaded=!0,Promise.resolve().then(()=>(Oc(),Cc)))},this._onTriggerMouseEnter=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerFocus=()=>{this._hasTooltipContent()&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||this._setOpenState(!1)},this._onTriggerKeyDown=e=>{e.key===`Tab`&&(this._hoverActive=!1,this._clickActive=!1,this._setOpenState(!1),R(this._getTooltipElement()))},this._onTooltipMouseEnter=()=>{this._hasTooltipContent()&&(this.trigger===`hover`||this.trigger===`hover-click`)&&(this._hoverActive=!0,this._setOpenState(!0))},this._onTooltipMouseLeave=()=>{(this.trigger===`hover`||this.trigger===`hover-click`)&&(this._hoverActive=!1,this._clickActive||this._setOpenState(!1))},this._onTriggerClick=()=>{this._hasTooltipContent()&&(this._clickActive=!this._clickActive,this._clickActive?this._setOpenState(!0):this._hoverActive||this._setOpenState(!1))}}_syncRichActionButtonSizes(){let e=M(this,`--scb-tooltip-design-rich-action-button-size-medium`,[`small`,`medium`,`large`],`medium`),t=this.querySelectorAll(`:scope > scb-button[slot="scb-tooltip-button"]`);for(let n of t){let t=n.getAttribute(Dl);if(t!==null&&n.getAttribute(`size`)!==t){n.removeAttribute(Dl);continue}(!n.hasAttribute(`size`)||t!==null)&&(n.setAttribute(`size`,e),n.setAttribute(Dl,e))}}static{this.styles=p`
3640
3640
  :host {
3641
3641
  position: relative;
3642
3642
  display: inline-block;
@@ -3824,7 +3824,7 @@
3824
3824
  }
3825
3825
 
3826
3826
  /* design:bindings:scb-tooltip:end */
3827
- `}firstUpdated(){this._originalPosition=this.position,this._updateDelayCss(),this._updateMaxWidthCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this._ensureButtonDepsIfNeeded(),this.open&&this._syncOpenState()}updated(e){if(this._syncRichActionButtonSizes(),e.has(`trigger`)&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has(`delay`)&&this._updateDelayCss(),e.has(`maxWidth`)&&this._updateMaxWidthCss(),(e.has(`supportingtext`)||e.has(`label`)||e.has(`variant`))&&(this._hasTooltipContent()||(this._hoverActive=!1,this._clickActive=!1,this.open=!1),this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has(`open`)){if(this.open&&!this._hasTooltipContent()){this.open=!1;return}this._syncOpenState(),this._dispatchOpenChanged()}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();let e=this._getTooltipElement();e&&(e.removeEventListener(`mouseenter`,this._onTooltipMouseEnter),e.removeEventListener(`mouseleave`,this._onTooltipMouseLeave),z(e)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null),this._detachPositionListeners(),this._detachDismissListeners()}_getTooltipElement(){return this.renderRoot.querySelector(`.scb-tooltip`)}_syncOpenState(){let e=this._getTooltipElement();e&&(this.open?this._showTooltip(e):this._hideTooltip(e))}_setOpenState(e){if(this.open===e){e&&this._syncOpenState();return}this.open=e}_hasTooltipContent(){let e=(this.supportingtext||``).trim();return this.variant===`rich`?!!((this.label||``).trim()||e):!!e}_updateDelayCss(){let e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty(`--delay`,`${e}s`)}_updateMaxWidthCss(){let e=(this.maxWidth||``).trim(),t=e.toLowerCase()===`none`,n=t?`none`:e||`300px`;this.style.setProperty(`--max-width`,n),this.style.setProperty(`--wrap`,t?`nowrap`:`normal`)}_dispatchOpenChanged(){let e={open:this.open};this.dispatchEvent(new CustomEvent(`open-changed`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`openchanged`,{detail:e,bubbles:!0,composed:!0}))}_findTriggerElement(){return this.querySelector(`[scb-tooltip-anchor]:not([slot])`)||(Array.from(this.children).find(e=>e.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){let e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute(`aria-describedby`));let t=this._findTriggerElement();this._triggerEl=t,t&&this._hasTooltipContent()&&(t.setAttribute(`aria-describedby`,this._tooltipId),t.addEventListener(`keydown`,this._onTriggerKeyDown),(this.trigger===`click`||this.trigger===`hover-click`)&&t.addEventListener(`click`,this._onTriggerClick),(this.trigger===`hover`||this.trigger===`hover-click`)&&(t.addEventListener(`mouseenter`,this._onTriggerMouseEnter),t.addEventListener(`mouseleave`,this._onTriggerMouseLeave),t.addEventListener(`focus`,this._onTriggerFocus),t.addEventListener(`blur`,this._onTriggerBlur)))}_updateTooltipHoverListeners(){let e=this._getTooltipElement();e&&(e.removeEventListener(`mouseenter`,this._onTooltipMouseEnter),e.removeEventListener(`mouseleave`,this._onTooltipMouseLeave),(this.trigger===`hover`||this.trigger===`hover-click`)&&(e.addEventListener(`mouseenter`,this._onTooltipMouseEnter),e.addEventListener(`mouseleave`,this._onTooltipMouseLeave)))}_detachTriggerListeners(){let e=this._triggerEl;e&&(e.removeEventListener(`click`,this._onTriggerClick),e.removeEventListener(`keydown`,this._onTriggerKeyDown),e.removeEventListener(`mouseenter`,this._onTriggerMouseEnter),e.removeEventListener(`mouseleave`,this._onTriggerMouseLeave),e.removeEventListener(`focus`,this._onTriggerFocus),e.removeEventListener(`blur`,this._onTriggerBlur))}_showTooltip(e){if(!this._hasTooltipContent()){this.open=!1;return}this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);let t=this._triggerEl;this._resetPosition(),e.classList.remove(`hidden`),e.setAttribute(`aria-hidden`,`false`),_l(e,t),this._attachPositionListeners(),this._attachDismissListeners(),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute(`open`,``)})}_hideTooltip(e){e.removeAttribute(`open`),e.setAttribute(`aria-hidden`,`true`),this._detachPositionListeners(),this._detachDismissListeners(),this._scheduleHidden(e)}_attachPositionListeners(){this._listeningForPositionChanges||(this._listeningForPositionChanges=!0,window.addEventListener(`resize`,this._onWindowReposition,{passive:!0}),window.addEventListener(`scroll`,this._onWindowReposition,{passive:!0,capture:!0}))}_detachPositionListeners(){this._listeningForPositionChanges&&(this._listeningForPositionChanges=!1,window.removeEventListener(`resize`,this._onWindowReposition),window.removeEventListener(`scroll`,this._onWindowReposition,!0))}_attachDismissListeners(){this._listeningForDismiss||(this._listeningForDismiss=!0,document.addEventListener(`keydown`,this._onDocumentKeyDown),document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0))}_detachDismissListeners(){this._listeningForDismiss&&(this._listeningForDismiss=!1,document.removeEventListener(`keydown`,this._onDocumentKeyDown),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0))}_scheduleHidden(e){let t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add(`hidden`),z(e);return}this._hideTimeout=window.setTimeout(()=>{e.classList.add(`hidden`),z(e),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=(this.offset??0)+8,a=window.innerHeight-8,o=window.innerWidth-8,s=e=>e>=8&&e+r.height<=a,c=e=>e>=8&&e+r.width<=o,l=(e,t,n,r)=>{let i=0;e<n&&(i+=n-e);let a=e+t;return a>r&&(i+=a-r),i},u=e=>{let t=0,u=0;switch(e){case`top`:t=n.top-r.height-i,u=n.left-(r.width-n.width)/2;break;case`bottom`:t=n.bottom+i,u=n.left-(r.width-n.width)/2;break;case`left`:u=n.left-r.width-i,t=n.top-(r.height-n.height)/2;break;case`right`:u=n.right+i,t=n.top-(r.height-n.height)/2;break}let d=l(t,r.height,8,a),f=l(u,r.width,8,o);return{pos:e,top:t,left:u,fitsV:s(t),fitsH:c(u),totalOverflow:d+f}},d=this.position===`top`||this.position===`bottom`,f=this.position,p=[f,this._getOppositePosition(f),d?`left`:`top`,d?`right`:`bottom`].map(u),m=p.find(e=>e.fitsV&&e.fitsH)??p.reduce((e,t)=>t.totalOverflow<e.totalOverflow?t:e),h=(e,t,n)=>Math.min(Math.max(e,t),n),g=a-r.height,ee=o-r.width,te=h(m.top,8,g),ne=h(m.left,8,ee);e.style.top=`${te}px`,e.style.left=`${ne}px`,this.position!==m.pos&&(this.position=m.pos)}_getOppositePosition(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}_onDefaultSlotChange(){this._updateTriggerElement(),this.open&&this._syncOpenState()}render(){let e=this._hasTooltipContent(),t=this.arrow?x`<svg
3827
+ `}firstUpdated(){this._originalPosition=this.position,this._updateDelayCss(),this._updateMaxWidthCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this._ensureButtonDepsIfNeeded(),this.open&&this._syncOpenState()}updated(e){if(this._syncRichActionButtonSizes(),e.has(`trigger`)&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has(`delay`)&&this._updateDelayCss(),e.has(`maxWidth`)&&this._updateMaxWidthCss(),(e.has(`supportingtext`)||e.has(`label`)||e.has(`variant`))&&(this._hasTooltipContent()||(this._hoverActive=!1,this._clickActive=!1,this.open=!1),this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has(`open`)){if(this.open&&!this._hasTooltipContent()){this.open=!1;return}this._syncOpenState(),this._dispatchOpenChanged()}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();let e=this._getTooltipElement();e&&(e.removeEventListener(`mouseenter`,this._onTooltipMouseEnter),e.removeEventListener(`mouseleave`,this._onTooltipMouseLeave),R(e)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null),this._detachPositionListeners(),this._detachDismissListeners()}_getTooltipElement(){return this.renderRoot.querySelector(`.scb-tooltip`)}_syncOpenState(){let e=this._getTooltipElement();e&&(this.open?this._showTooltip(e):this._hideTooltip(e))}_setOpenState(e){if(this.open===e){e&&this._syncOpenState();return}this.open=e}_hasTooltipContent(){let e=(this.supportingtext||``).trim();return this.variant===`rich`?!!((this.label||``).trim()||e):!!e}_updateDelayCss(){let e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty(`--delay`,`${e}s`)}_updateMaxWidthCss(){let e=(this.maxWidth||``).trim(),t=e.toLowerCase()===`none`,n=t?`none`:e||`300px`;this.style.setProperty(`--max-width`,n),this.style.setProperty(`--wrap`,t?`nowrap`:`normal`)}_dispatchOpenChanged(){let e={open:this.open};this.dispatchEvent(new CustomEvent(`open-changed`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`openchanged`,{detail:e,bubbles:!0,composed:!0}))}_findTriggerElement(){return this.querySelector(`[scb-tooltip-anchor]:not([slot])`)||(Array.from(this.children).find(e=>e.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){let e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute(`aria-describedby`));let t=this._findTriggerElement();this._triggerEl=t,t&&this._hasTooltipContent()&&(t.setAttribute(`aria-describedby`,this._tooltipId),t.addEventListener(`keydown`,this._onTriggerKeyDown),(this.trigger===`click`||this.trigger===`hover-click`)&&t.addEventListener(`click`,this._onTriggerClick),(this.trigger===`hover`||this.trigger===`hover-click`)&&(t.addEventListener(`mouseenter`,this._onTriggerMouseEnter),t.addEventListener(`mouseleave`,this._onTriggerMouseLeave),t.addEventListener(`focus`,this._onTriggerFocus),t.addEventListener(`blur`,this._onTriggerBlur)))}_updateTooltipHoverListeners(){let e=this._getTooltipElement();e&&(e.removeEventListener(`mouseenter`,this._onTooltipMouseEnter),e.removeEventListener(`mouseleave`,this._onTooltipMouseLeave),(this.trigger===`hover`||this.trigger===`hover-click`)&&(e.addEventListener(`mouseenter`,this._onTooltipMouseEnter),e.addEventListener(`mouseleave`,this._onTooltipMouseLeave)))}_detachTriggerListeners(){let e=this._triggerEl;e&&(e.removeEventListener(`click`,this._onTriggerClick),e.removeEventListener(`keydown`,this._onTriggerKeyDown),e.removeEventListener(`mouseenter`,this._onTriggerMouseEnter),e.removeEventListener(`mouseleave`,this._onTriggerMouseLeave),e.removeEventListener(`focus`,this._onTriggerFocus),e.removeEventListener(`blur`,this._onTriggerBlur))}_showTooltip(e){if(!this._hasTooltipContent()){this.open=!1;return}this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);let t=this._triggerEl;this._resetPosition(),e.classList.remove(`hidden`),e.setAttribute(`aria-hidden`,`false`),vl(e,t),this._attachPositionListeners(),this._attachDismissListeners(),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute(`open`,``)})}_hideTooltip(e){e.removeAttribute(`open`),e.setAttribute(`aria-hidden`,`true`),this._detachPositionListeners(),this._detachDismissListeners(),this._scheduleHidden(e)}_attachPositionListeners(){this._listeningForPositionChanges||(this._listeningForPositionChanges=!0,window.addEventListener(`resize`,this._onWindowReposition,{passive:!0}),window.addEventListener(`scroll`,this._onWindowReposition,{passive:!0,capture:!0}))}_detachPositionListeners(){this._listeningForPositionChanges&&(this._listeningForPositionChanges=!1,window.removeEventListener(`resize`,this._onWindowReposition),window.removeEventListener(`scroll`,this._onWindowReposition,!0))}_attachDismissListeners(){this._listeningForDismiss||(this._listeningForDismiss=!0,document.addEventListener(`keydown`,this._onDocumentKeyDown),document.addEventListener(`pointerdown`,this._onDocumentPointerDown,!0))}_detachDismissListeners(){this._listeningForDismiss&&(this._listeningForDismiss=!1,document.removeEventListener(`keydown`,this._onDocumentKeyDown),document.removeEventListener(`pointerdown`,this._onDocumentPointerDown,!0))}_scheduleHidden(e){let t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add(`hidden`),R(e);return}this._hideTimeout=window.setTimeout(()=>{e.classList.add(`hidden`),R(e),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=(this.offset??0)+8,a=window.innerHeight-8,o=window.innerWidth-8,s=e=>e>=8&&e+r.height<=a,c=e=>e>=8&&e+r.width<=o,l=(e,t,n,r)=>{let i=0;e<n&&(i+=n-e);let a=e+t;return a>r&&(i+=a-r),i},u=e=>{let t=0,u=0;switch(e){case`top`:t=n.top-r.height-i,u=n.left-(r.width-n.width)/2;break;case`bottom`:t=n.bottom+i,u=n.left-(r.width-n.width)/2;break;case`left`:u=n.left-r.width-i,t=n.top-(r.height-n.height)/2;break;case`right`:u=n.right+i,t=n.top-(r.height-n.height)/2;break}let d=l(t,r.height,8,a),f=l(u,r.width,8,o);return{pos:e,top:t,left:u,fitsV:s(t),fitsH:c(u),totalOverflow:d+f}},d=this.position===`top`||this.position===`bottom`,f=this.position,p=[f,this._getOppositePosition(f),d?`left`:`top`,d?`right`:`bottom`].map(u),m=p.find(e=>e.fitsV&&e.fitsH)??p.reduce((e,t)=>t.totalOverflow<e.totalOverflow?t:e),h=(e,t,n)=>Math.min(Math.max(e,t),n),g=a-r.height,ee=o-r.width,te=h(m.top,8,g),ne=h(m.left,8,ee);e.style.top=`${te}px`,e.style.left=`${ne}px`,this.position!==m.pos&&(this.position=m.pos)}_getOppositePosition(e){switch(e){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}}_onDefaultSlotChange(){this._updateTriggerElement(),this.open&&this._syncOpenState()}render(){let e=this._hasTooltipContent(),t=this.arrow?x`<svg
3828
3828
  class="scb-tooltip-arrow"
3829
3829
  xmlns="http://www.w3.org/2000/svg"
3830
3830
  width="13"
@@ -3871,7 +3871,7 @@
3871
3871
  ${t}
3872
3872
  </div>
3873
3873
  <slot @slotchange=${this._onDefaultSlotChange}></slot>
3874
- `:x`<slot @slotchange=${this._onDefaultSlotChange}></slot>`}},N([_({type:String,reflect:!0})],Dl.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0})],Dl.prototype,`arrow`,void 0),N([_({type:String,attribute:`supporting-text`})],Dl.prototype,`supportingtext`,void 0),N([_({type:String})],Dl.prototype,`label`,void 0),N([_({type:String,reflect:!0})],Dl.prototype,`trigger`,void 0),N([_({type:String,reflect:!0})],Dl.prototype,`position`,void 0),N([_({type:Boolean,reflect:!0})],Dl.prototype,`open`,void 0),N([_({type:Number,reflect:!0})],Dl.prototype,`delay`,void 0),N([_({type:Number,reflect:!0})],Dl.prototype,`offset`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Dl.prototype,`maxWidth`,void 0),Dl=N([a(`scb-tooltip`)],Dl)})),kl=n({ensureScbCardVariantStyles:()=>Al,renderScbCardVariant:()=>Ll});function Al(e){if(!(e instanceof ShadowRoot)||e.querySelector(`style[data-scb-card-variants]`))return;let t=document.createElement(`style`);t.dataset.scbCardVariants=``,t.textContent=zl,e.appendChild(t)}function jl(e){return String(e??``).replace(/ /g,`\xA0`).replace(/-/g,`‑`)}function Ml(e){let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}function Nl(e){let t=String(e??``);for(let e=0;e<5;e+=1){let e=Ml(t);if(e===t)break;t=e}return t.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi,` `).replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}function Pl(e,t){let n=e.renderRoot?.querySelector(`.scb-card`);n&&(t?n.classList.add(`no-hover`):n.classList.remove(`no-hover`))}function Fl(e,t,n){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:n})),e.dispatchEvent(new CustomEvent(t.replace(`-`,``),{bubbles:!0,composed:!0,detail:n}))}function Il(e,t,n){e.dispatchEvent(new CustomEvent(`social-${t}`,{bubbles:!0,composed:!0,detail:{action:t,originalEvent:n}}))}function Ll(e,t,n){switch(t){case`list`:return x`
3874
+ `:x`<slot @slotchange=${this._onDefaultSlotChange}></slot>`}},N([_({type:String,reflect:!0})],Ol.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0})],Ol.prototype,`arrow`,void 0),N([_({type:String,attribute:`supporting-text`})],Ol.prototype,`supportingtext`,void 0),N([_({type:String})],Ol.prototype,`label`,void 0),N([_({type:String,reflect:!0})],Ol.prototype,`trigger`,void 0),N([_({type:String,reflect:!0})],Ol.prototype,`position`,void 0),N([_({type:Boolean,reflect:!0})],Ol.prototype,`open`,void 0),N([_({type:Number,reflect:!0})],Ol.prototype,`delay`,void 0),N([_({type:Number,reflect:!0})],Ol.prototype,`offset`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Ol.prototype,`maxWidth`,void 0),Ol=N([a(`scb-tooltip`)],Ol)})),Al=n({ensureScbCardVariantStyles:()=>jl,renderScbCardVariant:()=>Rl});function jl(e){if(!(e instanceof ShadowRoot)||e.querySelector(`style[data-scb-card-variants]`))return;let t=document.createElement(`style`);t.dataset.scbCardVariants=``,t.textContent=Bl,e.appendChild(t)}function Ml(e){return String(e??``).replace(/ /g,`\xA0`).replace(/-/g,`‑`)}function Nl(e){let t=document.createElement(`textarea`);return t.innerHTML=e,t.value}function Pl(e){let t=String(e??``);for(let e=0;e<5;e+=1){let e=Nl(t);if(e===t)break;t=e}return t.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi,` `).replace(/<[^>]*>/g,` `).replace(/\s+/g,` `).trim()}function Fl(e,t){let n=e.renderRoot?.querySelector(`.scb-card`);n&&(t?n.classList.add(`no-hover`):n.classList.remove(`no-hover`))}function Il(e,t,n){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:n})),e.dispatchEvent(new CustomEvent(t.replace(`-`,``),{bubbles:!0,composed:!0,detail:n}))}function Ll(e,t,n){e.dispatchEvent(new CustomEvent(`social-${t}`,{bubbles:!0,composed:!0,detail:{action:t,originalEvent:n}}))}function Rl(e,t,n){switch(t){case`list`:return x`
3875
3875
  <div class="full-content">
3876
3876
  ${n.hasListTopContent?n.topContentTpl(!1):S}
3877
3877
  <div class="content list ${n.hasListTopContent?`has-top-content`:``}">
@@ -3879,7 +3879,7 @@
3879
3879
  </div>
3880
3880
  ${n.footerTpl()}
3881
3881
  </div>
3882
- `;case`social`:return Rl(e,n);case`link`:return x`
3882
+ `;case`social`:return zl(e,n);case`link`:return x`
3883
3883
  <div class="full-content">
3884
3884
  ${n.topContentTpl(!1)}
3885
3885
  <div class="content links">
@@ -3912,11 +3912,11 @@
3912
3912
  ${n.topContentTpl(!!n.effectiveHref)}
3913
3913
  ${n.footerTpl()}
3914
3914
  </div>
3915
- `}}function Rl(e,t){let n=e.commentsHref,r=Nl(e.supportingText),i=e=>{e.stopPropagation()},a=e.commentsText?`${e.commentsText}: `:``,o=e.likesText?`${e.likesText}: `:``,s=e.likeLabel||e.likesText||`Gilla`,c=()=>{e.likesInteractive&&Fl(e,`like-hover`,{hasLiked:e.hasLiked,likes:e.likes??0})},l=t=>n=>{n.stopPropagation(),Il(e,t,n)},u=e.likesDisabled?S:x`
3915
+ `}}function zl(e,t){let n=e.commentsHref,r=Pl(e.supportingText),i=e=>{e.stopPropagation()},a=e.commentsText?`${e.commentsText}: `:``,o=e.likesText?`${e.likesText}: `:``,s=e.likeLabel||e.likesText||`Gilla`,c=()=>{e.likesInteractive&&Il(e,`like-hover`,{hasLiked:e.hasLiked,likes:e.likes??0})},l=t=>n=>{n.stopPropagation(),Ll(e,t,n)},u=e.likesDisabled?S:x`
3916
3916
  <span
3917
3917
  class="likes"
3918
- @mouseenter=${()=>{Pl(e,!0),c()}}
3919
- @mouseleave=${()=>Pl(e,!1)}
3918
+ @mouseenter=${()=>{Fl(e,!0),c()}}
3919
+ @mouseleave=${()=>Fl(e,!1)}
3920
3920
  >
3921
3921
  ${e.likesInteractive?x`
3922
3922
  <scb-icon-button
@@ -3926,8 +3926,8 @@
3926
3926
  icon="thumb_up"
3927
3927
  ?icon-filled=${e.hasLiked}
3928
3928
  aria-label=${s}
3929
- @click=${t=>{t.stopPropagation(),e.hasLiked=!e.hasLiked,Fl(e,`like-click`,{hasLiked:e.hasLiked,likes:e.likes??0})}}
3930
- @keydown=${t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e.hasLiked=!e.hasLiked,Fl(e,`like-click`,{hasLiked:e.hasLiked,likes:e.likes??0}))}}
3929
+ @click=${t=>{t.stopPropagation(),e.hasLiked=!e.hasLiked,Il(e,`like-click`,{hasLiked:e.hasLiked,likes:e.likes??0})}}
3930
+ @keydown=${t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e.hasLiked=!e.hasLiked,Il(e,`like-click`,{hasLiked:e.hasLiked,likes:e.likes??0}))}}
3931
3931
  ></scb-icon-button>
3932
3932
  `:x`<span class="card-icon" aria-hidden="true">thumb_up</span>`}
3933
3933
  <span class="social-text">${o}${e.likes??0}</span>
@@ -3943,16 +3943,16 @@
3943
3943
  href="${e.authorHref||`#`}"
3944
3944
  tabindex="0"
3945
3945
  @click=${i}
3946
- @mouseenter=${()=>Pl(e,!0)}
3947
- @mouseleave=${()=>Pl(e,!1)}
3946
+ @mouseenter=${()=>Fl(e,!0)}
3947
+ @mouseleave=${()=>Fl(e,!1)}
3948
3948
  >${e.authorText}</a
3949
3949
  >
3950
3950
  `:S}
3951
3951
  ${e.commentsDisabled?S:x`
3952
3952
  <span
3953
3953
  class="comments"
3954
- @mouseenter=${()=>Pl(e,!0)}
3955
- @mouseleave=${()=>Pl(e,!1)}
3954
+ @mouseenter=${()=>Fl(e,!0)}
3955
+ @mouseleave=${()=>Fl(e,!1)}
3956
3956
  >
3957
3957
  ${n===``?x`
3958
3958
  <span class="card-icon" aria-hidden="true">comment</span>
@@ -3974,7 +3974,7 @@
3974
3974
  <scb-tooltip
3975
3975
  variant="rich"
3976
3976
  for="like-button"
3977
- supporting-text=${jl(e.likesHoverContent)}
3977
+ supporting-text=${Ml(e.likesHoverContent)}
3978
3978
  trigger="hover"
3979
3979
  position="right"
3980
3980
  >
@@ -4021,7 +4021,7 @@
4021
4021
  </div>
4022
4022
  ${t.footerTpl()}
4023
4023
  </div>
4024
- `}var zl,Bl=t((()=>{w(),zl=`
4024
+ `}var Bl,Vl=t((()=>{w(),Bl=`
4025
4025
  .scb-card.no-hover,
4026
4026
  .scb-card.no-hover:hover,
4027
4027
  .scb-card.no-hover:active {
@@ -4223,7 +4223,7 @@
4223
4223
  .scb-card.filled-alternative .content.list ::slotted(scb-list) {
4224
4224
  --scb-list-bg: var(--md-sys-color-surface-container, var(--p-95));
4225
4225
  }
4226
- `}));w(),b(),uc(),cc(),P();var Vl=new Set([`social-comments-text`,`social-comments`,`social-comments-disabled`,`social-comments-href`,`social-comments-link-label`,`social-likes-text`,`social-like-label`,`social-likes`,`social-likes-disabled`,`social-likes-hover-content`,`social-has-liked`,`social-likes-interactive`,`social-author`,`social-author-text`,`social-author-href`,`social-reply-enabled`,`social-reply-label`,`social-edit-enabled`,`social-edit-label`,`social-delete-enabled`,`social-delete-label`]),Hl=`data-scb-card-managed-list-size`,Ul=`data-scb-card-managed-action-button-size`,Wl=`data-scb-card-managed-avatar-size`,Gl=new Set([`small`,`medium`,`large`]),Kl=new Set([`small`,`medium`,`large`,`extra-large`]),ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu;function ru(){return eu??=Promise.resolve().then(()=>(j(),nc)),eu}function iu(){return tu??=Promise.resolve().then(()=>(Sc(),vc)),tu}function au(){return ql??=Promise.resolve().then(()=>($c(),Yc)),ql}function ou(){return Jl??=Promise.resolve().then(()=>(al(),el)),Jl}function su(){return Yl??=Promise.resolve().then(()=>(Oc(),Cc)),Yl}function cu(){return Xl??=Promise.resolve().then(()=>(dl(),ll)),Xl}function lu(){return Zl??=Promise.resolve().then(()=>(ml(),fl)),Zl}function uu(){return Ql??=Promise.resolve().then(()=>(pc(),dc)),Ql}function du(){return $l??=Promise.resolve().then(()=>(Ol(),wl)),$l}function fu(){return nu??=Promise.resolve().then(()=>(Bl(),kl)),nu}var B={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},V=class extends C{constructor(...e){super(...e),this.__dependencyKey=``,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__isSyncingManagedSocialAttributes=!1,this.type=`standard`,this.variant=`standard`,this.direction=`dynamic`,this.size=lc[`scb-card`].size,this.mediaType=``,this.mediaHref=``,this.mediaAlt=``,this.mediaSrcset=``,this.mediaSizes=``,this.mediaLoading=`auto`,this.mediaDecoding=`async`,this.mediaFetchPriority=`auto`,this.mediaFit=`cover`,this.mediaPosition=`center`,this.mediaWidth=``,this.mediaHeight=``,this.mediaAspect=``,this.mediaPlaceholder=!1,this.cardHref=``,this.href=``,this.title=``,this.cardTitle=``,this.subtitle=``,this.vignette=``,this.vignetteVariant=`filled`,this.vignetteSpacing=void 0,this.vignetteSpacingTop=void 0,this.vignetteSpacingBottom=void 0,this.vignetteSpacingLeft=void 0,this.vignetteSpacingRight=void 0,this.supportingText=``,this.commentsText=``,this.commentsDisabled=!1,this.commentsHref=``,this.commentsLinkLabel=`Gå till kommentarer`,this.likesText=``,this.likeLabel=``,this.likesDisabled=!1,this.likesHoverContent=``,this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText=``,this.authorHref=``,this.replyEnabled=!1,this.replyLabel=`Svara`,this.editEnabled=!1,this.editLabel=`Redigera`,this.deleteEnabled=!1,this.deleteLabel=`Ta bort`,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=e=>{let t=e.currentTarget.closest(`.media`);t&&t.classList.add(`is-loaded`)},this.__ensureRippleOnInteraction=(e,t=!1)=>{if(this.__primaryHref()){if(e&&(this.__pendingRippleEvent=e),t&&(this.__pendingRippleClick=!0),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,iu().then(({ensureRippleReady:e})=>e()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}},this.__syncRipple=async()=>{let e=this.renderRoot.querySelector(`md-ripple`),t=this.renderRoot.querySelector(`.scb-card`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await iu();await i(e,t,n,r)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,ru().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=e=>{if(e.target!==e.currentTarget)return;let t=this.__primaryHref();(e.key===`Enter`||e.key===` `)&&t&&(e.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{let t=this.__primaryHref();t&&(e.target.closest(`a`)||this.__navigate(t,e))},this.__handleSlottedCardLinkClick=e=>{let t=e.composedPath().find(e=>e instanceof HTMLAnchorElement&&e.getAttribute(`slot`)===`card-link`)?.getAttribute(`href`)||this.__primaryHref();t&&(this.__dispatchCardNavigate(t,e)||e.preventDefault())}}static{this.styles=p`
4226
+ `}));w(),b(),uc(),cc(),P();var Hl=new Set([`social-comments-text`,`social-comments`,`social-comments-disabled`,`social-comments-href`,`social-comments-link-label`,`social-likes-text`,`social-like-label`,`social-likes`,`social-likes-disabled`,`social-likes-hover-content`,`social-has-liked`,`social-likes-interactive`,`social-author`,`social-author-text`,`social-author-href`,`social-reply-enabled`,`social-reply-label`,`social-edit-enabled`,`social-edit-label`,`social-delete-enabled`,`social-delete-label`]),Ul=`data-scb-card-managed-list-size`,Wl=`data-scb-card-managed-action-button-size`,Gl=`data-scb-card-managed-avatar-size`,Kl=new Set([`small`,`medium`,`large`]),ql=new Set([`small`,`medium`,`large`,`extra-large`]),Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru;function iu(){return tu??=Promise.resolve().then(()=>(j(),nc)),tu}function au(){return nu??=Promise.resolve().then(()=>(Sc(),vc)),nu}function ou(){return Jl??=Promise.resolve().then(()=>(el(),Xc)),Jl}function su(){return Yl??=Promise.resolve().then(()=>(sl(),tl)),Yl}function cu(){return Xl??=Promise.resolve().then(()=>(Oc(),Cc)),Xl}function lu(){return Zl??=Promise.resolve().then(()=>(fl(),ul)),Zl}function uu(){return Ql??=Promise.resolve().then(()=>(hl(),pl)),Ql}function du(){return $l??=Promise.resolve().then(()=>(pc(),dc)),$l}function fu(){return eu??=Promise.resolve().then(()=>(kl(),Tl)),eu}function pu(){return ru??=Promise.resolve().then(()=>(Vl(),Al)),ru}var z={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},B=class extends C{constructor(...e){super(...e),this.__dependencyKey=``,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__isSyncingManagedSocialAttributes=!1,this.type=`standard`,this.variant=`standard`,this.direction=`dynamic`,this.size=lc[`scb-card`].size,this.mediaType=``,this.mediaHref=``,this.mediaAlt=``,this.mediaSrcset=``,this.mediaSizes=``,this.mediaLoading=`auto`,this.mediaDecoding=`async`,this.mediaFetchPriority=`auto`,this.mediaFit=`cover`,this.mediaPosition=`center`,this.mediaWidth=``,this.mediaHeight=``,this.mediaAspect=``,this.mediaPlaceholder=!1,this.cardHref=``,this.href=``,this.title=``,this.cardTitle=``,this.subtitle=``,this.vignette=``,this.vignetteVariant=`filled`,this.vignetteSpacing=void 0,this.vignetteSpacingTop=void 0,this.vignetteSpacingBottom=void 0,this.vignetteSpacingLeft=void 0,this.vignetteSpacingRight=void 0,this.supportingText=``,this.commentsText=``,this.commentsDisabled=!1,this.commentsHref=``,this.commentsLinkLabel=`Gå till kommentarer`,this.likesText=``,this.likeLabel=``,this.likesDisabled=!1,this.likesHoverContent=``,this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText=``,this.authorHref=``,this.replyEnabled=!1,this.replyLabel=`Svara`,this.editEnabled=!1,this.editLabel=`Redigera`,this.deleteEnabled=!1,this.deleteLabel=`Ta bort`,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=e=>{let t=e.currentTarget.closest(`.media`);t&&t.classList.add(`is-loaded`)},this.__ensureRippleOnInteraction=(e,t=!1)=>{if(this.__primaryHref()){if(e&&(this.__pendingRippleEvent=e),t&&(this.__pendingRippleClick=!0),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,au().then(({ensureRippleReady:e})=>e()).then(()=>{this.__rippleLoaded=!0,this.requestUpdate(),this.updateComplete.then(()=>this.__syncRipple())}))}},this.__syncRipple=async()=>{let e=this.renderRoot.querySelector(`md-ripple`),t=this.renderRoot.querySelector(`.scb-card`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await au();await i(e,t,n,r)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,iu().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))},this.__onKeyDown=e=>{if(e.target!==e.currentTarget)return;let t=this.__primaryHref();(e.key===`Enter`||e.key===` `)&&t&&(e.preventDefault(),this.__ensureRippleOnInteraction(void 0,!0),this.__navigate(t,e))},this.__handleHrefNavigation=e=>{let t=this.__primaryHref();t&&(e.target.closest(`a`)||this.__navigate(t,e))},this.__handleSlottedCardLinkClick=e=>{let t=e.composedPath().find(e=>e instanceof HTMLAnchorElement&&e.getAttribute(`slot`)===`card-link`)?.getAttribute(`href`)||this.__primaryHref();t&&(this.__dispatchCardNavigate(t,e)||e.preventDefault())}}static{this.styles=p`
4227
4227
  /*
4228
4228
  Designbrygga:
4229
4229
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -5462,7 +5462,7 @@
5462
5462
  --scb-card-design-standard-supporting-font-weight: var(--scb-card-design-standard-supporting-large-font-weight);
5463
5463
  }
5464
5464
  /* design:bindings:scb-card:end */
5465
- `}attributeChangedCallback(e,t,n){this.__isSyncingManagedSocialAttributes&&Vl.has(e)||super.attributeChangedCallback(e,t,n)}get likeButton(){return this.cardType===`social`?this.renderRoot.querySelector(`.likes scb-icon-button`):null}__calcAspectWH(e){let t=(e||``).trim();if(!t)return{w:600,h:400};let n=t.includes(`/`)?t.split(`/`):t.includes(`:`)?t.split(`:`):t.includes(`x`)?t.split(`x`):null;if(n&&n.length===2){let e=Number(n[0]),t=Number(n[1]);if(e>0&&t>0)return{w:e,h:t}}let r=Number(t);return isFinite(r)&&r>0?{w:1e3,h:Math.round(1e3/r)}:{w:600,h:400}}__mediaReserveAspect(e=``){let t=(this.mediaAspect||``).trim();if(t)return t;let n=Number(this.mediaWidth)||0,r=Number(this.mediaHeight)||0;return n>0&&r>0?`${n} / ${r}`:e}__mediaReserveStyle(e=``){let t=this.__mediaReserveAspect(e);return t?`--scb-card-media-aspect:${t};`:``}__slottedMediaAspect(){let e=this.querySelector(`[slot="media"]`);if(!e)return``;let t=Number(e.getAttribute(`width`))||0,n=Number(e.getAttribute(`height`))||0;return t>0&&n>0?`${t} / ${n}`:``}__isAvatarMedia(){return(this.mediaType||``).toLowerCase()===`avatar`||this.querySelector(`:scope > [slot="media"]`)?.localName===`scb-avatar`}get __resolvedTitle(){return this.cardTitle||this.title}get cardType(){let e=(this.type||`standard`).toLowerCase();switch(e){case`standard`:case`list`:case`social`:case`link`:case`action`:case`container`:return e;default:return`standard`}}__ensureVariantRenderer(){return this.cardType===`standard`||this.__variantRenderer?Promise.resolve():fu().then(e=>{this.__variantRenderer!==e&&(this.__variantRenderer=e,e.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(e,t){let n={href:e,originalEvent:t},r=new CustomEvent(`card-navigate`,{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(r),r.defaultPrevented)return!1;let i=new CustomEvent(`cardnavigate`,{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(i),!i.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__slottedCardLink(){return this.querySelector(`:scope > a[slot="card-link"]`)}__primaryHref(){return this.__effectiveHref()||this.__slottedCardLink()?.getAttribute(`href`)||``}__navigate(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,`_self`)}__slotNames(){let e=new Set;for(let t of Array.from(this.children)){let n=t.getAttribute(`slot`);n&&e.add(n)}return e}__hasSlottedContent(e,t){return t?t.has(e):Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}__hasLightDomElement(e){return!!this.querySelector(e)}__syncListCardListSize(){let e=Array.from(this.querySelectorAll(`scb-list`));if(this.cardType!==`list`){for(let t of e){let e=t.getAttribute(Hl);e!==null&&t.getAttribute(`size`)===e&&t.removeAttribute(`size`),t.removeAttribute(Hl)}return}let t=this.size||`large`;for(let n of e){let e=n.getAttribute(Hl);if(e!==null&&n.getAttribute(`size`)!==e){n.removeAttribute(Hl);continue}(!n.hasAttribute(`size`)||e!==null)&&(n.setAttribute(`size`,t),n.setAttribute(Hl,t))}}__actionCardButtonSize(){let e=getComputedStyle(this).getPropertyValue(`--scb-card-size-actions-button-size`).trim();return Gl.has(e)?e:`medium`}__cardAvatarSize(){let e=getComputedStyle(this).getPropertyValue(`--scb-card-size-avatar-component-size`).trim();return Kl.has(e)?e:`medium`}__syncAvatarSizes(){let e=Array.from(this.querySelectorAll(`:scope > scb-avatar[slot="media"]`)),t=this.__cardAvatarSize();for(let n of e){let e=n.getAttribute(Wl);if(e!==null&&n.getAttribute(`size`)!==e){n.removeAttribute(Wl);continue}(!n.hasAttribute(`size`)||e!==null)&&(n.setAttribute(`size`,t),n.setAttribute(Wl,t))}}__socialIconButtonSize(){return M(this,`--scb-card-size-social-icon-button-component-size`,[`tiny`,`extra-small`,`small`,`medium`,`large`],this.size===`small`?`small`:`medium`)}__syncActionCardButtonSizes(){let e=Array.from(this.querySelectorAll(`:scope > [slot="actions"] scb-button, :scope > scb-button[slot="actions"]`));if(this.cardType!==`action`){for(let t of e){let e=t.getAttribute(Ul);e!==null&&t.getAttribute(`size`)===e&&t.removeAttribute(`size`),t.removeAttribute(Ul)}return}let t=this.__actionCardButtonSize();for(let n of e){let e=n.getAttribute(Ul);if(e!==null&&n.getAttribute(`size`)!==e){n.removeAttribute(Ul);continue}(!n.hasAttribute(`size`)||e!==null)&&(n.setAttribute(`size`,t),n.setAttribute(Ul,t))}}__slottedText(e){return(this.querySelector(`:scope > [slot="${e}"]`)?.textContent??``).replace(/\s+/g,` `).trim()}__ensureDependenciesReady(){let e=[],t=[],n=this.cardType,r=!!this.vignette?.trim(),i=(n,r)=>{t.push(n),e.push(r())};(n===`list`||this.__hasLightDomElement(`scb-list, scb-list-item`))&&i(`list`,au),n!==`standard`&&i(`card-variants`,()=>this.__ensureVariantRenderer()),(n===`social`&&(!this.likesDisabled&&this.likesInteractive||!this.commentsDisabled&&this.commentsHref||this.replyEnabled||this.editEnabled||this.deleteEnabled)||this.__hasLightDomElement(`scb-icon-button`))&&i(`icon-button`,ou),this.__hasLightDomElement(`scb-button`)&&i(`button`,su),this.__hasLightDomElement(`scb-link`)&&i(`link`,cu),(r||this.__hasLightDomElement(`scb-chip`))&&i(`chip`,lu),((this.mediaType||``).toLowerCase()===`avatar`||this.__hasLightDomElement(`scb-avatar`))&&i(`avatar`,uu),(n===`social`&&this.likesHoverContent||this.__hasLightDomElement(`scb-tooltip`))&&i(`tooltip`,du);let a=t.sort().join(`|`);a!==this.__dependencyKey&&(this.__dependencyKey=a,e.length>0&&Promise.all(e).then(()=>this.requestUpdate()))}__mediaTemplate(e){let t=this.__isAvatarMedia();if(this.__hasSlottedContent(`media`,e)){let e=t?``:this.__mediaReserveStyle(this.__slottedMediaAspect());return x`
5465
+ `}attributeChangedCallback(e,t,n){this.__isSyncingManagedSocialAttributes&&Hl.has(e)||super.attributeChangedCallback(e,t,n)}get likeButton(){return this.cardType===`social`?this.renderRoot.querySelector(`.likes scb-icon-button`):null}__calcAspectWH(e){let t=(e||``).trim();if(!t)return{w:600,h:400};let n=t.includes(`/`)?t.split(`/`):t.includes(`:`)?t.split(`:`):t.includes(`x`)?t.split(`x`):null;if(n&&n.length===2){let e=Number(n[0]),t=Number(n[1]);if(e>0&&t>0)return{w:e,h:t}}let r=Number(t);return isFinite(r)&&r>0?{w:1e3,h:Math.round(1e3/r)}:{w:600,h:400}}__mediaReserveAspect(e=``){let t=(this.mediaAspect||``).trim();if(t)return t;let n=Number(this.mediaWidth)||0,r=Number(this.mediaHeight)||0;return n>0&&r>0?`${n} / ${r}`:e}__mediaReserveStyle(e=``){let t=this.__mediaReserveAspect(e);return t?`--scb-card-media-aspect:${t};`:``}__slottedMediaAspect(){let e=this.querySelector(`[slot="media"]`);if(!e)return``;let t=Number(e.getAttribute(`width`))||0,n=Number(e.getAttribute(`height`))||0;return t>0&&n>0?`${t} / ${n}`:``}__isAvatarMedia(){return(this.mediaType||``).toLowerCase()===`avatar`||this.querySelector(`:scope > [slot="media"]`)?.localName===`scb-avatar`}get __resolvedTitle(){return this.cardTitle||this.title}get cardType(){let e=(this.type||`standard`).toLowerCase();switch(e){case`standard`:case`list`:case`social`:case`link`:case`action`:case`container`:return e;default:return`standard`}}__ensureVariantRenderer(){return this.cardType===`standard`||this.__variantRenderer?Promise.resolve():pu().then(e=>{this.__variantRenderer!==e&&(this.__variantRenderer=e,e.ensureScbCardVariantStyles(this.renderRoot),this.requestUpdate())})}__dispatchCardNavigate(e,t){let n={href:e,originalEvent:t},r=new CustomEvent(`card-navigate`,{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(r),r.defaultPrevented)return!1;let i=new CustomEvent(`cardnavigate`,{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(i),!i.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__slottedCardLink(){return this.querySelector(`:scope > a[slot="card-link"]`)}__primaryHref(){return this.__effectiveHref()||this.__slottedCardLink()?.getAttribute(`href`)||``}__navigate(e,t){e&&this.__dispatchCardNavigate(e,t)&&window.open(e,`_self`)}__slotNames(){let e=new Set;for(let t of Array.from(this.children)){let n=t.getAttribute(`slot`);n&&e.add(n)}return e}__hasSlottedContent(e,t){return t?t.has(e):Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}__hasLightDomElement(e){return!!this.querySelector(e)}__syncListCardListSize(){let e=Array.from(this.querySelectorAll(`scb-list`));if(this.cardType!==`list`){for(let t of e){let e=t.getAttribute(Ul);e!==null&&t.getAttribute(`size`)===e&&t.removeAttribute(`size`),t.removeAttribute(Ul)}return}let t=this.size||`large`;for(let n of e){let e=n.getAttribute(Ul);if(e!==null&&n.getAttribute(`size`)!==e){n.removeAttribute(Ul);continue}(!n.hasAttribute(`size`)||e!==null)&&(n.setAttribute(`size`,t),n.setAttribute(Ul,t))}}__actionCardButtonSize(){let e=getComputedStyle(this).getPropertyValue(`--scb-card-size-actions-button-size`).trim();return Kl.has(e)?e:`medium`}__cardAvatarSize(){let e=getComputedStyle(this).getPropertyValue(`--scb-card-size-avatar-component-size`).trim();return ql.has(e)?e:`medium`}__syncAvatarSizes(){let e=Array.from(this.querySelectorAll(`:scope > scb-avatar[slot="media"]`)),t=this.__cardAvatarSize();for(let n of e){let e=n.getAttribute(Gl);if(e!==null&&n.getAttribute(`size`)!==e){n.removeAttribute(Gl);continue}(!n.hasAttribute(`size`)||e!==null)&&(n.setAttribute(`size`,t),n.setAttribute(Gl,t))}}__socialIconButtonSize(){return M(this,`--scb-card-size-social-icon-button-component-size`,[`tiny`,`extra-small`,`small`,`medium`,`large`],this.size===`small`?`small`:`medium`)}__syncActionCardButtonSizes(){let e=Array.from(this.querySelectorAll(`:scope > [slot="actions"] scb-button, :scope > scb-button[slot="actions"]`));if(this.cardType!==`action`){for(let t of e){let e=t.getAttribute(Wl);e!==null&&t.getAttribute(`size`)===e&&t.removeAttribute(`size`),t.removeAttribute(Wl)}return}let t=this.__actionCardButtonSize();for(let n of e){let e=n.getAttribute(Wl);if(e!==null&&n.getAttribute(`size`)!==e){n.removeAttribute(Wl);continue}(!n.hasAttribute(`size`)||e!==null)&&(n.setAttribute(`size`,t),n.setAttribute(Wl,t))}}__slottedText(e){return(this.querySelector(`:scope > [slot="${e}"]`)?.textContent??``).replace(/\s+/g,` `).trim()}__ensureDependenciesReady(){let e=[],t=[],n=this.cardType,r=!!this.vignette?.trim(),i=(n,r)=>{t.push(n),e.push(r())};(n===`list`||this.__hasLightDomElement(`scb-list, scb-list-item`))&&i(`list`,ou),n!==`standard`&&i(`card-variants`,()=>this.__ensureVariantRenderer()),(n===`social`&&(!this.likesDisabled&&this.likesInteractive||!this.commentsDisabled&&this.commentsHref||this.replyEnabled||this.editEnabled||this.deleteEnabled)||this.__hasLightDomElement(`scb-icon-button`))&&i(`icon-button`,su),this.__hasLightDomElement(`scb-button`)&&i(`button`,cu),this.__hasLightDomElement(`scb-link`)&&i(`link`,lu),(r||this.__hasLightDomElement(`scb-chip`))&&i(`chip`,uu),((this.mediaType||``).toLowerCase()===`avatar`||this.__hasLightDomElement(`scb-avatar`))&&i(`avatar`,du),(n===`social`&&this.likesHoverContent||this.__hasLightDomElement(`scb-tooltip`))&&i(`tooltip`,fu);let a=t.sort().join(`|`);a!==this.__dependencyKey&&(this.__dependencyKey=a,e.length>0&&Promise.all(e).then(()=>this.requestUpdate()))}__mediaTemplate(e){let t=this.__isAvatarMedia();if(this.__hasSlottedContent(`media`,e)){let e=t?``:this.__mediaReserveStyle(this.__slottedMediaAspect());return x`
5466
5466
  <div class="media ${t?`avatar-media`:``} ${e?`has-reserved-space`:``}" style=${e||S}>
5467
5467
  <slot name="media"></slot>
5468
5468
  </div>
@@ -5556,7 +5556,7 @@
5556
5556
  ${_e(!!s)}
5557
5557
  ${ve()}
5558
5558
  </div>
5559
- `))}updated(e){if(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(`type`)||e.has(`size`)){if(this.cardType===`list`){let e=this.size===`small`?`-4`:this.size===`medium`?`-2`:`0`;this.setAttribute(`data-density`,e)}else this.removeAttribute(`data-density`);this.__syncListCardListSize(),this.__syncActionCardButtonSizes()}this.mediaFit&&this.mediaFit!==`cover`?this.style.setProperty(`--scb-card-media-fit`,this.mediaFit):this.style.removeProperty(`--scb-card-media-fit`),this.mediaPosition&&this.mediaPosition!==`center`?this.style.setProperty(`--scb-card-media-position`,this.mediaPosition):this.style.removeProperty(`--scb-card-media-position`),this.__syncSocialAttributes(),this.__ensureDependenciesReady(),this.__syncActionCardButtonSizes(),this.__syncAvatarSizes(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing(),(e.has(`innerPadding`)||e.has(`paddingTop`)||e.has(`paddingBottom`)||e.has(`paddingLeft`)||e.has(`paddingRight`))&&this.__applyPadding()}async firstUpdated(e){this.__lightDomObserver=new MutationObserver(()=>{this.__ensureDependenciesReady(),this.__syncListCardListSize(),this.__syncActionCardButtonSizes(),this.__syncAvatarSizes()}),this.__lightDomObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`slot`]}),this.__ensureDependenciesReady(),this.__syncListCardListSize(),this.__syncActionCardButtonSizes(),this.__syncAvatarSizes(),this.__applySpacing(),this.__applyPadding(),this.__syncSocialAttributes(),this.__primaryHref()&&this.contains(document.activeElement)&&this.__ensureFocusRingOnFocusVisible(),this.__primaryHref()&&this.matches(`:hover`)&&this.__ensureRippleOnInteraction()}disconnectedCallback(){this.__lightDomObserver?.disconnect(),this.__lightDomObserver=void 0,super.disconnectedCallback()}};N([_({type:String,reflect:!0,converter:B})],V.prototype,`type`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`variant`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`direction`,void 0),N([_({type:String,reflect:!0})],V.prototype,`size`,void 0),N([_({type:String,attribute:`media-type`})],V.prototype,`mediaType`,void 0),N([_({type:String,attribute:`media-href`})],V.prototype,`mediaHref`,void 0),N([_({type:String,attribute:`media-alt`})],V.prototype,`mediaAlt`,void 0),N([_({type:String,attribute:`media-srcset`})],V.prototype,`mediaSrcset`,void 0),N([_({type:String,attribute:`media-sizes`})],V.prototype,`mediaSizes`,void 0),N([_({type:String,attribute:`media-loading`})],V.prototype,`mediaLoading`,void 0),N([_({type:String,attribute:`media-decoding`})],V.prototype,`mediaDecoding`,void 0),N([_({type:String,attribute:`media-fetchpriority`})],V.prototype,`mediaFetchPriority`,void 0),N([_({type:String,attribute:`media-fit`})],V.prototype,`mediaFit`,void 0),N([_({type:String,attribute:`media-position`})],V.prototype,`mediaPosition`,void 0),N([_({type:String,attribute:`media-width`})],V.prototype,`mediaWidth`,void 0),N([_({type:String,attribute:`media-height`})],V.prototype,`mediaHeight`,void 0),N([_({type:String,attribute:`media-aspect`})],V.prototype,`mediaAspect`,void 0),N([_({type:Boolean,attribute:`media-placeholder`})],V.prototype,`mediaPlaceholder`,void 0),N([_({type:String,attribute:`card-href`,reflect:!0,converter:B})],V.prototype,`cardHref`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`href`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`title`,void 0),N([_({type:String,attribute:`card-title`,reflect:!0,converter:B})],V.prototype,`cardTitle`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`subtitle`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`vignette`,void 0),N([_({type:String,attribute:`vignette-variant`,converter:B})],V.prototype,`vignetteVariant`,void 0),N([_({type:String,attribute:`vignette-spacing`,reflect:!0,converter:B})],V.prototype,`vignetteSpacing`,void 0),N([_({type:String,attribute:`vignette-spacing-top`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingTop`,void 0),N([_({type:String,attribute:`vignette-spacing-bottom`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingBottom`,void 0),N([_({type:String,attribute:`vignette-spacing-left`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingLeft`,void 0),N([_({type:String,attribute:`vignette-spacing-right`,reflect:!0,converter:B})],V.prototype,`vignetteSpacingRight`,void 0),N([_({type:String,attribute:`supporting-text`,reflect:!0,converter:B})],V.prototype,`supportingText`,void 0),N([_({type:Date,reflect:!0})],V.prototype,`date`,void 0),N([_({type:String,attribute:`social-comments-text`})],V.prototype,`commentsText`,void 0),N([_({type:Number,attribute:`social-comments`})],V.prototype,`comments`,void 0),N([_({type:Boolean,attribute:`social-comments-disabled`})],V.prototype,`commentsDisabled`,void 0),N([_({type:String,attribute:`social-comments-href`})],V.prototype,`commentsHref`,void 0),N([_({type:String,attribute:`social-comments-link-label`})],V.prototype,`commentsLinkLabel`,void 0),N([_({type:String,attribute:`social-likes-text`})],V.prototype,`likesText`,void 0),N([_({type:String,attribute:`social-like-label`})],V.prototype,`likeLabel`,void 0),N([_({type:Number,attribute:`social-likes`})],V.prototype,`likes`,void 0),N([_({type:Boolean,attribute:`social-likes-disabled`})],V.prototype,`likesDisabled`,void 0),N([_({type:String,attribute:`social-likes-hover-content`})],V.prototype,`likesHoverContent`,void 0),N([_({type:Boolean,attribute:`social-has-liked`})],V.prototype,`hasLiked`,void 0),N([_({type:Boolean,attribute:`social-likes-interactive`})],V.prototype,`likesInteractive`,void 0),N([_({type:Boolean,attribute:`social-author`})],V.prototype,`author`,void 0),N([_({type:String,attribute:`social-author-text`})],V.prototype,`authorText`,void 0),N([_({type:String,attribute:`social-author-href`})],V.prototype,`authorHref`,void 0),N([_({type:Boolean,attribute:`social-reply-enabled`})],V.prototype,`replyEnabled`,void 0),N([_({type:String,attribute:`social-reply-label`})],V.prototype,`replyLabel`,void 0),N([_({type:Boolean,attribute:`social-edit-enabled`})],V.prototype,`editEnabled`,void 0),N([_({type:String,attribute:`social-edit-label`})],V.prototype,`editLabel`,void 0),N([_({type:Boolean,attribute:`social-delete-enabled`})],V.prototype,`deleteEnabled`,void 0),N([_({type:String,attribute:`social-delete-label`})],V.prototype,`deleteLabel`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`sizing`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`,converter:B})],V.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`,converter:B})],V.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0,converter:B})],V.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0,converter:B})],V.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0,converter:B})],V.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0,converter:B})],V.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0,converter:B})],V.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`padding`,reflect:!0,converter:B})],V.prototype,`innerPadding`,void 0),N([_({type:String,attribute:`padding-top`,reflect:!0,converter:B})],V.prototype,`paddingTop`,void 0),N([_({type:String,attribute:`padding-bottom`,reflect:!0,converter:B})],V.prototype,`paddingBottom`,void 0),N([_({type:String,attribute:`padding-left`,reflect:!0,converter:B})],V.prototype,`paddingLeft`,void 0),N([_({type:String,attribute:`padding-right`,reflect:!0,converter:B})],V.prototype,`paddingRight`,void 0),V=N([a(`scb-card`)],V);var pu=class extends V{constructor(){super(),this.type=`list`}get cardType(){return`list`}};pu=N([a(`scb-list-card`)],pu);var mu=class extends V{constructor(){super(),this.type=`link`}get cardType(){return`link`}};mu=N([a(`scb-link-card`)],mu);var hu=class extends V{constructor(){super(),this.type=`action`}get cardType(){return`action`}};hu=N([a(`scb-action-card`)],hu);var gu=class extends V{constructor(){super(),this.type=`social`}get cardType(){return`social`}};gu=N([a(`scb-social-card`)],gu);var _u=class extends V{constructor(){super(),this.type=`container`}get cardType(){return`container`}};_u=N([a(`scb-container-card`)],_u);var vu=n({ScbSearch:()=>H}),yu,H,bu=t((()=>{w(),b(),E(),D(),j(),Cl(),uc(),cc(),P(),yu=0,H=class extends C{static{this.formAssociated=!0}async _ensureListDepsLoaded(){this._listDepsLoaded||(this._listDepsPromise??=Promise.resolve().then(()=>($c(),Yc)).then(()=>{this._listDepsLoaded=!0}),await this._listDepsPromise)}_ensureListDepsWhenNeeded(){let e=(this.value??``).trim().length>0;!this._inputFocused||!e||!this._hasSuggestions||this._ensureListDepsLoaded().then(()=>this.requestUpdate())}constructor(){super(),this._internals=null,this.supportingText=``,this.inputLabel=``,this.clearLabel=`Rensa sökfält`,this.suggestionsLabel=`Sökförslag`,this.errorText=``,this.value=``,this.name=``,this.disabled=!1,this.required=!1,this.error=!1,this.autocomplete=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size=lc[`scb-search`].size,this.fullScreen=!1,this._inputFocused=!1,this._visibleSuggestions=0,this._listDepsLoaded=!1,this._activeIndex=-1,this._listboxId=`scb-search-listbox-${++yu}`,this._kbMode=!1,this._valueOnFocus=``,this._lastChangeValue=``,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key===`Tab`&&(ic(),this._kbShouldShowRing=!0,this._inputFocused&&this._updateInputRingVisibility())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this._updateInputRingVisibility()},this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._onViewportScroll=()=>{this._positionSuggestionPopover()},this._listScrollHandler=()=>{let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
5559
+ `))}updated(e){if(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(`type`)||e.has(`size`)){if(this.cardType===`list`){let e=this.size===`small`?`-4`:this.size===`medium`?`-2`:`0`;this.setAttribute(`data-density`,e)}else this.removeAttribute(`data-density`);this.__syncListCardListSize(),this.__syncActionCardButtonSizes()}this.mediaFit&&this.mediaFit!==`cover`?this.style.setProperty(`--scb-card-media-fit`,this.mediaFit):this.style.removeProperty(`--scb-card-media-fit`),this.mediaPosition&&this.mediaPosition!==`center`?this.style.setProperty(`--scb-card-media-position`,this.mediaPosition):this.style.removeProperty(`--scb-card-media-position`),this.__syncSocialAttributes(),this.__ensureDependenciesReady(),this.__syncActionCardButtonSizes(),this.__syncAvatarSizes(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing(),(e.has(`innerPadding`)||e.has(`paddingTop`)||e.has(`paddingBottom`)||e.has(`paddingLeft`)||e.has(`paddingRight`))&&this.__applyPadding()}async firstUpdated(e){this.__lightDomObserver=new MutationObserver(()=>{this.__ensureDependenciesReady(),this.__syncListCardListSize(),this.__syncActionCardButtonSizes(),this.__syncAvatarSizes()}),this.__lightDomObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`slot`]}),this.__ensureDependenciesReady(),this.__syncListCardListSize(),this.__syncActionCardButtonSizes(),this.__syncAvatarSizes(),this.__applySpacing(),this.__applyPadding(),this.__syncSocialAttributes(),this.__primaryHref()&&this.contains(document.activeElement)&&this.__ensureFocusRingOnFocusVisible(),this.__primaryHref()&&this.matches(`:hover`)&&this.__ensureRippleOnInteraction()}disconnectedCallback(){this.__lightDomObserver?.disconnect(),this.__lightDomObserver=void 0,super.disconnectedCallback()}};N([_({type:String,reflect:!0,converter:z})],B.prototype,`type`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`variant`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`direction`,void 0),N([_({type:String,reflect:!0})],B.prototype,`size`,void 0),N([_({type:String,attribute:`media-type`})],B.prototype,`mediaType`,void 0),N([_({type:String,attribute:`media-href`})],B.prototype,`mediaHref`,void 0),N([_({type:String,attribute:`media-alt`})],B.prototype,`mediaAlt`,void 0),N([_({type:String,attribute:`media-srcset`})],B.prototype,`mediaSrcset`,void 0),N([_({type:String,attribute:`media-sizes`})],B.prototype,`mediaSizes`,void 0),N([_({type:String,attribute:`media-loading`})],B.prototype,`mediaLoading`,void 0),N([_({type:String,attribute:`media-decoding`})],B.prototype,`mediaDecoding`,void 0),N([_({type:String,attribute:`media-fetchpriority`})],B.prototype,`mediaFetchPriority`,void 0),N([_({type:String,attribute:`media-fit`})],B.prototype,`mediaFit`,void 0),N([_({type:String,attribute:`media-position`})],B.prototype,`mediaPosition`,void 0),N([_({type:String,attribute:`media-width`})],B.prototype,`mediaWidth`,void 0),N([_({type:String,attribute:`media-height`})],B.prototype,`mediaHeight`,void 0),N([_({type:String,attribute:`media-aspect`})],B.prototype,`mediaAspect`,void 0),N([_({type:Boolean,attribute:`media-placeholder`})],B.prototype,`mediaPlaceholder`,void 0),N([_({type:String,attribute:`card-href`,reflect:!0,converter:z})],B.prototype,`cardHref`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`href`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`title`,void 0),N([_({type:String,attribute:`card-title`,reflect:!0,converter:z})],B.prototype,`cardTitle`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`subtitle`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`vignette`,void 0),N([_({type:String,attribute:`vignette-variant`,converter:z})],B.prototype,`vignetteVariant`,void 0),N([_({type:String,attribute:`vignette-spacing`,reflect:!0,converter:z})],B.prototype,`vignetteSpacing`,void 0),N([_({type:String,attribute:`vignette-spacing-top`,reflect:!0,converter:z})],B.prototype,`vignetteSpacingTop`,void 0),N([_({type:String,attribute:`vignette-spacing-bottom`,reflect:!0,converter:z})],B.prototype,`vignetteSpacingBottom`,void 0),N([_({type:String,attribute:`vignette-spacing-left`,reflect:!0,converter:z})],B.prototype,`vignetteSpacingLeft`,void 0),N([_({type:String,attribute:`vignette-spacing-right`,reflect:!0,converter:z})],B.prototype,`vignetteSpacingRight`,void 0),N([_({type:String,attribute:`supporting-text`,reflect:!0,converter:z})],B.prototype,`supportingText`,void 0),N([_({type:Date,reflect:!0})],B.prototype,`date`,void 0),N([_({type:String,attribute:`social-comments-text`})],B.prototype,`commentsText`,void 0),N([_({type:Number,attribute:`social-comments`})],B.prototype,`comments`,void 0),N([_({type:Boolean,attribute:`social-comments-disabled`})],B.prototype,`commentsDisabled`,void 0),N([_({type:String,attribute:`social-comments-href`})],B.prototype,`commentsHref`,void 0),N([_({type:String,attribute:`social-comments-link-label`})],B.prototype,`commentsLinkLabel`,void 0),N([_({type:String,attribute:`social-likes-text`})],B.prototype,`likesText`,void 0),N([_({type:String,attribute:`social-like-label`})],B.prototype,`likeLabel`,void 0),N([_({type:Number,attribute:`social-likes`})],B.prototype,`likes`,void 0),N([_({type:Boolean,attribute:`social-likes-disabled`})],B.prototype,`likesDisabled`,void 0),N([_({type:String,attribute:`social-likes-hover-content`})],B.prototype,`likesHoverContent`,void 0),N([_({type:Boolean,attribute:`social-has-liked`})],B.prototype,`hasLiked`,void 0),N([_({type:Boolean,attribute:`social-likes-interactive`})],B.prototype,`likesInteractive`,void 0),N([_({type:Boolean,attribute:`social-author`})],B.prototype,`author`,void 0),N([_({type:String,attribute:`social-author-text`})],B.prototype,`authorText`,void 0),N([_({type:String,attribute:`social-author-href`})],B.prototype,`authorHref`,void 0),N([_({type:Boolean,attribute:`social-reply-enabled`})],B.prototype,`replyEnabled`,void 0),N([_({type:String,attribute:`social-reply-label`})],B.prototype,`replyLabel`,void 0),N([_({type:Boolean,attribute:`social-edit-enabled`})],B.prototype,`editEnabled`,void 0),N([_({type:String,attribute:`social-edit-label`})],B.prototype,`editLabel`,void 0),N([_({type:Boolean,attribute:`social-delete-enabled`})],B.prototype,`deleteEnabled`,void 0),N([_({type:String,attribute:`social-delete-label`})],B.prototype,`deleteLabel`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`sizing`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`,converter:z})],B.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`,converter:z})],B.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0,converter:z})],B.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0,converter:z})],B.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0,converter:z})],B.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0,converter:z})],B.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0,converter:z})],B.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`padding`,reflect:!0,converter:z})],B.prototype,`innerPadding`,void 0),N([_({type:String,attribute:`padding-top`,reflect:!0,converter:z})],B.prototype,`paddingTop`,void 0),N([_({type:String,attribute:`padding-bottom`,reflect:!0,converter:z})],B.prototype,`paddingBottom`,void 0),N([_({type:String,attribute:`padding-left`,reflect:!0,converter:z})],B.prototype,`paddingLeft`,void 0),N([_({type:String,attribute:`padding-right`,reflect:!0,converter:z})],B.prototype,`paddingRight`,void 0),B=N([a(`scb-card`)],B);var mu=class extends B{constructor(){super(),this.type=`list`}get cardType(){return`list`}};mu=N([a(`scb-list-card`)],mu);var hu=class extends B{constructor(){super(),this.type=`link`}get cardType(){return`link`}};hu=N([a(`scb-link-card`)],hu);var gu=class extends B{constructor(){super(),this.type=`action`}get cardType(){return`action`}};gu=N([a(`scb-action-card`)],gu);var _u=class extends B{constructor(){super(),this.type=`social`}get cardType(){return`social`}};_u=N([a(`scb-social-card`)],_u);var vu=class extends B{constructor(){super(),this.type=`container`}get cardType(){return`container`}};vu=N([a(`scb-container-card`)],vu);var yu=n({ScbSearch:()=>V}),bu,V,xu=t((()=>{w(),b(),E(),D(),j(),wl(),uc(),cc(),P(),bu=0,V=class extends C{static{this.formAssociated=!0}async _ensureListDepsLoaded(){this._listDepsLoaded||(this._listDepsPromise??=Promise.resolve().then(()=>(el(),Xc)).then(()=>{this._listDepsLoaded=!0}),await this._listDepsPromise)}_ensureListDepsWhenNeeded(){let e=(this.value??``).trim().length>0;!this._inputFocused||!e||!this._hasSuggestions||this._ensureListDepsLoaded().then(()=>this.requestUpdate())}constructor(){super(),this._internals=null,this.supportingText=``,this.inputLabel=``,this.clearLabel=`Rensa sökfält`,this.suggestionsLabel=`Sökförslag`,this.errorText=``,this.value=``,this.name=``,this.disabled=!1,this.required=!1,this.error=!1,this.autocomplete=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size=lc[`scb-search`].size,this.fullScreen=!1,this._inputFocused=!1,this._visibleSuggestions=0,this._listDepsLoaded=!1,this._activeIndex=-1,this._listboxId=`scb-search-listbox-${++bu}`,this._kbMode=!1,this._valueOnFocus=``,this._lastChangeValue=``,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key===`Tab`&&(ic(),this._kbShouldShowRing=!0,this._inputFocused&&this._updateInputRingVisibility())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this._updateInputRingVisibility()},this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._onViewportScroll=()=>{this._positionSuggestionPopover()},this._listScrollHandler=()=>{let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
5560
5560
  :host {
5561
5561
  /* Fälttext: base text current. JSON-källa: src/tokens/source/typography.json. */
5562
5562
  --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))));
@@ -6156,7 +6156,7 @@
6156
6156
  --scb-search-design-search-icon-gap: var(--scb-search-design-search-icon-gap-large);
6157
6157
  }
6158
6158
  /* design:bindings:scb-search:end */
6159
- `}_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`)}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._onWindowResize=this._onWindowResize.bind(this),window.addEventListener(`resize`,this._onWindowResize,{passive:!0}),window.addEventListener(`scroll`,this._onViewportScroll,{passive:!0,capture:!0}),window.addEventListener(`keydown`,this._onGlobalKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalPointerDown,!0),this._initialValue=this.value??``,this._lastChangeValue=this.value??``,this._form=this.closest(`form`),this._form&&(this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler=()=>{this.value=this._initialValue;let e=this._inputEl();e&&(e.value=this._initialValue),this._lastChangeValue=this._initialValue,this._syncFormValue(),this._filterSuggestions(this.value),this._activeIndex=-1,this._kbMode=!1,this.error=!1,this._hasValidationBeenReported=!1,this._updateComboboxA11y(),this._syncValidity()},this._form.addEventListener(`reset`,this._formResetHandler,!0)),this._syncFormValue(),this._syncValidity()}disconnectedCallback(){let e=this._inputEl();e&&this._boundNativeKeydown&&e.removeEventListener(`keydown`,this._boundNativeKeydown,!0),this._detachListScrollListener(),window.removeEventListener(`resize`,this._onWindowResize),window.removeEventListener(`scroll`,this._onViewportScroll,!0),z(this._listEl()),window.removeEventListener(`keydown`,this._onGlobalKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalPointerDown,!0),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),super.disconnectedCallback()}firstUpdated(){this._ensureListboxA11y(),this._updateComboboxA11y();let e=this._inputEl();e&&(this._boundNativeKeydown=e=>this._handleKey(e),e.addEventListener(`keydown`,this._boundNativeKeydown,!0),e.disabled=this.disabled),this.applySpacing()}updated(e){if(super.updated(e),e.has(`size`)&&this._syncDensityForSize(),this._ensureListboxA11y(),this._updateComboboxA11y(),this._attachListScrollListener(),this._syncSuggestionPopover(),(e.has(`value`)||e.has(`disabled`))&&this._syncFormValue(),(e.has(`value`)||e.has(`disabled`)||e.has(`required`)||e.has(`errorText`))&&this._syncValidity(),e.has(`disabled`)){this.toggleAttribute(`aria-disabled`,this.disabled);let e=this._inputEl();e&&(e.disabled=this.disabled)}(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){let e=(this.value??``).trim().length>0,t=this._inputFocused&&e&&this._hasSuggestions&&this._listDepsLoaded,n=this.error?this._validationMessage||this.errorText||`Ogiltig sökning.`:``,r=n?`search-supporting-text`:void 0,i=this.inputLabel||this.supportingText||`Sök`;return x`
6159
+ `}_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`)}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._onWindowResize=this._onWindowResize.bind(this),window.addEventListener(`resize`,this._onWindowResize,{passive:!0}),window.addEventListener(`scroll`,this._onViewportScroll,{passive:!0,capture:!0}),window.addEventListener(`keydown`,this._onGlobalKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalPointerDown,!0),this._initialValue=this.value??``,this._lastChangeValue=this.value??``,this._form=this.closest(`form`),this._form&&(this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler=()=>{this.value=this._initialValue;let e=this._inputEl();e&&(e.value=this._initialValue),this._lastChangeValue=this._initialValue,this._syncFormValue(),this._filterSuggestions(this.value),this._activeIndex=-1,this._kbMode=!1,this.error=!1,this._hasValidationBeenReported=!1,this._updateComboboxA11y(),this._syncValidity()},this._form.addEventListener(`reset`,this._formResetHandler,!0)),this._syncFormValue(),this._syncValidity()}disconnectedCallback(){let e=this._inputEl();e&&this._boundNativeKeydown&&e.removeEventListener(`keydown`,this._boundNativeKeydown,!0),this._detachListScrollListener(),window.removeEventListener(`resize`,this._onWindowResize),window.removeEventListener(`scroll`,this._onViewportScroll,!0),R(this._listEl()),window.removeEventListener(`keydown`,this._onGlobalKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalPointerDown,!0),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),super.disconnectedCallback()}firstUpdated(){this._ensureListboxA11y(),this._updateComboboxA11y();let e=this._inputEl();e&&(this._boundNativeKeydown=e=>this._handleKey(e),e.addEventListener(`keydown`,this._boundNativeKeydown,!0),e.disabled=this.disabled),this.applySpacing()}updated(e){if(super.updated(e),e.has(`size`)&&this._syncDensityForSize(),this._ensureListboxA11y(),this._updateComboboxA11y(),this._attachListScrollListener(),this._syncSuggestionPopover(),(e.has(`value`)||e.has(`disabled`))&&this._syncFormValue(),(e.has(`value`)||e.has(`disabled`)||e.has(`required`)||e.has(`errorText`))&&this._syncValidity(),e.has(`disabled`)){this.toggleAttribute(`aria-disabled`,this.disabled);let e=this._inputEl();e&&(e.disabled=this.disabled)}(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){let e=(this.value??``).trim().length>0,t=this._inputFocused&&e&&this._hasSuggestions&&this._listDepsLoaded,n=this.error?this._validationMessage||this.errorText||`Ogiltig sökning.`:``,r=n?`search-supporting-text`:void 0,i=this.inputLabel||this.supportingText||`Sök`;return x`
6160
6160
  <div class="ripple-wrapper">
6161
6161
  <md-icon class="leading">${e?`arrow_back`:`search`}</md-icon>
6162
6162
 
@@ -6207,7 +6207,7 @@
6207
6207
  <md-focus-ring id="optionRing" class="option-ring"></md-focus-ring>
6208
6208
  `:S}
6209
6209
  ${n?x`<span id="search-supporting-text" class="supporting-text">${n}</span>`:S}
6210
- `}formDisabledCallback(e){this.disabled=e,e&&(this._hasValidationBeenReported=!1)}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!(this.value??``).trim()?this.errorText||`Fyll i det här fältet.`:``}_syncValidity(){let e=this._inputEl(),t=this.disabled?``:this._getValidationMessage(),n=this.error,r=this._validationMessage;if(e&&e.setCustomValidity(t),this._internals)if(t){let n=this._customValidationMessage?{customError:!0}:{valueMissing:!0};this._internals.setValidity(n,t,e??void 0)}else this._internals.setValidity({});this._validationMessage=t,this.error=this.disabled?!1:t?this._hasValidationBeenReported||n:n&&!this._hasValidationBeenReported&&!r,e&&e.setAttribute(`aria-invalid`,this.error?`true`:`false`),this.toggleAttribute(`aria-invalid`,this.error),(n!==this.error||r!==this._validationMessage)&&this.requestUpdate()}checkValidity(){return this._syncValidity(),this._internals?this._internals.checkValidity():!this.error}reportValidity(){this._hasValidationBeenReported=!0,this._syncValidity();let e=this._inputEl();return e?e.reportValidity():this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=String(e??``),this._syncValidity()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}get labels(){return this._internals?.labels}submit(){let e=this._getActiveItem(),t={value:this.value};e&&(t.active=this._itemPayload(e)),this._dispatchSubmit(t)}focus(e){let t=this._inputEl();if(t){t.focus(e);return}this.updateComplete.then(()=>this._inputEl()?.focus(e))}blur(){this._inputEl()?.blur()}get _hasSuggestions(){return this._visibleSuggestions>=0?this._visibleSuggestions>0:Array.from(this.getElementsByTagName(`scb-list-item`)).some(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_onSlotChange(){this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded()}_onInput(e){e.stopPropagation();let t=e.target;this.value=t.value,this._syncFormValue(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y();let n={value:this.value};this.dispatchEvent(new CustomEvent(`scb-search-input`,{detail:n,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchinput`,{detail:n,bubbles:!0,composed:!0})),this._dispatchStandardInput()}_onNativeChange(e){e.stopPropagation()}_onFocus(){this.disabled||(this._valueOnFocus=this.value??``,this._inputFocused=!0,this._updateInputRingVisibility(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._updateComboboxA11y(),this.requestUpdate())}_onBlur(){setTimeout(()=>{this._inputFocused=!1,this._activeIndex=-1,this._kbMode=!1,this._updateInputRingVisibility(),this._updateComboboxA11y(),this._hideOptionRing(),this._valueOnFocus!==(this.value??``)&&this._dispatchStandardChangeIfNeeded(),this.requestUpdate()},100)}_updateInputRingVisibility(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}_handleKey(e){if(this.disabled||!this._inputEl())return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0,i=e.key,a=e.keyCode,o=i===`ArrowDown`||i===`Down`||a===40,s=i===`ArrowUp`||i===`Up`||a===38,c=i===`Home`||a===36,l=i===`End`||a===35,u=i===`Enter`||a===13,d=i===`Escape`||i===`Esc`||a===27;if(o){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,1);return}if(s){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,-1);return}if(c){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?0:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(l){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?t.length-1:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(u){if(!r){let t=this._internals?.form??this._form??this.closest(`form`);t?(e.preventDefault(),this.reportValidity()&&t.requestSubmit()):this.submit();return}e.preventDefault();let t=this._getActiveItem();if(t){let e=t.getAttribute(`label`)||``;this.value=e,this._syncFormValue(),this._dispatchStandardInput(),this._dispatchSubmit({value:this.value,active:this._itemPayload(t)}),this._visibleSuggestions=0,this._activeIndex=-1,this._kbMode=!1,this._hideOptionRing(),this.requestUpdate()}else this.submit();return}if(d){e.preventDefault(),this._clearInput();return}}_clearInput(){if(this.disabled)return;this.value=``,this._activeIndex=-1,this._kbMode=!1;let e=this._inputEl();e&&(e.value=``,e.focus()),this._filterSuggestions(``),this._updateComboboxA11y(),this._hideOptionRing(),this._syncFormValue(),this._dispatchStandardInput(),this.dispatchEvent(new CustomEvent(`scb-search-clear`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchclear`,{bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}_filterSuggestions(e){let t=(e??``).trim().toLowerCase(),n=Array.from(this.querySelectorAll(`scb-list-item`)),r=0;for(let e of n){let n=`${(e.getAttribute(`label`)||``).toLowerCase()} ${(e.getAttribute(`supporting-text`)||``).toLowerCase()}`.trim();t!==``&&n.includes(t)?(e.removeAttribute(`hidden`),r++):e.setAttribute(`hidden`,``),this._ensureOptionA11y(e)}this._visibleSuggestions=r,this._activeIndex>=r&&(this._activeIndex=-1),this._updateComboboxA11y(),this.requestUpdate()}_inputEl(){return this.renderRoot?.querySelector(`#searchInput`)??null}_listEl(){return this.renderRoot?.querySelector(`scb-list.suggestion-list`)??null}_ringEl(){return this.renderRoot?.querySelector(`#optionRing`)??null}_getVisibleItems(){return Array.from(this.querySelectorAll(`scb-list-item`)).filter(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_getActiveItem(){let e=this._getVisibleItems();return this._activeIndex<0||this._activeIndex>=e.length?null:e[this._activeIndex]??null}_moveActive(e,t){if(!e.length){this._activeIndex=-1,this._updateComboboxA11y(),this._hideOptionRing();return}let n=this._activeIndex+t;this._activeIndex===-1?n=t>0?0:e.length-1:(n<0&&(n=0),n>=e.length&&(n=e.length-1)),this._activeIndex=n,this._updateComboboxA11y(),this._scrollActiveIntoView()}_scrollActiveIntoView(){let e=this._getActiveItem(),t=this._listEl();if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.top<n.top?t.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(t.scrollTop+=r.bottom-n.bottom)}_itemPayload(e){return{label:e.getAttribute(`label`)||``,supportingText:e.getAttribute(`supporting-text`)||``,href:e.getAttribute(`href`)||``,type:e.getAttribute(`type`)||``,id:e.id||``}}_ensureListboxA11y(){let e=this._listEl();e&&(e.id||=this._listboxId,e.setAttribute(`role`,`listbox`),e.setAttribute(`aria-label`,this.suggestionsLabel)),Array.from(this.querySelectorAll(`scb-list-item`)).forEach(e=>this._ensureOptionA11y(e))}_ensureOptionA11y(e){e.id||=`${this._listboxId}-opt-${Math.random().toString(36).slice(2,8)}`,e.setAttribute(`role`,`option`),e.setAttribute(`tabindex`,`-1`)}_updateComboboxA11y(){let e=this._inputEl();if(!e)return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0;e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-controls`,this._listboxId),e.setAttribute(`aria-expanded`,String(r));let i=r?this._getActiveItem():null;i?.id?e.setAttribute(`aria-activedescendant`,i.id):e.removeAttribute(`aria-activedescendant`),this._kbMode&&i&&r?this._positionOptionRing(i):this._hideOptionRing()}_positionOptionRing(e){let t=this._ringEl(),n=this._listEl();if(!t||!n)return;let r=this.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.top-r.top,o=i.left-r.left,s=i.width,c=i.height;t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.width=`${s}px`,t.style.height=`${c}px`,t.setAttribute(`data-show`,`true`)}_hideOptionRing(){let e=this._ringEl();e&&e.removeAttribute(`data-show`)}_onWindowResize(){let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e),this._positionSuggestionPopover()}_syncSuggestionPopover(){let e=this._listEl();if(!e||this.fullScreen){z(e);return}_l(e)&&requestAnimationFrame(()=>this._positionSuggestionPopover())}_positionSuggestionPopover(){let e=this._listEl(),t=this._inputEl();if(!e||!t||!yl(e))return;let n=t.getBoundingClientRect(),r=Math.max(0,window.innerWidth-16),i=Math.min(n.width,r),a=Math.min(Math.max(n.left,8),window.innerWidth-8-i),o=e.getBoundingClientRect().height||e.scrollHeight,s=window.innerHeight-n.bottom-8,c=n.top-8,l=o>s&&c>s,u=Math.max(0,l?c:s);e.style.position=`fixed`,e.style.left=`${Math.round(a)}px`,e.style.width=`${Math.round(i)}px`,e.style.right=`auto`,e.style.maxHeight=`${Math.round(u)}px`,l?(e.style.top=`auto`,e.style.bottom=`${Math.round(window.innerHeight-n.top)}px`):(e.style.top=`${Math.round(n.bottom)}px`,e.style.bottom=`auto`)}_attachListScrollListener(){let e=this._listEl();!e||this._listWithHandler===e||(this._detachListScrollListener(),e.addEventListener(`scroll`,this._listScrollHandler,{passive:!0}),this._listWithHandler=e)}_detachListScrollListener(){this._listWithHandler&&=(this._listWithHandler.removeEventListener(`scroll`,this._listScrollHandler),void 0)}_dispatchStandardInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}_dispatchStandardChangeIfNeeded(){let e=this.value??``;e!==this._lastChangeValue&&(this._lastChangeValue=e,this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})))}_dispatchSubmit(e){this.dispatchEvent(new CustomEvent(`scb-search-submit`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchsubmit`,{detail:e,bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}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-search-spacing-block-start`,t):this.style.removeProperty(`--scb-search-spacing-block-start`),n?this.style.setProperty(`--scb-search-spacing-block-end`,n):this.style.removeProperty(`--scb-search-spacing-block-end`),r?this.style.setProperty(`--scb-search-spacing-inline-start`,r):this.style.removeProperty(`--scb-search-spacing-inline-start`),i?this.style.setProperty(`--scb-search-spacing-inline-end`,i):this.style.removeProperty(`--scb-search-spacing-inline-end`)}_syncFormValue(){if(!this._internals)return;let e=this.disabled?null:this.value;this._internals.setFormValue(e)}},N([_({type:String,attribute:`trailing-icon`})],H.prototype,`trailingIcon`,void 0),N([_({type:String,attribute:`supporting-text`})],H.prototype,`supportingText`,void 0),N([_({type:String,attribute:`input-label`})],H.prototype,`inputLabel`,void 0),N([_({type:String,attribute:`clear-label`})],H.prototype,`clearLabel`,void 0),N([_({type:String,attribute:`suggestions-label`})],H.prototype,`suggestionsLabel`,void 0),N([_({type:String,attribute:`error-text`})],H.prototype,`errorText`,void 0),N([_({type:String})],H.prototype,`value`,void 0),N([_({type:String,reflect:!0})],H.prototype,`name`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`autocomplete`,void 0),N([_({type:String,reflect:!0})],H.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],H.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],H.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],H.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],H.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],H.prototype,`size`,void 0),N([_({type:Boolean,attribute:`full-screen`,reflect:!0})],H.prototype,`fullScreen`,void 0),N([v()],H.prototype,`_listDepsLoaded`,void 0),H=N([a(`scb-search`)],H)}));w(),b(),uc(),al(),Oc(),bu(),pc(),Cl(),cc(),P();var xu={default:{size:`small`,variant:`centered`},"small-flexible":{size:`small`,variant:`start`},search:{size:`small`,variant:`search`},"medium-flexible":{size:`medium`,variant:`start`},"large-flexible":{size:`large`,variant:`start`}},Su={"action-padding-inline":{small:`var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))`,medium:`var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))`,large:`var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))`},"action-padding-block":{small:`var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))`,medium:`var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))`,large:`var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))`}},Cu=`data-scb-app-bar-managed-action-size`,wu=`data-scb-app-bar-managed-avatar-size`,Tu=class extends C{constructor(...e){super(...e),this.title=``,this.appBarTitle=``,this.size=lc[`scb-app-bar`].size,this.variant=`centered`,this.type=``,this.position=`default`,this.ariaLabel=``,this.defaultAriaLabel=`Appfält`,this.searchAriaLabel=`Sökfält`,this.searchSupportingText=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__titleResizeRaf=0}static{this.styles=[p`
6210
+ `}formDisabledCallback(e){this.disabled=e,e&&(this._hasValidationBeenReported=!1)}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!(this.value??``).trim()?this.errorText||`Fyll i det här fältet.`:``}_syncValidity(){let e=this._inputEl(),t=this.disabled?``:this._getValidationMessage(),n=this.error,r=this._validationMessage;if(e&&e.setCustomValidity(t),this._internals)if(t){let n=this._customValidationMessage?{customError:!0}:{valueMissing:!0};this._internals.setValidity(n,t,e??void 0)}else this._internals.setValidity({});this._validationMessage=t,this.error=this.disabled?!1:t?this._hasValidationBeenReported||n:n&&!this._hasValidationBeenReported&&!r,e&&e.setAttribute(`aria-invalid`,this.error?`true`:`false`),this.toggleAttribute(`aria-invalid`,this.error),(n!==this.error||r!==this._validationMessage)&&this.requestUpdate()}checkValidity(){return this._syncValidity(),this._internals?this._internals.checkValidity():!this.error}reportValidity(){this._hasValidationBeenReported=!0,this._syncValidity();let e=this._inputEl();return e?e.reportValidity():this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=String(e??``),this._syncValidity()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}get labels(){return this._internals?.labels}submit(){let e=this._getActiveItem(),t={value:this.value};e&&(t.active=this._itemPayload(e)),this._dispatchSubmit(t)}focus(e){let t=this._inputEl();if(t){t.focus(e);return}this.updateComplete.then(()=>this._inputEl()?.focus(e))}blur(){this._inputEl()?.blur()}get _hasSuggestions(){return this._visibleSuggestions>=0?this._visibleSuggestions>0:Array.from(this.getElementsByTagName(`scb-list-item`)).some(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_onSlotChange(){this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded()}_onInput(e){e.stopPropagation();let t=e.target;this.value=t.value,this._syncFormValue(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y();let n={value:this.value};this.dispatchEvent(new CustomEvent(`scb-search-input`,{detail:n,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchinput`,{detail:n,bubbles:!0,composed:!0})),this._dispatchStandardInput()}_onNativeChange(e){e.stopPropagation()}_onFocus(){this.disabled||(this._valueOnFocus=this.value??``,this._inputFocused=!0,this._updateInputRingVisibility(),this._filterSuggestions(this.value),this._ensureListDepsWhenNeeded(),this._updateComboboxA11y(),this.requestUpdate())}_onBlur(){setTimeout(()=>{this._inputFocused=!1,this._activeIndex=-1,this._kbMode=!1,this._updateInputRingVisibility(),this._updateComboboxA11y(),this._hideOptionRing(),this._valueOnFocus!==(this.value??``)&&this._dispatchStandardChangeIfNeeded(),this.requestUpdate()},100)}_updateInputRingVisibility(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}_handleKey(e){if(this.disabled||!this._inputEl())return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0,i=e.key,a=e.keyCode,o=i===`ArrowDown`||i===`Down`||a===40,s=i===`ArrowUp`||i===`Up`||a===38,c=i===`Home`||a===36,l=i===`End`||a===35,u=i===`Enter`||a===13,d=i===`Escape`||i===`Esc`||a===27;if(o){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,1);return}if(s){if(!r)return;e.preventDefault(),this._kbMode=!0,this._moveActive(t,-1);return}if(c){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?0:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(l){if(!r)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=t.length?t.length-1:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(u){if(!r){let t=this._internals?.form??this._form??this.closest(`form`);t?(e.preventDefault(),this.reportValidity()&&t.requestSubmit()):this.submit();return}e.preventDefault();let t=this._getActiveItem();if(t){let e=t.getAttribute(`label`)||``;this.value=e,this._syncFormValue(),this._dispatchStandardInput(),this._dispatchSubmit({value:this.value,active:this._itemPayload(t)}),this._visibleSuggestions=0,this._activeIndex=-1,this._kbMode=!1,this._hideOptionRing(),this.requestUpdate()}else this.submit();return}if(d){e.preventDefault(),this._clearInput();return}}_clearInput(){if(this.disabled)return;this.value=``,this._activeIndex=-1,this._kbMode=!1;let e=this._inputEl();e&&(e.value=``,e.focus()),this._filterSuggestions(``),this._updateComboboxA11y(),this._hideOptionRing(),this._syncFormValue(),this._dispatchStandardInput(),this.dispatchEvent(new CustomEvent(`scb-search-clear`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchclear`,{bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}_filterSuggestions(e){let t=(e??``).trim().toLowerCase(),n=Array.from(this.querySelectorAll(`scb-list-item`)),r=0;for(let e of n){let n=`${(e.getAttribute(`label`)||``).toLowerCase()} ${(e.getAttribute(`supporting-text`)||``).toLowerCase()}`.trim();t!==``&&n.includes(t)?(e.removeAttribute(`hidden`),r++):e.setAttribute(`hidden`,``),this._ensureOptionA11y(e)}this._visibleSuggestions=r,this._activeIndex>=r&&(this._activeIndex=-1),this._updateComboboxA11y(),this.requestUpdate()}_inputEl(){return this.renderRoot?.querySelector(`#searchInput`)??null}_listEl(){return this.renderRoot?.querySelector(`scb-list.suggestion-list`)??null}_ringEl(){return this.renderRoot?.querySelector(`#optionRing`)??null}_getVisibleItems(){return Array.from(this.querySelectorAll(`scb-list-item`)).filter(e=>!e.hasAttribute(`hidden`)&&e.style.display!==`none`)}_getActiveItem(){let e=this._getVisibleItems();return this._activeIndex<0||this._activeIndex>=e.length?null:e[this._activeIndex]??null}_moveActive(e,t){if(!e.length){this._activeIndex=-1,this._updateComboboxA11y(),this._hideOptionRing();return}let n=this._activeIndex+t;this._activeIndex===-1?n=t>0?0:e.length-1:(n<0&&(n=0),n>=e.length&&(n=e.length-1)),this._activeIndex=n,this._updateComboboxA11y(),this._scrollActiveIntoView()}_scrollActiveIntoView(){let e=this._getActiveItem(),t=this._listEl();if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();r.top<n.top?t.scrollTop-=n.top-r.top:r.bottom>n.bottom&&(t.scrollTop+=r.bottom-n.bottom)}_itemPayload(e){return{label:e.getAttribute(`label`)||``,supportingText:e.getAttribute(`supporting-text`)||``,href:e.getAttribute(`href`)||``,type:e.getAttribute(`type`)||``,id:e.id||``}}_ensureListboxA11y(){let e=this._listEl();e&&(e.id||=this._listboxId,e.setAttribute(`role`,`listbox`),e.setAttribute(`aria-label`,this.suggestionsLabel)),Array.from(this.querySelectorAll(`scb-list-item`)).forEach(e=>this._ensureOptionA11y(e))}_ensureOptionA11y(e){e.id||=`${this._listboxId}-opt-${Math.random().toString(36).slice(2,8)}`,e.setAttribute(`role`,`option`),e.setAttribute(`tabindex`,`-1`)}_updateComboboxA11y(){let e=this._inputEl();if(!e)return;let t=this._getVisibleItems(),n=(this.value??``).trim().length>0,r=this._inputFocused&&n&&t.length>0;e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-controls`,this._listboxId),e.setAttribute(`aria-expanded`,String(r));let i=r?this._getActiveItem():null;i?.id?e.setAttribute(`aria-activedescendant`,i.id):e.removeAttribute(`aria-activedescendant`),this._kbMode&&i&&r?this._positionOptionRing(i):this._hideOptionRing()}_positionOptionRing(e){let t=this._ringEl(),n=this._listEl();if(!t||!n)return;let r=this.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.top-r.top,o=i.left-r.left,s=i.width,c=i.height;t.style.top=`${a}px`,t.style.left=`${o}px`,t.style.width=`${s}px`,t.style.height=`${c}px`,t.setAttribute(`data-show`,`true`)}_hideOptionRing(){let e=this._ringEl();e&&e.removeAttribute(`data-show`)}_onWindowResize(){let e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e),this._positionSuggestionPopover()}_syncSuggestionPopover(){let e=this._listEl();if(!e||this.fullScreen){R(e);return}vl(e)&&requestAnimationFrame(()=>this._positionSuggestionPopover())}_positionSuggestionPopover(){let e=this._listEl(),t=this._inputEl();if(!e||!t||!bl(e))return;let n=t.getBoundingClientRect(),r=Math.max(0,window.innerWidth-16),i=Math.min(n.width,r),a=Math.min(Math.max(n.left,8),window.innerWidth-8-i),o=e.getBoundingClientRect().height||e.scrollHeight,s=window.innerHeight-n.bottom-8,c=n.top-8,l=o>s&&c>s,u=Math.max(0,l?c:s);e.style.position=`fixed`,e.style.left=`${Math.round(a)}px`,e.style.width=`${Math.round(i)}px`,e.style.right=`auto`,e.style.maxHeight=`${Math.round(u)}px`,l?(e.style.top=`auto`,e.style.bottom=`${Math.round(window.innerHeight-n.top)}px`):(e.style.top=`${Math.round(n.bottom)}px`,e.style.bottom=`auto`)}_attachListScrollListener(){let e=this._listEl();!e||this._listWithHandler===e||(this._detachListScrollListener(),e.addEventListener(`scroll`,this._listScrollHandler,{passive:!0}),this._listWithHandler=e)}_detachListScrollListener(){this._listWithHandler&&=(this._listWithHandler.removeEventListener(`scroll`,this._listScrollHandler),void 0)}_dispatchStandardInput(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))}_dispatchStandardChangeIfNeeded(){let e=this.value??``;e!==this._lastChangeValue&&(this._lastChangeValue=e,this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})))}_dispatchSubmit(e){this.dispatchEvent(new CustomEvent(`scb-search-submit`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbsearchsubmit`,{detail:e,bubbles:!0,composed:!0})),this._dispatchStandardChangeIfNeeded()}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-search-spacing-block-start`,t):this.style.removeProperty(`--scb-search-spacing-block-start`),n?this.style.setProperty(`--scb-search-spacing-block-end`,n):this.style.removeProperty(`--scb-search-spacing-block-end`),r?this.style.setProperty(`--scb-search-spacing-inline-start`,r):this.style.removeProperty(`--scb-search-spacing-inline-start`),i?this.style.setProperty(`--scb-search-spacing-inline-end`,i):this.style.removeProperty(`--scb-search-spacing-inline-end`)}_syncFormValue(){if(!this._internals)return;let e=this.disabled?null:this.value;this._internals.setFormValue(e)}},N([_({type:String,attribute:`trailing-icon`})],V.prototype,`trailingIcon`,void 0),N([_({type:String,attribute:`supporting-text`})],V.prototype,`supportingText`,void 0),N([_({type:String,attribute:`input-label`})],V.prototype,`inputLabel`,void 0),N([_({type:String,attribute:`clear-label`})],V.prototype,`clearLabel`,void 0),N([_({type:String,attribute:`suggestions-label`})],V.prototype,`suggestionsLabel`,void 0),N([_({type:String,attribute:`error-text`})],V.prototype,`errorText`,void 0),N([_({type:String})],V.prototype,`value`,void 0),N([_({type:String,reflect:!0})],V.prototype,`name`,void 0),N([_({type:Boolean,reflect:!0})],V.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],V.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],V.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],V.prototype,`autocomplete`,void 0),N([_({type:String,reflect:!0})],V.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],V.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],V.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],V.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],V.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],V.prototype,`size`,void 0),N([_({type:Boolean,attribute:`full-screen`,reflect:!0})],V.prototype,`fullScreen`,void 0),N([v()],V.prototype,`_listDepsLoaded`,void 0),V=N([a(`scb-search`)],V)}));w(),b(),uc(),sl(),Oc(),xu(),pc(),wl(),cc(),P();var Su={default:{size:`small`,variant:`centered`},"small-flexible":{size:`small`,variant:`start`},search:{size:`small`,variant:`search`},"medium-flexible":{size:`medium`,variant:`start`},"large-flexible":{size:`large`,variant:`start`}},Cu={"action-padding-inline":{small:`var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))`,medium:`var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))`,large:`var(--scb-buttons-padding-inline-small, var(--spacing-4, 12px))`},"action-padding-block":{small:`var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))`,medium:`var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))`,large:`var(--scb-buttons-padding-block-small, var(--spacing-2, 4px))`}},wu=`data-scb-app-bar-managed-action-size`,Tu=`data-scb-app-bar-managed-avatar-size`,Eu=class extends C{constructor(...e){super(...e),this.title=``,this.appBarTitle=``,this.size=lc[`scb-app-bar`].size,this.variant=`centered`,this.type=``,this.position=`default`,this.ariaLabel=``,this.defaultAriaLabel=`Appfält`,this.searchAriaLabel=`Sökfält`,this.searchSupportingText=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__titleResizeRaf=0}static{this.styles=[p`
6211
6211
  :host {
6212
6212
  display: block;
6213
6213
  font-family: var(--brand-font, Inter, Arial, sans-serif);
@@ -6462,7 +6462,7 @@
6462
6462
  }
6463
6463
 
6464
6464
  /* design:bindings:scb-app-bar:end */
6465
- `]}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<`u`&&(this.__titleResizeObserver=new ResizeObserver(()=>this.#e()))}disconnectedCallback(){this.__titleResizeRaf&&=(cancelAnimationFrame(this.__titleResizeRaf),0),this.__titleResizeObserver?.disconnect(),this.__titleResizeObserver=void 0,z(this.renderRoot.querySelector(`header`)),super.disconnectedCallback()}handleActionsSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{this.#p(e)}),this.#e()}handleAvatarSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{this.#m(e)}),this.#e()}firstUpdated(){this.#a(),this.#g(),this.#t()}updated(e){if((e.has(`title`)||e.has(`appBarTitle`))&&(this.dispatchEvent(new CustomEvent(`title-changed`,{detail:{title:this.#o},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`app-bar-title-changed`,{detail:{appBarTitle:this.#o},bubbles:!0,composed:!0}))),e.has(`position`)){let e=this.renderRoot.querySelector(`header`);this.position===`top`||this.position===`bottom`?_l(e):z(e),this.dispatchEvent(new CustomEvent(`position-changed`,{detail:{position:this.position},bubbles:!0,composed:!0}))}e.has(`type`)&&this.dispatchEvent(new CustomEvent(`type-changed`,{detail:{type:this.type},bubbles:!0,composed:!0})),e.has(`size`)&&this.dispatchEvent(new CustomEvent(`size-changed`,{detail:{size:this.#l},bubbles:!0,composed:!0})),e.has(`variant`)&&this.dispatchEvent(new CustomEvent(`variant-changed`,{detail:{variant:this.#u},bubbles:!0,composed:!0})),(e.has(`type`)||e.has(`size`)||e.has(`variant`))&&this.updateComplete.then(()=>{this.#t()}),e.has(`searchSupportingText`)&&this.dispatchEvent(new CustomEvent(`search-supporting-text-changed`,{detail:{searchSupportingText:this.searchSupportingText},bubbles:!0,composed:!0})),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#a(),this.#g()}#e(){this.#u===`centered`&&(this.__titleResizeRaf||=requestAnimationFrame(()=>{this.__titleResizeRaf=0,this.#i()}))}#t(){this.__titleResizeObserver?.disconnect();let e=this.shadowRoot?.querySelector(`header`);if(e&&e.style.removeProperty(`--scb-app-bar-title-max-width`),this.#u!==`centered`||!this.__titleResizeObserver)return;let t=this.shadowRoot?.querySelector(`header.variant-centered`);if(!t)return;let n=t.querySelector(`.leading`),r=t.querySelector(`.trailing`);!n||!r||(this.__titleResizeObserver.observe(t),this.__titleResizeObserver.observe(n),this.__titleResizeObserver.observe(r),this.#e())}#n(e){if(!e)return 0;let t=parseFloat(e);return Number.isFinite(t)?t:0}#r(e){let t=getComputedStyle(e);return this.#n(t.columnGap||t.gap)}#i(){let e=this.shadowRoot?.querySelector(`header.variant-centered`);if(!e)return;let t=e.querySelector(`.leading`),n=e.querySelector(`.trailing`);if(!t||!n)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),o=getComputedStyle(e),s=this.#n(o.paddingInlineStart||o.paddingLeft),c=this.#n(o.paddingInlineEnd||o.paddingRight),l=Math.max(0,r.width-s-c),u=Math.max(i.width,a.width),d=Math.max(this.#r(t),this.#r(n)),f=Math.max(0,l-u*2-d*2);e.style.setProperty(`--scb-app-bar-title-max-width`,`${f}px`)}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}#a(){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-app-bar-spacing-block-start`,t):this.style.removeProperty(`--scb-app-bar-spacing-block-start`),n?this.style.setProperty(`--scb-app-bar-spacing-block-end`,n):this.style.removeProperty(`--scb-app-bar-spacing-block-end`),r?this.style.setProperty(`--scb-app-bar-spacing-inline-start`,r):this.style.removeProperty(`--scb-app-bar-spacing-inline-start`),i?this.style.setProperty(`--scb-app-bar-spacing-inline-end`,i):this.style.removeProperty(`--scb-app-bar-spacing-inline-end`)}get#o(){return this.appBarTitle||this.title}get#s(){return this.ariaLabel.trim()||(this.#u===`search`?this.searchAriaLabel:this.defaultAriaLabel)}get#c(){return this.type?xu[this.type]:void 0}get#l(){return this.#c&&!this.hasAttribute(`size`)?this.#c.size:this.size===`medium`||this.size===`large`?this.size:`small`}get#u(){return this.#c&&!this.hasAttribute(`variant`)?this.#c.variant:this.variant===`start`||this.variant===`search`?this.variant:`centered`}get#d(){return this.position===`bottom`?`position-bottom`:this.position===`top`?`position-top`:``}#f(e){let t=this.#l,n=Su[e]?.[t],r=`--scb-app-bar-design-${e}-${t}`;return n?`var(${r}, ${n})`:`var(${r})`}#p(e){if(!(e instanceof HTMLElement))return;let t=e.tagName;t!==`SCB-ICON-BUTTON`&&t!==`SCB-BUTTON`||(this.#h(e,Cu,M(this,`--scb-app-bar-design-action-component-size-${this.#l}`,[`small`,`medium`,`large`],`medium`)),t===`SCB-BUTTON`&&(e.style.setProperty(`--scb-button-padding-inline`,this.#f(`action-padding-inline`)),e.style.setProperty(`--scb-button-icon-edge-space`,this.#f(`action-padding-inline`)),e.style.setProperty(`--scb-button-padding-block`,this.#f(`action-padding-block`))))}#m(e){!(e instanceof HTMLElement)||e.tagName!==`SCB-AVATAR`||this.#h(e,wu,M(this,`--scb-app-bar-design-avatar-component-size-${this.#l}`,[`small`,`medium`,`large`,`extra-large`],`medium`))}#h(e,t,n){let r=e.getAttribute(t);if(r!==null&&e.getAttribute(`size`)!==r){e.removeAttribute(t);return}(!e.hasAttribute(`size`)||r!==null)&&(e.setAttribute(`size`,n),e.setAttribute(t,n))}#g(){this.renderRoot.querySelectorAll(`slot[name="leading"], slot[name="trailing"]`).forEach(e=>{e.assignedElements({flatten:!0}).forEach(e=>this.#p(e))}),this.renderRoot.querySelectorAll(`slot[name="avatar"]`).forEach(e=>{e.assignedElements({flatten:!0}).forEach(e=>this.#m(e))})}render(){let e=this.#u,t=this.#l,n=M(this,`--scb-app-bar-design-search-component-size-${t}`,[`extra-small`,`small`,`medium`,`large`],`small`);return x`
6465
+ `]}connectedCallback(){super.connectedCallback(),typeof ResizeObserver<`u`&&(this.__titleResizeObserver=new ResizeObserver(()=>this.#e()))}disconnectedCallback(){this.__titleResizeRaf&&=(cancelAnimationFrame(this.__titleResizeRaf),0),this.__titleResizeObserver?.disconnect(),this.__titleResizeObserver=void 0,R(this.renderRoot.querySelector(`header`)),super.disconnectedCallback()}handleActionsSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{this.#p(e)}),this.#e()}handleAvatarSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(e=>{this.#m(e)}),this.#e()}firstUpdated(){this.#a(),this.#g(),this.#t()}updated(e){if((e.has(`title`)||e.has(`appBarTitle`))&&(this.dispatchEvent(new CustomEvent(`title-changed`,{detail:{title:this.#o},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`app-bar-title-changed`,{detail:{appBarTitle:this.#o},bubbles:!0,composed:!0}))),e.has(`position`)){let e=this.renderRoot.querySelector(`header`);this.position===`top`||this.position===`bottom`?vl(e):R(e),this.dispatchEvent(new CustomEvent(`position-changed`,{detail:{position:this.position},bubbles:!0,composed:!0}))}e.has(`type`)&&this.dispatchEvent(new CustomEvent(`type-changed`,{detail:{type:this.type},bubbles:!0,composed:!0})),e.has(`size`)&&this.dispatchEvent(new CustomEvent(`size-changed`,{detail:{size:this.#l},bubbles:!0,composed:!0})),e.has(`variant`)&&this.dispatchEvent(new CustomEvent(`variant-changed`,{detail:{variant:this.#u},bubbles:!0,composed:!0})),(e.has(`type`)||e.has(`size`)||e.has(`variant`))&&this.updateComplete.then(()=>{this.#t()}),e.has(`searchSupportingText`)&&this.dispatchEvent(new CustomEvent(`search-supporting-text-changed`,{detail:{searchSupportingText:this.searchSupportingText},bubbles:!0,composed:!0})),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#a(),this.#g()}#e(){this.#u===`centered`&&(this.__titleResizeRaf||=requestAnimationFrame(()=>{this.__titleResizeRaf=0,this.#i()}))}#t(){this.__titleResizeObserver?.disconnect();let e=this.shadowRoot?.querySelector(`header`);if(e&&e.style.removeProperty(`--scb-app-bar-title-max-width`),this.#u!==`centered`||!this.__titleResizeObserver)return;let t=this.shadowRoot?.querySelector(`header.variant-centered`);if(!t)return;let n=t.querySelector(`.leading`),r=t.querySelector(`.trailing`);!n||!r||(this.__titleResizeObserver.observe(t),this.__titleResizeObserver.observe(n),this.__titleResizeObserver.observe(r),this.#e())}#n(e){if(!e)return 0;let t=parseFloat(e);return Number.isFinite(t)?t:0}#r(e){let t=getComputedStyle(e);return this.#n(t.columnGap||t.gap)}#i(){let e=this.shadowRoot?.querySelector(`header.variant-centered`);if(!e)return;let t=e.querySelector(`.leading`),n=e.querySelector(`.trailing`);if(!t||!n)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),o=getComputedStyle(e),s=this.#n(o.paddingInlineStart||o.paddingLeft),c=this.#n(o.paddingInlineEnd||o.paddingRight),l=Math.max(0,r.width-s-c),u=Math.max(i.width,a.width),d=Math.max(this.#r(t),this.#r(n)),f=Math.max(0,l-u*2-d*2);e.style.setProperty(`--scb-app-bar-title-max-width`,`${f}px`)}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}#a(){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-app-bar-spacing-block-start`,t):this.style.removeProperty(`--scb-app-bar-spacing-block-start`),n?this.style.setProperty(`--scb-app-bar-spacing-block-end`,n):this.style.removeProperty(`--scb-app-bar-spacing-block-end`),r?this.style.setProperty(`--scb-app-bar-spacing-inline-start`,r):this.style.removeProperty(`--scb-app-bar-spacing-inline-start`),i?this.style.setProperty(`--scb-app-bar-spacing-inline-end`,i):this.style.removeProperty(`--scb-app-bar-spacing-inline-end`)}get#o(){return this.appBarTitle||this.title}get#s(){return this.ariaLabel.trim()||(this.#u===`search`?this.searchAriaLabel:this.defaultAriaLabel)}get#c(){return this.type?Su[this.type]:void 0}get#l(){return this.#c&&!this.hasAttribute(`size`)?this.#c.size:this.size===`medium`||this.size===`large`?this.size:`small`}get#u(){return this.#c&&!this.hasAttribute(`variant`)?this.#c.variant:this.variant===`start`||this.variant===`search`?this.variant:`centered`}get#d(){return this.position===`bottom`?`position-bottom`:this.position===`top`?`position-top`:``}#f(e){let t=this.#l,n=Cu[e]?.[t],r=`--scb-app-bar-design-${e}-${t}`;return n?`var(${r}, ${n})`:`var(${r})`}#p(e){if(!(e instanceof HTMLElement))return;let t=e.tagName;t!==`SCB-ICON-BUTTON`&&t!==`SCB-BUTTON`||(this.#h(e,wu,M(this,`--scb-app-bar-design-action-component-size-${this.#l}`,[`small`,`medium`,`large`],`medium`)),t===`SCB-BUTTON`&&(e.style.setProperty(`--scb-button-padding-inline`,this.#f(`action-padding-inline`)),e.style.setProperty(`--scb-button-icon-edge-space`,this.#f(`action-padding-inline`)),e.style.setProperty(`--scb-button-padding-block`,this.#f(`action-padding-block`))))}#m(e){!(e instanceof HTMLElement)||e.tagName!==`SCB-AVATAR`||this.#h(e,Tu,M(this,`--scb-app-bar-design-avatar-component-size-${this.#l}`,[`small`,`medium`,`large`,`extra-large`],`medium`))}#h(e,t,n){let r=e.getAttribute(t);if(r!==null&&e.getAttribute(`size`)!==r){e.removeAttribute(t);return}(!e.hasAttribute(`size`)||r!==null)&&(e.setAttribute(`size`,n),e.setAttribute(t,n))}#g(){this.renderRoot.querySelectorAll(`slot[name="leading"], slot[name="trailing"]`).forEach(e=>{e.assignedElements({flatten:!0}).forEach(e=>this.#p(e))}),this.renderRoot.querySelectorAll(`slot[name="avatar"]`).forEach(e=>{e.assignedElements({flatten:!0}).forEach(e=>this.#m(e))})}render(){let e=this.#u,t=this.#l,n=M(this,`--scb-app-bar-design-search-component-size-${t}`,[`extra-small`,`small`,`medium`,`large`],`small`);return x`
6466
6466
  <header class=${`variant-${e} size-${t} ${this.#d}`} role="banner" aria-label=${this.#s}>
6467
6467
  <div class="leading">
6468
6468
  <slot name="leading" @slotchange=${this.handleActionsSlotChange}></slot>
@@ -6479,7 +6479,7 @@
6479
6479
  <slot name="avatar" @slotchange=${this.handleAvatarSlotChange}></slot>
6480
6480
  </div>
6481
6481
  </header>
6482
- `}};N([_({type:String,reflect:!0})],Tu.prototype,`title`,void 0),N([_({type:String,attribute:`app-bar-title`,reflect:!0})],Tu.prototype,`appBarTitle`,void 0),N([_({type:String,reflect:!0})],Tu.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Tu.prototype,`variant`,void 0),N([_({type:String})],Tu.prototype,`type`,void 0),N([_({type:String,reflect:!0})],Tu.prototype,`position`,void 0),N([_({type:String,attribute:`aria-label`,reflect:!0})],Tu.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`default-aria-label`})],Tu.prototype,`defaultAriaLabel`,void 0),N([_({type:String,attribute:`search-aria-label`})],Tu.prototype,`searchAriaLabel`,void 0),N([_({type:String,attribute:`search-supporting-text`,reflect:!0})],Tu.prototype,`searchSupportingText`,void 0),N([_({type:String,reflect:!0})],Tu.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Tu.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Tu.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Tu.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Tu.prototype,`spacingRight`,void 0),Tu=N([a(`scb-app-bar`)],Tu),w(),b(),P();var Eu=class extends C{constructor(...e){super(...e),this._slotClickHandler=e=>{let t=this.shadowRoot?.querySelector(`slot`),n=e.target;n&&n!==t&&n.dispatchEvent(new CustomEvent(`hide-badge`,{bubbles:!0,composed:!0}))},this.autoHide=!1,this.sizing=`fit-content`,this.position=`relative`,this.positionTop=0,this.positionRight=void 0,this.positionSide=`right`,this.positionLeft=void 0,this.value=``,this.label=``,this.hidden=!1,this.variant=`dot`,this._badgeVisible=!0,this._onHideBadge=()=>{this._badgeVisible=!1,this.requestUpdate()}}static{this.styles=p`
6482
+ `}};N([_({type:String,reflect:!0})],Eu.prototype,`title`,void 0),N([_({type:String,attribute:`app-bar-title`,reflect:!0})],Eu.prototype,`appBarTitle`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`variant`,void 0),N([_({type:String})],Eu.prototype,`type`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`position`,void 0),N([_({type:String,attribute:`aria-label`,reflect:!0})],Eu.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`default-aria-label`})],Eu.prototype,`defaultAriaLabel`,void 0),N([_({type:String,attribute:`search-aria-label`})],Eu.prototype,`searchAriaLabel`,void 0),N([_({type:String,attribute:`search-supporting-text`,reflect:!0})],Eu.prototype,`searchSupportingText`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Eu.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Eu.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Eu.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Eu.prototype,`spacingRight`,void 0),Eu=N([a(`scb-app-bar`)],Eu),w(),b(),P();var Du=class extends C{constructor(...e){super(...e),this._slotClickHandler=e=>{let t=this.shadowRoot?.querySelector(`slot`),n=e.target;n&&n!==t&&n.dispatchEvent(new CustomEvent(`hide-badge`,{bubbles:!0,composed:!0}))},this.autoHide=!1,this.sizing=`fit-content`,this.position=`relative`,this.positionTop=0,this.positionRight=void 0,this.positionSide=`right`,this.positionLeft=void 0,this.value=``,this.label=``,this.hidden=!1,this.variant=`dot`,this._badgeVisible=!0,this._onHideBadge=()=>{this._badgeVisible=!1,this.requestUpdate()}}static{this.styles=p`
6483
6483
  :host {
6484
6484
  display: block;
6485
6485
  position: relative;
@@ -6579,7 +6579,7 @@
6579
6579
  aria-label=${l?S:c}
6580
6580
  aria-hidden=${l?`true`:S}>${this.variant===`dot`?``:r}</div>
6581
6581
  </div>
6582
- `}};N([_({type:Boolean,reflect:!0,attribute:`auto-hide`})],Eu.prototype,`autoHide`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`position`,void 0),N([_({type:String,attribute:`position-top`})],Eu.prototype,`positionTop`,void 0),N([_({type:String,attribute:`position-right`})],Eu.prototype,`positionRight`,void 0),N([_({type:String,reflect:!0,attribute:`position-side`})],Eu.prototype,`positionSide`,void 0),N([_({type:String,attribute:`position-left`})],Eu.prototype,`positionLeft`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`value`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0})],Eu.prototype,`hidden`,void 0),N([_({type:String,reflect:!0})],Eu.prototype,`variant`,void 0),Eu=N([a(`scb-badge`)],Eu),w(),b(),dl(),P();var Du=class extends C{constructor(...e){super(...e),this.label=``,this.isCurrent=!1,this.href=``}connectedCallback(){if(super.connectedCallback(),this.hasAttribute(`current`)&&!this.hasAttribute(`is-current`)&&(this.isCurrent=!0),!this.href){let e=this.getAttribute(`href`);e&&(this.href=e)}}static get styles(){return p`
6582
+ `}};N([_({type:Boolean,reflect:!0,attribute:`auto-hide`})],Du.prototype,`autoHide`,void 0),N([_({type:String,reflect:!0})],Du.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Du.prototype,`position`,void 0),N([_({type:String,attribute:`position-top`})],Du.prototype,`positionTop`,void 0),N([_({type:String,attribute:`position-right`})],Du.prototype,`positionRight`,void 0),N([_({type:String,reflect:!0,attribute:`position-side`})],Du.prototype,`positionSide`,void 0),N([_({type:String,attribute:`position-left`})],Du.prototype,`positionLeft`,void 0),N([_({type:String,reflect:!0})],Du.prototype,`value`,void 0),N([_({type:String,reflect:!0})],Du.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0})],Du.prototype,`hidden`,void 0),N([_({type:String,reflect:!0})],Du.prototype,`variant`,void 0),Du=N([a(`scb-badge`)],Du),w(),b(),fl(),P();var Ou=class extends C{constructor(...e){super(...e),this.label=``,this.isCurrent=!1,this.href=``}connectedCallback(){if(super.connectedCallback(),this.hasAttribute(`current`)&&!this.hasAttribute(`is-current`)&&(this.isCurrent=!0),!this.href){let e=this.getAttribute(`href`);e&&(this.href=e)}}static get styles(){return p`
6583
6583
  :host {
6584
6584
  --scb-breadcrumb-link-font-family: var(--scb-breadcrumb-link-text-font, var(--scb-typography-body-medium-font, var(--md-sys-typescale-body-medium-font)));
6585
6585
  --scb-breadcrumb-link-font-size: var(--scb-breadcrumb-link-text-size, var(--scb-typography-body-medium-size, var(--md-sys-typescale-body-medium-size, 16px)));
@@ -6636,7 +6636,7 @@
6636
6636
  `}getLabelContent(){return this.label||x`<slot></slot>`}updated(e){e.has(`isCurrent`)&&(this.dispatchEvent(new CustomEvent(`current-changed`,{detail:{isCurrent:this.isCurrent},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`currentchanged`,{detail:{isCurrent:this.isCurrent,value:this.isCurrent},bubbles:!0,composed:!0})))}render(){let e=this.getLabelContent();switch(!0){case this.isCurrent:return x`<span class="breadcrumb-current">${e}</span>`;default:return x`
6637
6637
  <scb-link href="${this.href||this.getAttribute(`href`)||``}">${e}</scb-link>
6638
6638
  <span class="breadcrumb-separator">/</span>
6639
- `}}};N([_({type:String})],Du.prototype,`label`,void 0),N([_({type:Boolean,attribute:`is-current`,reflect:!0})],Du.prototype,`isCurrent`,void 0),N([_({type:String,attribute:`item-href`})],Du.prototype,`href`,void 0),Du=N([a(`scb-breadcrumb-item`)],Du),w(),b(),dl(),P();var Ou,ku=()=>{customElements.get(`md-focus-ring`)||(Ou??=Promise.resolve().then(()=>(Vt(),zt)).then(()=>void 0))},Au=class extends C{constructor(...e){super(...e),this.showAll=!1,this.currentIndex=void 0,this.showAllLabel=`Visa alla`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static get styles(){return p`
6639
+ `}}};N([_({type:String})],Ou.prototype,`label`,void 0),N([_({type:Boolean,attribute:`is-current`,reflect:!0})],Ou.prototype,`isCurrent`,void 0),N([_({type:String,attribute:`item-href`})],Ou.prototype,`href`,void 0),Ou=N([a(`scb-breadcrumb-item`)],Ou),w(),b(),fl(),P();var ku,Au=()=>{customElements.get(`md-focus-ring`)||(ku??=Promise.resolve().then(()=>(Vt(),zt)).then(()=>void 0))},ju=class extends C{constructor(...e){super(...e),this.showAll=!1,this.currentIndex=void 0,this.showAllLabel=`Visa alla`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static get styles(){return p`
6640
6640
  :host {
6641
6641
  display: block;
6642
6642
  box-sizing: border-box;
@@ -6802,7 +6802,7 @@
6802
6802
  aria-label=${this.showAllLabel}
6803
6803
  role="button"
6804
6804
  tabindex="0"
6805
- @focusin=${ku}
6805
+ @focusin=${Au}
6806
6806
  @click=${this._onEllipsisClick}
6807
6807
  @keydown=${e=>{(e.key===`Enter`||e.key===` `)&&this._onEllipsisClick()}}
6808
6808
  >
@@ -6819,12 +6819,12 @@
6819
6819
  </span>
6820
6820
  `})}
6821
6821
  </div>
6822
- `}};N([_({type:Boolean,attribute:`show-all`,reflect:!0})],Au.prototype,`showAll`,void 0),N([_({type:Number,attribute:`current-index`,reflect:!0})],Au.prototype,`currentIndex`,void 0),N([_({type:String,attribute:`show-all-label`})],Au.prototype,`showAllLabel`,void 0),N([_({type:String,reflect:!0})],Au.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Au.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Au.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Au.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Au.prototype,`spacingRight`,void 0),Au=N([a(`scb-breadcrumb`)],Au),w(),b(),P();var ju=class extends C{constructor(...e){super(...e),this.title=``,this.description=``,this.startDate=``,this.endDate=``,this.href=``}get date(){return this.startDate}set date(e){let t=(e??``)+``;t!==this.startDate&&(this.startDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],`date`]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`date`&&(this.date=n??``)}static{this.styles=p`
6822
+ `}};N([_({type:Boolean,attribute:`show-all`,reflect:!0})],ju.prototype,`showAll`,void 0),N([_({type:Number,attribute:`current-index`,reflect:!0})],ju.prototype,`currentIndex`,void 0),N([_({type:String,attribute:`show-all-label`})],ju.prototype,`showAllLabel`,void 0),N([_({type:String,reflect:!0})],ju.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],ju.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],ju.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],ju.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],ju.prototype,`spacingRight`,void 0),ju=N([a(`scb-breadcrumb`)],ju),w(),b(),P();var Mu=class extends C{constructor(...e){super(...e),this.title=``,this.description=``,this.startDate=``,this.endDate=``,this.href=``}get date(){return this.startDate}set date(e){let t=(e??``)+``;t!==this.startDate&&(this.startDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],`date`]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`date`&&(this.date=n??``)}static{this.styles=p`
6823
6823
  :host {
6824
6824
  display: block;
6825
6825
  }
6826
6826
  `}updated(e){super.updated?.(e),(e.has(`title`)||e.has(`description`)||e.has(`startDate`)||e.has(`endDate`)||e.has(`href`))&&this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}render(){return x`
6827
- `}};N([_({type:String})],ju.prototype,`title`,void 0),N([_({type:String})],ju.prototype,`description`,void 0),N([_({type:String,attribute:`start-date`})],ju.prototype,`startDate`,void 0),N([_({type:String,attribute:`end-date`})],ju.prototype,`endDate`,void 0),N([_({type:String})],ju.prototype,`href`,void 0),ju=N([a(`scb-calendar-event`)],ju);var Mu,Nu=t((()=>{w(),b(),P(),Mu=class extends C{constructor(...e){super(...e),this.variant=`thin`,this.direction=`horizontal`,this.inset=`none`,this.overlay=!1,this.anchor=`end`,this.spacing=void 0}static{this.styles=p`
6827
+ `}};N([_({type:String})],Mu.prototype,`title`,void 0),N([_({type:String})],Mu.prototype,`description`,void 0),N([_({type:String,attribute:`start-date`})],Mu.prototype,`startDate`,void 0),N([_({type:String,attribute:`end-date`})],Mu.prototype,`endDate`,void 0),N([_({type:String})],Mu.prototype,`href`,void 0),Mu=N([a(`scb-calendar-event`)],Mu);var Nu,Pu=t((()=>{w(),b(),P(),Nu=class extends C{constructor(...e){super(...e),this.variant=`thin`,this.direction=`horizontal`,this.inset=`none`,this.overlay=!1,this.anchor=`end`,this.spacing=void 0}static{this.styles=p`
6828
6828
  :host {
6829
6829
  --scb-divider-spacing-orth: 0;
6830
6830
 
@@ -6899,7 +6899,7 @@
6899
6899
  }
6900
6900
 
6901
6901
  /* design:bindings:scb-divider:end */
6902
- `}firstUpdated(){this.#e()}updated(e){e.has(`spacing`)&&this.#e()}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}#e(){let e=this.mapSpacingToken(this.spacing);e?this.style.setProperty(`--scb-divider-spacing-orth`,e):this.style.removeProperty(`--scb-divider-spacing-orth`)}render(){return x``}},N([_({type:String,reflect:!0})],Mu.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Mu.prototype,`direction`,void 0),N([_({type:String,reflect:!0})],Mu.prototype,`inset`,void 0),N([_({type:Boolean,reflect:!0})],Mu.prototype,`overlay`,void 0),N([_({type:String,reflect:!0})],Mu.prototype,`anchor`,void 0),N([_({type:String,reflect:!0})],Mu.prototype,`spacing`,void 0),Mu=N([a(`scb-divider`)],Mu)}));w(),b(),al(),Oc(),D(),E(),Nu(),j(),Cl(),cc(),P();var Pu=class extends C{constructor(...e){super(...e),this._currentDate=new Date,this._selectedDate=null,this._showMonthDropdown=!1,this._showYearDropdown=!1,this.variant=`date`,this.lang=`sv`,this.selectedValue=``,this.open=!0,this._selectedHour=0,this._selectedMinute=0,this._viewportMargin=8,this._popupOffset=4,this._onWindowReposition=()=>{this._positionPopupWithinViewport()},this._monthNames=[this.lang==`sv`?`Januari`:`January`,this.lang==`sv`?`Februari`:`February`,this.lang==`sv`?`Mars`:`March`,(this.lang,`April`),this.lang==`sv`?`Maj`:`May`,this.lang==`sv`?`Juni`:`June`,this.lang==`sv`?`Juli`:`July`,this.lang==`sv`?`Augusti`:`August`,(this.lang,`September`),this.lang==`sv`?`Oktober`:`October`,(this.lang,`November`),(this.lang,`December`)],this._onPopupKeydown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),!this._closeOpenDropdowns()&&this._close())},this._outsideClickHandler=e=>{this.open&&(e.composedPath().includes(this)||this._close())},this._prevMonth=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();t===0?this._currentDate=new Date(e-1,11,1):this._currentDate=new Date(e,t-1,1)},this._prevYear=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e-1,t,1)},this._nextMonth=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();t===11?this._currentDate=new Date(e+1,0,1):this._currentDate=new Date(e,t+1,1)},this._nextYear=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e+1,t,1)},this._onTimeChange=e=>{let[t,n]=e.target.value.split(`:`),r=parseInt(t,10),i=parseInt(n,10);this._selectedHour=isNaN(r)?0:Math.max(0,Math.min(23,r)),this._selectedMinute=isNaN(i)?0:Math.max(0,Math.min(59,i)),this._fireDateTimeChange()},this._close=()=>{this.open=!1,this.dispatchEvent(new CustomEvent(`datepicker-closed`,{bubbles:!0,composed:!0}))}}_isRenderedInsideDialog(){let e=this.getRootNode(),t=e instanceof ShadowRoot?e.host:null;return t instanceof HTMLElement&&t.closest(`scb-dialog`)?!0:!!this.closest(`scb-dialog`)}_usesInPlaceLayout(){let e=getComputedStyle(this).position;return e===`relative`||e===`static`}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=sc(this,this.renderRoot)}_positionPopupWithinViewport(){if(!this.open)return;let e=this.renderRoot.querySelector(`.datepicker-popup`);if(!e)return;if(this._usesInPlaceLayout()){z(e);return}let t=this.parentElement?.getBoundingClientRect();if(!t)return;let n=window.innerWidth,r=window.innerHeight,i=Math.max(220,n-this._viewportMargin*2);if(yl(e)){let a=Math.min(this.getBoundingClientRect().width||e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a),c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;this._isRenderedInsideDialog()?(this.style.setProperty(`--scb-datepicker-position`,`absolute`),this.style.setProperty(`--scb-datepicker-left`,`0px`),this.style.setProperty(`--scb-datepicker-top`,`${t.height+this._popupOffset}px`)):(this.style.setProperty(`--scb-datepicker-position`,`fixed`),this.style.setProperty(`--scb-datepicker-left`,`${s}px`),this.style.setProperty(`--scb-datepicker-top`,`${t.bottom+this._popupOffset}px`)),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),e.style.position=`fixed`,e.style.left=`${Math.round(s)}px`,e.style.width=`${Math.round(a)}px`,e.style.right=`auto`,e.style.bottom=`auto`,e.style.maxHeight=`${Math.max(0,(u?l:c)-this._popupOffset)}px`,e.style.top=u?`${Math.max(this._viewportMargin,t.top-o-this._popupOffset)}px`:`${t.bottom+this._popupOffset}px`;return}if(this._isRenderedInsideDialog()){let a=Math.min(e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a),c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;if(this.style.setProperty(`--scb-datepicker-position`,`absolute`),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-left`,`${s-t.left}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),u){let e=Math.max(this._viewportMargin,t.top-o-this._popupOffset)-t.top;this.style.setProperty(`--scb-datepicker-top`,`${e}px`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,l-this._popupOffset)}px`)}else this.style.setProperty(`--scb-datepicker-top`,`${t.height+this._popupOffset}px`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,c-this._popupOffset)}px`);return}let a=Math.min(e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a),c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;this.style.setProperty(`--scb-datepicker-position`,`fixed`),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-left`,`${s}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),u?(this.style.setProperty(`--scb-datepicker-top`,`${Math.max(this._viewportMargin,t.top-o-this._popupOffset)}px`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,l-this._popupOffset)}px`)):(this.style.setProperty(`--scb-datepicker-top`,`${t.bottom+this._popupOffset}px`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,c-this._popupOffset)}px`))}static{this.styles=[p`
6902
+ `}firstUpdated(){this.#e()}updated(e){e.has(`spacing`)&&this.#e()}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}#e(){let e=this.mapSpacingToken(this.spacing);e?this.style.setProperty(`--scb-divider-spacing-orth`,e):this.style.removeProperty(`--scb-divider-spacing-orth`)}render(){return x``}},N([_({type:String,reflect:!0})],Nu.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Nu.prototype,`direction`,void 0),N([_({type:String,reflect:!0})],Nu.prototype,`inset`,void 0),N([_({type:Boolean,reflect:!0})],Nu.prototype,`overlay`,void 0),N([_({type:String,reflect:!0})],Nu.prototype,`anchor`,void 0),N([_({type:String,reflect:!0})],Nu.prototype,`spacing`,void 0),Nu=N([a(`scb-divider`)],Nu)}));w(),b(),sl(),Oc(),D(),E(),Pu(),j(),wl(),cc(),P();var Fu=class extends C{constructor(...e){super(...e),this._currentDate=new Date,this._selectedDate=null,this._showMonthDropdown=!1,this._showYearDropdown=!1,this.variant=`date`,this.lang=`sv`,this.selectedValue=``,this.open=!0,this._selectedHour=0,this._selectedMinute=0,this._viewportMargin=8,this._popupOffset=4,this._onWindowReposition=()=>{this._positionPopupWithinViewport()},this._monthNames=[this.lang==`sv`?`Januari`:`January`,this.lang==`sv`?`Februari`:`February`,this.lang==`sv`?`Mars`:`March`,(this.lang,`April`),this.lang==`sv`?`Maj`:`May`,this.lang==`sv`?`Juni`:`June`,this.lang==`sv`?`Juli`:`July`,this.lang==`sv`?`Augusti`:`August`,(this.lang,`September`),this.lang==`sv`?`Oktober`:`October`,(this.lang,`November`),(this.lang,`December`)],this._onPopupKeydown=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),!this._closeOpenDropdowns()&&this._close())},this._outsideClickHandler=e=>{this.open&&(e.composedPath().includes(this)||this._close())},this._prevMonth=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();t===0?this._currentDate=new Date(e-1,11,1):this._currentDate=new Date(e,t-1,1)},this._prevYear=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e-1,t,1)},this._nextMonth=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();t===11?this._currentDate=new Date(e+1,0,1):this._currentDate=new Date(e,t+1,1)},this._nextYear=()=>{let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e+1,t,1)},this._onTimeChange=e=>{let[t,n]=e.target.value.split(`:`),r=parseInt(t,10),i=parseInt(n,10);this._selectedHour=isNaN(r)?0:Math.max(0,Math.min(23,r)),this._selectedMinute=isNaN(i)?0:Math.max(0,Math.min(59,i)),this._fireDateTimeChange()},this._close=()=>{this.open=!1,this.dispatchEvent(new CustomEvent(`datepicker-closed`,{bubbles:!0,composed:!0}))}}_isRenderedInsideDialog(){let e=this.getRootNode(),t=e instanceof ShadowRoot?e.host:null;return t instanceof HTMLElement&&t.closest(`scb-dialog`)?!0:!!this.closest(`scb-dialog`)}_usesInPlaceLayout(){let e=getComputedStyle(this).position;return e===`relative`||e===`static`}connectedCallback(){super.connectedCallback(),this._removeLazyFocusRingListeners=sc(this,this.renderRoot)}_positionPopupWithinViewport(){if(!this.open)return;let e=this.renderRoot.querySelector(`.datepicker-popup`);if(!e)return;if(this._usesInPlaceLayout()){R(e);return}let t=this.parentElement?.getBoundingClientRect();if(!t)return;let n=window.innerWidth,r=window.innerHeight,i=Math.max(220,n-this._viewportMargin*2);if(bl(e)){let a=Math.min(this.getBoundingClientRect().width||e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a),c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;this._isRenderedInsideDialog()?(this.style.setProperty(`--scb-datepicker-position`,`absolute`),this.style.setProperty(`--scb-datepicker-left`,`0px`),this.style.setProperty(`--scb-datepicker-top`,`${t.height+this._popupOffset}px`)):(this.style.setProperty(`--scb-datepicker-position`,`fixed`),this.style.setProperty(`--scb-datepicker-left`,`${s}px`),this.style.setProperty(`--scb-datepicker-top`,`${t.bottom+this._popupOffset}px`)),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),e.style.position=`fixed`,e.style.left=`${Math.round(s)}px`,e.style.width=`${Math.round(a)}px`,e.style.right=`auto`,e.style.bottom=`auto`,e.style.maxHeight=`${Math.max(0,(u?l:c)-this._popupOffset)}px`,e.style.top=u?`${Math.max(this._viewportMargin,t.top-o-this._popupOffset)}px`:`${t.bottom+this._popupOffset}px`;return}if(this._isRenderedInsideDialog()){let a=Math.min(e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a),c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;if(this.style.setProperty(`--scb-datepicker-position`,`absolute`),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-left`,`${s-t.left}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),u){let e=Math.max(this._viewportMargin,t.top-o-this._popupOffset)-t.top;this.style.setProperty(`--scb-datepicker-top`,`${e}px`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,l-this._popupOffset)}px`)}else this.style.setProperty(`--scb-datepicker-top`,`${t.height+this._popupOffset}px`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,c-this._popupOffset)}px`);return}let a=Math.min(e.offsetWidth||380,i),o=e.offsetHeight||420,s=Math.min(Math.max(t.left,this._viewportMargin),n-this._viewportMargin-a),c=r-t.bottom-this._viewportMargin,l=t.top-this._viewportMargin,u=c<o+this._popupOffset&&l>c;this.style.setProperty(`--scb-datepicker-position`,`fixed`),this.style.setProperty(`--scb-datepicker-computed-width`,`${a}px`),this.style.setProperty(`--scb-datepicker-left`,`${s}px`),this.style.setProperty(`--scb-datepicker-transform`,`none`),u?(this.style.setProperty(`--scb-datepicker-top`,`${Math.max(this._viewportMargin,t.top-o-this._popupOffset)}px`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,l-this._popupOffset)}px`)):(this.style.setProperty(`--scb-datepicker-top`,`${t.bottom+this._popupOffset}px`),this.style.setProperty(`--scb-datepicker-bottom`,`auto`),this.style.setProperty(`--scb-datepicker-max-height`,`${Math.max(0,c-this._popupOffset)}px`))}static{this.styles=[p`
6903
6903
  :host {
6904
6904
  --scb-datepicker-z-index: var(--scb-layer-popover, 1100);
6905
6905
  --scb-datepicker-viewport-margin: 8px;
@@ -7176,7 +7176,7 @@
7176
7176
  }
7177
7177
 
7178
7178
  /* design:bindings:scb-datepicker:end */
7179
- `]}updated(e){if(super.updated(e),this.open?(window.addEventListener(`mousedown`,this._outsideClickHandler),window.addEventListener(`resize`,this._onWindowReposition,{passive:!0}),window.addEventListener(`scroll`,this._onWindowReposition,{passive:!0,capture:!0})):(window.removeEventListener(`mousedown`,this._outsideClickHandler),window.removeEventListener(`resize`,this._onWindowReposition),window.removeEventListener(`scroll`,this._onWindowReposition,!0)),e.has(`selectedValue`)&&this.selectedValue){let e=new Date(this.selectedValue);isNaN(e.getTime())||(this._selectedDate=e,this._currentDate=new Date(e.getFullYear(),e.getMonth(),1),this.variant===`datetime-local`&&(this._selectedHour=e.getHours(),this._selectedMinute=e.getMinutes()))}if(this.open){let e=this.renderRoot.querySelector(`.datepicker-popup`);this._usesInPlaceLayout()?z(e):_l(e),this._positionPopupWithinViewport(),requestAnimationFrame(()=>this._positionPopupWithinViewport())}}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,window.removeEventListener(`mousedown`,this._outsideClickHandler),window.removeEventListener(`resize`,this._onWindowReposition),window.removeEventListener(`scroll`,this._onWindowReposition,!0),z(this.renderRoot.querySelector(`.datepicker-popup`)),super.disconnectedCallback()}_locale(){return this.lang===`sv`?`sv-SE`:`en-GB`}_formatDateLabel(e){return new Intl.DateTimeFormat(this._locale(),{day:`numeric`,month:`long`,year:`numeric`}).format(e)}_closeOpenDropdowns(){return!this._showMonthDropdown&&!this._showYearDropdown?!1:(this._showMonthDropdown=!1,this._showYearDropdown=!1,!0)}render(){if(!this.open)return x``;let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth(),n=new Date,r=this._getMonthDays(e,t),i=Array.from({length:101},(e,t)=>n.getFullYear()-50+t),a=this.variant===`datetime-local`&&!this._showMonthDropdown&&!this._showYearDropdown;return x`
7179
+ `]}updated(e){if(super.updated(e),this.open?(window.addEventListener(`mousedown`,this._outsideClickHandler),window.addEventListener(`resize`,this._onWindowReposition,{passive:!0}),window.addEventListener(`scroll`,this._onWindowReposition,{passive:!0,capture:!0})):(window.removeEventListener(`mousedown`,this._outsideClickHandler),window.removeEventListener(`resize`,this._onWindowReposition),window.removeEventListener(`scroll`,this._onWindowReposition,!0)),e.has(`selectedValue`)&&this.selectedValue){let e=new Date(this.selectedValue);isNaN(e.getTime())||(this._selectedDate=e,this._currentDate=new Date(e.getFullYear(),e.getMonth(),1),this.variant===`datetime-local`&&(this._selectedHour=e.getHours(),this._selectedMinute=e.getMinutes()))}if(this.open){let e=this.renderRoot.querySelector(`.datepicker-popup`);this._usesInPlaceLayout()?R(e):vl(e),this._positionPopupWithinViewport(),requestAnimationFrame(()=>this._positionPopupWithinViewport())}}disconnectedCallback(){this._removeLazyFocusRingListeners?.(),this._removeLazyFocusRingListeners=void 0,window.removeEventListener(`mousedown`,this._outsideClickHandler),window.removeEventListener(`resize`,this._onWindowReposition),window.removeEventListener(`scroll`,this._onWindowReposition,!0),R(this.renderRoot.querySelector(`.datepicker-popup`)),super.disconnectedCallback()}_locale(){return this.lang===`sv`?`sv-SE`:`en-GB`}_formatDateLabel(e){return new Intl.DateTimeFormat(this._locale(),{day:`numeric`,month:`long`,year:`numeric`}).format(e)}_closeOpenDropdowns(){return!this._showMonthDropdown&&!this._showYearDropdown?!1:(this._showMonthDropdown=!1,this._showYearDropdown=!1,!0)}render(){if(!this.open)return x``;let e=this._currentDate.getFullYear(),t=this._currentDate.getMonth(),n=new Date,r=this._getMonthDays(e,t),i=Array.from({length:101},(e,t)=>n.getFullYear()-50+t),a=this.variant===`datetime-local`&&!this._showMonthDropdown&&!this._showYearDropdown;return x`
7180
7180
  <div class="datepicker-popup popup" @keydown=${this._onPopupKeydown}>
7181
7181
  <div class="header">
7182
7182
  <div class="month-selector ${this._showMonthDropdown?`open`:``} ${this._showYearDropdown?`disable`:``}">
@@ -7318,7 +7318,7 @@
7318
7318
  `:``}
7319
7319
  </div>
7320
7320
  </div>
7321
- `}_getMonthDays(e,t){let n=new Date(Date.UTC(e,t,1)),r=new Date(Date.UTC(e,t+1,0)),i=[],a=[],o=n.getUTCDay(),s=o===0?6:o-1;for(let e=0;e<s;e++)a.push(null);for(let n=1;n<=r.getUTCDate();n++){let r=new Date(Date.UTC(e,t,n));a.push(r),a.length===7&&(i.push(a),a=[])}if(a.length){for(;a.length<7;)a.push(null);i.push(a)}return i}_toggleMonthDropdown(){this._showMonthDropdown=!this._showMonthDropdown,this._showMonthDropdown&&(this._showYearDropdown=!1,setTimeout(()=>{this._centerOptionInContent(`#selected-month`)},0))}_toggleYearDropdown(){this._showYearDropdown=!this._showYearDropdown,this._showYearDropdown&&(this._showMonthDropdown=!1,setTimeout(()=>{this._centerOptionInContent(`#selected-year`)},0))}_centerOptionInContent(e){let t=this.renderRoot.querySelector(`.datepicker-content`),n=this.renderRoot.querySelector(e);if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();t.scrollTop+=i.top-r.top-(t.clientHeight-i.height)/2}_onMonthChangeCustom(e){let t=this._currentDate.getFullYear();this._currentDate=new Date(t,e,1),this._showMonthDropdown=!1}_onYearChangeCustom(e){let t=this._currentDate.getMonth();this._currentDate=new Date(e,t,1),this._showYearDropdown=!1}_isToday(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}_isSelected(e){return this._selectedDate&&e.getDate()===this._selectedDate.getDate()&&e.getMonth()===this._selectedDate.getMonth()&&e.getFullYear()===this._selectedDate.getFullYear()}_selectDate(e){if(this._selectedDate=e,this.variant===`datetime-local`){let t=new Date(e);t.setHours(this._selectedHour??0,this._selectedMinute??0,0,0),this._selectedHour=t.getHours(),this._selectedMinute=t.getMinutes();let n=e=>e.toString().padStart(2,`0`),r=`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:r},bubbles:!0,composed:!0}))}else{let t=e.toISOString().slice(0,10);this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:t},bubbles:!0,composed:!0}))}}_fireDateTimeChange(){if(this.variant===`datetime-local`&&this._selectedDate){let e=new Date(this._selectedDate);e.setHours(this._selectedHour??0,this._selectedMinute??0,0,0);let t=e=>e.toString().padStart(2,`0`),n=`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:n},bubbles:!0,composed:!0}))}}};N([v()],Pu.prototype,`_currentDate`,void 0),N([v()],Pu.prototype,`_selectedDate`,void 0),N([v()],Pu.prototype,`_showMonthDropdown`,void 0),N([v()],Pu.prototype,`_showYearDropdown`,void 0),N([_({type:String})],Pu.prototype,`variant`,void 0),N([_({type:String})],Pu.prototype,`lang`,void 0),N([_({type:String})],Pu.prototype,`selectedValue`,void 0),N([_({type:Boolean})],Pu.prototype,`open`,void 0),N([v()],Pu.prototype,`_selectedHour`,void 0),N([v()],Pu.prototype,`_selectedMinute`,void 0),Pu=N([a(`scb-datepicker`)],Pu),w(),b(),D(),E(),j(),al(),Ol(),uc(),cc(),P();var U=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key===`Tab`&&(ic(),this._kbShouldShowRing=!0,this._inputFocused&&this.#s())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this.#s()},this._hasRenderedOnce=!1,this._boundField=null,this._onFieldInput=()=>{let e=this._boundField;if(!e)return;let t=e;this.value=t instanceof HTMLInputElement&&t.type===`file`?t.files?.[0]?.name??``:t.value,this.#n(),this.#r(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0}))},this._onFieldChange=()=>{this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))},this._onFieldSelect=()=>{this.dispatchEvent(new Event(`select`,{bubbles:!0,composed:!0}))},this._onFieldFocus=()=>{this._inputFocused=!0,this.#s()},this._onFieldBlur=()=>{this._inputFocused=!1,this.#s()},this.type=`text`,this.lang=`sv`,this.label=``,this.supportingText=``,this.helpText=``,this.helpLabel=`Visa hjälptext`,this.clearLabel=`Rensa fält`,this.dateButtonLabel=`Välj datum`,this.errorText=``,this.leadingIcon=``,this.name=``,this.pattern=``,this.accept=``,this.multiple=!1,this.value=``,this.underLabel=``,this.error=!1,this.disabled=!1,this.required=!1,this.size=lc[`scb-textfield`].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue=``,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._inputId=``,this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._openDatepicker=()=>{this._showDatepicker=!0},this._onDatepickerClosed=()=>{this._showDatepicker=!1},this._onDateSelected=e=>{if(this.value=e.detail.value,this._showDatepicker=!1,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e)}this.#r(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0}))},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=[p`
7321
+ `}_getMonthDays(e,t){let n=new Date(Date.UTC(e,t,1)),r=new Date(Date.UTC(e,t+1,0)),i=[],a=[],o=n.getUTCDay(),s=o===0?6:o-1;for(let e=0;e<s;e++)a.push(null);for(let n=1;n<=r.getUTCDate();n++){let r=new Date(Date.UTC(e,t,n));a.push(r),a.length===7&&(i.push(a),a=[])}if(a.length){for(;a.length<7;)a.push(null);i.push(a)}return i}_toggleMonthDropdown(){this._showMonthDropdown=!this._showMonthDropdown,this._showMonthDropdown&&(this._showYearDropdown=!1,setTimeout(()=>{this._centerOptionInContent(`#selected-month`)},0))}_toggleYearDropdown(){this._showYearDropdown=!this._showYearDropdown,this._showYearDropdown&&(this._showMonthDropdown=!1,setTimeout(()=>{this._centerOptionInContent(`#selected-year`)},0))}_centerOptionInContent(e){let t=this.renderRoot.querySelector(`.datepicker-content`),n=this.renderRoot.querySelector(e);if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();t.scrollTop+=i.top-r.top-(t.clientHeight-i.height)/2}_onMonthChangeCustom(e){let t=this._currentDate.getFullYear();this._currentDate=new Date(t,e,1),this._showMonthDropdown=!1}_onYearChangeCustom(e){let t=this._currentDate.getMonth();this._currentDate=new Date(e,t,1),this._showYearDropdown=!1}_isToday(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}_isSelected(e){return this._selectedDate&&e.getDate()===this._selectedDate.getDate()&&e.getMonth()===this._selectedDate.getMonth()&&e.getFullYear()===this._selectedDate.getFullYear()}_selectDate(e){if(this._selectedDate=e,this.variant===`datetime-local`){let t=new Date(e);t.setHours(this._selectedHour??0,this._selectedMinute??0,0,0),this._selectedHour=t.getHours(),this._selectedMinute=t.getMinutes();let n=e=>e.toString().padStart(2,`0`),r=`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:r},bubbles:!0,composed:!0}))}else{let t=e.toISOString().slice(0,10);this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:t},bubbles:!0,composed:!0}))}}_fireDateTimeChange(){if(this.variant===`datetime-local`&&this._selectedDate){let e=new Date(this._selectedDate);e.setHours(this._selectedHour??0,this._selectedMinute??0,0,0);let t=e=>e.toString().padStart(2,`0`),n=`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`;this.dispatchEvent(new CustomEvent(`date-selected`,{detail:{value:n},bubbles:!0,composed:!0}))}}};N([v()],Fu.prototype,`_currentDate`,void 0),N([v()],Fu.prototype,`_selectedDate`,void 0),N([v()],Fu.prototype,`_showMonthDropdown`,void 0),N([v()],Fu.prototype,`_showYearDropdown`,void 0),N([_({type:String})],Fu.prototype,`variant`,void 0),N([_({type:String})],Fu.prototype,`lang`,void 0),N([_({type:String})],Fu.prototype,`selectedValue`,void 0),N([_({type:Boolean})],Fu.prototype,`open`,void 0),N([v()],Fu.prototype,`_selectedHour`,void 0),N([v()],Fu.prototype,`_selectedMinute`,void 0),Fu=N([a(`scb-datepicker`)],Fu),w(),b(),D(),E(),j(),sl(),kl(),uc(),cc(),P();var H=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key===`Tab`&&(ic(),this._kbShouldShowRing=!0,this._inputFocused&&this.#s())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this.#s()},this._hasRenderedOnce=!1,this._boundField=null,this._onFieldInput=()=>{let e=this._boundField;if(!e)return;let t=e;this.value=t instanceof HTMLInputElement&&t.type===`file`?t.files?.[0]?.name??``:t.value,this.#n(),this.#r(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0}))},this._onFieldChange=()=>{this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))},this._onFieldSelect=()=>{this.dispatchEvent(new Event(`select`,{bubbles:!0,composed:!0}))},this._onFieldFocus=()=>{this._inputFocused=!0,this.#s()},this._onFieldBlur=()=>{this._inputFocused=!1,this.#s()},this.type=`text`,this.lang=`sv`,this.label=``,this.supportingText=``,this.helpText=``,this.helpLabel=`Visa hjälptext`,this.clearLabel=`Rensa fält`,this.dateButtonLabel=`Välj datum`,this.errorText=``,this.leadingIcon=``,this.name=``,this.pattern=``,this.accept=``,this.multiple=!1,this.value=``,this.underLabel=``,this.error=!1,this.disabled=!1,this.required=!1,this.size=lc[`scb-textfield`].size,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue=``,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._inputId=``,this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._openDatepicker=()=>{this._showDatepicker=!0},this._onDatepickerClosed=()=>{this._showDatepicker=!1},this._onDateSelected=e=>{if(this.value=e.detail.value,this._showDatepicker=!1,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e)}this.#r(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0}))},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=[p`
7322
7322
  /*
7323
7323
  Designbrygga:
7324
7324
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -8150,7 +8150,7 @@
8150
8150
  <md-focus-ring class="input-ring"></md-focus-ring>
8151
8151
  </div>
8152
8152
  </div>
8153
- `}firstUpdated(e){super.firstUpdated(e),this._initialValue=this.value,this.#n(),this.#i(),this.#e()}updated(e){super.updated(e),this.toggleAttribute(`aria-disabled`,this.disabled),e.has(`size`)&&this._syncDensityForSize(),e.has(`lang`)&&this._hasValidationBeenReported&&this.#r(!1),this._internals&&(e.has(`value`)||e.has(`disabled`)||e.has(`multiple`))&&this.#n(),e.has(`type`)&&(this.#i(),this._hasRenderedOnce&&this.#o()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),this._hasRenderedOnce=!0}formDisabledCallback(e){this.disabled=e,e&&(this._hasValidationBeenReported=!1)}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form=this.closest(`form`),this._form&&(this._form.addEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler=()=>this.formResetCallback(),this._form.addEventListener(`reset`,this._formResetHandler,!0)),window.addEventListener(`keydown`,this._onGlobalKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0)),this.#a(),window.removeEventListener(`keydown`,this._onGlobalKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}reportValidity(){return this._hasValidationBeenReported=!0,this.#r(!0)}checkValidity(){return this.#r(!1)}setCustomValidity(e){this._customValidationMessage=String(e??``),this.#r(!1)}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity??this._boundField?.validity}get validationMessage(){return this._internals?.validationMessage||this._validationMessage||this._boundField?.validationMessage||``}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}get files(){return this.type===`file`?this.shadowRoot?.querySelector(`input[type="file"]`)?.files??null:null}formResetCallback(){this.value=this._initialValue;let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=e instanceof HTMLInputElement&&e.type===`file`?``:this._initialValue),this.error=!1,this._hasValidationBeenReported=!1,this.#n(),this.#r(!1)}_onClearClick(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){if(e.value=``,this.value=``,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e),this._internals.setValidity({})}this.error=!1,e.setCustomValidity(``),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0})),e.focus()}}#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-textfield-spacing-block-start`,t):this.style.removeProperty(`--scb-textfield-spacing-block-start`),n?this.style.setProperty(`--scb-textfield-spacing-block-end`,n):this.style.removeProperty(`--scb-textfield-spacing-block-end`),r?this.style.setProperty(`--scb-textfield-spacing-inline-start`,r):this.style.removeProperty(`--scb-textfield-spacing-inline-start`),i?this.style.setProperty(`--scb-textfield-spacing-inline-end`,i):this.style.removeProperty(`--scb-textfield-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}get _resolvedLang(){return String(this.lang??``).trim().toLowerCase().split(/[-_]/,1)[0]===`en`?`en`:`sv`}_localizedDefaultLabel(e,t,n){return this._resolvedLang===`en`&&e===t?n:e}_invalidInputMessage(){return this._resolvedLang===`en`?`Invalid input.`:`Ogiltig inmatning.`}_requiredMessage(){return this._resolvedLang===`en`?`Fill in this field.`:`Fyll i det här fältet.`}#n(){if(!this._internals)return;if(this.disabled){this._internals.setFormValue(null);return}if(this.type!==`file`){this._internals.setFormValue(this.value);return}let e=this.files;if(!e?.length){this._internals.setFormValue(null);return}if(!this.multiple){this._internals.setFormValue(e[0]);return}let t=new FormData,n=this.name.trim()||`file`;for(let r of Array.from(e))t.append(n,r);this._internals.setFormValue(t)}#r(e=!1){let t=this.shadowRoot?.querySelector(`.scb-textfield`);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return!0;let n=this._invalidInputMessage(),r=``,i=`customError`;if(t.setCustomValidity(``),this.disabled)r=``;else if(this._customValidationMessage)r=this._customValidationMessage,i=`customError`,t.setCustomValidity(r);else if(this.required&&!t.value)r=this.errorText||this._requiredMessage(),i=`valueMissing`,t.setCustomValidity(r);else if(!t.validity.valid){let e=t.validity;i=[`badInput`,`patternMismatch`,`rangeOverflow`,`rangeUnderflow`,`stepMismatch`,`tooLong`,`tooShort`,`typeMismatch`,`valueMissing`].find(t=>e[t])??`customError`,r=this.errorText||t.validationMessage||n,this.errorText&&t.setCustomValidity(this.errorText)}let a=e?t.reportValidity():t.checkValidity(),o=a?``:this._customValidationMessage||this.errorText||r||t.validationMessage||n,s=this.error,c=this._validationMessage;return this._validationMessage=o,this.error=this.disabled?!1:o?this._hasValidationBeenReported||s:s&&!this._hasValidationBeenReported&&!c,this._internals&&(a?this._internals.setValidity({}):this._internals.setValidity({[i]:!0},o,t)),(s!==this.error||c!==this._validationMessage)&&this.requestUpdate(),a}#i(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&this._boundField!==e&&(this.#a(),this._boundField=e,this.type!==`time`&&e.addEventListener(`input`,this._onFieldInput),e.addEventListener(`change`,this._onFieldChange),e.addEventListener(`select`,this._onFieldSelect),e.addEventListener(`focus`,this._onFieldFocus),e.addEventListener(`blur`,this._onFieldBlur))}#a(){let e=this._boundField;e&&(e.removeEventListener(`input`,this._onFieldInput),e.removeEventListener(`change`,this._onFieldChange),e.removeEventListener(`select`,this._onFieldSelect),e.removeEventListener(`focus`,this._onFieldFocus),e.removeEventListener(`blur`,this._onFieldBlur),this._boundField=null)}#o(){this._showDatepicker=!1;let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=``,e.setCustomValidity(``)),this.value=``,this.error=!1,this._internals){let e=this.disabled?null:``;this._internals.setFormValue(e),this._internals.setValidity({})}}#s(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}};N([_({type:String,reflect:!0})],U.prototype,`type`,void 0),N([_({type:String})],U.prototype,`lang`,void 0),N([_({type:String})],U.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],U.prototype,`supportingText`,void 0),N([_({type:String,attribute:`help-text`})],U.prototype,`helpText`,void 0),N([_({type:String,attribute:`help-label`})],U.prototype,`helpLabel`,void 0),N([_({type:String,attribute:`clear-label`})],U.prototype,`clearLabel`,void 0),N([_({type:String,attribute:`date-button-label`})],U.prototype,`dateButtonLabel`,void 0),N([_({type:String,attribute:`error-text`})],U.prototype,`errorText`,void 0),N([_({type:String,attribute:`leading-icon`})],U.prototype,`leadingIcon`,void 0),N([_({type:String})],U.prototype,`name`,void 0),N([_({type:String})],U.prototype,`pattern`,void 0),N([_({type:String})],U.prototype,`accept`,void 0),N([_({type:Boolean,reflect:!0})],U.prototype,`multiple`,void 0),N([_({type:String,attribute:`value`})],U.prototype,`value`,void 0),N([_({type:String})],U.prototype,`underLabel`,void 0),N([_({type:Boolean,reflect:!0})],U.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],U.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],U.prototype,`required`,void 0),N([_({type:String,reflect:!0})],U.prototype,`size`,void 0),N([_({type:String,reflect:!0})],U.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],U.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],U.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],U.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],U.prototype,`spacingRight`,void 0),N([v()],U.prototype,`_showDatepicker`,void 0),U=N([a(`scb-textfield`)],U),Bc(),w(),b(),D(),P();var Fu=class extends C{static{this.formAssociated=!0}constructor(){super(),this.name=``,this.orientation=`vertical`,this.disabled=!1,this.required=!1,this.error=!1,this.deselectable=!1,this.ariaLabel=null,this.supportingText=``,this.errorText=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.value=``,this._internals=null,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._supportingTextId=`scb-radio-group-supporting-${Math.random().toString(36).slice(2,11)}`,this.#e=()=>Array.from(this.children).filter(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-radio-button`),this.#t=()=>{let e=this.#e();if(!e.length)return;let t=null;for(let n of e){let e=n;this.name&&n.setAttribute(`name`,this.name),this.disabled?n.setAttribute(`disabled`,``):n.removeAttribute(`disabled`),this.orientation===`horizontal`?n.setAttribute(`orientation`,`horizontal`):n.removeAttribute(`orientation`),this.deselectable?n.setAttribute(`deselectable`,``):n.removeAttribute(`deselectable`);let r=e.value??n.getAttribute(`value`)??``,i=typeof e.checked==`boolean`?e.checked:n.hasAttribute(`checked`);if(this.value){let t=String(r)===this.value;t&&!i?e.checked=!0:!t&&i&&(e.checked=!1)}else i&&t===null&&(t=String(r))}!this.value&&t!==null&&(this.value=t)},this.#n=e=>{e.target!==this&&e.composedPath().find(e=>e?.tagName?.toLowerCase()===`scb-radio-button`)&&(e.stopImmediatePropagation(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})))},this.#r=e=>{if(e.target===this)return;let t=e.composedPath().find(e=>e?.tagName?.toLowerCase()===`scb-radio-button`);if(!t)return;e.stopImmediatePropagation();let n=t?.checked===!0,r=n?t?.value??t?.getAttribute?.(`value`)??e.target?.value??``:``;this.value=String(r??``);let i={value:String(r??``),checked:n,originalIsTrusted:e?.isTrusted===!0};this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scb-change`,{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbchange`,{detail:i,bubbles:!0,composed:!0}))},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
8153
+ `}firstUpdated(e){super.firstUpdated(e),this._initialValue=this.value,this.#n(),this.#i(),this.#e()}updated(e){super.updated(e),this.toggleAttribute(`aria-disabled`,this.disabled),e.has(`size`)&&this._syncDensityForSize(),e.has(`lang`)&&this._hasValidationBeenReported&&this.#r(!1),this._internals&&(e.has(`value`)||e.has(`disabled`)||e.has(`multiple`))&&this.#n(),e.has(`type`)&&(this.#i(),this._hasRenderedOnce&&this.#o()),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e(),this._hasRenderedOnce=!0}formDisabledCallback(e){this.disabled=e,e&&(this._hasValidationBeenReported=!1)}connectedCallback(){super.connectedCallback(),this._syncDensityForSize(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form=this.closest(`form`),this._form&&(this._form.addEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler=()=>this.formResetCallback(),this._form.addEventListener(`reset`,this._formResetHandler,!0)),window.addEventListener(`keydown`,this._onGlobalKeydown,!0),window.addEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0)),this.#a(),window.removeEventListener(`keydown`,this._onGlobalKeydown,!0),window.removeEventListener(`pointerdown`,this._onGlobalPointerDown,!0)}reportValidity(){return this._hasValidationBeenReported=!0,this.#r(!0)}checkValidity(){return this.#r(!1)}setCustomValidity(e){this._customValidationMessage=String(e??``),this.#r(!1)}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity??this._boundField?.validity}get validationMessage(){return this._internals?.validationMessage||this._validationMessage||this._boundField?.validationMessage||``}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}get files(){return this.type===`file`?this.shadowRoot?.querySelector(`input[type="file"]`)?.files??null:null}formResetCallback(){this.value=this._initialValue;let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=e instanceof HTMLInputElement&&e.type===`file`?``:this._initialValue),this.error=!1,this._hasValidationBeenReported=!1,this.#n(),this.#r(!1)}_onClearClick(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){if(e.value=``,this.value=``,this._internals){let e=this.disabled?null:this.value;this._internals.setFormValue(e),this._internals.setValidity({})}this.error=!1,e.setCustomValidity(``),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`onValueChanged`,{detail:{value:this.value},bubbles:!0,composed:!0})),e.focus()}}#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-textfield-spacing-block-start`,t):this.style.removeProperty(`--scb-textfield-spacing-block-start`),n?this.style.setProperty(`--scb-textfield-spacing-block-end`,n):this.style.removeProperty(`--scb-textfield-spacing-block-end`),r?this.style.setProperty(`--scb-textfield-spacing-inline-start`,r):this.style.removeProperty(`--scb-textfield-spacing-inline-start`),i?this.style.setProperty(`--scb-textfield-spacing-inline-end`,i):this.style.removeProperty(`--scb-textfield-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}get _resolvedLang(){return String(this.lang??``).trim().toLowerCase().split(/[-_]/,1)[0]===`en`?`en`:`sv`}_localizedDefaultLabel(e,t,n){return this._resolvedLang===`en`&&e===t?n:e}_invalidInputMessage(){return this._resolvedLang===`en`?`Invalid input.`:`Ogiltig inmatning.`}_requiredMessage(){return this._resolvedLang===`en`?`Fill in this field.`:`Fyll i det här fältet.`}#n(){if(!this._internals)return;if(this.disabled){this._internals.setFormValue(null);return}if(this.type!==`file`){this._internals.setFormValue(this.value);return}let e=this.files;if(!e?.length){this._internals.setFormValue(null);return}if(!this.multiple){this._internals.setFormValue(e[0]);return}let t=new FormData,n=this.name.trim()||`file`;for(let r of Array.from(e))t.append(n,r);this._internals.setFormValue(t)}#r(e=!1){let t=this.shadowRoot?.querySelector(`.scb-textfield`);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return!0;let n=this._invalidInputMessage(),r=``,i=`customError`;if(t.setCustomValidity(``),this.disabled)r=``;else if(this._customValidationMessage)r=this._customValidationMessage,i=`customError`,t.setCustomValidity(r);else if(this.required&&!t.value)r=this.errorText||this._requiredMessage(),i=`valueMissing`,t.setCustomValidity(r);else if(!t.validity.valid){let e=t.validity;i=[`badInput`,`patternMismatch`,`rangeOverflow`,`rangeUnderflow`,`stepMismatch`,`tooLong`,`tooShort`,`typeMismatch`,`valueMissing`].find(t=>e[t])??`customError`,r=this.errorText||t.validationMessage||n,this.errorText&&t.setCustomValidity(this.errorText)}let a=e?t.reportValidity():t.checkValidity(),o=a?``:this._customValidationMessage||this.errorText||r||t.validationMessage||n,s=this.error,c=this._validationMessage;return this._validationMessage=o,this.error=this.disabled?!1:o?this._hasValidationBeenReported||s:s&&!this._hasValidationBeenReported&&!c,this._internals&&(a?this._internals.setValidity({}):this._internals.setValidity({[i]:!0},o,t)),(s!==this.error||c!==this._validationMessage)&&this.requestUpdate(),a}#i(){let e=this.shadowRoot?.querySelector(`.scb-textfield`);e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&this._boundField!==e&&(this.#a(),this._boundField=e,this.type!==`time`&&e.addEventListener(`input`,this._onFieldInput),e.addEventListener(`change`,this._onFieldChange),e.addEventListener(`select`,this._onFieldSelect),e.addEventListener(`focus`,this._onFieldFocus),e.addEventListener(`blur`,this._onFieldBlur))}#a(){let e=this._boundField;e&&(e.removeEventListener(`input`,this._onFieldInput),e.removeEventListener(`change`,this._onFieldChange),e.removeEventListener(`select`,this._onFieldSelect),e.removeEventListener(`focus`,this._onFieldFocus),e.removeEventListener(`blur`,this._onFieldBlur),this._boundField=null)}#o(){this._showDatepicker=!1;let e=this.shadowRoot?.querySelector(`.scb-textfield`);if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=``,e.setCustomValidity(``)),this.value=``,this.error=!1,this._internals){let e=this.disabled?null:``;this._internals.setFormValue(e),this._internals.setValidity({})}}#s(){let e=this.renderRoot?.querySelector(`.ripple-wrapper`);e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute(`data-kb-focus`,`true`):e.removeAttribute(`data-kb-focus`))}};N([_({type:String,reflect:!0})],H.prototype,`type`,void 0),N([_({type:String})],H.prototype,`lang`,void 0),N([_({type:String})],H.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],H.prototype,`supportingText`,void 0),N([_({type:String,attribute:`help-text`})],H.prototype,`helpText`,void 0),N([_({type:String,attribute:`help-label`})],H.prototype,`helpLabel`,void 0),N([_({type:String,attribute:`clear-label`})],H.prototype,`clearLabel`,void 0),N([_({type:String,attribute:`date-button-label`})],H.prototype,`dateButtonLabel`,void 0),N([_({type:String,attribute:`error-text`})],H.prototype,`errorText`,void 0),N([_({type:String,attribute:`leading-icon`})],H.prototype,`leadingIcon`,void 0),N([_({type:String})],H.prototype,`name`,void 0),N([_({type:String})],H.prototype,`pattern`,void 0),N([_({type:String})],H.prototype,`accept`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`multiple`,void 0),N([_({type:String,attribute:`value`})],H.prototype,`value`,void 0),N([_({type:String})],H.prototype,`underLabel`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],H.prototype,`required`,void 0),N([_({type:String,reflect:!0})],H.prototype,`size`,void 0),N([_({type:String,reflect:!0})],H.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],H.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],H.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],H.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],H.prototype,`spacingRight`,void 0),N([v()],H.prototype,`_showDatepicker`,void 0),H=N([a(`scb-textfield`)],H),Bc(),w(),b(),D(),P();var Iu=class extends C{static{this.formAssociated=!0}constructor(){super(),this.name=``,this.orientation=`vertical`,this.disabled=!1,this.required=!1,this.error=!1,this.deselectable=!1,this.ariaLabel=null,this.supportingText=``,this.errorText=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.value=``,this._internals=null,this._form=null,this._formResetHandler=null,this._formSubmitHandler=null,this._initialValue=``,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._supportingTextId=`scb-radio-group-supporting-${Math.random().toString(36).slice(2,11)}`,this.#e=()=>Array.from(this.children).filter(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-radio-button`),this.#t=()=>{let e=this.#e();if(!e.length)return;let t=null;for(let n of e){let e=n;this.name&&n.setAttribute(`name`,this.name),this.disabled?n.setAttribute(`disabled`,``):n.removeAttribute(`disabled`),this.orientation===`horizontal`?n.setAttribute(`orientation`,`horizontal`):n.removeAttribute(`orientation`),this.deselectable?n.setAttribute(`deselectable`,``):n.removeAttribute(`deselectable`);let r=e.value??n.getAttribute(`value`)??``,i=typeof e.checked==`boolean`?e.checked:n.hasAttribute(`checked`);if(this.value){let t=String(r)===this.value;t&&!i?e.checked=!0:!t&&i&&(e.checked=!1)}else i&&t===null&&(t=String(r))}!this.value&&t!==null&&(this.value=t)},this.#n=e=>{e.target!==this&&e.composedPath().find(e=>e?.tagName?.toLowerCase()===`scb-radio-button`)&&(e.stopImmediatePropagation(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})))},this.#r=e=>{if(e.target===this)return;let t=e.composedPath().find(e=>e?.tagName?.toLowerCase()===`scb-radio-button`);if(!t)return;e.stopImmediatePropagation();let n=t?.checked===!0,r=n?t?.value??t?.getAttribute?.(`value`)??e.target?.value??``:``;this.value=String(r??``);let i={value:String(r??``),checked:n,originalIsTrusted:e?.isTrusted===!0};this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scb-change`,{detail:i,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbchange`,{detail:i,bubbles:!0,composed:!0}))},`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
8154
8154
  :host {
8155
8155
  display: block;
8156
8156
 
@@ -8256,7 +8256,7 @@
8256
8256
  ${this.error?x`<md-icon aria-hidden="true">error</md-icon>`:``}
8257
8257
  </div>
8258
8258
  `:``}
8259
- `}firstUpdated(){this.addEventListener(`input`,this.#n),this.addEventListener(`change`,this.#r),this._initialValue=this.value,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.error=!1,this._hasValidationBeenReported=!1,this.requestUpdate(),this.#t(),this.__syncFormValue(),this.#i()},this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`reset`,this._formResetHandler,!0),this._form.addEventListener(`submit`,this._formSubmitHandler,!0)),this.__syncFormValue(),this.#i()}disconnectedCallback(){this.removeEventListener(`input`,this.#n),this.removeEventListener(`change`,this.#r),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),super.disconnectedCallback()}willUpdate(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#o(),(e.has(`name`)||e.has(`disabled`)||e.has(`orientation`)||e.has(`deselectable`)||e.has(`required`)||e.has(`value`))&&this.#t(),(e.has(`value`)||e.has(`disabled`)||e.has(`name`))&&this.__syncFormValue(),(e.has(`value`)||e.has(`disabled`)||e.has(`required`)||e.has(`errorText`))&&this.#i()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage||this._validationMessage}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}checkValidity(){return this.#i(),this._internals?.checkValidity()??!this.error}reportValidity(){return this._hasValidationBeenReported=!0,this.#i(),this._internals?.reportValidity()??!this.error}setCustomValidity(e){this._customValidationMessage=String(e??``),this.#i()}formDisabledCallback(e){this.disabled=e,e&&(this._hasValidationBeenReported=!1),this.#i()}#e;#t;#n;#r;#i(){let e=!this.disabled&&this.required&&!this.value.trim(),t=this.disabled?``:this._customValidationMessage||(e?this.errorText||`Välj ett alternativ.`:``),n=this.error,r=this._validationMessage;if(this._internals){let e=t?this._customValidationMessage?{customError:!0}:{valueMissing:!0}:{};this._internals.setValidity(e,t,this.shadowRoot?.querySelector(`.g`)??void 0)}this._validationMessage=t,this.error=this.disabled?!1:t?this._hasValidationBeenReported||n:n&&!this._hasValidationBeenReported&&!r,this.toggleAttribute(`aria-invalid`,this.error),(n!==this.error||r!==this._validationMessage)&&this.requestUpdate()}#a(){return this.error?this._validationMessage||this.errorText||`Ogiltigt val.`:this.supportingText}__syncFormValue(){if(!this._internals)return;let e=typeof this.name==`string`&&this.name.trim()!==``,t=typeof this.value==`string`&&this.value.trim()!==``,n=this.disabled||!e||!t?null:this.value;this._internals.setFormValue(n)}#o(){let e=this.#s(this.spacing),t=this.#s(this.spacingTop)??e,n=this.#s(this.spacingBottom)??e,r=this.#s(this.spacingLeft),i=this.#s(this.spacingRight);t?this.style.setProperty(`--scb-radio-group-spacing-block-start`,t):this.style.removeProperty(`--scb-radio-group-spacing-block-start`),n?this.style.setProperty(`--scb-radio-group-spacing-block-end`,n):this.style.removeProperty(`--scb-radio-group-spacing-block-end`),r?this.style.setProperty(`--scb-radio-group-spacing-inline-start`,r):this.style.removeProperty(`--scb-radio-group-spacing-inline-start`),i?this.style.setProperty(`--scb-radio-group-spacing-inline-end`,i):this.style.removeProperty(`--scb-radio-group-spacing-inline-end`)}#s(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})],Fu.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Fu.prototype,`orientation`,void 0),N([_({type:Boolean,reflect:!0})],Fu.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Fu.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],Fu.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],Fu.prototype,`deselectable`,void 0),N([_({type:String,attribute:`aria-label`})],Fu.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`supporting-text`})],Fu.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],Fu.prototype,`errorText`,void 0),N([_({type:String,reflect:!0})],Fu.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Fu.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Fu.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Fu.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Fu.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],Fu.prototype,`value`,void 0),Fu=N([a(`scb-radio-group`)],Fu),w(),b(),P();var Iu=!1,Lu=0,Ru=e=>{e.metaKey||e.altKey||e.ctrlKey||(Iu=!0)},zu=()=>{Iu=!1},Bu=()=>{Lu===0&&(window.addEventListener(`keydown`,Ru,!0),window.addEventListener(`pointerdown`,zu,!0),window.addEventListener(`mousedown`,zu,!0),window.addEventListener(`touchstart`,zu,!0)),Lu+=1},Vu=()=>{Lu=Math.max(0,Lu-1),Lu===0&&(window.removeEventListener(`keydown`,Ru,!0),window.removeEventListener(`pointerdown`,zu,!0),window.removeEventListener(`mousedown`,zu,!0),window.removeEventListener(`touchstart`,zu,!0))},Hu=class extends C{constructor(...e){super(...e),this.disabled=!1,this.checked=!1,this.name=``,this.value=``,this.deselectable=!1,this.label=``,this.supportingText=``,this.ariaLabel=``,this._radioId=``,this._showOuterFocusRing=!1,this.#n=()=>{this.disabled||this.label?.trim()&&Iu&&this.#e(!0)},this.#r=()=>{this.#e(!1)},this.#i=()=>{this.#e(!1)},this._onClick=e=>{if(this.disabled)return;e.preventDefault(),e.stopPropagation();let t=!this.deselectable||!this.checked;t!==this.checked&&(this.checked=t,this.#a(),this.checked&&this.dispatchEvent(new CustomEvent(`scb-radio-change`,{detail:{name:this.name,source:this},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:this.checked,value:this.checked?this.value:``},bubbles:!0,composed:!0})))},this._onRadioChange=e=>{e.detail.name===this.name&&e.detail.source!==this&&(this.checked=!1)}}#e(e){this._showOuterFocusRing!==e&&(this._showOuterFocusRing=e,this.requestUpdate())}#t(){let e=!!this.label?.trim();this.toggleAttribute(`data-has-label`,e),e||this.#e(!1)}#n;#r;#i;connectedCallback(){super.connectedCallback(),Bu(),this._radioId=this.id||`scb-radio-${Math.random().toString(36).substr(2,9)}`,this.#t(),this.addEventListener(`focusin`,this.#n),this.addEventListener(`focusout`,this.#r),this.addEventListener(`pointerdown`,this.#i,!0),document.addEventListener(`scb-radio-change`,this._onRadioChange)}disconnectedCallback(){super.disconnectedCallback(),Vu(),this.removeEventListener(`focusin`,this.#n),this.removeEventListener(`focusout`,this.#r),this.removeEventListener(`pointerdown`,this.#i,!0),document.removeEventListener(`scb-radio-change`,this._onRadioChange)}firstUpdated(){this.__syncInnerAria(),this.#a()}updated(e){super.updated(e),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.disabled&&this.#e(!1)),(e.has(`label`)||e.has(`supportingText`)||e.has(`ariaLabel`))&&this.__syncInnerAria(),e.has(`label`)&&this.#t(),e.has(`checked`)&&this.#a()}#a(){let e=this.shadowRoot?.querySelector(`md-radio`);e&&(e.checked=this.checked,this.checked?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}__syncInnerAria(){let e=this.shadowRoot?.querySelector(`md-radio`)?.shadowRoot;if(!e)return;let t=e.querySelector(`[role="radio"]`)||e.querySelector(`input[type="radio"]`);if(!t)return;let n=!!this.label?.trim(),r=n?`${this._radioId}-label`:``,i=this.supportingText?`${this._radioId}-supporting-text`:``;n&&r?(t.setAttribute(`aria-labelledby`,r),t.removeAttribute(`aria-label`)):(t.removeAttribute(`aria-labelledby`),this.ariaLabel?.trim()?t.setAttribute(`aria-label`,this.ariaLabel.trim()):t.removeAttribute(`aria-label`)),i?t.setAttribute(`aria-describedby`,i):t.removeAttribute(`aria-describedby`)}static{this.styles=p`
8259
+ `}firstUpdated(){this.addEventListener(`input`,this.#n),this.addEventListener(`change`,this.#r),this._initialValue=this.value,this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.error=!1,this._hasValidationBeenReported=!1,this.requestUpdate(),this.#t(),this.__syncFormValue(),this.#i()},this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`reset`,this._formResetHandler,!0),this._form.addEventListener(`submit`,this._formSubmitHandler,!0)),this.__syncFormValue(),this.#i()}disconnectedCallback(){this.removeEventListener(`input`,this.#n),this.removeEventListener(`change`,this.#r),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),super.disconnectedCallback()}willUpdate(e){(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#o(),(e.has(`name`)||e.has(`disabled`)||e.has(`orientation`)||e.has(`deselectable`)||e.has(`required`)||e.has(`value`))&&this.#t(),(e.has(`value`)||e.has(`disabled`)||e.has(`name`))&&this.__syncFormValue(),(e.has(`value`)||e.has(`disabled`)||e.has(`required`)||e.has(`errorText`))&&this.#i()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage||this._validationMessage}get willValidate(){return this._internals?.willValidate??!this.disabled}get labels(){return this._internals?.labels}checkValidity(){return this.#i(),this._internals?.checkValidity()??!this.error}reportValidity(){return this._hasValidationBeenReported=!0,this.#i(),this._internals?.reportValidity()??!this.error}setCustomValidity(e){this._customValidationMessage=String(e??``),this.#i()}formDisabledCallback(e){this.disabled=e,e&&(this._hasValidationBeenReported=!1),this.#i()}#e;#t;#n;#r;#i(){let e=!this.disabled&&this.required&&!this.value.trim(),t=this.disabled?``:this._customValidationMessage||(e?this.errorText||`Välj ett alternativ.`:``),n=this.error,r=this._validationMessage;if(this._internals){let e=t?this._customValidationMessage?{customError:!0}:{valueMissing:!0}:{};this._internals.setValidity(e,t,this.shadowRoot?.querySelector(`.g`)??void 0)}this._validationMessage=t,this.error=this.disabled?!1:t?this._hasValidationBeenReported||n:n&&!this._hasValidationBeenReported&&!r,this.toggleAttribute(`aria-invalid`,this.error),(n!==this.error||r!==this._validationMessage)&&this.requestUpdate()}#a(){return this.error?this._validationMessage||this.errorText||`Ogiltigt val.`:this.supportingText}__syncFormValue(){if(!this._internals)return;let e=typeof this.name==`string`&&this.name.trim()!==``,t=typeof this.value==`string`&&this.value.trim()!==``,n=this.disabled||!e||!t?null:this.value;this._internals.setFormValue(n)}#o(){let e=this.#s(this.spacing),t=this.#s(this.spacingTop)??e,n=this.#s(this.spacingBottom)??e,r=this.#s(this.spacingLeft),i=this.#s(this.spacingRight);t?this.style.setProperty(`--scb-radio-group-spacing-block-start`,t):this.style.removeProperty(`--scb-radio-group-spacing-block-start`),n?this.style.setProperty(`--scb-radio-group-spacing-block-end`,n):this.style.removeProperty(`--scb-radio-group-spacing-block-end`),r?this.style.setProperty(`--scb-radio-group-spacing-inline-start`,r):this.style.removeProperty(`--scb-radio-group-spacing-inline-start`),i?this.style.setProperty(`--scb-radio-group-spacing-inline-end`,i):this.style.removeProperty(`--scb-radio-group-spacing-inline-end`)}#s(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})],Iu.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Iu.prototype,`orientation`,void 0),N([_({type:Boolean,reflect:!0})],Iu.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Iu.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],Iu.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],Iu.prototype,`deselectable`,void 0),N([_({type:String,attribute:`aria-label`})],Iu.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`supporting-text`})],Iu.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],Iu.prototype,`errorText`,void 0),N([_({type:String,reflect:!0})],Iu.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Iu.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Iu.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Iu.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Iu.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],Iu.prototype,`value`,void 0),Iu=N([a(`scb-radio-group`)],Iu),w(),b(),P();var Lu=!1,Ru=0,zu=e=>{e.metaKey||e.altKey||e.ctrlKey||(Lu=!0)},Bu=()=>{Lu=!1},Vu=()=>{Ru===0&&(window.addEventListener(`keydown`,zu,!0),window.addEventListener(`pointerdown`,Bu,!0),window.addEventListener(`mousedown`,Bu,!0),window.addEventListener(`touchstart`,Bu,!0)),Ru+=1},Hu=()=>{Ru=Math.max(0,Ru-1),Ru===0&&(window.removeEventListener(`keydown`,zu,!0),window.removeEventListener(`pointerdown`,Bu,!0),window.removeEventListener(`mousedown`,Bu,!0),window.removeEventListener(`touchstart`,Bu,!0))},Uu=class extends C{constructor(...e){super(...e),this.disabled=!1,this.checked=!1,this.name=``,this.value=``,this.deselectable=!1,this.label=``,this.supportingText=``,this.ariaLabel=``,this._radioId=``,this._showOuterFocusRing=!1,this.#n=()=>{this.disabled||this.label?.trim()&&Lu&&this.#e(!0)},this.#r=()=>{this.#e(!1)},this.#i=()=>{this.#e(!1)},this._onClick=e=>{if(this.disabled)return;e.preventDefault(),e.stopPropagation();let t=!this.deselectable||!this.checked;t!==this.checked&&(this.checked=t,this.#a(),this.checked&&this.dispatchEvent(new CustomEvent(`scb-radio-change`,{detail:{name:this.name,source:this},bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:{checked:this.checked,value:this.checked?this.value:``},bubbles:!0,composed:!0})))},this._onRadioChange=e=>{e.detail.name===this.name&&e.detail.source!==this&&(this.checked=!1)}}#e(e){this._showOuterFocusRing!==e&&(this._showOuterFocusRing=e,this.requestUpdate())}#t(){let e=!!this.label?.trim();this.toggleAttribute(`data-has-label`,e),e||this.#e(!1)}#n;#r;#i;connectedCallback(){super.connectedCallback(),Vu(),this._radioId=this.id||`scb-radio-${Math.random().toString(36).substr(2,9)}`,this.#t(),this.addEventListener(`focusin`,this.#n),this.addEventListener(`focusout`,this.#r),this.addEventListener(`pointerdown`,this.#i,!0),document.addEventListener(`scb-radio-change`,this._onRadioChange)}disconnectedCallback(){super.disconnectedCallback(),Hu(),this.removeEventListener(`focusin`,this.#n),this.removeEventListener(`focusout`,this.#r),this.removeEventListener(`pointerdown`,this.#i,!0),document.removeEventListener(`scb-radio-change`,this._onRadioChange)}firstUpdated(){this.__syncInnerAria(),this.#a()}updated(e){super.updated(e),e.has(`disabled`)&&(this.toggleAttribute(`aria-disabled`,this.disabled),this.disabled&&this.#e(!1)),(e.has(`label`)||e.has(`supportingText`)||e.has(`ariaLabel`))&&this.__syncInnerAria(),e.has(`label`)&&this.#t(),e.has(`checked`)&&this.#a()}#a(){let e=this.shadowRoot?.querySelector(`md-radio`);e&&(e.checked=this.checked,this.checked?e.setAttribute(`checked`,``):e.removeAttribute(`checked`))}__syncInnerAria(){let e=this.shadowRoot?.querySelector(`md-radio`)?.shadowRoot;if(!e)return;let t=e.querySelector(`[role="radio"]`)||e.querySelector(`input[type="radio"]`);if(!t)return;let n=!!this.label?.trim(),r=n?`${this._radioId}-label`:``,i=this.supportingText?`${this._radioId}-supporting-text`:``;n&&r?(t.setAttribute(`aria-labelledby`,r),t.removeAttribute(`aria-label`)):(t.removeAttribute(`aria-labelledby`),this.ariaLabel?.trim()?t.setAttribute(`aria-label`,this.ariaLabel.trim()):t.removeAttribute(`aria-label`)),i?t.setAttribute(`aria-describedby`,i):t.removeAttribute(`aria-describedby`)}static{this.styles=p`
8260
8260
  /* layout med inline-grid */
8261
8261
  :host {
8262
8262
  /* Valtext: base text current. JSON-källa: src/tokens/source/typography.json. */
@@ -8426,7 +8426,7 @@
8426
8426
  </div>`:S}
8427
8427
  </label>
8428
8428
  <slot></slot>
8429
- `}};N([_({type:Boolean,reflect:!0})],Hu.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Hu.prototype,`checked`,void 0),N([_({type:String,reflect:!0})],Hu.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Hu.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Hu.prototype,`deselectable`,void 0),N([_({type:String})],Hu.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],Hu.prototype,`supportingText`,void 0),N([_({type:String,attribute:`aria-label`})],Hu.prototype,`ariaLabel`,void 0),Hu=N([a(`scb-radio-button`)],Hu),w(),b(),Oc(),al(),Hc(),ml(),D(),cc(),Cl(),P();var W,Uu={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Wu=new Set,Gu=``,Ku=``,G=class extends C{static{W=this}constructor(...e){super(...e),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant=`basic`,this.label=``,this.icon=``,this.supportingText=``,this.okButton=`OK`,this.cancelButton=`Avbryt`,this.deleteButton=`Delete`,this.confirmButton=`Ta bort`,this.denyButton=`Avbryt`,this.resetButton=`Återställ`,this.submitButton=`Spara`,this.closeLabel=`Stäng dialog`,this.formId=``,this.formAction=``,this.formMethod=``,this.formEnctype=``,this.__lastTriggerEl=null,this.__focusBeforeOpen=null,this.__stackInactive=!1,this.__submitting=!1,this.__redirectingFocus=!1,this.__scrollLocked=!1,this.__initialControlStates=new Map,this.__onDocumentClick=e=>{this.__getActionFromEvent(e)===`toggle`&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{if(!this.open||e.key!==`Escape`)return;let t=W.__getTopmostOpenDialog();t&&t!==this||this.__hasOpenNestedOverlay(e)||(e.preventDefault(),e.stopPropagation(),this.__fireCancelable(`esc`)&&this.__setOpen(!1))},this.__onDocumentFocusIn=e=>{this.__redirectingFocus||W.__getTopmostOpenDialog()!==this||e.composedPath().includes(this)||(this.__redirectingFocus=!0,queueMicrotask(()=>{this.__focusInitial(),this.__redirectingFocus=!1}))},this.__rememberInitialControlStates=()=>{for(let e of this.__getSlottedElements()){if(!(e instanceof HTMLElement)||this.__initialControlStates.has(e))continue;let t={},n=e;`value`in n&&(t.value=n.value),`checked`in n&&(t.checked=n.checked),`selected`in n&&(t.selected=n.selected),Object.keys(t).length>0&&this.__initialControlStates.set(e,t)}},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire(`scrim`),this.__setOpen(!1))},this.__onOk=()=>{this.__fire(`ok`),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire(`cancel`),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire(`confirm`),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire(`deny`),this.__setOpen(!1)},this.__onReset=()=>{let e=this.shadowRoot?.querySelector(`form`);e instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(e),e.reset()),this.__rememberInitialControlStates();for(let[e,t]of this.__initialControlStates){if(!e.isConnected)continue;if(e instanceof HTMLInputElement){e.type===`file`?e.value=``:e.value=e.defaultValue,e.checked=e.defaultChecked;continue}if(e instanceof HTMLTextAreaElement){e.value=e.defaultValue;continue}if(e instanceof HTMLSelectElement){for(let t of Array.from(e.options))t.selected=t.defaultSelected;continue}let n=e;n.formResetCallback?.(),`value`in t&&(n.value=t.value),`checked`in t&&(n.checked=t.checked),`selected`in t&&(n.selected=t.selected),n.requestUpdate?.()}this.__fire(`reset`)},this.__onSubmit=()=>{if(this.__submitting)return;let e=this.shadowRoot?.querySelector(`form`);if(e instanceof HTMLFormElement){if(!this.__validateFormAndSlottedFields(e))return;e.requestSubmit()}},this.__onFormSubmit=async e=>{let t=e.currentTarget;if(!(t instanceof HTMLFormElement)||(e.preventDefault(),e.stopPropagation(),this.__submitting)||!this.__validateFormAndSlottedFields(t))return;let n=this.__createFormData(t),r=this.__getFormMethod(),i=t.action;if(this.__fireCancelable(`submit`,{form:t,formData:n,method:r,action:i})){if(this.formAction.trim()&&(r===`PUT`||r===`DELETE`)){let e=new AbortController;this.__submitAbortController=e,this.__submitting=!0,this.setAttribute(`aria-busy`,`true`);try{let a=await fetch(i,{method:r,body:n,credentials:`same-origin`,signal:e.signal}),o={form:t,formData:n,method:r,action:i,response:a,status:a.status};if(!a.ok){this.__fire(`submit-error`,o);return}this.__fire(`submit-success`,o),this.open&&this.__setOpen(!1)}catch(e){e instanceof DOMException&&e.name===`AbortError`&&!this.isConnected||this.__fire(`submit-error`,{form:t,formData:n,method:r,action:i,error:e})}finally{this.__submitAbortController===e&&(this.__submitAbortController=void 0,this.__submitting=!1,this.removeAttribute(`aria-busy`))}return}if(this.formAction.trim()){let e=e=>{this.__appendSlottedFiles(t,e.formData)},r=t.getAttribute(`enctype`);Array.from(n.values()).some(e=>e instanceof File)&&!this.formEnctype.trim()&&(t.enctype=`multipart/form-data`),t.addEventListener(`formdata`,e,{once:!0});try{this.__setOpen(!1),HTMLFormElement.prototype.submit.call(t)}finally{t.removeEventListener(`formdata`,e),r===null?t.removeAttribute(`enctype`):t.setAttribute(`enctype`,r)}return}this.__setOpen(!1)}},this.__onKeydownTrap=e=>{if(!this.open||e.key!==`Tab`||W.__getTopmostOpenDialog()&&W.__getTopmostOpenDialog()!==this)return;let t=this.__collectFocusableElements();if(!t.length)return;let n=t[0],r=t[t.length-1],i=this.__currentFocusableFromEvent(e,t);!i||!t.includes(i)?((e.shiftKey?r:n).focus(),e.preventDefault()):e.shiftKey&&i===n?(r.focus(),e.preventDefault()):!e.shiftKey&&i===r&&(n.focus(),e.preventDefault())}}static{this.__openDialogs=[]}static{this.__backgroundInertSnapshot=new Map}static{this.__focusableSelector=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`scb-button:not([disabled])`,`scb-icon-button:not([disabled])`,`scb-textfield:not([disabled])`,`scb-checkbox:not([disabled])`,`scb-radio-button:not([disabled])`,`scb-switch:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`)}static{this.styles=p`
8429
+ `}};N([_({type:Boolean,reflect:!0})],Uu.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Uu.prototype,`checked`,void 0),N([_({type:String,reflect:!0})],Uu.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Uu.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Uu.prototype,`deselectable`,void 0),N([_({type:String})],Uu.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],Uu.prototype,`supportingText`,void 0),N([_({type:String,attribute:`aria-label`})],Uu.prototype,`ariaLabel`,void 0),Uu=N([a(`scb-radio-button`)],Uu),w(),b(),Oc(),sl(),Uc(),hl(),D(),cc(),wl(),P();var U,Wu={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Gu=new Set,Ku=``,qu=``,W=class extends C{static{U=this}constructor(...e){super(...e),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.variant=`basic`,this.label=``,this.icon=``,this.supportingText=``,this.okButton=`OK`,this.cancelButton=`Avbryt`,this.deleteButton=`Delete`,this.confirmButton=`Ta bort`,this.denyButton=`Avbryt`,this.resetButton=`Återställ`,this.submitButton=`Spara`,this.closeLabel=`Stäng dialog`,this.formId=``,this.formAction=``,this.formMethod=``,this.formEnctype=``,this.__lastTriggerEl=null,this.__focusBeforeOpen=null,this.__stackInactive=!1,this.__submitting=!1,this.__redirectingFocus=!1,this.__scrollLocked=!1,this.__initialControlStates=new Map,this.__onDocumentClick=e=>{this.__getActionFromEvent(e)===`toggle`&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{if(!this.open||e.key!==`Escape`)return;let t=U.__getTopmostOpenDialog();t&&t!==this||this.__hasOpenNestedOverlay(e)||(e.preventDefault(),e.stopPropagation(),this.__fireCancelable(`esc`)&&this.__setOpen(!1))},this.__onDocumentFocusIn=e=>{this.__redirectingFocus||U.__getTopmostOpenDialog()!==this||e.composedPath().includes(this)||(this.__redirectingFocus=!0,queueMicrotask(()=>{this.__focusInitial(),this.__redirectingFocus=!1}))},this.__rememberInitialControlStates=()=>{for(let e of this.__getSlottedElements()){if(!(e instanceof HTMLElement)||this.__initialControlStates.has(e))continue;let t={},n=e;`value`in n&&(t.value=n.value),`checked`in n&&(t.checked=n.checked),`selected`in n&&(t.selected=n.selected),Object.keys(t).length>0&&this.__initialControlStates.set(e,t)}},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire(`scrim`),this.__setOpen(!1))},this.__onOk=()=>{this.__fire(`ok`),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire(`cancel`),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire(`confirm`),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire(`deny`),this.__setOpen(!1)},this.__onReset=()=>{let e=this.shadowRoot?.querySelector(`form`);e instanceof HTMLFormElement&&(this.__clearGeneratedFormValues(e),e.reset()),this.__rememberInitialControlStates();for(let[e,t]of this.__initialControlStates){if(!e.isConnected)continue;if(e instanceof HTMLInputElement){e.type===`file`?e.value=``:e.value=e.defaultValue,e.checked=e.defaultChecked;continue}if(e instanceof HTMLTextAreaElement){e.value=e.defaultValue;continue}if(e instanceof HTMLSelectElement){for(let t of Array.from(e.options))t.selected=t.defaultSelected;continue}let n=e;n.formResetCallback?.(),`value`in t&&(n.value=t.value),`checked`in t&&(n.checked=t.checked),`selected`in t&&(n.selected=t.selected),n.requestUpdate?.()}this.__fire(`reset`)},this.__onSubmit=()=>{if(this.__submitting)return;let e=this.shadowRoot?.querySelector(`form`);if(e instanceof HTMLFormElement){if(!this.__validateFormAndSlottedFields(e))return;e.requestSubmit()}},this.__onFormSubmit=async e=>{let t=e.currentTarget;if(!(t instanceof HTMLFormElement)||(e.preventDefault(),e.stopPropagation(),this.__submitting)||!this.__validateFormAndSlottedFields(t))return;let n=this.__createFormData(t),r=this.__getFormMethod(),i=t.action;if(this.__fireCancelable(`submit`,{form:t,formData:n,method:r,action:i})){if(this.formAction.trim()&&(r===`PUT`||r===`DELETE`)){let e=new AbortController;this.__submitAbortController=e,this.__submitting=!0,this.setAttribute(`aria-busy`,`true`);try{let a=await fetch(i,{method:r,body:n,credentials:`same-origin`,signal:e.signal}),o={form:t,formData:n,method:r,action:i,response:a,status:a.status};if(!a.ok){this.__fire(`submit-error`,o);return}this.__fire(`submit-success`,o),this.open&&this.__setOpen(!1)}catch(e){e instanceof DOMException&&e.name===`AbortError`&&!this.isConnected||this.__fire(`submit-error`,{form:t,formData:n,method:r,action:i,error:e})}finally{this.__submitAbortController===e&&(this.__submitAbortController=void 0,this.__submitting=!1,this.removeAttribute(`aria-busy`))}return}if(this.formAction.trim()){let e=e=>{this.__appendSlottedFiles(t,e.formData)},r=t.getAttribute(`enctype`);Array.from(n.values()).some(e=>e instanceof File)&&!this.formEnctype.trim()&&(t.enctype=`multipart/form-data`),t.addEventListener(`formdata`,e,{once:!0});try{this.__setOpen(!1),HTMLFormElement.prototype.submit.call(t)}finally{t.removeEventListener(`formdata`,e),r===null?t.removeAttribute(`enctype`):t.setAttribute(`enctype`,r)}return}this.__setOpen(!1)}},this.__onKeydownTrap=e=>{if(!this.open||e.key!==`Tab`||U.__getTopmostOpenDialog()&&U.__getTopmostOpenDialog()!==this)return;let t=this.__collectFocusableElements();if(!t.length)return;let n=t[0],r=t[t.length-1],i=this.__currentFocusableFromEvent(e,t);!i||!t.includes(i)?((e.shiftKey?r:n).focus(),e.preventDefault()):e.shiftKey&&i===n?(r.focus(),e.preventDefault()):!e.shiftKey&&i===r&&(n.focus(),e.preventDefault())}}static{this.__openDialogs=[]}static{this.__backgroundInertSnapshot=new Map}static{this.__focusableSelector=[`a[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`scb-button:not([disabled])`,`scb-icon-button:not([disabled])`,`scb-textfield:not([disabled])`,`scb-checkbox:not([disabled])`,`scb-radio-button:not([disabled])`,`scb-switch:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`,`)}static{this.styles=p`
8430
8430
  :host {
8431
8431
  display:block;
8432
8432
  position:relative;
@@ -8703,7 +8703,7 @@
8703
8703
  }
8704
8704
 
8705
8705
  /* design:bindings:scb-dialog:end */
8706
- `}__getActionFromEvent(e){if(!this.id)return null;for(let t of e.composedPath())if(t instanceof Element&&(t.getAttribute(`data-dialog-toggle`)===this.id||t.getAttribute(`aria-controls`)===this.id))return this.__lastTriggerEl=t,`toggle`;return null}__hasOpenNestedOverlay(e){let t=`scb-options-menu, scb-dropdown, scb-select`;return e.composedPath().some(e=>e instanceof Element&&e!==this&&e.matches(t)&&!!e.open)?!0:Array.from(this.querySelectorAll(t)).some(e=>!!e.open)}__isModalOverlay(){return!this.inSb&&!this.__usesInPlaceLayout()}static __getTopmostOpenDialog(){return[...W.__openDialogs].reverse().find(e=>e.open&&e.isConnected&&e.__isModalOverlay())}static __restoreBackgroundInert(){for(let[e,t]of W.__backgroundInertSnapshot)e.inert=t;W.__backgroundInertSnapshot.clear()}static __setBackgroundInert(e){if(W.__restoreBackgroundInert(),!e)return;let t=e;for(;;){let e=t.parentNode;if(e instanceof Element||e instanceof ShadowRoot)for(let n of Array.from(e.children))n===t||!(n instanceof HTMLElement)||(W.__backgroundInertSnapshot.set(n,n.inert),n.inert=!0);if(e instanceof ShadowRoot){t=e.host;continue}if(e instanceof Element){t=e;continue}break}}__getRequestedZIndex(){if(typeof this.zIndex==`number`&&Number.isFinite(this.zIndex))return Math.trunc(this.zIndex);let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--scb-layer-dialog-scrim`),10);return Number.isFinite(e)?e:1e3}__setStackLayer(e){this.style.setProperty(`--z-dialog-scrim`,String(e)),this.style.setProperty(`--z-dialog`,String(e+1))}__setStackInactive(e){this.__stackInactive!==e&&(this.__stackInactive=e,this.requestUpdate())}static __syncModalStack(){W.__openDialogs=W.__openDialogs.filter(e=>e.open&&e.isConnected&&e.__isModalOverlay());let e=W.__getTopmostOpenDialog(),t=W.__openDialogs.map(e=>e.__getRequestedZIndex()),n=t.length?Math.max(...t):1e3;W.__openDialogs.forEach((t,r)=>{t.__setStackInactive(t!==e),t.__setStackLayer(n+r*2)}),W.__setBackgroundInert(e)}__registerOpenDialog(){this.__isModalOverlay()&&(W.__openDialogs=W.__openDialogs.filter(e=>e!==this),W.__openDialogs.push(this),W.__syncModalStack())}__unregisterOpenDialog(){let e=[...W.__openDialogs].reverse().find(e=>e===this||e.open&&e.isConnected)===this;return W.__openDialogs=W.__openDialogs.filter(e=>e!==this),this.__setStackInactive(!1),W.__syncModalStack(),this.__applyZIndex(),e}__getDeepActiveElement(){let e=this.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement?e:null}__isInsideDialog(e){let t=e;for(;t;){if(t===this)return!0;t=t instanceof ShadowRoot?t.host:t.parentNode}return!1}__focusInitial(){if(!this.open||this.__stackInactive||W.__getTopmostOpenDialog()!==this)return;let e=this.__collectFocusableElements()[0];if(e){e.focus();return}this.shadowRoot?.querySelector(`.container`)?.focus()}__clearSavedFocus(){this.__lastTriggerEl=null,this.__focusBeforeOpen=null}async __restoreFocusAfterClose(){let e=this.__lastTriggerEl?.isConnected?this.__lastTriggerEl:this.__focusBeforeOpen?.isConnected?this.__focusBeforeOpen:null;this.__clearSavedFocus(),await Promise.resolve();let t=W.__getTopmostOpenDialog();if(t){await t.updateComplete,e&&t.__isInsideDialog(e)&&e.focus();let n=t.__getDeepActiveElement();(!n||!t.__isInsideDialog(n))&&t.__focusInitial();return}e?.focus()}connectedCallback(){super.connectedCallback(),this.__applyZIndex(),this.__applyMaxSize(),document.addEventListener(`click`,this.__onDocumentClick,!1),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),document.addEventListener(`focusin`,this.__onDocumentFocusIn,!0),this.addEventListener(`keydown`,this.__onKeydownTrap),this.open&&this.hasUpdated&&(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__toggleScrollLock(!0),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial()))}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),document.removeEventListener(`focusin`,this.__onDocumentFocusIn,!0),this.removeEventListener(`keydown`,this.__onKeydownTrap),this.__submitAbortController?.abort(),z(this.shadowRoot?.querySelector(`.layer`));let e=this.__unregisterOpenDialog();this.__toggleScrollLock(!1),e?this.__restoreFocusAfterClose():this.__clearSavedFocus(),super.disconnectedCallback()}__applyZIndex(){let e=typeof this.zIndex==`number`&&Number.isFinite(this.zIndex)?this.zIndex:void 0;if(e===void 0){this.style.removeProperty(`--z-dialog-scrim`),this.style.removeProperty(`--z-dialog`);return}this.style.setProperty(`--z-dialog-scrim`,String(e)),this.style.setProperty(`--z-dialog`,String(e+1))}__applyMaxSize(){let e=(this.maxW??``).trim(),t=(this.maxH??``).trim();e?(this.style.setProperty(`--scb-dialog-max-w`,e),this.style.setProperty(`--scb-dialog-width`,`min(${e}, 90vw)`)):(this.style.removeProperty(`--scb-dialog-max-w`),this.style.removeProperty(`--scb-dialog-width`)),t?this.style.setProperty(`--scb-dialog-max-h`,t):this.style.removeProperty(`--scb-dialog-max-h`)}updated(e){if(e.has(`zIndex`)&&(this.open&&this.__isModalOverlay()?W.__syncModalStack():this.__applyZIndex()),(e.has(`maxW`)||e.has(`maxH`))&&this.__applyMaxSize(),e.has(`open`)){let t=e.get(`open`);this.__updateTriggersExpanded(),this.open&&!t?(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial())):!this.open&&t&&(this.__unregisterOpenDialog()?this.__restoreFocusAfterClose():this.__clearSavedFocus()),this.__toggleScrollLock(this.open)}if(e.has(`inSb`)&&this.open&&(this.__unregisterOpenDialog(),this.__registerOpenDialog(),this.__toggleScrollLock(!1),this.__toggleScrollLock(!0)),e.has(`open`)||e.has(`inSb`)){let e=this.shadowRoot?.querySelector(`.layer`);if(this.open&&this.__isModalOverlay())_l(e);else if(this.open||bl(this),!this.open&&yl(e)){let t=this.shadowRoot?.querySelector(`.container`);vl(e,void 0,t??e??void 0)}else z(e)}(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute(`aria-controls`)&&e.setAttribute(`aria-expanded`,String(this.open))})}__usesInPlaceLayout(){let e=getComputedStyle(this);return e.getPropertyValue(`--scb-dialog-scrim-position`).trim()===`relative`||e.getPropertyValue(`--scb-dialog-container-position`).trim()===`absolute`}__toggleScrollLock(e){let t=document.documentElement,n=document.body;if(e){if(this.__scrollLocked||this.inSb||this.__usesInPlaceLayout())return;if(Wu.size===0){Gu=t.style.overflow,Ku=n.style.paddingRight;let e=window.innerWidth-t.clientWidth;if(t.style.overflow=`hidden`,e>0){let t=Number.parseFloat(getComputedStyle(n).paddingRight)||0;n.style.paddingRight=`${t+e}px`}}Wu.add(this),this.__scrollLocked=!0;return}this.__scrollLocked&&=(Wu.delete(this),Wu.size===0&&(t.style.overflow=Gu,n.style.paddingRight=Ku),!1)}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-dialog-spacing-block-start`,t):this.style.removeProperty(`--scb-dialog-spacing-block-start`),n?this.style.setProperty(`--scb-dialog-spacing-block-end`,n):this.style.removeProperty(`--scb-dialog-spacing-block-end`),r?this.style.setProperty(`--scb-dialog-spacing-inline-start`,r):this.style.removeProperty(`--scb-dialog-spacing-inline-start`),i?this.style.setProperty(`--scb-dialog-spacing-inline-end`,i):this.style.removeProperty(`--scb-dialog-spacing-inline-end`)}__setOpen(e){this.open=e,this.__fire(e?`open`:`close`)}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__fireCancelable(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,cancelable:!0}))}__getFormMethod(){let e=String(this.formMethod||`GET`).trim().toUpperCase();return e===`POST`||e===`PUT`||e===`DELETE`?e:`GET`}__getSlottedElements(){let e=this.shadowRoot?.querySelector(`slot`);if(!(e instanceof HTMLSlotElement))return[];let t=e.assignedElements({flatten:!0}),n=[];for(let e of t)n.push(e,...Array.from(e.querySelectorAll(`*`)));return n}__appendHiddenFormValue(e,t,n){let r=document.createElement(`input`);r.type=`hidden`,r.name=t,r.value=n,r.setAttribute(`data-scb-dialog-generated`,`true`),e.append(r)}__clearGeneratedFormValues(e){e.querySelectorAll(`input[data-scb-dialog-generated="true"]`).forEach(e=>e.remove())}__syncSlottedFormValues(e){this.__clearGeneratedFormValues(e),this.__getSlottedElements().forEach(t=>{if(!(t instanceof HTMLElement))return;let n=(t.getAttribute(`name`)??``).trim();if(n&&!(t.disabled===!0||t.hasAttribute(`disabled`))){if(t instanceof HTMLInputElement){if(t.form===e)return;let r=(t.type||``).toLowerCase();if(r===`file`)return;if(r===`checkbox`||r===`radio`){t.checked&&this.__appendHiddenFormValue(e,n,t.value||`on`);return}this.__appendHiddenFormValue(e,n,t.value??``);return}if(t instanceof HTMLTextAreaElement){if(t.form===e)return;this.__appendHiddenFormValue(e,n,t.value??``);return}if(t instanceof HTMLSelectElement){if(t.form===e)return;if(t.multiple){Array.from(t.selectedOptions).forEach(t=>{this.__appendHiddenFormValue(e,n,t.value)});return}this.__appendHiddenFormValue(e,n,t.value??``);return}switch(t.tagName){case`SCB-TEXTFIELD`:if(String(t.type??``).toLowerCase()===`file`)return;this.__appendHiddenFormValue(e,n,String(t.value??``));return;case`SCB-CHECKBOX`:t.checked&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;case`SCB-RADIO-BUTTON`:t.checked&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;case`SCB-SWITCH`:(t.selected||t.checked)&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;case`SCB-CHIP`:t.selected&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;default:`value`in t&&this.__appendHiddenFormValue(e,n,String(t.value??``))}}})}__appendSlottedFiles(e,t){for(let n of this.__getSlottedElements()){if(!(n instanceof HTMLElement))continue;let r=(n.getAttribute(`name`)??``).trim();if(!(!r||n.disabled===!0||n.hasAttribute(`disabled`))){if(n instanceof HTMLInputElement&&n.type===`file`){if(n.form===e)continue;for(let e of Array.from(n.files??[]))t.append(r,e);continue}if(n.tagName===`SCB-TEXTFIELD`&&String(n.type??``).toLowerCase()===`file`){let e=n.files;for(let n of Array.from(e??[]))t.append(r,n)}}}}__createFormData(e){this.__syncSlottedFormValues(e);let t=new FormData(e);return this.__appendSlottedFiles(e,t),t}__validateFormAndSlottedFields(e){let t=e=>e.disabled===!0||e.hasAttribute(`disabled`),n=e.reportValidity(),r=null,i=new Set;return this.__getSlottedElements().forEach(e=>{if(!(e instanceof HTMLElement)||i.has(e)||t(e))return;i.add(e);let a=e;if(e.tagName===`SCB-TEXTFIELD`&&a.error===!0){r||=e,n=!1;return}if(typeof a.reportValidity==`function`){let t=!!a.reportValidity();!t&&!r&&(r=e),n&&=t}}),!n&&r&&r.focus(),n}__isFocusableElement(e){if(!(e instanceof HTMLElement)||!e.matches(W.__focusableSelector)||e.disabled||e.getAttribute(`aria-hidden`)===`true`)return!1;let t=getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`}__collectAssignedFocusableElements(e){let t=[];return this.__isFocusableElement(e)&&t.push(e),t.push(...Array.from(e.querySelectorAll(W.__focusableSelector)).filter(e=>this.__isFocusableElement(e))),t}__collectFocusableElements(){let e=this.shadowRoot;if(!e)return[];let t=[],n=new Set,r=e=>{n.has(e)||(n.add(e),t.push(e))},i=e=>{if(e instanceof HTMLSlotElement){e.assignedElements({flatten:!0}).flatMap(e=>this.__collectAssignedFocusableElements(e)).forEach(r);return}e instanceof HTMLElement&&this.__isFocusableElement(e)&&r(e),e.childNodes.forEach(i)};return e.childNodes.forEach(i),t}__currentFocusableFromEvent(e,t){let n=e.composedPath();return t.find(e=>n.includes(e))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__slotIsEmpty(){let e=this.shadowRoot?.querySelector(`slot`);return!e||e.assignedElements({flatten:!0}).length===0}renderHeader(e){let t=this.variant===`form`||this.variant===`floating`||this.variant===`iframe`;return x`
8706
+ `}__getActionFromEvent(e){if(!this.id)return null;for(let t of e.composedPath())if(t instanceof Element&&(t.getAttribute(`data-dialog-toggle`)===this.id||t.getAttribute(`aria-controls`)===this.id))return this.__lastTriggerEl=t,`toggle`;return null}__hasOpenNestedOverlay(e){let t=`scb-options-menu, scb-dropdown, scb-select`;return e.composedPath().some(e=>e instanceof Element&&e!==this&&e.matches(t)&&!!e.open)?!0:Array.from(this.querySelectorAll(t)).some(e=>!!e.open)}__isModalOverlay(){return!this.inSb&&!this.__usesInPlaceLayout()}static __getTopmostOpenDialog(){return[...U.__openDialogs].reverse().find(e=>e.open&&e.isConnected&&e.__isModalOverlay())}static __restoreBackgroundInert(){for(let[e,t]of U.__backgroundInertSnapshot)e.inert=t;U.__backgroundInertSnapshot.clear()}static __setBackgroundInert(e){if(U.__restoreBackgroundInert(),!e)return;let t=e;for(;;){let e=t.parentNode;if(e instanceof Element||e instanceof ShadowRoot)for(let n of Array.from(e.children))n===t||!(n instanceof HTMLElement)||(U.__backgroundInertSnapshot.set(n,n.inert),n.inert=!0);if(e instanceof ShadowRoot){t=e.host;continue}if(e instanceof Element){t=e;continue}break}}__getRequestedZIndex(){if(typeof this.zIndex==`number`&&Number.isFinite(this.zIndex))return Math.trunc(this.zIndex);let e=Number.parseInt(getComputedStyle(this).getPropertyValue(`--scb-layer-dialog-scrim`),10);return Number.isFinite(e)?e:1e3}__setStackLayer(e){this.style.setProperty(`--z-dialog-scrim`,String(e)),this.style.setProperty(`--z-dialog`,String(e+1))}__setStackInactive(e){this.__stackInactive!==e&&(this.__stackInactive=e,this.requestUpdate())}static __syncModalStack(){U.__openDialogs=U.__openDialogs.filter(e=>e.open&&e.isConnected&&e.__isModalOverlay());let e=U.__getTopmostOpenDialog(),t=U.__openDialogs.map(e=>e.__getRequestedZIndex()),n=t.length?Math.max(...t):1e3;U.__openDialogs.forEach((t,r)=>{t.__setStackInactive(t!==e),t.__setStackLayer(n+r*2)}),U.__setBackgroundInert(e)}__registerOpenDialog(){this.__isModalOverlay()&&(U.__openDialogs=U.__openDialogs.filter(e=>e!==this),U.__openDialogs.push(this),U.__syncModalStack())}__unregisterOpenDialog(){let e=[...U.__openDialogs].reverse().find(e=>e===this||e.open&&e.isConnected)===this;return U.__openDialogs=U.__openDialogs.filter(e=>e!==this),this.__setStackInactive(!1),U.__syncModalStack(),this.__applyZIndex(),e}__getDeepActiveElement(){let e=this.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement?e:null}__isInsideDialog(e){let t=e;for(;t;){if(t===this)return!0;t=t instanceof ShadowRoot?t.host:t.parentNode}return!1}__focusInitial(){if(!this.open||this.__stackInactive||U.__getTopmostOpenDialog()!==this)return;let e=this.__collectFocusableElements()[0];if(e){e.focus();return}this.shadowRoot?.querySelector(`.container`)?.focus()}__clearSavedFocus(){this.__lastTriggerEl=null,this.__focusBeforeOpen=null}async __restoreFocusAfterClose(){let e=this.__lastTriggerEl?.isConnected?this.__lastTriggerEl:this.__focusBeforeOpen?.isConnected?this.__focusBeforeOpen:null;this.__clearSavedFocus(),await Promise.resolve();let t=U.__getTopmostOpenDialog();if(t){await t.updateComplete,e&&t.__isInsideDialog(e)&&e.focus();let n=t.__getDeepActiveElement();(!n||!t.__isInsideDialog(n))&&t.__focusInitial();return}e?.focus()}connectedCallback(){super.connectedCallback(),this.__applyZIndex(),this.__applyMaxSize(),document.addEventListener(`click`,this.__onDocumentClick,!1),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),document.addEventListener(`focusin`,this.__onDocumentFocusIn,!0),this.addEventListener(`keydown`,this.__onKeydownTrap),this.open&&this.hasUpdated&&(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__toggleScrollLock(!0),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial()))}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),document.removeEventListener(`focusin`,this.__onDocumentFocusIn,!0),this.removeEventListener(`keydown`,this.__onKeydownTrap),this.__submitAbortController?.abort(),R(this.shadowRoot?.querySelector(`.layer`));let e=this.__unregisterOpenDialog();this.__toggleScrollLock(!1),e?this.__restoreFocusAfterClose():this.__clearSavedFocus(),super.disconnectedCallback()}__applyZIndex(){let e=typeof this.zIndex==`number`&&Number.isFinite(this.zIndex)?this.zIndex:void 0;if(e===void 0){this.style.removeProperty(`--z-dialog-scrim`),this.style.removeProperty(`--z-dialog`);return}this.style.setProperty(`--z-dialog-scrim`,String(e)),this.style.setProperty(`--z-dialog`,String(e+1))}__applyMaxSize(){let e=(this.maxW??``).trim(),t=(this.maxH??``).trim();e?(this.style.setProperty(`--scb-dialog-max-w`,e),this.style.setProperty(`--scb-dialog-width`,`min(${e}, 90vw)`)):(this.style.removeProperty(`--scb-dialog-max-w`),this.style.removeProperty(`--scb-dialog-width`)),t?this.style.setProperty(`--scb-dialog-max-h`,t):this.style.removeProperty(`--scb-dialog-max-h`)}updated(e){if(e.has(`zIndex`)&&(this.open&&this.__isModalOverlay()?U.__syncModalStack():this.__applyZIndex()),(e.has(`maxW`)||e.has(`maxH`))&&this.__applyMaxSize(),e.has(`open`)){let t=e.get(`open`);this.__updateTriggersExpanded(),this.open&&!t?(this.__focusBeforeOpen=this.__getDeepActiveElement(),this.__registerOpenDialog(),this.__isModalOverlay()&&this.updateComplete.then(()=>this.__focusInitial())):!this.open&&t&&(this.__unregisterOpenDialog()?this.__restoreFocusAfterClose():this.__clearSavedFocus()),this.__toggleScrollLock(this.open)}if(e.has(`inSb`)&&this.open&&(this.__unregisterOpenDialog(),this.__registerOpenDialog(),this.__toggleScrollLock(!1),this.__toggleScrollLock(!0)),e.has(`open`)||e.has(`inSb`)){let e=this.shadowRoot?.querySelector(`.layer`);if(this.open&&this.__isModalOverlay())vl(e);else if(this.open||xl(this),!this.open&&bl(e)){let t=this.shadowRoot?.querySelector(`.container`);yl(e,void 0,t??e??void 0)}else R(e)}(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute(`aria-controls`)&&e.setAttribute(`aria-expanded`,String(this.open))})}__usesInPlaceLayout(){let e=getComputedStyle(this);return e.getPropertyValue(`--scb-dialog-scrim-position`).trim()===`relative`||e.getPropertyValue(`--scb-dialog-container-position`).trim()===`absolute`}__toggleScrollLock(e){let t=document.documentElement,n=document.body;if(e){if(this.__scrollLocked||this.inSb||this.__usesInPlaceLayout())return;if(Gu.size===0){Ku=t.style.overflow,qu=n.style.paddingRight;let e=window.innerWidth-t.clientWidth;if(t.style.overflow=`hidden`,e>0){let t=Number.parseFloat(getComputedStyle(n).paddingRight)||0;n.style.paddingRight=`${t+e}px`}}Gu.add(this),this.__scrollLocked=!0;return}this.__scrollLocked&&=(Gu.delete(this),Gu.size===0&&(t.style.overflow=Ku,n.style.paddingRight=qu),!1)}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-dialog-spacing-block-start`,t):this.style.removeProperty(`--scb-dialog-spacing-block-start`),n?this.style.setProperty(`--scb-dialog-spacing-block-end`,n):this.style.removeProperty(`--scb-dialog-spacing-block-end`),r?this.style.setProperty(`--scb-dialog-spacing-inline-start`,r):this.style.removeProperty(`--scb-dialog-spacing-inline-start`),i?this.style.setProperty(`--scb-dialog-spacing-inline-end`,i):this.style.removeProperty(`--scb-dialog-spacing-inline-end`)}__setOpen(e){this.open=e,this.__fire(e?`open`:`close`)}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__fireCancelable(e,t){return this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0,cancelable:!0}))}__getFormMethod(){let e=String(this.formMethod||`GET`).trim().toUpperCase();return e===`POST`||e===`PUT`||e===`DELETE`?e:`GET`}__getSlottedElements(){let e=this.shadowRoot?.querySelector(`slot`);if(!(e instanceof HTMLSlotElement))return[];let t=e.assignedElements({flatten:!0}),n=[];for(let e of t)n.push(e,...Array.from(e.querySelectorAll(`*`)));return n}__appendHiddenFormValue(e,t,n){let r=document.createElement(`input`);r.type=`hidden`,r.name=t,r.value=n,r.setAttribute(`data-scb-dialog-generated`,`true`),e.append(r)}__clearGeneratedFormValues(e){e.querySelectorAll(`input[data-scb-dialog-generated="true"]`).forEach(e=>e.remove())}__syncSlottedFormValues(e){this.__clearGeneratedFormValues(e),this.__getSlottedElements().forEach(t=>{if(!(t instanceof HTMLElement))return;let n=(t.getAttribute(`name`)??``).trim();if(n&&!(t.disabled===!0||t.hasAttribute(`disabled`))){if(t instanceof HTMLInputElement){if(t.form===e)return;let r=(t.type||``).toLowerCase();if(r===`file`)return;if(r===`checkbox`||r===`radio`){t.checked&&this.__appendHiddenFormValue(e,n,t.value||`on`);return}this.__appendHiddenFormValue(e,n,t.value??``);return}if(t instanceof HTMLTextAreaElement){if(t.form===e)return;this.__appendHiddenFormValue(e,n,t.value??``);return}if(t instanceof HTMLSelectElement){if(t.form===e)return;if(t.multiple){Array.from(t.selectedOptions).forEach(t=>{this.__appendHiddenFormValue(e,n,t.value)});return}this.__appendHiddenFormValue(e,n,t.value??``);return}switch(t.tagName){case`SCB-TEXTFIELD`:if(String(t.type??``).toLowerCase()===`file`)return;this.__appendHiddenFormValue(e,n,String(t.value??``));return;case`SCB-CHECKBOX`:t.checked&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;case`SCB-RADIO-BUTTON`:t.checked&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;case`SCB-SWITCH`:(t.selected||t.checked)&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;case`SCB-CHIP`:t.selected&&this.__appendHiddenFormValue(e,n,String(t.value??t.getAttribute(`value`)??`on`));return;default:`value`in t&&this.__appendHiddenFormValue(e,n,String(t.value??``))}}})}__appendSlottedFiles(e,t){for(let n of this.__getSlottedElements()){if(!(n instanceof HTMLElement))continue;let r=(n.getAttribute(`name`)??``).trim();if(!(!r||n.disabled===!0||n.hasAttribute(`disabled`))){if(n instanceof HTMLInputElement&&n.type===`file`){if(n.form===e)continue;for(let e of Array.from(n.files??[]))t.append(r,e);continue}if(n.tagName===`SCB-TEXTFIELD`&&String(n.type??``).toLowerCase()===`file`){let e=n.files;for(let n of Array.from(e??[]))t.append(r,n)}}}}__createFormData(e){this.__syncSlottedFormValues(e);let t=new FormData(e);return this.__appendSlottedFiles(e,t),t}__validateFormAndSlottedFields(e){let t=e=>e.disabled===!0||e.hasAttribute(`disabled`),n=e.reportValidity(),r=null,i=new Set;return this.__getSlottedElements().forEach(e=>{if(!(e instanceof HTMLElement)||i.has(e)||t(e))return;i.add(e);let a=e;if(e.tagName===`SCB-TEXTFIELD`&&a.error===!0){r||=e,n=!1;return}if(typeof a.reportValidity==`function`){let t=!!a.reportValidity();!t&&!r&&(r=e),n&&=t}}),!n&&r&&r.focus(),n}__isFocusableElement(e){if(!(e instanceof HTMLElement)||!e.matches(U.__focusableSelector)||e.disabled||e.getAttribute(`aria-hidden`)===`true`)return!1;let t=getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`}__collectAssignedFocusableElements(e){let t=[];return this.__isFocusableElement(e)&&t.push(e),t.push(...Array.from(e.querySelectorAll(U.__focusableSelector)).filter(e=>this.__isFocusableElement(e))),t}__collectFocusableElements(){let e=this.shadowRoot;if(!e)return[];let t=[],n=new Set,r=e=>{n.has(e)||(n.add(e),t.push(e))},i=e=>{if(e instanceof HTMLSlotElement){e.assignedElements({flatten:!0}).flatMap(e=>this.__collectAssignedFocusableElements(e)).forEach(r);return}e instanceof HTMLElement&&this.__isFocusableElement(e)&&r(e),e.childNodes.forEach(i)};return e.childNodes.forEach(i),t}__currentFocusableFromEvent(e,t){let n=e.composedPath();return t.find(e=>n.includes(e))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__slotIsEmpty(){let e=this.shadowRoot?.querySelector(`slot`);return!e||e.assignedElements({flatten:!0}).length===0}renderHeader(e){let t=this.variant===`form`||this.variant===`floating`||this.variant===`iframe`;return x`
8707
8707
  <div class="header">
8708
8708
  <div class="title">
8709
8709
  ${this.icon?x`<md-icon class="dialog-icon">${this.icon}</md-icon>`:S}
@@ -8769,7 +8769,7 @@
8769
8769
  ${this.renderBody(e,t)}
8770
8770
  </div>
8771
8771
  </div>
8772
- `}};N([_({type:Boolean,reflect:!0,converter:Uu})],G.prototype,`open`,void 0),N([_({type:String,attribute:`max-w`,reflect:!0})],G.prototype,`maxW`,void 0),N([_({type:String,attribute:`max-h`,reflect:!0})],G.prototype,`maxH`,void 0),N([_({type:Number,attribute:`z-index`,reflect:!0})],G.prototype,`zIndex`,void 0),N([_({type:Boolean,attribute:!1})],G.prototype,`inSb`,void 0),N([_({type:Boolean,attribute:`scrim-close`,converter:Uu})],G.prototype,`scrimClose`,void 0),N([_({type:String,reflect:!0})],G.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],G.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],G.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],G.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],G.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],G.prototype,`variant`,void 0),N([_({type:String})],G.prototype,`label`,void 0),N([_({type:String})],G.prototype,`icon`,void 0),N([_({type:String,attribute:`supporting-text`})],G.prototype,`supportingText`,void 0),N([_({type:String,attribute:`ok-button`})],G.prototype,`okButton`,void 0),N([_({type:String,attribute:`cancel-button`})],G.prototype,`cancelButton`,void 0),N([_({type:String,attribute:`delete-button`})],G.prototype,`deleteButton`,void 0),N([_({type:String,attribute:`confirm-button`})],G.prototype,`confirmButton`,void 0),N([_({type:String,attribute:`deny-button`})],G.prototype,`denyButton`,void 0),N([_({type:String,attribute:`reset-button`})],G.prototype,`resetButton`,void 0),N([_({type:String,attribute:`submit-button`})],G.prototype,`submitButton`,void 0),N([_({type:String,attribute:`close-label`})],G.prototype,`closeLabel`,void 0),N([_({type:String,attribute:`form-id`})],G.prototype,`formId`,void 0),N([_({type:String,attribute:`form-action`})],G.prototype,`formAction`,void 0),N([_({type:String,attribute:`form-method`})],G.prototype,`formMethod`,void 0),N([_({type:String,attribute:`form-enctype`})],G.prototype,`formEnctype`,void 0),G=W=N([a(`scb-dialog`)],G),w(),b(),al(),$c(),j(),cc(),P();var qu={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Ju=class extends C{constructor(...e){super(...e),this._lastActiveDay=null,this.lang=`sv`,this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate=``,this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{let t=Array.from(this.shadowRoot?.querySelectorAll(`.calendar-day[data-date]`)??[]),n=this.shadowRoot?.activeElement,r=n&&t.includes(n)?n:document.activeElement,i=t.indexOf(r);if(i===-1)return;let a;switch(e.key){case`ArrowRight`:a=t[i+1];break;case`ArrowLeft`:a=t[i-1];break;case`ArrowDown`:a=this.__dayOffsetFrom(r,7);break;case`ArrowUp`:a=this.__dayOffsetFrom(r,-7);break;case`Home`:a=Array.from(r.closest(`[role="row"]`)?.querySelectorAll(`.calendar-day[data-date]`)??[])[0];break;case`End`:{let e=Array.from(r.closest(`[role="row"]`)?.querySelectorAll(`.calendar-day[data-date]`)??[]);a=e[e.length-1];break}case`PageUp`:e.preventDefault(),this.__focusAdjacentMonth(r,-1);return;case`PageDown`:e.preventDefault(),this.__focusAdjacentMonth(r,1);return;default:return}a&&a!==r&&(e.preventDefault(),this.__focusCalendarDay(a))},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._rovingDate=``,this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(e){let t=(e??``)+``;t!==this.selectedDate&&(this.selectedDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],`value`]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`value`&&(this.value=n??``)}static{this.styles=p`
8772
+ `}};N([_({type:Boolean,reflect:!0,converter:Wu})],W.prototype,`open`,void 0),N([_({type:String,attribute:`max-w`,reflect:!0})],W.prototype,`maxW`,void 0),N([_({type:String,attribute:`max-h`,reflect:!0})],W.prototype,`maxH`,void 0),N([_({type:Number,attribute:`z-index`,reflect:!0})],W.prototype,`zIndex`,void 0),N([_({type:Boolean,attribute:!1})],W.prototype,`inSb`,void 0),N([_({type:Boolean,attribute:`scrim-close`,converter:Wu})],W.prototype,`scrimClose`,void 0),N([_({type:String,reflect:!0})],W.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],W.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],W.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],W.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],W.prototype,`spacingRight`,void 0),N([_({type:String,reflect:!0})],W.prototype,`variant`,void 0),N([_({type:String})],W.prototype,`label`,void 0),N([_({type:String})],W.prototype,`icon`,void 0),N([_({type:String,attribute:`supporting-text`})],W.prototype,`supportingText`,void 0),N([_({type:String,attribute:`ok-button`})],W.prototype,`okButton`,void 0),N([_({type:String,attribute:`cancel-button`})],W.prototype,`cancelButton`,void 0),N([_({type:String,attribute:`delete-button`})],W.prototype,`deleteButton`,void 0),N([_({type:String,attribute:`confirm-button`})],W.prototype,`confirmButton`,void 0),N([_({type:String,attribute:`deny-button`})],W.prototype,`denyButton`,void 0),N([_({type:String,attribute:`reset-button`})],W.prototype,`resetButton`,void 0),N([_({type:String,attribute:`submit-button`})],W.prototype,`submitButton`,void 0),N([_({type:String,attribute:`close-label`})],W.prototype,`closeLabel`,void 0),N([_({type:String,attribute:`form-id`})],W.prototype,`formId`,void 0),N([_({type:String,attribute:`form-action`})],W.prototype,`formAction`,void 0),N([_({type:String,attribute:`form-method`})],W.prototype,`formMethod`,void 0),N([_({type:String,attribute:`form-enctype`})],W.prototype,`formEnctype`,void 0),W=U=N([a(`scb-dialog`)],W),w(),b(),sl(),el(),j(),cc(),P();var Ju={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Yu=class extends C{constructor(...e){super(...e),this._lastActiveDay=null,this.lang=`sv`,this.disableWeekend=!1,this.publicHolidays=!0,this.displayYear=new Date().getFullYear(),this.displayMonth=new Date().getMonth()+1,this.selectedDate=``,this.eventsJson=void 0,this._eventsFromJson=null,this._eventsJsonLast=void 0,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._mutationObserver=null,this._syncingDisplay=!1,this._onCalendarKeyDown=e=>{let t=Array.from(this.shadowRoot?.querySelectorAll(`.calendar-day[data-date]`)??[]),n=this.shadowRoot?.activeElement,r=n&&t.includes(n)?n:document.activeElement,i=t.indexOf(r);if(i===-1)return;let a;switch(e.key){case`ArrowRight`:a=t[i+1];break;case`ArrowLeft`:a=t[i-1];break;case`ArrowDown`:a=this.__dayOffsetFrom(r,7);break;case`ArrowUp`:a=this.__dayOffsetFrom(r,-7);break;case`Home`:a=Array.from(r.closest(`[role="row"]`)?.querySelectorAll(`.calendar-day[data-date]`)??[])[0];break;case`End`:{let e=Array.from(r.closest(`[role="row"]`)?.querySelectorAll(`.calendar-day[data-date]`)??[]);a=e[e.length-1];break}case`PageUp`:e.preventDefault(),this.__focusAdjacentMonth(r,-1);return;case`PageDown`:e.preventDefault(),this.__focusAdjacentMonth(r,1);return;default:return}a&&a!==r&&(e.preventDefault(),this.__focusCalendarDay(a))},this._onEventChanged=()=>{this.requestUpdate()},this._today=new Date,this._current=new Date,this._rovingDate=``,this._popupEvent=null,this._handleDialogClose=()=>{this._popupEvent=null,this.requestUpdate(),this._restoreDayFocus()},this._restoreDayFocus=()=>{this._lastActiveDay&&setTimeout(()=>{this._lastActiveDay?.focus(),this._lastActiveDay=null},0)},this._easterDateCalculated={}}get value(){return this.selectedDate}set value(e){let t=(e??``)+``;t!==this.selectedDate&&(this.selectedDate=t)}static get observedAttributes(){return[...super.observedAttributes??[],`value`]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`value`&&(this.value=n??``)}static{this.styles=p`
8773
8773
  :host {
8774
8774
  display: block;
8775
8775
  margin-block-start: var(--scb-calendar-spacing-block-start, 0);
@@ -9020,7 +9020,7 @@
9020
9020
  </scb-list>
9021
9021
  </scb-dialog>
9022
9022
  `:``}
9023
- `}};N([_({type:String})],Ju.prototype,`lang`,void 0),N([_({type:Boolean,attribute:`disable-weekend`,reflect:!0,converter:qu})],Ju.prototype,`disableWeekend`,void 0),N([_({type:Boolean,attribute:`public-holidays`,converter:qu})],Ju.prototype,`publicHolidays`,void 0),N([_({type:Number,attribute:`display-year`,reflect:!0})],Ju.prototype,`displayYear`,void 0),N([_({type:Number,attribute:`display-month`,reflect:!0})],Ju.prototype,`displayMonth`,void 0),N([_({type:String,attribute:`selected-date`,reflect:!0})],Ju.prototype,`selectedDate`,void 0),N([_({attribute:!1})],Ju.prototype,`events`,void 0),N([_({type:String,attribute:`events-json`})],Ju.prototype,`eventsJson`,void 0),N([_({type:String,reflect:!0})],Ju.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Ju.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Ju.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Ju.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Ju.prototype,`spacingRight`,void 0),Ju=N([a(`scb-calendar`)],Ju),w(),b(),P();var Yu=new Intl.DateTimeFormat(`sv-SE`,{month:`short`}),Xu={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Zu,Qu;function $u(){return Zu??=Promise.resolve().then(()=>(j(),nc)),Zu}function ed(){return Qu??=Promise.resolve().then(()=>(Sc(),vc)),Qu}var K=class extends C{constructor(...e){super(...e),this.variant=`default`,this.date=null,this.direction=`horizontal`,this.title=``,this.calendarCardTitle=``,this.subtitle=``,this.supportingText=``,this.cardHref=``,this.cardHrefNav=``,this.showMedia=null,this.dateLabelPrefix=`Datum:`,this.mediaWidth=``,this.mediaHeight=``,this.mediaAspect=``,this.width=``,this.maxWidth=``,this.minWidth=``,this.height=``,this.maxHeight=``,this.minHeight=``,this.sizing=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,$u().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))}}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__getSlottedText(e){return this.querySelector(`[slot="${e}"]`)?.textContent?.trim()??``}get __resolvedTitle(){return this.__getSlottedText(`heading`)||this.calendarCardTitle||this.title}get __resolvedSubtitle(){return this.__getSlottedText(`subtitle`)||this.subtitle}get __resolvedLabel(){return this.__resolvedTitle||this.__resolvedSubtitle||`Kalenderkort`}firstUpdated(){this.__applyInnerSizing(),this.__applySpacing()}static{this.styles=p`
9023
+ `}};N([_({type:String})],Yu.prototype,`lang`,void 0),N([_({type:Boolean,attribute:`disable-weekend`,reflect:!0,converter:Ju})],Yu.prototype,`disableWeekend`,void 0),N([_({type:Boolean,attribute:`public-holidays`,converter:Ju})],Yu.prototype,`publicHolidays`,void 0),N([_({type:Number,attribute:`display-year`,reflect:!0})],Yu.prototype,`displayYear`,void 0),N([_({type:Number,attribute:`display-month`,reflect:!0})],Yu.prototype,`displayMonth`,void 0),N([_({type:String,attribute:`selected-date`,reflect:!0})],Yu.prototype,`selectedDate`,void 0),N([_({attribute:!1})],Yu.prototype,`events`,void 0),N([_({type:String,attribute:`events-json`})],Yu.prototype,`eventsJson`,void 0),N([_({type:String,reflect:!0})],Yu.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Yu.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Yu.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Yu.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Yu.prototype,`spacingRight`,void 0),Yu=N([a(`scb-calendar`)],Yu),w(),b(),P();var Xu=new Intl.DateTimeFormat(`sv-SE`,{month:`short`}),Zu={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Qu,$u;function ed(){return Qu??=Promise.resolve().then(()=>(j(),nc)),Qu}function td(){return $u??=Promise.resolve().then(()=>(Sc(),vc)),$u}var G=class extends C{constructor(...e){super(...e),this.variant=`default`,this.date=null,this.direction=`horizontal`,this.title=``,this.calendarCardTitle=``,this.subtitle=``,this.supportingText=``,this.cardHref=``,this.cardHrefNav=``,this.showMedia=null,this.dateLabelPrefix=`Datum:`,this.mediaWidth=``,this.mediaHeight=``,this.mediaAspect=``,this.width=``,this.maxWidth=``,this.minWidth=``,this.height=``,this.maxHeight=``,this.minHeight=``,this.sizing=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__focusRingRequested=!1,this.__focusRingLoaded=!1,this.__rippleRequested=!1,this.__rippleLoaded=!1,this.__pendingRippleClick=!1,this.__onPointerInteraction=e=>{this.__ensureRipple(e)},this.__ensureFocusRingOnFocusVisible=()=>{this.__focusRingLoaded||this.__focusRingRequested||(this.__focusRingRequested=!0,ed().then(({ensureFocusRingReady:e})=>e()).then(()=>{this.__focusRingLoaded=!0,this.requestUpdate()}))}}__hasSlottedContent(e){return!!this.querySelector(`[slot="${e}"]`)}__getSlottedText(e){return this.querySelector(`[slot="${e}"]`)?.textContent?.trim()??``}get __resolvedTitle(){return this.__getSlottedText(`heading`)||this.calendarCardTitle||this.title}get __resolvedSubtitle(){return this.__getSlottedText(`subtitle`)||this.subtitle}get __resolvedLabel(){return this.__resolvedTitle||this.__resolvedSubtitle||`Kalenderkort`}firstUpdated(){this.__applyInnerSizing(),this.__applySpacing()}static{this.styles=p`
9024
9024
  /*
9025
9025
  Designbrygga:
9026
9026
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -9457,7 +9457,7 @@
9457
9457
  }
9458
9458
 
9459
9459
  /* design:bindings:scb-calendar-card:end */
9460
- `}__ensureRipple(e){if(this.cardHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,ed().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(`.calendar-card`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await ed();await i(e,t,n,r)}render(){let e=this.variant?`${this.variant.toLowerCase()}`:``,t=this.direction?`${this.direction.toLowerCase()}`:``,n=this.cardHref?`clickable`:``,r=this.__hasSlottedContent(`heading`),i=this.__hasSlottedContent(`subtitle`),a=this.__hasSlottedContent(`supporting-text`),o=this.calendarCardTitle||this.title,s=this.subtitle,c=this.supportingText,l=r||!!o,u=i||!!s,d=a||!!c,{day:f,month:p}=this.__getDateParts(),m=this.mediaWidth&&this.mediaWidth.trim()!==``?this.mediaWidth:``,h=this.mediaHeight&&this.mediaHeight.trim()!==``?this.mediaHeight:``,g=this.mediaAspect&&this.mediaAspect.trim()!==``?this.mediaAspect:``,ee=`${m?`inline-size:${m};`:``}${h?`block-size:${h};`:``}${g?`aspect-ratio:${g};`:``}`;return x`
9460
+ `}__ensureRipple(e){if(this.cardHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,td().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(`.calendar-card`),n=this.__pendingRippleEvent,r=this.__pendingRippleClick;this.__pendingRippleEvent=void 0,this.__pendingRippleClick=!1;let{syncRippleToControl:i}=await td();await i(e,t,n,r)}render(){let e=this.variant?`${this.variant.toLowerCase()}`:``,t=this.direction?`${this.direction.toLowerCase()}`:``,n=this.cardHref?`clickable`:``,r=this.__hasSlottedContent(`heading`),i=this.__hasSlottedContent(`subtitle`),a=this.__hasSlottedContent(`supporting-text`),o=this.calendarCardTitle||this.title,s=this.subtitle,c=this.supportingText,l=r||!!o,u=i||!!s,d=a||!!c,{day:f,month:p}=this.__getDateParts(),m=this.mediaWidth&&this.mediaWidth.trim()!==``?this.mediaWidth:``,h=this.mediaHeight&&this.mediaHeight.trim()!==``?this.mediaHeight:``,g=this.mediaAspect&&this.mediaAspect.trim()!==``?this.mediaAspect:``,ee=`${m?`inline-size:${m};`:``}${h?`block-size:${h};`:``}${g?`aspect-ratio:${g};`:``}`;return x`
9461
9461
  <div
9462
9462
  class="calendar-card ${t} ${n} ${e}"
9463
9463
  role="${this.cardHref?`link`:`group`}"
@@ -9496,7 +9496,7 @@
9496
9496
  </div>
9497
9497
  </div>
9498
9498
  ${this.cardHref&&this.__focusRingLoaded?x`<md-focus-ring></md-focus-ring>`:``}
9499
- `}__getDateParts(){let e={day:1,month:`Jan`};if(!this.date)return e;let t=this.date instanceof Date?this.date:(()=>{let e=new Date(String(this.date));return Number.isNaN(e.getTime())?null:e})();if(!t)return e;let n=t.getDate(),r=Yu.format(t).replace(`.`,``).trim();return{day:n,month:r.charAt(0).toUpperCase()+r.slice(1)}}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.calendar-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`))}_onKeyDown(e){(e.key===`Enter`||e.key===` `)&&this.cardHref&&(e.preventDefault(),this.__navigate())}_handleHrefNavigation(){this.cardHref&&((!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),this.__navigate())}__navigate(){this.cardHref&&(this.cardHrefNav===`tab`?window.open(this.cardHref,`_blank`):this.cardHrefNav===`window`?window.open(this.cardHref,`_blank`,`noopener,noreferrer,width=800,height=600`):window.open(this.cardHref,`_self`))}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-calendar-card-spacing-block-start`,t):this.style.removeProperty(`--scb-calendar-card-spacing-block-start`),n?this.style.setProperty(`--scb-calendar-card-spacing-block-end`,n):this.style.removeProperty(`--scb-calendar-card-spacing-block-end`),r?this.style.setProperty(`--scb-calendar-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-calendar-card-spacing-inline-start`),i?this.style.setProperty(`--scb-calendar-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-calendar-card-spacing-inline-end`)}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(`minWidth`)&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty(`min-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(`minHeight`)&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty(`min-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()}};N([_({type:String,reflect:!0})],K.prototype,`variant`,void 0),N([_({type:String,attribute:`date`})],K.prototype,`date`,void 0),N([_({type:String,reflect:!0})],K.prototype,`direction`,void 0),N([_({type:String,reflect:!0,converter:Xu})],K.prototype,`title`,void 0),N([_({type:String,attribute:`calendar-card-title`,reflect:!0,converter:Xu})],K.prototype,`calendarCardTitle`,void 0),N([_({type:String,reflect:!0,converter:Xu})],K.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`,reflect:!0,converter:Xu})],K.prototype,`supportingText`,void 0),N([_({type:String,attribute:`card-href`})],K.prototype,`cardHref`,void 0),N([_({type:String,attribute:`card-href-nav`})],K.prototype,`cardHrefNav`,void 0),N([_({type:Boolean,reflect:!0,attribute:`show-media`})],K.prototype,`showMedia`,void 0),N([_({type:String,attribute:`date-label-prefix`})],K.prototype,`dateLabelPrefix`,void 0),N([_({type:String,attribute:`media-width`})],K.prototype,`mediaWidth`,void 0),N([_({type:String,attribute:`media-height`})],K.prototype,`mediaHeight`,void 0),N([_({type:String,attribute:`media-aspect`})],K.prototype,`mediaAspect`,void 0),N([_({type:String,reflect:!0})],K.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],K.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`min-width`})],K.prototype,`minWidth`,void 0),N([_({type:String,reflect:!0})],K.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],K.prototype,`maxHeight`,void 0),N([_({type:String,attribute:`min-height`})],K.prototype,`minHeight`,void 0),N([_({type:String,reflect:!0,converter:Xu})],K.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],K.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],K.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],K.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],K.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],K.prototype,`spacingRight`,void 0),K=N([a(`scb-calendar-card`)],K),w(),b(),Oc(),P();var td=class extends C{constructor(...e){super(...e),this._contentId=`scb-collapse-content-${Math.random().toString(36).substr(2,9)}`,this.variant=`elements`,this.collapsedHeight=40,this.visibleElements=1,this.expanded=!1,this.hideToggle=!1,this.toggleButtonVariant=`text`,this.toggleButtonSize=`medium`,this.togglePosition=`after`,this.toggleLayout=`block`,this._elementCount=0,this.expandButtonLabel=`Mer`,this.collapseButtonLabel=`Mindre`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.itemsGap=void 0,this._contentHeight=0,this.#r=0,this.#i=0,this.#o=0,this.#s=0}get _regionLabel(){return`${this.expanded?this.collapseButtonLabel:this.expandButtonLabel} – ${this._contentId}`}static{this.styles=p`
9499
+ `}__getDateParts(){let e={day:1,month:`Jan`};if(!this.date)return e;let t=this.date instanceof Date?this.date:(()=>{let e=new Date(String(this.date));return Number.isNaN(e.getTime())?null:e})();if(!t)return e;let n=t.getDate(),r=Xu.format(t).replace(`.`,``).trim();return{day:n,month:r.charAt(0).toUpperCase()+r.slice(1)}}__applyInnerSizing(){let e=this.renderRoot.querySelector(`.calendar-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`))}_onKeyDown(e){(e.key===`Enter`||e.key===` `)&&this.cardHref&&(e.preventDefault(),this.__navigate())}_handleHrefNavigation(){this.cardHref&&((!this.__rippleLoaded||this.__pendingRippleEvent)&&(this.__pendingRippleClick=!0,this.__ensureRipple()),this.__navigate())}__navigate(){this.cardHref&&(this.cardHrefNav===`tab`?window.open(this.cardHref,`_blank`):this.cardHrefNav===`window`?window.open(this.cardHref,`_blank`,`noopener,noreferrer,width=800,height=600`):window.open(this.cardHref,`_self`))}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-calendar-card-spacing-block-start`,t):this.style.removeProperty(`--scb-calendar-card-spacing-block-start`),n?this.style.setProperty(`--scb-calendar-card-spacing-block-end`,n):this.style.removeProperty(`--scb-calendar-card-spacing-block-end`),r?this.style.setProperty(`--scb-calendar-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-calendar-card-spacing-inline-start`),i?this.style.setProperty(`--scb-calendar-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-calendar-card-spacing-inline-end`)}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(`minWidth`)&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty(`min-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(`minHeight`)&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty(`min-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()}};N([_({type:String,reflect:!0})],G.prototype,`variant`,void 0),N([_({type:String,attribute:`date`})],G.prototype,`date`,void 0),N([_({type:String,reflect:!0})],G.prototype,`direction`,void 0),N([_({type:String,reflect:!0,converter:Zu})],G.prototype,`title`,void 0),N([_({type:String,attribute:`calendar-card-title`,reflect:!0,converter:Zu})],G.prototype,`calendarCardTitle`,void 0),N([_({type:String,reflect:!0,converter:Zu})],G.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`,reflect:!0,converter:Zu})],G.prototype,`supportingText`,void 0),N([_({type:String,attribute:`card-href`})],G.prototype,`cardHref`,void 0),N([_({type:String,attribute:`card-href-nav`})],G.prototype,`cardHrefNav`,void 0),N([_({type:Boolean,reflect:!0,attribute:`show-media`})],G.prototype,`showMedia`,void 0),N([_({type:String,attribute:`date-label-prefix`})],G.prototype,`dateLabelPrefix`,void 0),N([_({type:String,attribute:`media-width`})],G.prototype,`mediaWidth`,void 0),N([_({type:String,attribute:`media-height`})],G.prototype,`mediaHeight`,void 0),N([_({type:String,attribute:`media-aspect`})],G.prototype,`mediaAspect`,void 0),N([_({type:String,reflect:!0})],G.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],G.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`min-width`})],G.prototype,`minWidth`,void 0),N([_({type:String,reflect:!0})],G.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],G.prototype,`maxHeight`,void 0),N([_({type:String,attribute:`min-height`})],G.prototype,`minHeight`,void 0),N([_({type:String,reflect:!0,converter:Zu})],G.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],G.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],G.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],G.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],G.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],G.prototype,`spacingRight`,void 0),G=N([a(`scb-calendar-card`)],G),w(),b(),Oc(),P();var nd=class extends C{constructor(...e){super(...e),this._contentId=`scb-collapse-content-${Math.random().toString(36).substr(2,9)}`,this.variant=`elements`,this.collapsedHeight=40,this.visibleElements=1,this.expanded=!1,this.hideToggle=!1,this.toggleButtonVariant=`text`,this.toggleButtonSize=`medium`,this.togglePosition=`after`,this.toggleLayout=`block`,this._elementCount=0,this.expandButtonLabel=`Mer`,this.collapseButtonLabel=`Mindre`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.itemsGap=void 0,this._contentHeight=0,this.#r=0,this.#i=0,this.#o=0,this.#s=0}get _regionLabel(){return`${this.expanded?this.collapseButtonLabel:this.expandButtonLabel} – ${this._contentId}`}static{this.styles=p`
9500
9500
  :host {
9501
9501
  display: block;
9502
9502
  box-sizing: border-box;
@@ -9655,7 +9655,7 @@
9655
9655
  </div>
9656
9656
  ${this.togglePosition===`after`?n:``}
9657
9657
  </div>
9658
- `}}};N([_({type:String})],td.prototype,`variant`,void 0),N([_({type:Number,attribute:`collapsed-height`,reflect:!0})],td.prototype,`collapsedHeight`,void 0),N([_({type:Number,attribute:`visible-elements`,reflect:!0})],td.prototype,`visibleElements`,void 0),N([_({type:Boolean,reflect:!0})],td.prototype,`expanded`,void 0),N([_({type:Boolean,attribute:`hide-toggle`,reflect:!0})],td.prototype,`hideToggle`,void 0),N([_({type:String,attribute:`toggle-button-variant`,reflect:!0})],td.prototype,`toggleButtonVariant`,void 0),N([_({type:String,attribute:`toggle-button-size`,reflect:!0})],td.prototype,`toggleButtonSize`,void 0),N([_({type:String,attribute:`toggle-position`,reflect:!0})],td.prototype,`togglePosition`,void 0),N([_({type:String,attribute:`toggle-layout`,reflect:!0})],td.prototype,`toggleLayout`,void 0),N([_({type:String,attribute:`expand-button-label`,reflect:!0})],td.prototype,`expandButtonLabel`,void 0),N([_({type:String,attribute:`collapse-button-label`,reflect:!0})],td.prototype,`collapseButtonLabel`,void 0),N([_({type:String,reflect:!0})],td.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],td.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],td.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],td.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],td.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`items-gap`,reflect:!0})],td.prototype,`itemsGap`,void 0),td=N([a(`scb-collapse`)],td),w(),b(),Cl(),cc(),P();var nd,rd=`data-scb-cookies-consent-managed-button-size`;function id(){return!!document.querySelector(`script[src*="/scb-button/scb-button.js"],script[src$="scb-button.js"]`)}var ad={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},od=class extends C{constructor(...e){super(...e),this.open=!0,this.autoRemove=!0,this.title=``,this.supportingText=``,this.ariaLabel=`Cookie-inställningar`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._updateButtonWidth=()=>{let e=window.innerWidth<=480,t=this.shadowRoot.querySelector(`slot[name="buttons"]`);t&&t.assignedElements().forEach(t=>{e?t.setAttribute(`full-width`,``):t.removeAttribute(`full-width`)})},this.__onButtonHydrationInteraction=e=>{let t=e.target;t instanceof Element&&t.closest(`scb-button[slot="buttons"]`)&&this.__ensureSlottedButtonsReady(!0)},this.__onButtonsSlotChange=()=>{this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth()}}static{this.styles=p`
9658
+ `}}};N([_({type:String})],nd.prototype,`variant`,void 0),N([_({type:Number,attribute:`collapsed-height`,reflect:!0})],nd.prototype,`collapsedHeight`,void 0),N([_({type:Number,attribute:`visible-elements`,reflect:!0})],nd.prototype,`visibleElements`,void 0),N([_({type:Boolean,reflect:!0})],nd.prototype,`expanded`,void 0),N([_({type:Boolean,attribute:`hide-toggle`,reflect:!0})],nd.prototype,`hideToggle`,void 0),N([_({type:String,attribute:`toggle-button-variant`,reflect:!0})],nd.prototype,`toggleButtonVariant`,void 0),N([_({type:String,attribute:`toggle-button-size`,reflect:!0})],nd.prototype,`toggleButtonSize`,void 0),N([_({type:String,attribute:`toggle-position`,reflect:!0})],nd.prototype,`togglePosition`,void 0),N([_({type:String,attribute:`toggle-layout`,reflect:!0})],nd.prototype,`toggleLayout`,void 0),N([_({type:String,attribute:`expand-button-label`,reflect:!0})],nd.prototype,`expandButtonLabel`,void 0),N([_({type:String,attribute:`collapse-button-label`,reflect:!0})],nd.prototype,`collapseButtonLabel`,void 0),N([_({type:String,reflect:!0})],nd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],nd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],nd.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],nd.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],nd.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`items-gap`,reflect:!0})],nd.prototype,`itemsGap`,void 0),nd=N([a(`scb-collapse`)],nd),w(),b(),wl(),cc(),P();var rd,id=`data-scb-cookies-consent-managed-button-size`;function ad(){return!!document.querySelector(`script[src*="/scb-button/scb-button.js"],script[src$="scb-button.js"]`)}var od={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},sd=class extends C{constructor(...e){super(...e),this.open=!0,this.autoRemove=!0,this.title=``,this.supportingText=``,this.ariaLabel=`Cookie-inställningar`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._updateButtonWidth=()=>{let e=window.innerWidth<=480,t=this.shadowRoot.querySelector(`slot[name="buttons"]`);t&&t.assignedElements().forEach(t=>{e?t.setAttribute(`full-width`,``):t.removeAttribute(`full-width`)})},this.__onButtonHydrationInteraction=e=>{let t=e.target;t instanceof Element&&t.closest(`scb-button[slot="buttons"]`)&&this.__ensureSlottedButtonsReady(!0)},this.__onButtonsSlotChange=()=>{this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth()}}static{this.styles=p`
9659
9659
  :host {
9660
9660
  position: var(--scb-cookies-consent-position, fixed);
9661
9661
  width: var(--scb-cookies-consent-width, 100%);
@@ -9761,7 +9761,7 @@
9761
9761
  }
9762
9762
 
9763
9763
  /* design:bindings:scb-cookies-consent:end */
9764
- `}__syncButtonSizes(){let e=M(this,`--scb-cookies-consent-design-actions-button-size-medium`,[`small`,`medium`,`large`],`medium`),t=Array.from(this.querySelectorAll(`:scope > scb-button[slot="buttons"]`));for(let n of t){let t=n.getAttribute(rd);if(t!==null&&n.getAttribute(`size`)!==t){n.removeAttribute(rd);continue}(!n.hasAttribute(`size`)||t!==null)&&(n.setAttribute(`size`,e),n.setAttribute(rd,e))}}__ensureSlottedButtonsReady(e=!1){if(!(!this.querySelector(`scb-button[slot="buttons"]`)||customElements.get(`scb-button`))){if(id()){customElements.whenDefined(`scb-button`).then(()=>this.requestUpdate());return}e&&(nd??=Promise.resolve().then(()=>(Oc(),Cc)),nd.then(()=>this.requestUpdate()))}}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-cookies-consent-spacing-block-start`,t):this.style.removeProperty(`--scb-cookies-consent-spacing-block-start`),n?this.style.setProperty(`--scb-cookies-consent-spacing-block-end`,n):this.style.removeProperty(`--scb-cookies-consent-spacing-block-end`),r?this.style.setProperty(`--scb-cookies-consent-spacing-inline-start`,r):this.style.removeProperty(`--scb-cookies-consent-spacing-inline-start`),i?this.style.setProperty(`--scb-cookies-consent-spacing-inline-end`,i):this.style.removeProperty(`--scb-cookies-consent-spacing-inline-end`)}firstUpdated(e){this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth(),window.addEventListener(`resize`,this._updateButtonWidth),this.addEventListener(`pointerover`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`focusin`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`pointerdown`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`keydown`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`click`,e=>{let t=e.target;t.slot===`buttons`&&(t.id===`accept-btn`?this.closeAndRemove(`cookies-accept`):t.id===`decline-btn`?this.closeAndRemove(`cookies-decline`):t.id===`handle-btn`&&this.closeAndRemove(`cookies-handle`))}),this.applySpacing(),this.__syncTopLayer()}__syncTopLayer(){this.open&&getComputedStyle(this).position===`fixed`?_l(this):z(this)}updated(e){super.updated(e),this.__syncButtonSizes(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing(),e.has(`open`)&&(this.__syncTopLayer(),e.get(`open`)!==void 0&&(this.open&&this._updateButtonWidth(),this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}}))))}connectedCallback(){super.connectedCallback(),this.id||=`cookie-consent`}disconnectedCallback(){z(this),super.disconnectedCallback(),window.removeEventListener(`resize`,this._updateButtonWidth),this.removeEventListener(`pointerover`,this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener(`focusin`,this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener(`pointerdown`,this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener(`keydown`,this.__onButtonHydrationInteraction,{capture:!0})}closeAndRemove(e){let t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent(e,t));let n=e.includes(`-`)?e.replace(/-/g,``):``;n&&n!==e&&this.dispatchEvent(new CustomEvent(n,t)),this.autoRemove?this.remove():this.open=!1}render(){return this.open?x`
9764
+ `}__syncButtonSizes(){let e=M(this,`--scb-cookies-consent-design-actions-button-size-medium`,[`small`,`medium`,`large`],`medium`),t=Array.from(this.querySelectorAll(`:scope > scb-button[slot="buttons"]`));for(let n of t){let t=n.getAttribute(id);if(t!==null&&n.getAttribute(`size`)!==t){n.removeAttribute(id);continue}(!n.hasAttribute(`size`)||t!==null)&&(n.setAttribute(`size`,e),n.setAttribute(id,e))}}__ensureSlottedButtonsReady(e=!1){if(!(!this.querySelector(`scb-button[slot="buttons"]`)||customElements.get(`scb-button`))){if(ad()){customElements.whenDefined(`scb-button`).then(()=>this.requestUpdate());return}e&&(rd??=Promise.resolve().then(()=>(Oc(),Cc)),rd.then(()=>this.requestUpdate()))}}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-cookies-consent-spacing-block-start`,t):this.style.removeProperty(`--scb-cookies-consent-spacing-block-start`),n?this.style.setProperty(`--scb-cookies-consent-spacing-block-end`,n):this.style.removeProperty(`--scb-cookies-consent-spacing-block-end`),r?this.style.setProperty(`--scb-cookies-consent-spacing-inline-start`,r):this.style.removeProperty(`--scb-cookies-consent-spacing-inline-start`),i?this.style.setProperty(`--scb-cookies-consent-spacing-inline-end`,i):this.style.removeProperty(`--scb-cookies-consent-spacing-inline-end`)}firstUpdated(e){this.__ensureSlottedButtonsReady(),this.__syncButtonSizes(),this._updateButtonWidth(),window.addEventListener(`resize`,this._updateButtonWidth),this.addEventListener(`pointerover`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`focusin`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`pointerdown`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`keydown`,this.__onButtonHydrationInteraction,{capture:!0}),this.addEventListener(`click`,e=>{let t=e.target;t.slot===`buttons`&&(t.id===`accept-btn`?this.closeAndRemove(`cookies-accept`):t.id===`decline-btn`?this.closeAndRemove(`cookies-decline`):t.id===`handle-btn`&&this.closeAndRemove(`cookies-handle`))}),this.applySpacing(),this.__syncTopLayer()}__syncTopLayer(){this.open&&getComputedStyle(this).position===`fixed`?vl(this):R(this)}updated(e){super.updated(e),this.__syncButtonSizes(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing(),e.has(`open`)&&(this.__syncTopLayer(),e.get(`open`)!==void 0&&(this.open&&this._updateButtonWidth(),this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}}))))}connectedCallback(){super.connectedCallback(),this.id||=`cookie-consent`}disconnectedCallback(){R(this),super.disconnectedCallback(),window.removeEventListener(`resize`,this._updateButtonWidth),this.removeEventListener(`pointerover`,this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener(`focusin`,this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener(`pointerdown`,this.__onButtonHydrationInteraction,{capture:!0}),this.removeEventListener(`keydown`,this.__onButtonHydrationInteraction,{capture:!0})}closeAndRemove(e){let t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent(e,t));let n=e.includes(`-`)?e.replace(/-/g,``):``;n&&n!==e&&this.dispatchEvent(new CustomEvent(n,t)),this.autoRemove?this.remove():this.open=!1}render(){return this.open?x`
9765
9765
  <div role="dialog" class="cookies-consent" aria-modal="true" aria-label=${this.ariaLabel}>
9766
9766
  <h2><slot name="title">${this.title}</slot></h2>
9767
9767
  <div class="supporting-text">
@@ -9771,7 +9771,7 @@
9771
9771
  <slot name="buttons" @slotchange=${this.__onButtonsSlotChange}></slot>
9772
9772
  </div>
9773
9773
  </div>
9774
- `:null}};N([_({type:Boolean,reflect:!0,converter:ad})],od.prototype,`open`,void 0),N([_({type:Boolean,attribute:`auto-remove`,reflect:!0,converter:ad})],od.prototype,`autoRemove`,void 0),N([_({type:String,reflect:!0})],od.prototype,`title`,void 0),N([_({type:String,attribute:`supporting-text`,reflect:!0})],od.prototype,`supportingText`,void 0),N([_({type:String,attribute:`aria-label`,reflect:!0})],od.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],od.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],od.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],od.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],od.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],od.prototype,`spacingRight`,void 0),od=N([a(`scb-cookies-consent`)],od);var sd=n({ScbDrawer:()=>ld}),q,cd,ld,ud=t((()=>{w(),b(),Nu(),Cl(),P(),cd={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},ld=class extends C{static{q=this}constructor(...e){super(...e),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.ariaLabel=`Sidopanel`,this.__effectiveSide=`left`,this.__lastTriggerEl=null,this.__scrollLockHeld=!1,this.__lastTriggerWasAriaControls=!1,this.__onDocumentClick=e=>{let t=this.__getActionFromEvent(e);if(t){t===`open`&&this.__setOpen(!0),t===`close`&&this.__setOpen(!1),t===`toggle`&&this.__setOpen(!this.open),e.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(e.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=e=>{if(this.open){if(e.key===`Escape`){if(this.__hasOpenNestedOverlay(e))return;e.preventDefault(),e.stopPropagation(),this.__setOpen(!1);return}if(this.overlay&&e.key===`Tab`){let t=this.__getFocusable();if(t.length===0)return;let n=t[0],r=t[t.length-1],i=this.__currentFocusableFromEvent(e,t);e.shiftKey?(i===n||!i)&&(e.preventDefault(),r.focus()):(i===r||!i)&&(e.preventDefault(),n.focus())}}}}static{this.__overlayEl=null}static{this.__overlayStack=[]}static{this.__lockedCount=0}static{this.__prevDocOverflow=null}static{this.__prevBodyOverflow=null}static{this.__prevBodyPaddingRight=null}static __ensureOverlayStyles(){if(typeof document>`u`||document.getElementById(`scb-drawer-overlay-styles`))return;let e=document.createElement(`style`);e.id=`scb-drawer-overlay-styles`,e.textContent=`
9774
+ `:null}};N([_({type:Boolean,reflect:!0,converter:od})],sd.prototype,`open`,void 0),N([_({type:Boolean,attribute:`auto-remove`,reflect:!0,converter:od})],sd.prototype,`autoRemove`,void 0),N([_({type:String,reflect:!0})],sd.prototype,`title`,void 0),N([_({type:String,attribute:`supporting-text`,reflect:!0})],sd.prototype,`supportingText`,void 0),N([_({type:String,attribute:`aria-label`,reflect:!0})],sd.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],sd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],sd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],sd.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],sd.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],sd.prototype,`spacingRight`,void 0),sd=N([a(`scb-cookies-consent`)],sd);var cd=n({ScbDrawer:()=>ud}),K,ld,ud,dd=t((()=>{w(),b(),Pu(),wl(),P(),ld={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},ud=class extends C{static{K=this}constructor(...e){super(...e),this.floating=!0,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.ariaLabel=`Sidopanel`,this.__effectiveSide=`left`,this.__lastTriggerEl=null,this.__scrollLockHeld=!1,this.__lastTriggerWasAriaControls=!1,this.__onDocumentClick=e=>{let t=this.__getActionFromEvent(e);if(t){t===`open`&&this.__setOpen(!0),t===`close`&&this.__setOpen(!1),t===`toggle`&&this.__setOpen(!this.open),e.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(e.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=e=>{if(this.open){if(e.key===`Escape`){if(this.__hasOpenNestedOverlay(e))return;e.preventDefault(),e.stopPropagation(),this.__setOpen(!1);return}if(this.overlay&&e.key===`Tab`){let t=this.__getFocusable();if(t.length===0)return;let n=t[0],r=t[t.length-1],i=this.__currentFocusableFromEvent(e,t);e.shiftKey?(i===n||!i)&&(e.preventDefault(),r.focus()):(i===r||!i)&&(e.preventDefault(),n.focus())}}}}static{this.__overlayEl=null}static{this.__overlayStack=[]}static{this.__lockedCount=0}static{this.__prevDocOverflow=null}static{this.__prevBodyOverflow=null}static{this.__prevBodyPaddingRight=null}static __ensureOverlayStyles(){if(typeof document>`u`||document.getElementById(`scb-drawer-overlay-styles`))return;let e=document.createElement(`style`);e.id=`scb-drawer-overlay-styles`,e.textContent=`
9775
9775
  .scb-drawer-global-overlay {
9776
9776
  position: fixed;
9777
9777
  inset: 0;
@@ -9800,7 +9800,7 @@
9800
9800
  @media (prefers-reduced-motion: reduce) {
9801
9801
  .scb-drawer-global-overlay { transition: none; }
9802
9802
  }
9803
- `,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>`u`||q.__overlayEl)return;q.__ensureOverlayStyles();let e=document.createElement(`div`);e.className=`scb-drawer-global-overlay`,e.addEventListener(`pointerdown`,()=>{let e=q.__overlayStack[q.__overlayStack.length-1];e&&e.closeOnOverlay&&e.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),q.__overlayEl=e}static __showOverlay(e){q.__ensureOverlay(),q.__overlayEl&&(q.__overlayStack.includes(e)||q.__overlayStack.push(e),q.__syncOverlayColors(e),_l(q.__overlayEl),q.__overlayEl.classList.add(`is-visible`))}static __hideOverlay(e){let t=q.__overlayStack.indexOf(e);t>=0&&q.__overlayStack.splice(t,1);let n=q.__overlayStack[q.__overlayStack.length-1];n&&q.__syncOverlayColors(n),q.__overlayStack.length===0&&q.__overlayEl&&(q.__overlayEl.classList.remove(`is-visible`),vl(q.__overlayEl),q.__overlayEl.style.removeProperty(`--scb-drawer-overlay-color`),q.__overlayEl.style.removeProperty(`--scb-drawer-scrim-color`))}static __syncOverlayColors(e){if(!q.__overlayEl||typeof getComputedStyle!=`function`)return;let t=getComputedStyle(e);for(let e of[`--scb-drawer-overlay-color`,`--scb-drawer-scrim-color`]){let n=t.getPropertyValue(e).trim();n?q.__overlayEl.style.setProperty(e,n):q.__overlayEl.style.removeProperty(e)}}static __lockScrollEnable(){if(!(typeof document>`u`)){if(q.__lockedCount===0){q.__prevDocOverflow=document.documentElement.style.overflow||``,q.__prevBodyOverflow=document.body.style.overflow||``,q.__prevBodyPaddingRight=document.body.style.paddingRight||``;let e=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(e>0){let t=Number.parseFloat(getComputedStyle(document.body).paddingRight||`0`);document.body.style.paddingRight=`${t+e}px`}document.documentElement.style.overflow=`hidden`,document.body.style.overflow=`hidden`}q.__lockedCount++}}static __lockScrollDisable(){typeof document>`u`||(q.__lockedCount=Math.max(0,q.__lockedCount-1),q.__lockedCount===0&&(document.documentElement.style.overflow=q.__prevDocOverflow??``,document.body.style.overflow=q.__prevBodyOverflow??``,document.body.style.paddingRight=q.__prevBodyPaddingRight??``))}static{this.styles=p`
9803
+ `,document.head.appendChild(e)}static __ensureOverlay(){if(typeof document>`u`||K.__overlayEl)return;K.__ensureOverlayStyles();let e=document.createElement(`div`);e.className=`scb-drawer-global-overlay`,e.addEventListener(`pointerdown`,()=>{let e=K.__overlayStack[K.__overlayStack.length-1];e&&e.closeOnOverlay&&e.__setOpen(!1)},{passive:!0}),document.body.appendChild(e),K.__overlayEl=e}static __showOverlay(e){K.__ensureOverlay(),K.__overlayEl&&(K.__overlayStack.includes(e)||K.__overlayStack.push(e),K.__syncOverlayColors(e),vl(K.__overlayEl),K.__overlayEl.classList.add(`is-visible`))}static __hideOverlay(e){let t=K.__overlayStack.indexOf(e);t>=0&&K.__overlayStack.splice(t,1);let n=K.__overlayStack[K.__overlayStack.length-1];n&&K.__syncOverlayColors(n),K.__overlayStack.length===0&&K.__overlayEl&&(K.__overlayEl.classList.remove(`is-visible`),yl(K.__overlayEl),K.__overlayEl.style.removeProperty(`--scb-drawer-overlay-color`),K.__overlayEl.style.removeProperty(`--scb-drawer-scrim-color`))}static __syncOverlayColors(e){if(!K.__overlayEl||typeof getComputedStyle!=`function`)return;let t=getComputedStyle(e);for(let e of[`--scb-drawer-overlay-color`,`--scb-drawer-scrim-color`]){let n=t.getPropertyValue(e).trim();n?K.__overlayEl.style.setProperty(e,n):K.__overlayEl.style.removeProperty(e)}}static __lockScrollEnable(){if(!(typeof document>`u`)){if(K.__lockedCount===0){K.__prevDocOverflow=document.documentElement.style.overflow||``,K.__prevBodyOverflow=document.body.style.overflow||``,K.__prevBodyPaddingRight=document.body.style.paddingRight||``;let e=Math.max(0,window.innerWidth-document.documentElement.clientWidth);if(e>0){let t=Number.parseFloat(getComputedStyle(document.body).paddingRight||`0`);document.body.style.paddingRight=`${t+e}px`}document.documentElement.style.overflow=`hidden`,document.body.style.overflow=`hidden`}K.__lockedCount++}}static __lockScrollDisable(){typeof document>`u`||(K.__lockedCount=Math.max(0,K.__lockedCount-1),K.__lockedCount===0&&(document.documentElement.style.overflow=K.__prevDocOverflow??``,document.body.style.overflow=K.__prevBodyOverflow??``,document.body.style.paddingRight=K.__prevBodyPaddingRight??``))}static{this.styles=p`
9804
9804
  :host {
9805
9805
  display: block;
9806
9806
  color: var(--scb-drawer-content-color, var(--md-sys-color-on-surface));
@@ -9921,7 +9921,7 @@
9921
9921
  >
9922
9922
  <div class="panel"><slot></slot></div>
9923
9923
  </div>
9924
- `}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener(`click`,this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),this.overlay&&(q.__hideOverlay(this),this.__releaseScrollLock()),z(this),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-drawer-open`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`open`;if(e.getAttribute(`data-drawer-close`)===this.id)return this.contains(e)||(this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1),`close`;if(e.getAttribute(`data-drawer-toggle`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`toggle`;if(e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!0,`toggle`}return null}__hasOpenNestedOverlay(e){let t=`scb-options-menu, scb-dropdown, scb-select`;return e.composedPath().some(e=>e instanceof Element&&e!==this&&e.matches(t)&&!!e.open)?!0:Array.from(this.querySelectorAll(t)).some(e=>!!e.open)}__getFocusable(){let e=[`button`,`[href]`,`input`,`select`,`textarea`,`[tabindex]:not([tabindex="-1"])`,`scb-button`,`scb-icon-button`,`scb-textfield`,`scb-checkbox`,`scb-radio-button`,`scb-switch`,`scb-chip`,`scb-menu-item`].join(`, `),t=new Set,n=n=>{n.querySelectorAll(e).forEach(e=>{let n=this.__resolveFocusable(e);n&&t.add(n)})};return n(this),n(this.renderRoot),Array.from(t).filter(e=>!this.__isDisabledOrHidden(e))}__resolveFocusable(e){return this.__isDisabledOrHidden(e)?null:e.tagName===`SCB-BUTTON`||e.tagName===`SCB-ICON-BUTTON`?e.shadowRoot?.querySelector(`.native-button, button, a`)??e:e.tagName===`SCB-MENU-ITEM`?e.shadowRoot?.querySelector(`.scb-menu-label-text`)??e:e}__isDisabledOrHidden(e){if(e.disabled||e.getAttribute(`aria-hidden`)===`true`)return!0;let t=getComputedStyle(e);return t.display===`none`||t.visibility===`hidden`}__currentFocusableFromEvent(e,t){let n=e.composedPath();return t.find(e=>n.includes(e))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__setOpen(e){this.open=e}async __focusFirstControl(){await this.updateComplete;for(let e=0;e<4;e+=1){await new Promise(e=>requestAnimationFrame(()=>e()));let e=this.__getFocusable()[0];if(e?.focus?.({preventScroll:!0}),e&&this.__isFocused(e))return}}__isFocused(e){if(document.activeElement===e)return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.activeElement===e}__syncLastTriggerExpanded(e){this.__lastTriggerEl&&this.__lastTriggerWasAriaControls&&this.__lastTriggerEl.getAttribute(`aria-controls`)===this.id&&this.__lastTriggerEl.setAttribute(`aria-expanded`,String(e))}__syncEffectiveSide(e){let t=this.left&&this.right,n;n=t?e.has(`left`)&&this.left&&!e.has(`right`)?`left`:`right`:this.right?`right`:`left`,this.__effectiveSide!==n&&(this.__effectiveSide=n),this.getAttribute(`data-side`)!==n&&this.setAttribute(`data-side`,n)}willUpdate(e){this.__syncEffectiveSide(e)}updated(e){if(this.open&&this.floating&&this.overlay&&q.__syncOverlayColors(this),e.has(`open`)){let t=!!e.get(`open`);this.__applyOpenSideEffects(t,this.open)}(e.has(`open`)||e.has(`floating`))&&(this.open&&this.floating?_l(this):(this.open||bl(this),!this.open&&(yl(this)||this.__scrollLockHeld)?vl(this,this.__scrollLockHeld?()=>this.__releaseScrollLock():void 0):z(this)))}__applyOpenSideEffects(e,t){if(t&&!e)this.__syncLastTriggerExpanded(!0),this.floating&&this.overlay&&(q.__showOverlay(this),this.lockScroll&&this.__acquireScrollLock()),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),this.__focusFirstControl(),this.dispatchEvent(new CustomEvent(`scb-drawer-opened`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbdraweropened`,{bubbles:!0,composed:!0}));else if(!t&&e){this.__syncLastTriggerExpanded(!1),this.floating&&this.overlay&&q.__hideOverlay(this),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0);let e=this.__lastTriggerEl;requestAnimationFrame(()=>{this.open||e?.focus?.({preventScroll:!0})}),this.dispatchEvent(new CustomEvent(`scb-drawer-closed`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbdrawerclosed`,{bubbles:!0,composed:!0}))}}__acquireScrollLock(){this.__scrollLockHeld||=(q.__lockScrollEnable(),!0)}__releaseScrollLock(){this.__scrollLockHeld&&(this.__scrollLockHeld=!1,q.__lockScrollDisable())}},N([_({type:Boolean,reflect:!0,converter:cd})],ld.prototype,`floating`,void 0),N([_({type:Boolean,reflect:!0,converter:cd})],ld.prototype,`left`,void 0),N([_({type:Boolean,reflect:!0,converter:cd})],ld.prototype,`right`,void 0),N([_({type:Boolean,reflect:!0,converter:cd})],ld.prototype,`open`,void 0),N([_({type:Boolean,reflect:!0,converter:cd})],ld.prototype,`overlay`,void 0),N([_({type:Boolean,reflect:!0,attribute:`lock-scroll`,converter:cd})],ld.prototype,`lockScroll`,void 0),N([_({type:Boolean,reflect:!0,attribute:`close-on-overlay`,converter:cd})],ld.prototype,`closeOnOverlay`,void 0),N([_({type:Boolean,reflect:!0,converter:cd})],ld.prototype,`modal`,void 0),N([_({type:String,reflect:!0,attribute:`aria-label`})],ld.prototype,`ariaLabel`,void 0),ld=q=N([a(`scb-drawer`)],ld)}));ud(),w(),b(),Oc(),cc(),P();var J=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.type=`default`,this.name=``,this.multiple=!1,this.label=``,this.supportingText=``,this.metaText=``,this.buttonLabel=``,this.replaceButtonLabel=``,this.removeButtonLabel=``,this.removeSelectedFileLabel=``,this.selectedImagesLabel=``,this.selectedFilesLabel=``,this.imagePreviewLabel=``,this.filePreviewLabel=``,this.selectedImagesPreviewText=``,this.existingFileLabel=``,this.selectedFileLabel=``,this.previewEyebrow=``,this.emptyPreviewTitle=``,this.emptyPreviewMeta=``,this.accept=``,this.hidePreview=!1,this.showExistingPreview=!1,this.disabled=!1,this.required=!1,this.error=!1,this.errorText=``,this.previewSrc=``,this.previewAlt=``,this.previewTitle=``,this.previewMeta=``,this.existingValue=``,this.existingValueName=``,this.removeValueName=``,this._isDragOver=!1,this._selectedPreviewKind=`empty`,this._selectedPreviewSrc=``,this._selectedPreviewAlt=``,this._selectedPreviewTitle=``,this._selectedPreviewMeta=``,this._selectedPreviewItems=[],this._markedForRemoval=!1,this._dragDepth=0,this._previewSource=`external`,this._form=null,this._formDataHandler=null,this._formSubmitHandler=null,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._supportingTextId=`scb-drop-zone-supporting-${Math.random().toString(36).slice(2)}`,this._metaTextId=`scb-drop-zone-meta-${Math.random().toString(36).slice(2)}`,this._errorTextId=`scb-drop-zone-error-${Math.random().toString(36).slice(2)}`,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
9924
+ `}connectedCallback(){super.connectedCallback(),this.__syncEffectiveSide(new Map),document.addEventListener(`click`,this.__onDocumentClick,!1)}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),this.overlay&&(K.__hideOverlay(this),this.__releaseScrollLock()),R(this),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-drawer-open`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`open`;if(e.getAttribute(`data-drawer-close`)===this.id)return this.contains(e)||(this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1),`close`;if(e.getAttribute(`data-drawer-toggle`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!1,`toggle`;if(e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,this.__lastTriggerWasAriaControls=!0,`toggle`}return null}__hasOpenNestedOverlay(e){let t=`scb-options-menu, scb-dropdown, scb-select`;return e.composedPath().some(e=>e instanceof Element&&e!==this&&e.matches(t)&&!!e.open)?!0:Array.from(this.querySelectorAll(t)).some(e=>!!e.open)}__getFocusable(){let e=[`button`,`[href]`,`input`,`select`,`textarea`,`[tabindex]:not([tabindex="-1"])`,`scb-button`,`scb-icon-button`,`scb-textfield`,`scb-checkbox`,`scb-radio-button`,`scb-switch`,`scb-chip`,`scb-menu-item`].join(`, `),t=new Set,n=n=>{n.querySelectorAll(e).forEach(e=>{let n=this.__resolveFocusable(e);n&&t.add(n)})};return n(this),n(this.renderRoot),Array.from(t).filter(e=>!this.__isDisabledOrHidden(e))}__resolveFocusable(e){return this.__isDisabledOrHidden(e)?null:e.tagName===`SCB-BUTTON`||e.tagName===`SCB-ICON-BUTTON`?e.shadowRoot?.querySelector(`.native-button, button, a`)??e:e.tagName===`SCB-MENU-ITEM`?e.shadowRoot?.querySelector(`.scb-menu-label-text`)??e:e}__isDisabledOrHidden(e){if(e.disabled||e.getAttribute(`aria-hidden`)===`true`)return!0;let t=getComputedStyle(e);return t.display===`none`||t.visibility===`hidden`}__currentFocusableFromEvent(e,t){let n=e.composedPath();return t.find(e=>n.includes(e))??(this.shadowRoot?.activeElement instanceof HTMLElement?this.shadowRoot.activeElement:null)??(document.activeElement instanceof HTMLElement?document.activeElement:null)}__setOpen(e){this.open=e}async __focusFirstControl(){await this.updateComplete;for(let e=0;e<4;e+=1){await new Promise(e=>requestAnimationFrame(()=>e()));let e=this.__getFocusable()[0];if(e?.focus?.({preventScroll:!0}),e&&this.__isFocused(e))return}}__isFocused(e){if(document.activeElement===e)return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.activeElement===e}__syncLastTriggerExpanded(e){this.__lastTriggerEl&&this.__lastTriggerWasAriaControls&&this.__lastTriggerEl.getAttribute(`aria-controls`)===this.id&&this.__lastTriggerEl.setAttribute(`aria-expanded`,String(e))}__syncEffectiveSide(e){let t=this.left&&this.right,n;n=t?e.has(`left`)&&this.left&&!e.has(`right`)?`left`:`right`:this.right?`right`:`left`,this.__effectiveSide!==n&&(this.__effectiveSide=n),this.getAttribute(`data-side`)!==n&&this.setAttribute(`data-side`,n)}willUpdate(e){this.__syncEffectiveSide(e)}updated(e){if(this.open&&this.floating&&this.overlay&&K.__syncOverlayColors(this),e.has(`open`)){let t=!!e.get(`open`);this.__applyOpenSideEffects(t,this.open)}(e.has(`open`)||e.has(`floating`))&&(this.open&&this.floating?vl(this):(this.open||xl(this),!this.open&&(bl(this)||this.__scrollLockHeld)?yl(this,this.__scrollLockHeld?()=>this.__releaseScrollLock():void 0):R(this)))}__applyOpenSideEffects(e,t){if(t&&!e)this.__syncLastTriggerExpanded(!0),this.floating&&this.overlay&&(K.__showOverlay(this),this.lockScroll&&this.__acquireScrollLock()),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),this.__focusFirstControl(),this.dispatchEvent(new CustomEvent(`scb-drawer-opened`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbdraweropened`,{bubbles:!0,composed:!0}));else if(!t&&e){this.__syncLastTriggerExpanded(!1),this.floating&&this.overlay&&K.__hideOverlay(this),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0);let e=this.__lastTriggerEl;requestAnimationFrame(()=>{this.open||e?.focus?.({preventScroll:!0})}),this.dispatchEvent(new CustomEvent(`scb-drawer-closed`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`scbdrawerclosed`,{bubbles:!0,composed:!0}))}}__acquireScrollLock(){this.__scrollLockHeld||=(K.__lockScrollEnable(),!0)}__releaseScrollLock(){this.__scrollLockHeld&&(this.__scrollLockHeld=!1,K.__lockScrollDisable())}},N([_({type:Boolean,reflect:!0,converter:ld})],ud.prototype,`floating`,void 0),N([_({type:Boolean,reflect:!0,converter:ld})],ud.prototype,`left`,void 0),N([_({type:Boolean,reflect:!0,converter:ld})],ud.prototype,`right`,void 0),N([_({type:Boolean,reflect:!0,converter:ld})],ud.prototype,`open`,void 0),N([_({type:Boolean,reflect:!0,converter:ld})],ud.prototype,`overlay`,void 0),N([_({type:Boolean,reflect:!0,attribute:`lock-scroll`,converter:ld})],ud.prototype,`lockScroll`,void 0),N([_({type:Boolean,reflect:!0,attribute:`close-on-overlay`,converter:ld})],ud.prototype,`closeOnOverlay`,void 0),N([_({type:Boolean,reflect:!0,converter:ld})],ud.prototype,`modal`,void 0),N([_({type:String,reflect:!0,attribute:`aria-label`})],ud.prototype,`ariaLabel`,void 0),ud=K=N([a(`scb-drawer`)],ud)}));dd(),w(),b(),Oc(),cc(),P();var q=class extends C{static{this.formAssociated=!0}constructor(){super(),this._internals=null,this.type=`default`,this.name=``,this.multiple=!1,this.label=``,this.supportingText=``,this.metaText=``,this.buttonLabel=``,this.replaceButtonLabel=``,this.removeButtonLabel=``,this.removeSelectedFileLabel=``,this.selectedImagesLabel=``,this.selectedFilesLabel=``,this.imagePreviewLabel=``,this.filePreviewLabel=``,this.selectedImagesPreviewText=``,this.existingFileLabel=``,this.selectedFileLabel=``,this.previewEyebrow=``,this.emptyPreviewTitle=``,this.emptyPreviewMeta=``,this.accept=``,this.hidePreview=!1,this.showExistingPreview=!1,this.disabled=!1,this.required=!1,this.error=!1,this.errorText=``,this.previewSrc=``,this.previewAlt=``,this.previewTitle=``,this.previewMeta=``,this.existingValue=``,this.existingValueName=``,this.removeValueName=``,this._isDragOver=!1,this._selectedPreviewKind=`empty`,this._selectedPreviewSrc=``,this._selectedPreviewAlt=``,this._selectedPreviewTitle=``,this._selectedPreviewMeta=``,this._selectedPreviewItems=[],this._markedForRemoval=!1,this._dragDepth=0,this._previewSource=`external`,this._form=null,this._formDataHandler=null,this._formSubmitHandler=null,this._customValidationMessage=``,this._validationMessage=``,this._hasValidationBeenReported=!1,this._supportingTextId=`scb-drop-zone-supporting-${Math.random().toString(36).slice(2)}`,this._metaTextId=`scb-drop-zone-meta-${Math.random().toString(36).slice(2)}`,this._errorTextId=`scb-drop-zone-error-${Math.random().toString(36).slice(2)}`,`attachInternals`in this&&(this._internals=this.attachInternals())}static{this.styles=p`
9925
9925
  :host {
9926
9926
  display: block;
9927
9927
  width: 100%;
@@ -10636,7 +10636,7 @@
10636
10636
 
10637
10637
  ${this._renderSelectedImageCards()}
10638
10638
  </div>
10639
- `}};N([_({type:String,reflect:!0})],J.prototype,`type`,void 0),N([_({type:String})],J.prototype,`name`,void 0),N([_({type:Boolean,reflect:!0})],J.prototype,`multiple`,void 0),N([_({type:String})],J.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],J.prototype,`supportingText`,void 0),N([_({type:String,attribute:`meta-text`})],J.prototype,`metaText`,void 0),N([_({type:String,attribute:`button-label`})],J.prototype,`buttonLabel`,void 0),N([_({type:String,attribute:`replace-button-label`})],J.prototype,`replaceButtonLabel`,void 0),N([_({type:String,attribute:`remove-button-label`})],J.prototype,`removeButtonLabel`,void 0),N([_({type:String,attribute:`remove-selected-file-label`})],J.prototype,`removeSelectedFileLabel`,void 0),N([_({type:String,attribute:`selected-images-label`})],J.prototype,`selectedImagesLabel`,void 0),N([_({type:String,attribute:`selected-files-label`})],J.prototype,`selectedFilesLabel`,void 0),N([_({type:String,attribute:`image-preview-label`})],J.prototype,`imagePreviewLabel`,void 0),N([_({type:String,attribute:`file-preview-label`})],J.prototype,`filePreviewLabel`,void 0),N([_({type:String,attribute:`selected-images-preview-text`})],J.prototype,`selectedImagesPreviewText`,void 0),N([_({type:String,attribute:`existing-file-label`})],J.prototype,`existingFileLabel`,void 0),N([_({type:String,attribute:`selected-file-label`})],J.prototype,`selectedFileLabel`,void 0),N([_({type:String,attribute:`preview-eyebrow`})],J.prototype,`previewEyebrow`,void 0),N([_({type:String,attribute:`empty-preview-title`})],J.prototype,`emptyPreviewTitle`,void 0),N([_({type:String,attribute:`empty-preview-meta`})],J.prototype,`emptyPreviewMeta`,void 0),N([_({type:String})],J.prototype,`accept`,void 0),N([_({type:Boolean,attribute:`hide-preview`,reflect:!0})],J.prototype,`hidePreview`,void 0),N([_({type:Boolean,attribute:`show-existing-preview`,reflect:!0})],J.prototype,`showExistingPreview`,void 0),N([_({type:Boolean,reflect:!0})],J.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],J.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],J.prototype,`error`,void 0),N([_({type:String,attribute:`error-text`})],J.prototype,`errorText`,void 0),N([_({type:String,attribute:`preview-src`})],J.prototype,`previewSrc`,void 0),N([_({type:String,attribute:`preview-alt`})],J.prototype,`previewAlt`,void 0),N([_({type:String,attribute:`preview-title`})],J.prototype,`previewTitle`,void 0),N([_({type:String,attribute:`preview-meta`})],J.prototype,`previewMeta`,void 0),N([_({type:String,attribute:`existing-value`})],J.prototype,`existingValue`,void 0),N([_({type:String,attribute:`existing-value-name`})],J.prototype,`existingValueName`,void 0),N([_({type:String,attribute:`remove-value-name`})],J.prototype,`removeValueName`,void 0),N([v()],J.prototype,`_isDragOver`,void 0),N([v()],J.prototype,`_selectedPreviewKind`,void 0),N([v()],J.prototype,`_selectedPreviewSrc`,void 0),N([v()],J.prototype,`_selectedPreviewAlt`,void 0),N([v()],J.prototype,`_selectedPreviewTitle`,void 0),N([v()],J.prototype,`_selectedPreviewMeta`,void 0),N([v()],J.prototype,`_selectedPreviewItems`,void 0),N([v()],J.prototype,`_markedForRemoval`,void 0),J=N([a(`scb-drop-zone`)],J);var dd,fd=t((()=>{w(),b(),Nu(),D(),E(),j(),P(),dd=class extends C{constructor(...e){super(...e),this.label=``,this.hasSubMenu=!1,this.openLeft=!1,this.divider=!1,this.leadingIcon=``,this.trailingIcon=``,this.itemHref=``,this.href=``,this._observedSubMenu=null,this._syncSubMenuFlags=()=>{let e=this.nextElementSibling,t=!!(e&&e.tagName===`SCB-OPTIONS-SUB-MENU`),n=!!(t&&e.hasAttribute(`open-left`));t!==this.hasSubMenu&&(this.hasSubMenu=t),n!==this.openLeft&&(this.openLeft=n);let r=t?e:null;r!==this._observedSubMenu&&(this._subMenuAttrObserver?.disconnect(),this._subMenuAttrObserver=void 0,this._observedSubMenu=r,r&&(this._subMenuAttrObserver=new MutationObserver(()=>this._syncSubMenuFlags()),this._subMenuAttrObserver.observe(r,{attributes:!0,attributeFilter:[`open-left`]})))},this.handleClick=e=>{this._effectiveHref?this._navigateToHref(e):this._toggleSubMenu()},this._onBlur=e=>{let t=this.closest(`scb-options-sub-menu`);if(t&&t.open){let n=e.relatedTarget;(!n||!t.contains(n))&&(t.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0})))}},this._onFocus=()=>{let e=this.nextElementSibling;this.classList.contains(`open-submenu`)&&(e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&e.hasAttribute(`open`)||this.classList.remove(`open-submenu`))},this._onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){e.preventDefault(),this.handleClick(e);return}if(e.key===`ArrowDown`){e.preventDefault();let t=this.nextElementSibling;for(;t&&t.tagName!==`SCB-OPTIONS-MENU-ITEM`;)t=t.nextElementSibling;t&&(t.shadowRoot?.querySelector(`li`))?.focus();return}if(e.key===`ArrowUp`){e.preventDefault();let t=this.previousElementSibling;for(;t&&t.tagName!==`SCB-OPTIONS-MENU-ITEM`;)t=t.previousElementSibling;t&&(t.shadowRoot?.querySelector(`li`))?.focus();return}if(e.key===`ArrowRight`){e.preventDefault();let t=this.nextElementSibling;t&&t.tagName===`SCB-OPTIONS-SUB-MENU`&&(t.hasAttribute(`open`)||(this._toggleSubMenu(),t.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))),setTimeout(()=>{let e=t.querySelector(`scb-options-menu-item`);e&&(e.shadowRoot?.querySelector(`li`))?.focus()},0));return}if(e.key===`ArrowLeft`){e.preventDefault();let t=this.nextElementSibling;if(t&&t.tagName===`SCB-OPTIONS-SUB-MENU`&&t.hasAttribute(`open`)){this._toggleSubMenu(),t.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}));return}let n=this.closest(`scb-options-sub-menu`);if(n){let e=n.previousElementSibling;e&&e.tagName===`SCB-OPTIONS-MENU-ITEM`&&(e.shadowRoot?.querySelector(`li`))?.focus()}return}}}static{this.styles=p`
10639
+ `}};N([_({type:String,reflect:!0})],q.prototype,`type`,void 0),N([_({type:String})],q.prototype,`name`,void 0),N([_({type:Boolean,reflect:!0})],q.prototype,`multiple`,void 0),N([_({type:String})],q.prototype,`label`,void 0),N([_({type:String,attribute:`supporting-text`})],q.prototype,`supportingText`,void 0),N([_({type:String,attribute:`meta-text`})],q.prototype,`metaText`,void 0),N([_({type:String,attribute:`button-label`})],q.prototype,`buttonLabel`,void 0),N([_({type:String,attribute:`replace-button-label`})],q.prototype,`replaceButtonLabel`,void 0),N([_({type:String,attribute:`remove-button-label`})],q.prototype,`removeButtonLabel`,void 0),N([_({type:String,attribute:`remove-selected-file-label`})],q.prototype,`removeSelectedFileLabel`,void 0),N([_({type:String,attribute:`selected-images-label`})],q.prototype,`selectedImagesLabel`,void 0),N([_({type:String,attribute:`selected-files-label`})],q.prototype,`selectedFilesLabel`,void 0),N([_({type:String,attribute:`image-preview-label`})],q.prototype,`imagePreviewLabel`,void 0),N([_({type:String,attribute:`file-preview-label`})],q.prototype,`filePreviewLabel`,void 0),N([_({type:String,attribute:`selected-images-preview-text`})],q.prototype,`selectedImagesPreviewText`,void 0),N([_({type:String,attribute:`existing-file-label`})],q.prototype,`existingFileLabel`,void 0),N([_({type:String,attribute:`selected-file-label`})],q.prototype,`selectedFileLabel`,void 0),N([_({type:String,attribute:`preview-eyebrow`})],q.prototype,`previewEyebrow`,void 0),N([_({type:String,attribute:`empty-preview-title`})],q.prototype,`emptyPreviewTitle`,void 0),N([_({type:String,attribute:`empty-preview-meta`})],q.prototype,`emptyPreviewMeta`,void 0),N([_({type:String})],q.prototype,`accept`,void 0),N([_({type:Boolean,attribute:`hide-preview`,reflect:!0})],q.prototype,`hidePreview`,void 0),N([_({type:Boolean,attribute:`show-existing-preview`,reflect:!0})],q.prototype,`showExistingPreview`,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:String,attribute:`error-text`})],q.prototype,`errorText`,void 0),N([_({type:String,attribute:`preview-src`})],q.prototype,`previewSrc`,void 0),N([_({type:String,attribute:`preview-alt`})],q.prototype,`previewAlt`,void 0),N([_({type:String,attribute:`preview-title`})],q.prototype,`previewTitle`,void 0),N([_({type:String,attribute:`preview-meta`})],q.prototype,`previewMeta`,void 0),N([_({type:String,attribute:`existing-value`})],q.prototype,`existingValue`,void 0),N([_({type:String,attribute:`existing-value-name`})],q.prototype,`existingValueName`,void 0),N([_({type:String,attribute:`remove-value-name`})],q.prototype,`removeValueName`,void 0),N([v()],q.prototype,`_isDragOver`,void 0),N([v()],q.prototype,`_selectedPreviewKind`,void 0),N([v()],q.prototype,`_selectedPreviewSrc`,void 0),N([v()],q.prototype,`_selectedPreviewAlt`,void 0),N([v()],q.prototype,`_selectedPreviewTitle`,void 0),N([v()],q.prototype,`_selectedPreviewMeta`,void 0),N([v()],q.prototype,`_selectedPreviewItems`,void 0),N([v()],q.prototype,`_markedForRemoval`,void 0),q=N([a(`scb-drop-zone`)],q);var fd,pd=t((()=>{w(),b(),Pu(),D(),E(),j(),P(),fd=class extends C{constructor(...e){super(...e),this.label=``,this.hasSubMenu=!1,this.openLeft=!1,this.divider=!1,this.leadingIcon=``,this.trailingIcon=``,this.itemHref=``,this.href=``,this._observedSubMenu=null,this._syncSubMenuFlags=()=>{let e=this.nextElementSibling,t=!!(e&&e.tagName===`SCB-OPTIONS-SUB-MENU`),n=!!(t&&e.hasAttribute(`open-left`));t!==this.hasSubMenu&&(this.hasSubMenu=t),n!==this.openLeft&&(this.openLeft=n);let r=t?e:null;r!==this._observedSubMenu&&(this._subMenuAttrObserver?.disconnect(),this._subMenuAttrObserver=void 0,this._observedSubMenu=r,r&&(this._subMenuAttrObserver=new MutationObserver(()=>this._syncSubMenuFlags()),this._subMenuAttrObserver.observe(r,{attributes:!0,attributeFilter:[`open-left`]})))},this.handleClick=e=>{this._effectiveHref?this._navigateToHref(e):this._toggleSubMenu()},this._onBlur=e=>{let t=this.closest(`scb-options-sub-menu`);if(t&&t.open){let n=e.relatedTarget;(!n||!t.contains(n))&&(t.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0})))}},this._onFocus=()=>{let e=this.nextElementSibling;this.classList.contains(`open-submenu`)&&(e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&e.hasAttribute(`open`)||this.classList.remove(`open-submenu`))},this._onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){e.preventDefault(),this.handleClick(e);return}if(e.key===`ArrowDown`){e.preventDefault();let t=this.nextElementSibling;for(;t&&t.tagName!==`SCB-OPTIONS-MENU-ITEM`;)t=t.nextElementSibling;t&&(t.shadowRoot?.querySelector(`li`))?.focus();return}if(e.key===`ArrowUp`){e.preventDefault();let t=this.previousElementSibling;for(;t&&t.tagName!==`SCB-OPTIONS-MENU-ITEM`;)t=t.previousElementSibling;t&&(t.shadowRoot?.querySelector(`li`))?.focus();return}if(e.key===`ArrowRight`){e.preventDefault();let t=this.nextElementSibling;t&&t.tagName===`SCB-OPTIONS-SUB-MENU`&&(t.hasAttribute(`open`)||(this._toggleSubMenu(),t.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))),setTimeout(()=>{let e=t.querySelector(`scb-options-menu-item`);e&&(e.shadowRoot?.querySelector(`li`))?.focus()},0));return}if(e.key===`ArrowLeft`){e.preventDefault();let t=this.nextElementSibling;if(t&&t.tagName===`SCB-OPTIONS-SUB-MENU`&&t.hasAttribute(`open`)){this._toggleSubMenu(),t.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),t.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}));return}let n=this.closest(`scb-options-sub-menu`);if(n){let e=n.previousElementSibling;e&&e.tagName===`SCB-OPTIONS-MENU-ITEM`&&(e.shadowRoot?.querySelector(`li`))?.focus()}return}}}static{this.styles=p`
10640
10640
  :host {
10641
10641
  display: block;
10642
10642
  }
@@ -10756,7 +10756,7 @@
10756
10756
  <md-ripple></md-ripple>
10757
10757
  `}
10758
10758
  </li>
10759
- `}_navigateToHref(e){let t=this._effectiveHref;if(!t)return;let n={href:t},r=new CustomEvent(`item-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),i=new CustomEvent(`itemnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),a=!this.dispatchEvent(r),o=!this.dispatchEvent(i);e.preventDefault(),e.stopPropagation(),!a&&!o&&(window.location.href=t)}_toggleSubMenu(){let e=this.nextElementSibling;e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&(this.classList.toggle(`open-submenu`),e.hasAttribute(`open`)?(e.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}))):(e.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))))}},N([_({type:String})],dd.prototype,`label`,void 0),N([_({type:Boolean})],dd.prototype,`hasSubMenu`,void 0),N([_({type:Boolean})],dd.prototype,`openLeft`,void 0),N([_({type:Boolean})],dd.prototype,`divider`,void 0),N([_({type:String,attribute:`leading-icon`})],dd.prototype,`leadingIcon`,void 0),N([_({type:String,attribute:`trailing-icon`})],dd.prototype,`trailingIcon`,void 0),N([_({type:String,attribute:`item-href`})],dd.prototype,`itemHref`,void 0),N([_({type:String})],dd.prototype,`href`,void 0),dd=N([a(`scb-options-menu-item`)],dd)})),pd,md=t((()=>{w(),b(),Cl(),P(),pd=class extends C{constructor(...e){super(...e),this.open=!1,this._show=()=>{this.setAttribute(`open`,``),this.open=!0},this._hide=e=>{this.removeAttribute(`open`),this.open=!1,e&&e.stopPropagation()},this._onViewportChange=()=>{this.open&&this._positionPopover()}}static{this.styles=p`
10759
+ `}_navigateToHref(e){let t=this._effectiveHref;if(!t)return;let n={href:t},r=new CustomEvent(`item-navigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),i=new CustomEvent(`itemnavigate`,{detail:n,bubbles:!0,composed:!0,cancelable:!0}),a=!this.dispatchEvent(r),o=!this.dispatchEvent(i);e.preventDefault(),e.stopPropagation(),!a&&!o&&(window.location.href=t)}_toggleSubMenu(){let e=this.nextElementSibling;e&&e.tagName===`SCB-OPTIONS-SUB-MENU`&&(this.classList.toggle(`open-submenu`),e.hasAttribute(`open`)?(e.dispatchEvent(new CustomEvent(`hide-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`hidesubmenu`,{bubbles:!0,composed:!0}))):(e.dispatchEvent(new CustomEvent(`show-submenu`,{bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent(`showsubmenu`,{bubbles:!0,composed:!0}))))}},N([_({type:String})],fd.prototype,`label`,void 0),N([_({type:Boolean})],fd.prototype,`hasSubMenu`,void 0),N([_({type:Boolean})],fd.prototype,`openLeft`,void 0),N([_({type:Boolean})],fd.prototype,`divider`,void 0),N([_({type:String,attribute:`leading-icon`})],fd.prototype,`leadingIcon`,void 0),N([_({type:String,attribute:`trailing-icon`})],fd.prototype,`trailingIcon`,void 0),N([_({type:String,attribute:`item-href`})],fd.prototype,`itemHref`,void 0),N([_({type:String})],fd.prototype,`href`,void 0),fd=N([a(`scb-options-menu-item`)],fd)})),md,hd=t((()=>{w(),b(),wl(),P(),md=class extends C{constructor(...e){super(...e),this.open=!1,this._show=()=>{this.setAttribute(`open`,``),this.open=!0},this._hide=e=>{this.removeAttribute(`open`),this.open=!1,e&&e.stopPropagation()},this._onViewportChange=()=>{this.open&&this._positionPopover()}}static{this.styles=p`
10760
10760
  :host {
10761
10761
  display: block;
10762
10762
  position: relative;
@@ -10805,11 +10805,11 @@
10805
10805
  }
10806
10806
 
10807
10807
  /* design:bindings:scb-options-sub-menu:end */
10808
- `}connectedCallback(){super.connectedCallback(),this.addEventListener(`show-submenu`,this._show),this.addEventListener(`showsubmenu`,this._show),this.addEventListener(`hide-submenu`,this._hide),this.addEventListener(`hidesubmenu`,this._hide),window.addEventListener(`resize`,this._onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this._onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){this.removeEventListener(`show-submenu`,this._show),this.removeEventListener(`showsubmenu`,this._show),this.removeEventListener(`hide-submenu`,this._hide),this.removeEventListener(`hidesubmenu`,this._hide),window.removeEventListener(`resize`,this._onViewportChange),window.removeEventListener(`scroll`,this._onViewportChange,!0),z(this.renderRoot.querySelector(`.submenu`)),super.disconnectedCallback()}firstUpdated(){let e=0,t=this.parentElement;for(;t;)t.tagName===`SCB-OPTIONS-SUB-MENU`&&e++,t=t.parentElement;e%2==1?this.setAttribute(`open-left`,``):this.removeAttribute(`open-left`)}updated(e){e.has(`open`)&&this._syncPopover()}_hasTopLayerParent(){let e=this.closest(`scb-options-menu`)?.shadowRoot?.querySelector(`.scb-options-menu-panel`),t=this.closest(`scb-dropdown`)?.shadowRoot?.querySelector(`.panel`);return yl(e)||yl(t)}_syncPopover(){let e=this.renderRoot.querySelector(`.submenu`);if(e){if(this.open&&this._hasTopLayerParent()){let t=this.previousElementSibling;_l(e,t)&&requestAnimationFrame(()=>this._positionPopover());return}z(e);for(let t of[`position`,`left`,`right`,`top`,`bottom`,`max-height`,`overflow-x`,`overflow-y`])e.style.removeProperty(t)}}_positionPopover(){let e=this.renderRoot.querySelector(`.submenu`),t=this.previousElementSibling;if(!e||!t||!yl(e))return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=Math.max(0,window.innerHeight-16),a=Math.min(r.width||e.scrollWidth,window.innerWidth-16),o=window.innerWidth-n.right-4-8,s=n.left-4-8,c=a>o&&s>o,l=c?n.left-4-a:n.right+4,u=Math.min(Math.max(8,l),window.innerWidth-8-a),d=Math.min(e.scrollHeight,i),f=Math.min(Math.max(8,n.top),window.innerHeight-8-d);this.toggleAttribute(`open-left`,c),e.style.position=`fixed`,e.style.left=`${Math.round(u)}px`,e.style.right=`auto`,e.style.top=`${Math.round(f)}px`,e.style.bottom=`auto`,e.style.maxHeight=`${Math.floor(i)}px`,e.style.overflowX=`hidden`,e.style.overflowY=`auto`}render(){return x`
10808
+ `}connectedCallback(){super.connectedCallback(),this.addEventListener(`show-submenu`,this._show),this.addEventListener(`showsubmenu`,this._show),this.addEventListener(`hide-submenu`,this._hide),this.addEventListener(`hidesubmenu`,this._hide),window.addEventListener(`resize`,this._onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this._onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){this.removeEventListener(`show-submenu`,this._show),this.removeEventListener(`showsubmenu`,this._show),this.removeEventListener(`hide-submenu`,this._hide),this.removeEventListener(`hidesubmenu`,this._hide),window.removeEventListener(`resize`,this._onViewportChange),window.removeEventListener(`scroll`,this._onViewportChange,!0),R(this.renderRoot.querySelector(`.submenu`)),super.disconnectedCallback()}firstUpdated(){let e=0,t=this.parentElement;for(;t;)t.tagName===`SCB-OPTIONS-SUB-MENU`&&e++,t=t.parentElement;e%2==1?this.setAttribute(`open-left`,``):this.removeAttribute(`open-left`)}updated(e){e.has(`open`)&&this._syncPopover()}_hasTopLayerParent(){let e=this.closest(`scb-options-menu`)?.shadowRoot?.querySelector(`.scb-options-menu-panel`),t=this.closest(`scb-dropdown`)?.shadowRoot?.querySelector(`.panel`);return bl(e)||bl(t)}_syncPopover(){let e=this.renderRoot.querySelector(`.submenu`);if(e){if(this.open&&this._hasTopLayerParent()){let t=this.previousElementSibling;vl(e,t)&&requestAnimationFrame(()=>this._positionPopover());return}R(e);for(let t of[`position`,`left`,`right`,`top`,`bottom`,`max-height`,`overflow-x`,`overflow-y`])e.style.removeProperty(t)}}_positionPopover(){let e=this.renderRoot.querySelector(`.submenu`),t=this.previousElementSibling;if(!e||!t||!bl(e))return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=Math.max(0,window.innerHeight-16),a=Math.min(r.width||e.scrollWidth,window.innerWidth-16),o=window.innerWidth-n.right-4-8,s=n.left-4-8,c=a>o&&s>o,l=c?n.left-4-a:n.right+4,u=Math.min(Math.max(8,l),window.innerWidth-8-a),d=Math.min(e.scrollHeight,i),f=Math.min(Math.max(8,n.top),window.innerHeight-8-d);this.toggleAttribute(`open-left`,c),e.style.position=`fixed`,e.style.left=`${Math.round(u)}px`,e.style.right=`auto`,e.style.top=`${Math.round(f)}px`,e.style.bottom=`auto`,e.style.maxHeight=`${Math.floor(i)}px`,e.style.overflowX=`hidden`,e.style.overflowY=`auto`}render(){return x`
10809
10809
  <div role="menu" class="submenu${this.open?` open`:``}">
10810
10810
  <slot></slot>
10811
10811
  </div>
10812
- `}},N([_({type:Boolean,reflect:!0})],pd.prototype,`open`,void 0),pd=N([a(`scb-options-sub-menu`)],pd)})),hd,gd=t((()=>{w(),cl(),b(),fd(),md(),uc(),Cl(),P(),hd=class extends C{constructor(...e){super(...e),this.open=!1,this.size=lc[`scb-options-menu`].size,this.inSb=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__lastTriggerEl=null,this.__onViewportChange=()=>{this.open&&this.__positionToTrigger()},this.__onDocumentClick=e=>{let t=this.__getActionFromEvent(e);if(t){t===`open`&&this.__setOpen(!0),t===`close`&&this.__setOpen(!1),t===`toggle`&&(this.__setOpen(!this.open),this.dispatchEvent(new CustomEvent(`toggle`,{bubbles:!0,composed:!0}))),e.stopPropagation();return}if(!this.inSb&&this.open&&!this.isClickInScbMenu(e)){this.__setOpen(!1);return}},this.__onDocumentKeydown=e=>{if(this.open&&e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.__setOpen(!1);return}}}static{this.styles=p`
10812
+ `}},N([_({type:Boolean,reflect:!0})],md.prototype,`open`,void 0),md=N([a(`scb-options-sub-menu`)],md)})),gd,_d=t((()=>{w(),ll(),b(),pd(),hd(),uc(),wl(),P(),gd=class extends C{constructor(...e){super(...e),this.open=!1,this.size=lc[`scb-options-menu`].size,this.inSb=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__lastTriggerEl=null,this.__onViewportChange=()=>{this.open&&this.__positionToTrigger()},this.__onDocumentClick=e=>{let t=this.__getActionFromEvent(e);if(t){t===`open`&&this.__setOpen(!0),t===`close`&&this.__setOpen(!1),t===`toggle`&&(this.__setOpen(!this.open),this.dispatchEvent(new CustomEvent(`toggle`,{bubbles:!0,composed:!0}))),e.stopPropagation();return}if(!this.inSb&&this.open&&!this.isClickInScbMenu(e)){this.__setOpen(!1);return}},this.__onDocumentKeydown=e=>{if(this.open&&e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.__setOpen(!1);return}}}static{this.styles=p`
10813
10813
  :host {
10814
10814
  position: absolute;
10815
10815
  display: block;
@@ -10993,12 +10993,12 @@
10993
10993
  `}firstUpdated(){this.__applySpacing()}render(){return x`
10994
10994
  <div
10995
10995
  role="menu"
10996
- aria-label=${ol(this.getAttribute(`aria-label`)??void 0)}
10996
+ aria-label=${L(this.getAttribute(`aria-label`)??void 0)}
10997
10997
  class="scb-options-menu-panel${this.open?` open`:``}"
10998
10998
  >
10999
10999
  <slot></slot>
11000
11000
  </div>
11001
- `}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.__onDocumentClick,!1),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),window.addEventListener(`resize`,this.__onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this.__onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),window.removeEventListener(`resize`,this.__onViewportChange),window.removeEventListener(`scroll`,this.__onViewportChange,!0),z(this.shadowRoot?.querySelector(`.scb-options-menu-panel`)??null),super.disconnectedCallback()}__setOpen(e){this.open=e}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-menu-open`)===this.id)return this.__lastTriggerEl=e,`open`;if(e.getAttribute(`data-menu-close`)===this.id)return this.__lastTriggerEl=e,`close`;if(e.getAttribute(`data-menu-toggle`)===this.id||e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,`toggle`}return null}isClickInScbMenu(e){return e.composedPath().some(e=>e instanceof Element&&(e.tagName===`SCB-OPTIONS-MENU`||e.tagName===`SCB-OPTIONS-SUB-MENU`))}updated(e){e.has(`open`)&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}__applyOpenSideEffects(){if(this.__updateTriggersExpanded(),this.open)this.__lastTriggerEl&&!this.closest(`scb-dropdown`)&&_l(this.shadowRoot?.querySelector(`.scb-options-menu-panel`)??null),this.__positionToTrigger();else{bl(this);let e=this.shadowRoot?.querySelector(`.scb-options-menu-panel`)??null,t=()=>{e?.style.removeProperty(`max-height`),e?.style.removeProperty(`overflow-x`),e?.style.removeProperty(`overflow-y`)};yl(e)?vl(e,t):(z(e),t()),this.__restoreFocusToTrigger()}}__positionToTrigger(){if(!this.open||!this.__lastTriggerEl)return;let e=this.__lastTriggerEl,t=this.shadowRoot?.querySelector(`.scb-options-menu-panel`);t&&requestAnimationFrame(()=>{if(!this.open)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=t.offsetWidth||r.width,s=getComputedStyle(this).getPropertyValue(`--scb-options-menu-inline-align`).trim()===`end`?n.right-o:n.left,c=t.scrollHeight||t.offsetHeight||r.height;s+o>i-8&&(s=Math.max(8,i-8-o)),s<8&&(s=8);let l=Math.max(0,a-n.bottom-4-8),u=Math.max(0,n.top-4-8),d=c>l&&u>l,f=d?u:l,p=Math.min(c,f),m=d?Math.max(8,n.top-4-p):n.bottom+4,h=d?`bottom`:`top`;t.style.position=`fixed`,t.style.left=`${Math.round(s)}px`,t.style.top=`${Math.round(m)}px`,t.style.maxHeight=`min(var(--scb-options-menu-max-height), ${Math.floor(f)}px)`,t.style.overflowX=`hidden`,t.style.overflowY=`auto`,this.style.setProperty(`--scb-options-menu-transform-origin`,h)})}__restoreFocusToTrigger(){this.__lastTriggerEl&&requestAnimationFrame(()=>{this.__lastTriggerEl?.focus?.({preventScroll:!0})})}__updateTriggersExpanded(){if(!this.id)return;let e=String(this.open),t=t=>{let n=t.getAttribute(`aria-controls`)===this.id,r=t.getAttribute(`data-menu-open`)===this.id||t.getAttribute(`data-menu-toggle`)===this.id;(n||r)&&(n||t.setAttribute(`aria-controls`,this.id),t.setAttribute(`aria-expanded`,e))};this.__lastTriggerEl&&t(this.__lastTriggerEl),document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(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-options-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-options-menu-spacing-block-start`),n?this.style.setProperty(`--scb-options-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-options-menu-spacing-block-end`),r?this.style.setProperty(`--scb-options-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-options-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-options-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-options-menu-spacing-inline-end`)}__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}},N([_({type:Boolean,reflect:!0})],hd.prototype,`open`,void 0),N([_({type:String,reflect:!0})],hd.prototype,`size`,void 0),N([_({type:Boolean,attribute:!1})],hd.prototype,`inSb`,void 0),N([_({type:String,reflect:!0})],hd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],hd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],hd.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],hd.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],hd.prototype,`spacingRight`,void 0),hd=N([a(`scb-options-menu`)],hd)})),_d=n({ScbDropdown:()=>Y}),Y,vd=t((()=>{w(),b(),D(),j(),Cl(),Oc(),hc(),gd(),uc(),P(),Y=class extends C{constructor(...e){super(...e),this.label=`Dropdown`,this.variant=`filled`,this.size=lc[`scb-dropdown`].size,this.open=!1,this.disabled=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.menuGap=`3`,this.width=null,this.minWidth=null,this.maxWidth=null,this.dataIndex=null,this.ariaCurrent=null,this._slottedMenuEl=null,this._openSettledTimer=null,this._menuCloseTimer=null,this._panelResizeObserver=null,this._panelHeightSyncRaf=null,this._panelPlacementRaf=null,this._onViewportChange=()=>{this.open&&this._schedulePanelPlacement()},this._onDocumentClickBound=e=>{if(!this.open)return;let t=e.composedPath(),n=t.find(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-dropdown`);if(n&&n!==this){this.open=!1;return}t.includes(this)||(this.open=!1)},this._onDocumentKeydownBound=e=>{this.open&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.open=!1,this.updateComplete.then(()=>this.focus({preventScroll:!0})))},this._onSlottedMenuOpen=()=>{this.open||=!0},this._onSlottedMenuClose=()=>{this.open&&=!1},this._onSlotChange=()=>{this._syncSlottedMenu(),this._applyPanelSizing(),this._applyInertByOpen(),this.requestUpdate()},this._onTriggerClick=e=>{this.hasAttribute(`as-tab`)||e.stopPropagation(),!this.disabled&&(this.open=!this.open)}}static{this.styles=p`
11001
+ `}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.__onDocumentClick,!1),document.addEventListener(`keydown`,this.__onDocumentKeydown,!0),window.addEventListener(`resize`,this.__onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this.__onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){document.removeEventListener(`click`,this.__onDocumentClick,!1),document.removeEventListener(`keydown`,this.__onDocumentKeydown,!0),window.removeEventListener(`resize`,this.__onViewportChange),window.removeEventListener(`scroll`,this.__onViewportChange,!0),R(this.shadowRoot?.querySelector(`.scb-options-menu-panel`)??null),super.disconnectedCallback()}__setOpen(e){this.open=e}__getActionFromEvent(e){if(!this.id)return null;let t=e.composedPath();for(let e of t)if(e instanceof Element){if(e.getAttribute(`data-menu-open`)===this.id)return this.__lastTriggerEl=e,`open`;if(e.getAttribute(`data-menu-close`)===this.id)return this.__lastTriggerEl=e,`close`;if(e.getAttribute(`data-menu-toggle`)===this.id||e.getAttribute(`aria-controls`)===this.id)return this.__lastTriggerEl=e,`toggle`}return null}isClickInScbMenu(e){return e.composedPath().some(e=>e instanceof Element&&(e.tagName===`SCB-OPTIONS-MENU`||e.tagName===`SCB-OPTIONS-SUB-MENU`))}updated(e){e.has(`open`)&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0}))),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.__applySpacing()}__applyOpenSideEffects(){if(this.__updateTriggersExpanded(),this.open)this.__lastTriggerEl&&!this.closest(`scb-dropdown`)&&vl(this.shadowRoot?.querySelector(`.scb-options-menu-panel`)??null),this.__positionToTrigger();else{xl(this);let e=this.shadowRoot?.querySelector(`.scb-options-menu-panel`)??null,t=()=>{e?.style.removeProperty(`max-height`),e?.style.removeProperty(`overflow-x`),e?.style.removeProperty(`overflow-y`)};bl(e)?yl(e,t):(R(e),t()),this.__restoreFocusToTrigger()}}__positionToTrigger(){if(!this.open||!this.__lastTriggerEl)return;let e=this.__lastTriggerEl,t=this.shadowRoot?.querySelector(`.scb-options-menu-panel`);t&&requestAnimationFrame(()=>{if(!this.open)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=t.offsetWidth||r.width,s=getComputedStyle(this).getPropertyValue(`--scb-options-menu-inline-align`).trim()===`end`?n.right-o:n.left,c=t.scrollHeight||t.offsetHeight||r.height;s+o>i-8&&(s=Math.max(8,i-8-o)),s<8&&(s=8);let l=Math.max(0,a-n.bottom-4-8),u=Math.max(0,n.top-4-8),d=c>l&&u>l,f=d?u:l,p=Math.min(c,f),m=d?Math.max(8,n.top-4-p):n.bottom+4,h=d?`bottom`:`top`;t.style.position=`fixed`,t.style.left=`${Math.round(s)}px`,t.style.top=`${Math.round(m)}px`,t.style.maxHeight=`min(var(--scb-options-menu-max-height), ${Math.floor(f)}px)`,t.style.overflowX=`hidden`,t.style.overflowY=`auto`,this.style.setProperty(`--scb-options-menu-transform-origin`,h)})}__restoreFocusToTrigger(){this.__lastTriggerEl&&requestAnimationFrame(()=>{this.__lastTriggerEl?.focus?.({preventScroll:!0})})}__updateTriggersExpanded(){if(!this.id)return;let e=String(this.open),t=t=>{let n=t.getAttribute(`aria-controls`)===this.id,r=t.getAttribute(`data-menu-open`)===this.id||t.getAttribute(`data-menu-toggle`)===this.id;(n||r)&&(n||t.setAttribute(`aria-controls`,this.id),t.setAttribute(`aria-expanded`,e))};this.__lastTriggerEl&&t(this.__lastTriggerEl),document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(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-options-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-options-menu-spacing-block-start`),n?this.style.setProperty(`--scb-options-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-options-menu-spacing-block-end`),r?this.style.setProperty(`--scb-options-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-options-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-options-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-options-menu-spacing-inline-end`)}__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}},N([_({type:Boolean,reflect:!0})],gd.prototype,`open`,void 0),N([_({type:String,reflect:!0})],gd.prototype,`size`,void 0),N([_({type:Boolean,attribute:!1})],gd.prototype,`inSb`,void 0),N([_({type:String,reflect:!0})],gd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],gd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],gd.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],gd.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],gd.prototype,`spacingRight`,void 0),gd=N([a(`scb-options-menu`)],gd)})),vd=n({ScbDropdown:()=>J}),J,yd=t((()=>{w(),b(),D(),j(),wl(),Oc(),hc(),_d(),uc(),P(),J=class extends C{constructor(...e){super(...e),this.label=`Dropdown`,this.variant=`filled`,this.size=lc[`scb-dropdown`].size,this.open=!1,this.disabled=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.menuGap=`3`,this.width=null,this.minWidth=null,this.maxWidth=null,this.dataIndex=null,this.ariaCurrent=null,this._slottedMenuEl=null,this._openSettledTimer=null,this._menuCloseTimer=null,this._panelResizeObserver=null,this._panelHeightSyncRaf=null,this._panelPlacementRaf=null,this._onViewportChange=()=>{this.open&&this._schedulePanelPlacement()},this._onDocumentClickBound=e=>{if(!this.open)return;let t=e.composedPath(),n=t.find(e=>e instanceof HTMLElement&&e.tagName.toLowerCase()===`scb-dropdown`);if(n&&n!==this){this.open=!1;return}t.includes(this)||(this.open=!1)},this._onDocumentKeydownBound=e=>{this.open&&e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.open=!1,this.updateComplete.then(()=>this.focus({preventScroll:!0})))},this._onSlottedMenuOpen=()=>{this.open||=!0},this._onSlottedMenuClose=()=>{this.open&&=!1},this._onSlotChange=()=>{this._syncSlottedMenu(),this._applyPanelSizing(),this._applyInertByOpen(),this.requestUpdate()},this._onTriggerClick=e=>{this.hasAttribute(`as-tab`)||e.stopPropagation(),!this.disabled&&(this.open=!this.open)}}static{this.styles=p`
11002
11002
  :host {
11003
11003
  display: inline-block;
11004
11004
  position: relative;
@@ -11437,7 +11437,7 @@
11437
11437
  --scb-dropdown-design-surface-radius: var(--scb-dropdown-design-surface-radius-large);
11438
11438
  }
11439
11439
  /* design:bindings:scb-dropdown:end */
11440
- `}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this._onDocumentClickBound,!0),document.addEventListener(`keydown`,this._onDocumentKeydownBound),window.addEventListener(`resize`,this._onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this._onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){document.removeEventListener(`click`,this._onDocumentClickBound,!0),document.removeEventListener(`keydown`,this._onDocumentKeydownBound),window.removeEventListener(`resize`,this._onViewportChange),window.removeEventListener(`scroll`,this._onViewportChange,!0),this._detachSlottedMenuListeners(),z(this.renderRoot.querySelector(`.panel`)),this._panelResizeObserver&&=(this._panelResizeObserver.disconnect(),null),this._panelHeightSyncRaf!==null&&(window.cancelAnimationFrame(this._panelHeightSyncRaf),this._panelHeightSyncRaf=null),this._panelPlacementRaf!==null&&(window.cancelAnimationFrame(this._panelPlacementRaf),this._panelPlacementRaf=null),this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),super.disconnectedCallback()}firstUpdated(e){super.firstUpdated(e),this._syncSlottedMenu(),this._applyPanelVars(),this._applyPanelSizing(),this._applyChevronState(),this._applyInertByOpen(),this._setupPanelResizeObserver(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen(),this._syncPanelPopover()}updated(e){super.updated(e),e.has(`menuGap`)&&this._applyPanelVars(),(e.has(`width`)||e.has(`minWidth`)||e.has(`maxWidth`))&&this._applyPanelSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing(),e.has(`open`)&&(this.open||this._closeAllSubMenus(),this._syncSlottedMenuOpen(),this._applyChevronState(),this._applyInertByOpen(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen(),this._syncPanelPopover(),this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}})))}_applyPanelVars(){if(this.menuGap==null||String(this.menuGap).trim()===``){this.style.removeProperty(`--scb-dropdown-panel-gap`);return}this.style.setProperty(`--scb-dropdown-panel-gap`,this._mapSpacingToken(this.menuGap))}_applyPanelSizing(){let e=this.renderRoot.querySelector(`.panel-surface`);e&&(this.width&&String(this.width).trim()!==``?e.style.inlineSize=this.width:e.style.removeProperty(`inline-size`),this.minWidth&&String(this.minWidth).trim()!==``?e.style.minInlineSize=this.minWidth:e.style.removeProperty(`min-inline-size`),this.maxWidth&&String(this.maxWidth).trim()!==``?e.style.maxInlineSize=this.maxWidth:e.style.removeProperty(`max-inline-size`)),this._slottedMenuEl&&(this.width&&String(this.width).trim()!==``?this._slottedMenuEl.style.inlineSize=this.width:this._slottedMenuEl.style.removeProperty(`inline-size`),this.minWidth&&String(this.minWidth).trim()!==``?this._slottedMenuEl.style.minInlineSize=this.minWidth:this._slottedMenuEl.style.removeProperty(`min-inline-size`),this.maxWidth&&String(this.maxWidth).trim()!==``?this._slottedMenuEl.style.maxInlineSize=this.maxWidth:this._slottedMenuEl.style.removeProperty(`max-inline-size`)),this._schedulePanelHeightSync()}_setupPanelResizeObserver(){if(this._panelResizeObserver||typeof ResizeObserver>`u`)return;let e=this._panelInnerEl;e&&(this._panelResizeObserver=new ResizeObserver(()=>{this._schedulePanelHeightSync()}),this._panelResizeObserver.observe(e))}_schedulePanelHeightSync(){this._panelHeightSyncRaf===null&&(this._panelHeightSyncRaf=window.requestAnimationFrame(()=>{this._panelHeightSyncRaf=null,this._syncPanelMaxHeightByOpen()}))}_schedulePanelPlacement(){this._panelPlacementRaf===null&&(this._panelPlacementRaf=window.requestAnimationFrame(()=>{this._panelPlacementRaf=null,this._positionPanelInViewport()}))}_syncPanelPopover(){let e=this.renderRoot.querySelector(`.panel`);if(!e)return;if(this.open){_l(e)&&this._schedulePanelPlacement();return}let t=()=>{this._panelSurfaceEl?.style.removeProperty(`--scb-dropdown-panel-viewport-max-height`),e.style.removeProperty(`position`),e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`top`),e.style.removeProperty(`bottom`),e.style.removeProperty(`width`)};yl(e)?vl(e,t,this._panelSurfaceEl??e):(z(e),t())}_positionPanelInViewport(){let e=this.renderRoot.querySelector(`.panel`),t=this._triggerEl;if(!e||!t||!yl(e))return;let n=this._panelSurfaceEl,r=t.getBoundingClientRect(),i=n?.getBoundingClientRect(),a=Number.parseFloat(getComputedStyle(this).getPropertyValue(`--scb-dropdown-panel-gap`)),o=Number.isFinite(a)?a:8,s=Math.max(0,window.innerWidth-16),c=n?getComputedStyle(n):null,l=c?[c.paddingInlineStart,c.paddingInlineEnd].map(e=>Number.parseFloat(e)).filter(Number.isFinite).reduce((e,t)=>e+t,0):0,u=(this._panelInnerEl?.scrollWidth||0)+l,d=Number.parseFloat(c?.maxWidth??``),f=this.width?0:Math.min(u,Number.isFinite(d)?d:u),p=Math.max(i?.width||0,n?.scrollWidth||0,f,r.width),m=Math.min(Math.max(r.width,p),s),h=Math.min(Math.max(r.left,8),window.innerWidth-8-m);e.style.position=`fixed`,e.style.left=`${Math.round(h)}px`,e.style.right=`auto`,e.style.width=`${Math.round(m)}px`;let g=window.innerHeight-r.bottom-o-8,ee=r.top-o-8,te=(n?.scrollHeight||i?.height||0)>g&&ee>g,ne=Math.max(0,te?ee:g);n?.style.setProperty(`--scb-dropdown-panel-viewport-max-height`,`${Math.floor(ne)}px`),te?(e.style.top=`auto`,e.style.bottom=`${Math.round(window.innerHeight-r.top+o)}px`):(e.style.top=`${Math.round(r.bottom+o)}px`,e.style.bottom=`auto`)}_syncPanelMaxHeightByOpen(){let e=this._panelSurfaceEl;if(!e)return;if(this._slottedMenuEl){e.style.removeProperty(`--scb-dropdown-panel-current-max-height`);return}if(!this.open){e.style.setProperty(`--scb-dropdown-panel-current-max-height`,`0px`);return}let t=this._panelInnerEl;if(!t)return;let n=getComputedStyle(e),r=(Number.parseFloat(n.paddingTop)||0)+(Number.parseFloat(n.paddingBottom)||0),i=`${Math.ceil(t.scrollHeight+r)}px`;e.style.getPropertyValue(`--scb-dropdown-panel-current-max-height`).trim()!==i&&(e.style.setProperty(`--scb-dropdown-panel-current-max-height`,i),this._schedulePanelPlacement())}_mapSpacingToken(e){let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_mapHostSpacingToken(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._mapHostSpacingToken(this.spacing),t=this._mapHostSpacingToken(this.spacingTop)??e,n=this._mapHostSpacingToken(this.spacingBottom)??e,r=this._mapHostSpacingToken(this.spacingLeft),i=this._mapHostSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-dropdown-spacing-block-start`,t):this.style.removeProperty(`--scb-dropdown-spacing-block-start`),n?this.style.setProperty(`--scb-dropdown-spacing-block-end`,n):this.style.removeProperty(`--scb-dropdown-spacing-block-end`),r?this.style.setProperty(`--scb-dropdown-spacing-inline-start`,r):this.style.removeProperty(`--scb-dropdown-spacing-inline-start`),i?this.style.setProperty(`--scb-dropdown-spacing-inline-end`,i):this.style.removeProperty(`--scb-dropdown-spacing-inline-end`)}_syncSlottedMenu(){let e=(this._slotEl?.assignedElements({flatten:!0})??[]).find(e=>e.tagName.toLowerCase()===`scb-options-menu`);if(e===this._slottedMenuEl){this._syncSlottedMenuOpen();return}this._detachSlottedMenuListeners(),this._slottedMenuEl=e??null,this._slottedMenuEl&&(this._slottedMenuEl.addEventListener(`open`,this._onSlottedMenuOpen),this._slottedMenuEl.addEventListener(`close`,this._onSlottedMenuClose),this._syncSlottedMenuOpen())}_detachSlottedMenuListeners(){this._slottedMenuEl&&(this._slottedMenuEl.removeEventListener(`open`,this._onSlottedMenuOpen),this._slottedMenuEl.removeEventListener(`close`,this._onSlottedMenuClose))}_syncSlottedMenuOpen(){if(!this._slottedMenuEl)return;if(this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),this.open){this._slottedMenuEl.open=!0;return}let e=this._getPanelTransitionMs();if(e<=0){this._slottedMenuEl.open=!1;return}this._menuCloseTimer=window.setTimeout(()=>{this._menuCloseTimer=null,!this.open&&this._slottedMenuEl&&(this._slottedMenuEl.open=!1)},e)}_syncOverflowVisibilityByOpen(){if(this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this.removeAttribute(`data-open-settled`),!this.open)return;let e=this.renderRoot.querySelector(`.panel-surface`);if(!e){this.setAttribute(`data-open-settled`,``);return}let t=this._getTransitionMs(e);if(t<=0){this.setAttribute(`data-open-settled`,``);return}this._openSettledTimer=window.setTimeout(()=>{this._openSettledTimer=null,this.open&&this.setAttribute(`data-open-settled`,``)},t)}_getPanelTransitionMs(){let e=this.renderRoot.querySelector(`.panel-surface`);return e?this._getTransitionMs(e):0}_getTransitionMs(e){let t=getComputedStyle(e),n=t.transitionDuration.split(`,`).map(e=>e.trim()),r=t.transitionDelay.split(`,`).map(e=>e.trim()),i=e=>{let t=parseFloat(e);return Number.isFinite(t)?e.endsWith(`ms`)?t:e.endsWith(`s`)?t*1e3:t:0},a=Math.max(n.length,r.length),o=0;for(let e=0;e<a;e+=1){let t=i(n[e]??n[n.length-1]??`0s`),a=i(r[e]??r[r.length-1]??`0s`);o=Math.max(o,t+a)}return Math.ceil(o)}_applyInertByOpen(){let e=this.renderRoot.querySelector(`.panel`);e&&(this.open?(e.removeAttribute(`inert`),e.setAttribute(`aria-hidden`,`false`),this._restoreTabIndexesIfNeeded()):(e.setAttribute(`inert`,``),e.setAttribute(`aria-hidden`,`true`),this._removeTabIndexesIfNeeded()))}_supportsInert(){return`inert`in HTMLElement.prototype}_collectFocusableFromSlot(){let e=this._slotEl;if(!e)return[];let t=e.assignedElements({flatten:!0}),n=[],r=e=>{e instanceof HTMLElement&&e.matches(`a,button,input,select,textarea,[tabindex]`)&&n.push(e)};return t.forEach(e=>{r(e),e.querySelectorAll?.(`a,button,input,select,textarea,[tabindex]`).forEach(e=>r(e))}),n}_removeTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(e=>{let t=e.getAttribute(`tabindex`);t!==null&&e.setAttribute(`data-scb-prev-tabindex`,t),e.setAttribute(`tabindex`,`-1`)})}_restoreTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(e=>{let t=e.getAttribute(`data-scb-prev-tabindex`);t===null?e.removeAttribute(`tabindex`):(e.setAttribute(`tabindex`,t),e.removeAttribute(`data-scb-prev-tabindex`))})}_closeAllSubMenus(){let e=this.querySelectorAll(`scb-options-sub-menu`);for(let t of e)t.removeAttribute(`open`)}focus(e){let t=this._triggerEl;if(t?.focus){t.focus(e);return}super.focus(e)}_applyChevronState(){if(this.hasAttribute(`as-tab`))return;let e=this._ensureTriggerChevronEl();e&&(e.open=this.open)}_ensureTriggerChevronEl(){let e=this._triggerEl;if(e?.tagName?.toLowerCase?.()!==`scb-button`)return null;let t=e?.shadowRoot;if(!t)return null;let n=t.querySelector(`scb-chevron[slot="icon"]`);if(n)return n;let r=t.querySelector(`md-icon[slot="icon"]`)??t.querySelector(`md-icon`);if(!r)return null;let i=document.createElement(`scb-chevron`);i.setAttribute(`slot`,`icon`),i.setAttribute(`aria-hidden`,`true`),i.classList.add(`chevron`);let a=getComputedStyle(r).fontSize;return a&&i.style.setProperty(`--scb-chevron-size`,a),r.replaceWith(i),i}render(){let e=!!this._slottedMenuEl,t=this.hasAttribute(`as-tab`),n=this.dataIndex,r=this.ariaCurrent===`page`?`page`:S;return x`
11440
+ `}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this._onDocumentClickBound,!0),document.addEventListener(`keydown`,this._onDocumentKeydownBound),window.addEventListener(`resize`,this._onViewportChange,{passive:!0}),window.addEventListener(`scroll`,this._onViewportChange,{passive:!0,capture:!0})}disconnectedCallback(){document.removeEventListener(`click`,this._onDocumentClickBound,!0),document.removeEventListener(`keydown`,this._onDocumentKeydownBound),window.removeEventListener(`resize`,this._onViewportChange),window.removeEventListener(`scroll`,this._onViewportChange,!0),this._detachSlottedMenuListeners(),R(this.renderRoot.querySelector(`.panel`)),this._panelResizeObserver&&=(this._panelResizeObserver.disconnect(),null),this._panelHeightSyncRaf!==null&&(window.cancelAnimationFrame(this._panelHeightSyncRaf),this._panelHeightSyncRaf=null),this._panelPlacementRaf!==null&&(window.cancelAnimationFrame(this._panelPlacementRaf),this._panelPlacementRaf=null),this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),super.disconnectedCallback()}firstUpdated(e){super.firstUpdated(e),this._syncSlottedMenu(),this._applyPanelVars(),this._applyPanelSizing(),this._applyChevronState(),this._applyInertByOpen(),this._setupPanelResizeObserver(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen(),this._syncPanelPopover()}updated(e){super.updated(e),e.has(`menuGap`)&&this._applyPanelVars(),(e.has(`width`)||e.has(`minWidth`)||e.has(`maxWidth`))&&this._applyPanelSizing(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing(),e.has(`open`)&&(this.open||this._closeAllSubMenus(),this._syncSlottedMenuOpen(),this._applyChevronState(),this._applyInertByOpen(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen(),this._syncPanelPopover(),this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}})))}_applyPanelVars(){if(this.menuGap==null||String(this.menuGap).trim()===``){this.style.removeProperty(`--scb-dropdown-panel-gap`);return}this.style.setProperty(`--scb-dropdown-panel-gap`,this._mapSpacingToken(this.menuGap))}_applyPanelSizing(){let e=this.renderRoot.querySelector(`.panel-surface`);e&&(this.width&&String(this.width).trim()!==``?e.style.inlineSize=this.width:e.style.removeProperty(`inline-size`),this.minWidth&&String(this.minWidth).trim()!==``?e.style.minInlineSize=this.minWidth:e.style.removeProperty(`min-inline-size`),this.maxWidth&&String(this.maxWidth).trim()!==``?e.style.maxInlineSize=this.maxWidth:e.style.removeProperty(`max-inline-size`)),this._slottedMenuEl&&(this.width&&String(this.width).trim()!==``?this._slottedMenuEl.style.inlineSize=this.width:this._slottedMenuEl.style.removeProperty(`inline-size`),this.minWidth&&String(this.minWidth).trim()!==``?this._slottedMenuEl.style.minInlineSize=this.minWidth:this._slottedMenuEl.style.removeProperty(`min-inline-size`),this.maxWidth&&String(this.maxWidth).trim()!==``?this._slottedMenuEl.style.maxInlineSize=this.maxWidth:this._slottedMenuEl.style.removeProperty(`max-inline-size`)),this._schedulePanelHeightSync()}_setupPanelResizeObserver(){if(this._panelResizeObserver||typeof ResizeObserver>`u`)return;let e=this._panelInnerEl;e&&(this._panelResizeObserver=new ResizeObserver(()=>{this._schedulePanelHeightSync()}),this._panelResizeObserver.observe(e))}_schedulePanelHeightSync(){this._panelHeightSyncRaf===null&&(this._panelHeightSyncRaf=window.requestAnimationFrame(()=>{this._panelHeightSyncRaf=null,this._syncPanelMaxHeightByOpen()}))}_schedulePanelPlacement(){this._panelPlacementRaf===null&&(this._panelPlacementRaf=window.requestAnimationFrame(()=>{this._panelPlacementRaf=null,this._positionPanelInViewport()}))}_syncPanelPopover(){let e=this.renderRoot.querySelector(`.panel`);if(!e)return;if(this.open){vl(e)&&this._schedulePanelPlacement();return}let t=()=>{this._panelSurfaceEl?.style.removeProperty(`--scb-dropdown-panel-viewport-max-height`),e.style.removeProperty(`position`),e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`top`),e.style.removeProperty(`bottom`),e.style.removeProperty(`width`)};bl(e)?yl(e,t,this._panelSurfaceEl??e):(R(e),t())}_positionPanelInViewport(){let e=this.renderRoot.querySelector(`.panel`),t=this._triggerEl;if(!e||!t||!bl(e))return;let n=this._panelSurfaceEl,r=t.getBoundingClientRect(),i=n?.getBoundingClientRect(),a=Number.parseFloat(getComputedStyle(this).getPropertyValue(`--scb-dropdown-panel-gap`)),o=Number.isFinite(a)?a:8,s=Math.max(0,window.innerWidth-16),c=n?getComputedStyle(n):null,l=c?[c.paddingInlineStart,c.paddingInlineEnd].map(e=>Number.parseFloat(e)).filter(Number.isFinite).reduce((e,t)=>e+t,0):0,u=(this._panelInnerEl?.scrollWidth||0)+l,d=Number.parseFloat(c?.maxWidth??``),f=this.width?0:Math.min(u,Number.isFinite(d)?d:u),p=Math.max(i?.width||0,n?.scrollWidth||0,f,r.width),m=Math.min(Math.max(r.width,p),s),h=Math.min(Math.max(r.left,8),window.innerWidth-8-m);e.style.position=`fixed`,e.style.left=`${Math.round(h)}px`,e.style.right=`auto`,e.style.width=`${Math.round(m)}px`;let g=window.innerHeight-r.bottom-o-8,ee=r.top-o-8,te=(n?.scrollHeight||i?.height||0)>g&&ee>g,ne=Math.max(0,te?ee:g);n?.style.setProperty(`--scb-dropdown-panel-viewport-max-height`,`${Math.floor(ne)}px`),te?(e.style.top=`auto`,e.style.bottom=`${Math.round(window.innerHeight-r.top+o)}px`):(e.style.top=`${Math.round(r.bottom+o)}px`,e.style.bottom=`auto`)}_syncPanelMaxHeightByOpen(){let e=this._panelSurfaceEl;if(!e)return;if(this._slottedMenuEl){e.style.removeProperty(`--scb-dropdown-panel-current-max-height`);return}if(!this.open){e.style.setProperty(`--scb-dropdown-panel-current-max-height`,`0px`);return}let t=this._panelInnerEl;if(!t)return;let n=getComputedStyle(e),r=(Number.parseFloat(n.paddingTop)||0)+(Number.parseFloat(n.paddingBottom)||0),i=`${Math.ceil(t.scrollHeight+r)}px`;e.style.getPropertyValue(`--scb-dropdown-panel-current-max-height`).trim()!==i&&(e.style.setProperty(`--scb-dropdown-panel-current-max-height`,i),this._schedulePanelPlacement())}_mapSpacingToken(e){let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_mapHostSpacingToken(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._mapHostSpacingToken(this.spacing),t=this._mapHostSpacingToken(this.spacingTop)??e,n=this._mapHostSpacingToken(this.spacingBottom)??e,r=this._mapHostSpacingToken(this.spacingLeft),i=this._mapHostSpacingToken(this.spacingRight);t?this.style.setProperty(`--scb-dropdown-spacing-block-start`,t):this.style.removeProperty(`--scb-dropdown-spacing-block-start`),n?this.style.setProperty(`--scb-dropdown-spacing-block-end`,n):this.style.removeProperty(`--scb-dropdown-spacing-block-end`),r?this.style.setProperty(`--scb-dropdown-spacing-inline-start`,r):this.style.removeProperty(`--scb-dropdown-spacing-inline-start`),i?this.style.setProperty(`--scb-dropdown-spacing-inline-end`,i):this.style.removeProperty(`--scb-dropdown-spacing-inline-end`)}_syncSlottedMenu(){let e=(this._slotEl?.assignedElements({flatten:!0})??[]).find(e=>e.tagName.toLowerCase()===`scb-options-menu`);if(e===this._slottedMenuEl){this._syncSlottedMenuOpen();return}this._detachSlottedMenuListeners(),this._slottedMenuEl=e??null,this._slottedMenuEl&&(this._slottedMenuEl.addEventListener(`open`,this._onSlottedMenuOpen),this._slottedMenuEl.addEventListener(`close`,this._onSlottedMenuClose),this._syncSlottedMenuOpen())}_detachSlottedMenuListeners(){this._slottedMenuEl&&(this._slottedMenuEl.removeEventListener(`open`,this._onSlottedMenuOpen),this._slottedMenuEl.removeEventListener(`close`,this._onSlottedMenuClose))}_syncSlottedMenuOpen(){if(!this._slottedMenuEl)return;if(this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),this.open){this._slottedMenuEl.open=!0;return}let e=this._getPanelTransitionMs();if(e<=0){this._slottedMenuEl.open=!1;return}this._menuCloseTimer=window.setTimeout(()=>{this._menuCloseTimer=null,!this.open&&this._slottedMenuEl&&(this._slottedMenuEl.open=!1)},e)}_syncOverflowVisibilityByOpen(){if(this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this.removeAttribute(`data-open-settled`),!this.open)return;let e=this.renderRoot.querySelector(`.panel-surface`);if(!e){this.setAttribute(`data-open-settled`,``);return}let t=this._getTransitionMs(e);if(t<=0){this.setAttribute(`data-open-settled`,``);return}this._openSettledTimer=window.setTimeout(()=>{this._openSettledTimer=null,this.open&&this.setAttribute(`data-open-settled`,``)},t)}_getPanelTransitionMs(){let e=this.renderRoot.querySelector(`.panel-surface`);return e?this._getTransitionMs(e):0}_getTransitionMs(e){let t=getComputedStyle(e),n=t.transitionDuration.split(`,`).map(e=>e.trim()),r=t.transitionDelay.split(`,`).map(e=>e.trim()),i=e=>{let t=parseFloat(e);return Number.isFinite(t)?e.endsWith(`ms`)?t:e.endsWith(`s`)?t*1e3:t:0},a=Math.max(n.length,r.length),o=0;for(let e=0;e<a;e+=1){let t=i(n[e]??n[n.length-1]??`0s`),a=i(r[e]??r[r.length-1]??`0s`);o=Math.max(o,t+a)}return Math.ceil(o)}_applyInertByOpen(){let e=this.renderRoot.querySelector(`.panel`);e&&(this.open?(e.removeAttribute(`inert`),e.setAttribute(`aria-hidden`,`false`),this._restoreTabIndexesIfNeeded()):(e.setAttribute(`inert`,``),e.setAttribute(`aria-hidden`,`true`),this._removeTabIndexesIfNeeded()))}_supportsInert(){return`inert`in HTMLElement.prototype}_collectFocusableFromSlot(){let e=this._slotEl;if(!e)return[];let t=e.assignedElements({flatten:!0}),n=[],r=e=>{e instanceof HTMLElement&&e.matches(`a,button,input,select,textarea,[tabindex]`)&&n.push(e)};return t.forEach(e=>{r(e),e.querySelectorAll?.(`a,button,input,select,textarea,[tabindex]`).forEach(e=>r(e))}),n}_removeTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(e=>{let t=e.getAttribute(`tabindex`);t!==null&&e.setAttribute(`data-scb-prev-tabindex`,t),e.setAttribute(`tabindex`,`-1`)})}_restoreTabIndexesIfNeeded(){this._supportsInert()||this._collectFocusableFromSlot().forEach(e=>{let t=e.getAttribute(`data-scb-prev-tabindex`);t===null?e.removeAttribute(`tabindex`):(e.setAttribute(`tabindex`,t),e.removeAttribute(`data-scb-prev-tabindex`))})}_closeAllSubMenus(){let e=this.querySelectorAll(`scb-options-sub-menu`);for(let t of e)t.removeAttribute(`open`)}focus(e){let t=this._triggerEl;if(t?.focus){t.focus(e);return}super.focus(e)}_applyChevronState(){if(this.hasAttribute(`as-tab`))return;let e=this._ensureTriggerChevronEl();e&&(e.open=this.open)}_ensureTriggerChevronEl(){let e=this._triggerEl;if(e?.tagName?.toLowerCase?.()!==`scb-button`)return null;let t=e?.shadowRoot;if(!t)return null;let n=t.querySelector(`scb-chevron[slot="icon"]`);if(n)return n;let r=t.querySelector(`md-icon[slot="icon"]`)??t.querySelector(`md-icon`);if(!r)return null;let i=document.createElement(`scb-chevron`);i.setAttribute(`slot`,`icon`),i.setAttribute(`aria-hidden`,`true`),i.classList.add(`chevron`);let a=getComputedStyle(r).fontSize;return a&&i.style.setProperty(`--scb-chevron-size`,a),r.replaceWith(i),i}render(){let e=!!this._slottedMenuEl,t=this.hasAttribute(`as-tab`),n=this.dataIndex,r=this.ariaCurrent===`page`?`page`:S;return x`
11441
11441
  ${t?x`
11442
11442
  <div class="tab-wrap">
11443
11443
  <button
@@ -11483,7 +11483,7 @@
11483
11483
  </div>
11484
11484
  </div>
11485
11485
  </div>
11486
- `}},N([_({type:String})],Y.prototype,`label`,void 0),N([_({type:String})],Y.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Y.prototype,`size`,void 0),N([_({type:Boolean,reflect:!0})],Y.prototype,`open`,void 0),N([_({type:Boolean,reflect:!0})],Y.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Y.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Y.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Y.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Y.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Y.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`menu-gap`})],Y.prototype,`menuGap`,void 0),N([_({type:String})],Y.prototype,`width`,void 0),N([_({type:String,attribute:`min-width`})],Y.prototype,`minWidth`,void 0),N([_({type:String,attribute:`max-width`})],Y.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`data-index`})],Y.prototype,`dataIndex`,void 0),N([_({type:String,attribute:`aria-current`})],Y.prototype,`ariaCurrent`,void 0),N([y(`[data-scb-dropdown-trigger]`)],Y.prototype,`_triggerEl`,void 0),N([y(`slot`)],Y.prototype,`_slotEl`,void 0),N([y(`.panel-surface`)],Y.prototype,`_panelSurfaceEl`,void 0),N([y(`.panel-inner`)],Y.prototype,`_panelInnerEl`,void 0),Y=N([a(`scb-dropdown`)],Y)}));vd(),w(),b(),P();var yd=class extends C{constructor(...e){super(...e),this.title=``,this.factCardTitle=``,this.subtitle=``,this.supportingText=``,this.__slotPresenceSignature=``,this.__onSlotChange=()=>{[this.__hasSlotContent(`heading`),this.__hasSlotContent(`subtitle`),this.__hasSlotContent(`supporting-text`),this.__hasSlotContent(`default`)].join(`:`)!==this.__slotPresenceSignature&&this.requestUpdate()}}get#e(){return this.factCardTitle||this.title}static{this.styles=p`
11486
+ `}},N([_({type:String})],J.prototype,`label`,void 0),N([_({type:String})],J.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],J.prototype,`size`,void 0),N([_({type:Boolean,reflect:!0})],J.prototype,`open`,void 0),N([_({type:Boolean,reflect:!0})],J.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],J.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],J.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],J.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],J.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],J.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`menu-gap`})],J.prototype,`menuGap`,void 0),N([_({type:String})],J.prototype,`width`,void 0),N([_({type:String,attribute:`min-width`})],J.prototype,`minWidth`,void 0),N([_({type:String,attribute:`max-width`})],J.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`data-index`})],J.prototype,`dataIndex`,void 0),N([_({type:String,attribute:`aria-current`})],J.prototype,`ariaCurrent`,void 0),N([y(`[data-scb-dropdown-trigger]`)],J.prototype,`_triggerEl`,void 0),N([y(`slot`)],J.prototype,`_slotEl`,void 0),N([y(`.panel-surface`)],J.prototype,`_panelSurfaceEl`,void 0),N([y(`.panel-inner`)],J.prototype,`_panelInnerEl`,void 0),J=N([a(`scb-dropdown`)],J)}));yd(),w(),b(),P();var bd=class extends C{constructor(...e){super(...e),this.title=``,this.factCardTitle=``,this.subtitle=``,this.supportingText=``,this.__slotPresenceSignature=``,this.__onSlotChange=()=>{[this.__hasSlotContent(`heading`),this.__hasSlotContent(`subtitle`),this.__hasSlotContent(`supporting-text`),this.__hasSlotContent(`default`)].join(`:`)!==this.__slotPresenceSignature&&this.requestUpdate()}}get#e(){return this.factCardTitle||this.title}static{this.styles=p`
11487
11487
  /*
11488
11488
  Designbrygga:
11489
11489
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -11664,7 +11664,7 @@
11664
11664
  <div class="content links" ?hidden=${!o}>
11665
11665
  <slot @slotchange=${this.__onSlotChange}></slot>
11666
11666
  </div>
11667
- `}__hasSlotContent(e){return Array.from(this.childNodes).some(t=>t.nodeType===Node.TEXT_NODE?e==="default"&&!!t.textContent?.trim():t instanceof Element&&(t.getAttribute(`slot`)||`default`)===e)}};N([_({type:String,reflect:!0,attribute:`title`})],yd.prototype,`title`,void 0),N([_({type:String,reflect:!0,attribute:`fact-card-title`})],yd.prototype,`factCardTitle`,void 0),N([_({type:String,reflect:!0,attribute:`subtitle`})],yd.prototype,`subtitle`,void 0),N([_({type:String,reflect:!0,attribute:`supporting-text`})],yd.prototype,`supportingText`,void 0),yd=N([a(`scb-fact-card-content`)],yd),w(),b(),al(),dl(),cc(),P();var bd,xd={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Sd=class extends C{static{bd=this}constructor(...e){super(...e),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant=`filled`,this.title=``,this.subtitle=``,this.supportingText=``,this.icon=``,this.showCloseButton=!1,this.closeLabel=`Stäng faktakort`,this.__hasIconSlot=!1,this.open=!0,this.__lastTriggerEl=null,this.sizing=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__onIconSlotChange=()=>{let e=this.renderRoot.querySelector(`slot[name="icon"]`);this.__hasIconSlot=!!e?.assignedNodes({flatten:!0}).some(e=>e.nodeType!==Node.TEXT_NODE||!!e.textContent?.trim())}}static{this.__iconLoaded=!1}static{this.__instances=new Map}static{this.__docListenerAttached=!1}static __handleDocClick(e){let t=e.composedPath();for(let e of t){if(!(e instanceof Element))continue;let t=e.getAttribute(`data-fact-card-toggle`)||e.getAttribute(`aria-controls`);if(!t)continue;let n=bd.__instances.get(t);if(!n){bd.__instances.delete(t);continue}n.__lastTriggerEl=e,n.__setOpen(!n.open);break}}static __ensureDocListener(){bd.__docListenerAttached||(document.addEventListener(`click`,bd.__handleDocClick,!0),bd.__docListenerAttached=!0)}static __maybeRemoveDocListener(){bd.__docListenerAttached&&bd.__instances.size===0&&(document.removeEventListener(`click`,bd.__handleDocClick,!0),bd.__docListenerAttached=!1)}connectedCallback(){super.connectedCallback(),this.id&&bd.__instances.set(this.id,this),bd.__ensureDocListener()}disconnectedCallback(){this.id&&bd.__instances.delete(this.id),bd.__maybeRemoveDocListener(),super.disconnectedCallback()}updated(e){e.has(`open`)&&this.__updateTriggersExpanded(),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(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute(`aria-controls`)&&e.setAttribute(`aria-expanded`,String(this.open))})}__setOpen(e){let t=this.open;t!==e&&(this.open=e,this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}})),e&&!t?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):!e&&t&&this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))}static{this.styles=p`
11667
+ `}__hasSlotContent(e){return Array.from(this.childNodes).some(t=>t.nodeType===Node.TEXT_NODE?e==="default"&&!!t.textContent?.trim():t instanceof Element&&(t.getAttribute(`slot`)||`default`)===e)}};N([_({type:String,reflect:!0,attribute:`title`})],bd.prototype,`title`,void 0),N([_({type:String,reflect:!0,attribute:`fact-card-title`})],bd.prototype,`factCardTitle`,void 0),N([_({type:String,reflect:!0,attribute:`subtitle`})],bd.prototype,`subtitle`,void 0),N([_({type:String,reflect:!0,attribute:`supporting-text`})],bd.prototype,`supportingText`,void 0),bd=N([a(`scb-fact-card-content`)],bd),w(),b(),sl(),fl(),cc(),P();var xd,Sd={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Cd=class extends C{static{xd=this}constructor(...e){super(...e),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant=`filled`,this.title=``,this.subtitle=``,this.supportingText=``,this.icon=``,this.showCloseButton=!1,this.closeLabel=`Stäng faktakort`,this.__hasIconSlot=!1,this.open=!0,this.__lastTriggerEl=null,this.sizing=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__onIconSlotChange=()=>{let e=this.renderRoot.querySelector(`slot[name="icon"]`);this.__hasIconSlot=!!e?.assignedNodes({flatten:!0}).some(e=>e.nodeType!==Node.TEXT_NODE||!!e.textContent?.trim())}}static{this.__iconLoaded=!1}static{this.__instances=new Map}static{this.__docListenerAttached=!1}static __handleDocClick(e){let t=e.composedPath();for(let e of t){if(!(e instanceof Element))continue;let t=e.getAttribute(`data-fact-card-toggle`)||e.getAttribute(`aria-controls`);if(!t)continue;let n=xd.__instances.get(t);if(!n){xd.__instances.delete(t);continue}n.__lastTriggerEl=e,n.__setOpen(!n.open);break}}static __ensureDocListener(){xd.__docListenerAttached||(document.addEventListener(`click`,xd.__handleDocClick,!0),xd.__docListenerAttached=!0)}static __maybeRemoveDocListener(){xd.__docListenerAttached&&xd.__instances.size===0&&(document.removeEventListener(`click`,xd.__handleDocClick,!0),xd.__docListenerAttached=!1)}connectedCallback(){super.connectedCallback(),this.id&&xd.__instances.set(this.id,this),xd.__ensureDocListener()}disconnectedCallback(){this.id&&xd.__instances.delete(this.id),xd.__maybeRemoveDocListener(),super.disconnectedCallback()}updated(e){e.has(`open`)&&this.__updateTriggersExpanded(),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(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute(`aria-controls`)&&e.setAttribute(`aria-expanded`,String(this.open))})}__setOpen(e){let t=this.open;t!==e&&(this.open=e,this.dispatchEvent(new CustomEvent(`openchange`,{bubbles:!0,composed:!0,detail:{open:this.open}})),e&&!t?this.dispatchEvent(new CustomEvent(`open`,{bubbles:!0,composed:!0})):!e&&t&&this.dispatchEvent(new CustomEvent(`close`,{bubbles:!0,composed:!0})))}static{this.styles=p`
11668
11668
  /*
11669
11669
  Designbrygga:
11670
11670
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -11936,9 +11936,9 @@
11936
11936
  </div>
11937
11937
  </div>
11938
11938
  </div>
11939
- `}async firstUpdated(){this.#e(),bd.__iconLoaded||(await Promise.resolve().then(()=>(D(),zi)),bd.__iconLoaded=!0)}__hasLightDomSlot(e){return Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}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}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-fact-card-spacing-block-start`,a):this.style.removeProperty(`--scb-fact-card-spacing-block-start`),o?this.style.setProperty(`--scb-fact-card-spacing-block-end`,o):this.style.removeProperty(`--scb-fact-card-spacing-block-end`),r?this.style.setProperty(`--scb-fact-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-fact-card-spacing-inline-start`),i?this.style.setProperty(`--scb-fact-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-fact-card-spacing-inline-end`)}};N([_({type:String})],Sd.prototype,`variant`,void 0),N([_({type:String,attribute:`title`})],Sd.prototype,`title`,void 0),N([_({type:String,attribute:`subtitle`})],Sd.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],Sd.prototype,`supportingText`,void 0),N([_({type:String})],Sd.prototype,`icon`,void 0),N([_({type:Boolean,attribute:`show-close-button`})],Sd.prototype,`showCloseButton`,void 0),N([_({type:String,attribute:`close-label`})],Sd.prototype,`closeLabel`,void 0),N([v()],Sd.prototype,`__hasIconSlot`,void 0),N([_({type:Boolean,reflect:!0})],Sd.prototype,`open`,void 0),N([_({type:String,reflect:!0,converter:xd})],Sd.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Sd.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Sd.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],Sd.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],Sd.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0})],Sd.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Sd.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Sd.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Sd.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Sd.prototype,`spacingRight`,void 0),Sd=bd=N([a(`scb-fact-card`)],Sd),w(),b(),P();var Cd=class extends C{constructor(...e){super(...e),this.title=``}static{this.styles=p`
11939
+ `}async firstUpdated(){this.#e(),xd.__iconLoaded||(await Promise.resolve().then(()=>(D(),zi)),xd.__iconLoaded=!0)}__hasLightDomSlot(e){return Array.from(this.children).some(t=>t.getAttribute(`slot`)===e)}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}#e(){let e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop),n=this.mapSpacingToken(this.spacingBottom),r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight),a=t??e,o=n??e;a?this.style.setProperty(`--scb-fact-card-spacing-block-start`,a):this.style.removeProperty(`--scb-fact-card-spacing-block-start`),o?this.style.setProperty(`--scb-fact-card-spacing-block-end`,o):this.style.removeProperty(`--scb-fact-card-spacing-block-end`),r?this.style.setProperty(`--scb-fact-card-spacing-inline-start`,r):this.style.removeProperty(`--scb-fact-card-spacing-inline-start`),i?this.style.setProperty(`--scb-fact-card-spacing-inline-end`,i):this.style.removeProperty(`--scb-fact-card-spacing-inline-end`)}};N([_({type:String})],Cd.prototype,`variant`,void 0),N([_({type:String,attribute:`title`})],Cd.prototype,`title`,void 0),N([_({type:String,attribute:`subtitle`})],Cd.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],Cd.prototype,`supportingText`,void 0),N([_({type:String})],Cd.prototype,`icon`,void 0),N([_({type:Boolean,attribute:`show-close-button`})],Cd.prototype,`showCloseButton`,void 0),N([_({type:String,attribute:`close-label`})],Cd.prototype,`closeLabel`,void 0),N([v()],Cd.prototype,`__hasIconSlot`,void 0),N([_({type:Boolean,reflect:!0})],Cd.prototype,`open`,void 0),N([_({type:String,reflect:!0,converter:Sd})],Cd.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Cd.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Cd.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],Cd.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],Cd.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0})],Cd.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Cd.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Cd.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Cd.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Cd.prototype,`spacingRight`,void 0),Cd=xd=N([a(`scb-fact-card`)],Cd),w(),b(),P();var wd=class extends C{constructor(...e){super(...e),this.title=``}static{this.styles=p`
11940
11940
  :host { display: none; }
11941
- `}render(){return x`<slot></slot>`}};N([_({type:String,reflect:!0})],Cd.prototype,`title`,void 0),Cd=N([a(`scb-footer-section`)],Cd);var wd=n({ScbGridItem:()=>Ed}),Td,Ed,Dd=t((()=>{w(),b(),P(),Td={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Ed=class extends C{constructor(...e){super(...e),this.fit=!1}static{this.styles=p`
11941
+ `}render(){return x`<slot></slot>`}};N([_({type:String,reflect:!0})],wd.prototype,`title`,void 0),wd=N([a(`scb-footer-section`)],wd);var Td=n({ScbGridItem:()=>Dd}),Ed,Dd,Od=t((()=>{w(),b(),P(),Ed={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Dd=class extends C{constructor(...e){super(...e),this.fit=!1}static{this.styles=p`
11942
11942
  :host {
11943
11943
  box-sizing: border-box;
11944
11944
  display: block;
@@ -11969,7 +11969,7 @@
11969
11969
  block-size: 100%;
11970
11970
  inline-size: 100%;
11971
11971
  }
11972
- `}firstUpdated(){this.#e()}updated(){this.#e()}#e(){this.#t(`--col-span`,this.hasAttribute(`col-span`)?String(this.colSpan):null),this.#t(`--col-span-compact`,this.hasAttribute(`col-span-compact`)?String(this.colSpanCompact):null),this.#t(`--col-span-medium`,this.hasAttribute(`col-span-medium`)?String(this.colSpanMedium):null),this.#t(`--col-span-expanded`,this.hasAttribute(`col-span-expanded`)?String(this.colSpanExpanded):null),this.#t(`--row-rule`,this.hasAttribute(`row-span`)?`span ${this.rowSpan}`:null),this.#t(`--row-rule-compact`,this.hasAttribute(`row-span-compact`)?`span ${this.rowSpanCompact}`:null),this.#t(`--row-rule-medium`,this.hasAttribute(`row-span-medium`)?`span ${this.rowSpanMedium}`:null),this.#t(`--row-rule-expanded`,this.hasAttribute(`row-span-expanded`)?`span ${this.rowSpanExpanded}`:null),this.align?(this.style.setProperty(`--scb-grid-item-align`,this.align),this.style.setProperty(`align-self`,this.align)):(this.style.setProperty(`--scb-grid-item-align`,`initial`),this.style.removeProperty(`align-self`)),this.justify?(this.style.setProperty(`--scb-grid-item-justify`,this.justify),this.style.setProperty(`justify-self`,this.justify)):(this.style.setProperty(`--scb-grid-item-justify`,`initial`),this.style.removeProperty(`justify-self`))}#t(e,t){this.style.setProperty(e,t===null||t===``?`initial`:t)}render(){return x`<slot></slot>`}},N([_({type:Number,attribute:`col-span`,reflect:!0})],Ed.prototype,`colSpan`,void 0),N([_({type:Number,attribute:`col-span-compact`,reflect:!0})],Ed.prototype,`colSpanCompact`,void 0),N([_({type:Number,attribute:`col-span-medium`,reflect:!0})],Ed.prototype,`colSpanMedium`,void 0),N([_({type:Number,attribute:`col-span-expanded`,reflect:!0})],Ed.prototype,`colSpanExpanded`,void 0),N([_({type:Number,attribute:`row-span`,reflect:!0})],Ed.prototype,`rowSpan`,void 0),N([_({type:Number,attribute:`row-span-compact`,reflect:!0})],Ed.prototype,`rowSpanCompact`,void 0),N([_({type:Number,attribute:`row-span-medium`,reflect:!0})],Ed.prototype,`rowSpanMedium`,void 0),N([_({type:Number,attribute:`row-span-expanded`,reflect:!0})],Ed.prototype,`rowSpanExpanded`,void 0),N([_({type:String,reflect:!0})],Ed.prototype,`align`,void 0),N([_({type:String,reflect:!0})],Ed.prototype,`justify`,void 0),N([_({type:Boolean,reflect:!0,converter:Td})],Ed.prototype,`fit`,void 0),Ed=N([a(`scb-grid-item`)],Ed)})),Od,kd,Ad=t((()=>{w(),b(),P(),Od={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},kd=class extends C{constructor(...e){super(...e),this.direction=`column`,this.gap=``,this.rowGap=``,this.columnGap=``,this.align=`stretch`,this.justify=`start`,this.wrap=!1,this.inline=!1}static{this.styles=p`
11972
+ `}firstUpdated(){this.#e()}updated(){this.#e()}#e(){this.#t(`--col-span`,this.hasAttribute(`col-span`)?String(this.colSpan):null),this.#t(`--col-span-compact`,this.hasAttribute(`col-span-compact`)?String(this.colSpanCompact):null),this.#t(`--col-span-medium`,this.hasAttribute(`col-span-medium`)?String(this.colSpanMedium):null),this.#t(`--col-span-expanded`,this.hasAttribute(`col-span-expanded`)?String(this.colSpanExpanded):null),this.#t(`--row-rule`,this.hasAttribute(`row-span`)?`span ${this.rowSpan}`:null),this.#t(`--row-rule-compact`,this.hasAttribute(`row-span-compact`)?`span ${this.rowSpanCompact}`:null),this.#t(`--row-rule-medium`,this.hasAttribute(`row-span-medium`)?`span ${this.rowSpanMedium}`:null),this.#t(`--row-rule-expanded`,this.hasAttribute(`row-span-expanded`)?`span ${this.rowSpanExpanded}`:null),this.align?(this.style.setProperty(`--scb-grid-item-align`,this.align),this.style.setProperty(`align-self`,this.align)):(this.style.setProperty(`--scb-grid-item-align`,`initial`),this.style.removeProperty(`align-self`)),this.justify?(this.style.setProperty(`--scb-grid-item-justify`,this.justify),this.style.setProperty(`justify-self`,this.justify)):(this.style.setProperty(`--scb-grid-item-justify`,`initial`),this.style.removeProperty(`justify-self`))}#t(e,t){this.style.setProperty(e,t===null||t===``?`initial`:t)}render(){return x`<slot></slot>`}},N([_({type:Number,attribute:`col-span`,reflect:!0})],Dd.prototype,`colSpan`,void 0),N([_({type:Number,attribute:`col-span-compact`,reflect:!0})],Dd.prototype,`colSpanCompact`,void 0),N([_({type:Number,attribute:`col-span-medium`,reflect:!0})],Dd.prototype,`colSpanMedium`,void 0),N([_({type:Number,attribute:`col-span-expanded`,reflect:!0})],Dd.prototype,`colSpanExpanded`,void 0),N([_({type:Number,attribute:`row-span`,reflect:!0})],Dd.prototype,`rowSpan`,void 0),N([_({type:Number,attribute:`row-span-compact`,reflect:!0})],Dd.prototype,`rowSpanCompact`,void 0),N([_({type:Number,attribute:`row-span-medium`,reflect:!0})],Dd.prototype,`rowSpanMedium`,void 0),N([_({type:Number,attribute:`row-span-expanded`,reflect:!0})],Dd.prototype,`rowSpanExpanded`,void 0),N([_({type:String,reflect:!0})],Dd.prototype,`align`,void 0),N([_({type:String,reflect:!0})],Dd.prototype,`justify`,void 0),N([_({type:Boolean,reflect:!0,converter:Ed})],Dd.prototype,`fit`,void 0),Dd=N([a(`scb-grid-item`)],Dd)})),kd,Ad,jd=t((()=>{w(),b(),P(),kd={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Ad=class extends C{constructor(...e){super(...e),this.direction=`column`,this.gap=``,this.rowGap=``,this.columnGap=``,this.align=`stretch`,this.justify=`start`,this.wrap=!1,this.inline=!1}static{this.styles=p`
11973
11973
  :host {
11974
11974
  box-sizing: border-box;
11975
11975
  display: block;
@@ -12009,7 +12009,7 @@
12009
12009
  }
12010
12010
 
12011
12011
  /* design:bindings:scb-stack:end */
12012
- `}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-stack-direction`,this.direction);let e=`var(--scb-stack-design-layout-gap-medium)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-stack-gap`,`${n}`),this.style.setProperty(`--scb-stack-row-gap`,n),this.style.setProperty(`--scb-stack-column-gap`,r),this.style.setProperty(`--scb-stack-align`,{start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`,baseline:`baseline`}[this.align]??`stretch`),this.style.setProperty(`--scb-stack-justify`,{start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`}[this.justify]??`flex-start`),this.style.setProperty(`--scb-stack-wrap`,this.wrap?`wrap`:`nowrap`)}render(){return x`<div class="base"><slot></slot></div>`}},N([_({type:String,reflect:!0})],kd.prototype,`direction`,void 0),N([_({type:String,reflect:!0})],kd.prototype,`gap`,void 0),N([_({type:String,attribute:`row-gap`,reflect:!0})],kd.prototype,`rowGap`,void 0),N([_({type:String,attribute:`column-gap`,reflect:!0})],kd.prototype,`columnGap`,void 0),N([_({type:String,reflect:!0})],kd.prototype,`align`,void 0),N([_({type:String,reflect:!0})],kd.prototype,`justify`,void 0),N([_({type:Boolean,reflect:!0,converter:Od})],kd.prototype,`wrap`,void 0),N([_({type:Boolean,reflect:!0,converter:Od})],kd.prototype,`inline`,void 0),kd=N([a(`scb-stack`)],kd)})),jd=n({ScbGrid:()=>Md}),Md,Nd=t((()=>{w(),b(),Dd(),Ad(),P(),Md=class extends C{constructor(...e){super(...e),this.colsCompact=4,this.colsMedium=8,this.colsExpanded=12,this.gap=``,this.rowGap=``,this.columnGap=``,this.alignItems=`stretch`,this.justifyItems=`stretch`,this.paddingInline=``,this.paddingBlock=``,this.maxWidth=``,this.autoRows=``}static{this.styles=p`
12012
+ `}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-stack-direction`,this.direction);let e=`var(--scb-stack-design-layout-gap-medium)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-stack-gap`,`${n}`),this.style.setProperty(`--scb-stack-row-gap`,n),this.style.setProperty(`--scb-stack-column-gap`,r),this.style.setProperty(`--scb-stack-align`,{start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`,baseline:`baseline`}[this.align]??`stretch`),this.style.setProperty(`--scb-stack-justify`,{start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`}[this.justify]??`flex-start`),this.style.setProperty(`--scb-stack-wrap`,this.wrap?`wrap`:`nowrap`)}render(){return x`<div class="base"><slot></slot></div>`}},N([_({type:String,reflect:!0})],Ad.prototype,`direction`,void 0),N([_({type:String,reflect:!0})],Ad.prototype,`gap`,void 0),N([_({type:String,attribute:`row-gap`,reflect:!0})],Ad.prototype,`rowGap`,void 0),N([_({type:String,attribute:`column-gap`,reflect:!0})],Ad.prototype,`columnGap`,void 0),N([_({type:String,reflect:!0})],Ad.prototype,`align`,void 0),N([_({type:String,reflect:!0})],Ad.prototype,`justify`,void 0),N([_({type:Boolean,reflect:!0,converter:kd})],Ad.prototype,`wrap`,void 0),N([_({type:Boolean,reflect:!0,converter:kd})],Ad.prototype,`inline`,void 0),Ad=N([a(`scb-stack`)],Ad)})),Md=n({ScbGrid:()=>Nd}),Nd,Pd=t((()=>{w(),b(),Od(),jd(),P(),Nd=class extends C{constructor(...e){super(...e),this.colsCompact=4,this.colsMedium=8,this.colsExpanded=12,this.gap=``,this.rowGap=``,this.columnGap=``,this.alignItems=`stretch`,this.justifyItems=`stretch`,this.paddingInline=``,this.paddingBlock=``,this.maxWidth=``,this.autoRows=``}static{this.styles=p`
12013
12013
  :host {
12014
12014
  box-sizing: border-box;
12015
12015
  display: block;
@@ -12115,7 +12115,7 @@
12115
12115
  }
12116
12116
 
12117
12117
  /* design:bindings:scb-grid:end */
12118
- `}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-grid-cols-compact`,String(this.colsCompact)),this.style.setProperty(`--scb-grid-cols-medium`,String(this.colsMedium)),this.style.setProperty(`--scb-grid-cols-expanded`,String(this.colsExpanded));let e=`var(--scb-grid-design-layout-gap-medium)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-grid-row-gap`,n),this.style.setProperty(`--scb-grid-column-gap`,r),this.style.setProperty(`--scb-grid-gap`,`${n} ${r}`),this.style.setProperty(`--scb-grid-align-items`,this.alignItems),this.style.setProperty(`--scb-grid-justify-items`,this.justifyItems);let i=this.mapSpacingToken(this.paddingInline),a=this.mapSpacingToken(this.paddingBlock);this.style.setProperty(`--scb-grid-max-width`,this.maxWidth||`var(--scb-grid-default-max-width, 1440px)`),this.style.setProperty(`--scb-grid-padding-inline`,i??`0`),this.style.setProperty(`--scb-grid-padding-block`,a??`0`),this.style.setProperty(`--scb-grid-auto-rows`,this.autoRows||`auto`)}render(){return x`<div class="grid"><slot></slot></div>`}},N([_({type:Number,attribute:`cols-compact`,reflect:!0})],Md.prototype,`colsCompact`,void 0),N([_({type:Number,attribute:`cols-medium`,reflect:!0})],Md.prototype,`colsMedium`,void 0),N([_({type:Number,attribute:`cols-expanded`,reflect:!0})],Md.prototype,`colsExpanded`,void 0),N([_({type:String,reflect:!0})],Md.prototype,`gap`,void 0),N([_({type:String,attribute:`row-gap`,reflect:!0})],Md.prototype,`rowGap`,void 0),N([_({type:String,attribute:`column-gap`,reflect:!0})],Md.prototype,`columnGap`,void 0),N([_({type:String,attribute:`align-items`,reflect:!0})],Md.prototype,`alignItems`,void 0),N([_({type:String,attribute:`justify-items`,reflect:!0})],Md.prototype,`justifyItems`,void 0),N([_({type:String,attribute:`padding-inline`,reflect:!0})],Md.prototype,`paddingInline`,void 0),N([_({type:String,attribute:`padding-block`,reflect:!0})],Md.prototype,`paddingBlock`,void 0),N([_({type:String,attribute:`max-width`,reflect:!0})],Md.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`auto-rows`,reflect:!0})],Md.prototype,`autoRows`,void 0),Md=N([a(`scb-grid`)],Md)}));w(),b(),dl(),Nd(),Dd(),P();var Pd={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Fd=class extends C{constructor(...e){super(...e),this.maxWidth=`1440px`,this.deferPaint=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.sections=[],this.description=`Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.`,this.navigationLabel=`Sidfot med länkar`,this.#e=null,this.#t=``,this.#r=!1,this.#i=`scb-footer-${Math.random().toString(36).slice(2)}-sec`}#e;#t;#n;#r;#i;static{this.styles=p`
12118
+ `}firstUpdated(){this.#e()}updated(){this.#e()}mapSpacingToken(e){if(!e)return;let t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};let t=e.trim().split(/\s+/);if(t.length===1){let e=this.mapSpacingToken(t[0]);return{row:e,col:e}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}#e(){this.style.setProperty(`--scb-grid-cols-compact`,String(this.colsCompact)),this.style.setProperty(`--scb-grid-cols-medium`,String(this.colsMedium)),this.style.setProperty(`--scb-grid-cols-expanded`,String(this.colsExpanded));let e=`var(--scb-grid-design-layout-gap-medium)`,t=this.parseGapShorthand(this.gap),n=this.mapSpacingToken(this.rowGap)??t.row??e,r=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty(`--scb-grid-row-gap`,n),this.style.setProperty(`--scb-grid-column-gap`,r),this.style.setProperty(`--scb-grid-gap`,`${n} ${r}`),this.style.setProperty(`--scb-grid-align-items`,this.alignItems),this.style.setProperty(`--scb-grid-justify-items`,this.justifyItems);let i=this.mapSpacingToken(this.paddingInline),a=this.mapSpacingToken(this.paddingBlock);this.style.setProperty(`--scb-grid-max-width`,this.maxWidth||`var(--scb-grid-default-max-width, 1440px)`),this.style.setProperty(`--scb-grid-padding-inline`,i??`0`),this.style.setProperty(`--scb-grid-padding-block`,a??`0`),this.style.setProperty(`--scb-grid-auto-rows`,this.autoRows||`auto`)}render(){return x`<div class="grid"><slot></slot></div>`}},N([_({type:Number,attribute:`cols-compact`,reflect:!0})],Nd.prototype,`colsCompact`,void 0),N([_({type:Number,attribute:`cols-medium`,reflect:!0})],Nd.prototype,`colsMedium`,void 0),N([_({type:Number,attribute:`cols-expanded`,reflect:!0})],Nd.prototype,`colsExpanded`,void 0),N([_({type:String,reflect:!0})],Nd.prototype,`gap`,void 0),N([_({type:String,attribute:`row-gap`,reflect:!0})],Nd.prototype,`rowGap`,void 0),N([_({type:String,attribute:`column-gap`,reflect:!0})],Nd.prototype,`columnGap`,void 0),N([_({type:String,attribute:`align-items`,reflect:!0})],Nd.prototype,`alignItems`,void 0),N([_({type:String,attribute:`justify-items`,reflect:!0})],Nd.prototype,`justifyItems`,void 0),N([_({type:String,attribute:`padding-inline`,reflect:!0})],Nd.prototype,`paddingInline`,void 0),N([_({type:String,attribute:`padding-block`,reflect:!0})],Nd.prototype,`paddingBlock`,void 0),N([_({type:String,attribute:`max-width`,reflect:!0})],Nd.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`auto-rows`,reflect:!0})],Nd.prototype,`autoRows`,void 0),Nd=N([a(`scb-grid`)],Nd)}));w(),b(),fl(),Pd(),Od(),P();var Fd={fromAttribute(e){if(e===null)return!1;let t=e.trim().toLowerCase();return t!==`false`&&t!==`0`&&t!==`no`}},Id=class extends C{constructor(...e){super(...e),this.maxWidth=`1440px`,this.deferPaint=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.sections=[],this.description=`Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.`,this.navigationLabel=`Sidfot med länkar`,this.#e=null,this.#t=``,this.#r=!1,this.#i=`scb-footer-${Math.random().toString(36).slice(2)}-sec`}#e;#t;#n;#r;#i;static{this.styles=p`
12119
12119
  :host {
12120
12120
  display: block;
12121
12121
  color: var(--scb-footer-content-color, var(--p-100));
@@ -12374,7 +12374,7 @@
12374
12374
  </div>
12375
12375
  </div>
12376
12376
  </footer>
12377
- `}};N([_({type:String,attribute:`max-width`,reflect:!0,converter:{fromAttribute:e=>{if(e==null)return`1440px`;let t=e.trim();return t===``?`1440px`:/^\d+$/.test(t)?`${t}px`:t}}})],Fd.prototype,`maxWidth`,void 0),N([_({type:Boolean,reflect:!0,attribute:`defer-paint`,converter:Pd})],Fd.prototype,`deferPaint`,void 0),N([_({type:String,reflect:!0})],Fd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Fd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Fd.prototype,`spacingBottom`,void 0),N([_({type:Array})],Fd.prototype,`sections`,void 0),N([_({type:String})],Fd.prototype,`description`,void 0),N([_({type:String,attribute:`navigation-label`})],Fd.prototype,`navigationLabel`,void 0),Fd=N([a(`scb-footer`)],Fd),w(),b(),uc(),P();var Id=class extends C{constructor(...e){super(...e),this.icon=``,this.size=lc[`scb-icon`].size,this.filled=!1,this.label=``}static{this.styles=p`
12377
+ `}};N([_({type:String,attribute:`max-width`,reflect:!0,converter:{fromAttribute:e=>{if(e==null)return`1440px`;let t=e.trim();return t===``?`1440px`:/^\d+$/.test(t)?`${t}px`:t}}})],Id.prototype,`maxWidth`,void 0),N([_({type:Boolean,reflect:!0,attribute:`defer-paint`,converter:Fd})],Id.prototype,`deferPaint`,void 0),N([_({type:String,reflect:!0})],Id.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Id.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Id.prototype,`spacingBottom`,void 0),N([_({type:Array})],Id.prototype,`sections`,void 0),N([_({type:String})],Id.prototype,`description`,void 0),N([_({type:String,attribute:`navigation-label`})],Id.prototype,`navigationLabel`,void 0),Id=N([a(`scb-footer`)],Id),w(),b(),uc(),P();var Ld=class extends C{constructor(...e){super(...e),this.icon=``,this.size=lc[`scb-icon`].size,this.filled=!1,this.label=``}static{this.styles=p`
12378
12378
  :host {
12379
12379
  display: inline-flex;
12380
12380
  inline-size: var(--scb-icon-size, var(--scb-icon-design-icon-medium));
@@ -12456,7 +12456,7 @@
12456
12456
  aria-label=${t||S}
12457
12457
  role=${t?`img`:S}
12458
12458
  >${e}</span>
12459
- `}};N([_({type:String})],Id.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Id.prototype,`size`,void 0),N([_({type:Boolean,reflect:!0})],Id.prototype,`filled`,void 0),N([_({type:String})],Id.prototype,`label`,void 0),Id=N([a(`scb-icon`)],Id),w(),b(),D(),al(),cc(),P();var Ld={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},X=class extends C{constructor(...e){super(...e),this.variant=`success`,this.direction=`horizontal`,this.title=``,this.notificationCardTitle=``,this.subtitle=``,this.supportingText=``,this.open=!1,this.linkText=``,this.linkHref=`#`,this.href=``,this.showIcon=!1,this.showCloseButton=!1,this.closeLabel=`Stäng meddelande`,this.sizing=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__hasHeading=!1,this.__hasSubtitle=!1,this.__hasSupportingText=!1,this.__hasFooter=!1,this.__hasIcon=!1,this._closeNotification=()=>{this.open=!1;let e=new CustomEvent(`openchange`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e);let t=new CustomEvent(`notification-close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);let n=new CustomEvent(`close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(n);let r=new CustomEvent(`Close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(r)},this.__syncSlots=()=>{this.__hasHeading=this.__slotHasContent(`heading`),this.__hasSubtitle=this.__slotHasContent(`subtitle`),this.__hasSupportingText=this.__slotHasContent(`supporting-text`),this.__hasFooter=this.__slotHasContent(`footer`),this.__hasIcon=this.__slotHasContent(`icon`)}}get#e(){return this.notificationCardTitle||this.title}static{this.styles=[p`
12459
+ `}};N([_({type:String})],Ld.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Ld.prototype,`size`,void 0),N([_({type:Boolean,reflect:!0})],Ld.prototype,`filled`,void 0),N([_({type:String})],Ld.prototype,`label`,void 0),Ld=N([a(`scb-icon`)],Ld),w(),b(),D(),sl(),cc(),P();var Rd={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Y=class extends C{constructor(...e){super(...e),this.variant=`success`,this.direction=`horizontal`,this.title=``,this.notificationCardTitle=``,this.subtitle=``,this.supportingText=``,this.open=!1,this.linkText=``,this.linkHref=`#`,this.href=``,this.showIcon=!1,this.showCloseButton=!1,this.closeLabel=`Stäng meddelande`,this.sizing=``,this.width=``,this.maxWidth=``,this.height=``,this.maxHeight=``,this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__hasHeading=!1,this.__hasSubtitle=!1,this.__hasSupportingText=!1,this.__hasFooter=!1,this.__hasIcon=!1,this._closeNotification=()=>{this.open=!1;let e=new CustomEvent(`openchange`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e);let t=new CustomEvent(`notification-close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);let n=new CustomEvent(`close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(n);let r=new CustomEvent(`Close`,{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(r)},this.__syncSlots=()=>{this.__hasHeading=this.__slotHasContent(`heading`),this.__hasSubtitle=this.__slotHasContent(`subtitle`),this.__hasSupportingText=this.__slotHasContent(`supporting-text`),this.__hasFooter=this.__slotHasContent(`footer`),this.__hasIcon=this.__slotHasContent(`icon`)}}get#e(){return this.notificationCardTitle||this.title}static{this.styles=[p`
12460
12460
  /*
12461
12461
  Designbrygga:
12462
12462
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -12975,7 +12975,7 @@
12975
12975
  </div>
12976
12976
  `:null}
12977
12977
  </div>
12978
- `}};N([_({type:String,reflect:!0})],X.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],X.prototype,`direction`,void 0),N([_({type:String})],X.prototype,`title`,void 0),N([_({type:String,attribute:`notification-card-title`})],X.prototype,`notificationCardTitle`,void 0),N([_({type:String})],X.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],X.prototype,`supportingText`,void 0),N([_({type:Boolean,reflect:!0})],X.prototype,`open`,void 0),N([_({type:String,attribute:`link-text`})],X.prototype,`linkText`,void 0),N([_({type:String,attribute:`link-href`})],X.prototype,`linkHref`,void 0),N([_({type:String})],X.prototype,`href`,void 0),N([_({type:Boolean,attribute:`show-icon`})],X.prototype,`showIcon`,void 0),N([_({type:Boolean,attribute:`show-close-button`})],X.prototype,`showCloseButton`,void 0),N([_({type:String,attribute:`close-label`})],X.prototype,`closeLabel`,void 0),N([_({type:String,reflect:!0,converter:Ld})],X.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],X.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],X.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],X.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],X.prototype,`maxHeight`,void 0),N([_({type:Boolean,reflect:!0,attribute:`full-height`})],X.prototype,`fullHeight`,void 0),N([_({type:Boolean,reflect:!0,attribute:`full-width`})],X.prototype,`fullWidth`,void 0),N([_({type:String})],X.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`})],X.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`})],X.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`})],X.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`})],X.prototype,`spacingRight`,void 0),N([v()],X.prototype,`__hasHeading`,void 0),N([v()],X.prototype,`__hasSubtitle`,void 0),N([v()],X.prototype,`__hasSupportingText`,void 0),N([v()],X.prototype,`__hasFooter`,void 0),N([v()],X.prototype,`__hasIcon`,void 0),X=N([a(`scb-notification-card`)],X),w(),b(),P();var Rd=class extends C{constructor(...e){super(...e),this.heading=`Det finns fel i formuläret`,this.headingLevel=`2`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
12978
+ `}};N([_({type:String,reflect:!0})],Y.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Y.prototype,`direction`,void 0),N([_({type:String})],Y.prototype,`title`,void 0),N([_({type:String,attribute:`notification-card-title`})],Y.prototype,`notificationCardTitle`,void 0),N([_({type:String})],Y.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],Y.prototype,`supportingText`,void 0),N([_({type:Boolean,reflect:!0})],Y.prototype,`open`,void 0),N([_({type:String,attribute:`link-text`})],Y.prototype,`linkText`,void 0),N([_({type:String,attribute:`link-href`})],Y.prototype,`linkHref`,void 0),N([_({type:String})],Y.prototype,`href`,void 0),N([_({type:Boolean,attribute:`show-icon`})],Y.prototype,`showIcon`,void 0),N([_({type:Boolean,attribute:`show-close-button`})],Y.prototype,`showCloseButton`,void 0),N([_({type:String,attribute:`close-label`})],Y.prototype,`closeLabel`,void 0),N([_({type:String,reflect:!0,converter:Rd})],Y.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Y.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Y.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],Y.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],Y.prototype,`maxHeight`,void 0),N([_({type:Boolean,reflect:!0,attribute:`full-height`})],Y.prototype,`fullHeight`,void 0),N([_({type:Boolean,reflect:!0,attribute:`full-width`})],Y.prototype,`fullWidth`,void 0),N([_({type:String})],Y.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`})],Y.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`})],Y.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`})],Y.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`})],Y.prototype,`spacingRight`,void 0),N([v()],Y.prototype,`__hasHeading`,void 0),N([v()],Y.prototype,`__hasSubtitle`,void 0),N([v()],Y.prototype,`__hasSupportingText`,void 0),N([v()],Y.prototype,`__hasFooter`,void 0),N([v()],Y.prototype,`__hasIcon`,void 0),Y=N([a(`scb-notification-card`)],Y),w(),b(),P();var zd=class extends C{constructor(...e){super(...e),this.heading=`Det finns fel i formuläret`,this.headingLevel=`2`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}static{this.styles=p`
12979
12979
  :host {
12980
12980
  display: block;
12981
12981
  margin-block-start: var(--scb-form-error-summary-spacing-block-start, 0);
@@ -13079,7 +13079,7 @@
13079
13079
  </div>
13080
13080
  </scb-notification-card>
13081
13081
  </div>
13082
- `}#e(){return[`2`,`3`,`4`,`5`,`6`].includes(this.headingLevel)?this.headingLevel:`2`}#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(){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);this.#r(`--scb-form-error-summary-spacing-block-start`,t),this.#r(`--scb-form-error-summary-spacing-block-end`,n),this.#r(`--scb-form-error-summary-spacing-inline-start`,r),this.#r(`--scb-form-error-summary-spacing-inline-end`,i)}#r(e,t){t?this.style.setProperty(e,t):this.style.removeProperty(e)}};N([_({type:String,reflect:!0})],Rd.prototype,`heading`,void 0),N([_({type:String,attribute:`heading-level`,reflect:!0})],Rd.prototype,`headingLevel`,void 0),N([_({type:String,reflect:!0})],Rd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Rd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Rd.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Rd.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Rd.prototype,`spacingRight`,void 0),Rd=N([a(`scb-form-error-summary`)],Rd),w();var zd=new Map([[`arrow_forward`,`M12 4l-1.41 1.41L15.17 10H4v2h11.17l-4.58 4.59L12 18l8-8-8-8Z`],[`chevron_left`,`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59Z`],[`chevron_right`,`M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59Z`],[`close`,`M18.3 5.71 16.89 4.3 12 9.17 7.11 4.3 5.7 5.71 10.59 10.6 5.7 15.49 7.11 16.9 12 12.01l4.89 4.89 1.41-1.41-4.89-4.89 4.89-4.89Z`],[`menu`,`M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z`],[`open_in_new`,`M14 3h7v7h-2V6.41l-9.83 9.83-1.41-1.41L17.59 5H14V3ZM5 5h6v2H7v10h10v-4h2v6H5V5Z`],[`payments`,`M3 6h18v12H3V6Zm2 2v8h14V8H5Zm7 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM7 9h2v2H7V9Zm8 4h2v2h-2v-2Z`],[`person_4`,`M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 8c0-3.31 3.58-6 8-6s8 2.69 8 6v1H4v-1Z`],[`price_change`,`M12 2 3 6v6c0 5 3.84 9.74 9 10 5.16-.26 9-5 9-10V6l-9-4Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Zm-7 6.5V15h2v2.6a9.1 9.1 0 0 1-2-3.1Zm12-1.9V15h2a9.1 9.1 0 0 1-2 3.1Z`],[`search`,`M9.5 3a6.5 6.5 0 0 1 5.17 10.44l5.45 5.44-1.42 1.42-5.44-5.45A6.5 6.5 0 1 1 9.5 3Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z`],[`trending_up`,`M16 6h5v5h-2V9.41l-6.17 6.17-4-4L3.41 17 2 15.59l6.83-6.83 4 4L17.59 8H16V6Z`],[`volume_up`,`M3 9v6h4l5 5V4L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.06A4.5 4.5 0 0 0 16.5 12Zm-2.5-8.7v2.06A7 7 0 0 1 18 12a7 7 0 0 1-4 6.64v2.06A9 9 0 0 0 20 12a9 9 0 0 0-6-8.7Z`],[`work`,`M10 4h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h4V6a2 2 0 0 1 2-2Zm0 4h4V6h-4v2Zm-6 2v8h16v-8H4Zm6 3h4v2h-4v-2Z`]]);function Bd(e,t=`material-icon`,n){let r=(e||``).trim(),i=zd.get(r);return i?nt`
13082
+ `}#e(){return[`2`,`3`,`4`,`5`,`6`].includes(this.headingLevel)?this.headingLevel:`2`}#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(){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);this.#r(`--scb-form-error-summary-spacing-block-start`,t),this.#r(`--scb-form-error-summary-spacing-block-end`,n),this.#r(`--scb-form-error-summary-spacing-inline-start`,r),this.#r(`--scb-form-error-summary-spacing-inline-end`,i)}#r(e,t){t?this.style.setProperty(e,t):this.style.removeProperty(e)}};N([_({type:String,reflect:!0})],zd.prototype,`heading`,void 0),N([_({type:String,attribute:`heading-level`,reflect:!0})],zd.prototype,`headingLevel`,void 0),N([_({type:String,reflect:!0})],zd.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],zd.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],zd.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],zd.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],zd.prototype,`spacingRight`,void 0),zd=N([a(`scb-form-error-summary`)],zd),w();var Bd=new Map([[`arrow_forward`,`M12 4l-1.41 1.41L15.17 10H4v2h11.17l-4.58 4.59L12 18l8-8-8-8Z`],[`chevron_left`,`M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59Z`],[`chevron_right`,`M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12l-4.58 4.59Z`],[`close`,`M18.3 5.71 16.89 4.3 12 9.17 7.11 4.3 5.7 5.71 10.59 10.6 5.7 15.49 7.11 16.9 12 12.01l4.89 4.89 1.41-1.41-4.89-4.89 4.89-4.89Z`],[`menu`,`M3 6h18v2H3V6Zm0 5h18v2H3v-2Zm0 5h18v2H3v-2Z`],[`open_in_new`,`M14 3h7v7h-2V6.41l-9.83 9.83-1.41-1.41L17.59 5H14V3ZM5 5h6v2H7v10h10v-4h2v6H5V5Z`],[`payments`,`M3 6h18v12H3V6Zm2 2v8h14V8H5Zm7 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4ZM7 9h2v2H7V9Zm8 4h2v2h-2v-2Z`],[`person_4`,`M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-8 8c0-3.31 3.58-6 8-6s8 2.69 8 6v1H4v-1Z`],[`price_change`,`M12 2 3 6v6c0 5 3.84 9.74 9 10 5.16-.26 9-5 9-10V6l-9-4Zm1 15h-2v-2h2v2Zm0-4h-2V7h2v6Zm-7 6.5V15h2v2.6a9.1 9.1 0 0 1-2-3.1Zm12-1.9V15h2a9.1 9.1 0 0 1-2 3.1Z`],[`search`,`M9.5 3a6.5 6.5 0 0 1 5.17 10.44l5.45 5.44-1.42 1.42-5.44-5.45A6.5 6.5 0 1 1 9.5 3Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z`],[`trending_up`,`M16 6h5v5h-2V9.41l-6.17 6.17-4-4L3.41 17 2 15.59l6.83-6.83 4 4L17.59 8H16V6Z`],[`volume_up`,`M3 9v6h4l5 5V4L7 9H3Zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.06A4.5 4.5 0 0 0 16.5 12Zm-2.5-8.7v2.06A7 7 0 0 1 18 12a7 7 0 0 1-4 6.64v2.06A9 9 0 0 0 20 12a9 9 0 0 0-6-8.7Z`],[`work`,`M10 4h4a2 2 0 0 1 2 2v2h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h4V6a2 2 0 0 1 2-2Zm0 4h4V6h-4v2Zm-6 2v8h16v-8H4Zm6 3h4v2h-4v-2Z`]]);function Vd(e,t=`material-icon`,n){let r=(e||``).trim(),i=Bd.get(r);return i?nt`
13083
13083
  <svg
13084
13084
  class=${`${t} scb-svg-icon`}
13085
13085
  part=${n||S}
@@ -13089,7 +13089,7 @@
13089
13089
  >
13090
13090
  <path d=${i}></path>
13091
13091
  </svg>
13092
- `:S}w(),b(),P();var Vd;function Hd(){return Vd??=Promise.resolve().then(()=>(j(),nc)),Vd}var Ud=class extends C{constructor(...e){super(...e),this.variant=`standard`,this.width=`100%`,this.showScrollbar=!1,this.rightScrollButtonLabel=`Scrolla höger`,this.leftScrollButtonLabel=`Scrolla vänster`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.contentFlex=!1,this.internalGap=``,this.snap=!1,this._canScrollLeft=!1,this._canScrollRight=!1,this.__scrollLeft=()=>{this.doScrollBy(-this.getScrollStep())},this.__scrollRight=()=>{this.doScrollBy(this.getScrollStep())},this.updateScrollButtons=()=>{let e=this.scrollerEl||this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);if(!e){this._canScrollLeft=!1,this._canScrollRight=!1,this.toggleAttribute(`data-scroll-left`,!1),this.toggleAttribute(`data-scroll-right`,!1);return}let t=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth-1;this._canScrollLeft=t,this._canScrollRight=n,this.toggleAttribute(`data-scroll-left`,t),this.toggleAttribute(`data-scroll-right`,n)},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.scrollerEl=null,this.slotEl=null,this.sizeObserver=null,this.resizeRaf=null,this.__onFocusIn=()=>{Hd().then(({ensureFocusRingReady:e})=>e())},this.__onLazyFocusRingKeydown=e=>{!(e instanceof KeyboardEvent)||e.key!==`Tab`||Hd().then(({ensureFocusRingOnTab:t})=>t(e))},this.handleScroll=()=>{let e=this.scrollerEl;e&&(this.updateScrollButtons(),this.dispatchCustomEventWithAlias(`scb-scroll`,{scrollLeft:e.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEventWithAlias(`scb-scroll-start`,{scrollLeft:e.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEventWithAlias(`scb-scroll-end`,{scrollLeft:e.scrollLeft})},120),e.scrollLeft>this.lastScrollLeft?this.dispatchCustomEventWithAlias(`scb-scroll-right`,{scrollLeft:e.scrollLeft}):e.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEventWithAlias(`scb-scroll-left`,{scrollLeft:e.scrollLeft}),this.lastScrollLeft=e.scrollLeft)},this.handleWheel=e=>{let t=this.scrollerEl||this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);if(!t||e.deltaY===0)return;let n=t.scrollLeft,r=n>0,i=n+t.clientWidth<t.scrollWidth-1;!r&&!i||(t.scrollLeft+=e.deltaY,t.scrollLeft!==n&&e.preventDefault())}}static{this.styles=p`
13092
+ `:S}w(),b(),P();var Hd;function Ud(){return Hd??=Promise.resolve().then(()=>(j(),nc)),Hd}var Wd=class extends C{constructor(...e){super(...e),this.variant=`standard`,this.width=`100%`,this.showScrollbar=!1,this.rightScrollButtonLabel=`Scrolla höger`,this.leftScrollButtonLabel=`Scrolla vänster`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.contentFlex=!1,this.internalGap=``,this.snap=!1,this._canScrollLeft=!1,this._canScrollRight=!1,this.__scrollLeft=()=>{this.doScrollBy(-this.getScrollStep())},this.__scrollRight=()=>{this.doScrollBy(this.getScrollStep())},this.updateScrollButtons=()=>{let e=this.scrollerEl||this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);if(!e){this._canScrollLeft=!1,this._canScrollRight=!1,this.toggleAttribute(`data-scroll-left`,!1),this.toggleAttribute(`data-scroll-right`,!1);return}let t=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth-1;this._canScrollLeft=t,this._canScrollRight=n,this.toggleAttribute(`data-scroll-left`,t),this.toggleAttribute(`data-scroll-right`,n)},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.scrollerEl=null,this.slotEl=null,this.sizeObserver=null,this.resizeRaf=null,this.__onFocusIn=()=>{Ud().then(({ensureFocusRingReady:e})=>e())},this.__onLazyFocusRingKeydown=e=>{!(e instanceof KeyboardEvent)||e.key!==`Tab`||Ud().then(({ensureFocusRingOnTab:t})=>t(e))},this.handleScroll=()=>{let e=this.scrollerEl;e&&(this.updateScrollButtons(),this.dispatchCustomEventWithAlias(`scb-scroll`,{scrollLeft:e.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEventWithAlias(`scb-scroll-start`,{scrollLeft:e.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEventWithAlias(`scb-scroll-end`,{scrollLeft:e.scrollLeft})},120),e.scrollLeft>this.lastScrollLeft?this.dispatchCustomEventWithAlias(`scb-scroll-right`,{scrollLeft:e.scrollLeft}):e.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEventWithAlias(`scb-scroll-left`,{scrollLeft:e.scrollLeft}),this.lastScrollLeft=e.scrollLeft)},this.handleWheel=e=>{let t=this.scrollerEl||this.shadowRoot?.querySelector(`.scb-horizontal-scroller`);if(!t||e.deltaY===0)return;let n=t.scrollLeft,r=n>0,i=n+t.clientWidth<t.scrollWidth-1;!r&&!i||(t.scrollLeft+=e.deltaY,t.scrollLeft!==n&&e.preventDefault())}}static{this.styles=p`
13093
13093
  /*
13094
13094
  Designstyrning:
13095
13095
  - Gap, fade, slot-padding och scrollbarens defaultvärden kommer från src/tokens/source/sizing.json.
@@ -13377,7 +13377,7 @@
13377
13377
  aria-label=${this.leftScrollButtonLabel}
13378
13378
  @click=${this.__scrollLeft}
13379
13379
  >
13380
- ${Bd(`chevron_left`,`scroll-control-icon`)}
13380
+ ${Vd(`chevron_left`,`scroll-control-icon`)}
13381
13381
  <span>${this.leftScrollButtonLabel}</span>
13382
13382
  </button>
13383
13383
  `:``}
@@ -13390,7 +13390,7 @@
13390
13390
  @click=${this.__scrollRight}
13391
13391
  >
13392
13392
  <span>${this.rightScrollButtonLabel}</span>
13393
- ${Bd(`chevron_right`,`scroll-control-icon`)}
13393
+ ${Vd(`chevron_right`,`scroll-control-icon`)}
13394
13394
  </button>
13395
13395
  `:``}
13396
13396
  </div>
@@ -13403,7 +13403,7 @@
13403
13403
  aria-label=${this.leftScrollButtonLabel}
13404
13404
  @click=${this.__scrollLeft}
13405
13405
  >
13406
- ${Bd(`chevron_left`,`scroll-control-icon`)}
13406
+ ${Vd(`chevron_left`,`scroll-control-icon`)}
13407
13407
  </button>
13408
13408
  `:``}
13409
13409
  <div class="scroll-shadow-left"></div>
@@ -13419,10 +13419,10 @@
13419
13419
  aria-label=${this.rightScrollButtonLabel}
13420
13420
  @click=${this.__scrollRight}
13421
13421
  >
13422
- ${Bd(`chevron_right`,`scroll-control-icon`)}
13422
+ ${Vd(`chevron_right`,`scroll-control-icon`)}
13423
13423
  </button>
13424
13424
  `:``}
13425
- `}}};N([_({type:String,reflect:!0})],Ud.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Ud.prototype,`width`,void 0),N([_({type:Boolean,reflect:!0,attribute:`show-scrollbar`})],Ud.prototype,`showScrollbar`,void 0),N([_({type:String,reflect:!0,attribute:`right-scroll-button-label`})],Ud.prototype,`rightScrollButtonLabel`,void 0),N([_({type:String,reflect:!0,attribute:`left-scroll-button-label`})],Ud.prototype,`leftScrollButtonLabel`,void 0),N([_({type:String,reflect:!0})],Ud.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Ud.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Ud.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Ud.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Ud.prototype,`spacingRight`,void 0),N([_({type:Boolean,reflect:!0,attribute:`content-flex`})],Ud.prototype,`contentFlex`,void 0),N([_({type:String,reflect:!0,attribute:`internal-gap`})],Ud.prototype,`internalGap`,void 0),N([_({type:Boolean,reflect:!0})],Ud.prototype,`snap`,void 0),N([v()],Ud.prototype,`_canScrollLeft`,void 0),N([v()],Ud.prototype,`_canScrollRight`,void 0),Ud=N([a(`scb-horizontal-scroller`)],Ud),w(),b(),Cl(),P();var Wd,Gd=class extends C{static{Wd=this}constructor(...e){super(...e),this.open=!1,this.variant=`scrim`,this.isStatic=!1,this.ariaLabel=``,this.__lastTriggerEl=null,this.#r=e=>{this.isStatic||this.#n(e)||this.#t()},this.#a=e=>{if(this.open){if(e.key===`Tab`){this.#o(e);return}e.key===`Escape`&&(this.#i(e)||(e.preventDefault(),e.stopPropagation(),this.#t()))}}}static{this.__instances=new Map}static{this.__docListenerAttached=!1}static __handleDocClick(e){let t=e.composedPath();for(let e of t){if(!(e instanceof Element))continue;let t=e.getAttribute(`data-overlay-open`),n=e.getAttribute(`data-overlay-close`),r=e.getAttribute(`data-overlay-toggle`),i=e.getAttribute(`aria-controls`),a=t||n||r||i;if(!a)continue;let o=Wd.__instances.get(a);if(!o){Wd.__instances.delete(a);continue}(!n||!o.contains(e))&&(o.__lastTriggerEl=e),t?o.#e(!0):n?o.#e(!1):o.#e(!o.open);break}}static __ensureDocListener(){Wd.__docListenerAttached||(document.addEventListener(`click`,Wd.__handleDocClick,!0),Wd.__docListenerAttached=!0)}static __maybeRemoveDocListener(){!Wd.__docListenerAttached||Wd.__instances.size>0||(document.removeEventListener(`click`,Wd.__handleDocClick,!0),Wd.__docListenerAttached=!1)}static{this.styles=p`
13425
+ `}}};N([_({type:String,reflect:!0})],Wd.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Wd.prototype,`width`,void 0),N([_({type:Boolean,reflect:!0,attribute:`show-scrollbar`})],Wd.prototype,`showScrollbar`,void 0),N([_({type:String,reflect:!0,attribute:`right-scroll-button-label`})],Wd.prototype,`rightScrollButtonLabel`,void 0),N([_({type:String,reflect:!0,attribute:`left-scroll-button-label`})],Wd.prototype,`leftScrollButtonLabel`,void 0),N([_({type:String,reflect:!0})],Wd.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Wd.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Wd.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Wd.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Wd.prototype,`spacingRight`,void 0),N([_({type:Boolean,reflect:!0,attribute:`content-flex`})],Wd.prototype,`contentFlex`,void 0),N([_({type:String,reflect:!0,attribute:`internal-gap`})],Wd.prototype,`internalGap`,void 0),N([_({type:Boolean,reflect:!0})],Wd.prototype,`snap`,void 0),N([v()],Wd.prototype,`_canScrollLeft`,void 0),N([v()],Wd.prototype,`_canScrollRight`,void 0),Wd=N([a(`scb-horizontal-scroller`)],Wd),w(),b(),wl(),P();var Gd,Kd=class extends C{static{Gd=this}constructor(...e){super(...e),this.open=!1,this.variant=`scrim`,this.isStatic=!1,this.ariaLabel=``,this.__lastTriggerEl=null,this.#r=e=>{this.isStatic||this.#n(e)||this.#t()},this.#a=e=>{if(this.open){if(e.key===`Tab`){this.#o(e);return}e.key===`Escape`&&(this.#i(e)||(e.preventDefault(),e.stopPropagation(),this.#t()))}}}static{this.__instances=new Map}static{this.__docListenerAttached=!1}static __handleDocClick(e){let t=e.composedPath();for(let e of t){if(!(e instanceof Element))continue;let t=e.getAttribute(`data-overlay-open`),n=e.getAttribute(`data-overlay-close`),r=e.getAttribute(`data-overlay-toggle`),i=e.getAttribute(`aria-controls`),a=t||n||r||i;if(!a)continue;let o=Gd.__instances.get(a);if(!o){Gd.__instances.delete(a);continue}(!n||!o.contains(e))&&(o.__lastTriggerEl=e),t?o.#e(!0):n?o.#e(!1):o.#e(!o.open);break}}static __ensureDocListener(){Gd.__docListenerAttached||(document.addEventListener(`click`,Gd.__handleDocClick,!0),Gd.__docListenerAttached=!0)}static __maybeRemoveDocListener(){!Gd.__docListenerAttached||Gd.__instances.size>0||(document.removeEventListener(`click`,Gd.__handleDocClick,!0),Gd.__docListenerAttached=!1)}static{this.styles=p`
13426
13426
  :host {
13427
13427
  position: fixed;
13428
13428
  inset: 0;
@@ -13492,7 +13492,7 @@
13492
13492
  <slot></slot>
13493
13493
  </div>
13494
13494
  </div>
13495
- `:S}connectedCallback(){super.connectedCallback(),this.id&&Wd.__instances.set(this.id,this),Wd.__ensureDocListener(),window.addEventListener(`keydown`,this.#a)}updated(e){e.has(`open`)&&(this.#p(),this.open?(_l(this.renderRoot.querySelector(`.scrim`)),this.#d()):(bl(this),z(this.renderRoot.querySelector(`.scrim`)),this.#f()))}disconnectedCallback(){this.id&&Wd.__instances.delete(this.id),Wd.__maybeRemoveDocListener(),window.removeEventListener(`keydown`,this.#a),z(this.renderRoot.querySelector(`.scrim`)),super.disconnectedCallback()}};N([_({type:Boolean,reflect:!0})],Gd.prototype,`open`,void 0),N([_({type:String,reflect:!0})],Gd.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0,attribute:`static`})],Gd.prototype,`isStatic`,void 0),N([_({type:String,attribute:`aria-label`})],Gd.prototype,`ariaLabel`,void 0),Gd=Wd=N([a(`scb-overlay`)],Gd),w(),b(),P();var Kd={fromAttribute(e){return e===null||e.toLowerCase()!==`false`},toAttribute(e){return e?``:`false`}},qd=class extends C{constructor(...e){super(...e),this.variant=`default`,this.enableClickCarousel=!0,this.imageFallbackAlt=`Galleri-bild`,this.openImageLabel=`Öppna bild i karusell`,this.openImagePrefixLabel=`Öppna bild:`,this.carouselLabel=`Bildkarusell`,this.overlayOpen=!1,this.overlayIndex=0,this.overlayImages=[],this.#e=[],this.#t=[],this.#n=``,this.#r=null,this.#i=()=>{this.#f()},this.#a=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;t instanceof HTMLElement&&t.setAttribute(`data-scb-gallery-hover`,``)},this.#o=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;t instanceof HTMLElement&&t.removeAttribute(`data-scb-gallery-hover`)},this.#s=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;if(!(t instanceof HTMLElement))return;let n=t.getAttribute(`data-scb-gallery-slide-index`);if(n==null)return;let r=Number(n);Number.isFinite(r)&&this.#h(r)},this.#c=e=>{this.enableClickCarousel&&(e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||(e.preventDefault(),this.#s(e)))},this.#g=()=>{this.overlayOpen=!1,this.#p()}}#e;#t;#n;#r;static{this.styles=p`
13495
+ `:S}connectedCallback(){super.connectedCallback(),this.id&&Gd.__instances.set(this.id,this),Gd.__ensureDocListener(),window.addEventListener(`keydown`,this.#a)}updated(e){e.has(`open`)&&(this.#p(),this.open?(vl(this.renderRoot.querySelector(`.scrim`)),this.#d()):(xl(this),R(this.renderRoot.querySelector(`.scrim`)),this.#f()))}disconnectedCallback(){this.id&&Gd.__instances.delete(this.id),Gd.__maybeRemoveDocListener(),window.removeEventListener(`keydown`,this.#a),R(this.renderRoot.querySelector(`.scrim`)),super.disconnectedCallback()}};N([_({type:Boolean,reflect:!0})],Kd.prototype,`open`,void 0),N([_({type:String,reflect:!0})],Kd.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0,attribute:`static`})],Kd.prototype,`isStatic`,void 0),N([_({type:String,attribute:`aria-label`})],Kd.prototype,`ariaLabel`,void 0),Kd=Gd=N([a(`scb-overlay`)],Kd),w(),b(),P();var qd={fromAttribute(e){return e===null||e.toLowerCase()!==`false`},toAttribute(e){return e?``:`false`}},Jd=class extends C{constructor(...e){super(...e),this.variant=`default`,this.enableClickCarousel=!0,this.imageFallbackAlt=`Galleri-bild`,this.openImageLabel=`Öppna bild i karusell`,this.openImagePrefixLabel=`Öppna bild:`,this.carouselLabel=`Bildkarusell`,this.overlayOpen=!1,this.overlayIndex=0,this.overlayImages=[],this.#e=[],this.#t=[],this.#n=``,this.#r=null,this.#i=()=>{this.#f()},this.#a=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;t instanceof HTMLElement&&t.setAttribute(`data-scb-gallery-hover`,``)},this.#o=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;t instanceof HTMLElement&&t.removeAttribute(`data-scb-gallery-hover`)},this.#s=e=>{if(!this.enableClickCarousel)return;let t=e.currentTarget;if(!(t instanceof HTMLElement))return;let n=t.getAttribute(`data-scb-gallery-slide-index`);if(n==null)return;let r=Number(n);Number.isFinite(r)&&this.#h(r)},this.#c=e=>{this.enableClickCarousel&&(e.key!==`Enter`&&e.key!==` `&&e.key!==`Spacebar`||(e.preventDefault(),this.#s(e)))},this.#g=()=>{this.overlayOpen=!1,this.#p()}}#e;#t;#n;#r;static{this.styles=p`
13496
13496
  :host {
13497
13497
  display: block;
13498
13498
  }
@@ -13650,15 +13650,15 @@
13650
13650
  </div>
13651
13651
  </scb-overlay>
13652
13652
  `:``}
13653
- `}};N([_({type:String,reflect:!0})],qd.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0,attribute:`enable-carousel`,converter:Kd})],qd.prototype,`enableClickCarousel`,void 0),N([_({type:String,attribute:`image-fallback-alt`})],qd.prototype,`imageFallbackAlt`,void 0),N([_({type:String,attribute:`open-image-label`})],qd.prototype,`openImageLabel`,void 0),N([_({type:String,attribute:`open-image-prefix-label`})],qd.prototype,`openImagePrefixLabel`,void 0),N([_({type:String,attribute:`carousel-label`})],qd.prototype,`carouselLabel`,void 0),N([v()],qd.prototype,`overlayOpen`,void 0),N([v()],qd.prototype,`overlayIndex`,void 0),N([v()],qd.prototype,`overlayImages`,void 0),qd=N([a(`scb-gallery-grid`)],qd);var Jd=class extends HTMLElement{get label(){return this.getAttribute(`label`)??``}set label(e){this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??void 0}set icon(e){e==null||e===``?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}connectedCallback(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`),this.style.display=`none`}};customElements.define(`scb-header-menu-group`,Jd),w(),b(),P();var Yd=class extends C{constructor(...e){super(...e),this.label=``,this.href=``}static{this.styles=p`
13653
+ `}};N([_({type:String,reflect:!0})],Jd.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0,attribute:`enable-carousel`,converter:qd})],Jd.prototype,`enableClickCarousel`,void 0),N([_({type:String,attribute:`image-fallback-alt`})],Jd.prototype,`imageFallbackAlt`,void 0),N([_({type:String,attribute:`open-image-label`})],Jd.prototype,`openImageLabel`,void 0),N([_({type:String,attribute:`open-image-prefix-label`})],Jd.prototype,`openImagePrefixLabel`,void 0),N([_({type:String,attribute:`carousel-label`})],Jd.prototype,`carouselLabel`,void 0),N([v()],Jd.prototype,`overlayOpen`,void 0),N([v()],Jd.prototype,`overlayIndex`,void 0),N([v()],Jd.prototype,`overlayImages`,void 0),Jd=N([a(`scb-gallery-grid`)],Jd);var Yd=class extends HTMLElement{get label(){return this.getAttribute(`label`)??``}set label(e){this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??void 0}set icon(e){e==null||e===``?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}connectedCallback(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`),this.style.display=`none`}};customElements.define(`scb-header-menu-group`,Yd),w(),b(),P();var Xd=class extends C{constructor(...e){super(...e),this.label=``,this.href=``}static{this.styles=p`
13654
13654
  :host {
13655
13655
  display: none !important;
13656
13656
  }
13657
- `}connectedCallback(){super.connectedCallback(),this._hideDataNode()}_hideDataNode(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<slot></slot>`}};N([_({type:String})],Yd.prototype,`label`,void 0),N([_({type:String})],Yd.prototype,`href`,void 0),N([_({type:String})],Yd.prototype,`icon`,void 0),Yd=N([a(`scb-header-menu-item`)],Yd),w(),b(),P();var Xd=class extends C{constructor(...e){super(...e),this.label=``,this.href=``,this.drawerId=``}static{this.styles=p`
13657
+ `}connectedCallback(){super.connectedCallback(),this._hideDataNode()}_hideDataNode(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<slot></slot>`}};N([_({type:String})],Xd.prototype,`label`,void 0),N([_({type:String})],Xd.prototype,`href`,void 0),N([_({type:String})],Xd.prototype,`icon`,void 0),Xd=N([a(`scb-header-menu-item`)],Xd),w(),b(),P();var Zd=class extends C{constructor(...e){super(...e),this.label=``,this.href=``,this.drawerId=``}static{this.styles=p`
13658
13658
  :host {
13659
13659
  display: none !important;
13660
13660
  }
13661
- `}connectedCallback(){super.connectedCallback(),this._hideDataNode()}_hideDataNode(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<slot></slot>`}};N([_({type:String})],Xd.prototype,`label`,void 0),N([_({type:String})],Xd.prototype,`href`,void 0),N([_({type:String,attribute:`drawer-id`})],Xd.prototype,`drawerId`,void 0),Xd=N([a(`scb-header-tab`)],Xd);var Zd=class extends HTMLElement{static get observedAttributes(){return[`role`]}get label(){return this.getAttribute(`label`)??``}set label(e){this.setAttribute(`label`,e)}get href(){return this.getAttribute(`href`)??`#`}set href(e){this.setAttribute(`href`,e)}get target(){return this.getAttribute(`target`)??void 0}set target(e){e==null?this.removeAttribute(`target`):this.setAttribute(`target`,e)}connectedCallback(){this.#e()}attributeChangedCallback(e){e===`role`&&this.#e()}#e(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`aria-hidden`,`true`),this.style.display=`none`}};customElements.define(`scb-header-utility`,Zd);var Qd,$d,ef,tf=t((()=>{w(),b(),hc(),P(),$d={fromAttribute:e=>e!=null&&!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},ef=class extends C{static{Qd=this}constructor(...e){super(...e),this.label=``,this.selected=!1,this.noHighlightSelected=!1,this.leadingIcon=``,this.itemHref=``,this.hasChildren=!1,this.loading=!1,this.showSubmenuLabel=`Visa undermeny för`,this.hideSubmenuLabel=`Dölj undermeny för`,this.loadingLabel=`Laddar…`,this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.__isExpandable&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{let t=this.__keyboardItems(),n=t.indexOf(this);switch(e.key){case`ArrowDown`:{e.preventDefault();let r=t[n+1]||t[0];this.__focusMenuItem(r);break}case`ArrowUp`:{e.preventDefault();let r=t[n-1]||t[t.length-1];this.__focusMenuItem(r);break}case`Home`:{e.preventDefault();let n=t[0];this.__focusMenuItem(n);break}case`End`:{e.preventDefault();let n=t[t.length-1];this.__focusMenuItem(n);break}case`ArrowRight`:if(!this.__isExpandable)break;e.preventDefault(),this.expanded||this.__setExpanded(!0);break;case`ArrowLeft`:if(!this.__isExpandable)break;e.preventDefault(),this.expanded&&this.__setExpanded(!1);break}}}static{this.__rippleLoaded=!1}static{this.__iconLoaded=!1}static{this.__focusRingLoaded=!1}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}get __isExpandable(){return this.hasSlotContent||this.hasChildren}__submenuButtonLabel(){let e=this.expanded?this.hideSubmenuLabel:this.showSubmenuLabel;return this.label?`${e} ${this.label}`:e}async __ensureDepsLoaded(){Qd.__rippleLoaded||(await Promise.resolve().then(()=>(E(),mn)),Qd.__rippleLoaded=!0),Qd.__focusRingLoaded||(await Promise.resolve().then(()=>(Vt(),zt)),Qd.__focusRingLoaded=!0),this.leadingIcon&&!Qd.__iconLoaded&&(await Promise.resolve().then(()=>(D(),zi)),Qd.__iconLoaded=!0)}static{this.styles=p`
13661
+ `}connectedCallback(){super.connectedCallback(),this._hideDataNode()}_hideDataNode(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`hidden`,``),this.setAttribute(`aria-hidden`,`true`)}render(){return x`<slot></slot>`}};N([_({type:String})],Zd.prototype,`label`,void 0),N([_({type:String})],Zd.prototype,`href`,void 0),N([_({type:String,attribute:`drawer-id`})],Zd.prototype,`drawerId`,void 0),Zd=N([a(`scb-header-tab`)],Zd);var Qd=class extends HTMLElement{static get observedAttributes(){return[`role`]}get label(){return this.getAttribute(`label`)??``}set label(e){this.setAttribute(`label`,e)}get href(){return this.getAttribute(`href`)??`#`}set href(e){this.setAttribute(`href`,e)}get target(){return this.getAttribute(`target`)??void 0}set target(e){e==null?this.removeAttribute(`target`):this.setAttribute(`target`,e)}connectedCallback(){this.#e()}attributeChangedCallback(e){e===`role`&&this.#e()}#e(){this.hasAttribute(`role`)&&this.removeAttribute(`role`),this.setAttribute(`aria-hidden`,`true`),this.style.display=`none`}};customElements.define(`scb-header-utility`,Qd);var $d,ef,tf,nf=t((()=>{w(),b(),hc(),P(),ef={fromAttribute:e=>e!=null&&!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},tf=class extends C{static{$d=this}constructor(...e){super(...e),this.label=``,this.selected=!1,this.noHighlightSelected=!1,this.leadingIcon=``,this.itemHref=``,this.hasChildren=!1,this.loading=!1,this.showSubmenuLabel=`Visa undermeny för`,this.hideSubmenuLabel=`Dölj undermeny för`,this.loadingLabel=`Laddar…`,this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.__isExpandable&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{let t=this.__keyboardItems(),n=t.indexOf(this);switch(e.key){case`ArrowDown`:{e.preventDefault();let r=t[n+1]||t[0];this.__focusMenuItem(r);break}case`ArrowUp`:{e.preventDefault();let r=t[n-1]||t[t.length-1];this.__focusMenuItem(r);break}case`Home`:{e.preventDefault();let n=t[0];this.__focusMenuItem(n);break}case`End`:{e.preventDefault();let n=t[t.length-1];this.__focusMenuItem(n);break}case`ArrowRight`:if(!this.__isExpandable)break;e.preventDefault(),this.expanded||this.__setExpanded(!0);break;case`ArrowLeft`:if(!this.__isExpandable)break;e.preventDefault(),this.expanded&&this.__setExpanded(!1);break}}}static{this.__rippleLoaded=!1}static{this.__iconLoaded=!1}static{this.__focusRingLoaded=!1}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}get __isExpandable(){return this.hasSlotContent||this.hasChildren}__submenuButtonLabel(){let e=this.expanded?this.hideSubmenuLabel:this.showSubmenuLabel;return this.label?`${e} ${this.label}`:e}async __ensureDepsLoaded(){$d.__rippleLoaded||(await Promise.resolve().then(()=>(E(),mn)),$d.__rippleLoaded=!0),$d.__focusRingLoaded||(await Promise.resolve().then(()=>(Vt(),zt)),$d.__focusRingLoaded=!0),this.leadingIcon&&!$d.__iconLoaded&&(await Promise.resolve().then(()=>(D(),zi)),$d.__iconLoaded=!0)}static{this.styles=p`
13662
13662
  /*
13663
13663
  Designbrygga:
13664
13664
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -13961,7 +13961,7 @@
13961
13961
  </div>
13962
13962
  </div>
13963
13963
  </div>
13964
- `}__isHiddenByCollapsedAncestor(e,t){let n=e.parentElement;for(;n&&n!==t;){if(n.localName===`scb-menu-item`&&!n.expanded)return!0;n=n.parentElement}return!1}__keyboardItems(){let e=this.closest(`scb-sub-menu, scb-menu`);return e?Array.from(e.querySelectorAll(`scb-menu-item`)).filter(t=>!this.__isHiddenByCollapsedAncestor(t,e)):[this]}__focusMenuItem(e){(e?.shadowRoot?.querySelector(`.scb-menu-label-text`))?.focus()}},N([_({type:String})],ef.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0})],ef.prototype,`selected`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],ef.prototype,`noHighlightSelected`,void 0),N([_({type:String,attribute:`leading-icon`})],ef.prototype,`leadingIcon`,void 0),N([_({type:String,attribute:`item-href`})],ef.prototype,`itemHref`,void 0),N([_({type:Boolean,attribute:`has-children`,reflect:!0,converter:$d})],ef.prototype,`hasChildren`,void 0),N([_({type:Boolean,reflect:!0,converter:$d})],ef.prototype,`loading`,void 0),N([_({type:String,attribute:`show-submenu-label`})],ef.prototype,`showSubmenuLabel`,void 0),N([_({type:String,attribute:`hide-submenu-label`})],ef.prototype,`hideSubmenuLabel`,void 0),N([_({type:String,attribute:`loading-label`})],ef.prototype,`loadingLabel`,void 0),N([v()],ef.prototype,`hasSlotContent`,void 0),N([_({type:Boolean,reflect:!0})],ef.prototype,`expanded`,void 0),ef=Qd=N([a(`scb-menu-item`)],ef)})),nf,rf=t((()=>{w(),b(),Nu(),P(),nf=class extends C{constructor(...e){super(...e),this.label=``}static{this.styles=p`
13964
+ `}__isHiddenByCollapsedAncestor(e,t){let n=e.parentElement;for(;n&&n!==t;){if(n.localName===`scb-menu-item`&&!n.expanded)return!0;n=n.parentElement}return!1}__keyboardItems(){let e=this.closest(`scb-sub-menu, scb-menu`);return e?Array.from(e.querySelectorAll(`scb-menu-item`)).filter(t=>!this.__isHiddenByCollapsedAncestor(t,e)):[this]}__focusMenuItem(e){(e?.shadowRoot?.querySelector(`.scb-menu-label-text`))?.focus()}},N([_({type:String})],tf.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0})],tf.prototype,`selected`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],tf.prototype,`noHighlightSelected`,void 0),N([_({type:String,attribute:`leading-icon`})],tf.prototype,`leadingIcon`,void 0),N([_({type:String,attribute:`item-href`})],tf.prototype,`itemHref`,void 0),N([_({type:Boolean,attribute:`has-children`,reflect:!0,converter:ef})],tf.prototype,`hasChildren`,void 0),N([_({type:Boolean,reflect:!0,converter:ef})],tf.prototype,`loading`,void 0),N([_({type:String,attribute:`show-submenu-label`})],tf.prototype,`showSubmenuLabel`,void 0),N([_({type:String,attribute:`hide-submenu-label`})],tf.prototype,`hideSubmenuLabel`,void 0),N([_({type:String,attribute:`loading-label`})],tf.prototype,`loadingLabel`,void 0),N([v()],tf.prototype,`hasSlotContent`,void 0),N([_({type:Boolean,reflect:!0})],tf.prototype,`expanded`,void 0),tf=$d=N([a(`scb-menu-item`)],tf)})),rf,af=t((()=>{w(),b(),Pu(),P(),rf=class extends C{constructor(...e){super(...e),this.label=``}static{this.styles=p`
13965
13965
  /*
13966
13966
  Designbrygga:
13967
13967
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -14019,7 +14019,7 @@
14019
14019
  <div class="scb-menu-label">${this.label}</div>
14020
14020
  </div>
14021
14021
  `:``}
14022
- `}},N([_({type:String})],nf.prototype,`label`,void 0),nf=N([a(`scb-menu-section`)],nf)})),af,of=t((()=>{w(),b(),P(),af=class extends C{constructor(...e){super(...e),this.label=``,this._onGlobalSelect=e=>{let t=e;this.querySelectorAll(`scb-menu-item`).forEach(e=>e.selected=!1),this.contains(t.detail.item)&&(t.detail.item.selected=!0)}}static{this.styles=p`
14022
+ `}},N([_({type:String})],rf.prototype,`label`,void 0),rf=N([a(`scb-menu-section`)],rf)})),of,sf=t((()=>{w(),b(),P(),of=class extends C{constructor(...e){super(...e),this.label=``,this._onGlobalSelect=e=>{let t=e;this.querySelectorAll(`scb-menu-item`).forEach(e=>e.selected=!1),this.contains(t.detail.item)&&(t.detail.item.selected=!0)}}static{this.styles=p`
14023
14023
  :host {
14024
14024
  display: block;
14025
14025
  width: 100%;
@@ -14028,7 +14028,7 @@
14028
14028
  <nav aria-label="${this.label}">
14029
14029
  <slot></slot>
14030
14030
  </nav>
14031
- `}},N([_({type:String})],af.prototype,`label`,void 0),af=N([a(`scb-sub-menu`)],af)})),sf=n({ScbMenu:()=>cf}),cf,lf=t((()=>{w(),b(),Nu(),tf(),rf(),of(),P(),cf=class extends C{constructor(...e){super(...e),this.label=``,this.subLabel=``,this.noHighlightSelected=!1,this.elevation=!1,this.lazySrc=``,this.lazyIdParam=`id`,this.lazyChildrenField=``,this.lazyIdField=`id`,this.lazyLabelField=`label`,this.lazyHrefField=`href`,this.lazyHasChildrenField=`hasChildren`,this.lazyHasLinkField=`hasLink`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._lazyCache=new Map,this._onGlobalSelect=e=>{let t=e;this.querySelectorAll(`scb-menu-item`).forEach(e=>{e.selected=!1,this.noHighlightSelected?e.setAttribute(`no-highlight-selected`,``):e.removeAttribute(`no-highlight-selected`)}),this.contains(t.detail.item)&&(t.detail.item.selected=!0)},this._onMenuExpand=e=>{this._loadLazyChildren(e)}}static{this.styles=p`
14031
+ `}},N([_({type:String})],of.prototype,`label`,void 0),of=N([a(`scb-sub-menu`)],of)})),cf=n({ScbMenu:()=>lf}),lf,uf=t((()=>{w(),b(),Pu(),nf(),af(),sf(),P(),lf=class extends C{constructor(...e){super(...e),this.label=``,this.subLabel=``,this.noHighlightSelected=!1,this.elevation=!1,this.lazySrc=``,this.lazyIdParam=`id`,this.lazyChildrenField=``,this.lazyIdField=`id`,this.lazyLabelField=`label`,this.lazyHrefField=`href`,this.lazyHasChildrenField=`hasChildren`,this.lazyHasLinkField=`hasLink`,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._lazyCache=new Map,this._onGlobalSelect=e=>{let t=e;this.querySelectorAll(`scb-menu-item`).forEach(e=>{e.selected=!1,this.noHighlightSelected?e.setAttribute(`no-highlight-selected`,``):e.removeAttribute(`no-highlight-selected`)}),this.contains(t.detail.item)&&(t.detail.item.selected=!0)},this._onMenuExpand=e=>{this._loadLazyChildren(e)}}static{this.styles=p`
14032
14032
  /*
14033
14033
  Designbrygga:
14034
14034
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -14141,9 +14141,9 @@
14141
14141
  <slot></slot>
14142
14142
  </div>
14143
14143
  </nav>
14144
- `}firstUpdated(e){super.firstUpdated(e),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}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}#e(){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-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-menu-spacing-block-start`),n?this.style.setProperty(`--scb-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-menu-spacing-block-end`),r?this.style.setProperty(`--scb-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-menu-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),window.addEventListener(`scb-menu-select`,this._onGlobalSelect),this.addEventListener(`scb-menu-expand`,this._onMenuExpand)}disconnectedCallback(){window.removeEventListener(`scb-menu-select`,this._onGlobalSelect),this.removeEventListener(`scb-menu-expand`,this._onMenuExpand),super.disconnectedCallback()}async _loadLazyChildren(e){if(!this.lazySrc)return;let t=e.detail?.item;if(!t||!this.contains(t)||!e.detail?.expanded||t.hasAttribute(`data-loaded`)||!t.hasAttribute(`has-children`)||e.detail?.lazy===!1||this._hasSubMenu(t))return;let n=t.getAttribute(`data-node-id`)??t.dataset.nodeId;if(n){this._setItemLoading(t,!0),t.removeAttribute(`data-load-error`);try{let e=await this._fetchLazyChildren(n),r=this._createSubMenu(t,e);t.appendChild(r),t.setAttribute(`data-loaded`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-load`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,children:e}}))}catch(e){t.setAttribute(`data-load-error`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-error`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,error:e}}))}finally{this._setItemLoading(t,!1)}}}_setItemLoading(e,t){e.loading=t,e.toggleAttribute(`loading`,t),t?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`)}_hasSubMenu(e){return Array.from(e.children).some(e=>e.tagName===`SCB-SUB-MENU`)}_createSubMenu(e,t){let n=document.createElement(`scb-sub-menu`);n.setAttribute(`label`,e.getAttribute(`label`)??``);for(let e of t)n.appendChild(this._createLazyMenuItem(e));return n}_createLazyMenuItem(e){let t=document.createElement(`scb-menu-item`),n=this._getRecordValue(e,this.lazyIdField,[`id`,`Id`]),r=this._getRecordValue(e,this.lazyLabelField,[`label`,`Label`,`name`,`Name`]),i=this._getRecordValue(e,this.lazyHrefField,[`href`,`Href`,`url`,`Url`]),a=this._toBoolean(this._getRecordValue(e,this.lazyHasChildrenField,[`hasChildren`,`HasChildren`])),o=this._getRecordValue(e,this.lazyHasLinkField,[`hasLink`,`HasLink`]),s=o==null?!!i:this._toBoolean(o);return r!=null&&t.setAttribute(`label`,String(r)),n!=null&&t.setAttribute(`data-node-id`,String(n)),a&&t.setAttribute(`has-children`,``),s&&i!=null&&String(i).trim()&&t.setAttribute(`item-href`,String(i)),t}async _fetchLazyChildren(e){let t=`${this.lazySrc}|${this.lazyIdParam}|${e}`,n=this._lazyCache.get(t);return n||(n=fetch(this._createLazyUrl(e),{credentials:`same-origin`}).then(async e=>{if(!e.ok)throw Error(`Kunde inte ladda menybarn (${e.status}).`);let t=await e.json();return this._normalizeChildren(t)}).catch(e=>{throw this._lazyCache.delete(t),e}),this._lazyCache.set(t,n)),n}_createLazyUrl(e){if(this.lazySrc.includes(`{id}`))return this.lazySrc.split(`{id}`).join(encodeURIComponent(e));let t=new URL(this.lazySrc,document.baseURI);return this.lazyIdParam&&t.searchParams.set(this.lazyIdParam,e),t.toString()}_normalizeChildren(e){let t=Array.isArray(e)?e:this._getRecordValue(e,this.lazyChildrenField,[`children`,`Children`,`items`,`Items`,`data`,`Data`]);return Array.isArray(t)?t.filter(e=>!!e&&typeof e==`object`&&!Array.isArray(e)):[]}_getRecordValue(e,t,n=[]){if(!e||typeof e!=`object`||Array.isArray(e))return;let r=e,i=[t,...n].filter(Boolean);for(let e of i){if(e in r)return r[e];let t=Object.keys(r).find(t=>t.toLowerCase()===e.toLowerCase());if(t)return r[t]}}_toBoolean(e){return typeof e==`boolean`?e:typeof e==`number`?e!==0:typeof e==`string`?!/^(false|0|off|no|nej)$/i.test(e.trim()):!!e}},N([_({type:String})],cf.prototype,`label`,void 0),N([_({type:String,attribute:`sub-label`})],cf.prototype,`subLabel`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],cf.prototype,`noHighlightSelected`,void 0),N([_({type:Boolean,reflect:!0})],cf.prototype,`elevation`,void 0),N([_({type:String,attribute:`lazy-src`})],cf.prototype,`lazySrc`,void 0),N([_({type:String,attribute:`lazy-id-param`})],cf.prototype,`lazyIdParam`,void 0),N([_({type:String,attribute:`lazy-children-field`})],cf.prototype,`lazyChildrenField`,void 0),N([_({type:String,attribute:`lazy-id-field`})],cf.prototype,`lazyIdField`,void 0),N([_({type:String,attribute:`lazy-label-field`})],cf.prototype,`lazyLabelField`,void 0),N([_({type:String,attribute:`lazy-href-field`})],cf.prototype,`lazyHrefField`,void 0),N([_({type:String,attribute:`lazy-has-children-field`})],cf.prototype,`lazyHasChildrenField`,void 0),N([_({type:String,attribute:`lazy-has-link-field`})],cf.prototype,`lazyHasLinkField`,void 0),N([_({type:String,reflect:!0})],cf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],cf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],cf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],cf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],cf.prototype,`spacingRight`,void 0),cf=N([a(`scb-menu`)],cf)})),uf=n({renderHeaderDrawer:()=>pf}),df,ff,pf,mf=t((()=>{w(),df=e=>!e||e.length===0?x``:x`${e.map(ff)}`,ff=e=>{let t=Array.isArray(e.children)&&e.children.length>0,n=(e.href??``).trim(),r=(e.icon??``).trim(),i=t?x`
14144
+ `}firstUpdated(e){super.firstUpdated(e),this.#e()}updated(e){super.updated(e),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.#e()}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}#e(){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-menu-spacing-block-start`,t):this.style.removeProperty(`--scb-menu-spacing-block-start`),n?this.style.setProperty(`--scb-menu-spacing-block-end`,n):this.style.removeProperty(`--scb-menu-spacing-block-end`),r?this.style.setProperty(`--scb-menu-spacing-inline-start`,r):this.style.removeProperty(`--scb-menu-spacing-inline-start`),i?this.style.setProperty(`--scb-menu-spacing-inline-end`,i):this.style.removeProperty(`--scb-menu-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),window.addEventListener(`scb-menu-select`,this._onGlobalSelect),this.addEventListener(`scb-menu-expand`,this._onMenuExpand)}disconnectedCallback(){window.removeEventListener(`scb-menu-select`,this._onGlobalSelect),this.removeEventListener(`scb-menu-expand`,this._onMenuExpand),super.disconnectedCallback()}async _loadLazyChildren(e){if(!this.lazySrc)return;let t=e.detail?.item;if(!t||!this.contains(t)||!e.detail?.expanded||t.hasAttribute(`data-loaded`)||!t.hasAttribute(`has-children`)||e.detail?.lazy===!1||this._hasSubMenu(t))return;let n=t.getAttribute(`data-node-id`)??t.dataset.nodeId;if(n){this._setItemLoading(t,!0),t.removeAttribute(`data-load-error`);try{let e=await this._fetchLazyChildren(n),r=this._createSubMenu(t,e);t.appendChild(r),t.setAttribute(`data-loaded`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-load`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,children:e}}))}catch(e){t.setAttribute(`data-load-error`,``),this.dispatchEvent(new CustomEvent(`scb-menu-lazy-error`,{bubbles:!0,composed:!0,detail:{item:t,nodeId:n,error:e}}))}finally{this._setItemLoading(t,!1)}}}_setItemLoading(e,t){e.loading=t,e.toggleAttribute(`loading`,t),t?e.setAttribute(`aria-busy`,`true`):e.removeAttribute(`aria-busy`)}_hasSubMenu(e){return Array.from(e.children).some(e=>e.tagName===`SCB-SUB-MENU`)}_createSubMenu(e,t){let n=document.createElement(`scb-sub-menu`);n.setAttribute(`label`,e.getAttribute(`label`)??``);for(let e of t)n.appendChild(this._createLazyMenuItem(e));return n}_createLazyMenuItem(e){let t=document.createElement(`scb-menu-item`),n=this._getRecordValue(e,this.lazyIdField,[`id`,`Id`]),r=this._getRecordValue(e,this.lazyLabelField,[`label`,`Label`,`name`,`Name`]),i=this._getRecordValue(e,this.lazyHrefField,[`href`,`Href`,`url`,`Url`]),a=this._toBoolean(this._getRecordValue(e,this.lazyHasChildrenField,[`hasChildren`,`HasChildren`])),o=this._getRecordValue(e,this.lazyHasLinkField,[`hasLink`,`HasLink`]),s=o==null?!!i:this._toBoolean(o);return r!=null&&t.setAttribute(`label`,String(r)),n!=null&&t.setAttribute(`data-node-id`,String(n)),a&&t.setAttribute(`has-children`,``),s&&i!=null&&String(i).trim()&&t.setAttribute(`item-href`,String(i)),t}async _fetchLazyChildren(e){let t=`${this.lazySrc}|${this.lazyIdParam}|${e}`,n=this._lazyCache.get(t);return n||(n=fetch(this._createLazyUrl(e),{credentials:`same-origin`}).then(async e=>{if(!e.ok)throw Error(`Kunde inte ladda menybarn (${e.status}).`);let t=await e.json();return this._normalizeChildren(t)}).catch(e=>{throw this._lazyCache.delete(t),e}),this._lazyCache.set(t,n)),n}_createLazyUrl(e){if(this.lazySrc.includes(`{id}`))return this.lazySrc.split(`{id}`).join(encodeURIComponent(e));let t=new URL(this.lazySrc,document.baseURI);return this.lazyIdParam&&t.searchParams.set(this.lazyIdParam,e),t.toString()}_normalizeChildren(e){let t=Array.isArray(e)?e:this._getRecordValue(e,this.lazyChildrenField,[`children`,`Children`,`items`,`Items`,`data`,`Data`]);return Array.isArray(t)?t.filter(e=>!!e&&typeof e==`object`&&!Array.isArray(e)):[]}_getRecordValue(e,t,n=[]){if(!e||typeof e!=`object`||Array.isArray(e))return;let r=e,i=[t,...n].filter(Boolean);for(let e of i){if(e in r)return r[e];let t=Object.keys(r).find(t=>t.toLowerCase()===e.toLowerCase());if(t)return r[t]}}_toBoolean(e){return typeof e==`boolean`?e:typeof e==`number`?e!==0:typeof e==`string`?!/^(false|0|off|no|nej)$/i.test(e.trim()):!!e}},N([_({type:String})],lf.prototype,`label`,void 0),N([_({type:String,attribute:`sub-label`})],lf.prototype,`subLabel`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],lf.prototype,`noHighlightSelected`,void 0),N([_({type:Boolean,reflect:!0})],lf.prototype,`elevation`,void 0),N([_({type:String,attribute:`lazy-src`})],lf.prototype,`lazySrc`,void 0),N([_({type:String,attribute:`lazy-id-param`})],lf.prototype,`lazyIdParam`,void 0),N([_({type:String,attribute:`lazy-children-field`})],lf.prototype,`lazyChildrenField`,void 0),N([_({type:String,attribute:`lazy-id-field`})],lf.prototype,`lazyIdField`,void 0),N([_({type:String,attribute:`lazy-label-field`})],lf.prototype,`lazyLabelField`,void 0),N([_({type:String,attribute:`lazy-href-field`})],lf.prototype,`lazyHrefField`,void 0),N([_({type:String,attribute:`lazy-has-children-field`})],lf.prototype,`lazyHasChildrenField`,void 0),N([_({type:String,attribute:`lazy-has-link-field`})],lf.prototype,`lazyHasLinkField`,void 0),N([_({type:String,reflect:!0})],lf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],lf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],lf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],lf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],lf.prototype,`spacingRight`,void 0),lf=N([a(`scb-menu`)],lf)})),df=n({renderHeaderDrawer:()=>mf}),ff,pf,mf,hf=t((()=>{w(),ff=e=>!e||e.length===0?x``:x`${e.map(pf)}`,pf=e=>{let t=Array.isArray(e.children)&&e.children.length>0,n=(e.href??``).trim(),r=(e.icon??``).trim(),i=t?x`
14145
14145
  <scb-sub-menu label=${e.label}>
14146
- ${e.children.map(ff)}
14146
+ ${e.children.map(pf)}
14147
14147
  </scb-sub-menu>
14148
14148
  `:S;return r&&n?x`
14149
14149
  <scb-menu-item label=${e.label} ?selected=${!1} leading-icon=${r} item-href=${n}>
@@ -14157,7 +14157,7 @@
14157
14157
  <scb-menu-item label=${e.label} ?selected=${!1} item-href=${n}>
14158
14158
  ${i}
14159
14159
  </scb-menu-item>
14160
- `:x`<scb-menu-item label=${e.label} ?selected=${!1}>${i}</scb-menu-item>`},pf=e=>x`
14160
+ `:x`<scb-menu-item label=${e.label} ?selected=${!1}>${i}</scb-menu-item>`},mf=e=>x`
14161
14161
  <scb-drawer
14162
14162
  id=${e.drawerId}
14163
14163
  floating
@@ -14199,7 +14199,7 @@
14199
14199
  ></scb-menu-section>
14200
14200
  `:S}
14201
14201
 
14202
- ${df(e.menu)}
14202
+ ${ff(e.menu)}
14203
14203
 
14204
14204
  ${e.includeUtilityInMenu&&(e.utils?.length??0)>0?x`
14205
14205
  <scb-menu-section label=''></scb-menu-section>
@@ -14213,7 +14213,7 @@
14213
14213
  </scb-menu>
14214
14214
  `}
14215
14215
  </scb-drawer>
14216
- `})),hf=n({ScbSkeleton:()=>gf}),gf,_f=t((()=>{w(),b(),P(),gf=class extends C{constructor(...e){super(...e),this.variant=`rectangular`,this.width=`100%`,this.height=`100%`,this.borderSize=`small`,this.assistiveText=``,this._managedAriaHidden=!1,this._managedRole=!1,this._managedAriaLive=!1,this._managedAriaLabel=!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`
14216
+ `})),gf=n({ScbSkeleton:()=>_f}),_f,vf=t((()=>{w(),b(),P(),_f=class extends C{constructor(...e){super(...e),this.variant=`rectangular`,this.width=`100%`,this.height=`100%`,this.borderSize=`small`,this.assistiveText=``,this._managedAriaHidden=!1,this._managedRole=!1,this._managedAriaLive=!1,this._managedAriaLabel=!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`
14217
14217
  :host {
14218
14218
  display: inline-block;
14219
14219
  max-width: var(--scb-skeleton-width);
@@ -14267,7 +14267,7 @@
14267
14267
  <div
14268
14268
  class="skeleton${this.variant===`circular`?` circle`:``} ${this.variant===`rounded`?` rounded`:``}"
14269
14269
  ><slot></slot></div>
14270
- `}},N([_({type:String})],gf.prototype,`variant`,void 0),N([_({type:String})],gf.prototype,`width`,void 0),N([_({type:String})],gf.prototype,`height`,void 0),N([_({type:String,attribute:`border-size`})],gf.prototype,`borderSize`,void 0),N([_({type:String,attribute:`assistive-text`})],gf.prototype,`assistiveText`,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-skeleton`)],gf)}));w(),b(),uc(),P();var vf,yf=0,bf=[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=`
14270
+ `}},N([_({type:String})],_f.prototype,`variant`,void 0),N([_({type:String})],_f.prototype,`width`,void 0),N([_({type:String})],_f.prototype,`height`,void 0),N([_({type:String,attribute:`border-size`})],_f.prototype,`borderSize`,void 0),N([_({type:String,attribute:`assistive-text`})],_f.prototype,`assistiveText`,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-skeleton`)],_f)}));w(),b(),uc(),P();var yf,bf=0,xf=[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=`
14271
14271
  scb-header:not(:defined),
14272
14272
  scb-header[data-upgrading] {
14273
14273
  display: block;
@@ -14320,7 +14320,7 @@
14320
14320
  );
14321
14321
  }
14322
14322
  }
14323
- `,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}, ${bf[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 xf={fromAttribute:e=>e==null||!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},Sf={fromAttribute:e=>e!=null&&!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},Cf={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{vf=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>=vf.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=++yf;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`,vf.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx(`--bp-md`,vf.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}static{this.styles=p`
14323
+ `,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}, ${xf[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 Sf={fromAttribute:e=>e==null||!/^(false|0|off|no)$/i.test(e),toAttribute:e=>String(!!e)},Cf={fromAttribute:e=>e!=null&&!/^(false|0|off|no)$/i.test(e),toAttribute:e=>e?``:null},wf={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}},X=class extends C{static{yf=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>=yf.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=++bf;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`,yf.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx(`--bp-md`,yf.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}static{this.styles=p`
14324
14324
  :host {
14325
14325
  /* Headertext: base text current. JSON-källa: src/tokens/source/typography.json. */
14326
14326
  --scb-header-search-text-font-weight-current: var(--scb-header-design-search-text-large-font-weight);
@@ -15586,7 +15586,7 @@
15586
15586
  }
15587
15587
 
15588
15588
  /* design:bindings:scb-header:end */
15589
- `}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}, ${bf[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(()=>(ud(),sd)),Promise.resolve().then(()=>(lf(),sf)),Promise.resolve().then(()=>(bu(),vu)),Promise.resolve().then(()=>(mf(),uf)).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(()=>(Oc(),Cc)):Promise.resolve(),this._drawerSlotContains(`scb-icon-button`)?Promise.resolve().then(()=>(al(),el)):Promise.resolve(),this._drawerSlotContains(`scb-skeleton`)?Promise.resolve().then(()=>(_f(),hf)):Promise.resolve(),this._drawerSlotContains(`scb-grid`)?Promise.resolve().then(()=>(Nd(),jd)):Promise.resolve(),this._drawerSlotContains(`scb-grid-item`)?Promise.resolve().then(()=>(Dd(),wd)):Promise.resolve()])}async _ensureDropdownReady(){customElements.get(`scb-dropdown`)||(this._dropdownImportPromise??=Promise.resolve().then(()=>(vd(),_d)).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`
15589
+ `}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}, ${xf[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(()=>(dd(),cd)),Promise.resolve().then(()=>(uf(),cf)),Promise.resolve().then(()=>(xu(),yu)),Promise.resolve().then(()=>(hf(),df)).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(()=>(Oc(),Cc)):Promise.resolve(),this._drawerSlotContains(`scb-icon-button`)?Promise.resolve().then(()=>(sl(),tl)):Promise.resolve(),this._drawerSlotContains(`scb-skeleton`)?Promise.resolve().then(()=>(vf(),gf)):Promise.resolve(),this._drawerSlotContains(`scb-grid`)?Promise.resolve().then(()=>(Pd(),Md)):Promise.resolve(),this._drawerSlotContains(`scb-grid-item`)?Promise.resolve().then(()=>(Od(),Td)):Promise.resolve()])}async _ensureDropdownReady(){customElements.get(`scb-dropdown`)||(this._dropdownImportPromise??=Promise.resolve().then(()=>(yd(),vd)).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`
15590
15590
  <button
15591
15591
  type="button"
15592
15592
  class=${`${n} header-icon-button`}
@@ -15825,7 +15825,7 @@
15825
15825
  </clipPath>
15826
15826
  </defs>
15827
15827
  </svg>
15828
- `}};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:Cf})],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:Sf})],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:Sf})],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:Sf})],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:Sf})],Z.prototype,`deferDrawer`,void 0),N([_({type:Boolean,attribute:`show-drawer`,reflect:!0,converter:xf})],Z.prototype,`showDrawer`,void 0),N([_({type:Boolean,attribute:`always-show-menu-button`,reflect:!0,converter:Sf})],Z.prototype,`alwaysShowMenuButton`,void 0),N([_({type:Boolean,attribute:`show-search`,reflect:!0,converter:xf})],Z.prototype,`showSearch`,void 0),N([_({type:Boolean,attribute:`include-utility-in-menu`,reflect:!0,converter:Sf})],Z.prototype,`includeUtilityInMenu`,void 0),N([_({type:Boolean,attribute:`drawer-overlay`,reflect:!0,converter:xf})],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=vf=N([a(`scb-header`)],Z),w(),b(),uc(),P();var wf={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Tf,Ef,Df;function Of(){return Tf??=Promise.resolve().then(()=>(j(),nc)),Tf}function kf(){return Ef??=Promise.resolve().then(()=>(Sc(),vc)),Ef}function Af(){return Df??=Promise.resolve().then(()=>(D(),zi)),Df}var jf=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,Of().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`
15828
+ `}};N([_({type:String,attribute:`max-width`})],X.prototype,`maxWidth`,void 0),N([_({type:String,attribute:`padding-inline`,reflect:!0})],X.prototype,`paddingInline`,void 0),N([_({type:String,attribute:`padding-inline-expanded`,reflect:!0})],X.prototype,`paddingInlineExpanded`,void 0),N([_({type:String,reflect:!0})],X.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],X.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],X.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,converter:wf})],X.prototype,`size`,void 0),N([_({type:String,attribute:`logo-text`})],X.prototype,`logoText`,void 0),N([_({type:String,attribute:`logotype-text`})],X.prototype,`logotypeText`,void 0),N([_({type:String,attribute:`logo-alt`})],X.prototype,`logoAlt`,void 0),N([_({type:String,attribute:`logo-href`})],X.prototype,`logoHref`,void 0),N([_({type:String,attribute:`logo-src`})],X.prototype,`logoSrc`,void 0),N([_({type:String,attribute:`logo-width`})],X.prototype,`logoWidth`,void 0),N([_({type:String,attribute:`logo-height`})],X.prototype,`logoHeight`,void 0),N([_({type:String,attribute:`logo-aspect-ratio`})],X.prototype,`logoAspectRatio`,void 0),N([_({type:Boolean,attribute:`logo-invert-dm`,reflect:!0,converter:Cf})],X.prototype,`logoInvertDm`,void 0),N([_({type:Boolean,reflect:!0})],X.prototype,`banner`,void 0),N([_({type:String,attribute:`banner-label`})],X.prototype,`bannerLabel`,void 0),N([_({type:Array,attribute:`tabs`,converter:X._JSON_ARRAY})],X.prototype,`tabs`,void 0),N([_({type:Number,attribute:`active-tab`,reflect:!0})],X.prototype,`activeTab`,void 0),N([_({type:Boolean,attribute:`reserve-tabs`,reflect:!0,converter:Cf})],X.prototype,`reserveTabs`,void 0),N([_({type:Number,attribute:`reserve-tabs-count`})],X.prototype,`reserveTabsCount`,void 0),N([_({type:String,attribute:`reserve-tabs-widths`})],X.prototype,`reserveTabsWidths`,void 0),N([_({type:Boolean,attribute:`layout-pending`,reflect:!0,converter:Cf})],X.prototype,`layoutPending`,void 0),N([_({type:Array,attribute:`utility-items`,converter:X._JSON_ARRAY})],X.prototype,`utilityItems`,void 0),N([_({type:String,attribute:`search-placeholder`})],X.prototype,`searchPlaceholder`,void 0),N([_({type:String,attribute:`search-button-label`})],X.prototype,`searchButtonLabel`,void 0),N([_({type:String,attribute:`search-clear-label`})],X.prototype,`searchClearLabel`,void 0),N([_({type:String,attribute:`search-close-label`})],X.prototype,`searchCloseLabel`,void 0),N([_({type:String,attribute:`menu-label`})],X.prototype,`menuLabel`,void 0),N([_({type:String,attribute:`menu-button-label`})],X.prototype,`menuButtonLabel`,void 0),N([_({type:String,attribute:`menu-open-label`})],X.prototype,`menuOpenLabel`,void 0),N([_({type:String,attribute:`menu-sub-label`})],X.prototype,`menuSubLabel`,void 0),N([_({type:String,attribute:`menu-section-label`})],X.prototype,`menuSectionLabel`,void 0),N([_({type:String,attribute:`menu-search-placeholder`})],X.prototype,`menuSearchPlaceholder`,void 0),N([_({type:String,attribute:`utility-navigation-label`})],X.prototype,`utilityNavigationLabel`,void 0),N([_({type:String,attribute:`main-navigation-label`})],X.prototype,`mainNavigationLabel`,void 0),N([_({type:Array,attribute:`menu-data`,converter:X._JSON_ARRAY})],X.prototype,`menuData`,void 0),N([_({type:Boolean,attribute:`defer-drawer`,reflect:!0,converter:Cf})],X.prototype,`deferDrawer`,void 0),N([_({type:Boolean,attribute:`show-drawer`,reflect:!0,converter:Sf})],X.prototype,`showDrawer`,void 0),N([_({type:Boolean,attribute:`always-show-menu-button`,reflect:!0,converter:Cf})],X.prototype,`alwaysShowMenuButton`,void 0),N([_({type:Boolean,attribute:`show-search`,reflect:!0,converter:Sf})],X.prototype,`showSearch`,void 0),N([_({type:Boolean,attribute:`include-utility-in-menu`,reflect:!0,converter:Cf})],X.prototype,`includeUtilityInMenu`,void 0),N([_({type:Boolean,attribute:`drawer-overlay`,reflect:!0,converter:Sf})],X.prototype,`drawerOverlay`,void 0),N([_({type:String,attribute:`search-max`})],X.prototype,`searchMax`,void 0),N([_({type:String,attribute:`search-min`})],X.prototype,`searchMin`,void 0),N([_({type:String,attribute:`search-height`})],X.prototype,`searchHeight`,void 0),N([_({type:String,attribute:`search-text`,reflect:!0})],X.prototype,`searchText`,void 0),N([v()],X.prototype,`_drawerId`,void 0),N([v()],X.prototype,`_menuExpanded`,void 0),N([v()],X.prototype,`_searchId`,void 0),N([v()],X.prototype,`_drawerReady`,void 0),N([v()],X.prototype,`_mobileSearchOpen`,void 0),N([v()],X.prototype,`_slotNavItems`,void 0),N([v()],X.prototype,`_slotUtils`,void 0),N([v()],X.prototype,`_slotMenu`,void 0),N([v()],X.prototype,`_collapsed`,void 0),N([v()],X.prototype,`_tabsCollapsed`,void 0),N([v()],X.prototype,`_desktop`,void 0),N([v()],X.prototype,`_hideLogoText`,void 0),X=yf=N([a(`scb-header`)],X),w(),b(),uc(),P();var Tf={fromAttribute:e=>e??``,toAttribute:e=>typeof e==`string`?e.trim()===``?null:e:null},Ef,Df,Of;function kf(){return Ef??=Promise.resolve().then(()=>(j(),nc)),Ef}function Af(){return Df??=Promise.resolve().then(()=>(Sc(),vc)),Df}function jf(){return Of??=Promise.resolve().then(()=>(D(),zi)),Of}var Mf=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,kf().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`
15829
15829
  /*
15830
15830
  Designbrygga:
15831
15831
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -16215,7 +16215,7 @@
16215
16215
  --scb-keyfigure-card-design-supporting-font-weight: var(--scb-keyfigure-card-design-supporting-large-font-weight);
16216
16216
  }
16217
16217
  /* design:bindings:scb-keyfigure-card:end */
16218
- `}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 Af()}__ensureRipple(e){if(this.__effectiveHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,kf().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 kf();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`
16218
+ `}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 jf()}__ensureRipple(e){if(this.__effectiveHref){if(e&&(this.__pendingRippleEvent=e),this.__rippleLoaded){this.__syncRipple();return}this.__rippleRequested||(this.__rippleRequested=!0,Af().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 Af();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`
16219
16219
  <div
16220
16220
  class="scb-keyfigure-card ${t?`clickable`:``} ${this.size}"
16221
16221
  role=${t?`link`:`group`}
@@ -16256,7 +16256,7 @@
16256
16256
  </div>
16257
16257
 
16258
16258
  ${t&&this.__focusRingLoaded?x`<md-focus-ring></md-focus-ring>`:``}
16259
- `}__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`})],jf.prototype,`keyfigure`,void 0),N([_({type:String,attribute:`subtitle`})],jf.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],jf.prototype,`supportingText`,void 0),N([_({type:String,attribute:`card-href`})],jf.prototype,`cardHref`,void 0),N([_({type:String,attribute:`href`})],jf.prototype,`href`,void 0),N([_({type:String})],jf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],jf.prototype,`size`,void 0),N([_({type:String})],jf.prototype,`unit`,void 0),N([_({type:String,reflect:!0})],jf.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],jf.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],jf.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],jf.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0,converter:wf})],jf.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],jf.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],jf.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],jf.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],jf.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],jf.prototype,`spacingRight`,void 0),jf=N([a(`scb-keyfigure-card`)],jf),w(),b(),cl(),j(),P();var Mf=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`
16259
+ `}__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`})],Mf.prototype,`keyfigure`,void 0),N([_({type:String,attribute:`subtitle`})],Mf.prototype,`subtitle`,void 0),N([_({type:String,attribute:`supporting-text`})],Mf.prototype,`supportingText`,void 0),N([_({type:String,attribute:`card-href`})],Mf.prototype,`cardHref`,void 0),N([_({type:String,attribute:`href`})],Mf.prototype,`href`,void 0),N([_({type:String})],Mf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`size`,void 0),N([_({type:String})],Mf.prototype,`unit`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`width`,void 0),N([_({type:String,reflect:!0,attribute:`max-width`})],Mf.prototype,`maxWidth`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`height`,void 0),N([_({type:String,reflect:!0,attribute:`max-height`})],Mf.prototype,`maxHeight`,void 0),N([_({type:String,reflect:!0,converter:Tf})],Mf.prototype,`sizing`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`spacing`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-top`})],Mf.prototype,`spacingTop`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-bottom`})],Mf.prototype,`spacingBottom`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-left`})],Mf.prototype,`spacingLeft`,void 0),N([_({type:String,reflect:!0,attribute:`spacing-right`})],Mf.prototype,`spacingRight`,void 0),Mf=N([a(`scb-keyfigure-card`)],Mf),w(),b(),ll(),j(),P();var Nf=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`
16260
16260
  :host {
16261
16261
  display: inline-flex;
16262
16262
  inline-size: fit-content;
@@ -16461,11 +16461,11 @@
16461
16461
  <a
16462
16462
  class="link-button"
16463
16463
  part="anchor"
16464
- href=${ol(this.href||void 0)}
16465
- target=${ol(this.target)}
16466
- rel=${ol(e)}
16467
- download=${ol(this.download)}
16468
- aria-label=${ol(this.ariaLabel||void 0)}
16464
+ href=${L(this.href||void 0)}
16465
+ target=${L(this.target)}
16466
+ rel=${L(e)}
16467
+ download=${L(this.download)}
16468
+ aria-label=${L(this.ariaLabel||void 0)}
16469
16469
  @focusin=${this.#e}
16470
16470
  >
16471
16471
  <span class="label" part="label"><slot></slot></span>
@@ -16478,7 +16478,7 @@
16478
16478
  </span>
16479
16479
  <md-focus-ring aria-hidden="true"></md-focus-ring>
16480
16480
  </a>
16481
- `}#e};N([_({type:String,reflect:!0})],Mf.prototype,`href`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`target`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`rel`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`download`,void 0),N([_({type:String,attribute:`aria-label`})],Mf.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],Mf.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0})],Mf.prototype,`inverse`,void 0),N([_({type:Boolean,reflect:!0})],Mf.prototype,`external`,void 0),Mf=N([a(`scb-link-button`)],Mf),lf(),w(),b(),P();var Nf=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`
16481
+ `}#e};N([_({type:String,reflect:!0})],Nf.prototype,`href`,void 0),N([_({type:String,reflect:!0})],Nf.prototype,`target`,void 0),N([_({type:String,reflect:!0})],Nf.prototype,`rel`,void 0),N([_({type:String,reflect:!0})],Nf.prototype,`download`,void 0),N([_({type:String,attribute:`aria-label`})],Nf.prototype,`ariaLabel`,void 0),N([_({type:String,reflect:!0})],Nf.prototype,`variant`,void 0),N([_({type:Boolean,reflect:!0})],Nf.prototype,`inverse`,void 0),N([_({type:Boolean,reflect:!0})],Nf.prototype,`external`,void 0),Nf=N([a(`scb-link-button`)],Nf),uf(),w(),b(),P();var Pf=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`
16482
16482
  :host {
16483
16483
  display: inline-flex;
16484
16484
  align-items: center;
@@ -16505,7 +16505,7 @@
16505
16505
  .label {
16506
16506
  pointer-events: none;
16507
16507
  }
16508
- `}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})],Nf.prototype,`href`,void 0),N([_({type:String,attribute:`data-href`})],Nf.prototype,`dataHref`,void 0),N([_({type:Boolean,reflect:!0})],Nf.prototype,`disabled`,void 0),Nf=N([a(`scb-nav-item`)],Nf),w(),b(),E(),j(),P();var Pf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},Ff=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`
16508
+ `}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})],Pf.prototype,`href`,void 0),N([_({type:String,attribute:`data-href`})],Pf.prototype,`dataHref`,void 0),N([_({type:Boolean,reflect:!0})],Pf.prototype,`disabled`,void 0),Pf=N([a(`scb-nav-item`)],Pf),w(),b(),E(),j(),P();var Ff={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},If=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`
16509
16509
  /*
16510
16510
  Designbrygga:
16511
16511
  - Ändra tokenvärden i src/tokens/source/sizing.json eller src/tokens/source/typography.json.
@@ -16812,7 +16812,7 @@
16812
16812
  aria-label=${this.leftScrollButtonLabel}
16813
16813
  @click=${this.__scrollLeft}
16814
16814
  >
16815
- ${Bd(`chevron_left`,`scb-nav__scroll-control-icon`)}
16815
+ ${Vd(`chevron_left`,`scb-nav__scroll-control-icon`)}
16816
16816
  </button>
16817
16817
  `:``}
16818
16818
  ${this.scrollShadow?x`<div class="scb-nav__scroll-shadow-left"></div>`:``}
@@ -16827,11 +16827,11 @@
16827
16827
  aria-label=${this.rightScrollButtonLabel}
16828
16828
  @click=${this.__scrollRight}
16829
16829
  >
16830
- ${Bd(`chevron_right`,`scb-nav__scroll-control-icon`)}
16830
+ ${Vd(`chevron_right`,`scb-nav__scroll-control-icon`)}
16831
16831
  </button>
16832
16832
  `:``}
16833
16833
  </div>
16834
- `}};N([v()],Ff.prototype,`__canScrollLeft`,void 0),N([v()],Ff.prototype,`__canScrollRight`,void 0),N([_({type:String})],Ff.prototype,`label`,void 0),N([_({type:String,attribute:`active-href`})],Ff.prototype,`activeHref`,void 0),N([_({type:Boolean,attribute:`activate-on-click`,converter:Pf})],Ff.prototype,`activateOnClick`,void 0),N([_({type:Boolean,attribute:`scroll-shadow`,converter:Pf})],Ff.prototype,`scrollShadow`,void 0),N([_({type:String,attribute:`left-scroll-button-label`})],Ff.prototype,`leftScrollButtonLabel`,void 0),N([_({type:String,attribute:`right-scroll-button-label`})],Ff.prototype,`rightScrollButtonLabel`,void 0),N([_({type:Boolean,reflect:!0})],Ff.prototype,`sticky`,void 0),N([_({type:String,attribute:`sticky-top`})],Ff.prototype,`stickyTop`,void 0),N([_({type:Number,attribute:`sticky-z-index`})],Ff.prototype,`stickyZIndex`,void 0),N([_({type:String,attribute:`sticky-background`})],Ff.prototype,`stickyBackground`,void 0),N([_({type:String,reflect:!0})],Ff.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Ff.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Ff.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Ff.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Ff.prototype,`spacingRight`,void 0),Ff=N([a(`scb-nav`)],Ff),w(),b(),dl(),Oc(),al(),D(),cc(),P();var If=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`
16834
+ `}};N([v()],If.prototype,`__canScrollLeft`,void 0),N([v()],If.prototype,`__canScrollRight`,void 0),N([_({type:String})],If.prototype,`label`,void 0),N([_({type:String,attribute:`active-href`})],If.prototype,`activeHref`,void 0),N([_({type:Boolean,attribute:`activate-on-click`,converter:Ff})],If.prototype,`activateOnClick`,void 0),N([_({type:Boolean,attribute:`scroll-shadow`,converter:Ff})],If.prototype,`scrollShadow`,void 0),N([_({type:String,attribute:`left-scroll-button-label`})],If.prototype,`leftScrollButtonLabel`,void 0),N([_({type:String,attribute:`right-scroll-button-label`})],If.prototype,`rightScrollButtonLabel`,void 0),N([_({type:Boolean,reflect:!0})],If.prototype,`sticky`,void 0),N([_({type:String,attribute:`sticky-top`})],If.prototype,`stickyTop`,void 0),N([_({type:Number,attribute:`sticky-z-index`})],If.prototype,`stickyZIndex`,void 0),N([_({type:String,attribute:`sticky-background`})],If.prototype,`stickyBackground`,void 0),N([_({type:String,reflect:!0})],If.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],If.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],If.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],If.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],If.prototype,`spacingRight`,void 0),If=N([a(`scb-nav`)],If),w(),b(),fl(),Oc(),sl(),D(),cc(),P();var Lf=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`
16835
16835
  :host {
16836
16836
  display: block;
16837
16837
  width: 100%;
@@ -17221,7 +17221,7 @@
17221
17221
  ${p}
17222
17222
  </div>
17223
17223
  </nav>
17224
- `}};N([_({type:String})],If.prototype,`variant`,void 0),N([_({type:String})],If.prototype,`alignment`,void 0),N([_({type:Number})],If.prototype,`page`,void 0),N([_({type:Number,attribute:`total-pages`})],If.prototype,`totalPages`,void 0),N([_({type:String,attribute:`paging-href`})],If.prototype,`pagingHref`,void 0),N([_({type:String,attribute:`base-uri`})],If.prototype,`baseUri`,void 0),N([_({type:String,attribute:`pagination-aria-label`})],If.prototype,`paginationAriaLabel`,void 0),N([_({type:String,attribute:`current-aria-label`})],If.prototype,`currentAriaLabel`,void 0),N([_({type:String,attribute:`paging-number-aria-label`})],If.prototype,`pagingNumberAriaLabel`,void 0),N([_({type:String,attribute:`previous-label`})],If.prototype,`previousLabel`,void 0),N([_({type:String,attribute:`next-label`})],If.prototype,`nextLabel`,void 0),N([_({type:String,attribute:`previous-aria-label`})],If.prototype,`previousAriaLabel`,void 0),N([_({type:String,attribute:`next-aria-label`})],If.prototype,`nextAriaLabel`,void 0),N([_({type:Boolean})],If.prototype,`isNarrow`,void 0),N([_({type:String})],If.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`})],If.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`})],If.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`})],If.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`})],If.prototype,`spacingRight`,void 0),If=N([a(`scb-pagination`)],If),w(),b(),P();var Lf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},Rf=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`
17224
+ `}};N([_({type:String})],Lf.prototype,`variant`,void 0),N([_({type:String})],Lf.prototype,`alignment`,void 0),N([_({type:Number})],Lf.prototype,`page`,void 0),N([_({type:Number,attribute:`total-pages`})],Lf.prototype,`totalPages`,void 0),N([_({type:String,attribute:`paging-href`})],Lf.prototype,`pagingHref`,void 0),N([_({type:String,attribute:`base-uri`})],Lf.prototype,`baseUri`,void 0),N([_({type:String,attribute:`pagination-aria-label`})],Lf.prototype,`paginationAriaLabel`,void 0),N([_({type:String,attribute:`current-aria-label`})],Lf.prototype,`currentAriaLabel`,void 0),N([_({type:String,attribute:`paging-number-aria-label`})],Lf.prototype,`pagingNumberAriaLabel`,void 0),N([_({type:String,attribute:`previous-label`})],Lf.prototype,`previousLabel`,void 0),N([_({type:String,attribute:`next-label`})],Lf.prototype,`nextLabel`,void 0),N([_({type:String,attribute:`previous-aria-label`})],Lf.prototype,`previousAriaLabel`,void 0),N([_({type:String,attribute:`next-aria-label`})],Lf.prototype,`nextAriaLabel`,void 0),N([_({type:Boolean})],Lf.prototype,`isNarrow`,void 0),N([_({type:String})],Lf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`})],Lf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`})],Lf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`})],Lf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`})],Lf.prototype,`spacingRight`,void 0),Lf=N([a(`scb-pagination`)],Lf),w(),b(),P();var Rf={fromAttribute(e){return e!==null&&e.toLowerCase()!==`false`}},zf=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`
17225
17225
  .circular {
17226
17226
  display: flex;
17227
17227
  align-items: center;
@@ -17321,7 +17321,7 @@
17321
17321
  </div>
17322
17322
  `}
17323
17323
  </div>
17324
- `}};N([_({type:String})],Rf.prototype,`id`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`type`,void 0),N([_({type:Number,reflect:!0})],Rf.prototype,`progress`,void 0),N([_({type:Boolean,attribute:`is-static`,converter:Lf})],Rf.prototype,`isStatic`,void 0),N([_({type:String,attribute:`loading-label`})],Rf.prototype,`loadingLabel`,void 0),N([_({type:String,attribute:`progress-label`})],Rf.prototype,`progressLabel`,void 0),N([_({type:String,reflect:!0})],Rf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Rf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Rf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Rf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Rf.prototype,`spacingRight`,void 0),Rf=N([a(`scb-progress-indicator`)],Rf),E(),w(),b(),j(),Cl(),P();var zf=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||!_l(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||!yl(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`
17324
+ `}};N([_({type:String})],zf.prototype,`id`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`type`,void 0),N([_({type:Number,reflect:!0})],zf.prototype,`progress`,void 0),N([_({type:Boolean,attribute:`is-static`,converter:Rf})],zf.prototype,`isStatic`,void 0),N([_({type:String,attribute:`loading-label`})],zf.prototype,`loadingLabel`,void 0),N([_({type:String,attribute:`progress-label`})],zf.prototype,`progressLabel`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],zf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],zf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],zf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],zf.prototype,`spacingRight`,void 0),zf=N([a(`scb-progress-indicator`)],zf),E(),w(),b(),j(),wl(),P();var Bf=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||!vl(e,t,`hint`)||this._adjustTooltipPosition()},this._hideTooltip=()=>{R(this.renderRoot.querySelector(`.tooltip`))},this._adjustTooltipPosition=()=>{let e=this.renderRoot.querySelector(`.tooltip`),t=this.renderRoot.querySelector(`.progress-step`);if(!e||!t||!bl(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`
17325
17325
  :host {
17326
17326
  display: block;
17327
17327
  width: var(--progress-step-width, 100%);
@@ -17446,7 +17446,7 @@
17446
17446
  left: auto;
17447
17447
  transform: none;
17448
17448
  }
17449
- `}connectedCallback(){super.connectedCallback(),this.hasAttribute(`role`)||this.setAttribute(`role`,`listitem`)}disconnectedCallback(){this._tooltipObserver?.disconnect(),window.removeEventListener(`resize`,this._adjustTooltipPosition),window.removeEventListener(`scroll`,this._adjustTooltipPosition,!0),z(this.renderRoot.querySelector(`.tooltip`)),super.disconnectedCallback()}updated(e){super.updated?.(e),this.style.setProperty(`--progress-step-width`,this.width),(e.has(`label`)||e.has(`position`))&&yl(this.renderRoot.querySelector(`.tooltip`))&&this._adjustTooltipPosition()}_onClick(){if(this.disabled)return;let e={width:this.width,label:this.label,active:this.active,disabled:this.disabled,href:this.href||void 0};this.dispatchEvent(new CustomEvent(`step-click`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`stepclick`,{detail:e,bubbles:!0,composed:!0}))}_onKeydown(e){if(e.key===`Tab`){this._hideTooltip();return}this.disabled||this.href||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),this._onClick())}firstUpdated(e){super.firstUpdated?.(e),this._setupTooltipPositioning()}_setupTooltipPositioning(){this._tooltipObserver=new MutationObserver(()=>this._adjustTooltipPosition()),this._tooltipObserver.observe(this,{attributes:!0}),window.addEventListener(`resize`,this._adjustTooltipPosition),window.addEventListener(`scroll`,this._adjustTooltipPosition,{passive:!0,capture:!0})}render(){let e=!!this.href&&!this.disabled,t=this.label?.trim()||`Steg`;return x`
17449
+ `}connectedCallback(){super.connectedCallback(),this.hasAttribute(`role`)||this.setAttribute(`role`,`listitem`)}disconnectedCallback(){this._tooltipObserver?.disconnect(),window.removeEventListener(`resize`,this._adjustTooltipPosition),window.removeEventListener(`scroll`,this._adjustTooltipPosition,!0),R(this.renderRoot.querySelector(`.tooltip`)),super.disconnectedCallback()}updated(e){super.updated?.(e),this.style.setProperty(`--progress-step-width`,this.width),(e.has(`label`)||e.has(`position`))&&bl(this.renderRoot.querySelector(`.tooltip`))&&this._adjustTooltipPosition()}_onClick(){if(this.disabled)return;let e={width:this.width,label:this.label,active:this.active,disabled:this.disabled,href:this.href||void 0};this.dispatchEvent(new CustomEvent(`step-click`,{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`stepclick`,{detail:e,bubbles:!0,composed:!0}))}_onKeydown(e){if(e.key===`Tab`){this._hideTooltip();return}this.disabled||this.href||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),this._onClick())}firstUpdated(e){super.firstUpdated?.(e),this._setupTooltipPositioning()}_setupTooltipPositioning(){this._tooltipObserver=new MutationObserver(()=>this._adjustTooltipPosition()),this._tooltipObserver.observe(this,{attributes:!0}),window.addEventListener(`resize`,this._adjustTooltipPosition),window.addEventListener(`scroll`,this._adjustTooltipPosition,{passive:!0,capture:!0})}render(){let e=!!this.href&&!this.disabled,t=this.label?.trim()||`Steg`;return x`
17450
17450
  ${e?x`
17451
17451
  <a
17452
17452
  id=${this._stepId}
@@ -17489,7 +17489,7 @@
17489
17489
  `}
17490
17490
  ${this.disabled?``:x`<md-focus-ring for="${this._stepId}"></md-focus-ring>`}
17491
17491
  ${this.label&&!this.disabled?x`<div class="tooltip ${this.position===`bottom`?`bottom`:`top`}">${this.label}</div>`:``}
17492
- `}};N([_({type:String})],zf.prototype,`width`,void 0),N([_({type:Boolean,reflect:!0})],zf.prototype,`active`,void 0),N([_({type:Boolean,reflect:!0})],zf.prototype,`current`,void 0),N([_({type:Boolean,reflect:!0})],zf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],zf.prototype,`href`,void 0),N([_({type:String})],zf.prototype,`label`,void 0),N([_({type:String})],zf.prototype,`position`,void 0),N([v()],zf.prototype,`_stepId`,void 0),zf=N([a(`scb-progress-step`)],zf),w(),b(),P();var Bf=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 zf),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`
17492
+ `}};N([_({type:String})],Bf.prototype,`width`,void 0),N([_({type:Boolean,reflect:!0})],Bf.prototype,`active`,void 0),N([_({type:Boolean,reflect:!0})],Bf.prototype,`current`,void 0),N([_({type:Boolean,reflect:!0})],Bf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Bf.prototype,`href`,void 0),N([_({type:String})],Bf.prototype,`label`,void 0),N([_({type:String})],Bf.prototype,`position`,void 0),N([v()],Bf.prototype,`_stepId`,void 0),Bf=N([a(`scb-progress-step`)],Bf),w(),b(),P();var Vf=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 Bf),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`
17493
17493
  :host {
17494
17494
  display: block;
17495
17495
  width: 100%;
@@ -17567,7 +17567,7 @@
17567
17567
  <slot @slotchange=${this.syncSteps}></slot>
17568
17568
  </div>
17569
17569
  </nav>
17570
- `}};N([_({type:Number,reflect:!0,attribute:`progress-width`})],Bf.prototype,`progressWidth`,void 0),N([_({type:String,reflect:!0})],Bf.prototype,`height`,void 0),N([_({type:String,reflect:!0})],Bf.prototype,`position`,void 0),N([_({type:String,attribute:`aria-label`})],Bf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-labelledby`})],Bf.prototype,`ariaLabelledby`,void 0),N([_({type:String,reflect:!0})],Bf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Bf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Bf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Bf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Bf.prototype,`spacingRight`,void 0),Bf=N([a(`scb-progress-stepper`)],Bf),w(),b(),P();var Vf=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`
17570
+ `}};N([_({type:Number,reflect:!0,attribute:`progress-width`})],Vf.prototype,`progressWidth`,void 0),N([_({type:String,reflect:!0})],Vf.prototype,`height`,void 0),N([_({type:String,reflect:!0})],Vf.prototype,`position`,void 0),N([_({type:String,attribute:`aria-label`})],Vf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-labelledby`})],Vf.prototype,`ariaLabelledby`,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-progress-stepper`)],Vf),w(),b(),P();var Hf=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`
17571
17571
  :host {
17572
17572
  display: contents;
17573
17573
  }
@@ -17654,7 +17654,7 @@
17654
17654
  `}return x`
17655
17655
  <slot name="nav" @slotchange=${this.__onSlotChange}></slot>
17656
17656
  <slot name="content" @slotchange=${this.__onSlotChange}></slot>
17657
- `}};Vf=N([a(`scb-scrollspy`)],Vf),w(),b(),D(),E(),j(),P();var Hf=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`
17657
+ `}};Hf=N([a(`scb-scrollspy`)],Hf),w(),b(),D(),E(),j(),P();var Uf=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`
17658
17658
  :host {
17659
17659
  display: block;
17660
17660
  block-size: 100%;
@@ -17758,7 +17758,7 @@
17758
17758
  ${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:``}
17759
17759
  ${n?x`<span>${r}</span>`:``}
17760
17760
  <md-focus-ring inward></md-focus-ring>
17761
- `;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})],Hf.prototype,`label`,void 0),N([_({type:String,reflect:!0})],Hf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Hf.prototype,`selected`,void 0),N([_({type:String,reflect:!0})],Hf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Hf.prototype,`href`,void 0),N([_({type:Boolean,reflect:!0})],Hf.prototype,`disabled`,void 0),Hf=N([a(`scb-segmented-item`)],Hf),w(),b(),uc(),P();var Uf=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`
17761
+ `;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})],Uf.prototype,`label`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Uf.prototype,`selected`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`icon`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`href`,void 0),N([_({type:Boolean,reflect:!0})],Uf.prototype,`disabled`,void 0),Uf=N([a(`scb-segmented-item`)],Uf),w(),b(),uc(),P();var Wf=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`
17762
17762
  :host {
17763
17763
  --scb-segmented-button-width: 100%;
17764
17764
  --scb-segmented-button-height: var(--scb-segmented-button-control-size-medium, var(--scb-segmented-button-design-height-medium));
@@ -17933,7 +17933,7 @@
17933
17933
  --scb-segmented-button-design-gap: var(--scb-segmented-button-design-gap-large);
17934
17934
  }
17935
17935
  /* design:bindings:scb-segmented-button:end */
17936
- `}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})],Uf.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`layout`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`value`,void 0),N([_({type:Array})],Uf.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Uf.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Uf.prototype,`required`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`name`,void 0),N([_({type:String,reflect:!0})],Uf.prototype,`spacing`,void 0),N([_({type:String,attribute:`spacing-top`,reflect:!0})],Uf.prototype,`spacingTop`,void 0),N([_({type:String,attribute:`spacing-bottom`,reflect:!0})],Uf.prototype,`spacingBottom`,void 0),N([_({type:String,attribute:`spacing-left`,reflect:!0})],Uf.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Uf.prototype,`spacingRight`,void 0),Uf=N([a(`scb-segmented-button`)],Uf),w(),b(),E(),j(),P();var Wf=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`
17936
+ `}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})],Wf.prototype,`variant`,void 0),N([_({type:String,reflect:!0})],Wf.prototype,`layout`,void 0),N([_({type:String,reflect:!0})],Wf.prototype,`size`,void 0),N([_({type:String,reflect:!0})],Wf.prototype,`value`,void 0),N([_({type:Array})],Wf.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Wf.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Wf.prototype,`required`,void 0),N([_({type:String,reflect:!0})],Wf.prototype,`name`,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-segmented-button`)],Wf),w(),b(),E(),j(),P();var Gf=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`
17937
17937
  :host {
17938
17938
  /* Fälttext: base text current. JSON-källa: src/tokens/source/typography.json. */
17939
17939
  --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))));
@@ -18145,7 +18145,7 @@
18145
18145
  <div class="label">${this.label?this.label:x`<slot></slot>`}</div>
18146
18146
  <md-focus-ring inward></md-focus-ring>
18147
18147
  </div>
18148
- `}};N([_({type:String})],Wf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Wf.prototype,`disabled`,void 0),N([_({type:Boolean})],Wf.prototype,`showCheckbox`,void 0),N([_({type:Boolean})],Wf.prototype,`checked`,void 0),N([_({type:Boolean})],Wf.prototype,`showRadio`,void 0),N([_({type:String})],Wf.prototype,`label`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Wf.prototype,`noHighlightSelected`,void 0),Wf=N([a(`scb-select-option`)],Wf),w(),cl(),b(),D(),hc(),al(),Ol(),j(),Cl(),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._activeDescendant=``,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),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),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)}},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`
18148
+ `}};N([_({type:String})],Gf.prototype,`value`,void 0),N([_({type:Boolean,reflect:!0})],Gf.prototype,`disabled`,void 0),N([_({type:Boolean})],Gf.prototype,`showCheckbox`,void 0),N([_({type:Boolean})],Gf.prototype,`checked`,void 0),N([_({type:Boolean})],Gf.prototype,`showRadio`,void 0),N([_({type:String})],Gf.prototype,`label`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Gf.prototype,`noHighlightSelected`,void 0),Gf=N([a(`scb-select-option`)],Gf),w(),ll(),b(),D(),hc(),sl(),kl(),j(),wl(),uc(),cc(),P();var Z=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._activeDescendant=``,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),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),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)}},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`
18149
18149
  :host {
18150
18150
  /* Fälttext: base text current. JSON-källa: src/tokens/source/typography.json. */
18151
18151
  --scb-fields-text-font-weight-current: var(--scb-select-design-text-medium-font-weight);
@@ -18782,7 +18782,7 @@
18782
18782
  --scb-select-option-design-radio-marker-size: var(--scb-radio-marker-size, var(--icon-size-medium, 24px));
18783
18783
  }
18784
18784
  /* design:bindings:scb-select-option-context:end */
18785
- `}connectedCallback(){super.connectedCallback(),document.addEventListener(`mousedown`,this._onDocumentClick),document.addEventListener(`scroll`,this._scheduleOptionsPlacement,!0),window.addEventListener(`resize`,this._scheduleOptionsPlacement),this._optionsObserver=new MutationObserver(()=>{this.requestUpdate()}),this._optionsObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`label`,`value`,`disabled`]}),this._syncDensityForSize(),this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.error=!1,this._hasValidationBeenReported=!1,this._syncFormValue(),this._syncValidity(),this.requestUpdate()},this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`reset`,this._formResetHandler,!0),this._form.addEventListener(`submit`,this._formSubmitHandler,!0))}disconnectedCallback(){document.removeEventListener(`mousedown`,this._onDocumentClick),document.removeEventListener(`scroll`,this._scheduleOptionsPlacement,!0),window.removeEventListener(`resize`,this._scheduleOptionsPlacement),this._placementFrame&&=(cancelAnimationFrame(this._placementFrame),0),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),this._optionsObserver?.disconnect(),this._optionsObserver=null,z(this.shadowRoot?.querySelector(`.options`)),super.disconnectedCallback()}_getMultiValues(){return Array.isArray(this.values)&&this.values.length>0?this.values:this.value?this.value.split(`,`).map(e=>e.trim()).filter(Boolean):[]}_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-select-spacing-block-start`,t):this.style.removeProperty(`--scb-select-spacing-block-start`),n?this.style.setProperty(`--scb-select-spacing-block-end`,n):this.style.removeProperty(`--scb-select-spacing-block-end`),r?this.style.setProperty(`--scb-select-spacing-inline-start`,r):this.style.removeProperty(`--scb-select-spacing-inline-start`),i?this.style.setProperty(`--scb-select-spacing-inline-end`,i):this.style.removeProperty(`--scb-select-spacing-inline-end`)}_setOpen(e){if(this.open!==e)if(e){let t=this._getInitialFocusedIndex();this._updateOptionsPlacement(),this._prepareOptionsScroll(t),this.focusedIndex=t,this.open=e,this.requestUpdate()}else this.open=e,this.focusedIndex=-1}_toggleOpen(){this.disabled||this._setOpen(!this.open)}_focusTrigger(){(this.shadowRoot?.querySelector(`.selected-value-container`))?.focus({preventScroll:!0})}_getOptions(){let e=this.shadowRoot?.querySelector(`slot`);return e?e.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()===`scb-select-option`):[]}_ensureOptionIds(e=this._getOptions()){e.forEach((e,t)=>{e.id||=`${this._selectId}-option-${t}`})}_getInitialFocusedIndex(){let e=this._getOptions(),t=this.variant===`multi-select`?this._getMultiValues():[this.value],n=e.findIndex(e=>!e.disabled&&t.includes(e.value));return n>=0?n:e.findIndex(e=>!e.disabled)}_setFocusedIndex(e,t={}){let n=this._getOptions();if(this._ensureOptionIds(n),n.forEach(e=>e.removeAttribute(`data-focused`)),e<0||n.length===0){this.focusedIndex=-1,this._activeDescendant=``;return}let r=Math.max(0,Math.min(e,n.length-1));if(n[r]?.disabled){let e=n.findIndex((e,t)=>t>=r&&!e.disabled),t=-1;for(let e=n.length-1;e>=0;--e)if(!n[e]?.disabled){t=e;break}r=e>=0?e:t}let i=n[r];if(!i||i.disabled){this.focusedIndex=-1,this._activeDescendant=``;return}i.setAttribute(`data-focused`,``),this.focusedIndex=r,this._activeDescendant=i.id,t.scroll!==!1&&this._prepareOptionsScroll(r)}_prepareOptionsScroll(e){let t=this.shadowRoot?.querySelector(`.options`),n=this._getOptions()[e];if(!t||!n)return;let r=getComputedStyle(t),i=getComputedStyle(this),a=Number.parseFloat(r.paddingTop)||0,o=Number.parseFloat(r.paddingBottom)||0,s=i.getPropertyValue(`--scb-select-options-current-max-height`).trim()||i.getPropertyValue(`--scb-select-options-max-height`).trim()||r.maxHeight,c=Number.parseFloat(s);if(!Number.isFinite(c)||c<=0){t.scrollTop=0;return}let l=t.getBoundingClientRect(),u=n.getBoundingClientRect(),d=u.top-l.top+t.scrollTop,f=d+u.height,p=c,m=Math.max(0,t.scrollHeight-p),h=t.scrollTop+a,g=t.scrollTop+p-o,ee=t.scrollTop;d<h?ee=d-a:f>g&&(ee=f-p+o),t.scrollTop=Math.max(0,Math.min(m,ee))}_moveFocusedIndex(e){let t=this._getOptions();if(t.length===0)return;let n=this.focusedIndex>=0?this.focusedIndex:this._getInitialFocusedIndex();for(let r=0;r<t.length;r+=1)if(n=(n+e+t.length)%t.length,!t[n]?.disabled){this._setFocusedIndex(n);return}}_getFocusedOption(){return this._getOptions()[this.focusedIndex]}_updateOptionsPlacement(){let e=this.shadowRoot?.querySelector(`.selected-value-container`),t=this.shadowRoot?.querySelector(`.options`);if(!e||!t)return;let n=e.getBoundingClientRect(),r=Number.parseFloat(getComputedStyle(this).getPropertyValue(`--scb-select-options-max-height`)),i=Number.isFinite(r)&&r>0?r:240,a=t.scrollHeight,o=Math.min(i,a),s=window.innerHeight-n.bottom-3-8,c=n.top-3-8,l=s<o&&c>s,u=Math.max(0,Math.min(o,l?c:s));if(this._optionsPlacement=l?`above`:`below`,this.style.setProperty(`--scb-select-options-current-max-height`,`${u}px`),t.style.overflowY=a>u+.5?`auto`:``,yl(t)){let e=Math.min(n.width,window.innerWidth-16),r=Math.min(Math.max(n.left,8),window.innerWidth-8-e);t.style.position=`fixed`,t.style.left=`${Math.round(r)}px`,t.style.right=`auto`,t.style.width=`${Math.round(e)}px`,l?(t.style.top=`auto`,t.style.bottom=`${Math.round(window.innerHeight-n.top+3)}px`):(t.style.top=`${Math.round(n.bottom+3)}px`,t.style.bottom=`auto`)}}_syncOptionsPopover(){let e=this.shadowRoot?.querySelector(`.options`)??null;if(e){if(this.open){_l(e)&&this._scheduleOptionsPlacement();return}yl(e)?vl(e,()=>this._resetOptionsPlacement()):(z(e),this._resetOptionsPlacement())}}_resetOptionsPlacement(){this._optionsPlacement=`below`,this.style.removeProperty(`--scb-select-options-current-max-height`);let e=this.shadowRoot?.querySelector(`.options`);e?.style.removeProperty(`position`),e?.style.removeProperty(`left`),e?.style.removeProperty(`right`),e?.style.removeProperty(`top`),e?.style.removeProperty(`bottom`),e?.style.removeProperty(`width`),e?.style.removeProperty(`overflow-y`)}_hasMoreThanFourOptions(){let e=this._getOptions();return[`extra-small`,`small`,`medium`].includes(this.size)?e.length>5:e.length>4}_selectOption(e){if(!e.disabled){if(this.variant===`multi-select`){let t=this._getMultiValues();t.indexOf(e.value)>-1?this.values=t.filter(t=>t!==e.value):this.values=[...t,e.value],this.value=this.values.join(`,`),this.dispatchEvent(new CustomEvent(`change`,{detail:{values:this.values},bubbles:!0,composed:!0}))}else this.variant===`single-select`&&this.withRadiobuttons?(this.value=e.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0}))):(this.value=e.value,this._setOpen(!1),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this._focusTrigger()));this._updateOptionsChecked(),this.requestUpdate()}}_getOptionLabel(e){return e.label||e.textContent?.trim()||``}_getSelectedLabel(){let e=this._getOptions();if(this.variant===`multi-select`){let t=this._getMultiValues(),n=e.filter(e=>t.includes(e.value));return n&&n.length>0?n.map(e=>this._getOptionLabel(e)).join(`, `):``}else{let t=e.find(e=>e.value===this.value);return t?this._getOptionLabel(t):``}}firstUpdated(){this._updateOptionsChecked(),this._syncFormValue(),this._syncValidity(),this._applySpacing()}updated(e){this._updateOptionsChecked(),this._syncFormValue(),this._syncValidity(),e.has(`size`)&&this._syncDensityForSize(),e.has(`errorText`)&&this.error&&this._syncValidity(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing(),e.has(`open`)&&(this.open?(this._syncOptionsPopover(),this.updateComplete.then(()=>{this._setFocusedIndex(this._getInitialFocusedIndex(),{scroll:!1}),this._scheduleOptionsPlacement()})):(this._syncOptionsPopover(),this._setFocusedIndex(-1)))}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant===`multi-select`){let e=this._getMultiValues();if(e.length===0){this._internals.setFormValue(null);return}let t=new FormData;e.forEach(e=>t.append(this.name,e)),this._internals.setFormValue(t);return}this._internals.setFormValue(this.value||null)}}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!(this.variant===`multi-select`?this._getMultiValues().length>0:this.value)?this.errorText||`Välj ett alternativ.`:``}_syncValidity(){let e=this.disabled?``:this._getValidationMessage(),t=this.shadowRoot?.querySelector(`.selected-value`),n=this.error,r=this._validationMessage;if(this._validationMessage=e,this.error=this.disabled?!1:e?this._hasValidationBeenReported||n:n&&!this._hasValidationBeenReported&&!r,!e)this.removeAttribute(`aria-invalid`),t&&t.setCustomValidity(``),this._internals&&this._internals.setValidity({});else if(t&&t.setCustomValidity(e),this._internals){let n=this._customValidationMessage?{customError:!0}:{valueMissing:!0};this._internals.setValidity(n,e,t??void 0)}this.toggleAttribute(`aria-invalid`,this.error),(n!==this.error||r!==this._validationMessage)&&this.requestUpdate()}checkValidity(){return this._syncValidity(),this._internals?this._internals.checkValidity():!this.error}reportValidity(){return this._hasValidationBeenReported=!0,this._syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=String(e??``),this._syncValidity()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}get labels(){return this._internals?.labels}_updateOptionsChecked(){let e=this._getOptions();this._ensureOptionIds(e),e.forEach(e=>{if(this.noHighlightSelected?e.setAttribute(`no-highlight-selected`,``):e.removeAttribute(`no-highlight-selected`),this.variant===`multi-select`){let t=this._getMultiValues();e.showCheckbox=!0,e.checked=t.includes(e.value),e.showRadio=!1}else e.showCheckbox=!1,e.checked=this.value===e.value,this.withRadiobuttons&&(e.showRadio=!0)})}_renderLabel(){if(!this.label)return null;let e=!!this._getVisibleSupportingText(),t=`${this._selectId}-label`,n=x`
18785
+ `}connectedCallback(){super.connectedCallback(),document.addEventListener(`mousedown`,this._onDocumentClick),document.addEventListener(`scroll`,this._scheduleOptionsPlacement,!0),window.addEventListener(`resize`,this._scheduleOptionsPlacement),this._optionsObserver=new MutationObserver(()=>{this.requestUpdate()}),this._optionsObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`label`,`value`,`disabled`]}),this._syncDensityForSize(),this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],this._form=this.closest(`form`),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.error=!1,this._hasValidationBeenReported=!1,this._syncFormValue(),this._syncValidity(),this.requestUpdate()},this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form.addEventListener(`reset`,this._formResetHandler,!0),this._form.addEventListener(`submit`,this._formSubmitHandler,!0))}disconnectedCallback(){document.removeEventListener(`mousedown`,this._onDocumentClick),document.removeEventListener(`scroll`,this._scheduleOptionsPlacement,!0),window.removeEventListener(`resize`,this._scheduleOptionsPlacement),this._placementFrame&&=(cancelAnimationFrame(this._placementFrame),0),this._form&&this._formResetHandler&&this._form.removeEventListener(`reset`,this._formResetHandler,!0),this._form&&this._formSubmitHandler&&this._form.removeEventListener(`submit`,this._formSubmitHandler,!0),this._optionsObserver?.disconnect(),this._optionsObserver=null,R(this.shadowRoot?.querySelector(`.options`)),super.disconnectedCallback()}_getMultiValues(){return Array.isArray(this.values)&&this.values.length>0?this.values:this.value?this.value.split(`,`).map(e=>e.trim()).filter(Boolean):[]}_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-select-spacing-block-start`,t):this.style.removeProperty(`--scb-select-spacing-block-start`),n?this.style.setProperty(`--scb-select-spacing-block-end`,n):this.style.removeProperty(`--scb-select-spacing-block-end`),r?this.style.setProperty(`--scb-select-spacing-inline-start`,r):this.style.removeProperty(`--scb-select-spacing-inline-start`),i?this.style.setProperty(`--scb-select-spacing-inline-end`,i):this.style.removeProperty(`--scb-select-spacing-inline-end`)}_setOpen(e){if(this.open!==e)if(e){let t=this._getInitialFocusedIndex();this._updateOptionsPlacement(),this._prepareOptionsScroll(t),this.focusedIndex=t,this.open=e,this.requestUpdate()}else this.open=e,this.focusedIndex=-1}_toggleOpen(){this.disabled||this._setOpen(!this.open)}_focusTrigger(){(this.shadowRoot?.querySelector(`.selected-value-container`))?.focus({preventScroll:!0})}_getOptions(){let e=this.shadowRoot?.querySelector(`slot`);return e?e.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()===`scb-select-option`):[]}_ensureOptionIds(e=this._getOptions()){e.forEach((e,t)=>{e.id||=`${this._selectId}-option-${t}`})}_getInitialFocusedIndex(){let e=this._getOptions(),t=this.variant===`multi-select`?this._getMultiValues():[this.value],n=e.findIndex(e=>!e.disabled&&t.includes(e.value));return n>=0?n:e.findIndex(e=>!e.disabled)}_setFocusedIndex(e,t={}){let n=this._getOptions();if(this._ensureOptionIds(n),n.forEach(e=>e.removeAttribute(`data-focused`)),e<0||n.length===0){this.focusedIndex=-1,this._activeDescendant=``;return}let r=Math.max(0,Math.min(e,n.length-1));if(n[r]?.disabled){let e=n.findIndex((e,t)=>t>=r&&!e.disabled),t=-1;for(let e=n.length-1;e>=0;--e)if(!n[e]?.disabled){t=e;break}r=e>=0?e:t}let i=n[r];if(!i||i.disabled){this.focusedIndex=-1,this._activeDescendant=``;return}i.setAttribute(`data-focused`,``),this.focusedIndex=r,this._activeDescendant=i.id,t.scroll!==!1&&this._prepareOptionsScroll(r)}_prepareOptionsScroll(e){let t=this.shadowRoot?.querySelector(`.options`),n=this._getOptions()[e];if(!t||!n)return;let r=getComputedStyle(t),i=getComputedStyle(this),a=Number.parseFloat(r.paddingTop)||0,o=Number.parseFloat(r.paddingBottom)||0,s=i.getPropertyValue(`--scb-select-options-current-max-height`).trim()||i.getPropertyValue(`--scb-select-options-max-height`).trim()||r.maxHeight,c=Number.parseFloat(s);if(!Number.isFinite(c)||c<=0){t.scrollTop=0;return}let l=t.getBoundingClientRect(),u=n.getBoundingClientRect(),d=u.top-l.top+t.scrollTop,f=d+u.height,p=c,m=Math.max(0,t.scrollHeight-p),h=t.scrollTop+a,g=t.scrollTop+p-o,ee=t.scrollTop;d<h?ee=d-a:f>g&&(ee=f-p+o),t.scrollTop=Math.max(0,Math.min(m,ee))}_moveFocusedIndex(e){let t=this._getOptions();if(t.length===0)return;let n=this.focusedIndex>=0?this.focusedIndex:this._getInitialFocusedIndex();for(let r=0;r<t.length;r+=1)if(n=(n+e+t.length)%t.length,!t[n]?.disabled){this._setFocusedIndex(n);return}}_getFocusedOption(){return this._getOptions()[this.focusedIndex]}_updateOptionsPlacement(){let e=this.shadowRoot?.querySelector(`.selected-value-container`),t=this.shadowRoot?.querySelector(`.options`);if(!e||!t)return;let n=e.getBoundingClientRect(),r=Number.parseFloat(getComputedStyle(this).getPropertyValue(`--scb-select-options-max-height`)),i=Number.isFinite(r)&&r>0?r:240,a=t.scrollHeight,o=Math.min(i,a),s=window.innerHeight-n.bottom-3-8,c=n.top-3-8,l=s<o&&c>s,u=Math.max(0,Math.min(o,l?c:s));if(this._optionsPlacement=l?`above`:`below`,this.style.setProperty(`--scb-select-options-current-max-height`,`${u}px`),t.style.overflowY=a>u+.5?`auto`:``,bl(t)){let e=Math.min(n.width,window.innerWidth-16),r=Math.min(Math.max(n.left,8),window.innerWidth-8-e);t.style.position=`fixed`,t.style.left=`${Math.round(r)}px`,t.style.right=`auto`,t.style.width=`${Math.round(e)}px`,l?(t.style.top=`auto`,t.style.bottom=`${Math.round(window.innerHeight-n.top+3)}px`):(t.style.top=`${Math.round(n.bottom+3)}px`,t.style.bottom=`auto`)}}_syncOptionsPopover(){let e=this.shadowRoot?.querySelector(`.options`)??null;if(e){if(this.open){vl(e)&&this._scheduleOptionsPlacement();return}bl(e)?yl(e,()=>this._resetOptionsPlacement()):(R(e),this._resetOptionsPlacement())}}_resetOptionsPlacement(){this._optionsPlacement=`below`,this.style.removeProperty(`--scb-select-options-current-max-height`);let e=this.shadowRoot?.querySelector(`.options`);e?.style.removeProperty(`position`),e?.style.removeProperty(`left`),e?.style.removeProperty(`right`),e?.style.removeProperty(`top`),e?.style.removeProperty(`bottom`),e?.style.removeProperty(`width`),e?.style.removeProperty(`overflow-y`)}_hasMoreThanFourOptions(){let e=this._getOptions();return[`extra-small`,`small`,`medium`].includes(this.size)?e.length>5:e.length>4}_selectOption(e){if(!e.disabled){if(this.variant===`multi-select`){let t=this._getMultiValues();t.indexOf(e.value)>-1?this.values=t.filter(t=>t!==e.value):this.values=[...t,e.value],this.value=this.values.join(`,`),this.dispatchEvent(new CustomEvent(`change`,{detail:{values:this.values},bubbles:!0,composed:!0}))}else this.variant===`single-select`&&this.withRadiobuttons?(this.value=e.value,this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0}))):(this.value=e.value,this._setOpen(!1),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this._focusTrigger()));this._updateOptionsChecked(),this.requestUpdate()}}_getOptionLabel(e){return e.label||e.textContent?.trim()||``}_getSelectedLabel(){let e=this._getOptions();if(this.variant===`multi-select`){let t=this._getMultiValues(),n=e.filter(e=>t.includes(e.value));return n&&n.length>0?n.map(e=>this._getOptionLabel(e)).join(`, `):``}else{let t=e.find(e=>e.value===this.value);return t?this._getOptionLabel(t):``}}firstUpdated(){this._updateOptionsChecked(),this._syncFormValue(),this._syncValidity(),this._applySpacing()}updated(e){this._updateOptionsChecked(),this._syncFormValue(),this._syncValidity(),e.has(`size`)&&this._syncDensityForSize(),e.has(`errorText`)&&this.error&&this._syncValidity(),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this._applySpacing(),e.has(`open`)&&(this.open?(this._syncOptionsPopover(),this.updateComplete.then(()=>{this._setFocusedIndex(this._getInitialFocusedIndex(),{scroll:!1}),this._scheduleOptionsPlacement()})):(this._syncOptionsPopover(),this._setFocusedIndex(-1)))}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant===`multi-select`){let e=this._getMultiValues();if(e.length===0){this._internals.setFormValue(null);return}let t=new FormData;e.forEach(e=>t.append(this.name,e)),this._internals.setFormValue(t);return}this._internals.setFormValue(this.value||null)}}_getValidationMessage(){return this._customValidationMessage?this._customValidationMessage:this.required&&!(this.variant===`multi-select`?this._getMultiValues().length>0:this.value)?this.errorText||`Välj ett alternativ.`:``}_syncValidity(){let e=this.disabled?``:this._getValidationMessage(),t=this.shadowRoot?.querySelector(`.selected-value`),n=this.error,r=this._validationMessage;if(this._validationMessage=e,this.error=this.disabled?!1:e?this._hasValidationBeenReported||n:n&&!this._hasValidationBeenReported&&!r,!e)this.removeAttribute(`aria-invalid`),t&&t.setCustomValidity(``),this._internals&&this._internals.setValidity({});else if(t&&t.setCustomValidity(e),this._internals){let n=this._customValidationMessage?{customError:!0}:{valueMissing:!0};this._internals.setValidity(n,e,t??void 0)}this.toggleAttribute(`aria-invalid`,this.error),(n!==this.error||r!==this._validationMessage)&&this.requestUpdate()}checkValidity(){return this._syncValidity(),this._internals?this._internals.checkValidity():!this.error}reportValidity(){return this._hasValidationBeenReported=!0,this._syncValidity(),this._internals?this._internals.reportValidity():this.checkValidity()}setCustomValidity(e){this._customValidationMessage=String(e??``),this._syncValidity()}get form(){return this._internals?.form??this._form}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage??this._getValidationMessage()}get willValidate(){return this._internals?.willValidate??!0}get labels(){return this._internals?.labels}_updateOptionsChecked(){let e=this._getOptions();this._ensureOptionIds(e),e.forEach(e=>{if(this.noHighlightSelected?e.setAttribute(`no-highlight-selected`,``):e.removeAttribute(`no-highlight-selected`),this.variant===`multi-select`){let t=this._getMultiValues();e.showCheckbox=!0,e.checked=t.includes(e.value),e.showRadio=!1}else e.showCheckbox=!1,e.checked=this.value===e.value,this.withRadiobuttons&&(e.showRadio=!0)})}_renderLabel(){if(!this.label)return null;let e=!!this._getVisibleSupportingText(),t=`${this._selectId}-label`,n=x`
18786
18786
  <label
18787
18787
  class="select-label ${!e&&!this.helpText?`select-label--without-supporting`:``}"
18788
18788
  id=${t}
@@ -18820,9 +18820,9 @@
18820
18820
  aria-haspopup="listbox"
18821
18821
  aria-expanded=${String(this.open)}
18822
18822
  aria-controls=${n}
18823
- aria-activedescendant=${ol(this.open&&this._activeDescendant?this._activeDescendant:void 0)}
18824
- aria-labelledby=${ol(e)}
18825
- aria-describedby=${ol(t)}
18823
+ aria-activedescendant=${L(this.open&&this._activeDescendant?this._activeDescendant:void 0)}
18824
+ aria-labelledby=${L(e)}
18825
+ aria-describedby=${L(t)}
18826
18826
  aria-required=${this.required?`true`:`false`}
18827
18827
  aria-invalid=${this.error?`true`:`false`}
18828
18828
  @click="${this._toggleOpen}"
@@ -18841,8 +18841,8 @@
18841
18841
  ?required=${this.required}
18842
18842
  aria-required="${this.required?`true`:`false`}"
18843
18843
  aria-invalid="${this.error?`true`:`false`}"
18844
- aria-labelledby=${ol(e)}
18845
- aria-describedby=${ol(t)}
18844
+ aria-labelledby=${L(e)}
18845
+ aria-describedby=${L(t)}
18846
18846
  aria-label="${!this.label&&this.placeholder?this.placeholder:``}"
18847
18847
  title="${!this.label&&this.placeholder?this.placeholder:``}"
18848
18848
  placeholder="${this.placeholder}"
@@ -18855,17 +18855,17 @@
18855
18855
  <div
18856
18856
  id=${n}
18857
18857
  role="listbox"
18858
- aria-labelledby=${ol(e)}
18858
+ aria-labelledby=${L(e)}
18859
18859
  aria-multiselectable=${this.variant===`multi-select`?`true`:`false`}
18860
18860
  class="${this._hasMoreThanFourOptions()?`options options--scroll`:`options`} ${this._optionsPlacement===`above`?`options--above`:``}"
18861
- style=${ol(this.zIndex?`z-index: ${this.zIndex};`:void 0)}
18861
+ style=${L(this.zIndex?`z-index: ${this.zIndex};`:void 0)}
18862
18862
  @click=${this._onSlotClick}
18863
18863
  @keydown=${this._onOptionKeyDown}
18864
18864
  >
18865
18865
  <slot @slotchange="${()=>{this.requestUpdate(),this._scheduleOptionsPlacement()}}"></slot>
18866
18866
  </div>
18867
18867
  </div>
18868
- `}};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,`_activeDescendant`,void 0),Q=N([a(`scb-select`)],Q),_f(),w(),b(),P();var Gf=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`
18868
+ `}};N([_({type:String})],Z.prototype,`variant`,void 0),N([_({type:String})],Z.prototype,`value`,void 0),N([_({type:Array})],Z.prototype,`values`,void 0),N([_({type:Boolean,reflect:!0})],Z.prototype,`disabled`,void 0),N([_({type:Boolean,reflect:!0})],Z.prototype,`required`,void 0),N([_({type:Boolean,reflect:!0})],Z.prototype,`error`,void 0),N([_({type:Boolean,reflect:!0})],Z.prototype,`open`,void 0),N([_({type:String})],Z.prototype,`label`,void 0),N([_({type:String})],Z.prototype,`name`,void 0),N([_({type:String})],Z.prototype,`placeholder`,void 0),N([_({type:String,attribute:`supporting-text`})],Z.prototype,`supportingText`,void 0),N([_({type:String,attribute:`error-text`})],Z.prototype,`errorText`,void 0),N([_({type:String,attribute:`help-text`})],Z.prototype,`helpText`,void 0),N([_({type:String,attribute:`help-label`})],Z.prototype,`helpLabel`,void 0),N([_({type:Boolean,attribute:`with-radiobuttons`})],Z.prototype,`withRadiobuttons`,void 0),N([_({type:Boolean,attribute:`no-highlight-selected`,reflect:!0})],Z.prototype,`noHighlightSelected`,void 0),N([_({type:String,reflect:!0})],Z.prototype,`size`,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,attribute:`spacing-left`,reflect:!0})],Z.prototype,`spacingLeft`,void 0),N([_({type:String,attribute:`spacing-right`,reflect:!0})],Z.prototype,`spacingRight`,void 0),N([_({type:String,attribute:`z-index`})],Z.prototype,`zIndex`,void 0),N([v()],Z.prototype,`_optionsPlacement`,void 0),N([v()],Z.prototype,`_activeDescendant`,void 0),Z=N([a(`scb-select`)],Z),vf(),w(),b(),P();var Q=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`
18869
18869
  :host {
18870
18870
  display: block;
18871
18871
  color: var(--md-sys-color-on-surface, var(--n-10));
@@ -18968,7 +18968,7 @@
18968
18968
  ></md-slider>
18969
18969
  ${e?x`<p id=${this._errorTextId} class="slider-error-text">${e}</p>`:S}
18970
18970
  </div>
18971
- `}};N([_({type:Boolean})],Gf.prototype,`ticks`,void 0),N([_({type:Number})],Gf.prototype,`step`,void 0),N([_({type:Number,reflect:!0})],Gf.prototype,`value`,void 0),N([_({type:Boolean})],Gf.prototype,`range`,void 0),N([_({type:Number,attribute:`value-start`})],Gf.prototype,`valueStart`,void 0),N([_({type:Number,attribute:`value-end`})],Gf.prototype,`valueEnd`,void 0),N([_({type:Number,reflect:!0})],Gf.prototype,`min`,void 0),N([_({type:Number,reflect:!0})],Gf.prototype,`max`,void 0),N([_({type:Boolean})],Gf.prototype,`labeled`,void 0),N([_({type:String,attribute:`value-label`})],Gf.prototype,`valueLabel`,void 0),N([_({type:String,attribute:`value-label-start`})],Gf.prototype,`valueLabelStart`,void 0),N([_({type:String,attribute:`value-label-end`})],Gf.prototype,`valueLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Gf.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Gf.prototype,`name`,void 0),N([_({type:String,attribute:`name-start`,reflect:!0})],Gf.prototype,`nameStart`,void 0),N([_({type:String,attribute:`name-end`,reflect:!0})],Gf.prototype,`nameEnd`,void 0),N([_({type:String,attribute:`aria-label`})],Gf.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-label-start`})],Gf.prototype,`ariaLabelStart`,void 0),N([_({type:String,attribute:`aria-label-end`})],Gf.prototype,`ariaLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Gf.prototype,`error`,void 0),N([_({type:String,attribute:`error-text`})],Gf.prototype,`errorText`,void 0),Gf=N([a(`scb-slider`)],Gf),w(),b(),cc(),al(),Oc(),Cl(),P();var Kf=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`
18971
+ `}};N([_({type:Boolean})],Q.prototype,`ticks`,void 0),N([_({type:Number})],Q.prototype,`step`,void 0),N([_({type:Number,reflect:!0})],Q.prototype,`value`,void 0),N([_({type:Boolean})],Q.prototype,`range`,void 0),N([_({type:Number,attribute:`value-start`})],Q.prototype,`valueStart`,void 0),N([_({type:Number,attribute:`value-end`})],Q.prototype,`valueEnd`,void 0),N([_({type:Number,reflect:!0})],Q.prototype,`min`,void 0),N([_({type:Number,reflect:!0})],Q.prototype,`max`,void 0),N([_({type:Boolean})],Q.prototype,`labeled`,void 0),N([_({type:String,attribute:`value-label`})],Q.prototype,`valueLabel`,void 0),N([_({type:String,attribute:`value-label-start`})],Q.prototype,`valueLabelStart`,void 0),N([_({type:String,attribute:`value-label-end`})],Q.prototype,`valueLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`disabled`,void 0),N([_({type:String,reflect:!0})],Q.prototype,`name`,void 0),N([_({type:String,attribute:`name-start`,reflect:!0})],Q.prototype,`nameStart`,void 0),N([_({type:String,attribute:`name-end`,reflect:!0})],Q.prototype,`nameEnd`,void 0),N([_({type:String,attribute:`aria-label`})],Q.prototype,`ariaLabel`,void 0),N([_({type:String,attribute:`aria-label-start`})],Q.prototype,`ariaLabelStart`,void 0),N([_({type:String,attribute:`aria-label-end`})],Q.prototype,`ariaLabelEnd`,void 0),N([_({type:Boolean,reflect:!0})],Q.prototype,`error`,void 0),N([_({type:String,attribute:`error-text`})],Q.prototype,`errorText`,void 0),Q=N([a(`scb-slider`)],Q),w(),b(),cc(),sl(),Oc(),wl(),P();var Kf=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`
18972
18972
  :host {
18973
18973
  position: relative;
18974
18974
  display: block;
@@ -19100,7 +19100,7 @@
19100
19100
  }
19101
19101
 
19102
19102
  /* design:bindings:scb-snackbar:end */
19103
- `}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-snackbar-spacing-block-start`,t):this.style.removeProperty(`--scb-snackbar-spacing-block-start`),n?this.style.setProperty(`--scb-snackbar-spacing-block-end`,n):this.style.removeProperty(`--scb-snackbar-spacing-block-end`),r?this.style.setProperty(`--scb-snackbar-spacing-inline-start`,r):this.style.removeProperty(`--scb-snackbar-spacing-inline-start`),i?this.style.setProperty(`--scb-snackbar-spacing-inline-end`,i):this.style.removeProperty(`--scb-snackbar-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),this.applySpacing()}disconnectedCallback(){window.clearTimeout(this._fadeoutTimer),z(this.renderRoot.querySelector(`.snackbar`)),super.disconnectedCallback()}handleAction(){this.dispatchEvent(new CustomEvent(`snackbar-action`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`snackbaraction`,{bubbles:!0,composed:!0})),this.open=!1}handleClose(){this.open=!1}updated(e){if(super.updated(e),e.has(`open`)||e.has(`fixed`)){let e=this.renderRoot.querySelector(`.snackbar`);this.open&&this.fixed?_l(e):!this.open&&yl(e)?vl(e):z(e)}e.has(`open`)&&(this.open?(this.dispatchEvent(new CustomEvent(`snackbar-open`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`snackbaropen`,{bubbles:!0,composed:!0}))):(this.dispatchEvent(new CustomEvent(`snackbar-close`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`snackbarclose`,{bubbles:!0,composed:!0})))),(e.has(`open`)||e.has(`fadeout`))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer)),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){let e=!!this.actionText,t=!!this.showClose,n=`snackbar`;return!e&&!t&&(n+=` no-actions`),this.withLongerAction&&(n+=` longer-action`),x`
19103
+ `}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-snackbar-spacing-block-start`,t):this.style.removeProperty(`--scb-snackbar-spacing-block-start`),n?this.style.setProperty(`--scb-snackbar-spacing-block-end`,n):this.style.removeProperty(`--scb-snackbar-spacing-block-end`),r?this.style.setProperty(`--scb-snackbar-spacing-inline-start`,r):this.style.removeProperty(`--scb-snackbar-spacing-inline-start`),i?this.style.setProperty(`--scb-snackbar-spacing-inline-end`,i):this.style.removeProperty(`--scb-snackbar-spacing-inline-end`)}connectedCallback(){super.connectedCallback(),this.applySpacing()}disconnectedCallback(){window.clearTimeout(this._fadeoutTimer),R(this.renderRoot.querySelector(`.snackbar`)),super.disconnectedCallback()}handleAction(){this.dispatchEvent(new CustomEvent(`snackbar-action`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`snackbaraction`,{bubbles:!0,composed:!0})),this.open=!1}handleClose(){this.open=!1}updated(e){if(super.updated(e),e.has(`open`)||e.has(`fixed`)){let e=this.renderRoot.querySelector(`.snackbar`);this.open&&this.fixed?vl(e):!this.open&&bl(e)?yl(e):R(e)}e.has(`open`)&&(this.open?(this.dispatchEvent(new CustomEvent(`snackbar-open`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`snackbaropen`,{bubbles:!0,composed:!0}))):(this.dispatchEvent(new CustomEvent(`snackbar-close`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`snackbarclose`,{bubbles:!0,composed:!0})))),(e.has(`open`)||e.has(`fadeout`))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer)),(e.has(`spacing`)||e.has(`spacingTop`)||e.has(`spacingBottom`)||e.has(`spacingLeft`)||e.has(`spacingRight`))&&this.applySpacing()}render(){let e=!!this.actionText,t=!!this.showClose,n=`snackbar`;return!e&&!t&&(n+=` no-actions`),this.withLongerAction&&(n+=` longer-action`),x`
19104
19104
  <div class="${n}" ?hidden=${!this.open}>
19105
19105
  ${this.withLongerAction?x`
19106
19106
  <div
@@ -20021,7 +20021,7 @@
20021
20021
  >
20022
20022
  <slot @slotchange=${this._onSlotChange}></slot>
20023
20023
  </div>
20024
- `}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})],Yf.prototype,`type`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0,attribute:`change-on-completed`})],Yf.prototype,`changeOnCompleted`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`symbol-variant`})],Yf.prototype,`symbolVariant`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`size`,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),N([_({type:Number,reflect:!0,attribute:`active-index`})],Yf.prototype,`activeIndex`,void 0),Yf=N([a(`scb-stepper`)],Yf),w(),b(),al(),cc(),P();var Xf=96,Zf=32,Qf=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`
20024
+ `}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})],Yf.prototype,`type`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`label`,void 0),N([_({type:Boolean,reflect:!0,attribute:`change-on-completed`})],Yf.prototype,`changeOnCompleted`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`variant`,void 0),N([_({type:String,reflect:!0,attribute:`symbol-variant`})],Yf.prototype,`symbolVariant`,void 0),N([_({type:String,reflect:!0})],Yf.prototype,`size`,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),N([_({type:Number,reflect:!0,attribute:`active-index`})],Yf.prototype,`activeIndex`,void 0),Yf=N([a(`scb-stepper`)],Yf),w(),b(),sl(),cc(),P();var Xf=96,Zf=32,Qf=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`
20025
20025
  :host {
20026
20026
  display: block;
20027
20027
  color: var(--scb-tables-content-color, var(--md-sys-color-on-surface));
@@ -20108,7 +20108,7 @@
20108
20108
  <div class="scb-table-scroll-wrapper">
20109
20109
  <slot @slotchange=${this._onSlotChange}></slot>
20110
20110
  </div>
20111
- `}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,Xf):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+Zf: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`})],Qf.prototype,`dataSorting`,void 0),N([_({type:String,attribute:`column-width-mode`})],Qf.prototype,`columnWidthMode`,void 0),Qf=N([a(`scb-table`)],Qf),w(),b(),al(),bu(),cc(),P();var $f=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`
20111
+ `}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,Xf):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+Zf: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`})],Qf.prototype,`dataSorting`,void 0),N([_({type:String,attribute:`column-width-mode`})],Qf.prototype,`columnWidthMode`,void 0),Qf=N([a(`scb-table`)],Qf),w(),b(),sl(),xu(),cc(),P();var $f=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`
20112
20112
  :host {
20113
20113
  display: block;
20114
20114
  color: var(--scb-tables-content-color, var(--md-sys-color-on-surface));
@@ -20352,7 +20352,7 @@
20352
20352
  }
20353
20353
 
20354
20354
  /* design:bindings:scb-tabs:end */
20355
- `]}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`})],np.prototype,`ariaLabel`,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),np=N([a(`scb-tabs`)],np),w(),b(),Nu(),hc(),D(),E(),j(),P();var rp,ip=class extends C{static{rp=this}constructor(...e){super(...e),this.expanded=!1,this.label=``,this.supportingText=``,this.current=!1,this.itemHref=`#`,this.noDivider=!1,this._unique=rp._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?.()??`${rp._uidPrefix}-${++rp._uidSeq}`}static{this.styles=[p`
20355
+ `]}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`})],np.prototype,`ariaLabel`,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),np=N([a(`scb-tabs`)],np),w(),b(),Pu(),hc(),D(),E(),j(),P();var rp,ip=class extends C{static{rp=this}constructor(...e){super(...e),this.expanded=!1,this.label=``,this.supportingText=``,this.current=!1,this.itemHref=`#`,this.noDivider=!1,this._unique=rp._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?.()??`${rp._uidPrefix}-${++rp._uidSeq}`}static{this.styles=[p`
20356
20356
  :host {
20357
20357
  display: block;
20358
20358
  --scb-toc-transition-duration: var(--motion-duration-short, 150ms);
@@ -20807,7 +20807,7 @@
20807
20807
  ${e.footerHtml||``}
20808
20808
  </article>
20809
20809
  </body>
20810
- </html>`}var um=new Set([`a`,`b`,`br`,`em`,`i`,`strong`,`sub`,`sup`,`u`]),dm=new Set([`http:`,`https:`,`mailto:`,`tel:`]),fm=new Set([`_blank`,`_self`]),pm=new Set([`nofollow`,`noopener`,`noreferrer`]);function mm(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&&!dm.has(r)?null:t}function hm(e){let t=mm(e.getAttribute(`href`)),n=(e.getAttribute(`target`)??``).trim().toLowerCase(),r=(e.getAttribute(`rel`)??``).toLowerCase().split(/\s+/).filter(e=>pm.has(e));if(!t){e.removeAttribute(`href`),e.removeAttribute(`target`),e.removeAttribute(`rel`);return}e.setAttribute(`href`,t),fm.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 gm(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(!um.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`&&hm(e)}),n.innerHTML.trim()}function _m(e){return e&&typeof e==`object`&&`html`in e&&`text`in e?{html:typeof e.html==`string`?gm(e.html):``,text:typeof e.text==`string`?e.text:``}:{html:``,text:e==null?``:String(e)}}function vm(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=>e?_m({html:(e.innerHTML??``).trim(),text:s(e)}):{html:``,text:``},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 ym(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=>_m(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 bm(e,t){let n=t.normalizeCell??_m,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 xm(e,t=_m){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(),ml(),Nu(),al(),gd(),fd(),P();var Sm=new Set([`extra-small`,`small`,`medium`,`large`]),Cm=new Set([`tiny`,`extra-small`,`small`,`medium`,`large`]),wm=new Set([`small`,`medium`,`large`]),Tm=`<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"
20810
+ </html>`}var um=new Set([`a`,`b`,`br`,`em`,`i`,`strong`,`sub`,`sup`,`u`]),dm=new Set([`http:`,`https:`,`mailto:`,`tel:`]),fm=new Set([`_blank`,`_self`]),pm=new Set([`nofollow`,`noopener`,`noreferrer`]);function mm(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&&!dm.has(r)?null:t}function hm(e){let t=mm(e.getAttribute(`href`)),n=(e.getAttribute(`target`)??``).trim().toLowerCase(),r=(e.getAttribute(`rel`)??``).toLowerCase().split(/\s+/).filter(e=>pm.has(e));if(!t){e.removeAttribute(`href`),e.removeAttribute(`target`),e.removeAttribute(`rel`);return}e.setAttribute(`href`,t),fm.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 gm(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(!um.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`&&hm(e)}),n.innerHTML.trim()}function _m(e){return e&&typeof e==`object`&&`html`in e&&`text`in e?{html:typeof e.html==`string`?gm(e.html):``,text:typeof e.text==`string`?e.text:``}:{html:``,text:e==null?``:String(e)}}function vm(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=>e?_m({html:(e.innerHTML??``).trim(),text:s(e)}):{html:``,text:``},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 ym(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=>_m(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 bm(e,t){let n=t.normalizeCell??_m,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 xm(e,t=_m){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(),hl(),Pu(),sl(),_d(),pd(),P();var Sm=new Set([`extra-small`,`small`,`medium`,`large`]),Cm=new Set([`tiny`,`extra-small`,`small`,`medium`,`large`]),wm=new Set([`small`,`medium`,`large`]),Tm=`<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"
20811
20811
  viewBox="0 0 727.3 87.3" style="enable-background:new 0 0 727.3 87.3;" xml:space="preserve" fill="currentColor">
20812
20812
  <style type="text/css">
20813
20813
  .st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}
@@ -21758,4 +21758,125 @@
21758
21758
  ></slot>
21759
21759
  <slot></slot>
21760
21760
  </div>
21761
- `}}}_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 Jp(t,this._getExportSurfaceTarget(),e);n&&Xp(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 sm(this._getResolvedTableView(e),e=>this._escapeHtml(e),{getEmptyHeaderLabel:e=>this._getEmptyTableHeaderLabel(e)})}#g(){return cm({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:Tm,source:this.source,sourceLabel:this.sourceLabel})}#_(e){return lm({contentHtml:e,escapeHtml:e=>this._escapeHtml(e),footerHtml:this.#g(),lang:this.lang,subtitle:this.subtitle,title:this.title})}async#v(){await Kp(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 Yp(e,this._getExportSurfaceTarget(),`png`);if(!n)return;t=`<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`}await Gp(this.#_(t))})}#y(){let e=this._getResolvedTableData();e?.rows?.length&&Xp(qp(xm(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,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`)],$),pc(),Oc(),jc(),Bc(),ml(),Nu(),Dd(),Nd(),Ad(),al(),dl(),Jc(),$c(),tf(),rf(),of(),fd(),gd(),md(),bu(),Hc(),Ol(),pc(),Oc(),jc(),Bc(),ml(),Nu(),ud(),vd(),Dd(),Nd(),Ad(),al(),dl(),Jc(),$c(),tf(),rf(),lf(),of(),fd(),gd(),md(),bu(),_f(),Hc(),Ol(),pc(),Oc(),jc(),Bc(),hc(),ml(),Nu(),ud(),vd(),Dd(),Nd(),Ad(),al(),dl(),Jc(),$c(),tf(),rf(),lf(),of(),fd(),gd(),md(),bu(),_f(),Hc(),Ol(),j(),Sc(),Cl(),pc(),Oc(),jc(),Bc(),hc(),ml(),Nu(),ud(),vd(),Dd(),Nd(),Ad(),al(),dl(),Jc(),$c(),tf(),rf(),lf(),of(),fd(),gd(),md(),bu(),_f(),Hc(),Ol(),cc(),j(),Sc(),Cl()})();
21761
+ `}}}_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 Jp(t,this._getExportSurfaceTarget(),e);n&&Xp(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 sm(this._getResolvedTableView(e),e=>this._escapeHtml(e),{getEmptyHeaderLabel:e=>this._getEmptyTableHeaderLabel(e)})}#g(){return cm({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:Tm,source:this.source,sourceLabel:this.sourceLabel})}#_(e){return lm({contentHtml:e,escapeHtml:e=>this._escapeHtml(e),footerHtml:this.#g(),lang:this.lang,subtitle:this.subtitle,title:this.title})}async#v(){await Kp(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 Yp(e,this._getExportSurfaceTarget(),`png`);if(!n)return;t=`<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`}await Gp(this.#_(t))})}#y(){let e=this._getResolvedTableData();e?.rows?.length&&Xp(qp(xm(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,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`)],$),pc(),Oc(),jc(),Bc(),hl(),Pu(),Od(),Pd(),jd(),sl(),fl(),Yc(),el(),nf(),af(),sf(),pd(),_d(),hd(),xu(),Uc(),kl(),pc(),Oc(),jc(),Bc(),hl(),Pu(),dd(),yd(),Od(),Pd(),jd(),sl(),fl(),Yc(),el(),nf(),af(),uf(),sf(),pd(),_d(),hd(),xu(),vf(),Uc(),kl();function Om(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 km=e=>e.scope===`row`||e.classList.contains(`forspalt`)||e.tagName===`TH`&&!e.scope;function Am(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=>!km(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:Om(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`||km(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(Om),values:Array.from(e.cells).slice(a).map(Om)}))}}w(),b(),ll(),P();var jm=200,Mm=new WeakSet,Nm=p`
21762
+ scb-table-next > table {
21763
+ box-sizing: border-box;
21764
+ inline-size: 100%;
21765
+ border-collapse: separate;
21766
+ border-spacing: 0;
21767
+ border: 0;
21768
+ /* Ramen överlappar cellkanterna så att ytterlinjerna förblir 1 px. */
21769
+ outline: 1px solid var(--scb-tables-strong-outline-color);
21770
+ outline-offset: -1px;
21771
+ border-radius: var(--md-sys-shape-corner-small);
21772
+ overflow: hidden;
21773
+ background: var(--scb-tables-surface-color);
21774
+ color: inherit;
21775
+ font: inherit;
21776
+ }
21777
+ scb-table-next > table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
21778
+ box-sizing: border-box;
21779
+ padding: var(--spacing-3) var(--spacing-4);
21780
+ min-inline-size: 2.5rem;
21781
+ border-block-end: 1px solid var(--scb-tables-strong-outline-color);
21782
+ border-inline-end: 1px solid var(--scb-tables-strong-outline-color);
21783
+ font-variant-numeric: tabular-nums;
21784
+ font-weight: inherit;
21785
+ }
21786
+ scb-table-next > table > :is(thead, tbody, tfoot) > tr > th,
21787
+ scb-table-next > table > tbody > tr > .forspalt { background: var(--scb-tables-alternate-surface-color); }
21788
+ scb-table-next > table > thead > tr > * { background: var(--scb-tables-alternate-surface-color); }
21789
+ scb-table-next > table > thead > tr > th { font-weight: var(--weight-bold); text-align: center; }
21790
+ scb-table-next > table > thead > tr:last-child > th { text-align: end; }
21791
+ scb-table-next > table > :is(tbody, tfoot) > tr > :is(th, td) { text-align: end; }
21792
+ scb-table-next > table > :is(tbody, tfoot) > tr > :first-child,
21793
+ scb-table-next > table > :is(tbody, tfoot) > tr > .forspalt,
21794
+ scb-table-next > table > :is(tbody, tfoot) > tr > th:is([scope="row"], [scope="rowgroup"]) { text-align: start; }
21795
+ scb-table-next > table > tbody > tr > .forspalt { min-inline-size: 0; }
21796
+ scb-table-next > table > tbody > tr > :first-child:not(:has(~ th, ~ .forspalt)) { min-inline-size: 0; }
21797
+ scb-table-next > table > tbody > tr:hover > * { background: var(--scb-tables-alternate-surface-color); }
21798
+ scb-table-next > table a { color: inherit; text-decoration: underline; }
21799
+ scb-table-next > table a:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
21800
+ `,Pm=class extends C{constructor(...e){super(...e),this._mobile=!1,this._widthReady=!1}static{this.styles=p`
21801
+ :host {
21802
+ display: block;
21803
+ min-inline-size: 0;
21804
+ color: var(--scb-tables-content-color, var(--md-sys-color-on-surface));
21805
+ font-family: var(--scb-tables-cell-font, var(--brand-font, Inter, Arial, sans-serif));
21806
+ font-size: var(--scb-tables-cell-size);
21807
+ line-height: var(--scb-tables-cell-line-height);
21808
+ font-weight: var(--weight-regular);
21809
+ }
21810
+ * { box-sizing: border-box; }
21811
+ :host([hidden]), [hidden] { display: none !important; }
21812
+ .scroll { max-inline-size: 100%; overflow-x: auto; padding-bottom: var(--spacing-8, 24px); }
21813
+ .scroll::-webkit-scrollbar {
21814
+ border-radius: var(--md-sys-shape-corner-large);
21815
+ height: 8px;
21816
+ width: 10px;
21817
+ }
21818
+ .scroll::-webkit-scrollbar-thumb {
21819
+ background: var(--scb-tables-scrollbar-thumb-color, var(--md-sys-color-on-surface));
21820
+ border-radius: var(--md-sys-shape-corner-large);
21821
+ cursor: pointer;
21822
+ }
21823
+ .scroll::-webkit-scrollbar-track {
21824
+ background: var(--scb-tables-scrollbar-track-color, var(--md-sys-color-secondary-container));
21825
+ border-radius: var(--md-sys-shape-corner-large);
21826
+ }
21827
+ a { color: inherit; text-decoration: underline; }
21828
+ a:focus-visible, .scroll:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
21829
+ table {
21830
+ inline-size: 100%;
21831
+ border-collapse: separate;
21832
+ border-spacing: 0;
21833
+ border: 1px solid var(--scb-tables-strong-outline-color);
21834
+ border-radius: var(--md-sys-shape-corner-small);
21835
+ overflow: hidden;
21836
+ background: var(--scb-tables-surface-color);
21837
+ color: inherit;
21838
+ font: inherit;
21839
+ }
21840
+ th, td {
21841
+ min-inline-size: 2.5rem;
21842
+ font-variant-numeric: tabular-nums;
21843
+ font-weight: inherit;
21844
+ }
21845
+ .stub { text-align: start; }
21846
+ td { text-align: end; }
21847
+ tbody tr:hover > * { background: var(--scb-tables-alternate-surface-color); }
21848
+ .mobile th, .mobile td {
21849
+ padding-block: var(--spacing-2);
21850
+ padding-inline: var(--spacing-5);
21851
+ border: 0;
21852
+ background: transparent;
21853
+ vertical-align: top;
21854
+ }
21855
+ .mobile .stub {
21856
+ min-inline-size: 0;
21857
+ padding-inline-end: calc(var(--spacing-1) / 2);
21858
+ }
21859
+ .mobile td { inline-size: 1%; white-space: nowrap; }
21860
+ .mobile .stub-headings > th { text-align: start; font-weight: var(--weight-bold); }
21861
+ .mobile .stub-headings > th:empty { padding: 0; }
21862
+ .mobile .outer > th {
21863
+ padding-block: var(--spacing-5);
21864
+ background: var(--scb-tables-alternate-surface-color);
21865
+ font-weight: var(--weight-bold);
21866
+ text-align: start;
21867
+ border-block-start: 1px solid var(--scb-tables-strong-outline-color);
21868
+ }
21869
+ .mobile tbody:first-child > .outer:first-child > th { border-block-start: 0; }
21870
+ .mobile .group > th {
21871
+ padding-block-start: 0;
21872
+ font-weight: var(--weight-bold);
21873
+ text-align: start;
21874
+ }
21875
+ .mobile .group.first > th { padding-block-start: calc(var(--spacing-8) + var(--spacing-2)); }
21876
+ .mobile .last > * { padding-block-end: calc(var(--spacing-8) + var(--spacing-2)); }
21877
+ `}connectedCallback(){super.connectedCallback();let e=this.getRootNode();if(!Mm.has(e)){let t=this.ownerDocument.createElement(`style`);t.textContent=Nm.cssText,(e instanceof Document?e.head:e).appendChild(t),Mm.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?Am(e[0],jm):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=${L(e.title)} aria-label=${L(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=${L(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=${L(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`:``}>
21878
+ <th class="stub" scope="row" id=${i} headers=${L(u)}>${n.stubs.filter(e=>e!==``).map((e,t)=>x`${t?` `:S}${this._content(e)}`)}</th>
21879
+ <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>
21880
+ ${e?x`<table class="mobile" aria-label=${L(e.label||void 0)}>
21881
+ <tbody>${this._mobileRows(e)}</tbody>
21882
+ </table>`:S}`}};N([v()],Pm.prototype,`_model`,void 0),N([v()],Pm.prototype,`_mobile`,void 0),Pm=N([a(`scb-table-next`)],Pm),pc(),Oc(),jc(),Bc(),hc(),hl(),Pu(),dd(),yd(),Od(),Pd(),jd(),sl(),fl(),Yc(),el(),nf(),af(),uf(),sf(),pd(),_d(),hd(),xu(),vf(),Uc(),kl(),j(),Sc(),wl(),pc(),Oc(),jc(),Bc(),hc(),hl(),Pu(),dd(),yd(),Od(),Pd(),jd(),sl(),fl(),Yc(),el(),nf(),af(),uf(),sf(),pd(),_d(),hd(),xu(),vf(),Uc(),kl(),cc(),j(),Sc(),wl()})();