@sbb-esta/lyne-elements-dev 5.10.0-dev.1791460555 → 5.10.0-dev.1791461306

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/core.js CHANGED
@@ -40,15 +40,15 @@ let xe=0;var Se=class{constructor(){r||(document.body?this._liveElement=this._cr
40
40
  `;let zn=(()=>{let e=V(H(P)),t,r=[],i=[],c,u=[],f=[],p,m=[],h=[];return class extends e{static{let n=typeof Symbol==`function`&&Symbol.metadata?Object.create(e[Symbol.metadata]??null):void 0;t=[l()],c=[l({attribute:`horizontal-from`,reflect:!0})],p=[l({reflect:!0})],o(this,null,t,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:n},r,i),o(this,null,c,{kind:`accessor`,name:`horizontalFrom`,static:!1,private:!1,access:{has:e=>`horizontalFrom`in e,get:e=>e.horizontalFrom,set:(e,t)=>{e.horizontalFrom=t}},metadata:n},u,f),o(this,null,p,{kind:`accessor`,name:`orientation`,static:!1,private:!1,access:{has:e=>`orientation`in e,get:e=>e.orientation,set:(e,t)=>{e.orientation=t}},metadata:n},m,h),n&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})}static{this.styles=[a(Rn)]}#e=s(this,r,null);get size(){return this.#e}set size(e){this.#e=e}#t=(s(this,i),s(this,u,null));get horizontalFrom(){return this.#t}set horizontalFrom(e){this.#t=e}#n=(s(this,f),s(this,m,`horizontal`));get orientation(){return this.#n}set orientation(e){this.#n=e}get selectionElements(){return Array.from(this.querySelectorAll?.(this.selectionElementSelectors)??[]).filter(e=>e.closest?.(this.localName)===this)}constructor(){super(),s(this,h),this.addController(new d(this,{config:{childList:!0,subtree:!0},callback:()=>this.toggleState(`has-panel`,!!this.querySelector?.(this.panelElementSelector))}))}onSlotChange(){}render(){return n`
41
41
  <slot @slotchange=${()=>this.onSlotChange()}></slot>
42
42
  <slot name="error"></slot>
43
- `}}})();var Bn=class{get size(){return this._handlers.size}constructor(e,t){this._host=e,this._property=t,this._handlers=/* @__PURE__ */ new Set,this._hostDefinedPromise=null,r||(customElements.get(this._host.localName)?customElements.upgrade(this._host):this._hostDefinedPromise=customElements.whenDefined(this._host.localName).then(()=>{customElements.upgrade(this._host),this._hostDefinedPromise=null})),this._value=this._host[this._property]}addHandler(e){this._handlers.size||(this._host.addController?this._host.addController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.addController(this))),this._handlers.add(e),this._hostDefinedPromise?this._hostDefinedPromise.then(()=>e(this._host)):e(this._host)}removeHandler(e){this._handlers.delete(e),this._handlers.size||(this._host.removeController?this._host.removeController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.removeController(this)))}hostUpdate(){let e=this._host[this._property];if(this._value!==e){this._value=e;for(let e of this._handlers)e(this._host)}}};const U=/* @__PURE__ */ new WeakMap;var Vn=class{constructor(e,t,n){this._host=e,this._referenceResolver=t,this._handlers=n,this._host.addController(this)}hostConnected(){this.connect()}hostDisconnected(){this._reference!==this._referenceResolver()&&this.disconnect()}connect(){let e=this._referenceResolver();if(this._reference===e||(this.disconnect(),this._reference=e,!this._reference))return;let t=U.get(this._reference);t||(t=/* @__PURE__ */ new Map,U.set(this._reference,t)),this._watchers=t;for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers.get(e);n||(n=new Bn(this._reference,e),this._watchers.set(e,n)),n.addHandler(t)}}disconnect(){if(this._reference){for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers?.get(e);n&&(n.removeHandler(t),n.size||(this._watchers.delete(e),!this._watchers.size&&this._reference&&U.delete(this._reference)))}this._reference=null}}};const Hn=[];r||window.addEventListener(`keydown`,e=>{e.key===`Escape`&&!e.defaultPrevented&&(e.preventDefault(),Hn.at(-1)?.escapeStrategy())});var Un=class{constructor(e,t=Hn){this._host=e,this._overlayStack=t,this._host.addController?.(this)}hostDisconnected(){this.disconnect()}connect(){this.disconnect(),this._overlayStack.push(this._host)}disconnect(){if(this._overlayStack.length){let e=this._overlayStack.findIndex(e=>e===this._host);e!==-1&&this._overlayStack.splice(e,1)}}};const Wn=/* @__PURE__ */ new WeakMap;var Gn=class{constructor(e,t,n=Wn){this._host=e,this._idRef=t,this._observers=n,this._rootNode=null,this._host.addController(this)}hostConnected(){if(r)return;this._rootNode=this._host.getRootNode();let e=this._observers.get(this._rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)n.add(e.oldValue),n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>n.add(e.id)));for(let t of e){let e=t._host[t._idRef];e&&typeof e==`string`&&n.has(e)&&t._host.requestUpdate()}});t.observe(this._rootNode,{attributeFilter:[`id`],childList:!0,subtree:!0,attributeOldValue:!0}),this._observers.set(this._rootNode,{observer:t,controllers:e})}}hostDisconnected(){if(r||!this._rootNode)return;let e=this._observers.get(this._rootNode);if(!e){this._rootNode=null;return}e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),this._observers.delete(this._rootNode)),this._rootNode=null}find(){if(r||!this._rootNode)return null;{let e=this._host[this._idRef];return typeof e==`string`?this._rootNode?.getElementById(e):null}}};const Kn=[`script`,`head`,`template`,`style`,`link`],qn=/* @__PURE__ */ new Set,Jn=/* @__PURE__ */ new Set,Yn=/* @__PURE__ */ new Set;var Xn=class{constructor(e,t=qn,n=Yn,r=Jn){this._host=e,this._inertElements=t,this._inertOverlays=n,this._exemptedElements=r,this._host.addController?.(this)}hostConnected(){this._host.isOpen&&this.activate()}hostDisconnected(){this.isInert()&&this.deactivate()}activate(){this._inertOverlays.size&&this._removeAllInertAttributes(),this._inertOverlays.add(this._host),this._addAllInertAttributes()}deactivate(){if(this._currentOverlay()!==this._host){this._inertOverlays.has(this._host)&&this._inertOverlays.delete(this._host);return}this._removeAllInertAttributes(),this._inertOverlays.delete(this._host),this._inertOverlays.size&&this._addAllInertAttributes()}isInert(){return this._inertOverlays.has(this._host)}exempt(e){this._inertElements.has(e)&&!this._exemptedElements.has(e)&&(this._removeInertAttributes(e),this._inertElements.delete(e),this._exemptedElements.add(e))}restoreAllExempted(){this._exemptedElements.forEach(e=>this._addInertAttributes(e)),this._exemptedElements.clear()}_currentOverlay(){return[...this._inertOverlays].pop()??null}_removeAllInertAttributes(){this._inertElements.forEach(e=>this._removeInertAttributes(e)),this._inertElements.clear()}_removeInertAttributes(e){e&&(e.hasAttribute(`data-sbb-inert`)&&(e.inert=!1,e.removeAttribute(`data-sbb-inert`)),e.hasAttribute(`data-sbb-aria-hidden`)&&(e.removeAttribute(`aria-hidden`),e.removeAttribute(`data-sbb-aria-hidden`)))}_addAllInertAttributes(){let e=this._currentOverlay(),t=e?[e]:[],n=[document.documentElement];for(;n.length>0;)for(let e of n.shift().querySelectorAll(`*`))e.matches(`sbb-toast,.sbb-overlay-outlet,.sbb-live-announcer-element,.cdk-live-announcer-element,.cdk-overlay-container`)&&t.push(e),e.shadowRoot&&n.push(e.shadowRoot);let r=[],i=e=>r.push(...e.composedPath());for(let e of t)e.addEventListener(`ɵinert`,i,{once:!0}),e.dispatchEvent(new Event(`ɵinert`,{composed:!0}));let a=new Set(r),o=/* @__PURE__ */ new Set;for(let e of a)for(let t of e.parentNode?.childNodes??[])t.nodeType===Node.ELEMENT_NODE&&!Kn.includes(t.localName)&&!a.has(t)&&o.add(t);for(let e of o)this._addInertAttributes(e)}_addInertAttributes(e){this._inertElements.add(e),e.inert||(e.inert=!0,e.toggleAttribute(`data-sbb-inert`,!0)),e.hasAttribute(`aria-hidden`)||(e.setAttribute(`aria-hidden`,`true`),e.toggleAttribute(`data-sbb-aria-hidden`,!0))}};const Zn=`(forced-colors: active)`,W=`(prefers-color-scheme: dark)`,Qn=`(any-hover: hover)`,$n=`(pointer: coarse)`,er=`(min-width: 0rem)`,tr=`(min-width: 37.5rem)`,nr=`(min-width: 64rem)`,rr=`(min-width: 90rem)`,ir=`(max-width: 63.9375rem)`,ar=`(max-width: 89.9375rem)`,G=/* @__PURE__ */ new Map;var or=class{constructor(e,t){this._queries=t,e.addController(this)}matches(e){return r?null:matchMedia(e).matches}hostConnected(){if(!r)for(let[e,t]of Object.entries(this._queries)){let n=G.get(e);if(n)n.handlers.add(t);else{let n=matchMedia(e),r=/* @__PURE__ */ new Set([t]),i=e=>r.forEach(t=>t(e.matches));n.addEventListener(`change`,i),G.set(e,{mediaQueryList:n,handlers:r,eventHandler:i})}}}hostDisconnected(){for(let[e,t]of Object.entries(this._queries)){let n=G.get(e);n&&(n.handlers.delete(t),n.handlers.size||G.delete(e))}}},sr=class e extends or{static{this._currentMode=this._readLightDarkClass()}static{this._observer=r?null:new MutationObserver(t=>{if(t[0].oldValue!==document.documentElement.getAttribute(`class`)){let t=this._readLightDarkClass();this._currentMode!==t&&(e.requestUpdate(),this._currentMode=t)}})}static{this._observerConfig={attributeFilter:[`class`],attributeOldValue:!0}}constructor(e,t){let n=()=>{t(this.matches()),this._host.toggleState?.(`dark`,this.matches())};super(e,{[W]:n}),this._host=e,this._onChangeWithStateUpdater=n}static _readLightDarkClass(){if(r)return null;let e=document.documentElement.classList;return[`sbb-light-dark`,`sbb-dark`,`sbb-light`].find(t=>e.contains(t))??null}static requestUpdate(){let e=G.get(W);e&&e.handlers.forEach(t=>t(e.mediaQueryList.matches))}hostConnected(){let t=(G.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0;super.hostConnected(),t&&e._observer.observe(document.documentElement,e._observerConfig),this._onChangeWithStateUpdater()}hostDisconnected(){super.hostDisconnected(),(G.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0&&e._observer.disconnect()}matches(){if(r)return!1;let e=getComputedStyle(this._host).getPropertyValue(`color-scheme`),t=e.includes(`dark`),n=e.trim()===`dark`;return super.matches(`(prefers-color-scheme: dark)`)&&t||n}};const cr=!r&&CSS.supports(`anchor-name`,`--test`),lr=[`top`,`bottom`,`left`,`right`,`top span-left`,`top span-right`,`bottom span-left`,`bottom span-right`,`left span-top`,`left span-bottom`,`right span-top`,`right span-bottom`],ur=[`block-start`,`block-end`,`inline-start`,`inline-end`,`block-start span-inline-start`,`block-start span-inline-end`,`block-end span-inline-start`,`block-end span-inline-end`,`inline-start span-block-start`,`inline-start span-block-end`,`inline-end span-block-start`,`inline-end span-block-end`],dr={"block-start":`block-start`,"block-end":`block-end`,"inline-start":`inline-end`,"inline-end":`inline-start`,"block-start span-inline-start":`block-start span-inline-end`,"block-start span-inline-end":`block-start span-inline-start`,"block-end span-inline-start":`block-end span-inline-end`,"block-end span-inline-end":`block-end span-inline-start`,"inline-start span-block-start":`inline-end span-block-start`,"inline-start span-block-end":`inline-end span-block-end`,"inline-end span-block-start":`inline-start span-block-start`,"inline-end span-block-end":`inline-start span-block-end`};[...lr,...ur];let fr=0;var pr=class{get currentPosition(){return this._usePolyfill?this._lastPosition??this._positions[0]??``:(this._overlayStyles??=getComputedStyle(this._overlay),this._overlayStyles.getPropertyValue(`position-area`))}constructor(e,t=!cr){this._usePolyfill=t,this._resizeObserver=r?null:new ResizeObserver(()=>this._requestCalculatePosition()),this._anchorName=`--sbb-overlay-anchor-${++fr}`,this._positions=[],e.addController(this),this._overlay=e}hostConnected(){this._usePolyfill?this._overlay.style.setProperty(`position-area`,`initial`):this._overlay.style.setProperty(`position-anchor`,this._anchorName)}hostUpdate(){r||this._readPositionsFromCss()}connect(e){r||(this._anchor&&this.disconnect(),this._anchor=e,this._usePolyfill||this._anchor.style.setProperty(`anchor-name`,this._anchorName),this._readPositionsFromCss(),this._calculatePosition(),this._abortController?.abort(),this._abortController=new AbortController,document.addEventListener(`scroll`,()=>this._requestCalculatePosition(),{capture:!0,passive:!0,signal:this._abortController.signal}),window.addEventListener(`resize`,()=>this._requestCalculatePosition(),{passive:!0,signal:this._abortController.signal}),this._resizeObserver.observe(e,{box:`border-box`}),this._resizeObserver.observe(this._overlay,{box:`border-box`}))}disconnect(){this._anchor?.style.removeProperty(`anchor-name`),this._anchor=void 0,this._abortController?.abort(),this._resizeObserver.disconnect()}_requestCalculatePosition(){this._frame??=requestAnimationFrame(()=>{this._calculatePosition(),this._frame=void 0})}_calculatePosition(){if(this._anchor){if(this._usePolyfill){let e=this._getOptimalPosition(this._positions);this._applyOverlayPosition(e.position,e.left,e.top)}this._overlay.setAttribute(`data-position`,this.currentPosition)}}_getOptimalPosition(e){let{offsetHeight:t,offsetWidth:n}=this._overlay,{innerHeight:r,innerWidth:i}=window,{top:a,left:o,height:s,width:c}=this._anchor.getBoundingClientRect(),l=this._overlay.matches(`:dir(rtl)`),u=a,d=r-s-a,f=o,p=i-c-o,m=n-c,h=t-s,g=m/2,_=h/2;this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-height`,`${s}px`),this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-width`,`${c}px`);let v={left:0,top:0,position:``},y;for(let r of e){switch(l&&ur.includes(r)?dr[r]:r){default:case`bottom`:case`block-end`:v={position:r,left:o-g,top:a+s,fits:t<=d&&g<=f&&g<=p};break;case`top`:case`block-start`:v={position:r,left:o-g,top:a-t,fits:t<=u&&g<=f&&g<=p};break;case`right`:case`inline-end`:v={position:r,left:o+c,top:a-_,fits:n<=p&&_<=u&&_<=d};break;case`left`:case`inline-start`:v={position:r,left:o-n,top:a-_,fits:n<=f&&_<=u&&_<=d};break;case`top span-left`:case`block-start span-inline-start`:v={position:r,left:o-m,top:a-t,fits:t<=u&&m<=f};break;case`top span-right`:case`block-start span-inline-end`:v={position:r,left:o,top:a-t,fits:t<=u&&m<=p};break;case`bottom span-left`:case`block-end span-inline-start`:v={position:r,left:o-m,top:a+s,fits:t<=d&&m<=f};break;case`bottom span-right`:case`block-end span-inline-end`:v={position:r,left:o,top:a+s,fits:t<=d&&m<=p};break;case`left span-top`:case`inline-start span-block-start`:v={position:r,left:o-n,top:a+s-t,fits:n<=f&&h<=u};break;case`left span-bottom`:case`inline-start span-block-end`:v={position:r,left:o-n,top:a,fits:n<=f&&h<=d};break;case`right span-top`:case`inline-end span-block-start`:v={position:r,left:o+c,top:a+s-t,fits:n<=p&&h<=u};break;case`right span-bottom`:case`inline-end span-block-end`:v={position:r,left:o+c,top:a,fits:n<=p&&h<=d}}if(v.fits)return v;y??=v}return y}_applyOverlayPosition(e,t,n){this._lastPosition=e,this._overlay.style.left=`${t}px`,this._overlay.style.top=`${n}px`}_readPositionsFromCss(){if(!this._usePolyfill)return;this._overlayStyles??=getComputedStyle(this._overlay);let e=[this._overlayStyles.getPropertyValue(`--sbb-overlay-position-area`)||`block-end`,...this._overlayStyles.getPropertyValue(`--sbb-overlay-position-try-fallbacks`).split(`,`).map(e=>e.trim()).filter(e=>!!e)];this._positions=e,this._lastPosition&&!this._positions.includes(this._lastPosition)&&(this._lastPosition=void 0)}};const mr=/(0?[1-9]|[12][0-9]|3[01])[.,\\/\-\s](0?[1-9]|1[0-2])[.,\\/\-\s]([0-9]{1,4}$)?/,hr=/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-3][0-9])$/,gr=1,_r=2,vr=3,yr=4,br=5,xr=6,Sr=0;var K=class{constructor(e=15){this._cutoffYearOffset=e}deserialize(e){return e==null||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}parse(e){if(!e)return null;let t=null,n=e.match(hr);try{t=n?this.createDate(+n[1],+n[2],+n[3]):null}catch{}if(this.isValid(t))return t;let r=e.replace(/\D/g,` `).trim()?.match(mr);try{t=r?this.createDate(+r[3],+r[2],+r[1]):null}catch{}if(!r||r.index!==0||r.length<=2||r.some(e=>e===void 0)||!this.isValid(t))return null;let i=+r[3];if(typeof i==`number`&&i<100&&i>=0){let e=this.getYear(this.today())-2e3+this._cutoffYearOffset;i=i<=e?2e3+i:1900+i}return this.createDate(i,+r[2],+r[1])}format(e,t){if(!this.isValid(e))return``;let n=/* @__PURE__ */ new Date(this.toIso8601(e)+`T00:00:00`),r=new Intl.DateTimeFormat(`de-CH`,{day:`2-digit`,month:`2-digit`,year:`numeric`});if(t?.weekdayStyle===`none`)return r.format(n);let i=t?.weekdayStyle??`short`,a=this.getDayOfWeekNames(i)[this.getDayOfWeek(e)];return a=a.charAt(0).toUpperCase()+a.substring(1),i===`short`&&(a=a.substring(0,2)),`${a}, ${r.format(n)}`}toIso8601(e){let t=(e,t=2)=>`${e}`.padStart(t,`0`);return`${t(this.getYear(e),4)}-${t(this.getMonth(e))}-${t(this.getDate(e))}`}getValidDateOrNull(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}getFirstWeekOffset(e){let t=this.createDate(this.getYear(e),this.getMonth(e),1);return(7+this.getDayOfWeek(t)-this.getFirstDayOfWeek())%7}compareDate(e,t){return this.getYear(e)-this.getYear(t)||this.getMonth(e)-this.getMonth(t)||this.getDate(e)-this.getDate(t)}sameDate(e,t){if(e&&t){let n=this.isValid(e),r=this.isValid(t);return n&&r?!this.compareDate(e,t):n==r}return e==t}clampDate(e,t,n){return t&&this.compareDate(e,t)<0?t:n&&this.compareDate(e,n)>0?n:e}};const Cr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var wr=class extends K{getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()+1}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getAccessibilityFormatDate(e){return new Intl.DateTimeFormat(z.current,{year:`numeric`,month:`long`,day:`numeric`}).format(new Date(e))}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(new Date(2017,e,1)))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(new Date(2017,0,t+1)))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(new Date(2017,0,e+1)))}getFirstDayOfWeek(){return 1}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e),0))}today(){return new Date((/* @__PURE__ */ new Date()).setHours(0,0,0,0))}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);let r=this._createDateWithOverflow(e,t-1,n);if(r.getMonth()+1!==t)throw Error(`Invalid day "${n}" for month "${t}".`);return r}isDateInstance(e){return e instanceof Date}isValid(e){return!!e&&!isNaN(e.valueOf())}clone(e){return new Date(e.valueOf())}addCalendarYears(e,t){return this.addCalendarMonths(e,t*12)}addCalendarMonths(e,t){let n=e.getMonth()+t,r=new Date(e.getFullYear(),n,1,0,0,0,0),i=this.getNumDaysInMonth(r);return new Date(this.clone(e).setMonth(n,Math.min(i,e.getDate())))}addCalendarDays(e,t){let n=e.getDate()+t;return new Date(e.getFullYear(),e.getMonth(),n,0,0,0,0)}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Cr.test(e))return this.getValidDateOrNull(new Date(e.includes(`T`)?e:e+`T00:00:00`))}return super.deserialize(e)}invalid(){return/* @__PURE__ */ new Date(NaN)}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}_createDateWithOverflow(e,t,n){let r=new Date(e,t,n);return e>=0&&e<100&&r.setFullYear(this.getYear(r)-1900),r}};const q=new wr,Tr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var Er=class extends K{constructor(e){if(super(e),typeof Temporal!=`object`)throw Error(`Temporal is not available in the current environment. Please make sure to include the temporal polyfill.`)}getYear(e){return e.year}getMonth(e){return e.month}getDate(e){return e.day}getDayOfWeek(e){return e.dayOfWeek%7}getAccessibilityFormatDate(e){return this.deserialize(e).toLocaleString(z.current,{year:`numeric`,month:`long`,day:`numeric`})}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(Temporal.PlainDate.from({year:2017,month:e+1,day:1})))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(Temporal.PlainDate.from({year:2017,month:1,day:t+1})))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(Temporal.PlainDate.from({year:2017,month:1,day:e+1})))}getFirstDayOfWeek(){return 1}getNumDaysInMonth(e){return e.daysInMonth}today(){return Temporal.Now.plainDateISO()}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);try{return Temporal.PlainDate.from({year:e,month:t,day:n},{overflow:`reject`})}catch{throw Error(`Invalid date "${n}" for month with index "${t}".`)}}isDateInstance(e){return e instanceof Temporal.PlainDate}isValid(e){return this.isDateInstance(e)}clone(e){return Temporal.PlainDate.from(e)}addCalendarYears(e,t){return e.add({years:t})}addCalendarMonths(e,t){return e.add({months:t})}addCalendarDays(e,t){return e.add({days:t})}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Tr.test(e))return this.getValidDateOrNull(Temporal.PlainDate.from(e.split(`T`)[0]))}return super.deserialize(e)}invalid(){return null}toIso8601(e){return e.toJSON()}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}};const Dr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{get(){let n=t.get.call(this);return e(this,n)}};throw Error(`Unsupported decorator location: ${r}`)},Or=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(r){let i=n.access.get(this);t.set.call(this,r);let a=n.access.get(this);a!==i&&e(this,a,i)}};throw Error(`Unsupported decorator location: ${r}`)},J=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,kr=()=>(e,t)=>{let{kind:n,metadata:i,name:a}=t;if(n===`accessor`){if(r)return{};let n=globalThis.litPropertyMetadata.get(i)?.get(a)?.attribute,o=typeof n==`string`?n:a;return t.addInitializer(function(){this.addController({host:this,rootNode:null,checkIdReference(e){let n=this.host.getAttribute(o)??Y.get(this.host);if(n&&typeof n==`string`&&(!e||e.has(n))){let e=this.rootNode?.getElementById?.(n)??null;t.access.get(this.host)!==e&&t.access.set(this.host,e)}},hostConnected(){this.rootNode=this.host.getRootNode(),this.checkIdReference();let e=J.get(this.rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)e.oldValue&&n.add(e.oldValue),e.target.id&&n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(t.id&&n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>{e.id&&n.add(e.id)}));e.forEach(e=>e.checkIdReference(n))});t.observe(this.rootNode,{attributeFilter:[`id`],attributeOldValue:!0,childList:!0,subtree:!0}),J.set(this.rootNode,{observer:t,controllers:e})}},hostDisconnected(){if(r||!this.rootNode)return;let e=J.get(this.rootNode);if(!e){this.rootNode=null;return}e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),J.delete(this.rootNode)),this.rootNode=null}})}),{set(t){if(typeof t!=`string`)Y.delete(this),t instanceof HTMLElement&&this.hasAttribute(o)&&t.id!==this.getAttribute(o)&&this.removeAttribute(o);else if(this.hasAttribute(o)&&this.getAttribute(o)!==t)return;else{let e=t?this.getRootNode?.()?.getElementById?.(t):null;e?t=e:t&&=(Y.set(this,t),null)}e.set.call(this,t)}}}throw Error(`Unsupported decorator location: ${n}`)},Ar={toAttribute(e,t){let n=R().datetime?.dateAdapter??q;return n.isValid(e)?n.toIso8601(e):null}},jr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(e){let n=R().datetime?.dateAdapter??q;e=n.getValidDateOrNull(n.deserialize(e)),e=e?n.createDate(n.getYear(e),n.getMonth(e),n.getDate(e)):null,t.set.call(this,e)},get(){let n=R().datetime?.dateAdapter??q,r=t.get.call(this);return n.isValid(r)?n.clone(r):e?.fallback?.(n)}};throw Error(`Unsupported decorator location: ${r}`)};function Mr(e,t){if(r||globalThis.disableAnimation)return!0;let n=getComputedStyle(e).getPropertyValue(t);return parseFloat(n)===0}function X(e,t){let n=t;for(;n;){if(n===e)return!0;n=n instanceof ShadowRoot?n.host:n.parentNode}return!1}function Nr(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function Pr(e){let t=()=>queueMicrotask(e);document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t()}function Z(){return document.body.hasAttribute(`data-sbb-scroll-disabled`)}function Fr(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}function Ir(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&Fr(t))return t}return null}var Lr=class{constructor(){this._scrollPosition=0,this._touchStartY=0,this._touchStart=e=>{this._touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=Ir(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()}}disableScroll(){if(Z())return;this._scrollPosition=window.scrollY||document.documentElement.scrollTop,this._position=document.body.style.position,this._top=document.body.style.top,this._insetInline=document.body.style.insetInline,this._overflow=document.body.style.overflow;let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollPosition}px`,document.body.style.insetInline=`0 ${e}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${e}px`),document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){Z()&&(document.body.style.position=this._position||``,document.body.style.top=this._top||``,document.body.style.insetInline=this._insetInline||``,document.body.style.overflow=this._overflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollPosition))}};function Rr(e){e.key===` `&&e.preventDefault()}function zr(e,t){let n=Object.getPrototypeOf(e).constructor,r=new n(e.type,e);t.dispatchEvent(r)}const Br=e=>{class t extends e{constructor(){super(...arguments),this.isAnimating=!1,this._animationPromise=Promise.resolve()}get animationComplete(){return this._animationPromise}disconnectedCallback(){super.disconnectedCallback(),this.stopAnimation()}startAnimation(){this.isAnimating||(this._animationPromise=this._enqueueAnimation())}stopAnimation(){}async _enqueueAnimation(){this.isAnimating=!0;let e=this.stopAnimation,t=new Promise(t=>{this.stopAnimation=()=>{e(),this.isAnimating=!1,t()}});try{await this._animationPromise}catch(e){Promise.reject(e)}return t}}return t},Vr=e=>(()=>{let n=V(H(L(e))),r=[],i;return class extends n{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;i=[l({type:Boolean,converter:{...t,fromAttribute:(e,n)=>({value:t.fromAttribute?.(e,n),attribute:!0})}})],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,r),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`checkbox`}set checked(e){let t=typeof e==`object`&&e.attribute;t&&(e=e.value),this.hasUpdated&&!t&&(this._attributeMutationBlocked=!0),this._checked=!!e,this.updateFormValue()}get checked(){return this._checked}get type(){return`checkbox`}constructor(){super(),this._attributeMutationBlocked=(s(this,r),!1),this._languageController=new z(this),this._checked=!1,this._handleKeyboardInteraction=e=>{e.key===` `&&this._handleUserInteraction()},this._handleUserInteraction=()=>{this.disabled||(this.withUserInteraction?.(),this.checked=!this.checked,this._attributeMutationBlocked=!0,this.dispatchEvent(new InputEvent(`input`,{composed:!0,bubbles:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this.addEventListener?.(`click`,this._handleUserInteraction),this.addEventListener?.(`keydown`,Rr),this.addEventListener?.(`keyup`,this._handleKeyboardInteraction)}connectedCallback(){super.connectedCallback(),this.tabIndex=0}attributeChangedCallback(e,t,n){(e!==`checked`||!this._attributeMutationBlocked)&&super.attributeChangedCallback(e,t,n)}formResetCallback(){this.checked=this.hasAttribute(`checked`),this._attributeMutationBlocked=!1}formStateRestoreCallback(e,t){e&&(this.checked=e===`true`)}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}formState(){return`${this.checked}`}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){super.validate(),this.required&&!this.checked?this.setValidityFlag(`valueMissing`,fn[this._languageController.current]):this.removeValidityFlag(`valueMissing`)}}})(),Hr=e=>(()=>{let t=e,n=[],r;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l({type:Boolean,attribute:`readonly`})],o(this,null,r,{kind:`setter`,name:`readOnly`,static:!1,private:!1,access:{has:e=>`readOnly`in e,set:(e,t)=>{e.readOnly=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}set readOnly(e){this.#e=!!e,this.toggleAttribute(`readonly`,this.#e)}get readOnly(){return this.#e}#e=(s(this,n),!1)}})(),Ur=(()=>{if(r)return!1;let e=document.createElement(`div`);return e.setAttribute(`contenteditable`,`PLAINTEXT-ONLY`),e.contentEditable===`plaintext-only`})(),Wr=e=>(()=>{let t=Hr(V(H(L(e)))),i=[],a,u,d;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[l()],u=[l({attribute:!1})],d=[c({passive:!0})],o(this,null,a,{kind:`setter`,name:`value`,static:!1,private:!1,access:{has:e=>`value`in e,set:(e,t)=>{e.value=t}},metadata:e},null,i),o(this,null,u,{kind:`setter`,name:`placeholder`,static:!1,private:!1,access:{has:e=>`placeholder`in e,set:(e,t)=>{e.placeholder=t}},metadata:e},null,i),o(this,null,d,{kind:`method`,name:`_cleanChildren`,static:!1,private:!1,access:{has:e=>`_cleanChildren`in e,get:e=>e._cleanChildren},metadata:e},null,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`textbox`}static{this.formFieldAssociated=!0}get type(){return`text`}set value(e){this._value=this._cleanText(e),this.hasUpdated&&this._assignValue(this._value),this.dispatchEvent(new Event(`displayvaluechange`,{bubbles:!0,composed:!0}))}get value(){return this._value??``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`),this.internals.ariaPlaceholder=e||null}get placeholder(){return this.getAttribute(`placeholder`)??``}constructor(){super(),this._shouldEmitChange=(s(this,i),!1),this._shouldTriggerSubmit=!1,this.language=new z(this),this._value=``,this.addEventListener?.(`input`,()=>{let e=this._value;this._value=this._cleanText(this.textContent??``),this.requestUpdate(`value`,e),this.internals.states.add(`interacted`),this._shouldEmitChange=!0},{capture:!0}),this.addEventListener?.(`change`,()=>this._shouldEmitChange=!1,{capture:!0}),this.addEventListener?.(`keydown`,e=>{if(this._requiresEmptyPatch()&&this._assignValue(``),(e.key===`Enter`||e.key===`
43
+ `}}})();var Bn=class{get size(){return this._handlers.size}constructor(e,t){this._host=e,this._property=t,this._handlers=/* @__PURE__ */ new Set,this._hostDefinedPromise=null,r||(customElements.get(this._host.localName)?customElements.upgrade(this._host):this._hostDefinedPromise=customElements.whenDefined(this._host.localName).then(()=>{customElements.upgrade(this._host),this._hostDefinedPromise=null})),this._value=this._host[this._property]}addHandler(e){this._handlers.size||(this._host.addController?this._host.addController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.addController(this))),this._handlers.add(e),this._hostDefinedPromise?this._hostDefinedPromise.then(()=>e(this._host)):e(this._host)}removeHandler(e){this._handlers.delete(e),this._handlers.size||(this._host.removeController?this._host.removeController(this):this._hostDefinedPromise&&this._hostDefinedPromise.then(()=>this._host.removeController(this)))}hostUpdate(){let e=this._host[this._property];if(this._value!==e){this._value=e;for(let e of this._handlers)e(this._host)}}};const U=/* @__PURE__ */ new WeakMap;var Vn=class{constructor(e,t,n){this._host=e,this._referenceResolver=t,this._handlers=n,this._host.addController(this)}hostConnected(){this.connect()}hostDisconnected(){this._reference!==this._referenceResolver()&&this.disconnect()}connect(){let e=this._referenceResolver();if(this._reference===e||(this.disconnect(),this._reference=e,!this._reference))return;let t=U.get(this._reference);t||(t=/* @__PURE__ */ new Map,U.set(this._reference,t)),this._watchers=t;for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers.get(e);n||(n=new Bn(this._reference,e),this._watchers.set(e,n)),n.addHandler(t)}}disconnect(){if(this._reference){for(let[e,t]of Object.entries(this._handlers)){let n=this._watchers?.get(e);n&&(n.removeHandler(t),n.size||(this._watchers.delete(e),!this._watchers.size&&this._reference&&U.delete(this._reference)))}this._reference=null}}};const Hn=[];r||window.addEventListener(`keydown`,e=>{e.key===`Escape`&&!e.defaultPrevented&&(e.preventDefault(),Hn.at(-1)?.escapeStrategy())});var Un=class{constructor(e,t=Hn){this._host=e,this._overlayStack=t,this._host.addController?.(this)}hostDisconnected(){this.disconnect()}connect(){this.disconnect(),this._overlayStack.push(this._host)}disconnect(){if(this._overlayStack.length){let e=this._overlayStack.findIndex(e=>e===this._host);e!==-1&&this._overlayStack.splice(e,1)}}};const Wn=/* @__PURE__ */ new WeakMap;var Gn=class{constructor(e,t,n=Wn){this._host=e,this._idRef=t,this._observers=n,this._rootNode=null,this._host.addController(this)}hostConnected(){if(r)return;this._rootNode=this._host.getRootNode();let e=this._observers.get(this._rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)n.add(e.oldValue),n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>n.add(e.id)));for(let t of e){let e=t._host[t._idRef];e&&typeof e==`string`&&n.has(e)&&t._host.requestUpdate()}});t.observe(this._rootNode,{attributeFilter:[`id`],childList:!0,subtree:!0,attributeOldValue:!0}),this._observers.set(this._rootNode,{observer:t,controllers:e})}}hostDisconnected(){if(r||!this._rootNode)return;let e=this._observers.get(this._rootNode);if(!e){this._rootNode=null;return}e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),this._observers.delete(this._rootNode)),this._rootNode=null}find(){if(r||!this._rootNode)return null;{let e=this._host[this._idRef];return typeof e==`string`?this._rootNode?.getElementById(e):null}}};const Kn=[`script`,`head`,`template`,`style`,`link`],qn=/* @__PURE__ */ new Set,Jn=/* @__PURE__ */ new Set,Yn=/* @__PURE__ */ new Set;var Xn=class{constructor(e,t=qn,n=Yn,r=Jn){this._host=e,this._inertElements=t,this._inertOverlays=n,this._exemptedElements=r,this._host.addController?.(this)}hostConnected(){this._host.isOpen&&this.activate()}hostDisconnected(){this.isInert()&&this.deactivate()}activate(){this._inertOverlays.size&&this._removeAllInertAttributes(),this._inertOverlays.add(this._host),this._addAllInertAttributes()}deactivate(){if(this._currentOverlay()!==this._host){this._inertOverlays.has(this._host)&&this._inertOverlays.delete(this._host);return}this._removeAllInertAttributes(),this._inertOverlays.delete(this._host),this._inertOverlays.size&&this._addAllInertAttributes()}isInert(){return this._inertOverlays.has(this._host)}exempt(e){this._inertElements.has(e)&&!this._exemptedElements.has(e)&&(this._removeInertAttributes(e),this._inertElements.delete(e),this._exemptedElements.add(e))}restoreAllExempted(){this._exemptedElements.forEach(e=>this._addInertAttributes(e)),this._exemptedElements.clear()}_currentOverlay(){return[...this._inertOverlays].pop()??null}_removeAllInertAttributes(){this._inertElements.forEach(e=>this._removeInertAttributes(e)),this._inertElements.clear()}_removeInertAttributes(e){e&&(e.hasAttribute(`data-sbb-inert`)&&(e.inert=!1,e.removeAttribute(`data-sbb-inert`)),e.hasAttribute(`data-sbb-aria-hidden`)&&(e.removeAttribute(`aria-hidden`),e.removeAttribute(`data-sbb-aria-hidden`)))}_addAllInertAttributes(){let e=this._currentOverlay(),t=e?[e]:[],n=[document.documentElement];for(;n.length>0;)for(let e of n.shift().querySelectorAll(`*`))e.matches(`sbb-toast,.sbb-overlay-outlet,.sbb-live-announcer-element,.cdk-live-announcer-element,.cdk-overlay-container`)&&t.push(e),e.shadowRoot&&n.push(e.shadowRoot);let r=[],i=e=>r.push(...e.composedPath());for(let e of t)e.addEventListener(`ɵinert`,i,{once:!0}),e.dispatchEvent(new Event(`ɵinert`,{composed:!0}));let a=new Set(r),o=/* @__PURE__ */ new Set;for(let e of a)for(let t of e.parentNode?.childNodes??[])t.nodeType===Node.ELEMENT_NODE&&!Kn.includes(t.localName)&&!a.has(t)&&o.add(t);for(let e of o)this._addInertAttributes(e)}_addInertAttributes(e){this._inertElements.add(e),e.inert||(e.inert=!0,e.toggleAttribute(`data-sbb-inert`,!0)),e.hasAttribute(`aria-hidden`)||(e.setAttribute(`aria-hidden`,`true`),e.toggleAttribute(`data-sbb-aria-hidden`,!0))}};const Zn=`(forced-colors: active)`,W=`(prefers-color-scheme: dark)`,Qn=`(any-hover: hover)`,$n=`(pointer: coarse)`,er=`(min-width: 0rem)`,tr=`(min-width: 37.5rem)`,nr=`(min-width: 64rem)`,rr=`(min-width: 90rem)`,ir=`(max-width: 63.9375rem)`,ar=`(max-width: 89.9375rem)`,G=/* @__PURE__ */ new Map;var or=class{constructor(e,t){this._queries=t,e.addController(this)}matches(e){return r?null:matchMedia(e).matches}hostConnected(){if(!r)for(let[e,t]of Object.entries(this._queries)){let n=G.get(e);if(n)n.handlers.add(t);else{let n=matchMedia(e),r=/* @__PURE__ */ new Set([t]),i=e=>r.forEach(t=>t(e.matches));n.addEventListener(`change`,i),G.set(e,{mediaQueryList:n,handlers:r,eventHandler:i})}}}hostDisconnected(){for(let[e,t]of Object.entries(this._queries)){let n=G.get(e);n&&(n.handlers.delete(t),n.handlers.size||G.delete(e))}}},sr=class e extends or{static{this._currentMode=this._readLightDarkClass()}static{this._observer=r?null:new MutationObserver(t=>{if(t[0].oldValue!==document.documentElement.getAttribute(`class`)){let t=this._readLightDarkClass();this._currentMode!==t&&(e.requestUpdate(),this._currentMode=t)}})}static{this._observerConfig={attributeFilter:[`class`],attributeOldValue:!0}}constructor(e,t){let n=()=>{t(this.matches()),this._host.toggleState?.(`dark`,this.matches())};super(e,{[W]:n}),this._host=e,this._onChangeWithStateUpdater=n}static _readLightDarkClass(){if(r)return null;let e=document.documentElement.classList;return[`sbb-light-dark`,`sbb-dark`,`sbb-light`].find(t=>e.contains(t))??null}static requestUpdate(){let e=G.get(W);e&&e.handlers.forEach(t=>t(e.mediaQueryList.matches))}hostConnected(){let t=(G.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0;super.hostConnected(),t&&e._observer.observe(document.documentElement,e._observerConfig),this._onChangeWithStateUpdater()}hostDisconnected(){super.hostDisconnected(),(G.get(`(prefers-color-scheme: dark)`)?.handlers.size??0)===0&&e._observer.disconnect()}matches(){if(r)return!1;let e=getComputedStyle(this._host).getPropertyValue(`color-scheme`),t=e.includes(`dark`),n=e.trim()===`dark`;return super.matches(`(prefers-color-scheme: dark)`)&&t||n}};const cr=!r&&CSS.supports(`anchor-name`,`--test`),lr=[`top`,`bottom`,`left`,`right`,`top span-left`,`top span-right`,`bottom span-left`,`bottom span-right`,`left span-top`,`left span-bottom`,`right span-top`,`right span-bottom`],ur=[`block-start`,`block-end`,`inline-start`,`inline-end`,`block-start span-inline-start`,`block-start span-inline-end`,`block-end span-inline-start`,`block-end span-inline-end`,`inline-start span-block-start`,`inline-start span-block-end`,`inline-end span-block-start`,`inline-end span-block-end`],dr={"block-start":`block-start`,"block-end":`block-end`,"inline-start":`inline-end`,"inline-end":`inline-start`,"block-start span-inline-start":`block-start span-inline-end`,"block-start span-inline-end":`block-start span-inline-start`,"block-end span-inline-start":`block-end span-inline-end`,"block-end span-inline-end":`block-end span-inline-start`,"inline-start span-block-start":`inline-end span-block-start`,"inline-start span-block-end":`inline-end span-block-end`,"inline-end span-block-start":`inline-start span-block-start`,"inline-end span-block-end":`inline-start span-block-end`};[...lr,...ur];let fr=0;var pr=class{get currentPosition(){return this._usePolyfill?this._lastPosition??this._positions[0]??``:(this._overlayStyles??=getComputedStyle(this._overlay),this._overlayStyles.getPropertyValue(`position-area`))}constructor(e,t=!cr){this._usePolyfill=t,this._resizeObserver=r?null:new ResizeObserver(()=>this._requestCalculatePosition()),this._anchorName=`--sbb-overlay-anchor-${++fr}`,this._positions=[],e.addController(this),this._overlay=e}hostConnected(){this._usePolyfill?this._overlay.style.setProperty(`position-area`,`initial`):this._overlay.style.setProperty(`position-anchor`,this._anchorName)}hostUpdate(){r||this._readPositionsFromCss()}connect(e){r||(this._anchor&&this.disconnect(),this._anchor=e,this._usePolyfill||this._anchor.style.setProperty(`anchor-name`,this._anchorName),this._readPositionsFromCss(),this._calculatePosition(),this._abortController?.abort(),this._abortController=new AbortController,document.addEventListener(`scroll`,()=>this._requestCalculatePosition(),{capture:!0,passive:!0,signal:this._abortController.signal}),window.addEventListener(`resize`,()=>this._requestCalculatePosition(),{passive:!0,signal:this._abortController.signal}),this._resizeObserver.observe(e,{box:`border-box`}),this._resizeObserver.observe(this._overlay,{box:`border-box`}))}disconnect(){this._anchor?.style.removeProperty(`anchor-name`),this._anchor=void 0,this._abortController?.abort(),this._resizeObserver.disconnect()}_requestCalculatePosition(){this._frame??=requestAnimationFrame(()=>{this._calculatePosition(),this._frame=void 0})}_calculatePosition(){if(this._anchor){if(this._usePolyfill){let e=this._getOptimalPosition(this._positions);this._applyOverlayPosition(e.position,e.left,e.top)}this._overlay.setAttribute(`data-position`,this.currentPosition)}}_getOptimalPosition(e){let{offsetHeight:t,offsetWidth:n}=this._overlay,{innerHeight:r,innerWidth:i}=window,{top:a,left:o,height:s,width:c}=this._anchor.getBoundingClientRect(),l=this._overlay.matches(`:dir(rtl)`),u=a,d=r-s-a,f=o,p=i-c-o,m=n-c,h=t-s,g=m/2,_=h/2;this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-height`,`${s}px`),this._overlay.style.setProperty(`--sbb-overlay-controller-trigger-width`,`${c}px`);let v={left:0,top:0,position:``},y;for(let r of e){switch(l&&ur.includes(r)?dr[r]:r){default:case`bottom`:case`block-end`:v={position:r,left:o-g,top:a+s,fits:t<=d&&g<=f&&g<=p};break;case`top`:case`block-start`:v={position:r,left:o-g,top:a-t,fits:t<=u&&g<=f&&g<=p};break;case`right`:case`inline-end`:v={position:r,left:o+c,top:a-_,fits:n<=p&&_<=u&&_<=d};break;case`left`:case`inline-start`:v={position:r,left:o-n,top:a-_,fits:n<=f&&_<=u&&_<=d};break;case`top span-left`:case`block-start span-inline-start`:v={position:r,left:o-m,top:a-t,fits:t<=u&&m<=f};break;case`top span-right`:case`block-start span-inline-end`:v={position:r,left:o,top:a-t,fits:t<=u&&m<=p};break;case`bottom span-left`:case`block-end span-inline-start`:v={position:r,left:o-m,top:a+s,fits:t<=d&&m<=f};break;case`bottom span-right`:case`block-end span-inline-end`:v={position:r,left:o,top:a+s,fits:t<=d&&m<=p};break;case`left span-top`:case`inline-start span-block-start`:v={position:r,left:o-n,top:a+s-t,fits:n<=f&&h<=u};break;case`left span-bottom`:case`inline-start span-block-end`:v={position:r,left:o-n,top:a,fits:n<=f&&h<=d};break;case`right span-top`:case`inline-end span-block-start`:v={position:r,left:o+c,top:a+s-t,fits:n<=p&&h<=u};break;case`right span-bottom`:case`inline-end span-block-end`:v={position:r,left:o+c,top:a,fits:n<=p&&h<=d}}if(v.fits)return v;y??=v}return y}_applyOverlayPosition(e,t,n){this._lastPosition=e,this._overlay.style.left=`${t}px`,this._overlay.style.top=`${n}px`}_readPositionsFromCss(){if(!this._usePolyfill)return;this._overlayStyles??=getComputedStyle(this._overlay);let e=[this._overlayStyles.getPropertyValue(`--sbb-overlay-position-area`)||`block-end`,...this._overlayStyles.getPropertyValue(`--sbb-overlay-position-try-fallbacks`).split(`,`).map(e=>e.trim()).filter(e=>!!e)];this._positions=e,this._lastPosition&&!this._positions.includes(this._lastPosition)&&(this._lastPosition=void 0)}};const mr=/* @__PURE__ */ new Set;var hr=class{constructor(e,t=mr){this._host=e,this._lockers=t,this._locked=!1,this._scrollProperties={scrollPosition:0,touchStartY:0},this._touchStart=e=>{this._scrollProperties.touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=this._findScrollableAncestor(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._scrollProperties.touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()},this._host.addController?.(this)}_isVerticallyScrollable(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}_findScrollableAncestor(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&this._isVerticallyScrollable(t))return t}return null}hostDisconnected(){this.enableScroll()}disableScroll(){if(this._locked)return;this._locked=!0;let e=this._lockers.size===0;if(this._lockers.add(this._host),!e)return;this._scrollProperties.scrollPosition=window.scrollY||document.documentElement.scrollTop,this._scrollProperties.savedPosition=document.body.style.position,this._scrollProperties.savedTop=document.body.style.top,this._scrollProperties.savedInsetInline=document.body.style.insetInline,this._scrollProperties.savedOverflow=document.body.style.overflow;let t=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollProperties.scrollPosition}px`,document.body.style.insetInline=`0 ${t}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${t}px`),document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){this._locked&&(this._locked=!1,this._lockers.delete(this._host),!(this._lockers.size>0)&&(document.body.style.position=this._scrollProperties.savedPosition||``,document.body.style.top=this._scrollProperties.savedTop||``,document.body.style.insetInline=this._scrollProperties.savedInsetInline||``,document.body.style.overflow=this._scrollProperties.savedOverflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollProperties.scrollPosition)))}};const gr=/(0?[1-9]|[12][0-9]|3[01])[.,\\/\-\s](0?[1-9]|1[0-2])[.,\\/\-\s]([0-9]{1,4}$)?/,_r=/^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-3][0-9])$/,vr=1,yr=2,br=3,xr=4,Sr=5,Cr=6,wr=0;var K=class{constructor(e=15){this._cutoffYearOffset=e}deserialize(e){return e==null||this.isDateInstance(e)&&this.isValid(e)?e:this.invalid()}parse(e){if(!e)return null;let t=null,n=e.match(_r);try{t=n?this.createDate(+n[1],+n[2],+n[3]):null}catch{}if(this.isValid(t))return t;let r=e.replace(/\D/g,` `).trim()?.match(gr);try{t=r?this.createDate(+r[3],+r[2],+r[1]):null}catch{}if(!r||r.index!==0||r.length<=2||r.some(e=>e===void 0)||!this.isValid(t))return null;let i=+r[3];if(typeof i==`number`&&i<100&&i>=0){let e=this.getYear(this.today())-2e3+this._cutoffYearOffset;i=i<=e?2e3+i:1900+i}return this.createDate(i,+r[2],+r[1])}format(e,t){if(!this.isValid(e))return``;let n=/* @__PURE__ */ new Date(this.toIso8601(e)+`T00:00:00`),r=new Intl.DateTimeFormat(`de-CH`,{day:`2-digit`,month:`2-digit`,year:`numeric`});if(t?.weekdayStyle===`none`)return r.format(n);let i=t?.weekdayStyle??`short`,a=this.getDayOfWeekNames(i)[this.getDayOfWeek(e)];return a=a.charAt(0).toUpperCase()+a.substring(1),i===`short`&&(a=a.substring(0,2)),`${a}, ${r.format(n)}`}toIso8601(e){let t=(e,t=2)=>`${e}`.padStart(t,`0`);return`${t(this.getYear(e),4)}-${t(this.getMonth(e))}-${t(this.getDate(e))}`}getValidDateOrNull(e){return this.isDateInstance(e)&&this.isValid(e)?e:null}getFirstWeekOffset(e){let t=this.createDate(this.getYear(e),this.getMonth(e),1);return(7+this.getDayOfWeek(t)-this.getFirstDayOfWeek())%7}compareDate(e,t){return this.getYear(e)-this.getYear(t)||this.getMonth(e)-this.getMonth(t)||this.getDate(e)-this.getDate(t)}sameDate(e,t){if(e&&t){let n=this.isValid(e),r=this.isValid(t);return n&&r?!this.compareDate(e,t):n==r}return e==t}clampDate(e,t,n){return t&&this.compareDate(e,t)<0?t:n&&this.compareDate(e,n)>0?n:e}};const Tr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var Er=class extends K{getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()+1}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getAccessibilityFormatDate(e){return new Intl.DateTimeFormat(z.current,{year:`numeric`,month:`long`,day:`numeric`}).format(new Date(e))}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(new Date(2017,e,1)))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(new Date(2017,0,t+1)))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(new Date(2017,0,e+1)))}getFirstDayOfWeek(){return 1}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e),0))}today(){return new Date((/* @__PURE__ */ new Date()).setHours(0,0,0,0))}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);let r=this._createDateWithOverflow(e,t-1,n);if(r.getMonth()+1!==t)throw Error(`Invalid day "${n}" for month "${t}".`);return r}isDateInstance(e){return e instanceof Date}isValid(e){return!!e&&!isNaN(e.valueOf())}clone(e){return new Date(e.valueOf())}addCalendarYears(e,t){return this.addCalendarMonths(e,t*12)}addCalendarMonths(e,t){let n=e.getMonth()+t,r=new Date(e.getFullYear(),n,1,0,0,0,0),i=this.getNumDaysInMonth(r);return new Date(this.clone(e).setMonth(n,Math.min(i,e.getDate())))}addCalendarDays(e,t){let n=e.getDate()+t;return new Date(e.getFullYear(),e.getMonth(),n,0,0,0,0)}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Tr.test(e))return this.getValidDateOrNull(new Date(e.includes(`T`)?e:e+`T00:00:00`))}return super.deserialize(e)}invalid(){return/* @__PURE__ */ new Date(NaN)}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}_createDateWithOverflow(e,t,n){let r=new Date(e,t,n);return e>=0&&e<100&&r.setFullYear(this.getYear(r)-1900),r}};const q=new Er,Dr=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;var Or=class extends K{constructor(e){if(super(e),typeof Temporal!=`object`)throw Error(`Temporal is not available in the current environment. Please make sure to include the temporal polyfill.`)}getYear(e){return e.year}getMonth(e){return e.month}getDate(e){return e.day}getDayOfWeek(e){return e.dayOfWeek%7}getAccessibilityFormatDate(e){return this.deserialize(e).toLocaleString(z.current,{year:`numeric`,month:`long`,day:`numeric`})}getMonthNames(e){let t=new Intl.DateTimeFormat(z.current,{month:e});return this._range(12,e=>t.format(Temporal.PlainDate.from({year:2017,month:e+1,day:1})))}getDateNames(){let e=new Intl.DateTimeFormat(z.current,{day:`numeric`});return this._range(31,t=>e.format(Temporal.PlainDate.from({year:2017,month:1,day:t+1})))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(z.current,{weekday:e});return this._range(7,e=>t.format(Temporal.PlainDate.from({year:2017,month:1,day:e+1})))}getFirstDayOfWeek(){return 1}getNumDaysInMonth(e){return e.daysInMonth}today(){return Temporal.Now.plainDateISO()}createDate(e,t,n){if(t<1||t>12)throw Error(`Invalid month "${t}". Month has to be between 1 and 12.`);if(n<1)throw Error(`Invalid day "${n}". Day has to be greater than 0.`);try{return Temporal.PlainDate.from({year:e,month:t,day:n},{overflow:`reject`})}catch{throw Error(`Invalid date "${n}" for month with index "${t}".`)}}isDateInstance(e){return e instanceof Temporal.PlainDate}isValid(e){return this.isDateInstance(e)}clone(e){return Temporal.PlainDate.from(e)}addCalendarYears(e,t){return e.add({years:t})}addCalendarMonths(e,t){return e.add({months:t})}addCalendarDays(e,t){return e.add({days:t})}deserialize(e){if(typeof e==`string`){if(!e)return null;if(Dr.test(e))return this.getValidDateOrNull(Temporal.PlainDate.from(e.split(`T`)[0]))}return super.deserialize(e)}invalid(){return null}toIso8601(e){return e.toJSON()}_range(e,t){return Array.from({length:e},(e,n)=>t(n))}};const kr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{get(){let n=t.get.call(this);return e(this,n)}};throw Error(`Unsupported decorator location: ${r}`)},Ar=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(r){let i=n.access.get(this);t.set.call(this,r);let a=n.access.get(this);a!==i&&e(this,a,i)}};throw Error(`Unsupported decorator location: ${r}`)},J=/* @__PURE__ */ new WeakMap,Y=/* @__PURE__ */ new WeakMap,jr=()=>(e,t)=>{let{kind:n,metadata:i,name:a}=t;if(n===`accessor`){if(r)return{};let n=globalThis.litPropertyMetadata.get(i)?.get(a)?.attribute,o=typeof n==`string`?n:a;return t.addInitializer(function(){this.addController({host:this,rootNode:null,checkIdReference(e){let n=this.host.getAttribute(o)??Y.get(this.host);if(n&&typeof n==`string`&&(!e||e.has(n))){let e=this.rootNode?.getElementById?.(n)??null;t.access.get(this.host)!==e&&t.access.set(this.host,e)}},hostConnected(){this.rootNode=this.host.getRootNode(),this.checkIdReference();let e=J.get(this.rootNode);if(e)e.controllers.add(this);else{let e=/* @__PURE__ */ new Set([this]),t=new MutationObserver(t=>{let n=/* @__PURE__ */ new Set;for(let e of t)if(e.type===`attributes`)e.oldValue&&n.add(e.oldValue),e.target.id&&n.add(e.target.id);else if(e.type===`childList`)for(let t of[...e.addedNodes,...e.removedNodes])t instanceof HTMLElement&&(t.id&&n.add(t.id),t.querySelectorAll(`[id]`).forEach(e=>{e.id&&n.add(e.id)}));e.forEach(e=>e.checkIdReference(n))});t.observe(this.rootNode,{attributeFilter:[`id`],attributeOldValue:!0,childList:!0,subtree:!0}),J.set(this.rootNode,{observer:t,controllers:e})}},hostDisconnected(){if(r||!this.rootNode)return;let e=J.get(this.rootNode);if(!e){this.rootNode=null;return}e.controllers.delete(this),e.controllers.size===0&&(e.observer.disconnect(),J.delete(this.rootNode)),this.rootNode=null}})}),{set(t){if(typeof t!=`string`)Y.delete(this),t instanceof HTMLElement&&this.hasAttribute(o)&&t.id!==this.getAttribute(o)&&this.removeAttribute(o);else if(this.hasAttribute(o)&&this.getAttribute(o)!==t)return;else{let e=t?this.getRootNode?.()?.getElementById?.(t):null;e?t=e:t&&=(Y.set(this,t),null)}e.set.call(this,t)}}}throw Error(`Unsupported decorator location: ${n}`)},Mr={toAttribute(e,t){let n=R().datetime?.dateAdapter??q;return n.isValid(e)?n.toIso8601(e):null}},Nr=e=>(t,n)=>{let{kind:r}=n;if(r===`accessor`)return{set(e){let n=R().datetime?.dateAdapter??q;e=n.getValidDateOrNull(n.deserialize(e)),e=e?n.createDate(n.getYear(e),n.getMonth(e),n.getDate(e)):null,t.set.call(this,e)},get(){let n=R().datetime?.dateAdapter??q,r=t.get.call(this);return n.isValid(r)?n.clone(r):e?.fallback?.(n)}};throw Error(`Unsupported decorator location: ${r}`)};function Pr(e,t){if(r||globalThis.disableAnimation)return!0;let n=getComputedStyle(e).getPropertyValue(t);return parseFloat(n)===0}function X(e,t){let n=t;for(;n;){if(n===e)return!0;n=n instanceof ShadowRoot?n.host:n.parentNode}return!1}function Fr(e,t,n){n?e.setAttribute(t,n):e.removeAttribute(t)}function Ir(e){let t=()=>queueMicrotask(e);document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,t):t()}function Z(){return document.body.hasAttribute(`data-sbb-scroll-disabled`)}function Lr(e){let t=getComputedStyle(e).overflowY;return(t===`auto`||t===`scroll`)&&e.scrollHeight>e.clientHeight}function Rr(e){for(let t of e){if(t===document.body||t===document.documentElement)break;if(t instanceof Element&&Lr(t))return t}return null}var zr=class{constructor(){this._scrollPosition=0,this._touchStartY=0,this._touchStart=e=>{this._touchStartY=e.touches[0]?.clientY??0},this._touchMove=e=>{let t=e.touches[0];if(!t)return;let n=Rr(e.composedPath());if(!n){e.preventDefault();return}let r=t.clientY-this._touchStartY,i=n.scrollTop<=0,a=n.scrollTop+n.clientHeight>=n.scrollHeight;(i&&r>0||a&&r<0)&&e.preventDefault()}}disableScroll(){if(Z())return;this._scrollPosition=window.scrollY||document.documentElement.scrollTop,this._position=document.body.style.position,this._top=document.body.style.top,this._insetInline=document.body.style.insetInline,this._overflow=document.body.style.overflow;let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.position=`fixed`,document.body.style.top=`-${this._scrollPosition}px`,document.body.style.insetInline=`0 ${e}px`,document.body.style.overflow=`hidden`,document.body.style.setProperty(`--sbb-scrollbar-reserved-space`,`${e}px`),document.addEventListener(`touchstart`,this._touchStart,{passive:!0}),document.addEventListener(`touchmove`,this._touchMove,{passive:!1}),document.body.toggleAttribute(`data-sbb-scroll-disabled`,!0)}enableScroll(){Z()&&(document.body.style.position=this._position||``,document.body.style.top=this._top||``,document.body.style.insetInline=this._insetInline||``,document.body.style.overflow=this._overflow||``,document.body.style.removeProperty(`--sbb-scrollbar-reserved-space`),document.removeEventListener(`touchstart`,this._touchStart),document.removeEventListener(`touchmove`,this._touchMove),document.body.removeAttribute(`data-sbb-scroll-disabled`),window.scrollTo(0,this._scrollPosition))}};function Br(e){e.key===` `&&e.preventDefault()}function Vr(e,t){let n=Object.getPrototypeOf(e).constructor,r=new n(e.type,e);t.dispatchEvent(r)}const Hr=e=>{class t extends e{constructor(){super(...arguments),this.isAnimating=!1,this._animationPromise=Promise.resolve()}get animationComplete(){return this._animationPromise}disconnectedCallback(){super.disconnectedCallback(),this.stopAnimation()}startAnimation(){this.isAnimating||(this._animationPromise=this._enqueueAnimation())}stopAnimation(){}async _enqueueAnimation(){this.isAnimating=!0;let e=this.stopAnimation,t=new Promise(t=>{this.stopAnimation=()=>{e(),this.isAnimating=!1,t()}});try{await this._animationPromise}catch(e){Promise.reject(e)}return t}}return t},Ur=e=>(()=>{let n=V(H(L(e))),r=[],i;return class extends n{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;i=[l({type:Boolean,converter:{...t,fromAttribute:(e,n)=>({value:t.fromAttribute?.(e,n),attribute:!0})}})],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,r),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`checkbox`}set checked(e){let t=typeof e==`object`&&e.attribute;t&&(e=e.value),this.hasUpdated&&!t&&(this._attributeMutationBlocked=!0),this._checked=!!e,this.updateFormValue()}get checked(){return this._checked}get type(){return`checkbox`}constructor(){super(),this._attributeMutationBlocked=(s(this,r),!1),this._languageController=new z(this),this._checked=!1,this._handleKeyboardInteraction=e=>{e.key===` `&&this._handleUserInteraction()},this._handleUserInteraction=()=>{this.disabled||(this.withUserInteraction?.(),this.checked=!this.checked,this._attributeMutationBlocked=!0,this.dispatchEvent(new InputEvent(`input`,{composed:!0,bubbles:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0})))},this.addEventListener?.(`click`,this._handleUserInteraction),this.addEventListener?.(`keydown`,Br),this.addEventListener?.(`keyup`,this._handleKeyboardInteraction)}connectedCallback(){super.connectedCallback(),this.tabIndex=0}attributeChangedCallback(e,t,n){(e!==`checked`||!this._attributeMutationBlocked)&&super.attributeChangedCallback(e,t,n)}formResetCallback(){this.checked=this.hasAttribute(`checked`),this._attributeMutationBlocked=!1}formStateRestoreCallback(e,t){e&&(this.checked=e===`true`)}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}formState(){return`${this.checked}`}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){super.validate(),this.required&&!this.checked?this.setValidityFlag(`valueMissing`,fn[this._languageController.current]):this.removeValidityFlag(`valueMissing`)}}})(),Wr=e=>(()=>{let t=e,n=[],r;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[l({type:Boolean,attribute:`readonly`})],o(this,null,r,{kind:`setter`,name:`readOnly`,static:!1,private:!1,access:{has:e=>`readOnly`in e,set:(e,t)=>{e.readOnly=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}set readOnly(e){this.#e=!!e,this.toggleAttribute(`readonly`,this.#e)}get readOnly(){return this.#e}#e=(s(this,n),!1)}})(),Gr=(()=>{if(r)return!1;let e=document.createElement(`div`);return e.setAttribute(`contenteditable`,`PLAINTEXT-ONLY`),e.contentEditable===`plaintext-only`})(),Kr=e=>(()=>{let t=Wr(V(H(L(e)))),i=[],a,u,d;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;a=[l()],u=[l({attribute:!1})],d=[c({passive:!0})],o(this,null,a,{kind:`setter`,name:`value`,static:!1,private:!1,access:{has:e=>`value`in e,set:(e,t)=>{e.value=t}},metadata:e},null,i),o(this,null,u,{kind:`setter`,name:`placeholder`,static:!1,private:!1,access:{has:e=>`placeholder`in e,set:(e,t)=>{e.placeholder=t}},metadata:e},null,i),o(this,null,d,{kind:`method`,name:`_cleanChildren`,static:!1,private:!1,access:{has:e=>`_cleanChildren`in e,get:e=>e._cleanChildren},metadata:e},null,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`textbox`}static{this.formFieldAssociated=!0}get type(){return`text`}set value(e){this._value=this._cleanText(e),this.hasUpdated&&this._assignValue(this._value),this.dispatchEvent(new Event(`displayvaluechange`,{bubbles:!0,composed:!0}))}get value(){return this._value??``}set placeholder(e){e?this.setAttribute(`placeholder`,e):this.removeAttribute(`placeholder`),this.internals.ariaPlaceholder=e||null}get placeholder(){return this.getAttribute(`placeholder`)??``}constructor(){super(),this._shouldEmitChange=(s(this,i),!1),this._shouldTriggerSubmit=!1,this.language=new z(this),this._value=``,this.addEventListener?.(`input`,()=>{let e=this._value;this._value=this._cleanText(this.textContent??``),this.requestUpdate(`value`,e),this.internals.states.add(`interacted`),this._shouldEmitChange=!0},{capture:!0}),this.addEventListener?.(`change`,()=>this._shouldEmitChange=!1,{capture:!0}),this.addEventListener?.(`keydown`,e=>{if(this._requiresEmptyPatch()&&this._assignValue(``),(e.key===`Enter`||e.key===`
44
44
  `)&&e.isTrusted)e.preventDefault(),e.stopImmediatePropagation(),this._shouldTriggerSubmit=this.dispatchEvent(new KeyboardEvent(`keydown`,e));else if(A&&this.value&&(e.key===`Backspace`||e.key===`Delete`)&&e.isTrusted){if(e.preventDefault(),e.stopImmediatePropagation(),!this.dispatchEvent(new KeyboardEvent(`keydown`,e)))return;let t=window.getSelection()?.getRangeAt(0);if(!t)return;t.startOffset===t.endOffset?e.key===`Backspace`&&t.startOffset>0?(t.setStart(t.startContainer,t.startOffset-1),t.deleteContents(),this._dispatchInputEvent()):e.key===`Delete`&&t.endOffset<this.value.length&&(t.setEnd(t.endContainer,t.endOffset+1),t.deleteContents(),this._dispatchInputEvent()):(t.deleteContents(),this._dispatchInputEvent())}},{capture:!0}),this.addEventListener?.(`keyup`,e=>{e.key===`Enter`||e.key===`
45
- `?(this._emitChangeIfNecessary(),this._shouldTriggerSubmit&&(this._shouldTriggerSubmit=!1,this.form?.requestSubmit())):this._requiresEmptyPatch()&&this._setCursorAt(0)},{capture:!0}),this.addEventListener?.(`paste`,e=>{e.preventDefault(),this._requiresEmptyPatch()&&this._assignValue(``);let t=this._cleanText(e.clipboardData?.getData(`text/plain`)??``),n=window.getSelection()?.getRangeAt(0);n&&t&&(n.deleteContents(),n.insertNode(document.createTextNode(this.preparePastedText(t))),n.setStart(n.endContainer,n.endOffset),this._dispatchInputEvent())}),this.addEventListener?.(`focus`,()=>{T.mostRecentModality===`keyboard`&&window.getSelection()?.selectAllChildren(this)}),this.addEventListener?.(`touchend`,()=>{this._requiresEmptyPatch()&&(this._assignValue(`&nbsp;`),this._setCursorAt(0))}),this.addEventListener?.(`click`,()=>{this._requiresEmptyPatch()&&T.mostRecentModality===`touch`&&this._setCursorAt(0)}),this.addEventListener?.(`blur`,()=>{window.getSelection()?.removeAllRanges(),this.value===``&&this._assignValue(``),this._emitChangeIfNecessary(),this.scrollLeft=0},{capture:!0})}isDisabledExternally(){return this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals.ariaMultiLine=`false`,this._updateContenteditable(),this._assignValue(this.value)}focus(e){if(super.focus(e),this._canSelect()){let e=window.getSelection();if(!e)return;let t=e.rangeCount>0?e.getRangeAt(0):null;if(t&&t.startOffset!==0)return;this._setCursorAt(this.textContent.length)}}attributeChangedCallback(e,t,n){(e!==`value`||!this.matches?.(`:is(:state(interacted),[state--interacted])`))&&super.attributeChangedCallback(e,t,n)}formResetCallback(){this.internals.states.delete(`interacted`),this.value=this.getAttribute(`value`)??``}formStateRestoreCallback(e,t){e&&typeof e==`string`&&(this.value=e)}select(){window.getSelection()?.selectAllChildren(this)}firstUpdated(e){super.firstUpdated(e),this.value&&!this.innerHTML.length&&this._assignValue(this.value)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this.isConnected&&(e===`disabled`||e===`formDisabled`||e===`readOnly`)&&this._updateContenteditable()}shouldValidate(e){return super.shouldValidate(e)||e===`value`||e===`required`}validate(){super.validate(),this.required&&!this.value?this.setValidityFlag(`valueMissing`,mn[this.language.current]):this.removeValidityFlag(`valueMissing`)}isSelected(){if(r)return!1;let e=window.getSelection();return!!e&&e.rangeCount>0&&this.contains(e.anchorNode)}preparePastedText(e){return e}_requiresEmptyPatch(){return!r&&k&&this.value===``&&window.matchMedia(`(pointer: coarse)`).matches}_assignValue(e){this.innerHTML=e}_setCursorAt(e){let t=window.getSelection();if(!this.firstChild||!t)return;let n=document.createRange();n.setStart(this.firstChild,e),n.collapse(!0),t.removeAllRanges(),t.addRange(n)}_cleanText(e){return e===null?``:`${e}`.replace(/[\n\r]+/g,``)}_dispatchInputEvent(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}_cleanChildren(){if(this.childElementCount)for(let e of this.children)e.remove()}_updateContenteditable(){if(!r&&this.isConnected){this.internals.ariaReadOnly=this.readOnly?`true`:null,this.internals.ariaDisabled=this.disabled?`true`:null;let e=this.disabled||this.readOnly?`false`:Ur?`plaintext-only`:`true`;this.setAttribute(`contenteditable`,e),this.readOnly?this.setAttribute(`tabindex`,`0`):this.removeAttribute(`tabindex`)}}_emitChangeIfNecessary(){this._shouldEmitChange&&(this._shouldEmitChange=!1,this.dispatchEvent(new Event(`change`,{bubbles:!0})))}_canSelect(){return!r&&!this.disabled&&!this.readOnly&&!!this.value}render(){return n`<slot @slotchange=${this._cleanChildren}></slot>`}}})(),Q=/* @__PURE__ */ new WeakMap,Gr=e=>(()=>{let t=V(H(L(e))),n=[],i,a;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;i=[l({type:Boolean})],a=[l()],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,n),o(this,null,a,{kind:`setter`,name:`name`,static:!1,private:!1,access:{has:e=>`name`in e,set:(e,t)=>{e.name=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`radio`}set checked(e){this._checked=!!e,this.toggleState(`checked`,this.checked),this.internals.ariaChecked=this.checked.toString(),this.updateFormValue(),this._synchronizeGroupState()}get checked(){return this._checked}set name(e){let t=this.name;e!==t&&(super.name=e,this._disconnectFromRegistry(t),this._connectToRegistry(),this._synchronizeGroupState())}get name(){return super.name}get type(){return`radio`}constructor(){super(),this._checked=(s(this,n),!1),this._languageController=new z(this),this.addEventListener?.(`keydown`,e=>this._handleArrowKeyDown(e))}connectedCallback(){super.connectedCallback(),this._connectToRegistry(),this._synchronizeGroupState()}disconnectedCallback(){super.disconnectedCallback(),this._disconnectFromRegistry(this.name)}formResetCallback(){this.checked=this.hasAttribute(`checked`)}formStateRestoreCallback(e,t){typeof e==`string`||e==null?this.checked=e===this.value:e instanceof FormData&&this._readFormData(e).then(e=>{this.checked=e===this.value})}async _readFormData(e){let t=e.get(this.name);return t instanceof Blob?JSON.parse(await t.text()):t}willUpdate(e){super.willUpdate(e),e.has(`disabled`)&&this.updateFocusableRadios()}firstUpdated(e){super.firstUpdated(e),this.updateFocusableRadios()}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){if(super.validate(),!this.associatedRadioButtons)return;let e=!1,t=!1;for(let n of this.associatedRadioButtons)e||=n.required,t||=n.checked;e&&!t?this.associatedRadioButtons.forEach(e=>e.setValidityFlag(`valueMissing`,pn[this._languageController.current])):this.associatedRadioButtons.forEach(e=>e.removeValidityFlag(`valueMissing`))}updateFocusableRadios(){if(!this.hasUpdated)return;let e=this._interactableGroupedRadios(),t=e.findIndex(e=>e.checked&&!e.disabled&&!e.formDisabled),n=t===-1?e.findIndex(e=>!e.disabled&&!e.formDisabled):t;n!==-1&&(e[n].tabIndex=0,e.splice(n,1)),e.forEach(e=>e.removeAttribute(`tabindex`))}async navigateByKeyboard(e){e.checked=!0,this.emitChangeEvents(),await e.updateComplete,e.focus()}emitChangeEvents(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,cancelable:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}_synchronizeGroupState(){this.checked&&this._deselectGroupedRadios(),this.updateFocusableRadios()}_connectToRegistry(){if(!this.name||r)return;let e=this.form??this.getRootNode();this._radioButtonGroupsMap=Q.get(e),this._radioButtonGroupsMap||(this._radioButtonGroupsMap=/* @__PURE__ */ new Map,Q.set(e,this._radioButtonGroupsMap)),this.associatedRadioButtons=this._radioButtonGroupsMap.get(this.name),this.associatedRadioButtons||(this.associatedRadioButtons=/* @__PURE__ */ new Set,this._radioButtonGroupsMap.set(this.name,this.associatedRadioButtons));let t=Array.from(this.associatedRadioButtons);this.associatedRadioButtons.clear();let n=t.findIndex(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING);n===-1?t.push(this):t.splice(n,0,this),t.forEach(e=>this.associatedRadioButtons.add(e)),this.validate()}_disconnectFromRegistry(e){this.associatedRadioButtons?.delete(this),this.associatedRadioButtons?.size===0?this._radioButtonGroupsMap?.delete(e):this.validate(),this.associatedRadioButtons=void 0,this._radioButtonGroupsMap=void 0}_interactableGroupedRadios(){return Array.from(this.associatedRadioButtons??[]).filter(e=>M.isVisible(e))}_deselectGroupedRadios(){Array.from(this.associatedRadioButtons??[]).filter(e=>e!==this).forEach(e=>e.checked=!1)}async _handleArrowKeyDown(e){if(!p(e))return;e.preventDefault();let t=this._interactableGroupedRadios().filter(e=>!e.disabled&&!e.formDisabled),n=y(e,t.indexOf(this),t.length);await this.navigateByKeyboard(t[n])}}})();var Kr=`:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-button,:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}:is(.sbb-scrollbar-negative,.sbb-scrollbar-thick-negative,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-color:color-mix(in srgb, var(--sbb-color-white) 30%, transparent);--sbb-scrollbar-color-hover:color-mix(in srgb, var(--sbb-color-white) 60%, transparent)}:is(.sbb-scrollbar-thick-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-thumb-width:.5rem;--sbb-scrollbar-thumb-width-hover:var(--sbb-scrollbar-thumb-width);--sbb-scrollbar-width-firefox:auto}:is(.sbb-scrollbar-track-visible,.sbb-scrollbar-thick-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4)}:is(.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4-negative)}
46
- `,qr=`button{appearance:none;box-sizing:border-box;-webkit-tap-highlight-color:transparent;color:inherit;background:0 0;border:none;border-radius:0;outline:none;margin:0;padding:0}
47
- `,Jr=`:host{--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:host::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:host::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:host::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:host::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:host::-webkit-scrollbar-button,:host::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:host{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}
48
- `,Yr=`ul,ol{font-size:inherit;margin:0;padding:0;list-style:none}
49
- `,Xr=`:host(:where([popover])),.sbb-popover-reset:where([popover]){width:auto;height:auto;color:inherit;pointer-events:none;background-color:#0000;border:none;margin:0;padding:0}
50
- `,Zr=`.sbb-screen-reader-only{clip-path:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
51
- `;const Qr=a(qr),$r=a(Jr),ei=a(Yr),ti=a(Zr),ni=a(Xr),ri=a(Kr),ii=`data-ssr-child-count`,ai=e=>(()=>{let t=e,r,a=[],c=[];return class extends t{constructor(){super(...arguments),this.#e=s(this,a,[]),this._handleSlotchange=(s(this,c),()=>{let e=Array.from(this.children??[]).filter(e=>this.listChildLocalNames.includes(e.localName));e.length===this.listChildren.length&&this.listChildren.every((t,n)=>e[n]===t)||(this.listChildren.filter(t=>!e.includes(t)).forEach(e=>e.removeAttribute(`slot`)),this.listChildren=e,this.removeAttribute(ii))})}static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[u()],o(this,null,r,{kind:`accessor`,name:`listChildren`,static:!1,private:!1,access:{has:e=>`listChildren`in e,get:e=>e.listChildren,set:(e,t)=>{e.listChildren=t}},metadata:e},a,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementDependencies=[]}static{this.styles=[ei,ti]}#e;get listChildren(){return this.#e}set listChildren(e){this.#e=e}connectedCallback(){super.connectedCallback(),this.shadowRoot?.addEventListener(`slotchange`,this._handleSlotchange,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.shadowRoot?.removeEventListener(`slotchange`,this._handleSlotchange)}updated(e){super.updated(e),e.has(`listChildren`)&&this.listChildren.forEach((e,t)=>e.setAttribute(`slot`,`li-${t}`))}renderList(e={},t={}){let r=this.listSlotEntries(t);return r.length>=2?n`
45
+ `?(this._emitChangeIfNecessary(),this._shouldTriggerSubmit&&(this._shouldTriggerSubmit=!1,this.form?.requestSubmit())):this._requiresEmptyPatch()&&this._setCursorAt(0)},{capture:!0}),this.addEventListener?.(`paste`,e=>{e.preventDefault(),this._requiresEmptyPatch()&&this._assignValue(``);let t=this._cleanText(e.clipboardData?.getData(`text/plain`)??``),n=window.getSelection()?.getRangeAt(0);n&&t&&(n.deleteContents(),n.insertNode(document.createTextNode(this.preparePastedText(t))),n.setStart(n.endContainer,n.endOffset),this._dispatchInputEvent())}),this.addEventListener?.(`focus`,()=>{T.mostRecentModality===`keyboard`&&window.getSelection()?.selectAllChildren(this)}),this.addEventListener?.(`touchend`,()=>{this._requiresEmptyPatch()&&(this._assignValue(`&nbsp;`),this._setCursorAt(0))}),this.addEventListener?.(`click`,()=>{this._requiresEmptyPatch()&&T.mostRecentModality===`touch`&&this._setCursorAt(0)}),this.addEventListener?.(`blur`,()=>{window.getSelection()?.removeAllRanges(),this.value===``&&this._assignValue(``),this._emitChangeIfNecessary(),this.scrollLeft=0},{capture:!0})}isDisabledExternally(){return this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals.ariaMultiLine=`false`,this._updateContenteditable(),this._assignValue(this.value)}focus(e){if(super.focus(e),this._canSelect()){let e=window.getSelection();if(!e)return;let t=e.rangeCount>0?e.getRangeAt(0):null;if(t&&t.startOffset!==0)return;this._setCursorAt(this.textContent.length)}}attributeChangedCallback(e,t,n){(e!==`value`||!this.matches?.(`:is(:state(interacted),[state--interacted])`))&&super.attributeChangedCallback(e,t,n)}formResetCallback(){this.internals.states.delete(`interacted`),this.value=this.getAttribute(`value`)??``}formStateRestoreCallback(e,t){e&&typeof e==`string`&&(this.value=e)}select(){window.getSelection()?.selectAllChildren(this)}firstUpdated(e){super.firstUpdated(e),this.value&&!this.innerHTML.length&&this._assignValue(this.value)}requestUpdate(e,t,n){super.requestUpdate(e,t,n),this.isConnected&&(e===`disabled`||e===`formDisabled`||e===`readOnly`)&&this._updateContenteditable()}shouldValidate(e){return super.shouldValidate(e)||e===`value`||e===`required`}validate(){super.validate(),this.required&&!this.value?this.setValidityFlag(`valueMissing`,mn[this.language.current]):this.removeValidityFlag(`valueMissing`)}isSelected(){if(r)return!1;let e=window.getSelection();return!!e&&e.rangeCount>0&&this.contains(e.anchorNode)}preparePastedText(e){return e}_requiresEmptyPatch(){return!r&&k&&this.value===``&&window.matchMedia(`(pointer: coarse)`).matches}_assignValue(e){this.innerHTML=e}_setCursorAt(e){let t=window.getSelection();if(!this.firstChild||!t)return;let n=document.createRange();n.setStart(this.firstChild,e),n.collapse(!0),t.removeAllRanges(),t.addRange(n)}_cleanText(e){return e===null?``:`${e}`.replace(/[\n\r]+/g,``)}_dispatchInputEvent(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))}_cleanChildren(){if(this.childElementCount)for(let e of this.children)e.remove()}_updateContenteditable(){if(!r&&this.isConnected){this.internals.ariaReadOnly=this.readOnly?`true`:null,this.internals.ariaDisabled=this.disabled?`true`:null;let e=this.disabled||this.readOnly?`false`:Gr?`plaintext-only`:`true`;this.setAttribute(`contenteditable`,e),this.readOnly?this.setAttribute(`tabindex`,`0`):this.removeAttribute(`tabindex`)}}_emitChangeIfNecessary(){this._shouldEmitChange&&(this._shouldEmitChange=!1,this.dispatchEvent(new Event(`change`,{bubbles:!0})))}_canSelect(){return!r&&!this.disabled&&!this.readOnly&&!!this.value}render(){return n`<slot @slotchange=${this._cleanChildren}></slot>`}}})(),Q=/* @__PURE__ */ new WeakMap,qr=e=>(()=>{let t=V(H(L(e))),n=[],i,a;return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;i=[l({type:Boolean})],a=[l()],o(this,null,i,{kind:`setter`,name:`checked`,static:!1,private:!1,access:{has:e=>`checked`in e,set:(e,t)=>{e.checked=t}},metadata:e},null,n),o(this,null,a,{kind:`setter`,name:`name`,static:!1,private:!1,access:{has:e=>`name`in e,set:(e,t)=>{e.name=t}},metadata:e},null,n),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.role=`radio`}set checked(e){this._checked=!!e,this.toggleState(`checked`,this.checked),this.internals.ariaChecked=this.checked.toString(),this.updateFormValue(),this._synchronizeGroupState()}get checked(){return this._checked}set name(e){let t=this.name;e!==t&&(super.name=e,this._disconnectFromRegistry(t),this._connectToRegistry(),this._synchronizeGroupState())}get name(){return super.name}get type(){return`radio`}constructor(){super(),this._checked=(s(this,n),!1),this._languageController=new z(this),this.addEventListener?.(`keydown`,e=>this._handleArrowKeyDown(e))}connectedCallback(){super.connectedCallback(),this._connectToRegistry(),this._synchronizeGroupState()}disconnectedCallback(){super.disconnectedCallback(),this._disconnectFromRegistry(this.name)}formResetCallback(){this.checked=this.hasAttribute(`checked`)}formStateRestoreCallback(e,t){typeof e==`string`||e==null?this.checked=e===this.value:e instanceof FormData&&this._readFormData(e).then(e=>{this.checked=e===this.value})}async _readFormData(e){let t=e.get(this.name);return t instanceof Blob?JSON.parse(await t.text()):t}willUpdate(e){super.willUpdate(e),e.has(`disabled`)&&this.updateFocusableRadios()}firstUpdated(e){super.firstUpdated(e),this.updateFocusableRadios()}updateFormValue(){this.checked?super.updateFormValue():this.internals.setFormValue(null)}shouldValidate(e){return super.shouldValidate(e)||e===`checked`||e===`required`}validate(){if(super.validate(),!this.associatedRadioButtons)return;let e=!1,t=!1;for(let n of this.associatedRadioButtons)e||=n.required,t||=n.checked;e&&!t?this.associatedRadioButtons.forEach(e=>e.setValidityFlag(`valueMissing`,pn[this._languageController.current])):this.associatedRadioButtons.forEach(e=>e.removeValidityFlag(`valueMissing`))}updateFocusableRadios(){if(!this.hasUpdated)return;let e=this._interactableGroupedRadios(),t=e.findIndex(e=>e.checked&&!e.disabled&&!e.formDisabled),n=t===-1?e.findIndex(e=>!e.disabled&&!e.formDisabled):t;n!==-1&&(e[n].tabIndex=0,e.splice(n,1)),e.forEach(e=>e.removeAttribute(`tabindex`))}async navigateByKeyboard(e){e.checked=!0,this.emitChangeEvents(),await e.updateComplete,e.focus()}emitChangeEvents(){this.dispatchEvent(new InputEvent(`input`,{bubbles:!0,cancelable:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}_synchronizeGroupState(){this.checked&&this._deselectGroupedRadios(),this.updateFocusableRadios()}_connectToRegistry(){if(!this.name||r)return;let e=this.form??this.getRootNode();this._radioButtonGroupsMap=Q.get(e),this._radioButtonGroupsMap||(this._radioButtonGroupsMap=/* @__PURE__ */ new Map,Q.set(e,this._radioButtonGroupsMap)),this.associatedRadioButtons=this._radioButtonGroupsMap.get(this.name),this.associatedRadioButtons||(this.associatedRadioButtons=/* @__PURE__ */ new Set,this._radioButtonGroupsMap.set(this.name,this.associatedRadioButtons));let t=Array.from(this.associatedRadioButtons);this.associatedRadioButtons.clear();let n=t.findIndex(e=>this.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING);n===-1?t.push(this):t.splice(n,0,this),t.forEach(e=>this.associatedRadioButtons.add(e)),this.validate()}_disconnectFromRegistry(e){this.associatedRadioButtons?.delete(this),this.associatedRadioButtons?.size===0?this._radioButtonGroupsMap?.delete(e):this.validate(),this.associatedRadioButtons=void 0,this._radioButtonGroupsMap=void 0}_interactableGroupedRadios(){return Array.from(this.associatedRadioButtons??[]).filter(e=>M.isVisible(e))}_deselectGroupedRadios(){Array.from(this.associatedRadioButtons??[]).filter(e=>e!==this).forEach(e=>e.checked=!1)}async _handleArrowKeyDown(e){if(!p(e))return;e.preventDefault();let t=this._interactableGroupedRadios().filter(e=>!e.disabled&&!e.formDisabled),n=y(e,t.indexOf(this),t.length);await this.navigateByKeyboard(t[n])}}})();var Jr=`:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-button,:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible)::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:is(.sbb-scrollbar,.sbb-scrollbar-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-negative,.sbb-scrollbar-track-visible,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}:is(.sbb-scrollbar-negative,.sbb-scrollbar-thick-negative,.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-color:color-mix(in srgb, var(--sbb-color-white) 30%, transparent);--sbb-scrollbar-color-hover:color-mix(in srgb, var(--sbb-color-white) 60%, transparent)}:is(.sbb-scrollbar-thick-negative,.sbb-scrollbar-thick,.sbb-scrollbar-thick-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-thumb-width:.5rem;--sbb-scrollbar-thumb-width-hover:var(--sbb-scrollbar-thumb-width);--sbb-scrollbar-width-firefox:auto}:is(.sbb-scrollbar-track-visible,.sbb-scrollbar-thick-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4)}:is(.sbb-scrollbar-negative-track-visible,.sbb-scrollbar-thick-negative-track-visible){--sbb-scrollbar-track-color:var(--sbb-background-color-4-negative)}
46
+ `,Yr=`button{appearance:none;box-sizing:border-box;-webkit-tap-highlight-color:transparent;color:inherit;background:0 0;border:none;border-radius:0;outline:none;margin:0;padding:0}
47
+ `,Xr=`:host{--sbb-scrollbar-width:var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width:.125rem;--sbb-scrollbar-thumb-width-hover:.25rem;--sbb-scrollbar-width-firefox:thin;--sbb-scrollbar-color:light-dark(color-mix(in srgb, var(--sbb-color-black) 30%, transparent),color-mix(in srgb, var(--sbb-color-white) 30%, transparent));--sbb-scrollbar-color-hover:light-dark(color-mix(in srgb, var(--sbb-color-black) 60%, transparent),color-mix(in srgb, var(--sbb-color-white) 60%, transparent));--sbb-scrollbar-track-color:transparent}:host::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color,transparent)}:host::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color,transparent)}:host::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color,currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}:host::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover,currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}:host::-webkit-scrollbar-button,:host::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){:host{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color,currentcolor) var(--sbb-scrollbar-track-color,transparent)}}
48
+ `,Zr=`ul,ol{font-size:inherit;margin:0;padding:0;list-style:none}
49
+ `,Qr=`:host(:where([popover])),.sbb-popover-reset:where([popover]){width:auto;height:auto;color:inherit;pointer-events:none;background-color:#0000;border:none;margin:0;padding:0}
50
+ `,$r=`.sbb-screen-reader-only{clip-path:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}
51
+ `;const ei=a(Yr),ti=a(Xr),ni=a(Zr),ri=a($r),ii=a(Qr),ai=a(Jr),oi=`data-ssr-child-count`,si=e=>(()=>{let t=e,r,a=[],c=[];return class extends t{constructor(){super(...arguments),this.#e=s(this,a,[]),this._handleSlotchange=(s(this,c),()=>{let e=Array.from(this.children??[]).filter(e=>this.listChildLocalNames.includes(e.localName));e.length===this.listChildren.length&&this.listChildren.every((t,n)=>e[n]===t)||(this.listChildren.filter(t=>!e.includes(t)).forEach(e=>e.removeAttribute(`slot`)),this.listChildren=e,this.removeAttribute(oi))})}static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;r=[u()],o(this,null,r,{kind:`accessor`,name:`listChildren`,static:!1,private:!1,access:{has:e=>`listChildren`in e,get:e=>e.listChildren,set:(e,t)=>{e.listChildren=t}},metadata:e},a,c),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementDependencies=[]}static{this.styles=[ni,ri]}#e;get listChildren(){return this.#e}set listChildren(e){this.#e=e}connectedCallback(){super.connectedCallback(),this.shadowRoot?.addEventListener(`slotchange`,this._handleSlotchange,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.shadowRoot?.removeEventListener(`slotchange`,this._handleSlotchange)}updated(e){super.updated(e),e.has(`listChildren`)&&this.listChildren.forEach((e,t)=>e.setAttribute(`slot`,`li-${t}`))}renderList(e={},t={}){let r=this.listSlotEntries(t);return r.length>=2?n`
52
52
  <ul
53
53
  class=${e.class||this.localName}
54
54
  aria-label=${e.ariaLabel||i}
@@ -65,5 +65,5 @@ let xe=0;var Se=class{constructor(){r||(document.body?this._liveElement=this._cr
65
65
  <span class=${e.class||this.localName}>
66
66
  <span><slot name=${r[0].name}></slot></span>
67
67
  </span>
68
- ${this.renderHiddenSlot()} `:this.renderHiddenSlot()}listSlotEntries(e){return(this.listChildren.length?this.listChildren:Array.from({length:+(this.getAttribute(ii)??0)})).map((t,n)=>({name:`li-${n}`,ariaHidden:e?.localNameVisualOnly?.includes(t.localName)??!1}))}renderHiddenSlot(){return n`<span hidden><slot></slot></span>`}}})(),oi=e=>(()=>{let t=e,n,r=[],i=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[I(),l({reflect:!0,type:Boolean})],o(this,null,n,{kind:`accessor`,name:`negative`,static:!1,private:!1,access:{has:e=>`negative`in e,get:e=>e.negative,set:(e,t)=>{e.negative=t}},metadata:e},r,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=s(this,r,!1);get negative(){return this.#e}set negative(e){this.#e=e}constructor(){super(...arguments),s(this,i)}}})();var si=`:host{--sbb-selection-panel-background:var(--sbb-selection-panel-inner-background,var(--sbb-selection-panel-background-default));--sbb-selection-panel-border-width:var(--sbb-selection-panel-inner-border-width,var(--sbb-selection-panel-border-width-default));--sbb-selection-panel-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-4x));display:block;outline:none!important}:host([size=xs]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-xs);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-xs) var(--sbb-selection-panel-input-padding-inline-xs)}:host([size=s]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-s);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-s) var(--sbb-selection-panel-input-padding-inline-s)}:host([size=m]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-m);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-m) var(--sbb-selection-panel-input-padding-inline-m)}:host([color=milk]){--sbb-selection-panel-background:var(--sbb-selection-panel-inner-background,var(--sbb-selection-panel-background-milk))}:host([borderless]:not(:is(:state(checked),[state--checked]))){--sbb-selection-panel-border-color:var(--sbb-selection-panel-border-color-borderless)}:host(:is(:state(checked),[state--checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color:var(--sbb-selection-panel-border-color-checked);--sbb-selection-panel-border-width:var(--sbb-selection-panel-inner-border-width,var(--sbb-selection-panel-border-width-checked))}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor:var(--sbb-cursor-default)}.sbb-selection-panel{cursor:var(--sbb-selection-panel-cursor);border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);height:100%;transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow;display:block;position:relative}@media (forced-colors:active){.sbb-selection-panel:after{content:"";pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius);display:block;position:absolute;inset:0}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{user-select:none;pointer-events:none;border-radius:var(--sbb-selection-panel-border-radius);position:absolute;inset:0;overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{color:var(--sbb-selection-panel-subtext-color);padding-inline-start:calc(var(--sbb-selection-panel-checkbox-dimension) + var(--sbb-spacing-fixed-2x));display:block}:host(:not(:is(:state(slotted-subtext),[state--slotted-subtext]))) slot[name=subtext]{display:none}
69
- `;const ci=e=>(()=>{let t=e,n,r=[],i=[],c,u=[],d=[],f,p=[],m=[],h,g=[],_=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[l({reflect:!0})],c=[I(),l({reflect:!0,type:Boolean})],f=[I(),l()],h=[l({reflect:!0}),Dr((e,t)=>e.group?.size??t)],o(this,null,n,{kind:`accessor`,name:`color`,static:!1,private:!1,access:{has:e=>`color`in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:e},r,i),o(this,null,c,{kind:`accessor`,name:`borderless`,static:!1,private:!1,access:{has:e=>`borderless`in e,get:e=>e.borderless,set:(e,t)=>{e.borderless=t}},metadata:e},u,d),o(this,null,f,{kind:`accessor`,name:`expansionState`,static:!1,private:!1,access:{has:e=>`expansionState`in e,get:e=>e.expansionState,set:(e,t)=>{e.expansionState=t}},metadata:e},p,m),o(this,null,h,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:e},g,_),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.styles=[a(si)]}#e=s(this,r,`white`);get color(){return this.#e}set color(e){this.#e=e}#t=(s(this,i),s(this,u,!1));get borderless(){return this.#t}set borderless(e){this.#t=e}#n=(s(this,d),s(this,p,``));get expansionState(){return this.#n}set expansionState(e){this.#n=e}#r=(s(this,m),s(this,g,null));get size(){return this.#r}set size(e){this.#r=e}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event(`panelconnected`,{bubbles:!0}))}constructor(){super(...arguments),s(this,_)}}})(),li=e=>{class t extends e{get group(){return this.closest?.(`sbb-radio-button-group, sbb-checkbox-group`)??null}get panel(){return this.querySelector?.(`sbb-radio-button-panel, sbb-checkbox-panel`)??null}constructor(...e){super(e),this._previousSize=null,this._propertyWatcher=new Vn(this,()=>this.panel,{checked:e=>{this.toggleState(`checked`,e.checked),this.onInputStateChange?.()},disabled:e=>{this.toggleState(`disabled`,e.disabled),this.onInputStateChange?.()},size:e=>{this._previousSize&&this.internals.states.delete(`size-${this._previousSize}`),this._previousSize=e.size,this._previousSize&&this.internals.states.add(`size-${this._previousSize}`)},borderless:e=>{this.toggleState(`borderless`,e.borderless)},color:e=>{this._previousColor&&this.internals.states.delete(`color-${this._previousColor}`),this._previousColor=e.color,this._previousColor&&this.internals.states.add(`color-${this._previousColor}`)}}),this.addEventListener?.(`panelconnected`,()=>this._propertyWatcher.connect())}onInputStateChange(){}}return t},ui=e=>{class t extends e{constructor(){super(...arguments),this._updatePromise=Promise.resolve(),this._updateResolve=()=>{}}startUpdate(){this._updatePromise=new Promise(e=>this._updateResolve=e)}completeUpdate(){this._updateResolve()}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this._updatePromise,e}}return t};function $(e){let t=window.getComputedStyle(e),n=t.display,r=parseInt(t.maxHeight,10).toString();if(n!==`none`&&r!==`0`)return{scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,offsetHeight:e.offsetHeight,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth,offsetWidth:e.offsetWidth};e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.display=`block`;let i=e.scrollHeight,a=e.clientHeight,o=e.offsetHeight,s=e.scrollWidth,c=e.clientWidth,l=e.offsetWidth;return e.style.display=``,e.style.position=``,e.style.visibility=``,{scrollHeight:i,clientHeight:a,offsetHeight:o,scrollWidth:s,clientWidth:c,offsetWidth:l}}function di(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect();return n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function fi(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=r?.responsiveHeight||!1,s=t.getBoundingClientRect(),c=$(e),l=s.left,u=s.top,d=document.documentElement.clientWidth-(l+s.width),f=u-i,p=document.documentElement.clientHeight-(u+s.height+i),m=l,h=u+s.height+i,g=c.offsetWidth-s.width,_={horizontal:`start`,vertical:`below`},v=`${p-i}px`;r?.centered&&l-16+s.width/2>c.offsetWidth/2&&d-16>g/2&&(m-=g/=2,_.horizontal=`center`),d<g&&l>g&&(m-=g,_.horizontal=`end`),a&&_.horizontal!==`center`&&s.width/2<a&&(m+=a*(_.horizontal===`start`?-1:1)),(l<g&&d<g||document.documentElement.clientWidth<c.offsetWidth)&&(m=document.documentElement.clientWidth/2-c.offsetWidth/2);let y=p-i>=c.scrollHeight,b=f-i>=(o?c.clientHeight:c.scrollHeight),x=!y&&(b||f>p);!r?.forceBelow&&(r?.forceAbove||x)&&(h=f<c.scrollHeight?h-s.height-f-i:u-c.clientHeight-i,v=`${f-i}px`,_.vertical=`above`);let S=n.getBoundingClientRect();return S.left<0&&(m-=S.left),S.top<0&&(h-=S.top),{top:h,left:m,maxHeight:v,alignment:_}}function pi(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=t.getBoundingClientRect(),s=$(e),c=t.parentElement.shadowRoot.querySelector(r?.contentSelector??`.${e.className}`).getBoundingClientRect(),l=n.getBoundingClientRect(),u=document.documentElement.clientWidth-c.right,d=document.documentElement.clientHeight-(o.top-i),f=document.documentElement.clientHeight,p=`${f-32}px`,m={horizontal:`end`,vertical:`above`},h=s.offsetWidth+a,g=c.right,_=o.top+i;return u<h&&o.left>h&&(g=g-c.width-s.offsetWidth,m.horizontal=`start`),a&&m.horizontal!==`center`&&(g+=a*(m.horizontal===`start`?-1:1)),d<s.scrollHeight&&(_=f-s.clientHeight-16),l.left<0&&(g-=l.left),l.top<0&&(_-=l.top),{top:_,left:g,maxHeight:p,alignment:m}}function mi(e,t,n,r,i,a=`auto`){if(!e||!t)return;let o=t.getBoundingClientRect();i.style.setProperty(`--sbb-options-panel-width`,`${t.offsetWidth}px`),i.style.setProperty(`--sbb-options-panel-origin-height`,`${t.offsetHeight}px`),i.style.setProperty(`--sbb-options-panel-origin-position-x`,`${o.left}px`),i.style.setProperty(`--sbb-options-panel-origin-position-y`,`${o.top}px`);let s=fi(n,t,r,{forceBelow:a===`below`,forceAbove:a===`above`});i.style.setProperty(`--sbb-options-panel-position-x`,`${s.left}px`),i.style.setProperty(`--sbb-options-panel-position-y`,`${s.top}px`),i.style.setProperty(`--sbb-options-panel-max-height-calculated`,s.maxHeight);let c=s.alignment.vertical===`above`;i.toggleState?.(`options-panel-position-above`,c),i.toggleState?.(`options-panel-position-below`,!c),t.setAttribute(`data-options-panel-position`,s.alignment.vertical)}var hi=class{constructor(){this._overlays=/* @__PURE__ */ new Set,this._pointerDownListener=e=>{this._pointerDownEventTarget=e.composedPath()[0]},this._clickListener=e=>{let t=e.composedPath()[0],n=e.type===`click`&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=void 0;for(let e of Array.from(this._overlays).reverse()){if(X(e,t)||X(e,n))break;e.dispatchEvent(new Event(`overlayOutsidePointer`))}}}connect(e){this._overlays.size||(this._addGlobalEventListeners(),j&&(this._cursorOriginalValue=document.body.style.cursor,document.body.style.cursor=`pointer`)),this._overlays.add(e)}disconnect(e){this._overlays.delete(e),this._overlays.size||(this._abortController?.abort(),this._abortController=void 0,j&&(document.body.style.cursor=this._cursorOriginalValue))}_addGlobalEventListeners(){let e=document.body;this._abortController=new AbortController;let t={capture:!0,passive:!0,signal:this._abortController.signal};e.addEventListener(`click`,this._clickListener,t),!ie&&!j&&(e.addEventListener(`pointerdown`,this._pointerDownListener,t),e.addEventListener(`auxclick`,this._clickListener,t),e.addEventListener(`contextmenu`,this._clickListener,t))}};const gi=new hi;function _i(e,t,n,r){t&&(t.ariaHasPopup=n,t.ariaControlsElements=[e],t.ariaExpanded=`${r===`opening`||r===`opened`}`)}function vi(e){e&&(e.ariaHasPopup=null,e.ariaControlsElements=null,e.ariaExpanded=null)}function yi(e,t,n,r=`listbox`){e&&(e.setAttribute(`autocomplete`,`off`),e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-haspopup`,r),e.setAttribute(`aria-controls`,t),e.setAttribute(`aria-owns`,t),e.setAttribute(`aria-expanded`,`${n}`))}function bi(e){e&&(e.removeAttribute(`autocomplete`),e.removeAttribute(`role`),e.removeAttribute(`aria-autocomplete`),e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-owns`),e.removeAttribute(`aria-expanded`))}export{K as DateAdapter,mr as FORMAT_DATE,br as FRIDAY,hr as ISO8601_FORMAT_DATE,te as IS_FOCUSABLE_QUERY,le as InteractivityChecker,ce as IsFocusableConfig,gr as MONDAY,wr as NativeDateAdapter,xr as SATURDAY,Sr as SUNDAY,F as SbbActionBaseElement,Br as SbbAnimationCompleteMixin,Ne as SbbButtonBaseElement,Me as SbbButtonLikeBaseElement,sr as SbbDarkModeController,In as SbbDisabledInteractiveMixin,V as SbbDisabledMixin,Ln as SbbDisabledTabIndexActionMixin,P as SbbElement,Un as SbbEscapableOverlayController,be as SbbFocusTrapController,ee as SbbFocusVisibleWithinController,Vr as SbbFormAssociatedCheckboxMixin,Wr as SbbFormAssociatedInputMixin,L as SbbFormAssociatedMixin,Gr as SbbFormAssociatedRadioButtonMixin,Gn as SbbIdReferenceController,Xn as SbbInertController,z as SbbLanguageController,Pn as SbbLinkBaseElement,Se as SbbLiveAnnouncer,or as SbbMediaMatcherController,nr as SbbMediaQueryBreakpointLargeAndAbove,ar as SbbMediaQueryBreakpointLargeAndBelow,tr as SbbMediaQueryBreakpointSmallAndAbove,ir as SbbMediaQueryBreakpointSmallAndBelow,rr as SbbMediaQueryBreakpointUltraAndAbove,er as SbbMediaQueryBreakpointZeroAndAbove,W as SbbMediaQueryDarkMode,Zn as SbbMediaQueryForcedColors,Qn as SbbMediaQueryHover,$n as SbbMediaQueryPointerCoarse,ai as SbbNamedSlotListMixin,oi as SbbNegativeMixin,Fn as SbbOpenCloseBaseElement,hi as SbbOverlayOutsidePointerEventListener,pr as SbbOverlayPositionController,ci as SbbPanelMixin,Vn as SbbPropertyWatcherController,Hr as SbbReadonlyMixin,H as SbbRequiredMixin,Lr as SbbScrollHandler,zn as SbbSelectionGroupBaseElement,li as SbbSelectionPanelMixin,N as SbbSlottedChangeEvent,ui as SbbUpdateSchedulerMixin,yr as THURSDAY,_r as TUESDAY,Er as TemporalDateAdapter,vr as WEDNESDAY,Oe as appendAriaElements,Qr as buttonResetStyles,X as containsPierceShadowDom,q as defaultDateAdapter,I as forceType,zr as forwardEvent,fi as getElementPosition,pi as getElementPositionHorizontal,$ as getElementRectangle,S as getEventTarget,y as getNextElementIndex,Dr as getOverride,Or as handleDistinctChange,$r as hostScrollbarStyles,Qe as i18nAdditionalWagonInformationHeading,ze as i18nAnd,Ie as i18nArrival,Ze as i18nBlockedPassage,Yt as i18nBreadcrumbEllipsisButtonLabel,Nt as i18nCalendarDateSelection,wn as i18nCalendarWeekNumber,Dn as i18nCarouselArrowsNavigationHint,En as i18nCarouselItemAriaLabel,fn as i18nCheckboxRequired,Sn as i18nChipDelete,Cn as i18nChipGroupInputDescription,Be as i18nClass,Xt as i18nClearInput,yt as i18nCloseAlert,St as i18nCloseDialog,Ct as i18nCloseNavigation,bt as i18nCloseNotification,Tt as i18nClosePopover,wt as i18nCloseSidebar,Ke as i18nClosedCompartmentLabel,qt as i18nCollapsed,Ut as i18nConnectionFrom,Gt as i18nConnectionRoundtrip,Wt as i18nConnectionTo,Ye as i18nCouchetteWagonLabel,Ht as i18nDateChangedTo,hn as i18nDateInvalid,_n as i18nDateMax,gn as i18nDateMin,Vt as i18nDatePickerPlaceholder,$e as i18nDeparture,xt as i18nDialog,Fe as i18nDirection,tt as i18nDownload,it as i18nDurationDay,rt as i18nDurationHour,nt as i18nDurationMinute,Kt as i18nExpanded,$t as i18nFileSelectorButtonLabel,en as i18nFileSelectorButtonLabelMultiple,an as i18nFileSelectorCurrentlySelected,rn as i18nFileSelectorDeleteFile,tn as i18nFileSelectorSubtitleLabel,nn as i18nFileSelectorSubtitleLabelMultiple,Zt as i18nFlipCard,ft as i18nFromPlatform,Et as i18nGoBack,mn as i18nInputRequired,ln as i18nItemsPerPage,qe as i18nLocomotiveLabel,Mn as i18nLogo125Anniversary,Nn as i18nLogo125AnniversaryYears,Jt as i18nMapContainerButtonLabel,ht as i18nMeansOfTransport,dt as i18nNew,At as i18nNextDay,Ot as i18nNextMonth,on as i18nNextPage,On as i18nNextSlide,It as i18nNextYear,Pt as i18nNextYearRange,et as i18nNonAccessible,mt as i18nOccupancy,cn as i18nPage,dn as i18nPaginatorOf,un as i18nPaginatorSelected,jt as i18nPreviousDay,kt as i18nPreviousMonth,sn as i18nPreviousPage,kn as i18nPreviousSlide,Lt as i18nPreviousYear,Ft as i18nPreviousYearRange,ct as i18nRealTimeInfo,jn as i18nRemainingCharacters,Xe as i18nRestaurantWagonLabel,Qt as i18nReverseCard,Le as i18nSector,Re as i18nSectorShort,Rt as i18nSelectNextDay,zt as i18nSelectPreviousDay,pn as i18nSelectionRequired,Bt as i18nShowCalendar,Je as i18nSleepingWagonLabel,An as i18nSlide,pt as i18nSupersaver,gt as i18nTargetOpensInNewWindow,vn as i18nTimeInputChange,yn as i18nTimeInvalid,bn as i18nTimeMax,xn as i18nTimeMaxLength,Tn as i18nTimetableFormSwapButtonLabel,Dt as i18nToday,Ve as i18nTrain,He as i18nTrains,lt as i18nTransferProcedure,ut as i18nTransferProcedures,st as i18nTravelhints,ot as i18nTripDuration,at as i18nTripQuayChange,We as i18nWagonLabel,Ge as i18nWagonLabelNumber,Ue as i18nWagonsLabel,_t as i18nWalkingDistanceArrival,vt as i18nWalkingDistanceDeparture,Mt as i18nYearMonthSelection,kr as idReference,M as interactivityChecker,ie as isAndroid,g as isArrowKeyOrPageKeysPressed,p as isArrowKeyPressed,k as isBlink,oe as isChromium,D as isEdge,di as isEventOnElement,Ae as isEventPrevented,b as isFakeMousedownFromScreenReader,x as isFakeTouchstartFromScreenReader,re as isFirefox,j as isIOS,ne as isMacOS,h as isNextArrowKeyPressed,se as isNextjs,m as isPreviousArrowKeyPressed,ae as isSafari,O as isTrident,A as isWebkit,Mr as isZeroAnimationDuration,ei as listResetStyles,Pe as mergeConfig,B as omitEmptyConverter,Z as pageScrollDisabled,jr as plainDate,Ar as plainDateConverter,ni as popoverResetStyles,Rr as preventScrollOnSpacebarPress,Pr as queueDomContentLoaded,Q as radioButtonRegistry,R as readConfig,bi as removeAriaComboBoxAttributes,ke as removeAriaElements,vi as removeAriaOverlayTriggerProperties,T as sbbInputModalityDetector,Ce as sbbLiveAnnouncer,gi as sbbOverlayOutsidePointerEventListener,ti as screenReaderOnlyStyles,ri as scrollbarStyles,yi as setAriaComboBoxAttributes,_i as setAriaOverlayTriggerProperties,Nr as setOrRemoveAttribute,mi as setOverlayPosition,De as ɵstateController};
68
+ ${this.renderHiddenSlot()} `:this.renderHiddenSlot()}listSlotEntries(e){return(this.listChildren.length?this.listChildren:Array.from({length:+(this.getAttribute(oi)??0)})).map((t,n)=>({name:`li-${n}`,ariaHidden:e?.localNameVisualOnly?.includes(t.localName)??!1}))}renderHiddenSlot(){return n`<span hidden><slot></slot></span>`}}})(),ci=e=>(()=>{let t=e,n,r=[],i=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[I(),l({reflect:!0,type:Boolean})],o(this,null,n,{kind:`accessor`,name:`negative`,static:!1,private:!1,access:{has:e=>`negative`in e,get:e=>e.negative,set:(e,t)=>{e.negative=t}},metadata:e},r,i),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#e=s(this,r,!1);get negative(){return this.#e}set negative(e){this.#e=e}constructor(){super(...arguments),s(this,i)}}})();var li=`:host{--sbb-selection-panel-background:var(--sbb-selection-panel-inner-background,var(--sbb-selection-panel-background-default));--sbb-selection-panel-border-width:var(--sbb-selection-panel-inner-border-width,var(--sbb-selection-panel-border-width-default));--sbb-selection-panel-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-4x));display:block;outline:none!important}:host([size=xs]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-xs);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-xs) var(--sbb-selection-panel-input-padding-inline-xs)}:host([size=s]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-s);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-s) var(--sbb-selection-panel-input-padding-inline-s)}:host([size=m]){--sbb-selection-panel-checkbox-dimension:var(--sbb-checkbox-dimension-m);--sbb-selection-panel-input-padding:var(--sbb-selection-panel-input-padding-block-m) var(--sbb-selection-panel-input-padding-inline-m)}:host([color=milk]){--sbb-selection-panel-background:var(--sbb-selection-panel-inner-background,var(--sbb-selection-panel-background-milk))}:host([borderless]:not(:is(:state(checked),[state--checked]))){--sbb-selection-panel-border-color:var(--sbb-selection-panel-border-color-borderless)}:host(:is(:state(checked),[state--checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color:var(--sbb-selection-panel-border-color-checked);--sbb-selection-panel-border-width:var(--sbb-selection-panel-inner-border-width,var(--sbb-selection-panel-border-width-checked))}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor:var(--sbb-cursor-default)}.sbb-selection-panel{cursor:var(--sbb-selection-panel-cursor);border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);height:100%;transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow;display:block;position:relative}@media (forced-colors:active){.sbb-selection-panel:after{content:"";pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius);display:block;position:absolute;inset:0}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{user-select:none;pointer-events:none;border-radius:var(--sbb-selection-panel-border-radius);position:absolute;inset:0;overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{color:var(--sbb-selection-panel-subtext-color);padding-inline-start:calc(var(--sbb-selection-panel-checkbox-dimension) + var(--sbb-spacing-fixed-2x));display:block}:host(:not(:is(:state(slotted-subtext),[state--slotted-subtext]))) slot[name=subtext]{display:none}
69
+ `;const ui=e=>(()=>{let t=e,n,r=[],i=[],c,u=[],d=[],f,p=[],m=[],h,g=[],_=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[l({reflect:!0})],c=[I(),l({reflect:!0,type:Boolean})],f=[I(),l()],h=[l({reflect:!0}),kr((e,t)=>e.group?.size??t)],o(this,null,n,{kind:`accessor`,name:`color`,static:!1,private:!1,access:{has:e=>`color`in e,get:e=>e.color,set:(e,t)=>{e.color=t}},metadata:e},r,i),o(this,null,c,{kind:`accessor`,name:`borderless`,static:!1,private:!1,access:{has:e=>`borderless`in e,get:e=>e.borderless,set:(e,t)=>{e.borderless=t}},metadata:e},u,d),o(this,null,f,{kind:`accessor`,name:`expansionState`,static:!1,private:!1,access:{has:e=>`expansionState`in e,get:e=>e.expansionState,set:(e,t)=>{e.expansionState=t}},metadata:e},p,m),o(this,null,h,{kind:`accessor`,name:`size`,static:!1,private:!1,access:{has:e=>`size`in e,get:e=>e.size,set:(e,t)=>{e.size=t}},metadata:e},g,_),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.styles=[a(li)]}#e=s(this,r,`white`);get color(){return this.#e}set color(e){this.#e=e}#t=(s(this,i),s(this,u,!1));get borderless(){return this.#t}set borderless(e){this.#t=e}#n=(s(this,d),s(this,p,``));get expansionState(){return this.#n}set expansionState(e){this.#n=e}#r=(s(this,m),s(this,g,null));get size(){return this.#r}set size(e){this.#r=e}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new Event(`panelconnected`,{bubbles:!0}))}constructor(){super(...arguments),s(this,_)}}})(),di=e=>{class t extends e{get group(){return this.closest?.(`sbb-radio-button-group, sbb-checkbox-group`)??null}get panel(){return this.querySelector?.(`sbb-radio-button-panel, sbb-checkbox-panel`)??null}constructor(...e){super(e),this._previousSize=null,this._propertyWatcher=new Vn(this,()=>this.panel,{checked:e=>{this.toggleState(`checked`,e.checked),this.onInputStateChange?.()},disabled:e=>{this.toggleState(`disabled`,e.disabled),this.onInputStateChange?.()},size:e=>{this._previousSize&&this.internals.states.delete(`size-${this._previousSize}`),this._previousSize=e.size,this._previousSize&&this.internals.states.add(`size-${this._previousSize}`)},borderless:e=>{this.toggleState(`borderless`,e.borderless)},color:e=>{this._previousColor&&this.internals.states.delete(`color-${this._previousColor}`),this._previousColor=e.color,this._previousColor&&this.internals.states.add(`color-${this._previousColor}`)}}),this.addEventListener?.(`panelconnected`,()=>this._propertyWatcher.connect())}onInputStateChange(){}}return t},fi=e=>{class t extends e{constructor(){super(...arguments),this._updatePromise=Promise.resolve(),this._updateResolve=()=>{}}startUpdate(){this._updatePromise=new Promise(e=>this._updateResolve=e)}completeUpdate(){this._updateResolve()}async getUpdateComplete(){let e=await super.getUpdateComplete();return await this._updatePromise,e}}return t};function $(e){let t=window.getComputedStyle(e),n=t.display,r=parseInt(t.maxHeight,10).toString();if(n!==`none`&&r!==`0`)return{scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,offsetHeight:e.offsetHeight,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth,offsetWidth:e.offsetWidth};e.style.position=`absolute`,e.style.visibility=`hidden`,e.style.display=`block`;let i=e.scrollHeight,a=e.clientHeight,o=e.offsetHeight,s=e.scrollWidth,c=e.clientWidth,l=e.offsetWidth;return e.style.display=``,e.style.position=``,e.style.visibility=``,{scrollHeight:i,clientHeight:a,offsetHeight:o,scrollWidth:s,clientWidth:c,offsetWidth:l}}function pi(e,t){if(!e||!t)return!1;let n=e.getBoundingClientRect();return n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function mi(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=r?.responsiveHeight||!1,s=t.getBoundingClientRect(),c=$(e),l=s.left,u=s.top,d=document.documentElement.clientWidth-(l+s.width),f=u-i,p=document.documentElement.clientHeight-(u+s.height+i),m=l,h=u+s.height+i,g=c.offsetWidth-s.width,_={horizontal:`start`,vertical:`below`},v=`${p-i}px`;r?.centered&&l-16+s.width/2>c.offsetWidth/2&&d-16>g/2&&(m-=g/=2,_.horizontal=`center`),d<g&&l>g&&(m-=g,_.horizontal=`end`),a&&_.horizontal!==`center`&&s.width/2<a&&(m+=a*(_.horizontal===`start`?-1:1)),(l<g&&d<g||document.documentElement.clientWidth<c.offsetWidth)&&(m=document.documentElement.clientWidth/2-c.offsetWidth/2);let y=p-i>=c.scrollHeight,b=f-i>=(o?c.clientHeight:c.scrollHeight),x=!y&&(b||f>p);!r?.forceBelow&&(r?.forceAbove||x)&&(h=f<c.scrollHeight?h-s.height-f-i:u-c.clientHeight-i,v=`${f-i}px`,_.vertical=`above`);let S=n.getBoundingClientRect();return S.left<0&&(m-=S.left),S.top<0&&(h-=S.top),{top:h,left:m,maxHeight:v,alignment:_}}function hi(e,t,n,r){let i=r?.verticalOffset||0,a=r?.horizontalOffset||0,o=t.getBoundingClientRect(),s=$(e),c=t.parentElement.shadowRoot.querySelector(r?.contentSelector??`.${e.className}`).getBoundingClientRect(),l=n.getBoundingClientRect(),u=document.documentElement.clientWidth-c.right,d=document.documentElement.clientHeight-(o.top-i),f=document.documentElement.clientHeight,p=`${f-32}px`,m={horizontal:`end`,vertical:`above`},h=s.offsetWidth+a,g=c.right,_=o.top+i;return u<h&&o.left>h&&(g=g-c.width-s.offsetWidth,m.horizontal=`start`),a&&m.horizontal!==`center`&&(g+=a*(m.horizontal===`start`?-1:1)),d<s.scrollHeight&&(_=f-s.clientHeight-16),l.left<0&&(g-=l.left),l.top<0&&(_-=l.top),{top:_,left:g,maxHeight:p,alignment:m}}function gi(e,t,n,r,i,a=`auto`){if(!e||!t)return;let o=t.getBoundingClientRect();i.style.setProperty(`--sbb-options-panel-width`,`${t.offsetWidth}px`),i.style.setProperty(`--sbb-options-panel-origin-height`,`${t.offsetHeight}px`),i.style.setProperty(`--sbb-options-panel-origin-position-x`,`${o.left}px`),i.style.setProperty(`--sbb-options-panel-origin-position-y`,`${o.top}px`);let s=mi(n,t,r,{forceBelow:a===`below`,forceAbove:a===`above`});i.style.setProperty(`--sbb-options-panel-position-x`,`${s.left}px`),i.style.setProperty(`--sbb-options-panel-position-y`,`${s.top}px`),i.style.setProperty(`--sbb-options-panel-max-height-calculated`,s.maxHeight);let c=s.alignment.vertical===`above`;i.toggleState?.(`options-panel-position-above`,c),i.toggleState?.(`options-panel-position-below`,!c),t.setAttribute(`data-options-panel-position`,s.alignment.vertical)}var _i=class{constructor(){this._overlays=/* @__PURE__ */ new Set,this._pointerDownListener=e=>{this._pointerDownEventTarget=e.composedPath()[0]},this._clickListener=e=>{let t=e.composedPath()[0],n=e.type===`click`&&this._pointerDownEventTarget?this._pointerDownEventTarget:t;this._pointerDownEventTarget=void 0;for(let e of Array.from(this._overlays).reverse()){if(X(e,t)||X(e,n))break;e.dispatchEvent(new Event(`overlayOutsidePointer`))}}}connect(e){this._overlays.size||(this._addGlobalEventListeners(),j&&(this._cursorOriginalValue=document.body.style.cursor,document.body.style.cursor=`pointer`)),this._overlays.add(e)}disconnect(e){this._overlays.delete(e),this._overlays.size||(this._abortController?.abort(),this._abortController=void 0,j&&(document.body.style.cursor=this._cursorOriginalValue))}_addGlobalEventListeners(){let e=document.body;this._abortController=new AbortController;let t={capture:!0,passive:!0,signal:this._abortController.signal};e.addEventListener(`click`,this._clickListener,t),!ie&&!j&&(e.addEventListener(`pointerdown`,this._pointerDownListener,t),e.addEventListener(`auxclick`,this._clickListener,t),e.addEventListener(`contextmenu`,this._clickListener,t))}};const vi=new _i;function yi(e,t,n,r){t&&(t.ariaHasPopup=n,t.ariaControlsElements=[e],t.ariaExpanded=`${r===`opening`||r===`opened`}`)}function bi(e){e&&(e.ariaHasPopup=null,e.ariaControlsElements=null,e.ariaExpanded=null)}function xi(e,t,n,r=`listbox`){e&&(e.setAttribute(`autocomplete`,`off`),e.setAttribute(`role`,`combobox`),e.setAttribute(`aria-autocomplete`,`list`),e.setAttribute(`aria-haspopup`,r),e.setAttribute(`aria-controls`,t),e.setAttribute(`aria-owns`,t),e.setAttribute(`aria-expanded`,`${n}`))}function Si(e){e&&(e.removeAttribute(`autocomplete`),e.removeAttribute(`role`),e.removeAttribute(`aria-autocomplete`),e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-owns`),e.removeAttribute(`aria-expanded`))}export{K as DateAdapter,gr as FORMAT_DATE,Sr as FRIDAY,_r as ISO8601_FORMAT_DATE,te as IS_FOCUSABLE_QUERY,le as InteractivityChecker,ce as IsFocusableConfig,vr as MONDAY,Er as NativeDateAdapter,Cr as SATURDAY,wr as SUNDAY,F as SbbActionBaseElement,Hr as SbbAnimationCompleteMixin,Ne as SbbButtonBaseElement,Me as SbbButtonLikeBaseElement,sr as SbbDarkModeController,In as SbbDisabledInteractiveMixin,V as SbbDisabledMixin,Ln as SbbDisabledTabIndexActionMixin,P as SbbElement,Un as SbbEscapableOverlayController,be as SbbFocusTrapController,ee as SbbFocusVisibleWithinController,Ur as SbbFormAssociatedCheckboxMixin,Kr as SbbFormAssociatedInputMixin,L as SbbFormAssociatedMixin,qr as SbbFormAssociatedRadioButtonMixin,Gn as SbbIdReferenceController,Xn as SbbInertController,z as SbbLanguageController,Pn as SbbLinkBaseElement,Se as SbbLiveAnnouncer,or as SbbMediaMatcherController,nr as SbbMediaQueryBreakpointLargeAndAbove,ar as SbbMediaQueryBreakpointLargeAndBelow,tr as SbbMediaQueryBreakpointSmallAndAbove,ir as SbbMediaQueryBreakpointSmallAndBelow,rr as SbbMediaQueryBreakpointUltraAndAbove,er as SbbMediaQueryBreakpointZeroAndAbove,W as SbbMediaQueryDarkMode,Zn as SbbMediaQueryForcedColors,Qn as SbbMediaQueryHover,$n as SbbMediaQueryPointerCoarse,si as SbbNamedSlotListMixin,ci as SbbNegativeMixin,Fn as SbbOpenCloseBaseElement,_i as SbbOverlayOutsidePointerEventListener,pr as SbbOverlayPositionController,ui as SbbPanelMixin,Vn as SbbPropertyWatcherController,Wr as SbbReadonlyMixin,H as SbbRequiredMixin,hr as SbbScrollController,zr as SbbScrollHandler,zn as SbbSelectionGroupBaseElement,di as SbbSelectionPanelMixin,N as SbbSlottedChangeEvent,fi as SbbUpdateSchedulerMixin,xr as THURSDAY,yr as TUESDAY,Or as TemporalDateAdapter,br as WEDNESDAY,Oe as appendAriaElements,ei as buttonResetStyles,X as containsPierceShadowDom,q as defaultDateAdapter,I as forceType,Vr as forwardEvent,mi as getElementPosition,hi as getElementPositionHorizontal,$ as getElementRectangle,S as getEventTarget,y as getNextElementIndex,kr as getOverride,Ar as handleDistinctChange,ti as hostScrollbarStyles,Qe as i18nAdditionalWagonInformationHeading,ze as i18nAnd,Ie as i18nArrival,Ze as i18nBlockedPassage,Yt as i18nBreadcrumbEllipsisButtonLabel,Nt as i18nCalendarDateSelection,wn as i18nCalendarWeekNumber,Dn as i18nCarouselArrowsNavigationHint,En as i18nCarouselItemAriaLabel,fn as i18nCheckboxRequired,Sn as i18nChipDelete,Cn as i18nChipGroupInputDescription,Be as i18nClass,Xt as i18nClearInput,yt as i18nCloseAlert,St as i18nCloseDialog,Ct as i18nCloseNavigation,bt as i18nCloseNotification,Tt as i18nClosePopover,wt as i18nCloseSidebar,Ke as i18nClosedCompartmentLabel,qt as i18nCollapsed,Ut as i18nConnectionFrom,Gt as i18nConnectionRoundtrip,Wt as i18nConnectionTo,Ye as i18nCouchetteWagonLabel,Ht as i18nDateChangedTo,hn as i18nDateInvalid,_n as i18nDateMax,gn as i18nDateMin,Vt as i18nDatePickerPlaceholder,$e as i18nDeparture,xt as i18nDialog,Fe as i18nDirection,tt as i18nDownload,it as i18nDurationDay,rt as i18nDurationHour,nt as i18nDurationMinute,Kt as i18nExpanded,$t as i18nFileSelectorButtonLabel,en as i18nFileSelectorButtonLabelMultiple,an as i18nFileSelectorCurrentlySelected,rn as i18nFileSelectorDeleteFile,tn as i18nFileSelectorSubtitleLabel,nn as i18nFileSelectorSubtitleLabelMultiple,Zt as i18nFlipCard,ft as i18nFromPlatform,Et as i18nGoBack,mn as i18nInputRequired,ln as i18nItemsPerPage,qe as i18nLocomotiveLabel,Mn as i18nLogo125Anniversary,Nn as i18nLogo125AnniversaryYears,Jt as i18nMapContainerButtonLabel,ht as i18nMeansOfTransport,dt as i18nNew,At as i18nNextDay,Ot as i18nNextMonth,on as i18nNextPage,On as i18nNextSlide,It as i18nNextYear,Pt as i18nNextYearRange,et as i18nNonAccessible,mt as i18nOccupancy,cn as i18nPage,dn as i18nPaginatorOf,un as i18nPaginatorSelected,jt as i18nPreviousDay,kt as i18nPreviousMonth,sn as i18nPreviousPage,kn as i18nPreviousSlide,Lt as i18nPreviousYear,Ft as i18nPreviousYearRange,ct as i18nRealTimeInfo,jn as i18nRemainingCharacters,Xe as i18nRestaurantWagonLabel,Qt as i18nReverseCard,Le as i18nSector,Re as i18nSectorShort,Rt as i18nSelectNextDay,zt as i18nSelectPreviousDay,pn as i18nSelectionRequired,Bt as i18nShowCalendar,Je as i18nSleepingWagonLabel,An as i18nSlide,pt as i18nSupersaver,gt as i18nTargetOpensInNewWindow,vn as i18nTimeInputChange,yn as i18nTimeInvalid,bn as i18nTimeMax,xn as i18nTimeMaxLength,Tn as i18nTimetableFormSwapButtonLabel,Dt as i18nToday,Ve as i18nTrain,He as i18nTrains,lt as i18nTransferProcedure,ut as i18nTransferProcedures,st as i18nTravelhints,ot as i18nTripDuration,at as i18nTripQuayChange,We as i18nWagonLabel,Ge as i18nWagonLabelNumber,Ue as i18nWagonsLabel,_t as i18nWalkingDistanceArrival,vt as i18nWalkingDistanceDeparture,Mt as i18nYearMonthSelection,jr as idReference,M as interactivityChecker,ie as isAndroid,g as isArrowKeyOrPageKeysPressed,p as isArrowKeyPressed,k as isBlink,oe as isChromium,D as isEdge,pi as isEventOnElement,Ae as isEventPrevented,b as isFakeMousedownFromScreenReader,x as isFakeTouchstartFromScreenReader,re as isFirefox,j as isIOS,ne as isMacOS,h as isNextArrowKeyPressed,se as isNextjs,m as isPreviousArrowKeyPressed,ae as isSafari,O as isTrident,A as isWebkit,Pr as isZeroAnimationDuration,ni as listResetStyles,Pe as mergeConfig,B as omitEmptyConverter,Z as pageScrollDisabled,Nr as plainDate,Mr as plainDateConverter,ii as popoverResetStyles,Br as preventScrollOnSpacebarPress,Ir as queueDomContentLoaded,Q as radioButtonRegistry,R as readConfig,Si as removeAriaComboBoxAttributes,ke as removeAriaElements,bi as removeAriaOverlayTriggerProperties,T as sbbInputModalityDetector,Ce as sbbLiveAnnouncer,vi as sbbOverlayOutsidePointerEventListener,ri as screenReaderOnlyStyles,ai as scrollbarStyles,xi as setAriaComboBoxAttributes,yi as setAriaOverlayTriggerProperties,Fr as setOrRemoveAttribute,gi as setOverlayPosition,De as ɵstateController};
@@ -9880,6 +9880,125 @@
9880
9880
  }
