@cas-smartdesign/tab-bar 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,78 +1,77 @@
1
- var window;(window||={})["@cas-smartdesign/tab-bar"]=(()=>{var Re=Object.defineProperty;var uo=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var mo=Object.prototype.hasOwnProperty;var vo=(e,t)=>{for(var i in t)Re(e,i,{get:t[i],enumerable:!0})},go=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of fo(t))!mo.call(e,r)&&r!==i&&Re(e,r,{get:()=>t[r],enumerable:!(o=uo(t,r))||o.enumerable});return e};var bo=e=>go(Re({},"__esModule",{value:!0}),e);var Sr={};vo(Sr,{Tab:()=>Y,default:()=>et});var ue=globalThis,fe=ue.ShadowRoot&&(ue.ShadyCSS===void 0||ue.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Te=Symbol(),gi=new WeakMap,Vt=class{constructor(t,i,o){if(this._$cssResult$=!0,o!==Te)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o,i=this.t;if(fe&&t===void 0){let o=i!==void 0&&i.length===1;o&&(t=gi.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&gi.set(i,t))}return t}toString(){return this.cssText}},it=e=>new Vt(typeof e=="string"?e:e+"",void 0,Te),dt=(e,...t)=>{let i=e.length===1?e[0]:t.reduce(((o,r,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[s+1]),e[0]);return new Vt(i,e,Te)},bi=(e,t)=>{if(fe)e.adoptedStyleSheets=t.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(let i of t){let o=document.createElement("style"),r=ue.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,e.appendChild(o)}},De=fe?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(let o of t.cssRules)i+=o.cssText;return it(i)})(e):e;var{is:xo,defineProperty:yo,getOwnPropertyDescriptor:wo,getOwnPropertyNames:Ao,getOwnPropertySymbols:_o,getPrototypeOf:So}=Object,me=globalThis,xi=me.trustedTypes,$o=xi?xi.emptyScript:"",Eo=me.reactiveElementPolyfillSupport,Ft=(e,t)=>e,Kt={toAttribute(e,t){switch(t){case Boolean:e=e?$o:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},ve=(e,t)=>!xo(e,t),yi={attribute:!0,type:String,converter:Kt,reflect:!1,useDefault:!1,hasChanged:ve};Symbol.metadata??=Symbol("metadata"),me.litPropertyMetadata??=new WeakMap;var ot=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=yi){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(t,o,i);r!==void 0&&yo(this.prototype,t,r)}}static getPropertyDescriptor(t,i,o){let{get:r,set:s}=wo(this.prototype,t)??{get(){return this[i]},set(n){this[i]=n}};return{get:r,set(n){let l=r?.call(this);s?.call(this,n),this.requestUpdate(t,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??yi}static _$Ei(){if(this.hasOwnProperty(Ft("elementProperties")))return;let t=So(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ft("properties"))){let i=this.properties,o=[...Ao(i),..._o(i)];for(let r of o)this.createProperty(r,i[r])}let t=this[Symbol.metadata];if(t!==null){let i=litPropertyMetadata.get(t);if(i!==void 0)for(let[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let i=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let r of o)i.unshift(De(r))}else t!==void 0&&i.push(De(t));return i}static _$Eu(t,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return bi(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ET(t,i){let o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){let s=(o.converter?.toAttribute!==void 0?o.converter:Kt).toAttribute(i,o.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,i){let o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let s=o.getPropertyOptions(r),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Kt;this._$Em=r;let l=n.fromAttribute(i,s.type);this[r]=l??this._$Ej?.get(r)??l,this._$Em=null}}requestUpdate(t,i,o){if(t!==void 0){let r=this.constructor,s=this[t];if(o??=r.getPropertyOptions(t),!((o.hasChanged??ve)(s,i)||o.useDefault&&o.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,o))))return;this.C(t,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:o,reflect:r,wrapped:s},n){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??i??this[t]),s!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(i=void 0),this._$AL.set(t,i)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,s]of o){let{wrapped:n}=s,l=this[r];n!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,s,l)}}let t=!1,i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach((o=>o.hostUpdate?.())),this.update(i)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((i=>this._$ET(i,this[i]))),this._$EM()}updated(t){}firstUpdated(t){}};ot.elementStyles=[],ot.shadowRootOptions={mode:"open"},ot[Ft("elementProperties")]=new Map,ot[Ft("finalized")]=new Map,Eo?.({ReactiveElement:ot}),(me.reactiveElementVersions??=[]).push("2.1.1");var Ue=globalThis,ge=Ue.trustedTypes,wi=ge?ge.createPolicy("lit-html",{createHTML:e=>e}):void 0,Ci="$lit$",ht=`lit$${Math.random().toFixed(9).slice(2)}$`,Ii="?"+ht,Co=`<${Ii}>`,_t=document,Yt=()=>_t.createComment(""),Gt=e=>e===null||typeof e!="object"&&typeof e!="function",je=Array.isArray,Io=e=>je(e)||typeof e?.[Symbol.iterator]=="function",ke=`[
2
- \f\r]`,Xt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ai=/-->/g,_i=/>/g,wt=RegExp(`>|${ke}(?:([^\\s"'>=/]+)(${ke}*=${ke}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Si=/'/g,$i=/"/g,Oi=/^(?:script|style|textarea|title)$/i,ze=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),U=ze(1),Pr=ze(2),Lr=ze(3),rt=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Ei=new WeakMap,At=_t.createTreeWalker(_t,129);function Pi(e,t){if(!je(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return wi!==void 0?wi.createHTML(t):t}var Oo=(e,t)=>{let i=e.length-1,o=[],r,s=t===2?"<svg>":t===3?"<math>":"",n=Xt;for(let l=0;l<i;l++){let a=e[l],d,c,h=-1,f=0;for(;f<a.length&&(n.lastIndex=f,c=n.exec(a),c!==null);)f=n.lastIndex,n===Xt?c[1]==="!--"?n=Ai:c[1]!==void 0?n=_i:c[2]!==void 0?(Oi.test(c[2])&&(r=RegExp("</"+c[2],"g")),n=wt):c[3]!==void 0&&(n=wt):n===wt?c[0]===">"?(n=r??Xt,h=-1):c[1]===void 0?h=-2:(h=n.lastIndex-c[2].length,d=c[1],n=c[3]===void 0?wt:c[3]==='"'?$i:Si):n===$i||n===Si?n=wt:n===Ai||n===_i?n=Xt:(n=wt,r=void 0);let p=n===wt&&e[l+1].startsWith("/>")?" ":"";s+=n===Xt?a+Co:h>=0?(o.push(d),a.slice(0,h)+Ci+a.slice(h)+ht+p):a+ht+(h===-2?l:p)}return[Pi(e,s+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},Jt=class e{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let s=0,n=0,l=t.length-1,a=this.parts,[d,c]=Oo(t,i);if(this.el=e.createElement(d,o),At.currentNode=this.el.content,i===2||i===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=At.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(Ci)){let f=c[n++],p=r.getAttribute(h).split(ht),b=/([.?@])?(.*)/.exec(f);a.push({type:1,index:s,name:b[2],strings:p,ctor:b[1]==="."?Be:b[1]==="?"?Ne:b[1]==="@"?He:Mt}),r.removeAttribute(h)}else h.startsWith(ht)&&(a.push({type:6,index:s}),r.removeAttribute(h));if(Oi.test(r.tagName)){let h=r.textContent.split(ht),f=h.length-1;if(f>0){r.textContent=ge?ge.emptyScript:"";for(let p=0;p<f;p++)r.append(h[p],Yt()),At.nextNode(),a.push({type:2,index:++s});r.append(h[f],Yt())}}}else if(r.nodeType===8)if(r.data===Ii)a.push({type:2,index:s});else{let h=-1;for(;(h=r.data.indexOf(ht,h+1))!==-1;)a.push({type:7,index:s}),h+=ht.length-1}s++}}static createElement(t,i){let o=_t.createElement("template");return o.innerHTML=t,o}};function kt(e,t,i=e,o){if(t===rt)return t;let r=o!==void 0?i._$Co?.[o]:i._$Cl,s=Gt(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(e),r._$AT(e,i,o)),o!==void 0?(i._$Co??=[])[o]=r:i._$Cl=r),r!==void 0&&(t=kt(e,r._$AS(e,t.values),r,o)),t}var Me=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:i},parts:o}=this._$AD,r=(t?.creationScope??_t).importNode(i,!0);At.currentNode=r;let s=At.nextNode(),n=0,l=0,a=o[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new Zt(s,s.nextSibling,this,t):a.type===1?d=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(d=new We(s,this,t)),this._$AV.push(d),a=o[++l]}n!==a?.index&&(s=At.nextNode(),n++)}return At.currentNode=_t,r}p(t){let i=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}},Zt=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,o,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=kt(this,t,i),Gt(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==rt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Io(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==w&&Gt(this._$AH)?this._$AA.nextSibling.data=t:this.T(_t.createTextNode(t)),this._$AH=t}$(t){let{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=Jt.createElement(Pi(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(i);else{let s=new Me(r,this),n=s.u(this.options);s.p(i),this.T(n),this._$AH=s}}_$AC(t){let i=Ei.get(t.strings);return i===void 0&&Ei.set(t.strings,i=new Jt(t)),i}k(t){je(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,o,r=0;for(let s of t)r===i.length?i.push(o=new e(this.O(Yt()),this.O(Yt()),this,this.options)):o=i[r],o._$AI(s),r++;r<i.length&&(this._$AR(o&&o._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Mt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,o,r,s){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=r,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=w}_$AI(t,i=this,o,r){let s=this.strings,n=!1;if(s===void 0)t=kt(this,t,i,0),n=!Gt(t)||t!==this._$AH&&t!==rt,n&&(this._$AH=t);else{let l=t,a,d;for(t=s[0],a=0;a<s.length-1;a++)d=kt(this,l[o+a],i,a),d===rt&&(d=this._$AH[a]),n||=!Gt(d)||d!==this._$AH[a],d===w?t=w:t!==w&&(t+=(d??"")+s[a+1]),this._$AH[a]=d}n&&!r&&this.j(t)}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Be=class extends Mt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===w?void 0:t}},Ne=class extends Mt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w)}},He=class extends Mt{constructor(t,i,o,r,s){super(t,i,o,r,s),this.type=5}_$AI(t,i=this){if((t=kt(this,t,i,0)??w)===rt)return;let o=this._$AH,r=t===w&&o!==w||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==w&&(o===w||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},We=class{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){kt(this,t)}};var Po=Ue.litHtmlPolyfillSupport;Po?.(Jt,Zt),(Ue.litHtmlVersions??=[]).push("3.3.1");var Li=(e,t,i)=>{let o=i?.renderBefore??t,r=o._$litPart$;if(r===void 0){let s=i?.renderBefore??null;o._$litPart$=r=new Zt(t.insertBefore(Yt(),s),s,void 0,i??{})}return r._$AI(e),r};var qe=globalThis,q=class extends ot{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Li(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return rt}};q._$litElement$=!0,q.finalized=!0,qe.litElementHydrateSupport?.({LitElement:q});var Lo=qe.litElementPolyfillSupport;Lo?.({LitElement:q});(qe.litElementVersions??=[]).push("4.2.1");var Ro={attribute:!0,type:String,converter:Kt,reflect:!1,hasChanged:ve},To=(e=Ro,t,i)=>{let{kind:o,metadata:r}=i,s=globalThis.litPropertyMetadata.get(r);if(s===void 0&&globalThis.litPropertyMetadata.set(r,s=new Map),o==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),o==="accessor"){let{name:n}=i;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,a,e)},init(l){return l!==void 0&&this.C(n,void 0,e,l),l}}}if(o==="setter"){let{name:n}=i;return function(l){let a=this[n];t.call(this,l),this.requestUpdate(n,a,e)}}throw Error("Unsupported decorator location: "+o)};function u(e){return(t,i)=>typeof i=="object"?To(e,t,i):((o,r,s)=>{let n=r.hasOwnProperty(s);return r.constructor.createProperty(s,o),n?Object.getOwnPropertyDescriptor(r,s):void 0})(e,t,i)}var $="top",L="bottom",O="right",I="left",be="auto",pt=[$,L,O,I],st="start",St="end",Ri="clippingParents",xe="viewport",Bt="popper",Ti="reference",Ve=pt.reduce(function(e,t){return e.concat([t+"-"+st,t+"-"+St])},[]),ye=[].concat(pt,[be]).reduce(function(e,t){return e.concat([t,t+"-"+st,t+"-"+St])},[]),Do="beforeRead",ko="read",Mo="afterRead",Bo="beforeMain",No="main",Ho="afterMain",Wo="beforeWrite",Uo="write",jo="afterWrite",Di=[Do,ko,Mo,Bo,No,Ho,Wo,Uo,jo];function D(e){return e?(e.nodeName||"").toLowerCase():null}function _(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function F(e){var t=_(e).Element;return e instanceof t||e instanceof Element}function R(e){var t=_(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Nt(e){if(typeof ShadowRoot>"u")return!1;var t=_(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function zo(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var o=t.styles[i]||{},r=t.attributes[i]||{},s=t.elements[i];!R(s)||!D(s)||(Object.assign(s.style,o),Object.keys(r).forEach(function(n){var l=r[n];l===!1?s.removeAttribute(n):s.setAttribute(n,l===!0?"":l)}))})}function qo(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],s=t.attributes[o]||{},n=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:i[o]),l=n.reduce(function(a,d){return a[d]="",a},{});!R(r)||!D(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var ki={name:"applyStyles",enabled:!0,phase:"write",fn:zo,effect:qo,requires:["computeStyles"]};function k(e){return e.split("-")[0]}var Z=Math.max,$t=Math.min,nt=Math.round;function Ht(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Qt(){return!/^((?!chrome|android).)*safari/i.test(Ht())}function K(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var o=e.getBoundingClientRect(),r=1,s=1;t&&R(e)&&(r=e.offsetWidth>0&&nt(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&nt(o.height)/e.offsetHeight||1);var n=F(e)?_(e):window,l=n.visualViewport,a=!Qt()&&i,d=(o.left+(a&&l?l.offsetLeft:0))/r,c=(o.top+(a&&l?l.offsetTop:0))/s,h=o.width/r,f=o.height/s;return{width:h,height:f,top:c,right:d+h,bottom:c+f,left:d,x:d,y:c}}function Et(e){var t=K(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function te(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Nt(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function j(e){return _(e).getComputedStyle(e)}function Fe(e){return["table","td","th"].indexOf(D(e))>=0}function B(e){return((F(e)?e.ownerDocument:e.document)||window.document).documentElement}function at(e){return D(e)==="html"?e:e.assignedSlot||e.parentNode||(Nt(e)?e.host:null)||B(e)}function Mi(e){return!R(e)||j(e).position==="fixed"?null:e.offsetParent}function Vo(e){var t=/firefox/i.test(Ht()),i=/Trident/i.test(Ht());if(i&&R(e)){var o=j(e);if(o.position==="fixed")return null}var r=at(e);for(Nt(r)&&(r=r.host);R(r)&&["html","body"].indexOf(D(r))<0;){var s=j(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Q(e){for(var t=_(e),i=Mi(e);i&&Fe(i)&&j(i).position==="static";)i=Mi(i);return i&&(D(i)==="html"||D(i)==="body"&&j(i).position==="static")?t:i||Vo(e)||t}function Ct(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function It(e,t,i){return Z(e,$t(t,i))}function Bi(e,t,i){var o=It(e,t,i);return o>i?i:o}function ee(){return{top:0,right:0,bottom:0,left:0}}function ie(e){return Object.assign({},ee(),e)}function oe(e,t){return t.reduce(function(i,o){return i[o]=e,i},{})}var Fo=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,ie(typeof t!="number"?t:oe(t,pt))};function Ko(e){var t,i=e.state,o=e.name,r=e.options,s=i.elements.arrow,n=i.modifiersData.popperOffsets,l=k(i.placement),a=Ct(l),d=[I,O].indexOf(l)>=0,c=d?"height":"width";if(!(!s||!n)){var h=Fo(r.padding,i),f=Et(s),p=a==="y"?$:I,b=a==="y"?L:O,g=i.rects.reference[c]+i.rects.reference[a]-n[a]-i.rects.popper[c],v=n[a]-i.rects.reference[a],A=Q(s),E=A?a==="y"?A.clientHeight||0:A.clientWidth||0:0,C=g/2-v/2,m=h[p],x=E-f[c]-h[b],y=E/2-f[c]/2+C,S=It(m,y,x),M=a;i.modifiersData[o]=(t={},t[M]=S,t.centerOffset=S-y,t)}}function Xo(e){var t=e.state,i=e.options,o=i.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||te(t.elements.popper,r)&&(t.elements.arrow=r))}var Ni={name:"arrow",enabled:!0,phase:"main",fn:Ko,effect:Xo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(e){return e.split("-")[1]}var Yo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Go(e,t){var i=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:nt(i*r)/r||0,y:nt(o*r)/r||0}}function Hi(e){var t,i=e.popper,o=e.popperRect,r=e.placement,s=e.variation,n=e.offsets,l=e.position,a=e.gpuAcceleration,d=e.adaptive,c=e.roundOffsets,h=e.isFixed,f=n.x,p=f===void 0?0:f,b=n.y,g=b===void 0?0:b,v=typeof c=="function"?c({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var A=n.hasOwnProperty("x"),E=n.hasOwnProperty("y"),C=I,m=$,x=window;if(d){var y=Q(i),S="clientHeight",M="clientWidth";if(y===_(i)&&(y=B(i),j(y).position!=="static"&&l==="absolute"&&(S="scrollHeight",M="scrollWidth")),y=y,r===$||(r===I||r===O)&&s===St){m=L;var T=h&&y===x&&x.visualViewport?x.visualViewport.height:y[S];g-=T-o.height,g*=a?1:-1}if(r===I||(r===$||r===L)&&s===St){C=O;var P=h&&y===x&&x.visualViewport?x.visualViewport.width:y[M];p-=P-o.width,p*=a?1:-1}}var N=Object.assign({position:l},d&&Yo),G=c===!0?Go({x:p,y:g},_(i)):{x:p,y:g};if(p=G.x,g=G.y,a){var W;return Object.assign({},N,(W={},W[m]=E?"0":"",W[C]=A?"0":"",W.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",W))}return Object.assign({},N,(t={},t[m]=E?g+"px":"",t[C]=A?p+"px":"",t.transform="",t))}function Jo(e){var t=e.state,i=e.options,o=i.gpuAcceleration,r=o===void 0?!0:o,s=i.adaptive,n=s===void 0?!0:s,l=i.roundOffsets,a=l===void 0?!0:l,d={placement:k(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Hi(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Hi(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Wi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Jo,data:{}};var we={passive:!0};function Zo(e){var t=e.state,i=e.instance,o=e.options,r=o.scroll,s=r===void 0?!0:r,n=o.resize,l=n===void 0?!0:n,a=_(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach(function(c){c.addEventListener("scroll",i.update,we)}),l&&a.addEventListener("resize",i.update,we),function(){s&&d.forEach(function(c){c.removeEventListener("scroll",i.update,we)}),l&&a.removeEventListener("resize",i.update,we)}}var Ui={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Zo,data:{}};var Qo={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(e){return e.replace(/left|right|bottom|top/g,function(t){return Qo[t]})}var tr={start:"end",end:"start"};function Ae(e){return e.replace(/start|end/g,function(t){return tr[t]})}function Ot(e){var t=_(e),i=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:i,scrollTop:o}}function Pt(e){return K(B(e)).left+Ot(e).scrollLeft}function Ke(e,t){var i=_(e),o=B(e),r=i.visualViewport,s=o.clientWidth,n=o.clientHeight,l=0,a=0;if(r){s=r.width,n=r.height;var d=Qt();(d||!d&&t==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:n,x:l+Pt(e),y:a}}function Xe(e){var t,i=B(e),o=Ot(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=Z(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),n=Z(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+Pt(e),a=-o.scrollTop;return j(r||i).direction==="rtl"&&(l+=Z(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:n,x:l,y:a}}function Lt(e){var t=j(e),i=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+o)}function _e(e){return["html","body","#document"].indexOf(D(e))>=0?e.ownerDocument.body:R(e)&&Lt(e)?e:_e(at(e))}function ut(e,t){var i;t===void 0&&(t=[]);var o=_e(e),r=o===((i=e.ownerDocument)==null?void 0:i.body),s=_(o),n=r?[s].concat(s.visualViewport||[],Lt(o)?o:[]):o,l=t.concat(n);return r?l:l.concat(ut(at(n)))}function Ut(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function er(e,t){var i=K(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function ji(e,t,i){return t===xe?Ut(Ke(e,i)):F(t)?er(t,i):Ut(Xe(B(e)))}function ir(e){var t=ut(at(e)),i=["absolute","fixed"].indexOf(j(e).position)>=0,o=i&&R(e)?Q(e):e;return F(o)?t.filter(function(r){return F(r)&&te(r,o)&&D(r)!=="body"}):[]}function Ye(e,t,i,o){var r=t==="clippingParents"?ir(e):[].concat(t),s=[].concat(r,[i]),n=s[0],l=s.reduce(function(a,d){var c=ji(e,d,o);return a.top=Z(c.top,a.top),a.right=$t(c.right,a.right),a.bottom=$t(c.bottom,a.bottom),a.left=Z(c.left,a.left),a},ji(e,n,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function re(e){var t=e.reference,i=e.element,o=e.placement,r=o?k(o):null,s=o?X(o):null,n=t.x+t.width/2-i.width/2,l=t.y+t.height/2-i.height/2,a;switch(r){case $:a={x:n,y:t.y-i.height};break;case L:a={x:n,y:t.y+t.height};break;case O:a={x:t.x+t.width,y:l};break;case I:a={x:t.x-i.width,y:l};break;default:a={x:t.x,y:t.y}}var d=r?Ct(r):null;if(d!=null){var c=d==="y"?"height":"width";switch(s){case st:a[d]=a[d]-(t[c]/2-i[c]/2);break;case St:a[d]=a[d]+(t[c]/2-i[c]/2);break;default:}}return a}function tt(e,t){t===void 0&&(t={});var i=t,o=i.placement,r=o===void 0?e.placement:o,s=i.strategy,n=s===void 0?e.strategy:s,l=i.boundary,a=l===void 0?Ri:l,d=i.rootBoundary,c=d===void 0?xe:d,h=i.elementContext,f=h===void 0?Bt:h,p=i.altBoundary,b=p===void 0?!1:p,g=i.padding,v=g===void 0?0:g,A=ie(typeof v!="number"?v:oe(v,pt)),E=f===Bt?Ti:Bt,C=e.rects.popper,m=e.elements[b?E:f],x=Ye(F(m)?m:m.contextElement||B(e.elements.popper),a,c,n),y=K(e.elements.reference),S=re({reference:y,element:C,strategy:"absolute",placement:r}),M=Ut(Object.assign({},C,S)),T=f===Bt?M:y,P={top:x.top-T.top+A.top,bottom:T.bottom-x.bottom+A.bottom,left:x.left-T.left+A.left,right:T.right-x.right+A.right},N=e.modifiersData.offset;if(f===Bt&&N){var G=N[r];Object.keys(P).forEach(function(W){var vt=[O,L].indexOf(W)>=0?1:-1,gt=[$,L].indexOf(W)>=0?"y":"x";P[W]+=G[gt]*vt})}return P}function Ge(e,t){t===void 0&&(t={});var i=t,o=i.placement,r=i.boundary,s=i.rootBoundary,n=i.padding,l=i.flipVariations,a=i.allowedAutoPlacements,d=a===void 0?ye:a,c=X(o),h=c?l?Ve:Ve.filter(function(b){return X(b)===c}):pt,f=h.filter(function(b){return d.indexOf(b)>=0});f.length===0&&(f=h);var p=f.reduce(function(b,g){return b[g]=tt(e,{placement:g,boundary:r,rootBoundary:s,padding:n})[k(g)],b},{});return Object.keys(p).sort(function(b,g){return p[b]-p[g]})}function or(e){if(k(e)===be)return[];var t=Wt(e);return[Ae(e),t,Ae(t)]}function rr(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=i.mainAxis,s=r===void 0?!0:r,n=i.altAxis,l=n===void 0?!0:n,a=i.fallbackPlacements,d=i.padding,c=i.boundary,h=i.rootBoundary,f=i.altBoundary,p=i.flipVariations,b=p===void 0?!0:p,g=i.allowedAutoPlacements,v=t.options.placement,A=k(v),E=A===v,C=a||(E||!b?[Wt(v)]:or(v)),m=[v].concat(C).reduce(function(Dt,ct){return Dt.concat(k(ct)===be?Ge(t,{placement:ct,boundary:c,rootBoundary:h,padding:d,flipVariations:b,allowedAutoPlacements:g}):ct)},[]),x=t.rects.reference,y=t.rects.popper,S=new Map,M=!0,T=m[0],P=0;P<m.length;P++){var N=m[P],G=k(N),W=X(N)===st,vt=[$,L].indexOf(G)>=0,gt=vt?"width":"height",V=tt(t,{placement:N,boundary:c,rootBoundary:h,altBoundary:f,padding:d}),J=vt?W?O:I:W?L:$;x[gt]>y[gt]&&(J=Wt(J));var le=Wt(J),bt=[];if(s&&bt.push(V[G]<=0),l&&bt.push(V[J]<=0,V[le]<=0),bt.every(function(Dt){return Dt})){T=N,M=!1;break}S.set(N,bt)}if(M)for(var ce=b?3:1,Ie=function(ct){var qt=m.find(function(he){var xt=S.get(he);if(xt)return xt.slice(0,ct).every(function(Oe){return Oe})});if(qt)return T=qt,"break"},zt=ce;zt>0;zt--){var de=Ie(zt);if(de==="break")break}t.placement!==T&&(t.modifiersData[o]._skip=!0,t.placement=T,t.reset=!0)}}var zi={name:"flip",enabled:!0,phase:"main",fn:rr,requiresIfExists:["offset"],data:{_skip:!1}};function qi(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Vi(e){return[$,O,L,I].some(function(t){return e[t]>=0})}function sr(e){var t=e.state,i=e.name,o=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,n=tt(t,{elementContext:"reference"}),l=tt(t,{altBoundary:!0}),a=qi(n,o),d=qi(l,r,s),c=Vi(a),h=Vi(d);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}var Fi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sr};function nr(e,t,i){var o=k(e),r=[I,$].indexOf(o)>=0?-1:1,s=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,n=s[0],l=s[1];return n=n||0,l=(l||0)*r,[I,O].indexOf(o)>=0?{x:l,y:n}:{x:n,y:l}}function ar(e){var t=e.state,i=e.options,o=e.name,r=i.offset,s=r===void 0?[0,0]:r,n=ye.reduce(function(c,h){return c[h]=nr(h,t.rects,s),c},{}),l=n[t.placement],a=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=d),t.modifiersData[o]=n}var Ki={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ar};function lr(e){var t=e.state,i=e.name;t.modifiersData[i]=re({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Xi={name:"popperOffsets",enabled:!0,phase:"read",fn:lr,data:{}};function Je(e){return e==="x"?"y":"x"}function cr(e){var t=e.state,i=e.options,o=e.name,r=i.mainAxis,s=r===void 0?!0:r,n=i.altAxis,l=n===void 0?!1:n,a=i.boundary,d=i.rootBoundary,c=i.altBoundary,h=i.padding,f=i.tether,p=f===void 0?!0:f,b=i.tetherOffset,g=b===void 0?0:b,v=tt(t,{boundary:a,rootBoundary:d,padding:h,altBoundary:c}),A=k(t.placement),E=X(t.placement),C=!E,m=Ct(A),x=Je(m),y=t.modifiersData.popperOffsets,S=t.rects.reference,M=t.rects.popper,T=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,P=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(y){if(s){var W,vt=m==="y"?$:I,gt=m==="y"?L:O,V=m==="y"?"height":"width",J=y[m],le=J+v[vt],bt=J-v[gt],ce=p?-M[V]/2:0,Ie=E===st?S[V]:M[V],zt=E===st?-M[V]:-S[V],de=t.elements.arrow,Dt=p&&de?Et(de):{width:0,height:0},ct=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ee(),qt=ct[vt],he=ct[gt],xt=It(0,S[V],Dt[V]),Oe=C?S[V]/2-ce-xt-qt-P.mainAxis:Ie-xt-qt-P.mainAxis,no=C?-S[V]/2+ce+xt+he+P.mainAxis:zt+xt+he+P.mainAxis,Pe=t.elements.arrow&&Q(t.elements.arrow),ao=Pe?m==="y"?Pe.clientTop||0:Pe.clientLeft||0:0,li=(W=N?.[m])!=null?W:0,lo=J+Oe-li-ao,co=J+no-li,ci=It(p?$t(le,lo):le,J,p?Z(bt,co):bt);y[m]=ci,G[m]=ci-J}if(l){var di,ho=m==="x"?$:I,po=m==="x"?L:O,yt=y[x],pe=x==="y"?"height":"width",hi=yt+v[ho],pi=yt-v[po],Le=[$,I].indexOf(A)!==-1,ui=(di=N?.[x])!=null?di:0,fi=Le?hi:yt-S[pe]-M[pe]-ui+P.altAxis,mi=Le?yt+S[pe]+M[pe]-ui-P.altAxis:pi,vi=p&&Le?Bi(fi,yt,mi):It(p?fi:hi,yt,p?mi:pi);y[x]=vi,G[x]=vi-yt}t.modifiersData[o]=G}}var Yi={name:"preventOverflow",enabled:!0,phase:"main",fn:cr,requiresIfExists:["offset"]};function Ze(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Qe(e){return e===_(e)||!R(e)?Ot(e):Ze(e)}function dr(e){var t=e.getBoundingClientRect(),i=nt(t.width)/e.offsetWidth||1,o=nt(t.height)/e.offsetHeight||1;return i!==1||o!==1}function ti(e,t,i){i===void 0&&(i=!1);var o=R(t),r=R(t)&&dr(t),s=B(t),n=K(e,r,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&((D(t)!=="body"||Lt(s))&&(l=Qe(t)),R(t)?(a=K(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=Pt(s))),{x:n.left+l.scrollLeft-a.x,y:n.top+l.scrollTop-a.y,width:n.width,height:n.height}}function hr(e){var t=new Map,i=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function r(s){i.add(s.name);var n=[].concat(s.requires||[],s.requiresIfExists||[]);n.forEach(function(l){if(!i.has(l)){var a=t.get(l);a&&r(a)}}),o.push(s)}return e.forEach(function(s){i.has(s.name)||r(s)}),o}function ei(e){var t=hr(e);return Di.reduce(function(i,o){return i.concat(t.filter(function(r){return r.phase===o}))},[])}function ii(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function oi(e){var t=e.reduce(function(i,o){var r=i[o.name];return i[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,i},{});return Object.keys(t).map(function(i){return t[i]})}var Gi={placement:"bottom",modifiers:[],strategy:"absolute"};function Ji(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Zi(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,o=i===void 0?[]:i,r=t.defaultOptions,s=r===void 0?Gi:r;return function(l,a,d){d===void 0&&(d=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Gi,s),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},h=[],f=!1,p={state:c,setOptions:function(A){var E=typeof A=="function"?A(c.options):A;g(),c.options=Object.assign({},s,c.options,E),c.scrollParents={reference:F(l)?ut(l):l.contextElement?ut(l.contextElement):[],popper:ut(a)};var C=ei(oi([].concat(o,c.options.modifiers)));return c.orderedModifiers=C.filter(function(m){return m.enabled}),b(),p.update()},forceUpdate:function(){if(!f){var A=c.elements,E=A.reference,C=A.popper;if(Ji(E,C)){c.rects={reference:ti(E,Q(C),c.options.strategy==="fixed"),popper:Et(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(P){return c.modifiersData[P.name]=Object.assign({},P.data)});for(var m=0;m<c.orderedModifiers.length;m++){if(c.reset===!0){c.reset=!1,m=-1;continue}var x=c.orderedModifiers[m],y=x.fn,S=x.options,M=S===void 0?{}:S,T=x.name;typeof y=="function"&&(c=y({state:c,options:M,name:T,instance:p})||c)}}}},update:ii(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){g(),f=!0}};if(!Ji(l,a))return p;p.setOptions(d).then(function(v){!f&&d.onFirstUpdate&&d.onFirstUpdate(v)});function b(){c.orderedModifiers.forEach(function(v){var A=v.name,E=v.options,C=E===void 0?{}:E,m=v.effect;if(typeof m=="function"){var x=m({state:c,name:A,instance:p,options:C}),y=function(){};h.push(x||y)}})}function g(){h.forEach(function(v){return v()}),h=[]}return p}}var pr=[Ui,Xi,Wi,ki,Ki,zi,Yi,Ni,Fi],ri=Zi({defaultModifiers:pr});var Qi={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},to=e=>(...t)=>({_$litDirective$:e,values:t}),Se=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};var se=class extends Se{constructor(t){if(super(t),this.it=w,t.type!==Qi.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===w||t==null)return this._t=void 0,this.it=t;if(t===rt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};se.directiveName="unsafeHTML",se.resultType=1;var eo=to(se);var ne=e=>e??w;var $e=class{static showImage(t,i,o,r){let s;if(r||!(t instanceof HTMLImageElement)?s=n=>t.style.backgroundImage=this.prepareSrc(n):s=n=>t.src=n,s(o),i){let n=()=>{s(i)},l=new Image;l.addEventListener("load",n),l.src=i,l.complete&&(l.removeEventListener("load",n),n())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var ur=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}',fr=Object.defineProperty,z=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&fr(t,i,r),r},Rt,H=(Rt=class extends q{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[dt`
4
- ${it(ur)}
5
- `]}render(){return U`
1
+ var window;(window||={})["@cas-smartdesign/tab-bar"]=(()=>{var Ue=Object.defineProperty;var _o=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var So=Object.prototype.hasOwnProperty;var Eo=(e,t)=>{for(var i in t)Ue(e,i,{get:t[i],enumerable:!0})},Co=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of $o(t))!So.call(e,r)&&r!==i&&Ue(e,r,{get:()=>t[r],enumerable:!(o=_o(t,r))||o.enumerable});return e};var Io=e=>Co(Ue({},"__esModule",{value:!0}),e);var Mr={};Eo(Mr,{Tab:()=>Y,default:()=>et});var ge=globalThis,be=ge.ShadowRoot&&(ge.ShadyCSS===void 0||ge.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ze=Symbol(),$i=new WeakMap,Xt=class{constructor(t,i,o){if(this._$cssResult$=!0,o!==ze)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o,i=this.t;if(be&&t===void 0){let o=i!==void 0&&i.length===1;o&&(t=$i.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&$i.set(i,t))}return t}toString(){return this.cssText}},it=e=>new Xt(typeof e=="string"?e:e+"",void 0,ze),ht=(e,...t)=>{let i=e.length===1?e[0]:t.reduce(((o,r,s)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[s+1]),e[0]);return new Xt(i,e,ze)},Si=(e,t)=>{if(be)e.adoptedStyleSheets=t.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(let i of t){let o=document.createElement("style"),r=ge.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=i.cssText,e.appendChild(o)}},je=be?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let i="";for(let o of t.cssRules)i+=o.cssText;return it(i)})(e):e;var{is:Oo,defineProperty:Po,getOwnPropertyDescriptor:Lo,getOwnPropertyNames:To,getOwnPropertySymbols:Ro,getPrototypeOf:Do}=Object,xe=globalThis,Ei=xe.trustedTypes,ko=Ei?Ei.emptyScript:"",Mo=xe.reactiveElementPolyfillSupport,Yt=(e,t)=>e,Gt={toAttribute(e,t){switch(t){case Boolean:e=e?ko:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=e!==null;break;case Number:i=e===null?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch{i=null}}return i}},ye=(e,t)=>!Oo(e,t),Ci={attribute:!0,type:String,converter:Gt,reflect:!1,useDefault:!1,hasChanged:ye};Symbol.metadata??=Symbol("metadata"),xe.litPropertyMetadata??=new WeakMap;var ot=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=Ci){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(t,o,i);r!==void 0&&Po(this.prototype,t,r)}}static getPropertyDescriptor(t,i,o){let{get:r,set:s}=Lo(this.prototype,t)??{get(){return this[i]},set(n){this[i]=n}};return{get:r,set(n){let l=r?.call(this);s?.call(this,n),this.requestUpdate(t,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ci}static _$Ei(){if(this.hasOwnProperty(Yt("elementProperties")))return;let t=Do(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Yt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Yt("properties"))){let i=this.properties,o=[...To(i),...Ro(i)];for(let r of o)this.createProperty(r,i[r])}let t=this[Symbol.metadata];if(t!==null){let i=litPropertyMetadata.get(t);if(i!==void 0)for(let[o,r]of i)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[i,o]of this.elementProperties){let r=this._$Eu(i,o);r!==void 0&&this._$Eh.set(r,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let i=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let r of o)i.unshift(je(r))}else t!==void 0&&i.push(je(t));return i}static _$Eu(t,i){let o=i.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,i=this.constructor.elementProperties;for(let o of i.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Si(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,i,o){this._$AK(t,o)}_$ET(t,i){let o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){let s=(o.converter?.toAttribute!==void 0?o.converter:Gt).toAttribute(i,o.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,i){let o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let s=o.getPropertyOptions(r),n=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Gt;this._$Em=r;let l=n.fromAttribute(i,s.type);this[r]=l??this._$Ej?.get(r)??l,this._$Em=null}}requestUpdate(t,i,o){if(t!==void 0){let r=this.constructor,s=this[t];if(o??=r.getPropertyOptions(t),!((o.hasChanged??ye)(s,i)||o.useDefault&&o.reflect&&s===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,o))))return;this.C(t,i,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:o,reflect:r,wrapped:s},n){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??i??this[t]),s!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(i=void 0),this._$AL.set(t,i)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,s]of o){let{wrapped:n}=s,l=this[r];n!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,s,l)}}let t=!1,i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach((o=>o.hostUpdate?.())),this.update(i)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((i=>this._$ET(i,this[i]))),this._$EM()}updated(t){}firstUpdated(t){}};ot.elementStyles=[],ot.shadowRootOptions={mode:"open"},ot[Yt("elementProperties")]=new Map,ot[Yt("finalized")]=new Map,Mo?.({ReactiveElement:ot}),(xe.reactiveElementVersions??=[]).push("2.1.1");var Ve=globalThis,we=Ve.trustedTypes,Ii=we?we.createPolicy("lit-html",{createHTML:e=>e}):void 0,Fe="$lit$",rt=`lit$${Math.random().toFixed(9).slice(2)}$`,Ke="?"+rt,Bo=`<${Ke}>`,_t=document,Zt=()=>_t.createComment(""),Qt=e=>e===null||typeof e!="object"&&typeof e!="function",Xe=Array.isArray,Di=e=>Xe(e)||typeof e?.[Symbol.iterator]=="function",qe=`[
2
+ \f\r]`,Jt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Oi=/-->/g,Pi=/>/g,wt=RegExp(`>|${qe}(?:([^\\s"'>=/]+)(${qe}*=${qe}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Li=/'/g,Ti=/"/g,ki=/^(?:script|style|textarea|title)$/i,Ye=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),W=Ye(1),zr=Ye(2),jr=Ye(3),st=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Ri=new WeakMap,At=_t.createTreeWalker(_t,129);function Mi(e,t){if(!Xe(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ii!==void 0?Ii.createHTML(t):t}var Bi=(e,t)=>{let i=e.length-1,o=[],r,s=t===2?"<svg>":t===3?"<math>":"",n=Jt;for(let l=0;l<i;l++){let a=e[l],d,c,h=-1,f=0;for(;f<a.length&&(n.lastIndex=f,c=n.exec(a),c!==null);)f=n.lastIndex,n===Jt?c[1]==="!--"?n=Oi:c[1]!==void 0?n=Pi:c[2]!==void 0?(ki.test(c[2])&&(r=RegExp("</"+c[2],"g")),n=wt):c[3]!==void 0&&(n=wt):n===wt?c[0]===">"?(n=r??Jt,h=-1):c[1]===void 0?h=-2:(h=n.lastIndex-c[2].length,d=c[1],n=c[3]===void 0?wt:c[3]==='"'?Ti:Li):n===Ti||n===Li?n=wt:n===Oi||n===Pi?n=Jt:(n=wt,r=void 0);let p=n===wt&&e[l+1].startsWith("/>")?" ":"";s+=n===Jt?a+Bo:h>=0?(o.push(d),a.slice(0,h)+Fe+a.slice(h)+rt+p):a+rt+(h===-2?l:p)}return[Mi(e,s+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},te=class e{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let s=0,n=0,l=t.length-1,a=this.parts,[d,c]=Bi(t,i);if(this.el=e.createElement(d,o),At.currentNode=this.el.content,i===2||i===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=At.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(Fe)){let f=c[n++],p=r.getAttribute(h).split(rt),b=/([.?@])?(.*)/.exec(f);a.push({type:1,index:s,name:b[2],strings:p,ctor:b[1]==="."?_e:b[1]==="?"?$e:b[1]==="@"?Se:St}),r.removeAttribute(h)}else h.startsWith(rt)&&(a.push({type:6,index:s}),r.removeAttribute(h));if(ki.test(r.tagName)){let h=r.textContent.split(rt),f=h.length-1;if(f>0){r.textContent=we?we.emptyScript:"";for(let p=0;p<f;p++)r.append(h[p],Zt()),At.nextNode(),a.push({type:2,index:++s});r.append(h[f],Zt())}}}else if(r.nodeType===8)if(r.data===Ke)a.push({type:2,index:s});else{let h=-1;for(;(h=r.data.indexOf(rt,h+1))!==-1;)a.push({type:7,index:s}),h+=rt.length-1}s++}}static createElement(t,i){let o=_t.createElement("template");return o.innerHTML=t,o}};function $t(e,t,i=e,o){if(t===st)return t;let r=o!==void 0?i._$Co?.[o]:i._$Cl,s=Qt(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(e),r._$AT(e,i,o)),o!==void 0?(i._$Co??=[])[o]=r:i._$Cl=r),r!==void 0&&(t=$t(e,r._$AS(e,t.values),r,o)),t}var Ae=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:i},parts:o}=this._$AD,r=(t?.creationScope??_t).importNode(i,!0);At.currentNode=r;let s=At.nextNode(),n=0,l=0,a=o[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new Bt(s,s.nextSibling,this,t):a.type===1?d=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(d=new Ee(s,this,t)),this._$AV.push(d),a=o[++l]}n!==a?.index&&(s=At.nextNode(),n++)}return At.currentNode=_t,r}p(t){let i=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}},Bt=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,o,r){this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=$t(this,t,i),Qt(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==st&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Di(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==w&&Qt(this._$AH)?this._$AA.nextSibling.data=t:this.T(_t.createTextNode(t)),this._$AH=t}$(t){let{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=te.createElement(Mi(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(i);else{let s=new Ae(r,this),n=s.u(this.options);s.p(i),this.T(n),this._$AH=s}}_$AC(t){let i=Ri.get(t.strings);return i===void 0&&Ri.set(t.strings,i=new te(t)),i}k(t){Xe(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,o,r=0;for(let s of t)r===i.length?i.push(o=new e(this.O(Zt()),this.O(Zt()),this,this.options)):o=i[r],o._$AI(s),r++;r<i.length&&(this._$AR(o&&o._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},St=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,o,r,s){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=r,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=w}_$AI(t,i=this,o,r){let s=this.strings,n=!1;if(s===void 0)t=$t(this,t,i,0),n=!Qt(t)||t!==this._$AH&&t!==st,n&&(this._$AH=t);else{let l=t,a,d;for(t=s[0],a=0;a<s.length-1;a++)d=$t(this,l[o+a],i,a),d===st&&(d=this._$AH[a]),n||=!Qt(d)||d!==this._$AH[a],d===w?t=w:t!==w&&(t+=(d??"")+s[a+1]),this._$AH[a]=d}n&&!r&&this.j(t)}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},_e=class extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===w?void 0:t}},$e=class extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w)}},Se=class extends St{constructor(t,i,o,r,s){super(t,i,o,r,s),this.type=5}_$AI(t,i=this){if((t=$t(this,t,i,0)??w)===st)return;let o=this._$AH,r=t===w&&o!==w||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==w&&(o===w||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},Ee=class{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){$t(this,t)}},Ni={M:Fe,P:rt,A:Ke,C:1,L:Bi,R:Ae,D:Di,V:$t,I:Bt,H:St,N:$e,U:Se,B:_e,F:Ee},No=Ve.litHtmlPolyfillSupport;No?.(te,Bt),(Ve.litHtmlVersions??=[]).push("3.3.1");var Hi=(e,t,i)=>{let o=i?.renderBefore??t,r=o._$litPart$;if(r===void 0){let s=i?.renderBefore??null;o._$litPart$=r=new Bt(t.insertBefore(Zt(),s),s,void 0,i??{})}return r._$AI(e),r};var Ge=globalThis,q=class extends ot{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Hi(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return st}};q._$litElement$=!0,q.finalized=!0,Ge.litElementHydrateSupport?.({LitElement:q});var Ho=Ge.litElementPolyfillSupport;Ho?.({LitElement:q});(Ge.litElementVersions??=[]).push("4.2.1");var Wo={attribute:!0,type:String,converter:Gt,reflect:!1,hasChanged:ye},Uo=(e=Wo,t,i)=>{let{kind:o,metadata:r}=i,s=globalThis.litPropertyMetadata.get(r);if(s===void 0&&globalThis.litPropertyMetadata.set(r,s=new Map),o==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),o==="accessor"){let{name:n}=i;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,a,e)},init(l){return l!==void 0&&this.C(n,void 0,e,l),l}}}if(o==="setter"){let{name:n}=i;return function(l){let a=this[n];t.call(this,l),this.requestUpdate(n,a,e)}}throw Error("Unsupported decorator location: "+o)};function u(e){return(t,i)=>typeof i=="object"?Uo(e,t,i):((o,r,s)=>{let n=r.hasOwnProperty(s);return r.constructor.createProperty(s,o),n?Object.getOwnPropertyDescriptor(r,s):void 0})(e,t,i)}var S="top",L="bottom",O="right",I="left",Ce="auto",pt=[S,L,O,I],nt="start",Et="end",Wi="clippingParents",Ie="viewport",Nt="popper",Ui="reference",Je=pt.reduce(function(e,t){return e.concat([t+"-"+nt,t+"-"+Et])},[]),Oe=[].concat(pt,[Ce]).reduce(function(e,t){return e.concat([t,t+"-"+nt,t+"-"+Et])},[]),zo="beforeRead",jo="read",qo="afterRead",Vo="beforeMain",Fo="main",Ko="afterMain",Xo="beforeWrite",Yo="write",Go="afterWrite",zi=[zo,jo,qo,Vo,Fo,Ko,Xo,Yo,Go];function D(e){return e?(e.nodeName||"").toLowerCase():null}function _(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function F(e){var t=_(e).Element;return e instanceof t||e instanceof Element}function T(e){var t=_(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ht(e){if(typeof ShadowRoot>"u")return!1;var t=_(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Jo(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var o=t.styles[i]||{},r=t.attributes[i]||{},s=t.elements[i];!T(s)||!D(s)||(Object.assign(s.style,o),Object.keys(r).forEach(function(n){var l=r[n];l===!1?s.removeAttribute(n):s.setAttribute(n,l===!0?"":l)}))})}function Zo(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],s=t.attributes[o]||{},n=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:i[o]),l=n.reduce(function(a,d){return a[d]="",a},{});!T(r)||!D(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var ji={name:"applyStyles",enabled:!0,phase:"write",fn:Jo,effect:Zo,requires:["computeStyles"]};function k(e){return e.split("-")[0]}var Z=Math.max,Ct=Math.min,at=Math.round;function Wt(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ee(){return!/^((?!chrome|android).)*safari/i.test(Wt())}function K(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var o=e.getBoundingClientRect(),r=1,s=1;t&&T(e)&&(r=e.offsetWidth>0&&at(o.width)/e.offsetWidth||1,s=e.offsetHeight>0&&at(o.height)/e.offsetHeight||1);var n=F(e)?_(e):window,l=n.visualViewport,a=!ee()&&i,d=(o.left+(a&&l?l.offsetLeft:0))/r,c=(o.top+(a&&l?l.offsetTop:0))/s,h=o.width/r,f=o.height/s;return{width:h,height:f,top:c,right:d+h,bottom:c+f,left:d,x:d,y:c}}function It(e){var t=K(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function ie(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Ht(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function j(e){return _(e).getComputedStyle(e)}function Ze(e){return["table","td","th"].indexOf(D(e))>=0}function B(e){return((F(e)?e.ownerDocument:e.document)||window.document).documentElement}function lt(e){return D(e)==="html"?e:e.assignedSlot||e.parentNode||(Ht(e)?e.host:null)||B(e)}function qi(e){return!T(e)||j(e).position==="fixed"?null:e.offsetParent}function Qo(e){var t=/firefox/i.test(Wt()),i=/Trident/i.test(Wt());if(i&&T(e)){var o=j(e);if(o.position==="fixed")return null}var r=lt(e);for(Ht(r)&&(r=r.host);T(r)&&["html","body"].indexOf(D(r))<0;){var s=j(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Q(e){for(var t=_(e),i=qi(e);i&&Ze(i)&&j(i).position==="static";)i=qi(i);return i&&(D(i)==="html"||D(i)==="body"&&j(i).position==="static")?t:i||Qo(e)||t}function Ot(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pt(e,t,i){return Z(e,Ct(t,i))}function Vi(e,t,i){var o=Pt(e,t,i);return o>i?i:o}function oe(){return{top:0,right:0,bottom:0,left:0}}function re(e){return Object.assign({},oe(),e)}function se(e,t){return t.reduce(function(i,o){return i[o]=e,i},{})}var tr=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,re(typeof t!="number"?t:se(t,pt))};function er(e){var t,i=e.state,o=e.name,r=e.options,s=i.elements.arrow,n=i.modifiersData.popperOffsets,l=k(i.placement),a=Ot(l),d=[I,O].indexOf(l)>=0,c=d?"height":"width";if(!(!s||!n)){var h=tr(r.padding,i),f=It(s),p=a==="y"?S:I,b=a==="y"?L:O,g=i.rects.reference[c]+i.rects.reference[a]-n[a]-i.rects.popper[c],v=n[a]-i.rects.reference[a],A=Q(s),E=A?a==="y"?A.clientHeight||0:A.clientWidth||0:0,C=g/2-v/2,m=h[p],x=E-f[c]-h[b],y=E/2-f[c]/2+C,$=Pt(m,y,x),M=a;i.modifiersData[o]=(t={},t[M]=$,t.centerOffset=$-y,t)}}function ir(e){var t=e.state,i=e.options,o=i.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||ie(t.elements.popper,r)&&(t.elements.arrow=r))}var Fi={name:"arrow",enabled:!0,phase:"main",fn:er,effect:ir,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function X(e){return e.split("-")[1]}var or={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rr(e,t){var i=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:at(i*r)/r||0,y:at(o*r)/r||0}}function Ki(e){var t,i=e.popper,o=e.popperRect,r=e.placement,s=e.variation,n=e.offsets,l=e.position,a=e.gpuAcceleration,d=e.adaptive,c=e.roundOffsets,h=e.isFixed,f=n.x,p=f===void 0?0:f,b=n.y,g=b===void 0?0:b,v=typeof c=="function"?c({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var A=n.hasOwnProperty("x"),E=n.hasOwnProperty("y"),C=I,m=S,x=window;if(d){var y=Q(i),$="clientHeight",M="clientWidth";if(y===_(i)&&(y=B(i),j(y).position!=="static"&&l==="absolute"&&($="scrollHeight",M="scrollWidth")),y=y,r===S||(r===I||r===O)&&s===Et){m=L;var R=h&&y===x&&x.visualViewport?x.visualViewport.height:y[$];g-=R-o.height,g*=a?1:-1}if(r===I||(r===S||r===L)&&s===Et){C=O;var P=h&&y===x&&x.visualViewport?x.visualViewport.width:y[M];p-=P-o.width,p*=a?1:-1}}var H=Object.assign({position:l},d&&or),G=c===!0?rr({x:p,y:g},_(i)):{x:p,y:g};if(p=G.x,g=G.y,a){var z;return Object.assign({},H,(z={},z[m]=E?"0":"",z[C]=A?"0":"",z.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",z))}return Object.assign({},H,(t={},t[m]=E?g+"px":"",t[C]=A?p+"px":"",t.transform="",t))}function sr(e){var t=e.state,i=e.options,o=i.gpuAcceleration,r=o===void 0?!0:o,s=i.adaptive,n=s===void 0?!0:s,l=i.roundOffsets,a=l===void 0?!0:l,d={placement:k(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ki(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ki(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Xi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sr,data:{}};var Pe={passive:!0};function nr(e){var t=e.state,i=e.instance,o=e.options,r=o.scroll,s=r===void 0?!0:r,n=o.resize,l=n===void 0?!0:n,a=_(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach(function(c){c.addEventListener("scroll",i.update,Pe)}),l&&a.addEventListener("resize",i.update,Pe),function(){s&&d.forEach(function(c){c.removeEventListener("scroll",i.update,Pe)}),l&&a.removeEventListener("resize",i.update,Pe)}}var Yi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:nr,data:{}};var ar={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(e){return e.replace(/left|right|bottom|top/g,function(t){return ar[t]})}var lr={start:"end",end:"start"};function Le(e){return e.replace(/start|end/g,function(t){return lr[t]})}function Lt(e){var t=_(e),i=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:i,scrollTop:o}}function Tt(e){return K(B(e)).left+Lt(e).scrollLeft}function Qe(e,t){var i=_(e),o=B(e),r=i.visualViewport,s=o.clientWidth,n=o.clientHeight,l=0,a=0;if(r){s=r.width,n=r.height;var d=ee();(d||!d&&t==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:n,x:l+Tt(e),y:a}}function ti(e){var t,i=B(e),o=Lt(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=Z(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),n=Z(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+Tt(e),a=-o.scrollTop;return j(r||i).direction==="rtl"&&(l+=Z(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:n,x:l,y:a}}function Rt(e){var t=j(e),i=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+o)}function Te(e){return["html","body","#document"].indexOf(D(e))>=0?e.ownerDocument.body:T(e)&&Rt(e)?e:Te(lt(e))}function ut(e,t){var i;t===void 0&&(t=[]);var o=Te(e),r=o===((i=e.ownerDocument)==null?void 0:i.body),s=_(o),n=r?[s].concat(s.visualViewport||[],Rt(o)?o:[]):o,l=t.concat(n);return r?l:l.concat(ut(lt(n)))}function zt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function cr(e,t){var i=K(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function Gi(e,t,i){return t===Ie?zt(Qe(e,i)):F(t)?cr(t,i):zt(ti(B(e)))}function dr(e){var t=ut(lt(e)),i=["absolute","fixed"].indexOf(j(e).position)>=0,o=i&&T(e)?Q(e):e;return F(o)?t.filter(function(r){return F(r)&&ie(r,o)&&D(r)!=="body"}):[]}function ei(e,t,i,o){var r=t==="clippingParents"?dr(e):[].concat(t),s=[].concat(r,[i]),n=s[0],l=s.reduce(function(a,d){var c=Gi(e,d,o);return a.top=Z(c.top,a.top),a.right=Ct(c.right,a.right),a.bottom=Ct(c.bottom,a.bottom),a.left=Z(c.left,a.left),a},Gi(e,n,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function ne(e){var t=e.reference,i=e.element,o=e.placement,r=o?k(o):null,s=o?X(o):null,n=t.x+t.width/2-i.width/2,l=t.y+t.height/2-i.height/2,a;switch(r){case S:a={x:n,y:t.y-i.height};break;case L:a={x:n,y:t.y+t.height};break;case O:a={x:t.x+t.width,y:l};break;case I:a={x:t.x-i.width,y:l};break;default:a={x:t.x,y:t.y}}var d=r?Ot(r):null;if(d!=null){var c=d==="y"?"height":"width";switch(s){case nt:a[d]=a[d]-(t[c]/2-i[c]/2);break;case Et:a[d]=a[d]+(t[c]/2-i[c]/2);break;default:}}return a}function tt(e,t){t===void 0&&(t={});var i=t,o=i.placement,r=o===void 0?e.placement:o,s=i.strategy,n=s===void 0?e.strategy:s,l=i.boundary,a=l===void 0?Wi:l,d=i.rootBoundary,c=d===void 0?Ie:d,h=i.elementContext,f=h===void 0?Nt:h,p=i.altBoundary,b=p===void 0?!1:p,g=i.padding,v=g===void 0?0:g,A=re(typeof v!="number"?v:se(v,pt)),E=f===Nt?Ui:Nt,C=e.rects.popper,m=e.elements[b?E:f],x=ei(F(m)?m:m.contextElement||B(e.elements.popper),a,c,n),y=K(e.elements.reference),$=ne({reference:y,element:C,strategy:"absolute",placement:r}),M=zt(Object.assign({},C,$)),R=f===Nt?M:y,P={top:x.top-R.top+A.top,bottom:R.bottom-x.bottom+A.bottom,left:x.left-R.left+A.left,right:R.right-x.right+A.right},H=e.modifiersData.offset;if(f===Nt&&H){var G=H[r];Object.keys(P).forEach(function(z){var vt=[O,L].indexOf(z)>=0?1:-1,gt=[S,L].indexOf(z)>=0?"y":"x";P[z]+=G[gt]*vt})}return P}function ii(e,t){t===void 0&&(t={});var i=t,o=i.placement,r=i.boundary,s=i.rootBoundary,n=i.padding,l=i.flipVariations,a=i.allowedAutoPlacements,d=a===void 0?Oe:a,c=X(o),h=c?l?Je:Je.filter(function(b){return X(b)===c}):pt,f=h.filter(function(b){return d.indexOf(b)>=0});f.length===0&&(f=h);var p=f.reduce(function(b,g){return b[g]=tt(e,{placement:g,boundary:r,rootBoundary:s,padding:n})[k(g)],b},{});return Object.keys(p).sort(function(b,g){return p[b]-p[g]})}function hr(e){if(k(e)===Ce)return[];var t=Ut(e);return[Le(e),t,Le(t)]}function pr(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=i.mainAxis,s=r===void 0?!0:r,n=i.altAxis,l=n===void 0?!0:n,a=i.fallbackPlacements,d=i.padding,c=i.boundary,h=i.rootBoundary,f=i.altBoundary,p=i.flipVariations,b=p===void 0?!0:p,g=i.allowedAutoPlacements,v=t.options.placement,A=k(v),E=A===v,C=a||(E||!b?[Ut(v)]:hr(v)),m=[v].concat(C).reduce(function(Mt,dt){return Mt.concat(k(dt)===Ce?ii(t,{placement:dt,boundary:c,rootBoundary:h,padding:d,flipVariations:b,allowedAutoPlacements:g}):dt)},[]),x=t.rects.reference,y=t.rects.popper,$=new Map,M=!0,R=m[0],P=0;P<m.length;P++){var H=m[P],G=k(H),z=X(H)===nt,vt=[S,L].indexOf(G)>=0,gt=vt?"width":"height",V=tt(t,{placement:H,boundary:c,rootBoundary:h,altBoundary:f,padding:d}),J=vt?z?O:I:z?L:S;x[gt]>y[gt]&&(J=Ut(J));var pe=Ut(J),bt=[];if(s&&bt.push(V[G]<=0),l&&bt.push(V[J]<=0,V[pe]<=0),bt.every(function(Mt){return Mt})){R=H,M=!1;break}$.set(H,bt)}if(M)for(var ue=b?3:1,Be=function(dt){var Kt=m.find(function(me){var xt=$.get(me);if(xt)return xt.slice(0,dt).every(function(Ne){return Ne})});if(Kt)return R=Kt,"break"},Ft=ue;Ft>0;Ft--){var fe=Be(Ft);if(fe==="break")break}t.placement!==R&&(t.modifiersData[o]._skip=!0,t.placement=R,t.reset=!0)}}var Ji={name:"flip",enabled:!0,phase:"main",fn:pr,requiresIfExists:["offset"],data:{_skip:!1}};function Zi(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function Qi(e){return[S,O,L,I].some(function(t){return e[t]>=0})}function ur(e){var t=e.state,i=e.name,o=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,n=tt(t,{elementContext:"reference"}),l=tt(t,{altBoundary:!0}),a=Zi(n,o),d=Zi(l,r,s),c=Qi(a),h=Qi(d);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}var to={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ur};function fr(e,t,i){var o=k(e),r=[I,S].indexOf(o)>=0?-1:1,s=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,n=s[0],l=s[1];return n=n||0,l=(l||0)*r,[I,O].indexOf(o)>=0?{x:l,y:n}:{x:n,y:l}}function mr(e){var t=e.state,i=e.options,o=e.name,r=i.offset,s=r===void 0?[0,0]:r,n=Oe.reduce(function(c,h){return c[h]=fr(h,t.rects,s),c},{}),l=n[t.placement],a=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=d),t.modifiersData[o]=n}var eo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:mr};function vr(e){var t=e.state,i=e.name;t.modifiersData[i]=ne({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var io={name:"popperOffsets",enabled:!0,phase:"read",fn:vr,data:{}};function oi(e){return e==="x"?"y":"x"}function gr(e){var t=e.state,i=e.options,o=e.name,r=i.mainAxis,s=r===void 0?!0:r,n=i.altAxis,l=n===void 0?!1:n,a=i.boundary,d=i.rootBoundary,c=i.altBoundary,h=i.padding,f=i.tether,p=f===void 0?!0:f,b=i.tetherOffset,g=b===void 0?0:b,v=tt(t,{boundary:a,rootBoundary:d,padding:h,altBoundary:c}),A=k(t.placement),E=X(t.placement),C=!E,m=Ot(A),x=oi(m),y=t.modifiersData.popperOffsets,$=t.rects.reference,M=t.rects.popper,R=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,P=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(y){if(s){var z,vt=m==="y"?S:I,gt=m==="y"?L:O,V=m==="y"?"height":"width",J=y[m],pe=J+v[vt],bt=J-v[gt],ue=p?-M[V]/2:0,Be=E===nt?$[V]:M[V],Ft=E===nt?-M[V]:-$[V],fe=t.elements.arrow,Mt=p&&fe?It(fe):{width:0,height:0},dt=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:oe(),Kt=dt[vt],me=dt[gt],xt=Pt(0,$[V],Mt[V]),Ne=C?$[V]/2-ue-xt-Kt-P.mainAxis:Be-xt-Kt-P.mainAxis,go=C?-$[V]/2+ue+xt+me+P.mainAxis:Ft+xt+me+P.mainAxis,He=t.elements.arrow&&Q(t.elements.arrow),bo=He?m==="y"?He.clientTop||0:He.clientLeft||0:0,mi=(z=H?.[m])!=null?z:0,xo=J+Ne-mi-bo,yo=J+go-mi,vi=Pt(p?Ct(pe,xo):pe,J,p?Z(bt,yo):bt);y[m]=vi,G[m]=vi-J}if(l){var gi,wo=m==="x"?S:I,Ao=m==="x"?L:O,yt=y[x],ve=x==="y"?"height":"width",bi=yt+v[wo],xi=yt-v[Ao],We=[S,I].indexOf(A)!==-1,yi=(gi=H?.[x])!=null?gi:0,wi=We?bi:yt-$[ve]-M[ve]-yi+P.altAxis,Ai=We?yt+$[ve]+M[ve]-yi-P.altAxis:xi,_i=p&&We?Vi(wi,yt,Ai):Pt(p?wi:bi,yt,p?Ai:xi);y[x]=_i,G[x]=_i-yt}t.modifiersData[o]=G}}var oo={name:"preventOverflow",enabled:!0,phase:"main",fn:gr,requiresIfExists:["offset"]};function ri(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function si(e){return e===_(e)||!T(e)?Lt(e):ri(e)}function br(e){var t=e.getBoundingClientRect(),i=at(t.width)/e.offsetWidth||1,o=at(t.height)/e.offsetHeight||1;return i!==1||o!==1}function ni(e,t,i){i===void 0&&(i=!1);var o=T(t),r=T(t)&&br(t),s=B(t),n=K(e,r,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&((D(t)!=="body"||Rt(s))&&(l=si(t)),T(t)?(a=K(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=Tt(s))),{x:n.left+l.scrollLeft-a.x,y:n.top+l.scrollTop-a.y,width:n.width,height:n.height}}function xr(e){var t=new Map,i=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function r(s){i.add(s.name);var n=[].concat(s.requires||[],s.requiresIfExists||[]);n.forEach(function(l){if(!i.has(l)){var a=t.get(l);a&&r(a)}}),o.push(s)}return e.forEach(function(s){i.has(s.name)||r(s)}),o}function ai(e){var t=xr(e);return zi.reduce(function(i,o){return i.concat(t.filter(function(r){return r.phase===o}))},[])}function li(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function ci(e){var t=e.reduce(function(i,o){var r=i[o.name];return i[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,i},{});return Object.keys(t).map(function(i){return t[i]})}var ro={placement:"bottom",modifiers:[],strategy:"absolute"};function so(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function no(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,o=i===void 0?[]:i,r=t.defaultOptions,s=r===void 0?ro:r;return function(l,a,d){d===void 0&&(d=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},ro,s),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},h=[],f=!1,p={state:c,setOptions:function(A){var E=typeof A=="function"?A(c.options):A;g(),c.options=Object.assign({},s,c.options,E),c.scrollParents={reference:F(l)?ut(l):l.contextElement?ut(l.contextElement):[],popper:ut(a)};var C=ai(ci([].concat(o,c.options.modifiers)));return c.orderedModifiers=C.filter(function(m){return m.enabled}),b(),p.update()},forceUpdate:function(){if(!f){var A=c.elements,E=A.reference,C=A.popper;if(so(E,C)){c.rects={reference:ni(E,Q(C),c.options.strategy==="fixed"),popper:It(C)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(P){return c.modifiersData[P.name]=Object.assign({},P.data)});for(var m=0;m<c.orderedModifiers.length;m++){if(c.reset===!0){c.reset=!1,m=-1;continue}var x=c.orderedModifiers[m],y=x.fn,$=x.options,M=$===void 0?{}:$,R=x.name;typeof y=="function"&&(c=y({state:c,options:M,name:R,instance:p})||c)}}}},update:li(function(){return new Promise(function(v){p.forceUpdate(),v(c)})}),destroy:function(){g(),f=!0}};if(!so(l,a))return p;p.setOptions(d).then(function(v){!f&&d.onFirstUpdate&&d.onFirstUpdate(v)});function b(){c.orderedModifiers.forEach(function(v){var A=v.name,E=v.options,C=E===void 0?{}:E,m=v.effect;if(typeof m=="function"){var x=m({state:c,name:A,instance:p,options:C}),y=function(){};h.push(x||y)}})}function g(){h.forEach(function(v){return v()}),h=[]}return p}}var yr=[Yi,io,Xi,ji,eo,Ji,oo,Fi,to],di=no({defaultModifiers:yr});var qt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ae=e=>(...t)=>({_$litDirective$:e,values:t}),jt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,o){this._$Ct=t,this._$AM=i,this._$Ci=o}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};var le=class extends jt{constructor(t){if(super(t),this.it=w,t.type!==qt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===w||t==null)return this._t=void 0,this.it=t;if(t===st)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};le.directiveName="unsafeHTML",le.resultType=1;var ao=ae(le);var ce=e=>e??w;var{I:hc}=Ni;var lo=e=>e.strings===void 0;var de=(e,t)=>{let i=e._$AN;if(i===void 0)return!1;for(let o of i)o._$AO?.(t,!1),de(o,t);return!0},Re=e=>{let t,i;do{if((t=e._$AM)===void 0)break;i=t._$AN,i.delete(e),e=t}while(i?.size===0)},co=e=>{for(let t;t=e._$AM;e=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(e))break;i.add(e),_r(t)}};function wr(e){this._$AN!==void 0?(Re(this),this._$AM=e,co(this)):this._$AM=e}function Ar(e,t=!1,i=0){let o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let s=i;s<o.length;s++)de(o[s],!1),Re(o[s]);else o!=null&&(de(o,!1),Re(o));else de(this,e)}var _r=e=>{e.type==qt.CHILD&&(e._$AP??=Ar,e._$AQ??=wr)},De=class extends jt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,o){super._$AT(t,i,o),co(this),this.isConnected=t._$AU}_$AO(t,i=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),i&&(de(this,t),Re(this))}setValue(t){if(lo(this._$Ct))this._$Ct._$AI(t,this);else{let i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}};var ho=e=>e?e.startsWith("url")?e:`url("${e}")`:null,$r=(e,t)=>{if(e){let i=new Image;i.addEventListener("load",t),i.src=e,i.complete&&(i.removeEventListener("load",t),window.queueMicrotask(()=>t()))}};var hi=class extends De{constructor(t){if(super(t),t.type!==qt.ATTRIBUTE||t.name!=="src"&&t.name!=="style")throw new Error("The `placeholder` directive must be used in the `src` or `style` attributes")}update(t,[i,o]){return this.useCssBackground=t.name=="style",this.render(i,o)}render(t,i){this.loadingToken!=null&&(this.loadingToken.cancelled=!0);let o={cancelled:!1};return this.loadingToken=o,typeof t=="string"?this.preload(t,o):t?.then(r=>{this.preload(r,o)}),this.useCssBackground?ho(i):i}preload(t,i){t!=null&&!i.cancelled&&$r(t,()=>{i.cancelled||this.setValue(this.useCssBackground?ho(t):t)})}},po=ae(hi);var Sr=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.description.with-icon{display:flex;align-items:center;gap:4px}.description.with-icon .description-icon{width:var(--sd-list-item-description-font-size, 13px);height:var(--sd-list-item-description-font-size, 13px);background-repeat:no-repeat;background-position:bottom;background-size:90%}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}',Er=Object.defineProperty,U=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&Er(t,i,r),r},Dt,N=(Dt=class extends q{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[ht`
4
+ ${it(Sr)}
5
+ `]}render(){return W`
6
6
  <div class="container">
7
- ${this.getLevelIndicators().map((e,t)=>U` <div class="level-indicator level-${t}"></div> `)}
7
+ ${this.getLevelIndicators().map((e,t)=>W` <div class="level-indicator level-${t}"></div> `)}
8
8
  <div class="side-content">
9
9
  <slot name="left-content"></slot>
10
10
  ${this.renderIcon()}
11
11
  </div>
12
12
  <div class="labels">
13
13
  ${this.renderLabel("caption",this.caption,this.captionAttrTitle)}
14
- ${this.renderLabel("description",this.description,this.descriptionAttrTitle)}
14
+ ${this.renderLabel("description",this.description,this.descriptionAttrTitle,this.descriptionIcon)}
15
15
  </div>
16
16
  <div class="side-content">
17
17
  <slot name="right-content"></slot>
18
18
  </div>
19
19
  </div>
20
- `}renderIcon(){if(this.icon||this.iconPlaceholder){let e=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return U`
21
- <div
22
- class="icon-wrapper"
23
- @pointerdown="${this.handleIconClick}"
24
- style="${ne(e)}"
25
- role="img"
26
- aria-label="${ne(this.iconAttrAriaLabel)}"
27
- title="${ne(this.iconAttrTitle)}"
28
- >
29
- <div class="icon"></div>
30
- </div>
31
- `}return w}renderLabel(e,t,i){return t?U`
32
- <div class="${e}" title="${ne(i)}">
33
- ${this.contentMode==="html"?eo(t):t}
20
+ `}renderIcon(){return this.icon||this.iconPlaceholder?W`<div
21
+ class="icon-wrapper"
22
+ @pointerdown="${this.handleIconClick}"
23
+ style="background-color:${ce(this.iconBackgroundColor)};"
24
+ role="img"
25
+ aria-label="${ce(this.iconAttrAriaLabel)}"
26
+ title="${ce(this.iconAttrTitle)}"
27
+ >
28
+ <div class="icon" style="background-image:${po(this.icon,this.iconPlaceholder)}"></div>
29
+ </div> `:w}renderLabel(e,t,i,o){return t?W`
30
+ <div class="${e} ${o?"with-icon":""}" title="${ce(i)}">
31
+ ${o?W` <div class="${e}-icon" style="background-image:url('${o}')" aria-hidden="true"></div> `:w}
32
+ ${this.contentMode==="html"?ao(t):t}
34
33
  </div>
35
- `:w}updated(e){super.updated(e),(e.has("icon")||e.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&$e.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),e.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let e=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,i=this.shadowRoot.querySelector(".caption");i&&(t+=i.scrollWidth-i.clientWidth);let o=this.shadowRoot.querySelector(".description");return o&&(t=Math.max(t,o.scrollWidth-o.clientWidth)),t>0&&t++,e&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(e){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",e))&&e.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},Rt.ID="sd-list-item",Rt.ensureDefined=()=>{customElements.get(Rt.ID)||customElements.define(Rt.ID,Rt)},Rt);z([u({type:String})],H.prototype,"caption");z([u({type:String})],H.prototype,"description");z([u({type:Boolean})],H.prototype,"selected");z([u({type:String})],H.prototype,"icon");z([u({type:String})],H.prototype,"iconBackgroundColor");z([u({type:String})],H.prototype,"iconPlaceholder");z([u({type:Number})],H.prototype,"level");z([u()],H.prototype,"contentMode");z([u({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],H.prototype,"enableLineClamp");z([u({converter:{fromAttribute:e=>e=="true",toAttribute:e=>e},reflect:!0,attribute:"aria-disabled"})],H.prototype,"disabled");z([u({type:String,attribute:"icon-attr-aria-label"})],H.prototype,"iconAttrAriaLabel");z([u({type:String,reflect:!0})],H.prototype,"role");z([u({type:String,attribute:"caption-attr-title"})],H.prototype,"captionAttrTitle");z([u({type:String,attribute:"description-attr-title"})],H.prototype,"descriptionAttrTitle");z([u({type:String,attribute:"icon-attr-title"})],H.prototype,"iconAttrTitle");var Tt=H,io=(e,t)=>{let i=document.createElement(Tt.ID);if(e){if(i.caption=e.caption,i.description=e.description,i.icon=e.icon,i.iconBackgroundColor=e.iconBackgroundColor,i.iconPlaceholder=e.iconPlaceholder,i.level=e.level,i.disabled=e.disabled,e.contentMode&&(i.contentMode=e.contentMode),e.leftContentGenerator){let o=e.leftContentGenerator(e,i);o&&(o.slot="left-content",i.appendChild(o))}if(e.rightContentGenerator){let o=e.rightContentGenerator(e,i);o&&(o.slot="right-content",i.appendChild(o))}}return i};Tt.ensureDefined();var si=class{getOffsetForIndexAndAlignment(t,i,o,r,s,n){let l=Math.max(0,n*r),a=Math.min(l,t*r),d=Math.max(0,t*r-s+r);switch(i){case"start":return a;case"end":return d;case"center":{let c=Math.round(d+(a-d)/2);return c<Math.ceil(s/2)?0:c>l+Math.floor(s/2)?l:c}case"auto":default:return o>=d&&o<=a?o:o<d?d:a}}debounce(t){let i;return(...o)=>{i&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{t(...o),i=null})}}},mr=new si,Ee=class{constructor(t=100,i=5){this.pageSize=t,this.preloadedItemsCount=i,this._finalSizeIsKnown=!1,this._itemCache=[],this._lastRequestedFirstIndex=0,this._lastRequestedLastIndex=0,this._lastLoadedIndex=0,this.handleListDataRequest=o=>{let{startIndex:r,stopIndex:s}=o.detail;this._lastRequestedFirstIndex=r,this._lastRequestedLastIndex=s,this._list.items=this._itemCache.slice(r,s+1),!this.finalSizeIsKnown&&this._lastLoadedIndex<s+this.preloadedItemsCount&&this.requestData()},this.itemCount=t}get currentPage(){return this.items.length==0&&this.finalSizeIsKnown?0:Math.floor((this.items.length-1)/this.pageSize)}get finalSizeIsKnown(){return this._finalSizeIsKnown}set finalSizeIsKnown(t){this._finalSizeIsKnown=t,t&&(this.itemCount=this._itemCache.length),this._list&&(this._list.finalSizeIsKnown=t)}get itemCount(){return this._itemCount}set itemCount(t){this._itemCount=t,this._list&&(this._list.itemCount=t)}get items(){return this._itemCache}set items(t){this._itemCache=t,this.onItemsChange()}addItems(t){this._itemCache=this._itemCache.concat(t),this.onItemsChange()}connectList(t){this._list&&this._list.removeEventListener("data-request",this.handleListDataRequest),this._list=t,t.itemCount=this.itemCount,t.addEventListener("data-request",this.handleListDataRequest),t.finalSizeIsKnown=this._finalSizeIsKnown}onItemsChange(){this._pendingDataRequest=!1,this._lastLoadedIndex=this._itemCache.length-1,this.finalSizeIsKnown?this.itemCount=this._itemCache.length:this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex),this._list&&(this._list.items=this._itemCache.slice(this._lastRequestedFirstIndex,this._lastRequestedLastIndex+1))}requestData(){if(!this._pendingDataRequest)if(this.onDataRequest)this._pendingDataRequest=!0,this.onDataRequest(this.currentPage+1),this._lastLoadedIndex+=this.pageSize-1,this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex);else throw Error("The final size is not yet known and the list would require item data from index "+this._lastRequestedFirstIndex+". to "+this._lastRequestedLastIndex+". which is not possible to load without a configured onDataRequest")}},vr=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}",gr=Object.defineProperty,br=Object.getOwnPropertyDescriptor,mt=(e,t,i,o)=>{for(var r=o>1?void 0:o?br(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&gr(t,i,r),r},ni=(e=>(e.TriggerOnly="trigger-only",e.Single="single",e.Multi="multi",e))(ni||{}),xr=0,ft,lt=(ft=class extends q{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=ft.ID+"_"+xr++,this.role="listbox",this.itemGenerator=io,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;let e=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(e)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=e=>{let t=!0;switch(e.key){case"Down":case"ArrowDown":this.focusIndex=this.normalizeIndex(this.focusIndex+1);break;case"Up":case"ArrowUp":this.focusIndex=this.normalizeIndex(this.focusIndex-1);break;case"Enter":this.handleSelection(this.focusIndex,e.metaKey||e.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:t=!1;break}t&&(e.preventDefault(),e.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(e){this.toggleAttribute("focus-target",e)}get focusIndex(){return this._focusIndex}set focusIndex(e){if(e>=-1&&e<this.itemCount){let t=this._focusIndex;this._focusIndex=e,(e<=this._firstVisibleIndex||this._lastVisibleIndex<=e)&&this.scrollToItem(e),t!=e&&(e==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",t))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(e){e?this._selectedIndices=e.map(t=>Number(t)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(e,t="auto"){this.scrollTop=mr.getOffsetForIndexAndAlignment(this.normalizeIndex(e),t,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(e){return!this.shadowRoot||e<this._firstVisibleIndex||this._lastVisibleIndex<e?null:this.querySelector(`[item-index="${e}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",t=>{t.button==1&&t.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){let e=this.getListItem(this.focusIndex);e&&(this.focusTarget||document.activeElement==this?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):(e.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[dt`
36
- ${it(vr)}
37
- `]}render(){return this.updateItemsRenderData(),U`
34
+ `:w}updated(e){super.updated(e),e.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let e=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,i=this.shadowRoot.querySelector(".caption");i&&(t+=i.scrollWidth-i.clientWidth);let o=this.shadowRoot.querySelector(".description");return o&&(t=Math.max(t,o.scrollWidth-o.clientWidth)),t>0&&t++,e&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(e){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",e))&&e.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},Dt.ID="sd-list-item",Dt.ensureDefined=()=>{customElements.get(Dt.ID)||customElements.define(Dt.ID,Dt)},Dt);U([u({type:String})],N.prototype,"caption");U([u({type:String})],N.prototype,"description");U([u({type:String})],N.prototype,"descriptionIcon");U([u({type:Boolean})],N.prototype,"selected");U([u({type:String})],N.prototype,"icon");U([u({type:String})],N.prototype,"iconBackgroundColor");U([u({type:String})],N.prototype,"iconPlaceholder");U([u({type:Number})],N.prototype,"level");U([u()],N.prototype,"contentMode");U([u({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],N.prototype,"enableLineClamp");U([u({converter:{fromAttribute:e=>e=="true",toAttribute:e=>e},reflect:!0,attribute:"aria-disabled"})],N.prototype,"disabled");U([u({type:String,attribute:"icon-attr-aria-label"})],N.prototype,"iconAttrAriaLabel");U([u({type:String,reflect:!0})],N.prototype,"role");U([u({type:String,attribute:"caption-attr-title"})],N.prototype,"captionAttrTitle");U([u({type:String,attribute:"description-attr-title"})],N.prototype,"descriptionAttrTitle");U([u({type:String,attribute:"icon-attr-title"})],N.prototype,"iconAttrTitle");var kt=N,uo=(e,t)=>{let i=document.createElement(kt.ID);if(e){if(i.caption=e.caption,i.description=e.description,i.descriptionIcon=e.descriptionIcon,i.icon=e.icon,i.iconBackgroundColor=e.iconBackgroundColor,i.iconPlaceholder=e.iconPlaceholder,i.level=e.level,i.disabled=e.disabled,e.contentMode&&(i.contentMode=e.contentMode),e.leftContentGenerator){let o=e.leftContentGenerator(e,i);o&&(o.slot="left-content",i.appendChild(o))}if(e.rightContentGenerator){let o=e.rightContentGenerator(e,i);o&&(o.slot="right-content",i.appendChild(o))}}return i};kt.ensureDefined();var pi=class{getOffsetForIndexAndAlignment(t,i,o,r,s,n){let l=Math.max(0,n*r),a=Math.min(l,t*r),d=Math.max(0,t*r-s+r);switch(i){case"start":return a;case"end":return d;case"center":{let c=Math.round(d+(a-d)/2);return c<Math.ceil(s/2)?0:c>l+Math.floor(s/2)?l:c}case"auto":default:return o>=d&&o<=a?o:o<d?d:a}}debounce(t){let i;return(...o)=>{i&&window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{t(...o),i=null})}}},Cr=new pi,ke=class{constructor(t=100,i=5){this.pageSize=t,this.preloadedItemsCount=i,this._finalSizeIsKnown=!1,this._itemCache=[],this._lastRequestedFirstIndex=0,this._lastRequestedLastIndex=0,this._lastLoadedIndex=0,this.handleListDataRequest=o=>{let{startIndex:r,stopIndex:s}=o.detail;this._lastRequestedFirstIndex=r,this._lastRequestedLastIndex=s,this._list.items=this._itemCache.slice(r,s+1),!this.finalSizeIsKnown&&this._lastLoadedIndex<s+this.preloadedItemsCount&&this.requestData()},this.itemCount=t}get currentPage(){return this.items.length==0&&this.finalSizeIsKnown?0:Math.floor((this.items.length-1)/this.pageSize)}get finalSizeIsKnown(){return this._finalSizeIsKnown}set finalSizeIsKnown(t){this._finalSizeIsKnown=t,t&&(this.itemCount=this._itemCache.length),this._list&&(this._list.finalSizeIsKnown=t)}get itemCount(){return this._itemCount}set itemCount(t){this._itemCount=t,this._list&&(this._list.itemCount=t)}get items(){return this._itemCache}set items(t){this._itemCache=t,this.onItemsChange()}addItems(t){this._itemCache=this._itemCache.concat(t),this.onItemsChange()}connectList(t){this._list&&this._list.removeEventListener("data-request",this.handleListDataRequest),this._list=t,t.itemCount=this.itemCount,t.addEventListener("data-request",this.handleListDataRequest),t.finalSizeIsKnown=this._finalSizeIsKnown}onItemsChange(){this._pendingDataRequest=!1,this._lastLoadedIndex=this._itemCache.length-1,this.finalSizeIsKnown?this.itemCount=this._itemCache.length:this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex),this._list&&(this._list.items=this._itemCache.slice(this._lastRequestedFirstIndex,this._lastRequestedLastIndex+1))}requestData(){if(!this._pendingDataRequest)if(this.onDataRequest)this._pendingDataRequest=!0,this.onDataRequest(this.currentPage+1),this._lastLoadedIndex+=this.pageSize-1,this._lastLoadedIndex>this.itemCount&&(this.itemCount=this._lastLoadedIndex);else throw Error("The final size is not yet known and the list would require item data from index "+this._lastRequestedFirstIndex+". to "+this._lastRequestedLastIndex+". which is not possible to load without a configured onDataRequest")}},Ir=":host{display:block;position:relative;contain:layout}:host(:focus){outline:none}:host(:focus-visible) ::slotted([focused]){box-shadow:0 0 0 1px #1467ba inset}.container{width:100%}.container>::slotted(*){width:100%;position:absolute;box-sizing:border-box}.container>::slotted(:not([last])){border-bottom:1px solid #d9d9d9}",Or=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,mt=(e,t,i,o)=>{for(var r=o>1?void 0:o?Pr(t,i):t,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=(o?n(t,i,r):n(r))||r);return o&&r&&Or(t,i,r),r},ui=(e=>(e.TriggerOnly="trigger-only",e.Single="single",e.Multi="multi",e))(ui||{}),Lr=0,ft,ct=(ft=class extends q{constructor(){super(),this.items=[],this.selectionType="trigger-only",this.id=ft.ID+"_"+Lr++,this.role="listbox",this.itemGenerator=uo,this._lastKnownScrollTop=0,this._lastRenderedScrollTop=0,this._itemsRenderData=[],this._elementCache=new Map,this._visibleItemsNum=0,this._selectedIndices=[],this._focusIndex=-1,this._lastKnownHeight=0,this.onScroll=()=>{this._lastKnownScrollTop=this.scrollTop;let e=this._lastRenderedScrollTop-this._lastKnownScrollTop;Math.abs(e)>=this.itemHeight&&(this._lastRenderedScrollTop=this._lastKnownScrollTop,this.requestUpdate())},this.handleKeyDown=e=>{let t=!0;switch(e.key){case"Down":case"ArrowDown":this.focusIndex=(this.focusIndex+1)%this.itemCount;break;case"Up":case"ArrowUp":this.focusIndex>0?this.focusIndex--:this.finalSizeIsKnown&&(this.focusIndex=this.itemCount-1);break;case"Enter":this.handleSelection(this.focusIndex,e.metaKey||e.ctrlKey);break;case"End":this.focusIndex=this.itemCount-1;break;case"PageDown":this.focusIndex=this.normalizeIndex(this.focusIndex+this._visibleItemsNum-1);break;case"Home":this.focusIndex=0;break;case"PageUp":this.focusIndex=this.normalizeIndex(this.focusIndex-this._visibleItemsNum+1);break;default:t=!1;break}t&&(e.preventDefault(),e.stopPropagation())},this._resizeObserver=new ResizeObserver(()=>{this._lastKnownHeight!==this.offsetHeight&&(this._lastKnownHeight=this.offsetHeight,this.requestUpdate())})}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(e){this.toggleAttribute("focus-target",e)}get focusIndex(){return this._focusIndex}set focusIndex(e){if(e>=-1&&e<this.itemCount){let t=this._focusIndex;this._focusIndex=e,(e<=this._firstVisibleIndex||this._lastVisibleIndex<=e)&&this.scrollToItem(e),t!=e&&(e==-1&&this.removeAttribute("aria-activedescendant"),this.requestUpdate("focusIndex",t))}}get selectedIndices(){return this._selectedIndices}set selectedIndices(e){e?this._selectedIndices=e.map(t=>Number(t)):this._selectedIndices=[],this.requestUpdate("selectedIndices")}scrollToItem(e,t="auto"){this.scrollTop=Cr.getOffsetForIndexAndAlignment(this.normalizeIndex(e),t,this.scrollTop,this.itemHeight,this.height,this.itemCount),this._lastKnownScrollTop=this.scrollTop}getListItem(e){return!this.shadowRoot||e<this._firstVisibleIndex||this._lastVisibleIndex<e?null:this.querySelector(`[item-index="${e}"]`)}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this),this.scrollTop!==this._lastKnownScrollTop&&(this.scrollTop=this._lastKnownScrollTop,this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect()}firstUpdated(e){super.firstUpdated(e),this.addEventListener("scroll",this.onScroll),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleClick),this.addEventListener("mousedown",t=>{t.button==1&&t.preventDefault()}),this.addEventListener("auxclick",this.handleClick),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndices&&(this.focusIndex=this.selectedIndices[0]),this.focusIndex==-1&&this.itemCount>0&&(this.focusIndex=0)):this.updateFocusedItemAttributes())}),this.addEventListener("blur",()=>{this.focusIndex!=-1&&this.updateFocusedItemAttributes()}),this.selectedIndices.length>0&&this.scrollToItem(this.selectedIndices[0],"center")}updateFocusedItemAttributes(){let e=this.getListItem(this.focusIndex);e&&(this.focusTarget||document.activeElement==this?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id)):(e.removeAttribute("focused"),this.removeAttribute("aria-activedescendant")))}static get styles(){return[ht`
35
+ ${it(Ir)}
36
+ `]}render(){return this.updateItemsRenderData(),W`
38
37
  <div class="container" style="height: ${this.itemCount*this.itemHeight}px">
39
38
  <slot name="items"></slot>
40
39
  </div>
41
- `}updated(e){if(super.updated(e),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{let t=new MutationObserver(()=>{this.adjustWidthIfNeeded(),t.disconnect()});t.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{let e=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(e==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(o=>{if(o instanceof Tt){o.enableLineClamp=!1;let r=o.missingWidthForTexts;return r>e&&(o.enableLineClamp=!0),r}}),i=Math.max(...t);i>0&&(this.style.width=`${this.offsetWidth+i}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(e=>{e instanceof Tt&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let e=[...this.querySelectorAll("[item-index]")],t=new Map,i=document.createDocumentFragment();for(let o of this._itemsRenderData){let r=this.renderItem(o);r.parentElement||i.appendChild(r),t.set(o.dataHash,r);let s=e.indexOf(r);s!==-1&&e.splice(s,1)}this.appendChild(i);for(let o of e)o instanceof Tt&&(o.enableLineClamp=!1),this.removeChild(o);t.forEach((o,r)=>{this._elementCache.set(r,o)})}renderItem({index:e,top:t,dataHash:i,data:o}){let r;return o?this._elementCache.has(i)?(r=this._elementCache.get(i),this._elementCache.delete(i)):(r=this.itemGenerator(o,e),r.setAttribute("slot","items")):(r=document.createElement("div"),r.setAttribute("placeholder-item",""),r.setAttribute("slot","items")),Object.assign(r.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),r.setAttribute("item-index",e.toString()),r.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),r.setAttribute("aria-posinset",String(e+1)),(!r.id||r.id.startsWith(this.id+"_item_"))&&(r.id=this.id+"_item_"+e),this.itemCount-1==e?r.setAttribute("last",""):r.removeAttribute("last"),this.updateSelectedAttribute(e,r),this.updateFocusedAttribute(e,r),r}updateFocusedAttribute(e,t){this.focusIndex==e&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(e,t){let i=this.selectedIndices.indexOf(e)!==-1;i?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(i))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);let e=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(e,t);for(let i=e;i<=t;i++){let o=i-e,r=this.items[o],s;r?s=JSON.stringify(r):s=`placeholder-${o}`,this._itemsRenderData.push({index:i,top:this.itemHeight*i,physicalIndex:o,dataHash:s,data:r})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(e){return Math.max(0,Math.min(e,this.itemCount-1))}get height(){return this.offsetHeight}requestData(e,t){!Number.isNaN(e)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:e,stopIndex:t}}))}handleSelection(e,t){if(e<0||this.itemCount<=e)return;let i=this.getListItem(e);if(i.getAttribute("aria-disabled")=="true"||i.hasAttribute("disabled"))return;let o=!0;if(this.selectionType!=="trigger-only"){let r=this.selectedIndices.indexOf(e);o=r==-1,o?this.selectionType==="single"?this.selectedIndices=[e]:this.selectedIndices.push(e):this.selectedIndices.splice(r,1),this.requestUpdate("selectedIndices")}this.focusIndex=e,this.dispatchSelectionEvent(e,o,t)}dispatchSelectionEvent(e,t,i){this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:t,hasModifier:i}}))}handleClick(e){let t=e.composedPath().find(i=>i.hasAttribute&&i.hasAttribute("item-index"));if(t){let i=parseInt(t.getAttribute("item-index"));if(Number.isInteger(i)){if(e.button==0||e.button==1){let o=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;this.handleSelection(i,o)}this.focusIndex=i}}}},ft.ID="sd-virtual-list",ft.ensureDefined=()=>{Tt.ensureDefined(),customElements.get(ft.ID)||customElements.define(ft.ID,ft)},ft);mt([u({type:Number,attribute:"item-height",reflect:!0})],lt.prototype,"itemHeight",2);mt([u({type:Number})],lt.prototype,"itemCount",2);mt([u({type:Array,attribute:!1})],lt.prototype,"items",2);mt([u({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],lt.prototype,"selectionType",2);mt([u({type:String,attribute:!0,reflect:!0})],lt.prototype,"id",2);mt([u({type:String,reflect:!0})],lt.prototype,"role",2);mt([u({type:Number,attribute:"focus-index",reflect:!0})],lt.prototype,"focusIndex",1);mt([u({type:Array,attribute:!1})],lt.prototype,"selectedIndices",1);var Ce=lt;Ce.ensureDefined();var yr=":host{contain:content;outline:none}:host(:not([selected])) .text{opacity:.8}:host(:hover),:host(:focus),:host([anchors-shown]){background-color:var(--sd-tab-bar-hover-color, #e7f1fa);cursor:pointer}.root{position:relative;overflow:hidden;width:100%;height:100%;display:flex;align-items:center;justify-content:flex-start;padding:var(--sd-tab-bar-padding, 8px) calc(2 * var(--sd-tab-bar-padding, 8px));box-sizing:border-box}.counter{text-align:center;background-color:#d9d9d9;min-width:24px;height:24px;line-height:24px;margin-left:calc(-.5 * var(--sd-tab-bar-padding, 8px));margin-right:var(--sd-tab-bar-padding, 8px)}:host([selected]) .counter{color:var(--sd-tab-bar-selected-counter-color, white);background-color:var(--sd-tab-bar-selected-counter-background-color, #3b85d1)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-grow:1}.down-arrow{padding-left:calc(1.5 * var(--sd-tab-bar-padding, 8px));margin-right:calc(-1 * var(--sd-tab-bar-padding, 8px));outline:none;fill:var(--sd-tab-bar-color, #1467ba);flex:0 0 auto}.ripple{position:absolute;background:var(--sd-tab-bar-color, #1467ba);border-radius:50%;width:5px;height:5px;animation:rippleEffect .88s 1;opacity:0}@keyframes rippleEffect{0%{transform:scale(1);opacity:.4}to{transform:scale(100);opacity:0}}",wr=Object.defineProperty,ae=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&wr(t,i,r),r},oo=navigator.userAgent.indexOf("Trident")!==-1,so=class extends q{constructor(){super(...arguments),this.minimumOverlayWidth=150,this.handleKeyDown=t=>{this.hasAnchors?(this.vertical?["Left","ArrowLeft","Right","ArrowRight","Enter"]:["Down","ArrowDown","Up","ArrowUp","Enter"]).indexOf(t.key)===-1?(this.hideAnchors(),this.focus()):(this.anchorsShown||(this.showAnchors(),window.requestAnimationFrame(()=>{this.list.focusIndex=0,this.list.focus(),this.updateDropdownSizes()})),t.preventDefault(),t.stopPropagation()):t.key==="Enter"&&(this.dispatchSelectionEvent(),t.preventDefault(),t.stopPropagation())},this.handleListSelection=t=>{this.hideAnchors(),t.stopPropagation(),this.dispatchSelectionEvent(this.anchors[t.detail.index]),this.focus()},this.handlePointerLeave=t=>{(oo||this.list&&!this.list.contains(t.target))&&window.addEventListener("pointermove",this.handlePointerMove)},this.handlePointerMove=t=>{!this.isPointerAbove(t,this)&&!this.isPointerAbove(t,this.list)&&(this.hideAnchors(),window.removeEventListener("pointermove",this.handlePointerMove))}}get selected(){return this.hasAttribute("selected")}set selected(t){if(t)this.setAttribute("selected","");else if(this.removeAttribute("selected"),this.shadowRoot&&this.showRipple){let i=this.shadowRoot.querySelector(".ripple");i.style.display="none",this.showRipple=!1}}firstUpdated(t){super.firstUpdated(t);let i=window.CSS&&window.CSS.supports;this._cssMathMaxSupported=i&&CSS.supports("max-width","max(50vw)");let o=this.ownerDocument;o.adoptedStyleSheets&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,...o.adoptedStyleSheets]),this.addEventListener("pointerdown",r=>{if(!this.noInk&&!this.showRipple){this.showRipple=!0;let s=this.getBoundingClientRect(),n=this.shadowRoot.querySelector(".ripple");n.style.left=`${r.clientX-s.left}px`,n.style.top=`${r.clientY-s.top}px`,n.style.display="",n.addEventListener("animationend",()=>{n.style.display="none",this.showRipple=!1},{once:!0})}}),this.addEventListener("click",r=>{r.composedPath().indexOf(this.list)===-1&&(this.dispatchSelectionEvent(),r.preventDefault(),r.stopPropagation())}),this.addEventListener("keydown",this.handleKeyDown),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}disconnectedCallback(){super.disconnectedCallback(),this.hideAnchors()}static get styles(){return[dt`
42
- ${it(yr)}
43
- `]}render(){return U`
40
+ `}updated(e){if(super.updated(e),this._lastRenderedScrollTop=this._lastKnownScrollTop,this.updateItems(),(this._increaseWidthOnNextRenderIfNeeded||this._reachedMaxWidth)&&this._firstVisibleIndex<this._lastVisibleIndex)if(this.querySelector("[item-index]"))this.adjustWidthIfNeeded();else{let t=new MutationObserver(()=>{this.adjustWidthIfNeeded(),t.disconnect()});t.observe(this)}}adjustWidthIfNeeded(){this._increaseWidthOnNextRenderIfNeeded?(this._increaseWidthOnNextRenderIfNeeded=!1,window.requestAnimationFrame(()=>{let e=Number.parseInt(getComputedStyle(this).maxWidth)-this.offsetWidth;if(e==0)this._reachedMaxWidth=!0,this.enableLineClampOnItemsIfNeeded();else{this._reachedMaxWidth=!1;let t=[...this.querySelectorAll("[item-index]")].map(o=>{if(o instanceof kt){o.enableLineClamp=!1;let r=o.missingWidthForTexts;return r>e&&(o.enableLineClamp=!0),r}}),i=Math.max(...t);i>0&&(this.style.width=`${this.offsetWidth+i}px`)}})):this._reachedMaxWidth&&this.enableLineClampOnItemsIfNeeded()}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[item-index]").forEach(e=>{e instanceof kt&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}increaseWidthOnNextRenderIfNeeded(){this._increaseWidthOnNextRenderIfNeeded=!0}updateItems(){let e=[...this.querySelectorAll("[item-index]")],t=new Map,i=document.createDocumentFragment();for(let o of this._itemsRenderData){let r=this.renderItem(o);r.parentElement||i.appendChild(r),t.set(o.dataHash,r);let s=e.indexOf(r);s!==-1&&e.splice(s,1)}this.appendChild(i);for(let o of e)o instanceof kt&&(o.enableLineClamp=!1),this.removeChild(o);t.forEach((o,r)=>{this._elementCache.set(r,o)})}renderItem({index:e,top:t,dataHash:i,data:o}){let r;return o?this._elementCache.has(i)?(r=this._elementCache.get(i),this._elementCache.delete(i)):(r=this.itemGenerator(o,e),r.setAttribute("slot","items")):(r=document.createElement("div"),r.setAttribute("placeholder-item",""),r.setAttribute("slot","items")),Object.assign(r.style,{transform:`translateY(${t}px)`,height:`${this.itemHeight}px`}),r.setAttribute("item-index",e.toString()),r.setAttribute("aria-setsize",String(this.finalSizeIsKnown?this.itemCount:-1)),r.setAttribute("aria-posinset",String(e+1)),(!r.id||r.id.startsWith(this.id+"_item_"))&&(r.id=this.id+"_item_"+e),this.itemCount-1==e?r.setAttribute("last",""):r.removeAttribute("last"),this.updateSelectedAttribute(e,r),this.updateFocusedAttribute(e,r),r}updateFocusedAttribute(e,t){this.focusIndex==e&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id)):t.removeAttribute("focused")}updateSelectedAttribute(e,t){let i=this.selectedIndices.indexOf(e)!==-1;i?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(i))}updateItemsRenderData(){if(this._itemsRenderData=[],this._visibleItemsNum=Math.min(Math.ceil(this.height/this.itemHeight),this.itemCount),this._visibleItemsNum>0){this._firstVisibleIndex=this.normalizeIndex(Math.floor(this._lastKnownScrollTop/this.itemHeight)),this._lastVisibleIndex=this.normalizeIndex(this._firstVisibleIndex+this._visibleItemsNum);let e=this.normalizeIndex(this._firstVisibleIndex-2),t=this.normalizeIndex(this._lastVisibleIndex+2);this.requestData(e,t);for(let i=e;i<=t;i++){let o=i-e,r=this.items[o],s;r?s=JSON.stringify(r):s=`placeholder-${o}`,this._itemsRenderData.push({index:i,top:this.itemHeight*i,physicalIndex:o,dataHash:s,data:r})}}else this._firstVisibleIndex=0,this._lastVisibleIndex=0}normalizeIndex(e){return Math.max(0,Math.min(e,this.itemCount-1))}get height(){return this.offsetHeight}requestData(e,t){!Number.isNaN(e)&&!Number.isNaN(t)&&this.dispatchEvent(new CustomEvent("data-request",{detail:{startIndex:e,stopIndex:t}}))}handleSelection(e,t){if(e<0||this.itemCount<=e)return;let i=this.getListItem(e);if(i.getAttribute("aria-disabled")=="true"||i.hasAttribute("disabled"))return;let o=!0;if(this.selectionType!=="trigger-only"){let r=this.selectedIndices.indexOf(e);o=r==-1,o?this.selectionType==="single"?this.selectedIndices=[e]:this.selectedIndices.push(e):this.selectedIndices.splice(r,1),this.requestUpdate("selectedIndices")}this.focusIndex=e,this.dispatchSelectionEvent(e,o,t)}dispatchSelectionEvent(e,t,i){this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:t,hasModifier:i}}))}handleClick(e){let t=e.composedPath().find(i=>i.hasAttribute&&i.hasAttribute("item-index"));if(t){let i=parseInt(t.getAttribute("item-index"));if(Number.isInteger(i)){if(e.button==0||e.button==1){let o=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;this.handleSelection(i,o)}this.focusIndex=i}}}},ft.ID="sd-virtual-list",ft.ensureDefined=()=>{kt.ensureDefined(),customElements.get(ft.ID)||customElements.define(ft.ID,ft)},ft);mt([u({type:Number,attribute:"item-height",reflect:!0})],ct.prototype,"itemHeight",2);mt([u({type:Number})],ct.prototype,"itemCount",2);mt([u({type:Array,attribute:!1})],ct.prototype,"items",2);mt([u({type:String,attribute:"selection-type",reflect:!0,noAccessor:!0})],ct.prototype,"selectionType",2);mt([u({type:String,attribute:!0,reflect:!0})],ct.prototype,"id",2);mt([u({type:String,reflect:!0})],ct.prototype,"role",2);mt([u({type:Number,attribute:"focus-index",reflect:!0})],ct.prototype,"focusIndex",1);mt([u({type:Array,attribute:!1})],ct.prototype,"selectedIndices",1);var Me=ct;Me.ensureDefined();var Tr=":host{contain:content;outline:none}:host(:not([selected])) .text{opacity:.8}:host(:hover),:host(:focus),:host([anchors-shown]){background-color:var(--sd-tab-bar-hover-color, #e7f1fa);cursor:pointer}:host(:focus-visible){box-shadow:0 0 0 1px var(--sd-tab-bar-focus-color, #1467ba) inset}.root{position:relative;overflow:hidden;width:100%;height:100%;display:flex;align-items:center;justify-content:flex-start;padding:var(--sd-tab-bar-padding, 8px) calc(2 * var(--sd-tab-bar-padding, 8px));box-sizing:border-box}.counter{text-align:center;background-color:#d9d9d9;min-width:24px;height:24px;line-height:24px;margin-left:calc(-.5 * var(--sd-tab-bar-padding, 8px));margin-right:var(--sd-tab-bar-padding, 8px)}:host([selected]) .counter{color:var(--sd-tab-bar-selected-counter-color, white);background-color:var(--sd-tab-bar-selected-counter-background-color, #3b85d1)}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;flex-grow:1}.down-arrow{padding-left:calc(1.5 * var(--sd-tab-bar-padding, 8px));margin-right:calc(-1 * var(--sd-tab-bar-padding, 8px));outline:none;fill:var(--sd-tab-bar-color, #1467ba);flex:0 0 auto}.ripple{position:absolute;background:var(--sd-tab-bar-color, #1467ba);border-radius:50%;width:5px;height:5px;animation:rippleEffect .88s 1;opacity:0}@keyframes rippleEffect{0%{transform:scale(1);opacity:.4}to{transform:scale(100);opacity:0}}",Rr=Object.defineProperty,he=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&Rr(t,i,r),r},fo=navigator.userAgent.indexOf("Trident")!==-1,vo=class extends q{constructor(){super(...arguments),this.minimumOverlayWidth=150,this.handleKeyDown=t=>{this.hasAnchors?(this.vertical?["Left","ArrowLeft","Right","ArrowRight","Enter"]:["Down","ArrowDown","Up","ArrowUp","Enter"]).indexOf(t.key)===-1?(this.hideAnchors(),this.focus()):(this.anchorsShown||(this.showAnchors(),window.requestAnimationFrame(()=>{this.list.focusIndex=0,this.list.focus(),this.updateDropdownSizes()})),t.preventDefault(),t.stopPropagation()):t.key==="Enter"&&(this.dispatchSelectionEvent(),t.preventDefault(),t.stopPropagation())},this.handleListSelection=t=>{this.hideAnchors(),t.stopPropagation(),this.dispatchSelectionEvent(this.anchors[t.detail.index]),this.focus()},this.handlePointerLeave=t=>{(fo||this.list&&!this.list.contains(t.target))&&window.addEventListener("pointermove",this.handlePointerMove)},this.handlePointerMove=t=>{!this.isPointerAbove(t,this)&&!this.isPointerAbove(t,this.list)&&(this.hideAnchors(),window.removeEventListener("pointermove",this.handlePointerMove))}}get selected(){return this.hasAttribute("selected")}set selected(t){if(t)this.setAttribute("selected",""),this.setAttribute("aria-selected","true");else if(this.removeAttribute("selected"),this.setAttribute("aria-selected","false"),this.shadowRoot&&this.showRipple){let i=this.shadowRoot.querySelector(".ripple");i.style.display="none",this.showRipple=!1}}firstUpdated(t){super.firstUpdated(t);let i=window.CSS&&window.CSS.supports;this._cssMathMaxSupported=i&&CSS.supports("max-width","max(50vw)");let o=this.ownerDocument;o.adoptedStyleSheets&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,...o.adoptedStyleSheets]),this.addEventListener("pointerdown",r=>{if(!this.noInk&&!this.showRipple){this.showRipple=!0;let s=this.getBoundingClientRect(),n=this.shadowRoot.querySelector(".ripple");n.style.left=`${r.clientX-s.left}px`,n.style.top=`${r.clientY-s.top}px`,n.style.display="",n.addEventListener("animationend",()=>{n.style.display="none",this.showRipple=!1},{once:!0})}}),this.addEventListener("click",r=>{r.composedPath().indexOf(this.list)===-1&&(this.dispatchSelectionEvent(),r.preventDefault(),r.stopPropagation())}),this.addEventListener("keydown",this.handleKeyDown),this.setAttribute("tabindex","-1"),this.role="tab"}disconnectedCallback(){super.disconnectedCallback(),this.hideAnchors()}static get styles(){return[ht`
41
+ ${it(Tr)}
42
+ `]}render(){return W`
44
43
  <div class="root" @pointerover=${this.showAnchors} @pointerdown=${this.showAnchors}>
45
- ${this.showCounter?U` <span class="counter">${this.index+1}</span> `:""}
44
+ ${this.showCounter?W` <span class="counter">${this.index+1}</span> `:""}
46
45
  <div class="text">${this.text}</div>
47
46
  <div class="ripple" style="display: none"></div>
48
- ${this.hasAnchors?U`
47
+ ${this.hasAnchors?W`
49
48
  <svg class="down-arrow" tabindex="-1" viewBox="0 0 16 16" width="16" height="16">
50
49
  <path d="M13 4v2l-5 5-5-5v-2l5 5z"></path>
51
50
  </svg>
52
51
  `:""}
53
52
  </div>
54
- `}updateDropdownSizes(){let t=((window.innerHeight||document.documentElement.clientHeight)-this.offsetHeight)*.5;Object.assign(this.list.style,{maxHeight:`${t}px`,minWidth:`${Math.max(this.offsetWidth,this.minimumOverlayWidth)}px`,maxWidth:this._cssMathMaxSupported?`max(50vw, ${this.offsetWidth}px)`:Math.max((window.innerWidth||document.documentElement.clientWidth)/2,this.offsetWidth)+"px"})}dispatchSelectionEvent(t){this.dispatchEvent(new CustomEvent("selection",{detail:{anchor:t}}))}isPointerAbove(t,i){let o=i.getBoundingClientRect();return o.left<=t.clientX&&o.right>=t.clientX&&o.top<=t.clientY&&o.bottom>=t.clientY}showAnchors(){!this.anchorsShown&&this.hasAnchors&&(this.root.addEventListener("pointerleave",this.handlePointerLeave),this.list||this.createList(),this.dataProvider.items=this.anchors.map((t,i)=>({caption:t,index:i})),this.updateDropdownSizes(),this.ownerDocument.body.appendChild(this.list),this.popper||(this.popper=ri(this,this.list,{placement:this.vertical?"right-start":"bottom-start",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!oo}},{name:"hide",enabled:!1},{name:"preventOverflow",options:{padding:0}},{name:"adjustWidthIfNeeded",enabled:!0,phase:"read",fn({state:t}){t.elements.popper.increaseWidthOnNextRenderIfNeeded()}}]})),window.requestAnimationFrame(()=>{this.popper&&this.popper.update()}),this.anchorsShown=!0)}createList(){this.list=document.createElement(Ce.ID),this.dataProvider=new Ee,this.dataProvider.finalSizeIsKnown=!0,this.dataProvider.connectList(this.list),this.list.classList.add("anchor-list"),this.list.tabIndex=0,this.list.selectionType=ni.TriggerOnly,this.list.addEventListener("selection",this.handleListSelection),this.list.addEventListener("keydown",t=>{t.key=="Escape"&&(this.hideAnchors(),this.focus())}),this.list.addEventListener("focusout",()=>{this.hideAnchors()}),this.list.setAttribute("slot","anchors"),this.list.itemHeight=50,Object.assign(this.list.style,{zIndex:"21000",boxShadow:`rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
53
+ `}updateDropdownSizes(){let t=((window.innerHeight||document.documentElement.clientHeight)-this.offsetHeight)*.5;Object.assign(this.list.style,{maxHeight:`${t}px`,minWidth:`${Math.max(this.offsetWidth,this.minimumOverlayWidth)}px`,maxWidth:this._cssMathMaxSupported?`max(50vw, ${this.offsetWidth}px)`:Math.max((window.innerWidth||document.documentElement.clientWidth)/2,this.offsetWidth)+"px"})}dispatchSelectionEvent(t){this.dispatchEvent(new CustomEvent("selection",{detail:{anchor:t}}))}isPointerAbove(t,i){let o=i.getBoundingClientRect();return o.left<=t.clientX&&o.right>=t.clientX&&o.top<=t.clientY&&o.bottom>=t.clientY}showAnchors(){!this.anchorsShown&&this.hasAnchors&&(this.root.addEventListener("pointerleave",this.handlePointerLeave),this.list||this.createList(),this.dataProvider.items=this.anchors.map((t,i)=>({caption:t,index:i})),this.updateDropdownSizes(),this.ownerDocument.body.appendChild(this.list),this.popper||(this.popper=di(this,this.list,{placement:this.vertical?"right-start":"bottom-start",modifiers:[{name:"computeStyles",options:{gpuAcceleration:!fo}},{name:"hide",enabled:!1},{name:"preventOverflow",options:{padding:0}},{name:"adjustWidthIfNeeded",enabled:!0,phase:"read",fn({state:t}){t.elements.popper.increaseWidthOnNextRenderIfNeeded()}}]})),window.requestAnimationFrame(()=>{this.popper&&this.popper.update()}),this.anchorsShown=!0)}createList(){this.list=document.createElement(Me.ID),this.dataProvider=new ke,this.dataProvider.finalSizeIsKnown=!0,this.dataProvider.connectList(this.list),this.list.classList.add("anchor-list"),this.list.tabIndex=0,this.list.selectionType=ui.TriggerOnly,this.list.addEventListener("selection",this.handleListSelection),this.list.addEventListener("keydown",t=>{t.key=="Escape"&&(this.hideAnchors(),this.focus())}),this.list.addEventListener("focusout",()=>{this.hideAnchors()}),this.list.setAttribute("slot","anchors"),this.list.itemHeight=50,Object.assign(this.list.style,{zIndex:"21000",boxShadow:`rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
55
54
  rgba(0, 0, 0, 0.12) 0px 1px 5px 0px,
56
- rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"})}hideAnchors(){this.anchorsShown&&(this.anchorsShown=!1,this.root.removeEventListener("pointerleave",this.handlePointerLeave),this.list&&(this.list.focusIndex=-1,this.list.parentElement.removeChild(this.list))),this.popper&&(this.popper.destroy(),this.popper=null)}get hasAnchors(){return!!(this.anchors&&this.anchors.length)}get root(){return this.shadowRoot?this.shadowRoot.querySelector(".root"):null}};so.ID="sd-tab";var Y=so;ae([u({type:String})],Y.prototype,"text");ae([u({type:Array})],Y.prototype,"anchors");ae([u()],Y.prototype,"index");ae([u()],Y.prototype,"showCounter");ae([u({type:Boolean,reflect:!0,attribute:"anchors-shown"})],Y.prototype,"anchorsShown");Ce.ensureDefined();customElements.get(Y.ID)||customElements.define(Y.ID,Y);var Ar=":host{display:block;outline:none;contain:content}:host([vertical]) .tab-button-container{flex-direction:column}:host([vertical]) .slider{top:0;width:2px}:host(:not([vertical])) .slider{bottom:0;height:2px}.root{display:flex;width:100%;overflow:hidden}.tab-button-container{display:flex;flex-wrap:nowrap;overflow:hidden;position:relative;flex:1 1 auto}@supports (scrollbar-width: none){:host(:not([vertical])) .tab-button-container{overflow-x:auto;scrollbar-width:none}:host(:not([vertical])) .tab-button-container::-webkit-scrollbar{display:none}}@supports selector(::-webkit-scrollbar){:host(:not([vertical])) .tab-button-container{overflow-x:auto;scrollbar-width:none}:host(:not([vertical])) .tab-button-container::-webkit-scrollbar{display:none}}:host([vertical]) .root{height:100%}:host([vertical]) .tab-button-container{overflow-y:auto;height:100%}:host([vertical]) ::slotted(*){flex-shrink:0;flex-grow:0}.slider{background-color:var(--sd-tab-bar-color, #1467ba);position:absolute;left:0}:host(:not([no-slide])) .slider,:host([no-slide=false]) .slider{transition-duration:var(--sd-tab-bar-slide-duration, .5s)}.scroll-button{cursor:pointer;padding:4px;position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 2px #00000024,0 1px 5px #0000001f,0 3px 1px -2px #0003}.scroll-button>svg{width:24px;height:24px;fill:var(--sd-tab-bar-color, #1467ba)}.ripple{position:absolute;left:0;top:0;background-position:center;transition:background-color .88s;opacity:.4;width:100%;height:100%;border-radius:50%}.ripple:active{background-color:var(--sd-tab-bar-color, #1467ba);background-size:100%;transition:background-color 0s}",_r=Object.defineProperty,jt=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&_r(t,i,r),r},ro=40,ai=class extends q{constructor(){super(...arguments),this.handleSlotChange=()=>{this.tabElements=this.shadowRoot.querySelector("slot").assignedNodes().filter(i=>i instanceof Y);let t=0;this.tabElements.forEach(i=>{i.vertical=this.vertical,i.showCounter=this.showCounter,i.index=t++,i.addEventListener("focus",this.handleTabFocus),i.addEventListener("selection",this.handleTabSelection)}),this.updateScrollButtonVisibility(),this.selectedIndex==null&&(this._focusedIndex=0,this._selectedIndex=0),this.updateSelectionState()},this.handleTabFocus=t=>{let i=t.target.index;this.focusedIndex!==i&&(this._focusedIndex=i,this.scrollToFocusedIfNeeded())},this.handleTabSelection=t=>{this.selectedIndex=t.target.index,this.dispatchSelectionEvent(t.detail.anchor)},this.handleKeyDown=t=>{switch(t.key){case"Up":case"ArrowUp":case"Left":case"ArrowLeft":t.preventDefault(),this.focusedIndex=Math.max(this.focusedIndex-1,0);break;case"Down":case"ArrowDown":case"Right":case"ArrowRight":t.preventDefault(),this.focusedIndex=Math.min(this.focusedIndex+1,this.tabElements.length-1);break}},this.debounced={}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.debounce("update-scroll-button-visibility",()=>{this.lastKnownWidth!==this.offsetWidth&&(this.lastKnownWidth=this.offsetWidth,this.updateScrollButtonVisibility())})}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}firstUpdated(t){super.firstUpdated(t);let i=this.ownerDocument;i.adoptedStyleSheets&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,...i.adoptedStyleSheets]),this.shadowRoot.querySelector("slot").addEventListener("slotchange",this.handleSlotChange),this.addEventListener("keydown",this.handleKeyDown),this.tabButtonContainer.addEventListener("wheel",o=>{if(this.tabButtonContainer.scrollWidth>this.tabButtonContainer.offsetWidth){let r=document.elementsFromPoint(o.x,o.y)[0];this.tabButtonContainer.scrollLeft+=o.deltaY;let s=document.elementsFromPoint(o.x,o.y)[0];r!=s&&(r instanceof Y&&r.hideAnchors(),s instanceof Y&&s.showAnchors()),o.preventDefault()}})}static get styles(){return[dt`
57
- ${it(Ar)}
58
- `]}render(){return U`
59
- <div class="root">
60
- ${!this.vertical&&this.showLeftScrollButton?U`
61
- <div class="scroll-button left" @pointerdown="${()=>{this.tabButtonContainer.scrollLeft-=ro}}">
55
+ rgba(0, 0, 0, 0.2) 0px 3px 1px -2px`,background:"white",overflowY:"auto"})}hideAnchors(){this.anchorsShown&&(this.anchorsShown=!1,this.root.removeEventListener("pointerleave",this.handlePointerLeave),this.list&&(this.list.focusIndex=-1,this.list.parentElement.removeChild(this.list))),this.popper&&(this.popper.destroy(),this.popper=null)}get hasAnchors(){return!!(this.anchors&&this.anchors.length)}get root(){return this.shadowRoot?this.shadowRoot.querySelector(".root"):null}};vo.ID="sd-tab";var Y=vo;he([u({type:String})],Y.prototype,"text");he([u({type:Array})],Y.prototype,"anchors");he([u()],Y.prototype,"index");he([u()],Y.prototype,"showCounter");he([u({type:Boolean,reflect:!0,attribute:"anchors-shown"})],Y.prototype,"anchorsShown");Me.ensureDefined();customElements.get(Y.ID)||customElements.define(Y.ID,Y);var Dr=":host{display:block;outline:none;contain:content}:host([vertical]) .tab-button-container{flex-direction:column}:host([vertical]) .slider{top:0;width:2px}:host(:not([vertical])) .slider{bottom:0;height:2px}.root{display:flex;width:100%;overflow:hidden}.tab-button-container{display:flex;flex-wrap:nowrap;overflow:hidden;position:relative;flex:1 1 auto}@supports (scrollbar-width: none){:host(:not([vertical])) .tab-button-container{overflow-x:auto;scrollbar-width:none}:host(:not([vertical])) .tab-button-container::-webkit-scrollbar{display:none}}@supports selector(::-webkit-scrollbar){:host(:not([vertical])) .tab-button-container{overflow-x:auto;scrollbar-width:none}:host(:not([vertical])) .tab-button-container::-webkit-scrollbar{display:none}}:host([vertical]) .root{height:100%}:host([vertical]) .tab-button-container{overflow-y:auto;height:100%}:host([vertical]) ::slotted(*){flex-shrink:0;flex-grow:0}.slider{background-color:var(--sd-tab-bar-color, #1467ba);position:absolute;left:0}:host(:not([no-slide])) .slider,:host([no-slide=false]) .slider{transition-duration:var(--sd-tab-bar-slide-duration, .5s)}.scroll-button{cursor:pointer;padding:4px;position:relative;flex:0 0 auto;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 2px #00000024,0 1px 5px #0000001f,0 3px 1px -2px #0003}.scroll-button>svg{width:24px;height:24px;fill:var(--sd-tab-bar-color, #1467ba)}.ripple{position:absolute;left:0;top:0;background-position:center;transition:background-color .88s;opacity:.4;width:100%;height:100%;border-radius:50%}.ripple:active{background-color:var(--sd-tab-bar-color, #1467ba);background-size:100%;transition:background-color 0s}",kr=Object.defineProperty,Vt=(e,t,i,o)=>{for(var r=void 0,s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,i,r)||r);return r&&kr(t,i,r),r},mo=40,fi=class extends q{constructor(){super(...arguments),this.handleSlotChange=()=>{this.tabElements=this.shadowRoot.querySelector("slot").assignedNodes().filter(i=>i instanceof Y);let t=0;this.tabElements.forEach(i=>{i.vertical=this.vertical,i.showCounter=this.showCounter,i.index=t++,i.addEventListener("focus",this.handleTabFocus),i.addEventListener("selection",this.handleTabSelection)}),this.updateScrollButtonVisibility(),this.selectedIndex==null&&(this._focusedIndex=0,this._selectedIndex=0),this.updateSelectionState()},this.handleTabFocus=t=>{let i=t.target.index;this.focusedIndex!==i&&(this._focusedIndex=i,this.scrollToFocusedIfNeeded())},this.handleTabSelection=t=>{this.selectedIndex=t.target.index,this.dispatchSelectionEvent(t.detail.anchor)},this.handleKeyDown=t=>{switch(t.key){case"Up":case"ArrowUp":case"Left":case"ArrowLeft":t.preventDefault(),this.focusedIndex=Math.max(this.focusedIndex-1,0);break;case"Down":case"ArrowDown":case"Right":case"ArrowRight":t.preventDefault(),this.focusedIndex=Math.min(this.focusedIndex+1,this.tabElements.length-1);break}},this.debounced={}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.debounce("update-scroll-button-visibility",()=>{this.lastKnownWidth!==this.offsetWidth&&(this.lastKnownWidth=this.offsetWidth,this.updateScrollButtonVisibility())})}),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect()}firstUpdated(t){super.firstUpdated(t);let i=this.ownerDocument;i.adoptedStyleSheets&&(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,...i.adoptedStyleSheets]),this.shadowRoot.querySelector("slot").addEventListener("slotchange",this.handleSlotChange),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("focusin",o=>{this.contains(o.relatedTarget)||(this.focusedIndex=this.selectedIndex,this.updateFocusedState(),this.shadowRoot.querySelector(".root").tabIndex=-1)}),this.addEventListener("focusout",o=>{this.contains(o.relatedTarget)||(this.shadowRoot.querySelector(".root").tabIndex=0)}),this.tabButtonContainer.addEventListener("wheel",o=>{if(this.tabButtonContainer.scrollWidth>this.tabButtonContainer.offsetWidth){let r=document.elementsFromPoint(o.x,o.y)[0];this.tabButtonContainer.scrollLeft+=o.deltaY;let s=document.elementsFromPoint(o.x,o.y)[0];r!=s&&(r instanceof Y&&r.hideAnchors(),s instanceof Y&&s.showAnchors()),o.preventDefault()}})}static get styles(){return[ht`
56
+ ${it(Dr)}
57
+ `]}render(){return W`
58
+ <div class="root" tabindex="0" role="tablist" aria-orientation="${this.vertical?"vertical":"horizontal"}">
59
+ ${!this.vertical&&this.showLeftScrollButton?W`
60
+ <div class="scroll-button left" @pointerdown="${()=>{this.tabButtonContainer.scrollLeft-=mo}}">
62
61
  <div class="ripple"></div>
63
62
  <svg><g><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g></svg>
64
63
  </div>`:""}
65
64
  <div class="tab-button-container" @scroll="${this.updateScrollButtonVisibility}">
66
65
  <slot></slot>
67
- ${this.noBar?"":U` <div class="slider"></div>`}
66
+ ${this.noBar?"":W` <div class="slider"></div>`}
68
67
  </div>
69
- ${!this.vertical&&this.showRightScrollButton?U`
70
- <div class="scroll-button right" @pointerdown="${()=>{this.tabButtonContainer.scrollLeft+=ro}}">
68
+ ${!this.vertical&&this.showRightScrollButton?W`
69
+ <div class="scroll-button right" @pointerdown="${()=>{this.tabButtonContainer.scrollLeft+=mo}}">
71
70
  <div class="ripple"></div>
72
71
  <svg><g><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g></svg>
73
72
  </div>`:""}
74
73
  </div>
75
- `}set selectedIndex(t){this._selectedIndex!==t&&(this.focusedIndex=t,this._selectedIndex=t,this.updateSelectionState())}get selectedIndex(){return this._selectedIndex}updateSelectionState(){this.tabElements&&this.tabElements.forEach((t,i)=>{i===this._selectedIndex?(t.selected=!0,this.slider&&window.requestAnimationFrame(()=>{let o=t.offsetLeft,r=t.offsetTop;t.offsetParent!=this._tabButtonContainer&&(o-=this._tabButtonContainer.offsetLeft,r-=this._tabButtonContainer.offsetTop);let s=this.slider;this.vertical?(s.style.height=t.offsetHeight+"px",s.style.transform=`translateY(${r}px)`):(s.style.width=t.offsetWidth+"px",s.style.transform=`translateX(${o}px)`)})):t.selected=!1})}set focusedIndex(t){this._focusedIndex!==t&&(this._focusedIndex=t,this.updateFocusedState())}get focusedIndex(){return this._focusedIndex}updateFocusedState(){this.tabElements&&this.focusedIndex>=0&&this.focusedIndex<this.tabElements.length&&(this.scrollToFocusedIfNeeded(),this.tabElements[this.focusedIndex].focus())}get slider(){return this.shadowRoot.querySelector(".slider")}get tabButtonContainer(){return this._tabButtonContainer||(this._tabButtonContainer=this.shadowRoot.querySelector(".tab-button-container")),this._tabButtonContainer}scrollToFocusedIfNeeded(){if(this.tabElements&&this.focusedIndex>=0&&this.focusedIndex<this.tabElements.length){let t=this.tabElements[this.focusedIndex],i=t.offsetLeft;t.offsetParent!=this._tabButtonContainer&&(i-=this._tabButtonContainer.offsetLeft);let o=t.offsetWidth,r=i+o;if(i>this.tabButtonContainer.scrollLeft&&r<this.tabButtonContainer.scrollLeft+this.tabButtonContainer.offsetWidth)return;this.tabButtonContainer.scrollLeft<i?this.tabButtonContainer.scrollLeft=r-this.tabButtonContainer.offsetWidth:this.tabButtonContainer.scrollLeft+this.tabButtonContainer.offsetWidth>r&&(this.tabButtonContainer.scrollLeft=i)}}updateScrollButtonVisibility(){this.showLeftScrollButton=this.tabButtonContainer.scrollLeft!==0,this.showRightScrollButton=this.tabButtonContainer.scrollLeft<this.tabButtonContainer.scrollWidth-this.tabButtonContainer.offsetWidth}dispatchSelectionEvent(t){this.dispatchEvent(new CustomEvent("selection",{detail:{selectedTab:{index:this.selectedIndex,tabElement:this.tabElements[this.selectedIndex]},anchor:t}}))}debounce(t,i){this.debounced[t]||(this.debounced[t]=!0,requestAnimationFrame(()=>{delete this.debounced[t],i()}))}};ai.ID="sd-tab-bar",ai.shadowRootOptions={...q.shadowRootOptions,delegatesFocus:!0};var et=ai;jt([u({type:Boolean,reflect:!0,attribute:"no-bar"})],et.prototype,"noBar");jt([u({type:Boolean,reflect:!0,attribute:"no-slide"})],et.prototype,"noSlide");jt([u({type:Boolean,reflect:!0})],et.prototype,"vertical");jt([u({type:Boolean,reflect:!0,attribute:"show-counter"})],et.prototype,"showCounter");jt([u()],et.prototype,"showLeftScrollButton");jt([u()],et.prototype,"showRightScrollButton");customElements.get(et.ID)||customElements.define(et.ID,et);return bo(Sr);})();
74
+ `}set selectedIndex(t){this._selectedIndex!==t&&(this.focusedIndex=t,this._selectedIndex=t,this.updateSelectionState())}get selectedIndex(){return this._selectedIndex}updateSelectionState(){this.tabElements&&this.tabElements.forEach((t,i)=>{i===this._selectedIndex?(t.selected=!0,this.slider&&window.requestAnimationFrame(()=>{let o=t.offsetLeft,r=t.offsetTop;t.offsetParent!=this._tabButtonContainer&&(o-=this._tabButtonContainer.offsetLeft,r-=this._tabButtonContainer.offsetTop);let s=this.slider;this.vertical?(s.style.height=t.offsetHeight+"px",s.style.transform=`translateY(${r}px)`):(s.style.width=t.offsetWidth+"px",s.style.transform=`translateX(${o}px)`)})):t.selected=!1})}set focusedIndex(t){this._focusedIndex!==t&&(this._focusedIndex=t,this.updateFocusedState())}get focusedIndex(){return this._focusedIndex}updateFocusedState(){this.tabElements&&this.focusedIndex>=0&&this.focusedIndex<this.tabElements.length&&(this.scrollToFocusedIfNeeded(),this.tabElements[this.focusedIndex].focus())}get slider(){return this.shadowRoot.querySelector(".slider")}get tabButtonContainer(){return this._tabButtonContainer||(this._tabButtonContainer=this.shadowRoot.querySelector(".tab-button-container")),this._tabButtonContainer}scrollToFocusedIfNeeded(){if(this.tabElements&&this.focusedIndex>=0&&this.focusedIndex<this.tabElements.length){let t=this.tabElements[this.focusedIndex],i=t.offsetLeft;t.offsetParent!=this._tabButtonContainer&&(i-=this._tabButtonContainer.offsetLeft);let o=t.offsetWidth,r=i+o;if(i>this.tabButtonContainer.scrollLeft&&r<this.tabButtonContainer.scrollLeft+this.tabButtonContainer.offsetWidth)return;this.tabButtonContainer.scrollLeft<i?this.tabButtonContainer.scrollLeft=r-this.tabButtonContainer.offsetWidth:this.tabButtonContainer.scrollLeft+this.tabButtonContainer.offsetWidth>r&&(this.tabButtonContainer.scrollLeft=i)}}updateScrollButtonVisibility(){this.showLeftScrollButton=this.tabButtonContainer.scrollLeft!==0,this.showRightScrollButton=this.tabButtonContainer.scrollLeft<this.tabButtonContainer.scrollWidth-this.tabButtonContainer.offsetWidth}dispatchSelectionEvent(t){this.dispatchEvent(new CustomEvent("selection",{detail:{selectedTab:{index:this.selectedIndex,tabElement:this.tabElements[this.selectedIndex]},anchor:t}}))}debounce(t,i){this.debounced[t]||(this.debounced[t]=!0,requestAnimationFrame(()=>{delete this.debounced[t],i()}))}};fi.ID="sd-tab-bar",fi.shadowRootOptions={...q.shadowRootOptions,delegatesFocus:!0};var et=fi;Vt([u({type:Boolean,reflect:!0,attribute:"no-bar"})],et.prototype,"noBar");Vt([u({type:Boolean,reflect:!0,attribute:"no-slide"})],et.prototype,"noSlide");Vt([u({type:Boolean,reflect:!0})],et.prototype,"vertical");Vt([u({type:Boolean,reflect:!0,attribute:"show-counter"})],et.prototype,"showCounter");Vt([u()],et.prototype,"showLeftScrollButton");Vt([u()],et.prototype,"showRightScrollButton");customElements.get(et.ID)||customElements.define(et.ID,et);return Io(Mr);})();
76
75
  /*! Bundled license information:
77
76
 
78
77
  @lit/reactive-element/css-tag.js:
@@ -88,6 +87,7 @@ lit-element/lit-element.js:
88
87
  @lit/reactive-element/decorators/property.js:
89
88
  lit-html/directive.js:
90
89
  lit-html/directives/unsafe-html.js:
90
+ lit-html/async-directive.js:
91
91
  (**
92
92
  * @license
93
93
  * Copyright 2017 Google LLC
@@ -107,5 +107,12 @@ lit-html/directives/if-defined.js:
107
107
  * Copyright 2018 Google LLC
108
108
  * SPDX-License-Identifier: BSD-3-Clause
109
109
  *)
110
+
111
+ lit-html/directive-helpers.js:
112
+ (**
113
+ * @license
114
+ * Copyright 2020 Google LLC
115
+ * SPDX-License-Identifier: BSD-3-Clause
116
+ *)
110
117
  */
111
118
  //# sourceMappingURL=tab-bar-with-externals.js.map