9881
9881
  ]
9882
9882
  },
9883
+ {
9884
+ "kind": "javascript-module",
9885
+ "path": "core/controllers/scroll-controller.js",
9886
+ "declarations": [
9887
+ {
9888
+ "kind": "class",
9889
+ "description": "Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential\ncontent shift caused by the disappearance/appearance of the scrollbar.\n\nThe body is fixed in place (instead of just using `overflow: hidden`), which reliably prevents\nscrolling of the underlying page. The current scroll position is stored before\nfixing the body and restored again once the scroll is re-enabled, so the page doesn't jump\nand content that was previously scrolled out of view isn't hidden behind the fixed body.\n\nAs an additional safety net for edge cases, `touchmove` events are intercepted and prevented,\nunless they originate from within a scrollable element that is not at its scroll boundary\n(e.g. an internal scrollable content of a dialog, navigation, sidebar, etc.).\n\nMultiple independent instances (e.g. one per menu/dialog/navigation) can call\n`disableScroll()`/`enableScroll()` in any nesting order:\neach holds the lock under its own `owner` reference,\nso scroll is only re-enabled once every owner that disabled it has re-enabled it again.",
9890
+ "name": "SbbScrollController",
9891
+ "members": [
9892
+ {
9893
+ "kind": "field",
9894
+ "name": "_locked",
9895
+ "type": {
9896
+ "text": "boolean"
9897
+ },
9898
+ "privacy": "private",
9899
+ "default": "false"
9900
+ },
9901
+ {
9902
+ "kind": "field",
9903
+ "name": "_scrollProperties",
9904
+ "type": {
9905
+ "text": "ScrollSavedProperties"
9906
+ },
9907
+ "privacy": "private",
9908
+ "default": "{ scrollPosition: 0, touchStartY: 0 }"
9909
+ },
9910
+ {
9911
+ "kind": "method",
9912
+ "name": "_isVerticallyScrollable",
9913
+ "privacy": "private",
9914
+ "return": {
9915
+ "type": {
9916
+ "text": "boolean"
9917
+ }
9918
+ },
9919
+ "parameters": [
9920
+ {
9921
+ "name": "element",
9922
+ "type": {
9923
+ "text": "Element"
9924
+ }
9925
+ }
9926
+ ],
9927
+ "description": "Checks whether the given element can be scrolled vertically\n(i.e. it has an overflow of `auto`/`scroll` and its content overflows its box)."
9928
+ },
9929
+ {
9930
+ "kind": "method",
9931
+ "name": "_findScrollableAncestor",
9932
+ "privacy": "private",
9933
+ "return": {
9934
+ "type": {
9935
+ "text": "Element | null"
9936
+ }
9937
+ },
9938
+ "parameters": [
9939
+ {
9940
+ "name": "path",
9941
+ "type": {
9942
+ "text": "EventTarget[]"
9943
+ }
9944
+ }
9945
+ ],
9946
+ "description": "Walks the event's composed path (to properly support shadow DOM) and returns the\nclosest scrollable ancestor, if any, stopping at `document.body`/`document.documentElement`."
9947
+ },
9948
+ {
9949
+ "kind": "method",
9950
+ "name": "hostDisconnected",
9951
+ "privacy": "public",
9952
+ "return": {
9953
+ "type": {
9954
+ "text": "void"
9955
+ }
9956
+ }
9957
+ },
9958
+ {
9959
+ "kind": "method",
9960
+ "name": "disableScroll",
9961
+ "privacy": "public",
9962
+ "return": {
9963
+ "type": {
9964
+ "text": "void"
9965
+ }
9966
+ }
9967
+ },
9968
+ {
9969
+ "kind": "method",
9970
+ "name": "enableScroll",
9971
+ "privacy": "public",
9972
+ "return": {
9973
+ "type": {
9974
+ "text": "void"
9975
+ }
9976
+ }
9977
+ },
9978
+ {
9979
+ "kind": "field",
9980
+ "name": "_touchStart",
9981
+ "privacy": "private"
9982
+ },
9983
+ {
9984
+ "kind": "field",
9985
+ "name": "_touchMove",
9986
+ "privacy": "private"
9987
+ }
9988
+ ]
9989
+ }
9990
+ ],
9991
+ "exports": [
9992
+ {
9993
+ "kind": "js",
9994
+ "name": "SbbScrollController",
9995
+ "declaration": {
9996
+ "name": "SbbScrollController",
9997
+ "module": "core/controllers/scroll-controller.js"
9998
+ }
9999
+ }
10000
+ ]
10001
+ },
9883
10002
  {
9884
10003
  "kind": "javascript-module",
9885
10004
  "path": "core/datetime/native-date-adapter.js",
@@ -11741,11 +11860,12 @@
11741
11860
  "type": {
11742
11861
  "text": "boolean"
11743
11862
  }
11744
- }
11863
+ },
11864
+ "description": "TODO: with next major release, move this function to scroll-controller.ts"
11745
11865
  },
11746
11866
  {
11747
11867
  "kind": "class",
11748
- "description": "Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential\ncontent shift caused by the disappearance/appearance of the scrollbar.\n\nThe body is fixed in place (instead of just using `overflow: hidden`), which reliably prevents\nscrolling of the underlying page. The current scroll position is stored before\nfixing the body and restored again once the scroll is re-enabled, so the page doesn't jump\nand content that was previously scrolled out of view isn't hidden behind the fixed body.\n\nAs an additional safety net for edge cases, `touchmove` events are intercepted and prevented,\nunless they originate from within a scrollable element that is not at its scroll boundary\n(e.g. an internal scrollable content of a dialog, navigation, sidebar, etc.).",
11868
+ "description": "",
11749
11869
  "name": "SbbScrollHandler",
11750
11870
  "members": [
11751
11871
  {
@@ -11828,7 +11948,8 @@
11828
11948
  }
11829
11949
  }
11830
11950
  }
11831
- ]
11951
+ ],
11952
+ "deprecated": "Use SbbScrollController instead. Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential content shift caused by the disappearance/appearance of the scrollbar. The body is fixed in place (instead of just using `overflow: hidden`), which reliably prevents scrolling of the underlying page. The current scroll position is stored before fixing the body and restored again once the scroll is re-enabled, so the page doesn't jump and content that was previously scrolled out of view isn't hidden behind the fixed body. As an additional safety net for edge cases, `touchmove` events are intercepted and prevented, unless they originate from within a scrollable element that is not at its scroll boundary (e.g. an internal scrollable content of a dialog, navigation, sidebar, etc.)."
11832
11953
  }
11833
11954
  ],
11834
11955
  "exports": [
@@ -30900,6 +31021,14 @@
30900
31021
  "module": "core/controllers/overlay-position-controller.js"
30901
31022
  }
30902
31023
  },
31024
+ {
31025
+ "kind": "js",
31026
+ "name": "*",
31027
+ "declaration": {
31028
+ "name": "*",
31029
+ "module": "core/controllers/scroll-controller.js"
31030
+ }
31031
+ },
30903
31032
  {
30904
31033
  "kind": "js",
30905
31034
  "name": "*",
@@ -105163,7 +105292,7 @@
105163
105292
  "kind": "field",
105164
105293
  "name": "scrollHandler",
105165
105294
  "privacy": "protected",
105166
- "default": "new SbbScrollHandler()"
105295
+ "default": "new SbbScrollController(this)"
105167
105296
  },
105168
105297
  {
105169
105298
  "kind": "field",
@@ -106309,7 +106438,7 @@
106309
106438
  "kind": "field",
106310
106439
  "name": "scrollHandler",
106311
106440
  "privacy": "protected",
106312
- "default": "new SbbScrollHandler()",
106441
+ "default": "new SbbScrollController(this)",
106313
106442
  "inheritedFrom": {
106314
106443
  "name": "SbbOverlayBaseElement",
106315
106444
  "module": "overlay/overlay-base-element.js"
@@ -107503,7 +107632,7 @@
107503
107632
  "kind": "field",
107504
107633
  "name": "scrollHandler",
107505
107634
  "privacy": "protected",
107506
- "default": "new SbbScrollHandler()",
107635
+ "default": "new SbbScrollController(this)",
107507
107636
  "inheritedFrom": {
107508
107637
  "name": "SbbOverlayBaseElement",
107509
107638
  "module": "overlay/overlay-base-element.js"
@@ -135041,7 +135170,7 @@
135041
135170
  "kind": "field",
135042
135171
  "name": "_scrollHandler",
135043
135172
  "privacy": "private",
135044
- "default": "new SbbScrollHandler()"
135173
+ "default": "new SbbScrollController(this)"
135045
135174
  },
135046
135175
  {
135047
135176
  "kind": "field",
@@ -140872,7 +141001,7 @@
140872
141001
  "kind": "field",
140873
141002
  "name": "_scrollHandler",
140874
141003
  "privacy": "private",
140875
- "default": "new SbbScrollHandler()"
141004
+ "default": "new SbbScrollController(this)"
140876
141005
  },
140877
141006
  {
140878
141007
  "kind": "field",
@@ -0,0 +1,42 @@
1
+ import { type ReactiveController, type ReactiveControllerHost } from 'lit';
2
+ import type { SbbOpenCloseBaseElement } from '../base-elements/open-close-base-element.ts';
3
+ /**
4
+ * Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential
5
+ * content shift caused by the disappearance/appearance of the scrollbar.
6
+ *
7
+ * The body is fixed in place (instead of just using `overflow: hidden`), which reliably prevents
8
+ * scrolling of the underlying page. The current scroll position is stored before
9
+ * fixing the body and restored again once the scroll is re-enabled, so the page doesn't jump
10
+ * and content that was previously scrolled out of view isn't hidden behind the fixed body.
11
+ *
12
+ * As an additional safety net for edge cases, `touchmove` events are intercepted and prevented,
13
+ * unless they originate from within a scrollable element that is not at its scroll boundary
14
+ * (e.g. an internal scrollable content of a dialog, navigation, sidebar, etc.).
15
+ *
16
+ * Multiple independent instances (e.g. one per menu/dialog/navigation) can call
17
+ * `disableScroll()`/`enableScroll()` in any nesting order:
18
+ * each holds the lock under its own `owner` reference,
19
+ * so scroll is only re-enabled once every owner that disabled it has re-enabled it again.
20
+ */
21
+ export declare class SbbScrollController implements ReactiveController {
22
+ private _host;
23
+ private _lockers;
24
+ private _locked;
25
+ private _scrollProperties;
26
+ constructor(_host: ReactiveControllerHost & SbbOpenCloseBaseElement, _lockers?: Set<SbbOpenCloseBaseElement>);
27
+ /**
28
+ * Checks whether the given element can be scrolled vertically
29
+ * (i.e. it has an overflow of `auto`/`scroll` and its content overflows its box).
30
+ */
31
+ private _isVerticallyScrollable;
32
+ /**
33
+ * Walks the event's composed path (to properly support shadow DOM) and returns the
34
+ * closest scrollable ancestor, if any, stopping at `document.body`/`document.documentElement`.
35
+ */
36
+ private _findScrollableAncestor;
37
+ hostDisconnected(): void;
38
+ disableScroll(): void;
39
+ enableScroll(): void;
40
+ private _touchStart;
41
+ private _touchMove;
42
+ }
@@ -1,5 +1,10 @@
1
+ /**
2
+ * TODO: with next major release, move this function to scroll-controller.ts
3
+ */
1
4
  export declare function pageScrollDisabled(): boolean;
2
5
  /**
6
+ * @deprecated Use SbbScrollController instead.
7
+ *
3
8
  * Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential
4
9
  * content shift caused by the disappearance/appearance of the scrollbar.
5
10
  *
@@ -21,6 +21,7 @@ export * from './core/controllers/inert-controller.ts';
21
21
  export * from './core/controllers/language-controller.ts';
22
22
  export * from './core/controllers/media-matchers-controller.ts';
23
23
  export * from './core/controllers/overlay-position-controller.ts';
24
+ export * from './core/controllers/scroll-controller.ts';
24
25
  export * from './core/datetime/date-adapter.ts';
25
26
  export * from './core/datetime/native-date-adapter.ts';
26
27
  export * from './core/datetime/temporal-date-adapter.ts';
@@ -3893,6 +3893,119 @@ var SbbOverlayPositionController = class {
3893
3893
  }
3894
3894
  };
3895
3895
 
3896
+ //#endregion
3897
+ //#region src/elements/core/controllers/scroll-controller.ts
3898
+ /**
3899
+ * Overlays currently holding a scroll lock, shared across all `SbbScrollController` instances.
3900
+ * Only the transition 'empty => non-empty' actually disables scroll, and only 'non-empty => empty' restores it,
3901
+ * so that closing one overlay never re-enables scroll while another one is still open.
3902
+ */
3903
+ const lockers = /* @__PURE__ */ new Set();
3904
+ /**
3905
+ * Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential
3906
+ * content shift caused by the disappearance/appearance of the scrollbar.
3907
+ *
3908
+ * The body is fixed in place (instead of just using `overflow: hidden`), which reliably prevents
3909
+ * scrolling of the underlying page. The current scroll position is stored before
3910
+ * fixing the body and restored again once the scroll is re-enabled, so the page doesn't jump
3911
+ * and content that was previously scrolled out of view isn't hidden behind the fixed body.
3912
+ *
3913
+ * As an additional safety net for edge cases, `touchmove` events are intercepted and prevented,
3914
+ * unless they originate from within a scrollable element that is not at its scroll boundary
3915
+ * (e.g. an internal scrollable content of a dialog, navigation, sidebar, etc.).
3916
+ *
3917
+ * Multiple independent instances (e.g. one per menu/dialog/navigation) can call
3918
+ * `disableScroll()`/`enableScroll()` in any nesting order:
3919
+ * each holds the lock under its own `owner` reference,
3920
+ * so scroll is only re-enabled once every owner that disabled it has re-enabled it again.
3921
+ */
3922
+ var SbbScrollController = class {
3923
+ constructor(_host, _lockers = lockers) {
3924
+ this._host = _host;
3925
+ this._lockers = _lockers;
3926
+ this._locked = false;
3927
+ this._scrollProperties = {
3928
+ scrollPosition: 0,
3929
+ touchStartY: 0
3930
+ };
3931
+ this._touchStart = (event) => {
3932
+ this._scrollProperties.touchStartY = event.touches[0]?.clientY ?? 0;
3933
+ };
3934
+ this._touchMove = (event) => {
3935
+ const touch = event.touches[0];
3936
+ if (!touch) return;
3937
+ const scrollable = this._findScrollableAncestor(event.composedPath());
3938
+ if (!scrollable) {
3939
+ event.preventDefault();
3940
+ return;
3941
+ }
3942
+ const deltaY = touch.clientY - this._scrollProperties.touchStartY;
3943
+ const atTop = scrollable.scrollTop <= 0;
3944
+ const atBottom = scrollable.scrollTop + scrollable.clientHeight >= scrollable.scrollHeight;
3945
+ if (atTop && deltaY > 0 || atBottom && deltaY < 0) event.preventDefault();
3946
+ };
3947
+ this._host.addController?.(this);
3948
+ }
3949
+ /**
3950
+ * Checks whether the given element can be scrolled vertically
3951
+ * (i.e. it has an overflow of `auto`/`scroll` and its content overflows its box).
3952
+ */
3953
+ _isVerticallyScrollable(element) {
3954
+ const overflowY = getComputedStyle(element).overflowY;
3955
+ return (overflowY === "auto" || overflowY === "scroll") && element.scrollHeight > element.clientHeight;
3956
+ }
3957
+ /**
3958
+ * Walks the event's composed path (to properly support shadow DOM) and returns the
3959
+ * closest scrollable ancestor, if any, stopping at `document.body`/`document.documentElement`.
3960
+ */
3961
+ _findScrollableAncestor(path) {
3962
+ for (const target of path) {
3963
+ if (target === document.body || target === document.documentElement) break;
3964
+ if (target instanceof Element && this._isVerticallyScrollable(target)) return target;
3965
+ }
3966
+ return null;
3967
+ }
3968
+ hostDisconnected() {
3969
+ this.enableScroll();
3970
+ }
3971
+ disableScroll() {
3972
+ if (this._locked) return;
3973
+ this._locked = true;
3974
+ const wasEmpty = this._lockers.size === 0;
3975
+ this._lockers.add(this._host);
3976
+ if (!wasEmpty) return;
3977
+ this._scrollProperties.scrollPosition = window.scrollY || document.documentElement.scrollTop;
3978
+ this._scrollProperties.savedPosition = document.body.style.position;
3979
+ this._scrollProperties.savedTop = document.body.style.top;
3980
+ this._scrollProperties.savedInsetInline = document.body.style.insetInline;
3981
+ this._scrollProperties.savedOverflow = document.body.style.overflow;
3982
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
3983
+ document.body.style.position = "fixed";
3984
+ document.body.style.top = `-${this._scrollProperties.scrollPosition}px`;
3985
+ document.body.style.insetInline = `0 ${scrollbarWidth}px`;
3986
+ document.body.style.overflow = "hidden";
3987
+ document.body.style.setProperty("--sbb-scrollbar-reserved-space", `${scrollbarWidth}px`);
3988
+ document.addEventListener("touchstart", this._touchStart, { passive: true });
3989
+ document.addEventListener("touchmove", this._touchMove, { passive: false });
3990
+ document.body.toggleAttribute("data-sbb-scroll-disabled", true);
3991
+ }
3992
+ enableScroll() {
3993
+ if (!this._locked) return;
3994
+ this._locked = false;
3995
+ this._lockers.delete(this._host);
3996
+ if (this._lockers.size > 0) return;
3997
+ document.body.style.position = this._scrollProperties.savedPosition || "";
3998
+ document.body.style.top = this._scrollProperties.savedTop || "";
3999
+ document.body.style.insetInline = this._scrollProperties.savedInsetInline || "";
4000
+ document.body.style.overflow = this._scrollProperties.savedOverflow || "";
4001
+ document.body.style.removeProperty("--sbb-scrollbar-reserved-space");
4002
+ document.removeEventListener("touchstart", this._touchStart);
4003
+ document.removeEventListener("touchmove", this._touchMove);
4004
+ document.body.removeAttribute("data-sbb-scroll-disabled");
4005
+ window.scrollTo(0, this._scrollProperties.scrollPosition);
4006
+ }
4007
+ };
4008
+
3896
4009
  //#endregion
3897
4010
  //#region src/elements/core/datetime/date-adapter.ts
3898
4011
  const FORMAT_DATE = /(0?[1-9]|[12][0-9]|3[01])[.,\\/\-\s](0?[1-9]|1[0-2])[.,\\/\-\s]([0-9]{1,4}$)?/;
@@ -4576,12 +4689,17 @@ function queueDomContentLoaded(action) {
4576
4689
 
4577
4690
  //#endregion
4578
4691
  //#region src/elements/core/dom/scroll.ts
4692
+ /**
4693
+ * TODO: with next major release, move this function to scroll-controller.ts
4694
+ */
4579
4695
  function pageScrollDisabled() {
4580
4696
  return document.body.hasAttribute("data-sbb-scroll-disabled");
4581
4697
  }
4582
4698
  /**
4583
4699
  * Checks whether the given element can be scrolled vertically
4584
4700
  * (i.e. it has an overflow of `auto`/`scroll` and its content overflows its box).
4701
+ *
4702
+ * TODO: with next major release, remove this function together with SbbScrollHandler.
4585
4703
  */
4586
4704
  function isVerticallyScrollable(element) {
4587
4705
  const overflowY = getComputedStyle(element).overflowY;
@@ -4590,6 +4708,8 @@ function isVerticallyScrollable(element) {
4590
4708
  /**
4591
4709
  * Walks the event's composed path (to properly support shadow DOM) and returns the
4592
4710
  * closest scrollable ancestor, if any, stopping at `document.body`/`document.documentElement`.
4711
+ *
4712
+ * TODO: with next major release, remove this function together with SbbScrollHandler.
4593
4713
  */
4594
4714
  function findScrollableAncestor(path) {
4595
4715
  for (const target of path) {
@@ -4599,6 +4719,8 @@ function findScrollableAncestor(path) {
4599
4719
  return null;
4600
4720
  }
4601
4721
  /**
4722
+ * @deprecated Use SbbScrollController instead.
4723
+ *
4602
4724
  * Handle the page scroll, allowing to disable/enable the window scroll avoiding a potential
4603
4725
  * content shift caused by the disappearance/appearance of the scrollbar.
4604
4726
  *
@@ -6261,4 +6383,4 @@ function removeAriaComboBoxAttributes(trigger) {
6261
6383
  }
6262
6384
 
6263
6385
  //#endregion
6264
- export { DateAdapter, FORMAT_DATE, FRIDAY, ISO8601_FORMAT_DATE, IS_FOCUSABLE_QUERY, InteractivityChecker, IsFocusableConfig, MONDAY, NativeDateAdapter, SATURDAY, SUNDAY, SbbActionBaseElement, SbbAnimationCompleteMixin, SbbButtonBaseElement, SbbButtonLikeBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbFocusVisibleWithinController, SbbFormAssociatedCheckboxMixin, SbbFormAssociatedInputMixin, SbbFormAssociatedMixin, SbbFormAssociatedRadioButtonMixin, SbbIdReferenceController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbLiveAnnouncer, SbbMediaMatcherController, SbbMediaQueryBreakpointLargeAndAbove, SbbMediaQueryBreakpointLargeAndBelow, SbbMediaQueryBreakpointSmallAndAbove, SbbMediaQueryBreakpointSmallAndBelow, SbbMediaQueryBreakpointUltraAndAbove, SbbMediaQueryBreakpointZeroAndAbove, SbbMediaQueryDarkMode, SbbMediaQueryForcedColors, SbbMediaQueryHover, SbbMediaQueryPointerCoarse, SbbNamedSlotListMixin, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbOverlayOutsidePointerEventListener, SbbOverlayPositionController, SbbPanelMixin, SbbPropertyWatcherController, SbbReadonlyMixin, SbbRequiredMixin, SbbScrollHandler, SbbSelectionGroupBaseElement, SbbSelectionPanelMixin, SbbSlottedChangeEvent, SbbUpdateSchedulerMixin, THURSDAY, TUESDAY, TemporalDateAdapter, WEDNESDAY, appendAriaElements, buttonResetStyles, containsPierceShadowDom, defaultDateAdapter, forceType, forwardEvent, getElementPosition, getElementPositionHorizontal, getElementRectangle, getEventTarget, getNextElementIndex, getOverride, handleDistinctChange, hostScrollbarStyles, i18nAdditionalWagonInformationHeading, i18nAnd, i18nArrival, i18nBlockedPassage, i18nBreadcrumbEllipsisButtonLabel, i18nCalendarDateSelection, i18nCalendarWeekNumber, i18nCarouselArrowsNavigationHint, i18nCarouselItemAriaLabel, i18nCheckboxRequired, i18nChipDelete, i18nChipGroupInputDescription, i18nClass, i18nClearInput, i18nCloseAlert, i18nCloseDialog, i18nCloseNavigation, i18nCloseNotification, i18nClosePopover, i18nCloseSidebar, i18nClosedCompartmentLabel, i18nCollapsed, i18nConnectionFrom, i18nConnectionRoundtrip, i18nConnectionTo, i18nCouchetteWagonLabel, i18nDateChangedTo, i18nDateInvalid, i18nDateMax, i18nDateMin, i18nDatePickerPlaceholder, i18nDeparture, i18nDialog, i18nDirection, i18nDownload, i18nDurationDay, i18nDurationHour, i18nDurationMinute, i18nExpanded, i18nFileSelectorButtonLabel, i18nFileSelectorButtonLabelMultiple, i18nFileSelectorCurrentlySelected, i18nFileSelectorDeleteFile, i18nFileSelectorSubtitleLabel, i18nFileSelectorSubtitleLabelMultiple, i18nFlipCard, i18nFromPlatform, i18nGoBack, i18nInputRequired, i18nItemsPerPage, i18nLocomotiveLabel, i18nLogo125Anniversary, i18nLogo125AnniversaryYears, i18nMapContainerButtonLabel, i18nMeansOfTransport, i18nNew, i18nNextDay, i18nNextMonth, i18nNextPage, i18nNextSlide, i18nNextYear, i18nNextYearRange, i18nNonAccessible, i18nOccupancy, i18nPage, i18nPaginatorOf, i18nPaginatorSelected, i18nPreviousDay, i18nPreviousMonth, i18nPreviousPage, i18nPreviousSlide, i18nPreviousYear, i18nPreviousYearRange, i18nRealTimeInfo, i18nRemainingCharacters, i18nRestaurantWagonLabel, i18nReverseCard, i18nSector, i18nSectorShort, i18nSelectNextDay, i18nSelectPreviousDay, i18nSelectionRequired, i18nShowCalendar, i18nSleepingWagonLabel, i18nSlide, i18nSupersaver, i18nTargetOpensInNewWindow, i18nTimeInputChange, i18nTimeInvalid, i18nTimeMax, i18nTimeMaxLength, i18nTimetableFormSwapButtonLabel, i18nToday, i18nTrain, i18nTrains, i18nTransferProcedure, i18nTransferProcedures, i18nTravelhints, i18nTripDuration, i18nTripQuayChange, i18nWagonLabel, i18nWagonLabelNumber, i18nWagonsLabel, i18nWalkingDistanceArrival, i18nWalkingDistanceDeparture, i18nYearMonthSelection, idReference, interactivityChecker, isAndroid, isArrowKeyOrPageKeysPressed, isArrowKeyPressed, isBlink, isChromium, isEdge, isEventOnElement, isEventPrevented, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, isFirefox, isIOS, isMacOS, isNextArrowKeyPressed, isNextjs, isPreviousArrowKeyPressed, isSafari, isTrident, isWebkit, isZeroAnimationDuration, listResetStyles, mergeConfig, omitEmptyConverter, pageScrollDisabled, plainDate, plainDateConverter, popoverResetStyles, preventScrollOnSpacebarPress, queueDomContentLoaded, radioButtonRegistry, readConfig, removeAriaComboBoxAttributes, removeAriaElements, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, sbbLiveAnnouncer, sbbOverlayOutsidePointerEventListener, screenReaderOnlyStyles, scrollbarStyles, setAriaComboBoxAttributes, setAriaOverlayTriggerProperties, setOrRemoveAttribute, setOverlayPosition, ɵstateController };
6386
+ export { DateAdapter, FORMAT_DATE, FRIDAY, ISO8601_FORMAT_DATE, IS_FOCUSABLE_QUERY, InteractivityChecker, IsFocusableConfig, MONDAY, NativeDateAdapter, SATURDAY, SUNDAY, SbbActionBaseElement, SbbAnimationCompleteMixin, SbbButtonBaseElement, SbbButtonLikeBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbFocusVisibleWithinController, SbbFormAssociatedCheckboxMixin, SbbFormAssociatedInputMixin, SbbFormAssociatedMixin, SbbFormAssociatedRadioButtonMixin, SbbIdReferenceController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbLiveAnnouncer, SbbMediaMatcherController, SbbMediaQueryBreakpointLargeAndAbove, SbbMediaQueryBreakpointLargeAndBelow, SbbMediaQueryBreakpointSmallAndAbove, SbbMediaQueryBreakpointSmallAndBelow, SbbMediaQueryBreakpointUltraAndAbove, SbbMediaQueryBreakpointZeroAndAbove, SbbMediaQueryDarkMode, SbbMediaQueryForcedColors, SbbMediaQueryHover, SbbMediaQueryPointerCoarse, SbbNamedSlotListMixin, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbOverlayOutsidePointerEventListener, SbbOverlayPositionController, SbbPanelMixin, SbbPropertyWatcherController, SbbReadonlyMixin, SbbRequiredMixin, SbbScrollController, SbbScrollHandler, SbbSelectionGroupBaseElement, SbbSelectionPanelMixin, SbbSlottedChangeEvent, SbbUpdateSchedulerMixin, THURSDAY, TUESDAY, TemporalDateAdapter, WEDNESDAY, appendAriaElements, buttonResetStyles, containsPierceShadowDom, defaultDateAdapter, forceType, forwardEvent, getElementPosition, getElementPositionHorizontal, getElementRectangle, getEventTarget, getNextElementIndex, getOverride, handleDistinctChange, hostScrollbarStyles, i18nAdditionalWagonInformationHeading, i18nAnd, i18nArrival, i18nBlockedPassage, i18nBreadcrumbEllipsisButtonLabel, i18nCalendarDateSelection, i18nCalendarWeekNumber, i18nCarouselArrowsNavigationHint, i18nCarouselItemAriaLabel, i18nCheckboxRequired, i18nChipDelete, i18nChipGroupInputDescription, i18nClass, i18nClearInput, i18nCloseAlert, i18nCloseDialog, i18nCloseNavigation, i18nCloseNotification, i18nClosePopover, i18nCloseSidebar, i18nClosedCompartmentLabel, i18nCollapsed, i18nConnectionFrom, i18nConnectionRoundtrip, i18nConnectionTo, i18nCouchetteWagonLabel, i18nDateChangedTo, i18nDateInvalid, i18nDateMax, i18nDateMin, i18nDatePickerPlaceholder, i18nDeparture, i18nDialog, i18nDirection, i18nDownload, i18nDurationDay, i18nDurationHour, i18nDurationMinute, i18nExpanded, i18nFileSelectorButtonLabel, i18nFileSelectorButtonLabelMultiple, i18nFileSelectorCurrentlySelected, i18nFileSelectorDeleteFile, i18nFileSelectorSubtitleLabel, i18nFileSelectorSubtitleLabelMultiple, i18nFlipCard, i18nFromPlatform, i18nGoBack, i18nInputRequired, i18nItemsPerPage, i18nLocomotiveLabel, i18nLogo125Anniversary, i18nLogo125AnniversaryYears, i18nMapContainerButtonLabel, i18nMeansOfTransport, i18nNew, i18nNextDay, i18nNextMonth, i18nNextPage, i18nNextSlide, i18nNextYear, i18nNextYearRange, i18nNonAccessible, i18nOccupancy, i18nPage, i18nPaginatorOf, i18nPaginatorSelected, i18nPreviousDay, i18nPreviousMonth, i18nPreviousPage, i18nPreviousSlide, i18nPreviousYear, i18nPreviousYearRange, i18nRealTimeInfo, i18nRemainingCharacters, i18nRestaurantWagonLabel, i18nReverseCard, i18nSector, i18nSectorShort, i18nSelectNextDay, i18nSelectPreviousDay, i18nSelectionRequired, i18nShowCalendar, i18nSleepingWagonLabel, i18nSlide, i18nSupersaver, i18nTargetOpensInNewWindow, i18nTimeInputChange, i18nTimeInvalid, i18nTimeMax, i18nTimeMaxLength, i18nTimetableFormSwapButtonLabel, i18nToday, i18nTrain, i18nTrains, i18nTransferProcedure, i18nTransferProcedures, i18nTravelhints, i18nTripDuration, i18nTripQuayChange, i18nWagonLabel, i18nWagonLabelNumber, i18nWagonsLabel, i18nWalkingDistanceArrival, i18nWalkingDistanceDeparture, i18nYearMonthSelection, idReference, interactivityChecker, isAndroid, isArrowKeyOrPageKeysPressed, isArrowKeyPressed, isBlink, isChromium, isEdge, isEventOnElement, isEventPrevented, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, isFirefox, isIOS, isMacOS, isNextArrowKeyPressed, isNextjs, isPreviousArrowKeyPressed, isSafari, isTrident, isWebkit, isZeroAnimationDuration, listResetStyles, mergeConfig, omitEmptyConverter, pageScrollDisabled, plainDate, plainDateConverter, popoverResetStyles, preventScrollOnSpacebarPress, queueDomContentLoaded, radioButtonRegistry, readConfig, removeAriaComboBoxAttributes, removeAriaElements, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, sbbLiveAnnouncer, sbbOverlayOutsidePointerEventListener, screenReaderOnlyStyles, scrollbarStyles, setAriaComboBoxAttributes, setAriaOverlayTriggerProperties, setOrRemoveAttribute, setOverlayPosition, ɵstateController };
@@ -1,5 +1,5 @@
1
1
  import { html, isServer, unsafeCSS } from "lit";
2
- import { SbbButtonBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbMediaMatcherController, SbbMediaQueryBreakpointSmallAndBelow, SbbOpenCloseBaseElement, SbbScrollHandler, forwardEvent, getElementPosition, getElementPositionHorizontal, getNextElementIndex, i18nGoBack, idReference, interactivityChecker, isArrowKeyOrPageKeysPressed, isEventOnElement, isZeroAnimationDuration, popoverResetStyles, removeAriaOverlayTriggerProperties, scrollbarStyles, setAriaOverlayTriggerProperties, ɵstateController } from "./core.js";
2
+ import { SbbButtonBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbMediaMatcherController, SbbMediaQueryBreakpointSmallAndBelow, SbbOpenCloseBaseElement, SbbScrollController, forwardEvent, getElementPosition, getElementPositionHorizontal, getNextElementIndex, i18nGoBack, idReference, interactivityChecker, isArrowKeyOrPageKeysPressed, isEventOnElement, isZeroAnimationDuration, popoverResetStyles, removeAriaOverlayTriggerProperties, scrollbarStyles, setAriaOverlayTriggerProperties, ɵstateController } from "./core.js";
3
3
  import { SbbIconNameMixin } from "./icon.pure.js";
4
4
  import { __esDecorate, __runInitializers } from "tslib";
5
5
  import { property } from "lit/decorators.js";
@@ -166,7 +166,7 @@ let SbbMenuElement = (() => {
166
166
  this._isPointerDownEventOnMenu = false;
167
167
  this._escapableOverlayController = new SbbEscapableOverlayController(this);
168
168
  this._focusTrapController = new SbbFocusTrapController(this);
169
- this._scrollHandler = new SbbScrollHandler();
169
+ this._scrollHandler = new SbbScrollController(this);
170
170
  this._inertController = new SbbInertController(this);
171
171
  this._mobileBreakpoint = SbbMediaQueryBreakpointSmallAndBelow;
172
172
  this._mediaMatcher = new SbbMediaMatcherController(this, { [this._mobileBreakpoint]: (matches) => {
@@ -1,6 +1,6 @@
1
1
  import { html, isServer, nothing, unsafeCSS } from "lit";
2
2
  import { html as html$1 } from "lit/static-html.js";
3
- import { IS_FOCUSABLE_QUERY, SbbButtonBaseElement, SbbDisabledMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbMediaMatcherController, SbbMediaQueryBreakpointSmallAndBelow, SbbNamedSlotListMixin, SbbOpenCloseBaseElement, SbbPropertyWatcherController, SbbScrollHandler, SbbUpdateSchedulerMixin, forceType, i18nCloseNavigation, i18nGoBack, idReference, isEventOnElement, isZeroAnimationDuration, omitEmptyConverter, popoverResetStyles, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, scrollbarStyles, setAriaOverlayTriggerProperties, ɵstateController } from "./core.js";
3
+ import { IS_FOCUSABLE_QUERY, SbbButtonBaseElement, SbbDisabledMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbMediaMatcherController, SbbMediaQueryBreakpointSmallAndBelow, SbbNamedSlotListMixin, SbbOpenCloseBaseElement, SbbPropertyWatcherController, SbbScrollController, SbbUpdateSchedulerMixin, forceType, i18nCloseNavigation, i18nGoBack, idReference, isEventOnElement, isZeroAnimationDuration, omitEmptyConverter, popoverResetStyles, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, scrollbarStyles, setAriaOverlayTriggerProperties, ɵstateController } from "./core.js";
4
4
  import { SbbIconElement } from "./icon.pure.js";
5
5
  import { __esDecorate, __runInitializers } from "tslib";
6
6
  import { property, state } from "lit/decorators.js";
@@ -765,7 +765,7 @@ let SbbNavigationElement = (() => {
765
765
  this._inertController = new SbbInertController(this);
766
766
  this._escapableOverlayController = new SbbEscapableOverlayController(this);
767
767
  this._focusTrapController = new SbbFocusTrapController(this);
768
- this._scrollHandler = new SbbScrollHandler();
768
+ this._scrollHandler = new SbbScrollController(this);
769
769
  this._isPointerDownEventOnNavigation = false;
770
770
  this._resizeObserverTimeout = null;
771
771
  this._navigationResizeObserver = new ResizeController(this, {
@@ -1,5 +1,5 @@
1
1
  import { type CSSResultGroup, type PropertyDeclaration, type PropertyValues } from 'lit';
2
- import { SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbOpenCloseBaseElement, SbbScrollHandler } from '../core.ts';
2
+ import { SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbOpenCloseBaseElement, SbbScrollController } from '../core.ts';
3
3
  export declare class SbbOverlayCloseEvent<T = any> extends Event {
4
4
  /**
5
5
  * The result associated with the closed overlay.
@@ -45,7 +45,7 @@ export declare abstract class SbbOverlayBaseElement extends SbbOverlayBaseElemen
45
45
  protected lastClosedTarget?: HTMLElement;
46
46
  protected openOverlayController?: AbortController;
47
47
  protected focusTrapController: SbbFocusTrapController;
48
- protected scrollHandler: SbbScrollHandler;
48
+ protected scrollHandler: SbbScrollController;
49
49
  protected lastResult: any;
50
50
  protected language: SbbLanguageController;
51
51
  protected inertController: SbbInertController;
@@ -1,7 +1,7 @@
1
1
  import { __esDecorate, __runInitializers } from "tslib";
2
2
  import { isServer, unsafeCSS } from "lit";
3
3
  import { property } from "lit/decorators.js";
4
- import { SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbScrollHandler, forceType, forwardEvent, i18nCloseDialog, i18nDialog, idReference, isZeroAnimationDuration, popoverResetStyles, removeAriaOverlayTriggerProperties, screenReaderOnlyStyles, scrollbarStyles, setAriaOverlayTriggerProperties } from "./core.js";
4
+ import { SbbEscapableOverlayController, SbbFocusTrapController, SbbInertController, SbbLanguageController, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbScrollController, forceType, forwardEvent, i18nCloseDialog, i18nDialog, idReference, isZeroAnimationDuration, popoverResetStyles, removeAriaOverlayTriggerProperties, screenReaderOnlyStyles, scrollbarStyles, setAriaOverlayTriggerProperties } from "./core.js";
5
5
  import { ref } from "lit/directives/ref.js";
6
6
  import { html } from "lit/static-html.js";
7
7
  import { SbbSecondaryButtonElement } from "./button.pure.js";
@@ -39,7 +39,7 @@ let SbbOverlayBaseElement = (() => {
39
39
  this.#skipFocusRestoration_accessor_storage = (__runInitializers(this, _accessibilityLabel_extraInitializers), __runInitializers(this, _skipFocusRestoration_initializers, false));
40
40
  this.lastFocusedElement = __runInitializers(this, _skipFocusRestoration_extraInitializers);
41
41
  this.focusTrapController = new SbbFocusTrapController(this);
42
- this.scrollHandler = new SbbScrollHandler();
42
+ this.scrollHandler = new SbbScrollController(this);
43
43
  this.language = new SbbLanguageController(this);
44
44
  this.inertController = new SbbInertController(this);
45
45
  this.escapableOverlayController = new SbbEscapableOverlayController(this);
package/menu.pure.js CHANGED
@@ -1,4 +1,4 @@
1
- import{html as e,isServer as t,unsafeCSS as n}from"lit";import{SbbButtonBaseElement as r,SbbDarkModeController as i,SbbDisabledInteractiveMixin as a,SbbDisabledMixin as o,SbbDisabledTabIndexActionMixin as s,SbbEscapableOverlayController as c,SbbFocusTrapController as l,SbbInertController as u,SbbLanguageController as d,SbbLinkBaseElement as f,SbbMediaMatcherController as p,SbbMediaQueryBreakpointSmallAndBelow as m,SbbOpenCloseBaseElement as h,SbbScrollHandler as g,forwardEvent as _,getElementPosition as v,getElementPositionHorizontal as y,getNextElementIndex as b,i18nGoBack as x,idReference as S,interactivityChecker as C,isArrowKeyOrPageKeysPressed as w,isEventOnElement as T,isZeroAnimationDuration as E,popoverResetStyles as D,removeAriaOverlayTriggerProperties as O,scrollbarStyles as k,setAriaOverlayTriggerProperties as A,ɵstateController as j}from"./core.js";import{SbbIconNameMixin as M}from"./icon.pure.js";import{__esDecorate as N,__runInitializers as P}from"tslib";import{property as F}from"lit/decorators.js";import{ref as I}from"lit/directives/ref.js";import{SbbDividerElement as L}from"./divider.pure.js";var R=`:host{--sbb-menu-action-cursor:var(--sbb-cursor-pointer);display:block;outline:none!important}@media (any-hover:hover){:host(:is(:hover:not([disabled],:disabled,[disabled-interactive]),[aria-expanded=true])){--sbb-menu-background-color:light-dark(var(--sbb-color-iron),var(--sbb-color-milk));--sbb-menu-action-forced-color-border-color:Highlight}}:host(:is([disabled],:disabled,[disabled-interactive])){--sbb-menu-action-cursor:var(--sbb-cursor-default);--sbb-menu-action-color:light-dark(var(--sbb-color-graphite),var(--sbb-color-granite));--sbb-menu-action-forced-color-border-color:GrayText;pointer-events:none;cursor:var(--sbb-cursor-default)}@media (forced-colors:active){:host(:is([disabled],:disabled,[disabled-interactive])){--sbb-menu-action-color:GrayText}}:host(:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])){--sbb-menu-action-cursor:var(--sbb-cursor-default)}@media (forced-colors:active){:host(:is(:state(button),[state--button])){--sbb-menu-action-color:ButtonText}}:host([sbb-badge]:not(:is(:state(has-icon-name),[state--has-icon-name]),:is(:state(slotted-icon),[state--slotted-icon]))):after{translate:50% -50%;inset:50% calc(100% - var(--sbb-menu-action-outer-horizontal-padding) - var(--sbb-menu-action-content-padding-inline) - .5 * var(--sbb-size-icon-ui-small)) auto auto!important}:host([sbb-badge]:is(:is(:state(has-icon-name),[state--has-icon-name]),:is(:state(slotted-icon),[state--slotted-icon]))):after{inset:calc(var(--sbb-menu-action-outer-vertical-padding) + var(--sbb-menu-action-content-padding-block) + var(--sbb-badge-position-offset)) calc(100% - var(--sbb-menu-action-outer-horizontal-padding) - var(--sbb-menu-action-content-padding-inline) - var(--sbb-size-icon-ui-small) + var(--sbb-badge-position-offset)) auto auto!important}:host([aria-controls]){--sbb-menu-action-submenu-icon-display:flex}:is(.sbb-menu-button,.sbb-menu-link){width:100%;color:var(--sbb-menu-action-color);padding:var(--sbb-menu-action-outer-vertical-padding) var(--sbb-menu-action-outer-horizontal-padding);cursor:var(--sbb-menu-action-cursor);outline:none;text-decoration:none;display:block}.sbb-menu-action__content{align-items:center;gap:var(--sbb-menu-action-gap);padding:var(--sbb-menu-action-content-padding-block) var(--sbb-menu-action-content-padding-inline);border-radius:var(--sbb-menu-action-border-radius);user-select:none;-webkit-tap-highlight-color:transparent;background-color:var(--sbb-menu-background-color);line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-letter-spacing-text);font-size:var(--sbb-text-font-size-xs);display:flex}:host(:focus-visible) .sbb-menu-action__content,:focus-visible .sbb-menu-action__content{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width)}@media (forced-colors:active){.sbb-menu-action__content{border:var(--sbb-border-width-2x) solid var(--sbb-menu-action-forced-color-border-color)}}.sbb-menu-action__icon,.sbb-menu-submenu__icon{min-width:var(--sbb-size-icon-ui-small);min-height:var(--sbb-size-icon-ui-small);display:flex}.sbb-menu-submenu__icon{display:var(--sbb-menu-action-submenu-icon-display,none);margin-inline-start:auto}.sbb-menu-action__label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host(:is([disabled],:disabled,[disabled-interactive])) .sbb-menu-action__label{text-decoration:line-through}
1
+ import{html as e,isServer as t,unsafeCSS as n}from"lit";import{SbbButtonBaseElement as r,SbbDarkModeController as i,SbbDisabledInteractiveMixin as a,SbbDisabledMixin as o,SbbDisabledTabIndexActionMixin as s,SbbEscapableOverlayController as c,SbbFocusTrapController as l,SbbInertController as u,SbbLanguageController as d,SbbLinkBaseElement as f,SbbMediaMatcherController as p,SbbMediaQueryBreakpointSmallAndBelow as m,SbbOpenCloseBaseElement as h,SbbScrollController as g,forwardEvent as _,getElementPosition as v,getElementPositionHorizontal as y,getNextElementIndex as b,i18nGoBack as x,idReference as S,interactivityChecker as C,isArrowKeyOrPageKeysPressed as w,isEventOnElement as T,isZeroAnimationDuration as E,popoverResetStyles as D,removeAriaOverlayTriggerProperties as O,scrollbarStyles as k,setAriaOverlayTriggerProperties as A,ɵstateController as j}from"./core.js";import{SbbIconNameMixin as M}from"./icon.pure.js";import{__esDecorate as N,__runInitializers as P}from"tslib";import{property as F}from"lit/decorators.js";import{ref as I}from"lit/directives/ref.js";import{SbbDividerElement as L}from"./divider.pure.js";var R=`:host{--sbb-menu-action-cursor:var(--sbb-cursor-pointer);display:block;outline:none!important}@media (any-hover:hover){:host(:is(:hover:not([disabled],:disabled,[disabled-interactive]),[aria-expanded=true])){--sbb-menu-background-color:light-dark(var(--sbb-color-iron),var(--sbb-color-milk));--sbb-menu-action-forced-color-border-color:Highlight}}:host(:is([disabled],:disabled,[disabled-interactive])){--sbb-menu-action-cursor:var(--sbb-cursor-default);--sbb-menu-action-color:light-dark(var(--sbb-color-graphite),var(--sbb-color-granite));--sbb-menu-action-forced-color-border-color:GrayText;pointer-events:none;cursor:var(--sbb-cursor-default)}@media (forced-colors:active){:host(:is([disabled],:disabled,[disabled-interactive])){--sbb-menu-action-color:GrayText}}:host(:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])){--sbb-menu-action-cursor:var(--sbb-cursor-default)}@media (forced-colors:active){:host(:is(:state(button),[state--button])){--sbb-menu-action-color:ButtonText}}:host([sbb-badge]:not(:is(:state(has-icon-name),[state--has-icon-name]),:is(:state(slotted-icon),[state--slotted-icon]))):after{translate:50% -50%;inset:50% calc(100% - var(--sbb-menu-action-outer-horizontal-padding) - var(--sbb-menu-action-content-padding-inline) - .5 * var(--sbb-size-icon-ui-small)) auto auto!important}:host([sbb-badge]:is(:is(:state(has-icon-name),[state--has-icon-name]),:is(:state(slotted-icon),[state--slotted-icon]))):after{inset:calc(var(--sbb-menu-action-outer-vertical-padding) + var(--sbb-menu-action-content-padding-block) + var(--sbb-badge-position-offset)) calc(100% - var(--sbb-menu-action-outer-horizontal-padding) - var(--sbb-menu-action-content-padding-inline) - var(--sbb-size-icon-ui-small) + var(--sbb-badge-position-offset)) auto auto!important}:host([aria-controls]){--sbb-menu-action-submenu-icon-display:flex}:is(.sbb-menu-button,.sbb-menu-link){width:100%;color:var(--sbb-menu-action-color);padding:var(--sbb-menu-action-outer-vertical-padding) var(--sbb-menu-action-outer-horizontal-padding);cursor:var(--sbb-menu-action-cursor);outline:none;text-decoration:none;display:block}.sbb-menu-action__content{align-items:center;gap:var(--sbb-menu-action-gap);padding:var(--sbb-menu-action-content-padding-block) var(--sbb-menu-action-content-padding-inline);border-radius:var(--sbb-menu-action-border-radius);user-select:none;-webkit-tap-highlight-color:transparent;background-color:var(--sbb-menu-background-color);line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-letter-spacing-text);font-size:var(--sbb-text-font-size-xs);display:flex}:host(:focus-visible) .sbb-menu-action__content,:focus-visible .sbb-menu-action__content{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width)}@media (forced-colors:active){.sbb-menu-action__content{border:var(--sbb-border-width-2x) solid var(--sbb-menu-action-forced-color-border-color)}}.sbb-menu-action__icon,.sbb-menu-submenu__icon{min-width:var(--sbb-size-icon-ui-small);min-height:var(--sbb-size-icon-ui-small);display:flex}.sbb-menu-submenu__icon{display:var(--sbb-menu-action-submenu-icon-display,none);margin-inline-start:auto}.sbb-menu-action__label{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host(:is([disabled],:disabled,[disabled-interactive])) .sbb-menu-action__label{text-decoration:line-through}
2
2
  `;const z=t=>{class r extends M(o(t)){static{this.styles=[n(R)]}renderTemplate(){return e`
3
3
  <span class="sbb-menu-action__content">
4
4
  <span class="sbb-menu-action__icon"> ${super.renderIconSlot()} </span>
@@ -10,7 +10,7 @@ import{html as e,isServer as t,unsafeCSS as n}from"lit";import{SbbButtonBaseElem
10
10
  </span>
11
11
  </span>
12
12
  `}}return r};var B=class extends s(z(r)){static{this.elementName=`sbb-menu-button`}static{this.role=`menuitem`}},V=class extends a(z(f)){constructor(){super(...arguments),this.anchorRole=`menuitem`}static{this.elementName=`sbb-menu-link`}},H=`:host{--sbb-menu-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-6x));--sbb-focus-outline-color:var(--sbb-focus-outline-color-dark);--_sbb-menu-inset:0 auto auto 0;display:contents}@media (width>=64rem){:host{--sbb-menu-back-button-display:none}}:host(:is(:is(:state(state-opened),[state--state-opened]),:is(:state(state-opening),[state--state-opening]))){--sbb-menu-visibility:visible;--sbb-menu-backdrop-color:color-mix(in srgb, var(--sbb-color-black) 20%, transparent)}@media (width>=64rem){:host(:is(:is(:state(state-opened),[state--state-opened]),:is(:state(state-opening),[state--state-opening]))){--sbb-menu-backdrop-color:transparent}}:host(:not(:is(:state(nested),[state--nested]))){--sbb-menu-back-button-display:none}:host(:not(:is(:state(state-closed),[state--state-closed]))){--_sbb-menu-inset:0}:host(:is(:state(dark),[state--dark])) .sbb-scrollbar-negative{--sbb-focus-outline-color:var(--sbb-focus-outline-color-default);--sbb-scrollbar-color:color-mix(in srgb, var(--sbb-color-black) 30%, transparent);--sbb-scrollbar-color-hover:color-mix(in srgb, var(--sbb-color-black) 60%, transparent)}@media (width<=63.9375rem){:host(:is(:state(skip-animation),[state--skip-animation])){--sbb-menu-animation-duration:0s}:host(:is(:state(nested-child),[state--nested-child])){--sbb-menu-transform-x:-100%}:host(:is(:state(nested),[state--nested]):is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))){--sbb-menu-open-animation-name:open-sideways}:host(:is(:state(state-closing),[state--state-closing]):is(:state(nested),[state--nested]):not(:is(:state(close-all),[state--close-all]))){--sbb-menu-close-animation-name:close-sideways}}::slotted(:not(sbb-menu-button,sbb-menu-link,sbb-divider)){padding-inline:var(--sbb-spacing-fixed-5x);display:block}sbb-divider,::slotted(sbb-divider){--sbb-divider-color:var(--sbb-background-color-4-inverted);margin-block:var(--sbb-spacing-fixed-2x)}sbb-divider,#sbb-menu__back-button{display:var(--sbb-menu-back-button-display,block)}.sbb-menu__container{pointer-events:none;inset:var(--_sbb-menu-inset);height:var(--sbb-menu-container-height);z-index:var(--sbb-menu-z-index,var(--sbb-overlay-default-z-index));position:fixed}.sbb-menu__container:before{content:"";visibility:var(--sbb-menu-visibility,hidden);pointer-events:all;inset:var(--_sbb-menu-inset);height:var(--sbb-menu-container-height);background-color:var(--sbb-menu-backdrop-color,transparent);transition-duration:var(--sbb-menu-animation-duration);transition-timing-function:var(--sbb-menu-animation-easing);transition-property:background-color,visibility;position:fixed}:host(:is(:state(nested),[state--nested])) .sbb-menu__container:before{display:none}.sbb-menu{opacity:0;pointer-events:none;max-width:var(--sbb-menu-max-width);min-width:var(--sbb-menu-min-width);text-align:start;color:var(--sbb-menu-color);border-radius:var(--sbb-menu-border-radius) var(--sbb-menu-border-radius) 0 0;background-color:var(--sbb-menu-background-color);translate:var(--sbb-menu-transform-x,0) 0;transition:translate var(--sbb-menu-animation-duration);border:none;padding:0;display:none;position:absolute;inset-block-start:unset;inset-block-end:0;inset-inline-start:0;inset-inline-end:unset;overflow:hidden}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))) .sbb-menu{opacity:1;pointer-events:all;animation-name:var(--sbb-menu-open-animation-name,open);animation-duration:var(--sbb-menu-animation-duration);animation-timing-function:var(--sbb-menu-animation-easing);display:block}:host(:is(:state(state-closing),[state--state-closing])) .sbb-menu{pointer-events:none;animation-name:var(--sbb-menu-close-animation-name,close)}@media (forced-colors:active){.sbb-menu{outline:var(--sbb-border-width-1x) solid CanvasText}}@media (width>=64rem){.sbb-menu{top:0;bottom:unset;left:0;right:unset;border-radius:var(--sbb-menu-border-radius);max-height:fit-content}:host(:not(:is(:state(state-closed),[state--state-closed]))) .sbb-menu{top:var(--sbb-menu-position-y,0);left:var(--sbb-menu-position-x,0);max-height:var(--sbb-menu-max-height);min-height:var(--sbb-menu-min-height)}}.sbb-menu__content{max-height:var(--sbb-menu-max-height);padding-block:var(--sbb-spacing-fixed-1x);outline:none;overflow:auto}.sbb-menu__content:after{content:"";height:var(--sbb-spacing-fixed-8x);display:block}@media (width>=64rem){.sbb-menu__content{max-height:fit-content}:host(:not(:is(:state(state-closed),[state--state-closed]))) .sbb-menu__content{max-height:var(--sbb-menu-max-height);min-height:var(--sbb-menu-min-height)}.sbb-menu__content:after{display:none}}::slotted(:is(:is(:state(sbb-link),[state--sbb-link]),:is(:state(sbb-button),[state--sbb-button]))){color-scheme:light only}@keyframes open{0%{opacity:0;translate:0 var(--sbb-menu-transform-y,100%)}to{opacity:1;translate:0}}@keyframes close{0%{opacity:1;translate:0}to{opacity:0;translate:0 var(--sbb-menu-transform-y,100%)}}@keyframes open-sideways{0%{translate:100%}to{translate:0}}@keyframes close-sideways{0%{translate:0}to{translate:100%}}
13
- `;const U=[`A`,`BUTTON`,`SBB-BUTTON`,`SBB-BUTTON-LINK`,`SBB-LINK`,`SBB-BLOCK-LINK`,`SBB-LINK-BUTTON`,`SBB-BLOCK-LINK-BUTTON`,`SBB-MENU-BUTTON`,`SBB-MENU-LINK`];let W=(()=>{let r=h,a,o=[],s=[];return class extends r{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;a=[S(),F()],N(this,null,a,{kind:`accessor`,name:`trigger`,static:!1,private:!1,access:{has:e=>`trigger`in e,get:e=>e.trigger,set:(e,t)=>{e.trigger=t}},metadata:e},o,s),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementName=`sbb-menu`}static{this.elementDependencies=[L,B]}static{this.styles=[D,k,n(H)]}static{this.role=`menu`}#e;get trigger(){return this.#e}set trigger(e){this.#e=e}constructor(){super(),this.#e=P(this,o,null),this._menu=P(this,s),this._triggerElement=null,this._isPointerDownEventOnMenu=!1,this._escapableOverlayController=new c(this),this._focusTrapController=new l(this),this._scrollHandler=new g,this._inertController=new u(this),this._mobileBreakpoint=m,this._mediaMatcher=new p(this,{[this._mobileBreakpoint]:e=>{e&&(this.state===`opening`||this.state===`opened`)?this._scrollHandler.disableScroll():this._scrollHandler.enableScroll()}}),this._darkModeController=new i(this,()=>this._syncNegative()),this._language=new d(this),this._nestedMenu=null,this._pointerDownListener=e=>{let t=e.target.closest(`sbb-menu`);this._isPointerDownEventOnMenu=T(this._menu,e)||this._nestedMenus().some(e=>t===e)},this._closeOnBackdropClick=e=>{let t=e.target;!this._isPointerDownEventOnMenu&&!T(this._menu,e)&&!this._nestedMenus().some(e=>e===t)&&this.closeAll()},this.addEventListener?.(`keydown`,e=>this._handleKeyDown(e))}firstUpdated(e){super.firstUpdated(e),this._configureTrigger()}escapeStrategy(){this.closeAll()}open(){if(this.state!==`closing`&&this.state!==`opened`&&this._menu&&this.dispatchBeforeOpenEvent()){if(this._isNested()){let e=this._parentMenu();e.internals.states.add(`nested-child`),e._nestedMenu!==this&&e._nestedMenu?.close(),e._nestedMenu=this}this.showPopover?.(),this.state=`opening`,this._setMenuPosition(),this._triggerElement&&(this._triggerElement.ariaExpanded=`true`),this._isMobile()&&this._scrollHandler.disableScroll(),this._isZeroAnimationDuration()&&this._handleOpening()}}close(){this._close()}closeAll(){this._mainMenu()._close(!0)}_close(e=!1){if((this.state!==`opening`||this._isNested())&&this.dispatchBeforeCloseEvent()){if(this._nestedMenu?._close(e),this._isNested()){let t=this._parentMenu();e?(this.internals.states.add(`close-all`),t.internals.states.add(`skip-animation`)):(this.internals.states.delete(`close-all`),t.internals.states.delete(`skip-animation`)),t.internals.states.delete(`nested-child`),t._nestedMenu=null}this.state=`closing`,this._triggerElement&&(this._triggerElement.ariaExpanded=`false`),this._isZeroAnimationDuration()&&this._handleClosing()}}_isZeroAnimationDuration(){return E(this,`--sbb-menu-animation-duration`)}_handleOpening(){this.state=`opened`,this._isNested()?this._updateNestedInert():this._inertController.activate(),this._escapableOverlayController.connect(),this._focusTrapController.focusInitialElement(),this._focusTrapController.enabled=!0,this._attachWindowEvents(),this.dispatchOpenEvent()}_handleClosing(){this.state=`closed`,this.internals.states.delete(`skip-animation`),this.internals.states.delete(`close-all`),this.hidePopover?.(),this._menu?.firstElementChild?.scrollTo(0,0),this._isNested()?this._updateNestedInert():this._inertController.deactivate(),this._triggerElement?.focus({preventScroll:[`sbb-header-button`,`sbb-header-link`].includes(this._triggerElement.localName)}),this._escapableOverlayController.disconnect(),this.dispatchCloseEvent(),this._windowEventsController?.abort(),this._focusTrapController.enabled=!1,this._scrollHandler.enableScroll()}_handleKeyDown(e){if(!w(e))return;e.preventDefault();let t=Array.from(this.querySelectorAll(`sbb-menu-button, sbb-menu-link`)).concat(this.shadowRoot.querySelector(`sbb-menu-button`)).filter(e=>(!e.disabled||e.disabledInteractive)&&C.isVisible(e)),n=t.findIndex(t=>t===e.target),r;switch(e.key){case`ArrowUp`:case`ArrowDown`:r=b(e,n,t.length);break;case`ArrowLeft`:this._isNested()&&this.close();break;case`ArrowRight`:e.target.matches(`:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])`)&&e.target.click();break;case`PageUp`:case`Home`:r=0;break;case`End`:case`PageDown`:r=t.length-1}r!==void 0&&t[r].focus()}createRenderRoot(){let e=super.createRenderRoot();return this.shadowRoot?.addEventListener(`slotchange`,()=>this._syncNegative(),{capture:!0}),e}connectedCallback(){this.popover=`manual`,super.connectedCallback(),this.hasUpdated&&this._configureTrigger()}disconnectedCallback(){super.disconnectedCallback(),this._triggerElement=null,this._triggerAbortController?.abort(),this._windowEventsController?.abort(),this._scrollHandler.enableScroll()}requestUpdate(e,n,r){super.requestUpdate(e,n,r),!t&&(!e||e===`trigger`)&&this.hasUpdated&&this._configureTrigger()}_configureTrigger(){this.trigger!==this._triggerElement&&(this._triggerAbortController?.abort(),O(this._triggerElement),this._triggerElement=this.trigger,this._triggerElement&&(A(this,this._triggerElement,`menu`,this.state),this._triggerAbortController=new AbortController,this._triggerElement.addEventListener(`click`,()=>this.open(),{signal:this._triggerAbortController.signal}),this.toggleState(`nested`,[`sbb-menu-button`,`sbb-menu-link`].includes(this._triggerElement.localName)),j(this._triggerElement).add(`sbb-menu-trigger`)))}_attachWindowEvents(){this._windowEventsController=new AbortController,document.addEventListener(`scroll`,()=>this._setMenuPosition(),{passive:!0,signal:this._windowEventsController.signal,capture:!0}),window.addEventListener(`resize`,()=>this._setMenuPosition(),{passive:!0,signal:this._windowEventsController.signal}),this._isNested()||(window.addEventListener(`pointerdown`,this._pointerDownListener,{signal:this._windowEventsController.signal}),window.addEventListener(`pointerup`,this._closeOnBackdropClick,{signal:this._windowEventsController.signal}))}_interactiveElementClick(e){let t=e.target;U.includes(t.nodeName)&&!t.hasAttribute(`disabled`)&&!t.matches(`:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])`)&&t.id!==`sbb-menu__back-button`&&this.closeAll()}_nestedMenus(){let e=[],t=this._nestedMenu;for(;t;)e.push(t),t=t._nestedMenu;return e}_parentMenu(){return this._triggerElement?.closest(`sbb-menu`)??null}_mainMenu(){return this._isNested()?this._parentMenu()?._mainMenu()??this:this}_isNested(){return!!this._parentMenu()}_updateNestedInert(){this._inertController.restoreAllExempted(),this._mainMenu()._nestedMenus().forEach(e=>this._inertController.exempt(e))}_handleMouseOver(e){let t=e.target,n=this._isMobile();!n&&this._nestedMenu&&!t.classList.contains(`sbb-menu__content`)&&t.ariaExpanded!==`true`&&this._nestedMenu.close(),t.matches(`:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])`)&&!n&&t.click()}_onMenuAnimationEnd(e){(e.animationName===`open`||e.animationName===`open-sideways`)&&this.state===`opening`?this._handleOpening():(e.animationName===`close`||e.animationName===`close-sideways`)&&this.state===`closing`&&this._handleClosing()}_setMenuPosition(){if(this._isMobile()||!this._menu||!this._triggerElement||this.state===`closing`)return;let e=this._isNested()?y(this.shadowRoot.querySelector(`.sbb-menu__content`),this._triggerElement,this.shadowRoot.querySelector(`.sbb-menu__container`),{horizontalOffset:8,verticalOffset:-4,contentSelector:`.sbb-menu__content`}):v(this.shadowRoot.querySelector(`.sbb-menu__content`),this._triggerElement,this.shadowRoot.querySelector(`.sbb-menu__container`),{verticalOffset:8});this.style.setProperty(`--sbb-menu-position-x`,`${e.left}px`),this.style.setProperty(`--sbb-menu-position-y`,`${e.top}px`),this.style.setProperty(`--sbb-menu-max-height`,e.maxHeight)}_syncNegative(){this.querySelectorAll(`:is(:state(sbb-link),[state--sbb-link]), :is(:state(sbb-button),[state--sbb-button])`)?.forEach(e=>{customElements.upgrade(e),e.negative=!this._darkModeController.matches()})}_isMobile(){return this._mediaMatcher.matches(this._mobileBreakpoint)??!0}render(){return e`
13
+ `;const U=[`A`,`BUTTON`,`SBB-BUTTON`,`SBB-BUTTON-LINK`,`SBB-LINK`,`SBB-BLOCK-LINK`,`SBB-LINK-BUTTON`,`SBB-BLOCK-LINK-BUTTON`,`SBB-MENU-BUTTON`,`SBB-MENU-LINK`];let W=(()=>{let r=h,a,o=[],s=[];return class extends r{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;a=[S(),F()],N(this,null,a,{kind:`accessor`,name:`trigger`,static:!1,private:!1,access:{has:e=>`trigger`in e,get:e=>e.trigger,set:(e,t)=>{e.trigger=t}},metadata:e},o,s),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementName=`sbb-menu`}static{this.elementDependencies=[L,B]}static{this.styles=[D,k,n(H)]}static{this.role=`menu`}#e;get trigger(){return this.#e}set trigger(e){this.#e=e}constructor(){super(),this.#e=P(this,o,null),this._menu=P(this,s),this._triggerElement=null,this._isPointerDownEventOnMenu=!1,this._escapableOverlayController=new c(this),this._focusTrapController=new l(this),this._scrollHandler=new g(this),this._inertController=new u(this),this._mobileBreakpoint=m,this._mediaMatcher=new p(this,{[this._mobileBreakpoint]:e=>{e&&(this.state===`opening`||this.state===`opened`)?this._scrollHandler.disableScroll():this._scrollHandler.enableScroll()}}),this._darkModeController=new i(this,()=>this._syncNegative()),this._language=new d(this),this._nestedMenu=null,this._pointerDownListener=e=>{let t=e.target.closest(`sbb-menu`);this._isPointerDownEventOnMenu=T(this._menu,e)||this._nestedMenus().some(e=>t===e)},this._closeOnBackdropClick=e=>{let t=e.target;!this._isPointerDownEventOnMenu&&!T(this._menu,e)&&!this._nestedMenus().some(e=>e===t)&&this.closeAll()},this.addEventListener?.(`keydown`,e=>this._handleKeyDown(e))}firstUpdated(e){super.firstUpdated(e),this._configureTrigger()}escapeStrategy(){this.closeAll()}open(){if(this.state!==`closing`&&this.state!==`opened`&&this._menu&&this.dispatchBeforeOpenEvent()){if(this._isNested()){let e=this._parentMenu();e.internals.states.add(`nested-child`),e._nestedMenu!==this&&e._nestedMenu?.close(),e._nestedMenu=this}this.showPopover?.(),this.state=`opening`,this._setMenuPosition(),this._triggerElement&&(this._triggerElement.ariaExpanded=`true`),this._isMobile()&&this._scrollHandler.disableScroll(),this._isZeroAnimationDuration()&&this._handleOpening()}}close(){this._close()}closeAll(){this._mainMenu()._close(!0)}_close(e=!1){if((this.state!==`opening`||this._isNested())&&this.dispatchBeforeCloseEvent()){if(this._nestedMenu?._close(e),this._isNested()){let t=this._parentMenu();e?(this.internals.states.add(`close-all`),t.internals.states.add(`skip-animation`)):(this.internals.states.delete(`close-all`),t.internals.states.delete(`skip-animation`)),t.internals.states.delete(`nested-child`),t._nestedMenu=null}this.state=`closing`,this._triggerElement&&(this._triggerElement.ariaExpanded=`false`),this._isZeroAnimationDuration()&&this._handleClosing()}}_isZeroAnimationDuration(){return E(this,`--sbb-menu-animation-duration`)}_handleOpening(){this.state=`opened`,this._isNested()?this._updateNestedInert():this._inertController.activate(),this._escapableOverlayController.connect(),this._focusTrapController.focusInitialElement(),this._focusTrapController.enabled=!0,this._attachWindowEvents(),this.dispatchOpenEvent()}_handleClosing(){this.state=`closed`,this.internals.states.delete(`skip-animation`),this.internals.states.delete(`close-all`),this.hidePopover?.(),this._menu?.firstElementChild?.scrollTo(0,0),this._isNested()?this._updateNestedInert():this._inertController.deactivate(),this._triggerElement?.focus({preventScroll:[`sbb-header-button`,`sbb-header-link`].includes(this._triggerElement.localName)}),this._escapableOverlayController.disconnect(),this.dispatchCloseEvent(),this._windowEventsController?.abort(),this._focusTrapController.enabled=!1,this._scrollHandler.enableScroll()}_handleKeyDown(e){if(!w(e))return;e.preventDefault();let t=Array.from(this.querySelectorAll(`sbb-menu-button, sbb-menu-link`)).concat(this.shadowRoot.querySelector(`sbb-menu-button`)).filter(e=>(!e.disabled||e.disabledInteractive)&&C.isVisible(e)),n=t.findIndex(t=>t===e.target),r;switch(e.key){case`ArrowUp`:case`ArrowDown`:r=b(e,n,t.length);break;case`ArrowLeft`:this._isNested()&&this.close();break;case`ArrowRight`:e.target.matches(`:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])`)&&e.target.click();break;case`PageUp`:case`Home`:r=0;break;case`End`:case`PageDown`:r=t.length-1}r!==void 0&&t[r].focus()}createRenderRoot(){let e=super.createRenderRoot();return this.shadowRoot?.addEventListener(`slotchange`,()=>this._syncNegative(),{capture:!0}),e}connectedCallback(){this.popover=`manual`,super.connectedCallback(),this.hasUpdated&&this._configureTrigger()}disconnectedCallback(){super.disconnectedCallback(),this._triggerElement=null,this._triggerAbortController?.abort(),this._windowEventsController?.abort(),this._scrollHandler.enableScroll()}requestUpdate(e,n,r){super.requestUpdate(e,n,r),!t&&(!e||e===`trigger`)&&this.hasUpdated&&this._configureTrigger()}_configureTrigger(){this.trigger!==this._triggerElement&&(this._triggerAbortController?.abort(),O(this._triggerElement),this._triggerElement=this.trigger,this._triggerElement&&(A(this,this._triggerElement,`menu`,this.state),this._triggerAbortController=new AbortController,this._triggerElement.addEventListener(`click`,()=>this.open(),{signal:this._triggerAbortController.signal}),this.toggleState(`nested`,[`sbb-menu-button`,`sbb-menu-link`].includes(this._triggerElement.localName)),j(this._triggerElement).add(`sbb-menu-trigger`)))}_attachWindowEvents(){this._windowEventsController=new AbortController,document.addEventListener(`scroll`,()=>this._setMenuPosition(),{passive:!0,signal:this._windowEventsController.signal,capture:!0}),window.addEventListener(`resize`,()=>this._setMenuPosition(),{passive:!0,signal:this._windowEventsController.signal}),this._isNested()||(window.addEventListener(`pointerdown`,this._pointerDownListener,{signal:this._windowEventsController.signal}),window.addEventListener(`pointerup`,this._closeOnBackdropClick,{signal:this._windowEventsController.signal}))}_interactiveElementClick(e){let t=e.target;U.includes(t.nodeName)&&!t.hasAttribute(`disabled`)&&!t.matches(`:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])`)&&t.id!==`sbb-menu__back-button`&&this.closeAll()}_nestedMenus(){let e=[],t=this._nestedMenu;for(;t;)e.push(t),t=t._nestedMenu;return e}_parentMenu(){return this._triggerElement?.closest(`sbb-menu`)??null}_mainMenu(){return this._isNested()?this._parentMenu()?._mainMenu()??this:this}_isNested(){return!!this._parentMenu()}_updateNestedInert(){this._inertController.restoreAllExempted(),this._mainMenu()._nestedMenus().forEach(e=>this._inertController.exempt(e))}_handleMouseOver(e){let t=e.target,n=this._isMobile();!n&&this._nestedMenu&&!t.classList.contains(`sbb-menu__content`)&&t.ariaExpanded!==`true`&&this._nestedMenu.close(),t.matches(`:is(:state(sbb-menu-trigger),[state--sbb-menu-trigger])`)&&!n&&t.click()}_onMenuAnimationEnd(e){(e.animationName===`open`||e.animationName===`open-sideways`)&&this.state===`opening`?this._handleOpening():(e.animationName===`close`||e.animationName===`close-sideways`)&&this.state===`closing`&&this._handleClosing()}_setMenuPosition(){if(this._isMobile()||!this._menu||!this._triggerElement||this.state===`closing`)return;let e=this._isNested()?y(this.shadowRoot.querySelector(`.sbb-menu__content`),this._triggerElement,this.shadowRoot.querySelector(`.sbb-menu__container`),{horizontalOffset:8,verticalOffset:-4,contentSelector:`.sbb-menu__content`}):v(this.shadowRoot.querySelector(`.sbb-menu__content`),this._triggerElement,this.shadowRoot.querySelector(`.sbb-menu__container`),{verticalOffset:8});this.style.setProperty(`--sbb-menu-position-x`,`${e.left}px`),this.style.setProperty(`--sbb-menu-position-y`,`${e.top}px`),this.style.setProperty(`--sbb-menu-max-height`,e.maxHeight)}_syncNegative(){this.querySelectorAll(`:is(:state(sbb-link),[state--sbb-link]), :is(:state(sbb-button),[state--sbb-button])`)?.forEach(e=>{customElements.upgrade(e),e.negative=!this._darkModeController.matches()})}_isMobile(){return this._mediaMatcher.matches(this._mobileBreakpoint)??!0}render(){return e`
14
14
  <div class="sbb-menu__container">
15
15
  <div
16
16
  @animationend=${this._onMenuAnimationEnd}
@@ -1,4 +1,4 @@
1
- import{html as e,isServer as t,nothing as n,unsafeCSS as r}from"lit";import{html as i}from"lit/static-html.js";import{IS_FOCUSABLE_QUERY as a,SbbButtonBaseElement as o,SbbDisabledMixin as s,SbbElement as c,SbbEscapableOverlayController as l,SbbFocusTrapController as u,SbbInertController as d,SbbLanguageController as f,SbbLinkBaseElement as p,SbbMediaMatcherController as m,SbbMediaQueryBreakpointSmallAndBelow as h,SbbNamedSlotListMixin as g,SbbOpenCloseBaseElement as _,SbbPropertyWatcherController as v,SbbScrollHandler as y,SbbUpdateSchedulerMixin as b,forceType as x,i18nCloseNavigation as S,i18nGoBack as C,idReference as w,isEventOnElement as T,isZeroAnimationDuration as E,omitEmptyConverter as D,popoverResetStyles as O,removeAriaOverlayTriggerProperties as k,sbbInputModalityDetector as A,scrollbarStyles as j,setAriaOverlayTriggerProperties as M,ɵstateController as N}from"./core.js";import{SbbIconElement as P}from"./icon.pure.js";import{__esDecorate as F,__runInitializers as I}from"tslib";import{property as L,state as R}from"lit/decorators.js";import{ResizeController as z}from"@lit-labs/observers/resize-controller.js";import{SbbTransparentButtonElement as B}from"./button.pure.js";import{ref as V}from"lit/directives/ref.js";var H=`:host{--_sbb-navigation-action-inset-inline-start:calc((var(--sbb-size-icon-ui-small) + var(--sbb-spacing-fixed-1x)) * -1);--_sbb-navigation-action-inset-block-start:calc(1em * (var(--sbb-typo-line-height-text) / 2));--sbb-navigation-action-transition-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-3x));--sbb-navigation-cursor:var(--sbb-cursor-pointer);--sbb-navigation-text-decoration:none;display:block;outline:none!important}:host(:is(:state(section-action),[state--section-action]):is(:state(action-active),[state--action-active]).sbb-active){--sbb-navigation-action-icon-display:block}:host(:is(:state(action-active),[state--action-active])){--sbb-navigation-action-color:var(--sbb-color-5)}@media (forced-colors:active){:host(:is(:state(action-active),[state--action-active])){--sbb-navigation-action-color:Highlight}}sbb-icon{display:var(--sbb-navigation-action-icon-display);position:absolute;inset-block-start:var(--_sbb-navigation-action-inset-block-start);inset-inline-start:var(--_sbb-navigation-action-inset-inline-start);translate:0 -50%}@media (any-hover:hover){:host(:hover){--sbb-navigation-action-color:var(--sbb-color-5)}}@media (forced-colors:active){:host(:is(:state(button),[state--button])){--sbb-navigation-action-color:ButtonText}}:host(:is(:is(:state(size-s),[state--size-s]),:is(:state(size-m),[state--size-m]))){--sbb-navigation-action-line-height:var(--sbb-typo-line-height-text);--sbb-navigation-action-letter-spacing:var(--sbb-letter-spacing-text)}:host(:is(:state(size-s),[state--size-s])){--sbb-navigation-action-font-size:var(--sbb-text-font-size-xxs)}:host(:is(:state(size-m),[state--size-m])){--sbb-navigation-action-font-size:var(--sbb-text-font-size-s)}:is(.sbb-navigation-button,.sbb-navigation-link){color:var(--sbb-navigation-action-color);cursor:var(--sbb-navigation-cursor);transition:color var(--sbb-navigation-action-transition-duration) ease;text-align:left;font-size:var(--sbb-navigation-action-font-size);line-height:var(--sbb-navigation-action-line-height);letter-spacing:var(--sbb-navigation-action-letter-spacing);hyphens:auto;text-decoration:var(--sbb-navigation-text-decoration);user-select:none;-webkit-tap-highlight-color:transparent;outline:none;font-weight:700;display:flex;position:relative}@media (forced-colors:active){:is(.sbb-navigation-button,.sbb-navigation-link){transition:none}}:host(:focus-visible) :is(.sbb-navigation-button,.sbb-navigation-link),:is(.sbb-navigation-button,.sbb-navigation-link):focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width);border-radius:calc(var(--sbb-border-radius-4x) - var(--sbb-focus-outline-offset))}:host(:is(:disabled,[disabled])){--sbb-navigation-action-color:var(--sbb-color-5);--sbb-navigation-cursor:unset;--sbb-navigation-text-decoration:line-through}
1
+ import{html as e,isServer as t,nothing as n,unsafeCSS as r}from"lit";import{html as i}from"lit/static-html.js";import{IS_FOCUSABLE_QUERY as a,SbbButtonBaseElement as o,SbbDisabledMixin as s,SbbElement as c,SbbEscapableOverlayController as l,SbbFocusTrapController as u,SbbInertController as d,SbbLanguageController as f,SbbLinkBaseElement as p,SbbMediaMatcherController as m,SbbMediaQueryBreakpointSmallAndBelow as h,SbbNamedSlotListMixin as g,SbbOpenCloseBaseElement as _,SbbPropertyWatcherController as v,SbbScrollController as y,SbbUpdateSchedulerMixin as b,forceType as x,i18nCloseNavigation as S,i18nGoBack as C,idReference as w,isEventOnElement as T,isZeroAnimationDuration as E,omitEmptyConverter as D,popoverResetStyles as O,removeAriaOverlayTriggerProperties as k,sbbInputModalityDetector as A,scrollbarStyles as j,setAriaOverlayTriggerProperties as M,ɵstateController as N}from"./core.js";import{SbbIconElement as P}from"./icon.pure.js";import{__esDecorate as F,__runInitializers as I}from"tslib";import{property as L,state as R}from"lit/decorators.js";import{ResizeController as z}from"@lit-labs/observers/resize-controller.js";import{SbbTransparentButtonElement as B}from"./button.pure.js";import{ref as V}from"lit/directives/ref.js";var H=`:host{--_sbb-navigation-action-inset-inline-start:calc((var(--sbb-size-icon-ui-small) + var(--sbb-spacing-fixed-1x)) * -1);--_sbb-navigation-action-inset-block-start:calc(1em * (var(--sbb-typo-line-height-text) / 2));--sbb-navigation-action-transition-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-3x));--sbb-navigation-cursor:var(--sbb-cursor-pointer);--sbb-navigation-text-decoration:none;display:block;outline:none!important}:host(:is(:state(section-action),[state--section-action]):is(:state(action-active),[state--action-active]).sbb-active){--sbb-navigation-action-icon-display:block}:host(:is(:state(action-active),[state--action-active])){--sbb-navigation-action-color:var(--sbb-color-5)}@media (forced-colors:active){:host(:is(:state(action-active),[state--action-active])){--sbb-navigation-action-color:Highlight}}sbb-icon{display:var(--sbb-navigation-action-icon-display);position:absolute;inset-block-start:var(--_sbb-navigation-action-inset-block-start);inset-inline-start:var(--_sbb-navigation-action-inset-inline-start);translate:0 -50%}@media (any-hover:hover){:host(:hover){--sbb-navigation-action-color:var(--sbb-color-5)}}@media (forced-colors:active){:host(:is(:state(button),[state--button])){--sbb-navigation-action-color:ButtonText}}:host(:is(:is(:state(size-s),[state--size-s]),:is(:state(size-m),[state--size-m]))){--sbb-navigation-action-line-height:var(--sbb-typo-line-height-text);--sbb-navigation-action-letter-spacing:var(--sbb-letter-spacing-text)}:host(:is(:state(size-s),[state--size-s])){--sbb-navigation-action-font-size:var(--sbb-text-font-size-xxs)}:host(:is(:state(size-m),[state--size-m])){--sbb-navigation-action-font-size:var(--sbb-text-font-size-s)}:is(.sbb-navigation-button,.sbb-navigation-link){color:var(--sbb-navigation-action-color);cursor:var(--sbb-navigation-cursor);transition:color var(--sbb-navigation-action-transition-duration) ease;text-align:left;font-size:var(--sbb-navigation-action-font-size);line-height:var(--sbb-navigation-action-line-height);letter-spacing:var(--sbb-navigation-action-letter-spacing);hyphens:auto;text-decoration:var(--sbb-navigation-text-decoration);user-select:none;-webkit-tap-highlight-color:transparent;outline:none;font-weight:700;display:flex;position:relative}@media (forced-colors:active){:is(.sbb-navigation-button,.sbb-navigation-link){transition:none}}:host(:focus-visible) :is(.sbb-navigation-button,.sbb-navigation-link),:is(.sbb-navigation-button,.sbb-navigation-link):focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style,solid) var(--sbb-focus-outline-width);border-radius:calc(var(--sbb-border-radius-4x) - var(--sbb-focus-outline-offset))}:host(:is(:disabled,[disabled])){--sbb-navigation-action-color:var(--sbb-color-5);--sbb-navigation-cursor:unset;--sbb-navigation-text-decoration:line-through}
2
2
  `;const U=e=>{class t extends s(e){static{this.elementDependencies=[P]}static{this.styles=[r(H)]}get marker(){return this._navigationMarker}get section(){return this._navigationSection}constructor(...e){super(...e),this._navigationMarker=null,this._navigationSection=null,this._size=`l`,this.addEventListener?.(`click`,()=>{!this.matches(`:is(:state(action-active),[state--action-active])`)&&this._navigationMarker&&!this.connectedSection&&this.marker?.select(this)}),this.addController(new v(this,()=>this.closest(`sbb-navigation-marker`),{size:e=>this._applySize(e.size)}))}connectedCallback(){super.connectedCallback(),this._navigationMarker=this.closest(`sbb-navigation-marker`),this._navigationSection=this.closest(`sbb-navigation-section`),this.toggleState(`section-action`,!!this._navigationSection),this.closest(`sbb-navigation-list`)&&this._applySize(`m`)}_applySize(e){this._size&&this.internals.states.delete(`size-${this._size}`),this._size=e,this._size&&this.internals.states.add(`size-${this._size}`)}renderTemplate(){return i`<sbb-icon name="dash-small"></sbb-icon> <slot></slot>`}}return t};var W=class extends U(o){static{this.elementName=`sbb-navigation-button`}},G=class extends U(p){static{this.elementName=`sbb-navigation-link`}},K=`:host{display:block}.sbb-navigation-list__content{align-items:flex-start;gap:var(--sbb-navigation-list-gap);margin-block:var(--sbb-navigation-list-margin-block);flex-direction:column;display:flex}.sbb-navigation-list__label{color:var(--sbb-color-5);font-weight:700;font-size:var(--sbb-navigation-list-font-size);letter-spacing:var(--sbb-letter-spacing-text);padding-block-end:var(--sbb-navigation-list-padding-block-end);display:block}:host(:not(:is(:state(slotted-label),[state--slotted-label]),[label])) .sbb-navigation-list__label{display:none}
3
3
  `;let q=(()=>{let t=g(c),n,i=[],a=[];return class extends t{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(t[Symbol.metadata]??null):void 0;n=[x(),L({reflect:!0,converter:D})],F(this,null,n,{kind:`accessor`,name:`label`,static:!1,private:!1,access:{has:e=>`label`in e,get:e=>e.label,set:(e,t)=>{e.label=t}},metadata:e},i,a),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementName=`sbb-navigation-list`}static{this.styles=[r(K)]}#e;get label(){return this.#e}set label(e){this.#e=e}render(){return e`
4
4
  <span class="sbb-navigation-list__label" id="sbb-navigation-link-label-id">
@@ -39,7 +39,7 @@ import{html as e,isServer as t,nothing as n,unsafeCSS as r}from"lit";import{html
39
39
  </nav>
40
40
  </div>
41
41
  `}}})();var Q=`:host{--sbb-navigation-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-3x));--sbb-focus-outline-color:var(--sbb-focus-outline-color-dark);inset:var(--sbb-navigation-inset);z-index:var(--sbb-navigation-z-index,var(--sbb-overlay-default-z-index));display:none;position:fixed;overflow:hidden}@media (width>=64rem){:host{--sbb-navigation-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-6x));--sbb-navigation-width:calc(100% + var(--sbb-layout-base-offset-responsive))}}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))){display:block}:host(:is(:state(state-opened),[state--state-opened])){--sbb-navigation-animation-easing:ease-out}:host(:is(:is(:state(state-opened),[state--state-opened]),:is(:state(state-opening),[state--state-opening]))){--sbb-navigation-backdrop-visibility:visible;--sbb-navigation-backdrop-pointer-events:all}:host(:not(:is(:state(state-closed),[state--state-closed]))){--sbb-navigation-inset:0;--sbb-navigation-translate:none}:host(:is(:state(state-closing),[state--state-closing])){--sbb-navigation-backdrop-animation-name:backdrop-close}:host(:is(:state(has-open-navigation-section),[state--has-open-navigation-section])){--sbb-navigation-content-translate:-100% 0}@media (width>=64rem){:host(:is(:state(has-open-navigation-section),[state--has-open-navigation-section])){--sbb-navigation-expanded-width:100dvw;--sbb-navigation-content-translate:0}}:host(:is(:state(resize-disable-animation),[state--resize-disable-animation])){--sbb-disable-animation-duration:0s}.sbb-navigation__container{gap:var(--sbb-grid-base-gutter-responsive);grid-template-columns:repeat(var(--sbb-grid-base-columns), 1fr);pointer-events:none;translate:var(--sbb-navigation-translate);padding-inline:0;display:grid}@media (width>=64rem){.sbb-navigation__container{padding-inline:var(--sbb-layout-base-offset-responsive)}.sbb-navigation__container:before{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);animation-name:var(--sbb-navigation-backdrop-animation-name);animation-duration:var(--sbb-navigation-animation-duration);animation-timing-function:var(--sbb-navigation-animation-easing);content:"";visibility:var(--sbb-navigation-backdrop-visibility,hidden);pointer-events:var(--sbb-navigation-backdrop-pointer-events,none);inset:var(--sbb-navigation-inset);background-color:var(--sbb-navigation-backdrop-color);transition-property:visibility;position:fixed}}.sbb-navigation{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);width:var(--sbb-navigation-width);grid-column:var(--sbb-navigation-grid-column);pointer-events:none;height:var(--sbb-navigation-height);color:var(--sbb-navigation-color);background-color:var(--sbb-navigation-background-color);border:none;margin:0;padding:0;transition-property:width;display:none;position:relative;inset-block-start:0;inset-inline-start:var(--sbb-navigation-inline-start,0)}.sbb-navigation:before{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);content:"";width:var(--sbb-navigation-expanded-width);height:var(--sbb-navigation-height);background-color:var(--sbb-navigation-background-color);transition-property:width;position:absolute}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))) .sbb-navigation{pointer-events:all;animation-name:open;animation-duration:var(--sbb-navigation-animation-duration);animation-timing-function:var(--sbb-navigation-animation-easing);display:block}:host(:is(:state(state-closing),[state--state-closing])) .sbb-navigation{pointer-events:none;animation-name:close}@media (forced-colors:active){.sbb-navigation{outline:var(--sbb-border-width-1x) solid CanvasText}}.sbb-navigation__wrapper{outline:none}.sbb-navigation__header{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);width:var(--sbb-navigation-expanded-width);pointer-events:none;padding:var(--sbb-spacing-responsive-xs);z-index:calc(var(--sbb-navigation-z-index,var(--sbb-overlay-default-z-index)) + 1);justify-content:flex-end;transition-property:width;display:flex;position:absolute}.sbb-navigation__close{pointer-events:all}.sbb-navigation__content{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);gap:var(--sbb-navigation-content-gap);height:var(--sbb-navigation-height);padding-inline:var(--sbb-navigation-padding-inline);padding-block:var(--sbb-navigation-padding-block-start) var(--sbb-navigation-padding-block-end);translate:var(--sbb-navigation-content-translate);flex-direction:column;transition-property:translate;display:flex;position:relative;overflow-y:auto}::slotted(:first-child){margin-block-start:var(--sbb-navigation-list-margin-block-start)}@keyframes open{0%{translate:-100%}to{translate:0}}@keyframes close{0%{translate:0}to{translate:-100%}}@keyframes backdrop-open{0%{background-color:#0000}}@keyframes backdrop-close{to{background-color:#0000}}
42
- `;let $=(()=>{let n=b(_),i,a=[],o=[],s,c=[],p=[],m,h=[],g=[];return class extends n{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;i=[w(),L()],s=[x(),L({attribute:`accessibility-close-label`})],m=[R()],F(this,null,i,{kind:`accessor`,name:`trigger`,static:!1,private:!1,access:{has:e=>`trigger`in e,get:e=>e.trigger,set:(e,t)=>{e.trigger=t}},metadata:e},a,o),F(this,null,s,{kind:`accessor`,name:`accessibilityCloseLabel`,static:!1,private:!1,access:{has:e=>`accessibilityCloseLabel`in e,get:e=>e.accessibilityCloseLabel,set:(e,t)=>{e.accessibilityCloseLabel=t}},metadata:e},c,p),F(this,null,m,{kind:`accessor`,name:`_activeNavigationSection`,static:!1,private:!1,access:{has:e=>`_activeNavigationSection`in e,get:e=>e._activeNavigationSection,set:(e,t)=>{e._activeNavigationSection=t}},metadata:e},h,g),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementName=`sbb-navigation`}static{this.elementDependencies=[B]}static{this.role=`navigation`}static{this.styles=[O,j,r(Q)]}#e;get trigger(){return this.#e}set trigger(e){this.#e=e}#t;get accessibilityCloseLabel(){return this.#t}set accessibilityCloseLabel(e){this.#t=e}#n;get _activeNavigationSection(){return this.#n}set _activeNavigationSection(e){this.#n=e}get activeNavigationSection(){return this._activeNavigationSection}get closeButton(){return this.shadowRoot?.querySelector(`#sbb-navigation-close-button`)??null}get navigationContent(){return this.shadowRoot?.querySelector(`.sbb-navigation__content`)??null}constructor(){super(),this.#e=I(this,a,null),this.#t=(I(this,o),I(this,c,``)),this.#n=(I(this,p),I(this,h,null)),this._navigation=I(this,g),this._triggerElement=null,this._language=new f(this),this._inertController=new d(this),this._escapableOverlayController=new l(this),this._focusTrapController=new u(this),this._scrollHandler=new y,this._isPointerDownEventOnNavigation=!1,this._resizeObserverTimeout=null,this._navigationResizeObserver=new z(this,{skipInitial:!0,callback:()=>this._onNavigationResize()}),this._pointerDownListener=e=>{this._isPointerDownEventOnNavigation=T(this._navigation,e)||T(this.querySelector(`sbb-navigation-section:is(:state(state-opened),[state--state-opened])`)?.shadowRoot?.querySelector(`nav.sbb-navigation-section`),e)},this._closeOnBackdropClick=e=>{!this._isPointerDownEventOnNavigation&&!T(this._navigation,e)&&this.close()},this.addEventListener?.(`click`,e=>this._handleNavigationClose(e)),this.addEventListener?.(`pointerup`,e=>this._closeOnBackdropClick(e)),this.addEventListener?.(`pointerdown`,e=>this._pointerDownListener(e)),this.addEventListener?.(`ɵnavigationsectionopening`,e=>{this._activeNavigationSection=e.target,this.toggleState(`has-open-navigation-section`,!!this._activeNavigationSection)},{capture:!0}),this.addEventListener?.(`ɵnavigationsectionclosing`,e=>{this._activeNavigationSection===e.target&&(this._activeNavigationSection=null,this.internals.states.delete(`has-open-navigation-section`))},{capture:!0})}open(){this.state===`closed`&&this.hasUpdated&&this.dispatchBeforeOpenEvent()&&(this.showPopover?.(),this.state=`opening`,this._checkActiveActions(),this._checkActiveSection(),this.startUpdate(),this._scrollHandler.disableScroll(),this._triggerElement&&(this._triggerElement.ariaExpanded=`true`),this._isZeroAnimationDuration()&&this._handleOpening())}_checkActiveSection(){this.querySelector(`sbb-navigation-button.sbb-active`)?.connectedSection?.open()}_checkActiveActions(){Array.from(this.querySelectorAll(`:is(sbb-navigation-button, sbb-navigation-link).sbb-active`))?.forEach(e=>e.marker?.select(e))}close(){this.state===`opened`&&this.dispatchBeforeCloseEvent()&&(this.state=`closing`,this.startUpdate(),this._triggerElement&&(this._triggerElement.ariaExpanded=`false`),this._isZeroAnimationDuration()&&this._handleClosing())}_isZeroAnimationDuration(){return E(this,`--sbb-navigation-animation-duration`)}_handleClosing(){this.state=`closed`,this.hidePopover?.(),this.navigationContent?.scrollTo(0,0),this._inertController.deactivate(),this._triggerElement?.focus(),this._escapableOverlayController.disconnect(),this.dispatchCloseEvent(),this._navigationResizeObserver.unobserve(this),this._resetMarkers(),this._focusTrapController.enabled=!1,this._scrollHandler.enableScroll(),this.completeUpdate()}_handleOpening(){this.state=`opened`,this._navigationResizeObserver.observe(this),this._inertController.activate(),this._escapableOverlayController.connect(),this._focusTrapController.focusInitialElement(),this._focusTrapController.enabled=!0,this.completeUpdate(),this.dispatchOpenEvent()}_configureTrigger(){this.trigger!==this._triggerElement&&(this._triggerAbortController?.abort(),k(this._triggerElement),this._triggerElement=this.trigger,this._triggerElement&&(M(this,this._triggerElement,`menu`,this.state),this._triggerAbortController=new AbortController,this._triggerElement.addEventListener(`click`,()=>this.open(),{signal:this._triggerAbortController.signal})))}_onAnimationEnd(e){e.animationName===`open`&&this.state===`opening`?this._handleOpening():e.animationName===`close`&&this.state===`closing`&&this._handleClosing()}_resetMarkers(){Array.from(this.querySelectorAll(`:is(sbb-navigation-button, sbb-navigation-link):is(:state(action-active),[state--action-active]):not(.sbb-active)`))?.forEach(e=>e.marker?.reset())}_handleNavigationClose(e){e.composedPath().some((e,t,n)=>e instanceof HTMLElement&&t<n.indexOf(this)&&(e.nodeName===`A`||e.hasAttribute(`sbb-navigation-close`)&&!e.hasAttribute(`disabled`)))&&this.close()}_onNavigationResize(){this.state===`opened`&&(this._resizeObserverTimeout&&clearTimeout(this._resizeObserverTimeout),this.internals.states.add(`resize-disable-animation`),this._resizeObserverTimeout=setTimeout(()=>this.internals.states.delete(`resize-disable-animation`),150))}connectedCallback(){super.connectedCallback(),this.popover=`manual`,this.hasUpdated&&this._configureTrigger()}disconnectedCallback(){super.disconnectedCallback(),this._triggerElement=null,this._triggerAbortController?.abort(),this._scrollHandler.enableScroll()}requestUpdate(e,n,r){super.requestUpdate(e,n,r),!t&&(!e||e===`trigger`)&&this.hasUpdated&&this._configureTrigger()}firstUpdated(e){super.firstUpdated(e),this._configureTrigger()}render(){let t=e`
42
+ `;let $=(()=>{let n=b(_),i,a=[],o=[],s,c=[],p=[],m,h=[],g=[];return class extends n{static{let e=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;i=[w(),L()],s=[x(),L({attribute:`accessibility-close-label`})],m=[R()],F(this,null,i,{kind:`accessor`,name:`trigger`,static:!1,private:!1,access:{has:e=>`trigger`in e,get:e=>e.trigger,set:(e,t)=>{e.trigger=t}},metadata:e},a,o),F(this,null,s,{kind:`accessor`,name:`accessibilityCloseLabel`,static:!1,private:!1,access:{has:e=>`accessibilityCloseLabel`in e,get:e=>e.accessibilityCloseLabel,set:(e,t)=>{e.accessibilityCloseLabel=t}},metadata:e},c,p),F(this,null,m,{kind:`accessor`,name:`_activeNavigationSection`,static:!1,private:!1,access:{has:e=>`_activeNavigationSection`in e,get:e=>e._activeNavigationSection,set:(e,t)=>{e._activeNavigationSection=t}},metadata:e},h,g),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}static{this.elementName=`sbb-navigation`}static{this.elementDependencies=[B]}static{this.role=`navigation`}static{this.styles=[O,j,r(Q)]}#e;get trigger(){return this.#e}set trigger(e){this.#e=e}#t;get accessibilityCloseLabel(){return this.#t}set accessibilityCloseLabel(e){this.#t=e}#n;get _activeNavigationSection(){return this.#n}set _activeNavigationSection(e){this.#n=e}get activeNavigationSection(){return this._activeNavigationSection}get closeButton(){return this.shadowRoot?.querySelector(`#sbb-navigation-close-button`)??null}get navigationContent(){return this.shadowRoot?.querySelector(`.sbb-navigation__content`)??null}constructor(){super(),this.#e=I(this,a,null),this.#t=(I(this,o),I(this,c,``)),this.#n=(I(this,p),I(this,h,null)),this._navigation=I(this,g),this._triggerElement=null,this._language=new f(this),this._inertController=new d(this),this._escapableOverlayController=new l(this),this._focusTrapController=new u(this),this._scrollHandler=new y(this),this._isPointerDownEventOnNavigation=!1,this._resizeObserverTimeout=null,this._navigationResizeObserver=new z(this,{skipInitial:!0,callback:()=>this._onNavigationResize()}),this._pointerDownListener=e=>{this._isPointerDownEventOnNavigation=T(this._navigation,e)||T(this.querySelector(`sbb-navigation-section:is(:state(state-opened),[state--state-opened])`)?.shadowRoot?.querySelector(`nav.sbb-navigation-section`),e)},this._closeOnBackdropClick=e=>{!this._isPointerDownEventOnNavigation&&!T(this._navigation,e)&&this.close()},this.addEventListener?.(`click`,e=>this._handleNavigationClose(e)),this.addEventListener?.(`pointerup`,e=>this._closeOnBackdropClick(e)),this.addEventListener?.(`pointerdown`,e=>this._pointerDownListener(e)),this.addEventListener?.(`ɵnavigationsectionopening`,e=>{this._activeNavigationSection=e.target,this.toggleState(`has-open-navigation-section`,!!this._activeNavigationSection)},{capture:!0}),this.addEventListener?.(`ɵnavigationsectionclosing`,e=>{this._activeNavigationSection===e.target&&(this._activeNavigationSection=null,this.internals.states.delete(`has-open-navigation-section`))},{capture:!0})}open(){this.state===`closed`&&this.hasUpdated&&this.dispatchBeforeOpenEvent()&&(this.showPopover?.(),this.state=`opening`,this._checkActiveActions(),this._checkActiveSection(),this.startUpdate(),this._scrollHandler.disableScroll(),this._triggerElement&&(this._triggerElement.ariaExpanded=`true`),this._isZeroAnimationDuration()&&this._handleOpening())}_checkActiveSection(){this.querySelector(`sbb-navigation-button.sbb-active`)?.connectedSection?.open()}_checkActiveActions(){Array.from(this.querySelectorAll(`:is(sbb-navigation-button, sbb-navigation-link).sbb-active`))?.forEach(e=>e.marker?.select(e))}close(){this.state===`opened`&&this.dispatchBeforeCloseEvent()&&(this.state=`closing`,this.startUpdate(),this._triggerElement&&(this._triggerElement.ariaExpanded=`false`),this._isZeroAnimationDuration()&&this._handleClosing())}_isZeroAnimationDuration(){return E(this,`--sbb-navigation-animation-duration`)}_handleClosing(){this.state=`closed`,this.hidePopover?.(),this.navigationContent?.scrollTo(0,0),this._inertController.deactivate(),this._triggerElement?.focus(),this._escapableOverlayController.disconnect(),this.dispatchCloseEvent(),this._navigationResizeObserver.unobserve(this),this._resetMarkers(),this._focusTrapController.enabled=!1,this._scrollHandler.enableScroll(),this.completeUpdate()}_handleOpening(){this.state=`opened`,this._navigationResizeObserver.observe(this),this._inertController.activate(),this._escapableOverlayController.connect(),this._focusTrapController.focusInitialElement(),this._focusTrapController.enabled=!0,this.completeUpdate(),this.dispatchOpenEvent()}_configureTrigger(){this.trigger!==this._triggerElement&&(this._triggerAbortController?.abort(),k(this._triggerElement),this._triggerElement=this.trigger,this._triggerElement&&(M(this,this._triggerElement,`menu`,this.state),this._triggerAbortController=new AbortController,this._triggerElement.addEventListener(`click`,()=>this.open(),{signal:this._triggerAbortController.signal})))}_onAnimationEnd(e){e.animationName===`open`&&this.state===`opening`?this._handleOpening():e.animationName===`close`&&this.state===`closing`&&this._handleClosing()}_resetMarkers(){Array.from(this.querySelectorAll(`:is(sbb-navigation-button, sbb-navigation-link):is(:state(action-active),[state--action-active]):not(.sbb-active)`))?.forEach(e=>e.marker?.reset())}_handleNavigationClose(e){e.composedPath().some((e,t,n)=>e instanceof HTMLElement&&t<n.indexOf(this)&&(e.nodeName===`A`||e.hasAttribute(`sbb-navigation-close`)&&!e.hasAttribute(`disabled`)))&&this.close()}_onNavigationResize(){this.state===`opened`&&(this._resizeObserverTimeout&&clearTimeout(this._resizeObserverTimeout),this.internals.states.add(`resize-disable-animation`),this._resizeObserverTimeout=setTimeout(()=>this.internals.states.delete(`resize-disable-animation`),150))}connectedCallback(){super.connectedCallback(),this.popover=`manual`,this.hasUpdated&&this._configureTrigger()}disconnectedCallback(){super.disconnectedCallback(),this._triggerElement=null,this._triggerAbortController?.abort(),this._scrollHandler.enableScroll()}requestUpdate(e,n,r){super.requestUpdate(e,n,r),!t&&(!e||e===`trigger`)&&this.hasUpdated&&this._configureTrigger()}firstUpdated(e){super.firstUpdated(e),this._configureTrigger()}render(){let t=e`
43
43
  <sbb-transparent-button
44
44
  id="sbb-navigation-close-button"
45
45
  class="sbb-navigation__close"
package/overlay.pure.js CHANGED
@@ -1,4 +1,4 @@
1
- import{__esDecorate as e,__runInitializers as t}from"tslib";import{isServer as n,unsafeCSS as r}from"lit";import{property as i}from"lit/decorators.js";import{SbbEscapableOverlayController as a,SbbFocusTrapController as o,SbbInertController as s,SbbLanguageController as c,SbbNegativeMixin as l,SbbOpenCloseBaseElement as u,SbbScrollHandler as d,forceType as f,forwardEvent as p,i18nCloseDialog as m,i18nDialog as h,idReference as g,isZeroAnimationDuration as _,popoverResetStyles as v,removeAriaOverlayTriggerProperties as y,screenReaderOnlyStyles as b,scrollbarStyles as x,setAriaOverlayTriggerProperties as S}from"./core.js";import{ref as C}from"lit/directives/ref.js";import{html as w}from"lit/static-html.js";import{SbbSecondaryButtonElement as T}from"./button.pure.js";import{SbbContainerElement as E}from"./container.pure.js";const D=/* @__PURE__ */ new WeakMap;var O=class extends Event{constructor(e,{cancelable:t,closeAttribute:n,closeTarget:r,result:i}){super(e,{cancelable:t}),this.result=i??(r?D.get(r)??(r.getAttribute(n)?.trim()||null):null),this.closeTarget=r??null}};function k(e,t){D.set(e,t)}const A=[];let j=(()=>{let r=l(u),p,m=[],_=[],x,C=[],w=[],T,E=[],D=[];return class extends r{constructor(){super(...arguments),this.#e=t(this,m,null),this.#t=(t(this,_),t(this,C,``)),this.#n=(t(this,w),t(this,E,!1)),this.lastFocusedElement=t(this,D),this.focusTrapController=new o(this),this.scrollHandler=new d,this.language=new c(this),this.inertController=new s(this),this.escapableOverlayController=new a(this),this._ariaLiveRefToggle=!1,this._triggerElement=null}static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;p=[g(),i()],x=[f(),i({attribute:`accessibility-label`})],T=[f(),i({type:Boolean})],e(this,null,p,{kind:`accessor`,name:`trigger`,static:!1,private:!1,access:{has:e=>`trigger`in e,get:e=>e.trigger,set:(e,t)=>{e.trigger=t}},metadata:t},m,_),e(this,null,x,{kind:`accessor`,name:`accessibilityLabel`,static:!1,private:!1,access:{has:e=>`accessibilityLabel`in e,get:e=>e.accessibilityLabel,set:(e,t)=>{e.accessibilityLabel=t}},metadata:t},C,w),e(this,null,T,{kind:`accessor`,name:`skipFocusRestoration`,static:!1,private:!1,access:{has:e=>`skipFocusRestoration`in e,get:e=>e.skipFocusRestoration,set:(e,t)=>{e.skipFocusRestoration=t}},metadata:t},E,D),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.styles=[v,b]}#e;get trigger(){return this.#e}set trigger(e){this.#e=e}#t;get accessibilityLabel(){return this.#t}set accessibilityLabel(e){this.#t=e}#n;get skipFocusRestoration(){return this.#n}set skipFocusRestoration(e){this.#n=e}open(){this.state!==`opening`&&this.state!==`opened`&&!this._hasClosedParent()&&this.dispatchBeforeOpenEvent()&&(this.lastFocusedElement=document.activeElement,this.showPopover?.(),this.state=`opening`,this._triggerElement&&(this._triggerElement.ariaExpanded=`true`),A.push(this),this.scrollHandler.disableScroll(),this.escapableOverlayController.connect(),this.attachOpenOverlayEvents(),this.isZeroAnimationDuration()&&this.handleOpening())}close(e){this._close(e,void 0)}_close(e,t){this.state!==`closing`&&this.state!==`closed`&&(this.lastResult=e??null,this.lastClosedTarget=t,this.dispatchBeforeCloseEvent()&&(this.state=`closing`,this._triggerElement&&(this._triggerElement.ariaExpanded=`false`),this.removeAriaLiveRefContent(),this.isZeroAnimationDuration()&&this.handleClosing()))}_hasClosedParent(){let e=this.parentElement?.closest(`sbb-dialog, sbb-overlay`);return e?.state===`closed`||e?.state===`closing`}connectedCallback(){this.popover=`manual`,super.connectedCallback(),this.hasUpdated&&this._configureTrigger()}_configureTrigger(){this.trigger!==this._triggerElement&&(this._triggerAbortController?.abort(),y(this._triggerElement),this._triggerElement=this.trigger,this._triggerElement&&(S(this,this._triggerElement,`dialog`,this.state),this._triggerAbortController=new AbortController,this._triggerElement.addEventListener(`click`,()=>this.open(),{signal:this._triggerAbortController.signal})))}firstUpdated(e){super.firstUpdated(e),this._ariaLiveRef=this.shadowRoot.querySelector(`.sbb-screen-reader-only`),this._configureTrigger(),this.isOpen&&setTimeout(()=>{this.focusTrapController.focusInitialElement()},0)}disconnectedCallback(){super.disconnectedCallback(),this.openOverlayController?.abort(),this.removeInstanceFromGlobalCollection(),this.scrollHandler.enableScroll(),this._triggerElement=null,this._triggerAbortController?.abort()}requestUpdate(e,t,r){super.requestUpdate(e,t,r),!n&&(!e||e===`trigger`)&&this.hasUpdated&&this._configureTrigger()}attachOpenOverlayEvents(){this.openOverlayController=new AbortController,window.addEventListener(`keydown`,()=>{this.removeAriaLiveRefContent()},{signal:this.openOverlayController.signal}),window.addEventListener(`click`,()=>this.removeAriaLiveRefContent(),{signal:this.openOverlayController.signal})}removeInstanceFromGlobalCollection(){let e=A.indexOf(this);e>-1&&A.splice(e,1)}closeOnSbbOverlayCloseClick(e){let t=e.composedPath().find((e,t,n)=>e instanceof HTMLElement&&t<n.indexOf(this)&&(e.hasAttribute(this.closeAttribute)||e.localName===this.closeTag)&&!e.hasAttribute(`disabled`)&&(e.closest(this.localName)===this||(this.shadowRoot?.contains(e)??!1)));t&&A.length&&A[A.length-1]._close(null,t)}removeAriaLiveRefContent(){this._ariaLiveRef&&(this._ariaLiveRef.textContent=``)}setAriaLiveRefContent(e){this._ariaLiveRef&&(this._ariaLiveRefToggle=!this._ariaLiveRefToggle,this._ariaLiveRef.textContent=`${h[this.language.current]}${e?`, ${e}`:``}${this._ariaLiveRefToggle?`\xA0`:``}`)}onOverlayAnimationEnd(e){e.animationName===`open`&&this.state===`opening`?this.handleOpening():e.animationName===`close`&&this.state===`closing`&&this.handleClosing()}}})();var M=`:host{--sbb-overlay-display:none;--sbb-overlay-inset:0 auto auto 0;--sbb-overlay-pointer-events:none;--sbb-overlay-container-display:none;--_sbb-overlay-padding-block:calc(var(--sbb-spacing-fixed-14x) + var(--sbb-spacing-responsive-l));--sbb-overlay-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-6x));display:var(--sbb-overlay-display);inset:var(--sbb-overlay-inset);z-index:var(--sbb-overlay-z-index,var(--sbb-overlay-default-z-index));position:fixed}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))){--sbb-overlay-display:block;--sbb-overlay-container-display:flex}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]))){--sbb-overlay-pointer-events:all}:host(:not([negative])){--sbb-overlay-color:var(--sbb-color-1);--sbb-overlay-background-color:var(--sbb-background-color-3)}:host([negative]){--sbb-overlay-color:var(--sbb-color-1-negative);--sbb-overlay-background-color:var(--sbb-background-color-3-negative);--sbb-focus-outline-color:var(--sbb-focus-outline-color-dark)}:host(:not(:is(:state(state-closed),[state--state-closed]))){--sbb-overlay-inset:0}.sbb-overlay__container{background-color:var(--sbb-overlay-background-color);pointer-events:var(--sbb-overlay-pointer-events);display:var(--sbb-overlay-container-display);inset:var(--sbb-overlay-inset);align-items:center;position:fixed}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))) .sbb-overlay__container{animation-name:open;animation-duration:var(--sbb-overlay-animation-duration);animation-timing-function:var(--sbb-overlay-animation-easing)}:host(:is(:state(state-closing),[state--state-closing])) .sbb-overlay__container{pointer-events:none;animation-name:close}.sbb-overlay{height:var(--sbb-overlay-height);color:var(--sbb-overlay-color);border:none;margin:auto;padding:0;position:absolute;inset-inline:0}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))) .sbb-overlay{animation-name:open-move-in;animation-duration:var(--sbb-overlay-animation-duration);animation-timing-function:var(--sbb-overlay-animation-easing)}:host(:is(:state(state-closing),[state--state-closing])) .sbb-overlay{animation-name:close-move-out}.sbb-overlay__wrapper{width:100%;height:var(--sbb-overlay-height);outline:none;flex-direction:column;display:flex;position:fixed}@media (width>=64rem){.sbb-overlay__wrapper{height:auto;position:sticky;inset-block-start:0}}.sbb-overlay__header{pointer-events:none;width:100%;padding:var(--sbb-spacing-responsive-xs);z-index:1;justify-content:space-between;align-items:start;padding-block-end:0;display:flex;position:absolute;inset-inline-start:0}.sbb-overlay__header *{pointer-events:all}.sbb-overlay__close{margin-inline-start:auto}.sbb-overlay__content{-webkit-overflow-scrolling:touch;height:100vh;overflow:auto}.sbb-overlay__content-container{padding-block:var(--_sbb-overlay-padding-block)}@keyframes open{0%{opacity:0}to{opacity:1}}@keyframes open-move-in{0%{transform:translateY(var(--sbb-spacing-fixed-4x))}to{transform:translateY(0%)}}@keyframes close{0%{opacity:1}to{opacity:0}}@keyframes close-move-out{0%{transform:translateY(0%)}to{transform:translateY(var(--sbb-spacing-fixed-4x))}}
1
+ import{__esDecorate as e,__runInitializers as t}from"tslib";import{isServer as n,unsafeCSS as r}from"lit";import{property as i}from"lit/decorators.js";import{SbbEscapableOverlayController as a,SbbFocusTrapController as o,SbbInertController as s,SbbLanguageController as c,SbbNegativeMixin as l,SbbOpenCloseBaseElement as u,SbbScrollController as d,forceType as f,forwardEvent as p,i18nCloseDialog as m,i18nDialog as h,idReference as g,isZeroAnimationDuration as _,popoverResetStyles as v,removeAriaOverlayTriggerProperties as y,screenReaderOnlyStyles as b,scrollbarStyles as x,setAriaOverlayTriggerProperties as S}from"./core.js";import{ref as C}from"lit/directives/ref.js";import{html as w}from"lit/static-html.js";import{SbbSecondaryButtonElement as T}from"./button.pure.js";import{SbbContainerElement as E}from"./container.pure.js";const D=/* @__PURE__ */ new WeakMap;var O=class extends Event{constructor(e,{cancelable:t,closeAttribute:n,closeTarget:r,result:i}){super(e,{cancelable:t}),this.result=i??(r?D.get(r)??(r.getAttribute(n)?.trim()||null):null),this.closeTarget=r??null}};function k(e,t){D.set(e,t)}const A=[];let j=(()=>{let r=l(u),p,m=[],_=[],x,C=[],w=[],T,E=[],D=[];return class extends r{constructor(){super(...arguments),this.#e=t(this,m,null),this.#t=(t(this,_),t(this,C,``)),this.#n=(t(this,w),t(this,E,!1)),this.lastFocusedElement=t(this,D),this.focusTrapController=new o(this),this.scrollHandler=new d(this),this.language=new c(this),this.inertController=new s(this),this.escapableOverlayController=new a(this),this._ariaLiveRefToggle=!1,this._triggerElement=null}static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;p=[g(),i()],x=[f(),i({attribute:`accessibility-label`})],T=[f(),i({type:Boolean})],e(this,null,p,{kind:`accessor`,name:`trigger`,static:!1,private:!1,access:{has:e=>`trigger`in e,get:e=>e.trigger,set:(e,t)=>{e.trigger=t}},metadata:t},m,_),e(this,null,x,{kind:`accessor`,name:`accessibilityLabel`,static:!1,private:!1,access:{has:e=>`accessibilityLabel`in e,get:e=>e.accessibilityLabel,set:(e,t)=>{e.accessibilityLabel=t}},metadata:t},C,w),e(this,null,T,{kind:`accessor`,name:`skipFocusRestoration`,static:!1,private:!1,access:{has:e=>`skipFocusRestoration`in e,get:e=>e.skipFocusRestoration,set:(e,t)=>{e.skipFocusRestoration=t}},metadata:t},E,D),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.styles=[v,b]}#e;get trigger(){return this.#e}set trigger(e){this.#e=e}#t;get accessibilityLabel(){return this.#t}set accessibilityLabel(e){this.#t=e}#n;get skipFocusRestoration(){return this.#n}set skipFocusRestoration(e){this.#n=e}open(){this.state!==`opening`&&this.state!==`opened`&&!this._hasClosedParent()&&this.dispatchBeforeOpenEvent()&&(this.lastFocusedElement=document.activeElement,this.showPopover?.(),this.state=`opening`,this._triggerElement&&(this._triggerElement.ariaExpanded=`true`),A.push(this),this.scrollHandler.disableScroll(),this.escapableOverlayController.connect(),this.attachOpenOverlayEvents(),this.isZeroAnimationDuration()&&this.handleOpening())}close(e){this._close(e,void 0)}_close(e,t){this.state!==`closing`&&this.state!==`closed`&&(this.lastResult=e??null,this.lastClosedTarget=t,this.dispatchBeforeCloseEvent()&&(this.state=`closing`,this._triggerElement&&(this._triggerElement.ariaExpanded=`false`),this.removeAriaLiveRefContent(),this.isZeroAnimationDuration()&&this.handleClosing()))}_hasClosedParent(){let e=this.parentElement?.closest(`sbb-dialog, sbb-overlay`);return e?.state===`closed`||e?.state===`closing`}connectedCallback(){this.popover=`manual`,super.connectedCallback(),this.hasUpdated&&this._configureTrigger()}_configureTrigger(){this.trigger!==this._triggerElement&&(this._triggerAbortController?.abort(),y(this._triggerElement),this._triggerElement=this.trigger,this._triggerElement&&(S(this,this._triggerElement,`dialog`,this.state),this._triggerAbortController=new AbortController,this._triggerElement.addEventListener(`click`,()=>this.open(),{signal:this._triggerAbortController.signal})))}firstUpdated(e){super.firstUpdated(e),this._ariaLiveRef=this.shadowRoot.querySelector(`.sbb-screen-reader-only`),this._configureTrigger(),this.isOpen&&setTimeout(()=>{this.focusTrapController.focusInitialElement()},0)}disconnectedCallback(){super.disconnectedCallback(),this.openOverlayController?.abort(),this.removeInstanceFromGlobalCollection(),this.scrollHandler.enableScroll(),this._triggerElement=null,this._triggerAbortController?.abort()}requestUpdate(e,t,r){super.requestUpdate(e,t,r),!n&&(!e||e===`trigger`)&&this.hasUpdated&&this._configureTrigger()}attachOpenOverlayEvents(){this.openOverlayController=new AbortController,window.addEventListener(`keydown`,()=>{this.removeAriaLiveRefContent()},{signal:this.openOverlayController.signal}),window.addEventListener(`click`,()=>this.removeAriaLiveRefContent(),{signal:this.openOverlayController.signal})}removeInstanceFromGlobalCollection(){let e=A.indexOf(this);e>-1&&A.splice(e,1)}closeOnSbbOverlayCloseClick(e){let t=e.composedPath().find((e,t,n)=>e instanceof HTMLElement&&t<n.indexOf(this)&&(e.hasAttribute(this.closeAttribute)||e.localName===this.closeTag)&&!e.hasAttribute(`disabled`)&&(e.closest(this.localName)===this||(this.shadowRoot?.contains(e)??!1)));t&&A.length&&A[A.length-1]._close(null,t)}removeAriaLiveRefContent(){this._ariaLiveRef&&(this._ariaLiveRef.textContent=``)}setAriaLiveRefContent(e){this._ariaLiveRef&&(this._ariaLiveRefToggle=!this._ariaLiveRefToggle,this._ariaLiveRef.textContent=`${h[this.language.current]}${e?`, ${e}`:``}${this._ariaLiveRefToggle?`\xA0`:``}`)}onOverlayAnimationEnd(e){e.animationName===`open`&&this.state===`opening`?this.handleOpening():e.animationName===`close`&&this.state===`closing`&&this.handleClosing()}}})();var M=`:host{--sbb-overlay-display:none;--sbb-overlay-inset:0 auto auto 0;--sbb-overlay-pointer-events:none;--sbb-overlay-container-display:none;--_sbb-overlay-padding-block:calc(var(--sbb-spacing-fixed-14x) + var(--sbb-spacing-responsive-l));--sbb-overlay-animation-duration:var(--sbb-disable-animation-duration,var(--sbb-animation-duration-6x));display:var(--sbb-overlay-display);inset:var(--sbb-overlay-inset);z-index:var(--sbb-overlay-z-index,var(--sbb-overlay-default-z-index));position:fixed}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))){--sbb-overlay-display:block;--sbb-overlay-container-display:flex}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]))){--sbb-overlay-pointer-events:all}:host(:not([negative])){--sbb-overlay-color:var(--sbb-color-1);--sbb-overlay-background-color:var(--sbb-background-color-3)}:host([negative]){--sbb-overlay-color:var(--sbb-color-1-negative);--sbb-overlay-background-color:var(--sbb-background-color-3-negative);--sbb-focus-outline-color:var(--sbb-focus-outline-color-dark)}:host(:not(:is(:state(state-closed),[state--state-closed]))){--sbb-overlay-inset:0}.sbb-overlay__container{background-color:var(--sbb-overlay-background-color);pointer-events:var(--sbb-overlay-pointer-events);display:var(--sbb-overlay-container-display);inset:var(--sbb-overlay-inset);align-items:center;position:fixed}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))) .sbb-overlay__container{animation-name:open;animation-duration:var(--sbb-overlay-animation-duration);animation-timing-function:var(--sbb-overlay-animation-easing)}:host(:is(:state(state-closing),[state--state-closing])) .sbb-overlay__container{pointer-events:none;animation-name:close}.sbb-overlay{height:var(--sbb-overlay-height);color:var(--sbb-overlay-color);border:none;margin:auto;padding:0;position:absolute;inset-inline:0}:host(:is(:is(:state(state-opening),[state--state-opening]),:is(:state(state-opened),[state--state-opened]),:is(:state(state-closing),[state--state-closing]))) .sbb-overlay{animation-name:open-move-in;animation-duration:var(--sbb-overlay-animation-duration);animation-timing-function:var(--sbb-overlay-animation-easing)}:host(:is(:state(state-closing),[state--state-closing])) .sbb-overlay{animation-name:close-move-out}.sbb-overlay__wrapper{width:100%;height:var(--sbb-overlay-height);outline:none;flex-direction:column;display:flex;position:fixed}@media (width>=64rem){.sbb-overlay__wrapper{height:auto;position:sticky;inset-block-start:0}}.sbb-overlay__header{pointer-events:none;width:100%;padding:var(--sbb-spacing-responsive-xs);z-index:1;justify-content:space-between;align-items:start;padding-block-end:0;display:flex;position:absolute;inset-inline-start:0}.sbb-overlay__header *{pointer-events:all}.sbb-overlay__close{margin-inline-start:auto}.sbb-overlay__content{-webkit-overflow-scrolling:touch;height:100vh;overflow:auto}.sbb-overlay__content-container{padding-block:var(--_sbb-overlay-padding-block)}@keyframes open{0%{opacity:0}to{opacity:1}}@keyframes open-move-in{0%{transform:translateY(var(--sbb-spacing-fixed-4x))}to{transform:translateY(0%)}}@keyframes close{0%{opacity:1}to{opacity:0}}@keyframes close-move-out{0%{transform:translateY(0%)}to{transform:translateY(var(--sbb-spacing-fixed-4x))}}
2
2
  `;let N=(()=>{let n=j,a,o=[],s=[],c,l=[],u=[];return class extends n{constructor(){super(...arguments),this.#e=t(this,o,!1),this.#t=(t(this,s),t(this,l,``)),this.closeAttribute=(t(this,u),`sbb-overlay-close`),this._overlayContentElement=null}static{let t=typeof Symbol==`function`&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0;a=[f(),i({reflect:!0,type:Boolean})],c=[f(),i({attribute:`accessibility-close-label`})],e(this,null,a,{kind:`accessor`,name:`expanded`,static:!1,private:!1,access:{has:e=>`expanded`in e,get:e=>e.expanded,set:(e,t)=>{e.expanded=t}},metadata:t},o,s),e(this,null,c,{kind:`accessor`,name:`accessibilityCloseLabel`,static:!1,private:!1,access:{has:e=>`accessibilityCloseLabel`in e,get:e=>e.accessibilityCloseLabel,set:(e,t)=>{e.accessibilityCloseLabel=t}},metadata:t},l,u),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static{this.elementName=`sbb-overlay`}static{this.elementDependencies=[T,E]}static{this.styles=[x,r(M)]}static{this.events={beforeopen:`beforeopen`,open:`open`,beforeclose:`beforeclose`,close:`close`}}#e;get expanded(){return this.#e}set expanded(e){this.#e=e}#t;get accessibilityCloseLabel(){return this.#t}set accessibilityCloseLabel(e){this.#t=e}firstUpdated(e){super.firstUpdated(e),this.isOpen&&this.setAriaLiveRefContent()}isZeroAnimationDuration(){return _(this,`--sbb-overlay-animation-duration`)}handleOpening(){this.state=`opened`,this.inertController.activate(),this.focusTrapController.focusInitialElement(),setTimeout(()=>this.setAriaLiveRefContent(this.accessibilityLabel)),this.focusTrapController.enabled=!0,this.dispatchOpenEvent()}handleClosing(){this._overlayContentElement?.scrollTo(0,0),this.state=`closed`,this.hidePopover?.(),this.inertController.deactivate(),this.skipFocusRestoration||this.lastFocusedElement?.focus(),this.openOverlayController?.abort(),this.focusTrapController.enabled=!1,this.removeInstanceFromGlobalCollection(),A.length||this.scrollHandler.enableScroll(),this.escapableOverlayController.disconnect(),this.dispatchCloseEvent()}dispatchBeforeCloseEvent(){return this.dispatchEvent(new O(`beforeclose`,{cancelable:!0,closeAttribute:this.closeAttribute,closeTarget:this.lastClosedTarget,result:this.lastResult}))}dispatchCloseEvent(){return this.dispatchEvent(new O(`close`,{closeAttribute:this.closeAttribute,closeTarget:this.lastClosedTarget,result:this.lastResult}))}render(){return w`
3
3
  <div class="sbb-overlay__container" @animationend=${this.onOverlayAnimationEnd}>
4
4
  <div class="sbb-overlay">
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sbb-esta/lyne-elements-dev",
3
- "version": "5.10.0-dev.1791460555",
3
+ "version": "5.10.0-dev.1791461306",
4
4
  "description": "Lyne Design System",
5
5
  "keywords": [
6
6
  "design system",
7
7
  "web components",
8
8
  "lit",
9
- "https://github.com/sbb-design-systems/lyne-components/commit/e387b71113802cee2db04c095de8e30a9d7b3f1b"
9
+ "https://github.com/sbb-design-systems/lyne-components/commit/0efbee34a36794a367dc2f27a17091e295920243"
10
10
  ],
11
11
  "type": "module",
12
12
  "exports": {