@cas-smartdesign/list 6.3.2 → 6.4.0

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 +1 @@
1
- import{L as o}from"./doc.mjs";import{c as r,e as m}from"./sample-data.mjs";o.ensureDefined();const a=document.querySelector("#multi-select-example"),e=document.createElement(o.ID),l=r(m,!0);e.itemGenerator=x(e);e.items=l;e.selectedIndexes=[l.findIndex(s=>s.disabled)];e.tabIndex=0;e.selectionType="multi";e.addEventListener("selection",s=>{const c=s.detail.index,d=e.getListItem(c),i=e.items[c];if(i!=null&&i.extendedListItem){if(s.detail.selected){const t=e.selectedIndexes.indexOf(c);if(t!==-1){const n=[...e.selectedIndexes];n.splice(t,1),e.selectedIndexes=n}}}else{const t=d.querySelector("input");t.checked=s.detail.selected}});a.appendChild(e);function x(s){const c=s.itemGenerator;return(d,i)=>{const t=c(d,i);return t.updateComplete.then(()=>{const n=t.querySelector("input");n&&(n.disabled=d.disabled,n.checked=t.selected)}),t}}export{x as customItemGenerator};
1
+ import{L as o}from"./doc.mjs";import{c as r,e as m}from"./sample-data.mjs";o.ensureDefined();const a=document.querySelector("#multi-select-example"),e=document.createElement(o.ID),l=r(m,!0);e.itemGenerator=x(e);e.items=l;e.selectedIndexes=[l.findIndex(s=>s.disabled)];e.tabIndex=0;e.selectionType="multi";e.addEventListener("selection",s=>{const i=s.detail.index,c=e.getListItem(i);if(e.items[i]?.extendedListItem){if(s.detail.selected){const t=e.selectedIndexes.indexOf(i);if(t!==-1){const n=[...e.selectedIndexes];n.splice(t,1),e.selectedIndexes=n}}}else{const t=c.querySelector("input");t.checked=s.detail.selected}});a.appendChild(e);function x(s){const i=s.itemGenerator;return(c,d)=>{const t=i(c,d);return t.updateComplete.then(()=>{const n=t.querySelector("input");n&&(n.disabled=c.disabled,n.checked=t.selected)}),t}}export{x as customItemGenerator};
@@ -1 +1 @@
1
- import{L as m}from"./doc.mjs";import{c as v,e as h}from"./sample-data.mjs";class a{constructor(e,n){this.eventTarget=e,this.keydownHandler=n,this.catchedKeys=["Down","ArrowDown","Up","ArrowUp","Enter"],this.markAsFocusTargetHandler=()=>this.eventTarget.setAttribute("focus-target",""),this.unmarkAsFocusTargetHandler=()=>this.eventTarget.removeAttribute("focus-target"),this.delegateKeyDownEvent=t=>{if(this.catchedKeys.indexOf(t.key)!==-1){const s=t.key.toLocaleLowerCase();let c=0;const d=s.includes("enter");d||(c=s.includes("down")?1:-1),this.keydownHandler(t,c,d),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()}}}static delegateTo(e){return new a(e,n=>e.dispatchEvent(new KeyboardEvent(n.type,n)))}connect(e){var n,t;if(e!=null){e.addEventListener("keydown",this.delegateKeyDownEvent),e.addEventListener("focus",this.markAsFocusTargetHandler),e.addEventListener("blur",this.unmarkAsFocusTargetHandler);const s=document.activeElement;(e.contains(s)||(t=(n=e.shadowRoot)==null?void 0:n.activeElement)!=null&&t.contains(s))&&this.markAsFocusTargetHandler()}}disconnect(e){e!=null&&(e.removeEventListener("keydown",this.delegateKeyDownEvent),e.removeEventListener("focus",this.markAsFocusTargetHandler),e.removeEventListener("blur",this.unmarkAsFocusTargetHandler),this.unmarkAsFocusTargetHandler())}}m.ensureDefined();const l=document.querySelector("#single-select-example"),o=l.querySelector("sd-list"),r=l.querySelector("input"),i=v(h,!1),g=i.length-1;o.items=i;r.addEventListener("input",()=>{o.items=i.filter((u,e)=>e==g||!r.value||u.caption.toLowerCase().indexOf(r.value.toLowerCase())>=0)});a.delegateTo(o).connect(r);
1
+ import{L as m}from"./doc.mjs";import{c as h,e as v}from"./sample-data.mjs";class r{constructor(e,t){this.eventTarget=e,this.keydownHandler=t,this.catchedKeys=["Down","ArrowDown","Up","ArrowUp","Enter"],this.markAsFocusTargetHandler=()=>this.eventTarget.setAttribute("focus-target",""),this.unmarkAsFocusTargetHandler=()=>this.eventTarget.removeAttribute("focus-target"),this.delegateKeyDownEvent=s=>{if(this.catchedKeys.indexOf(s.key)!==-1){const i=s.key.toLocaleLowerCase();let c=0;const d=i.includes("enter");d||(c=i.includes("down")?1:-1),this.keydownHandler(s,c,d),s.preventDefault(),s.stopPropagation(),s.stopImmediatePropagation()}}}static delegateTo(e){return new r(e,t=>e.dispatchEvent(new KeyboardEvent(t.type,t)))}connect(e){if(e!=null){e.addEventListener("keydown",this.delegateKeyDownEvent),e.addEventListener("focus",this.markAsFocusTargetHandler),e.addEventListener("blur",this.unmarkAsFocusTargetHandler);const t=document.activeElement;(e.contains(t)||e.shadowRoot?.activeElement?.contains(t))&&this.markAsFocusTargetHandler()}}disconnect(e){e!=null&&(e.removeEventListener("keydown",this.delegateKeyDownEvent),e.removeEventListener("focus",this.markAsFocusTargetHandler),e.removeEventListener("blur",this.unmarkAsFocusTargetHandler),this.unmarkAsFocusTargetHandler())}}m.ensureDefined();const l=document.querySelector("#single-select-example"),a=l.querySelector("sd-list"),n=l.querySelector("input"),o=h(v,!1),g=o.length-1;a.items=o;n.addEventListener("input",()=>{a.items=o.filter((u,e)=>e==g||!n.value||u.caption.toLowerCase().indexOf(n.value.toLowerCase())>=0)});r.delegateTo(a).connect(n);
@@ -1 +1 @@
1
- import{L as o}from"./doc.mjs";import{c,e as m}from"./sample-data.mjs";const r=document.querySelector("#trigger-only-example"),e=document.createElement(o.ID),s=c(m,!1);e.items=s;e.tabIndex=0;e.selectionType="trigger-only";e.addEventListener("selection",i=>{const n=i.detail.index,t=e.items[n];t!=null&&t.extendedListItem||!i.detail.selected||(s.splice(n,1),e.items=s)});r.appendChild(e);
1
+ import{L as n}from"./doc.mjs";import{c as m,e as a}from"./sample-data.mjs";const o=document.querySelector("#trigger-only-example"),e=document.createElement(n.ID),t=m(a,!1);e.items=t;e.tabIndex=0;e.selectionType="trigger-only";e.addEventListener("selection",i=>{const s=i.detail.index;e.items[s]?.extendedListItem||!i.detail.selected||(t.splice(s,1),e.items=t)});o.appendChild(e);
@@ -1,10 +1,10 @@
1
- var window;(window||={})["@cas-smartdesign/list"]=(()=>{var X=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Ft=Object.prototype.hasOwnProperty;var jt=(s,t)=>{for(var e in t)X(s,e,{get:t[e],enumerable:!0})},Vt=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wt(t))!Ft.call(s,o)&&o!==e&&X(s,o,{get:()=>t[o],enumerable:!(i=zt(t,o))||i.enumerable});return s};var qt=s=>Vt(X({},"__esModule",{value:!0}),s);var ne={};jt(ne,{default:()=>Ot});var ft=class z extends HTMLElement{memoizedTemplate(){let t=this.is();if(z.TEMPLATE_CACHE[t])return z.TEMPLATE_CACHE[t];let e=this.template();return window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,this.is()),z.TEMPLATE_CACHE[t]=e,e}connectedCallback(){let t=this.memoizedTemplate();window.ShadyCSS&&window.ShadyCSS.styleElement(this),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(t.content,!0)),requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("ready"))))}whenReady(t){this.shadowRoot?t():this.addEventListener("ready",()=>t())}};ft.TEMPLATE_CACHE={};var vt=ft;var W=window,F=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),gt=new WeakMap,L=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(F&&t===void 0){let i=e!==void 0&&e.length===1;i&&(t=gt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&gt.set(e,t))}return t}toString(){return this.cssText}},j=s=>new L(typeof s=="string"?s:s+"",void 0,Y),Z=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(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.")})(o)+s[r+1],s[0]);return new L(e,s,Y)},Q=(s,t)=>{F?s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let i=document.createElement("style"),o=W.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)})},V=F?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return j(e)})(s):s;var tt,q=window,yt=q.trustedTypes,Gt=yt?yt.emptyScript:"",$t=q.reactiveElementPolyfillSupport,it={toAttribute(s,t){switch(t){case Boolean:s=s?Gt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},bt=(s,t)=>t!==s&&(t==t||s==s),et={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:bt},st="finalized",y=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,i)=>{let o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=et){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){let r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||et}static finalize(){if(this.hasOwnProperty(st))return!1;this[st]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let o of i)e.unshift(V(o))}else t!==void 0&&e.push(V(t));return e}static _$Ep(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Q(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=et){var o;let r=this.constructor._$Ep(t,i);if(r!==void 0&&i.reflect===!0){let n=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:it).toAttribute(e,i.type);this._$El=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var i;let o=this.constructor,r=o._$Ev.get(t);if(r!==void 0&&this._$El!==r){let n=o.getPropertyOptions(r),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((i=n.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?n.converter:it;this._$El=r,this[r]=a.fromAttribute(e,n.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||bt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,r)=>this[r]=o),this._$Ei=void 0);let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};y[st]=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},$t?.({ReactiveElement:y}),((tt=q.reactiveElementVersions)!==null&&tt!==void 0?tt:q.reactiveElementVersions=[]).push("1.6.3");var ot,G=window,w=G.trustedTypes,At=w?w.createPolicy("lit-html",{createHTML:s=>s}):void 0,rt="$lit$",b=`lit$${(Math.random()+"").slice(9)}$`,It="?"+b,Kt=`<${It}>`,S=document,H=()=>S.createComment(""),U=s=>s===null||typeof s!="object"&&typeof s!="function",Tt=Array.isArray,Jt=s=>Tt(s)||typeof s?.[Symbol.iterator]=="function",nt=`[
2
- \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,Et=/>/g,_=RegExp(`>|${nt}(?:([^\\s"'>=/]+)(${nt}*=${nt}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),St=/'/g,xt=/"/g,kt=/^(?:script|style|textarea|title)$/i,Lt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),R=Lt(1),ue=Lt(2),$=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),wt=new WeakMap,E=S.createTreeWalker(S,129,null,!1);function Pt(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return At!==void 0?At.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,i=[],o,r=t===2?"<svg>":"",n=P;for(let a=0;a<e;a++){let l=s[a],c,h,u=-1,p=0;for(;p<l.length&&(n.lastIndex=p,h=n.exec(l),h!==null);)p=n.lastIndex,n===P?h[1]==="!--"?n=_t:h[1]!==void 0?n=Et:h[2]!==void 0?(kt.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=_):h[3]!==void 0&&(n=_):n===_?h[0]===">"?(n=o??P,u=-1):h[1]===void 0?u=-2:(u=n.lastIndex-h[2].length,c=h[1],n=h[3]===void 0?_:h[3]==='"'?xt:St):n===xt||n===St?n=_:n===_t||n===Et?n=P:(n=_,o=void 0);let g=n===_&&s[a+1].startsWith("/>")?" ":"";r+=n===P?l+Kt:u>=0?(i.push(c),l.slice(0,u)+rt+l.slice(u)+b+g):l+b+(u===-2?(i.push(void 0),a):g)}return[Pt(s,r+(s[e]||"<?>")+(t===2?"</svg>":"")),i]},M=class s{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0,a=t.length-1,l=this.parts,[c,h]=Xt(t,e);if(this.el=s.createElement(c,i),E.currentNode=this.el.content,e===2){let u=this.el.content,p=u.firstChild;p.remove(),u.append(...p.childNodes)}for(;(o=E.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes()){let u=[];for(let p of o.getAttributeNames())if(p.endsWith(rt)||p.startsWith(b)){let g=h[n++];if(u.push(p),g!==void 0){let Bt=o.getAttribute(g.toLowerCase()+rt).split(b),B=/([.?@])?(.*)/.exec(g);l.push({type:1,index:r,name:B[2],strings:Bt,ctor:B[1]==="."?at:B[1]==="?"?ct:B[1]==="@"?dt:I})}else l.push({type:6,index:r})}for(let p of u)o.removeAttribute(p)}if(kt.test(o.tagName)){let u=o.textContent.split(b),p=u.length-1;if(p>0){o.textContent=w?w.emptyScript:"";for(let g=0;g<p;g++)o.append(u[g],H()),E.nextNode(),l.push({type:2,index:++r});o.append(u[p],H())}}}else if(o.nodeType===8)if(o.data===It)l.push({type:2,index:r});else{let u=-1;for(;(u=o.data.indexOf(b,u+1))!==-1;)l.push({type:7,index:r}),u+=b.length-1}r++}}static createElement(t,e){let i=S.createElement("template");return i.innerHTML=t,i}};function C(s,t,e=s,i){var o,r,n,a;if(t===$)return t;let l=i!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[i]:e._$Cl,c=U(t)?void 0:t._$litDirective$;return l?.constructor!==c&&((r=l?._$AO)===null||r===void 0||r.call(l,!1),c===void 0?l=void 0:(l=new c(s),l._$AT(s,e,i)),i!==void 0?((n=(a=e)._$Co)!==null&&n!==void 0?n:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=C(s,l._$AS(s,t.values),l,i)),t}var lt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;let{el:{content:i},parts:o}=this._$AD,r=((e=t?.creationScope)!==null&&e!==void 0?e:S).importNode(i,!0);E.currentNode=r;let n=E.nextNode(),a=0,l=0,c=o[0];for(;c!==void 0;){if(a===c.index){let h;c.type===2?h=new N(n,n.nextSibling,this,t):c.type===1?h=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(h=new ht(n,this,t)),this._$AV.push(h),c=o[++l]}a!==c?.index&&(n=E.nextNode(),a++)}return E.currentNode=S,r}v(t){let e=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},N=class s{constructor(t,e,i,o){var r;this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=(r=o?.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),U(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==$&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Jt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==d&&U(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var e;let{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=M.createElement(Pt(o.h,o.h[0]),this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.v(i);else{let n=new lt(r,this),a=n.u(this.options);n.v(i),this.$(a),this._$AH=n}}_$AC(t){let e=wt.get(t.strings);return e===void 0&&wt.set(t.strings,e=new M(t)),e}T(t){Tt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,o=0;for(let r of t)o===e.length?e.push(i=new s(this.k(H()),this.k(H()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},I=class{constructor(t,e,i,o,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){let r=this.strings,n=!1;if(r===void 0)t=C(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==$,n&&(this._$AH=t);else{let a=t,l,c;for(t=r[0],l=0;l<r.length-1;l++)c=C(this,a[i+l],e,l),c===$&&(c=this._$AH[l]),n||(n=!U(c)||c!==this._$AH[l]),c===d?t=d:t!==d&&(t+=(c??"")+r[l+1]),this._$AH[l]=c}n&&!o&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},at=class extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},Yt=w?w.emptyScript:"",ct=class extends I{constructor(){super(...arguments),this.type=4}j(t){t&&t!==d?this.element.setAttribute(this.name,Yt):this.element.removeAttribute(this.name)}},dt=class extends I{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=(i=C(this,t,e,0))!==null&&i!==void 0?i:d)===$)return;let o=this._$AH,r=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==d&&(o===d||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},ht=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var Ct=G.litHtmlPolyfillSupport;Ct?.(M,N),((ot=G.litHtmlVersions)!==null&&ot!==void 0?ot:G.litHtmlVersions=[]).push("2.8.0");var Ht=(s,t,e)=>{var i,o;let r=(i=e?.renderBefore)!==null&&i!==void 0?i:t,n=r._$litPart$;if(n===void 0){let a=(o=e?.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=n=new N(t.insertBefore(H(),a),a,void 0,e??{})}return n._$AI(s),n};var ut,pt;var A=class extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return $}};A.finalized=!0,A._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:A});var Ut=globalThis.litElementPolyfillSupport;Ut?.({LitElement:A});((pt=globalThis.litElementVersions)!==null&&pt!==void 0?pt:globalThis.litElementVersions=[]).push("3.3.3");var Zt=(s,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,s)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,s)}},Qt=(s,t,e)=>{t.constructor.createProperty(e,s)};function m(s){return(t,e)=>e!==void 0?Qt(s,t,e):Zt(s,t)}var Mt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Nt=s=>(...t)=>({_$litDirective$:s,values:t}),K=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var D=class extends K{constructor(t){if(super(t),this.et=d,t.type!==Mt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===d||t==null)return this.ft=void 0,this.et=t;if(t===$)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;let e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};D.directiveName="unsafeHTML",D.resultType=1;var Rt=Nt(D);var O=s=>s??d;var J=class{static showImage(t,e,i,o){let r;if(o||!(t instanceof HTMLImageElement)?r=n=>t.style.backgroundImage=this.prepareSrc(n):r=n=>t.src=n,r(i),e){let n=()=>{r(e)},a=new Image;a.addEventListener("load",n),a.src=e,a.complete&&(a.removeEventListener("load",n),n())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var te=':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;word-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}',ee=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,v=(s,t,e,i)=>{for(var o=i>1?void 0:i?ie(t,e):t,r=s.length-1,n;r>=0;r--)(n=s[r])&&(o=(i?n(t,e,o):n(o))||o);return i&&o&&ee(t,e,o),o},x,f=(x=class extends A{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[Z`
4
- ${j(te)}
1
+ var window;(window||={})["@cas-smartdesign/list"]=(()=>{var X=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Ht=Object.prototype.hasOwnProperty;var Nt=(i,t)=>{for(var e in t)X(i,e,{get:t[e],enumerable:!0})},Rt=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Dt(t))!Ht.call(i,o)&&o!==e&&X(i,o,{get:()=>t[o],enumerable:!(s=Ut(t,o))||s.enumerable});return i};var Ot=i=>Rt(X({},"__esModule",{value:!0}),i);var ne={};Nt(ne,{default:()=>Mt});var pt=class W extends HTMLElement{memoizedTemplate(){let t=this.is();if(W.TEMPLATE_CACHE[t])return W.TEMPLATE_CACHE[t];let e=this.template();return window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,this.is()),W.TEMPLATE_CACHE[t]=e,e}connectedCallback(){let t=this.memoizedTemplate();window.ShadyCSS&&window.ShadyCSS.styleElement(this),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(t.content,!0)),requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("ready"))))}whenReady(t){this.shadowRoot?t():this.addEventListener("ready",()=>t())}};pt.TEMPLATE_CACHE={};var ut=pt;var j=globalThis,F=j.ShadowRoot&&(j.ShadyCSS===void 0||j.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),mt=new WeakMap,L=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(F&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&mt.set(e,t))}return t}toString(){return this.cssText}},q=i=>new L(typeof i=="string"?i:i+"",void 0,Y),Q=(i,...t)=>{let e=i.length===1?i[0]:t.reduce(((s,o,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+i[n+1]),i[0]);return new L(e,i,Y)},ft=(i,t)=>{if(F)i.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=j.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}},tt=F?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return q(e)})(i):i;var{is:Bt,defineProperty:zt,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:jt,getOwnPropertySymbols:Ft,getPrototypeOf:qt}=Object,V=globalThis,gt=V.trustedTypes,Vt=gt?gt.emptyScript:"",Gt=V.reactiveElementPolyfillSupport,P=(i,t)=>i,k={toAttribute(i,t){switch(t){case Boolean:i=i?Vt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},G=(i,t)=>!Bt(i,t),vt={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:G};Symbol.metadata??=Symbol("metadata"),V.litPropertyMetadata??=new WeakMap;var v=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,e=vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&zt(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:n}=Wt(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:o,set(r){let l=o?.call(this);n?.call(this,r),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??vt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let t=qt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let e=this.properties,s=[...jt(e),...Ft(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(tt(o))}else t!==void 0&&e.push(tt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ft(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,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:k).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let n=s.getPropertyOptions(o),r=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:k;this._$Em=o;let l=r.fromAttribute(e,n.type);this[o]=l??this._$Ej?.get(o)??l,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,n=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??G)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:n},r){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}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[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,n]of s){let{wrapped:r}=n,l=this[o];r!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,n,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.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((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[P("elementProperties")]=new Map,v[P("finalized")]=new Map,Gt?.({ReactiveElement:v}),(V.reactiveElementVersions??=[]).push("2.1.1");var at=globalThis,K=at.trustedTypes,bt=K?K.createPolicy("lit-html",{createHTML:i=>i}):void 0,St="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,xt="?"+$,Kt=`<${xt}>`,S=document,U=()=>S.createComment(""),D=i=>i===null||typeof i!="object"&&typeof i!="function",lt=Array.isArray,Zt=i=>lt(i)||typeof i?.[Symbol.iterator]=="function",et=`[
2
+ \f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,$t=/>/g,_=RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,_t=/"/g,wt=/^(?:script|style|textarea|title)$/i,ct=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),R=ct(1),pe=ct(2),ue=ct(3),b=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Et=new WeakMap,E=S.createTreeWalker(S,129);function Ct(i,t){if(!lt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return bt!==void 0?bt.createHTML(t):t}var Jt=(i,t)=>{let e=i.length-1,s=[],o,n=t===2?"<svg>":t===3?"<math>":"",r=M;for(let l=0;l<e;l++){let a=i[l],d,p,h=-1,g=0;for(;g<a.length&&(r.lastIndex=g,p=r.exec(a),p!==null);)g=r.lastIndex,r===M?p[1]==="!--"?r=yt:p[1]!==void 0?r=$t:p[2]!==void 0?(wt.test(p[2])&&(o=RegExp("</"+p[2],"g")),r=_):p[3]!==void 0&&(r=_):r===_?p[0]===">"?(r=o??M,h=-1):p[1]===void 0?h=-2:(h=r.lastIndex-p[2].length,d=p[1],r=p[3]===void 0?_:p[3]==='"'?_t:At):r===_t||r===At?r=_:r===yt||r===$t?r=M:(r=_,o=void 0);let y=r===_&&i[l+1].startsWith("/>")?" ":"";n+=r===M?a+Kt:h>=0?(s.push(d),a.slice(0,h)+St+a.slice(h)+$+y):a+$+(h===-2?l:y)}return[Ct(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},H=class i{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let n=0,r=0,l=t.length-1,a=this.parts,[d,p]=Jt(t,e);if(this.el=i.createElement(d,s),E.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=E.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(St)){let g=p[r++],y=o.getAttribute(h).split($),z=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:z[2],strings:y,ctor:z[1]==="."?it:z[1]==="?"?ot:z[1]==="@"?nt:C}),o.removeAttribute(h)}else h.startsWith($)&&(a.push({type:6,index:n}),o.removeAttribute(h));if(wt.test(o.tagName)){let h=o.textContent.split($),g=h.length-1;if(g>0){o.textContent=K?K.emptyScript:"";for(let y=0;y<g;y++)o.append(h[y],U()),E.nextNode(),a.push({type:2,index:++n});o.append(h[g],U())}}}else if(o.nodeType===8)if(o.data===xt)a.push({type:2,index:n});else{let h=-1;for(;(h=o.data.indexOf($,h+1))!==-1;)a.push({type:7,index:n}),h+=$.length-1}n++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function w(i,t,e=i,s){if(t===b)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,n=D(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(i),o._$AT(i,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=w(i,o._$AS(i,t.values),o,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??S).importNode(e,!0);E.currentNode=o;let n=E.nextNode(),r=0,l=0,a=s[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new N(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new rt(n,this,t)),this._$AV.push(d),a=s[++l]}r!==a?.index&&(n=E.nextNode(),r++)}return E.currentNode=S,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},N=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),D(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==b&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Zt(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!==c&&D(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement(Ct(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let n=new st(o,this),r=n.u(this.options);n.p(e),this.T(r),this._$AH=n}}_$AC(t){let e=Et.get(t.strings);return e===void 0&&Et.set(t.strings,e=new H(t)),e}k(t){lt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let n of t)o===e.length?e.push(s=new i(this.O(U()),this.O(U()),this,this.options)):s=e[o],s._$AI(n),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,n){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(t,e=this,s,o){let n=this.strings,r=!1;if(n===void 0)t=w(this,t,e,0),r=!D(t)||t!==this._$AH&&t!==b,r&&(this._$AH=t);else{let l=t,a,d;for(t=n[0],a=0;a<n.length-1;a++)d=w(this,l[s+a],e,a),d===b&&(d=this._$AH[a]),r||=!D(d)||d!==this._$AH[a],d===c?t=c:t!==c&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}r&&!o&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},it=class extends C{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},ot=class extends C{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},nt=class extends C{constructor(t,e,s,o,n){super(t,e,s,o,n),this.type=5}_$AI(t,e=this){if((t=w(this,t,e,0)??c)===b)return;let s=this._$AH,o=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==c&&(s===c||o);o&&this.element.removeEventListener(this.name,this,s),n&&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)}},rt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}};var Xt=at.litHtmlPolyfillSupport;Xt?.(H,N),(at.litHtmlVersions??=[]).push("3.3.1");var It=(i,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let n=e?.renderBefore??null;s._$litPart$=o=new N(t.insertBefore(U(),n),n,void 0,e??{})}return o._$AI(i),o};var ht=globalThis,A=class extends v{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 e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=It(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return b}};A._$litElement$=!0,A.finalized=!0,ht.litElementHydrateSupport?.({LitElement:A});var Yt=ht.litElementPolyfillSupport;Yt?.({LitElement:A});(ht.litElementVersions??=[]).push("4.2.1");var Qt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:G},te=(i=Qt,t,e)=>{let{kind:s,metadata:o}=e,n=globalThis.litPropertyMetadata.get(o);if(n===void 0&&globalThis.litPropertyMetadata.set(o,n=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(e.name,i),s==="accessor"){let{name:r}=e;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,a,i)},init(l){return l!==void 0&&this.C(r,void 0,i,l),l}}}if(s==="setter"){let{name:r}=e;return function(l){let a=this[r];t.call(this,l),this.requestUpdate(r,a,i)}}throw Error("Unsupported decorator location: "+s)};function u(i){return(t,e)=>typeof e=="object"?te(i,t,e):((s,o,n)=>{let r=o.hasOwnProperty(n);return o.constructor.createProperty(n,s),r?Object.getOwnPropertyDescriptor(o,n):void 0})(i,t,e)}var Tt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Lt=i=>(...t)=>({_$litDirective$:i,values:t}),Z=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var O=class extends Z{constructor(t){if(super(t),this.it=c,t.type!==Tt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===c||t==null)return this._t=void 0,this.it=t;if(t===b)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 e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};O.directiveName="unsafeHTML",O.resultType=1;var Pt=Lt(O);var B=i=>i??c;var J=class{static showImage(t,e,s,o){let n;if(o||!(t instanceof HTMLImageElement)?n=r=>t.style.backgroundImage=this.prepareSrc(r):n=r=>t.src=r,n(s),e){let r=()=>{n(e)},l=new Image;l.addEventListener("load",r),l.src=e,l.complete&&(l.removeEventListener("load",r),r())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var ee=':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}',se=Object.defineProperty,f=(i,t,e,s)=>{for(var o=void 0,n=i.length-1,r;n>=0;n--)(r=i[n])&&(o=r(t,e,o)||o);return o&&se(t,e,o),o},x,m=(x=class extends A{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[Q`
4
+ ${q(ee)}
5
5
  `]}render(){return R`
6
6
  <div class="container">
7
- ${this.getLevelIndicators().map((s,t)=>R` <div class="level-indicator level-${t}"></div> `)}
7
+ ${this.getLevelIndicators().map((i,t)=>R` <div class="level-indicator level-${t}"></div> `)}
8
8
  <div class="side-content">
9
9
  <slot name="left-content"></slot>
10
10
  ${this.renderIcon()}
@@ -17,22 +17,22 @@ var window;(window||={})["@cas-smartdesign/list"]=(()=>{var X=Object.definePrope
17
17
  <slot name="right-content"></slot>
18
18
  </div>
19
19
  </div>
20
- `}renderIcon(){if(this.icon||this.iconPlaceholder){let s=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return R`
20
+ `}renderIcon(){if(this.icon||this.iconPlaceholder){let i=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return R`
21
21
  <div
22
22
  class="icon-wrapper"
23
23
  @pointerdown="${this.handleIconClick}"
24
- style="${O(s)}"
24
+ style="${B(i)}"
25
25
  role="img"
26
- aria-label="${O(this.iconAttrAriaLabel)}"
27
- title="${O(this.iconAttrTitle)}"
26
+ aria-label="${B(this.iconAttrAriaLabel)}"
27
+ title="${B(this.iconAttrTitle)}"
28
28
  >
29
29
  <div class="icon"></div>
30
30
  </div>
31
- `}return d}renderLabel(s,t,e){return t?R`
32
- <div class="${s}" title="${O(e)}">
33
- ${this.contentMode==="html"?Rt(t):t}
31
+ `}return c}renderLabel(i,t,e){return t?R`
32
+ <div class="${i}" title="${B(e)}">
33
+ ${this.contentMode==="html"?Pt(t):t}
34
34
  </div>
35
- `:d}updated(s){super.updated(s),(s.has("icon")||s.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&J.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),s.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let s=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let i=this.shadowRoot.querySelector(".description");return i&&(t=Math.max(t,i.scrollWidth-i.clientWidth)),t>0&&t++,s&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(s){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",s))&&s.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},x.ID="sd-list-item",x.ensureDefined=()=>{customElements.get(x.ID)||customElements.define(x.ID,x)},x);v([m({type:String})],f.prototype,"caption",2);v([m({type:String})],f.prototype,"description",2);v([m({type:Boolean})],f.prototype,"selected",2);v([m({type:String})],f.prototype,"icon",2);v([m({type:String})],f.prototype,"iconBackgroundColor",2);v([m({type:String})],f.prototype,"iconPlaceholder",2);v([m({type:Number})],f.prototype,"level",2);v([m()],f.prototype,"contentMode",2);v([m({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],f.prototype,"enableLineClamp",2);v([m({type:Boolean,reflect:!0,attribute:"aria-disabled"})],f.prototype,"disabled",2);v([m({type:String,attribute:"icon-attr-aria-label"})],f.prototype,"iconAttrAriaLabel",2);v([m({type:String,reflect:!0})],f.prototype,"role",2);v([m({type:String,attribute:"caption-attr-title"})],f.prototype,"captionAttrTitle",2);v([m({type:String,attribute:"description-attr-title"})],f.prototype,"descriptionAttrTitle",2);v([m({type:String,attribute:"icon-attr-title"})],f.prototype,"iconAttrTitle",2);var T=f,Dt=(s,t)=>{let e=document.createElement(T.ID);if(s){if(e.caption=s.caption,e.description=s.description,e.icon=s.icon,e.iconBackgroundColor=s.iconBackgroundColor,e.iconPlaceholder=s.iconPlaceholder,e.level=s.level,e.disabled=s.disabled,s.contentMode&&(e.contentMode=s.contentMode),s.leftContentGenerator){let i=s.leftContentGenerator(s,e);i&&(i.slot="left-content",e.appendChild(i))}if(s.rightContentGenerator){let i=s.rightContentGenerator(s,e);i&&(i.slot="right-content",e.appendChild(i))}}return e};T.ensureDefined();var se=`<style>
35
+ `:c}updated(i){super.updated(i),(i.has("icon")||i.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&J.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let s=this.shadowRoot.querySelector(".description");return s&&(t=Math.max(t,s.scrollWidth-s.clientWidth)),t>0&&t++,i&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},x.ID="sd-list-item",x.ensureDefined=()=>{customElements.get(x.ID)||customElements.define(x.ID,x)},x);f([u({type:String})],m.prototype,"caption");f([u({type:String})],m.prototype,"description");f([u({type:Boolean})],m.prototype,"selected");f([u({type:String})],m.prototype,"icon");f([u({type:String})],m.prototype,"iconBackgroundColor");f([u({type:String})],m.prototype,"iconPlaceholder");f([u({type:Number})],m.prototype,"level");f([u()],m.prototype,"contentMode");f([u({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],m.prototype,"enableLineClamp");f([u({converter:{fromAttribute:i=>i=="true",toAttribute:i=>i},reflect:!0,attribute:"aria-disabled"})],m.prototype,"disabled");f([u({type:String,attribute:"icon-attr-aria-label"})],m.prototype,"iconAttrAriaLabel");f([u({type:String,reflect:!0})],m.prototype,"role");f([u({type:String,attribute:"caption-attr-title"})],m.prototype,"captionAttrTitle");f([u({type:String,attribute:"description-attr-title"})],m.prototype,"descriptionAttrTitle");f([u({type:String,attribute:"icon-attr-title"})],m.prototype,"iconAttrTitle");var I=m,kt=(i,t)=>{let e=document.createElement(I.ID);if(i){if(e.caption=i.caption,e.description=i.description,e.icon=i.icon,e.iconBackgroundColor=i.iconBackgroundColor,e.iconPlaceholder=i.iconPlaceholder,e.level=i.level,e.disabled=i.disabled,i.contentMode&&(e.contentMode=i.contentMode),i.leftContentGenerator){let s=i.leftContentGenerator(i,e);s&&(s.slot="left-content",e.appendChild(s))}if(i.rightContentGenerator){let s=i.rightContentGenerator(i,e);s&&(s.slot="right-content",e.appendChild(s))}}return e};I.ensureDefined();var ie=`<style>
36
36
  :host {
37
37
  background-color: var(--sd-list-base-background-color, white);
38
38
  }
@@ -64,7 +64,7 @@ var window;(window||={})["@cas-smartdesign/list"]=(()=>{var X=Object.definePrope
64
64
  <slot name="items"></slot>
65
65
  <slot id="default-slot"></slot>
66
66
  </div>
67
- `,oe=0,k=class mt extends vt{constructor(){super(),this._items=[],this._selectedIndexes=[],this._itemGenerator=Dt,this.onDefaultSlotChange=()=>{let t=0;this.defaultSlot.assignedElements().forEach(e=>{this.isSeparator(e)||this.initListItem(e,t++)}),this.updateFocusedElement()},this.handleKeyDown=t=>{let e=!0;switch(t.key){case"ArrowDown":case"Down":this.focusIndex=Math.min(this.getListItems.length-1,this.focusIndex+1);break;case"ArrowUp":case"Up":this.focusIndex=Math.max(0,this.focusIndex-1);break;case"Enter":case"Space":case" ":this.handleSelection(this.focusIndex,t.metaKey||t.ctrlKey);break;case"End":case"PageDown":this.focusIndex=this.items.length-1;break;case"Home":case"PageUp":this.focusIndex=0;break;default:e=!1;break}e&&(t.preventDefault(),t.stopPropagation())},this._fallbackId=mt.ID+"_"+oe++,this.addEventListener("pointerup",t=>{this.focusIndex=this.getListItems.indexOf(t.target),this.updateFocusedElement()}),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndexes&&(this.focusIndex=this.selectedIndexes[0]),this.focusIndex==-1&&this.childElementCount>0&&(this.focusIndex=0)):this.updateFocusedElement())}),this.addEventListener("blur",()=>this.removeFocusedItemAttributes())}get items(){return this._items}set items(t){this._items=t,this.render()}get itemGenerator(){return this._itemGenerator}set itemGenerator(t){this._itemGenerator=t,this.render()}get selectionType(){return this.getAttribute("selection-type")}set selectionType(t){t?this.setAttribute("selection-type",t):this.removeAttribute("selection-type")}get focusIndex(){return this.hasAttribute("focus-index")?Number(this.getAttribute("focus-index")):-1}set focusIndex(t){0<=t&&t<this.getListItems.length?this.setAttribute("focus-index",t.toString()):this.removeAttribute("focus-index")}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(t){this.toggleAttribute("focus-target",t)}getListItem(t){return this.shadowRoot?this.getListItems[t]:null}get getListItems(){return Array.prototype.slice.call(this.children).filter(t=>!this.isSeparator(t))}get selectedIndexes(){return this._selectedIndexes}set selectedIndexes(t){let e=this._selectedIndexes||[];this._selectedIndexes=t||[],e.filter(i=>!this._selectedIndexes.includes(i)).forEach(i=>{this.setSelectedAttr(this.getListItem(i),!1)}),this._selectedIndexes.filter(i=>!e.includes(i)).forEach(i=>{this.setSelectedAttr(this.getListItem(i),!0)})}static get observedAttributes(){return["focus-index","focus-target"]}is(){return mt.ID}template(){let t=document.createElement("template");return t.innerHTML=se,t}removeFocusedItemAttributes(){if(this.focusIndex!=-1){let t=this.getListItem(this.focusIndex);t&&(t.removeAttribute("focused"),this.removeAttribute("aria-activedescendant"))}}connectedCallback(){super.connectedCallback(),this.defaultSlot.addEventListener("slotchange",this.onDefaultSlotChange),this.hasAttribute("role")||this.setAttribute("role","listbox"),this.id||(this.id=this._fallbackId),this.render(),this.addEventListener("keydown",this.handleKeyDown),this.selectionType||(this.selectionType="trigger-only")}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}isSeparator(t){return t.tagName=="HR"||t.getAttribute("role")=="separator"}attributeChangedCallback(t,e,i){if(t==="focus-index"){let o=this.getListItem(e);o&&o.removeAttribute("focused"),this.updateFocusedElement()}else t==="focus-target"&&(this.focusTarget?this.updateFocusedElement():document.activeElement!=this&&this.removeFocusedItemAttributes())}increaseWidthIfNeeded(){window.requestAnimationFrame(()=>{let t=Number.MAX_SAFE_INTEGER,e=getComputedStyle(this).maxWidth,i=this.offsetWidth;e.endsWith("px")&&(t=Number.parseInt(e)-i);let o=this.style.width;if(t==0||o.endsWith("px")&&i<Number.parseInt(o))this.enableLineClampOnItemsIfNeeded();else{let r=[...this.querySelectorAll("[slot='items']")].map(a=>{if(a instanceof T){a.enableLineClamp=!1;let l=a.missingWidthForTexts;return l>t&&(a.enableLineClamp=!0),l}}),n=Math.max(...r);if(n>0){let a=i+n;this.style.width=`${a}px`,this.offsetWidth<a&&this.enableLineClampOnItemsIfNeeded()}}})}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[slot='items']").forEach(t=>{t instanceof T&&(t.enableLineClamp=t.enableLineClamp||t.missingWidthForTexts>0)})}render(){if(!this.isConnected||!this.items)return;this.querySelectorAll("[slot='items']").forEach(i=>{this.removeChild(i)});let t=document.createDocumentFragment(),e=0;this.items.forEach((i,o)=>{let r=this.itemGenerator(i,o);this.isSeparator(r)||this.initListItem(r,e++),r.slot="items",t.appendChild(r)}),this.appendChild(t),this.updateFocusedElement()}initListItem(t,e){this.setSelectedAttr(t,this.selectedIndexes.includes(e)),t.addEventListener("click",i=>{this.handleItemClick(i,e)}),t.addEventListener("mousedown",i=>{i.button==1&&i.preventDefault()}),t.addEventListener("auxclick",i=>{this.handleItemClick(i,e)}),(!t.id||t.id.startsWith(this.id+"_item_"))&&(t.id=this.id+"_item_"+e)}ensureItemVisible(t){let e=t.getBoundingClientRect(),i=this.getBoundingClientRect();e.bottom>i.bottom?this.scrollTop+=e.bottom-i.bottom:e.top<i.top&&(this.scrollTop-=i.top-e.top)}updateFocusedElement(){let t=this.getListItem(this.focusIndex);t&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id),this.ensureItemVisible(t)):this.removeAttribute("aria-activedescendant")}handleItemClick(t,e){if(t.button!==null){let i=t.type=="auxclick"&&t.button==1||t.metaKey||t.ctrlKey;(t.button==0||t.button==1)&&this.handleSelection(e,i)}}handleSelection(t,e){let i=this.getListItem(t);if(i.getAttribute("aria-disabled")=="true"||i.hasAttribute("disabled"))return;let o=this.isSelected(i);this.selectionType!=="trigger-only"&&(this.selectionType==="single"?this.selectedIndexes=o?[]:[t]:this.toggleSelection(i)?this._selectedIndexes.push(t):this.removeFromSelectedIndexes(t)),this.focusIndex=t,this.dispatchEvent(new CustomEvent("selection",{detail:{index:t,selected:this.selectionType=="trigger-only"||!o,hasModifier:e},bubbles:!0,composed:!0}))}removeFromSelectedIndexes(t){let e=this._selectedIndexes.indexOf(t);e!==-1&&this._selectedIndexes.splice(e,1)}toggleSelection(t){let e=!t.hasAttribute("selected");return this.setSelectedAttr(t,e),e}setSelectedAttr(t,e){t&&(e?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(e)))}isSelected(t){return t.hasAttribute("selected")}};k.ID="sd-list",k.ensureDefined=()=>{T.ensureDefined(),customElements.get(k.ID)||customElements.define(k.ID,k)};var Ot=k;Ot.ensureDefined();return qt(ne);})();
67
+ `,oe=0,T=class dt extends ut{constructor(){super(),this._items=[],this._selectedIndexes=[],this._itemGenerator=kt,this.onDefaultSlotChange=()=>{let t=0;this.defaultSlot.assignedElements().forEach(e=>{this.isSeparator(e)||this.initListItem(e,t++)}),this.updateFocusedElement()},this.handleKeyDown=t=>{let e=!0;switch(t.key){case"ArrowDown":case"Down":this.focusIndex=Math.min(this.getListItems.length-1,this.focusIndex+1);break;case"ArrowUp":case"Up":this.focusIndex=Math.max(0,this.focusIndex-1);break;case"Enter":case"Space":case" ":this.handleSelection(this.focusIndex,t.metaKey||t.ctrlKey);break;case"End":case"PageDown":this.focusIndex=this.items.length-1;break;case"Home":case"PageUp":this.focusIndex=0;break;default:e=!1;break}e&&(t.preventDefault(),t.stopPropagation())},this._fallbackId=dt.ID+"_"+oe++,this.addEventListener("pointerup",t=>{this.focusIndex=this.getListItems.indexOf(t.target),this.updateFocusedElement()}),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndexes&&(this.focusIndex=this.selectedIndexes[0]),this.focusIndex==-1&&this.childElementCount>0&&(this.focusIndex=0)):this.updateFocusedElement())}),this.addEventListener("blur",()=>this.removeFocusedItemAttributes())}get items(){return this._items}set items(t){this._items=t,this.render()}get itemGenerator(){return this._itemGenerator}set itemGenerator(t){this._itemGenerator=t,this.render()}get selectionType(){return this.getAttribute("selection-type")}set selectionType(t){t?this.setAttribute("selection-type",t):this.removeAttribute("selection-type")}get focusIndex(){return this.hasAttribute("focus-index")?Number(this.getAttribute("focus-index")):-1}set focusIndex(t){0<=t&&t<this.getListItems.length?this.setAttribute("focus-index",t.toString()):this.removeAttribute("focus-index")}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(t){this.toggleAttribute("focus-target",t)}getListItem(t){return this.shadowRoot?this.getListItems[t]:null}get getListItems(){return Array.prototype.slice.call(this.children).filter(t=>!this.isSeparator(t))}get selectedIndexes(){return this._selectedIndexes}set selectedIndexes(t){let e=this._selectedIndexes||[];this._selectedIndexes=t||[],e.filter(s=>!this._selectedIndexes.includes(s)).forEach(s=>{this.setSelectedAttr(this.getListItem(s),!1)}),this._selectedIndexes.filter(s=>!e.includes(s)).forEach(s=>{this.setSelectedAttr(this.getListItem(s),!0)})}static get observedAttributes(){return["focus-index","focus-target"]}is(){return dt.ID}template(){let t=document.createElement("template");return t.innerHTML=ie,t}removeFocusedItemAttributes(){if(this.focusIndex!=-1){let t=this.getListItem(this.focusIndex);t&&(t.removeAttribute("focused"),this.removeAttribute("aria-activedescendant"))}}connectedCallback(){super.connectedCallback(),this.defaultSlot.addEventListener("slotchange",this.onDefaultSlotChange),this.hasAttribute("role")||this.setAttribute("role","listbox"),this.id||(this.id=this._fallbackId),this.render(),this.addEventListener("keydown",this.handleKeyDown),this.selectionType||(this.selectionType="trigger-only")}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}isSeparator(t){return t.tagName=="HR"||t.getAttribute("role")=="separator"}attributeChangedCallback(t,e,s){if(t==="focus-index"){let o=this.getListItem(e);o&&o.removeAttribute("focused"),this.updateFocusedElement()}else t==="focus-target"&&(this.focusTarget?this.updateFocusedElement():document.activeElement!=this&&this.removeFocusedItemAttributes())}increaseWidthIfNeeded(){window.requestAnimationFrame(()=>{let t=Number.MAX_SAFE_INTEGER,e=getComputedStyle(this).maxWidth,s=this.offsetWidth;e.endsWith("px")&&(t=Number.parseInt(e)-s);let o=this.style.width;if(t==0||o.endsWith("px")&&s<Number.parseInt(o))this.enableLineClampOnItemsIfNeeded();else{let n=[...this.querySelectorAll("[slot='items']")].map(l=>{if(l instanceof I){l.enableLineClamp=!1;let a=l.missingWidthForTexts;return a>t&&(l.enableLineClamp=!0),a}}),r=Math.max(...n);if(r>0){let l=s+r;this.style.width=`${l}px`,this.offsetWidth<l&&this.enableLineClampOnItemsIfNeeded()}}})}enableLineClampOnItemsIfNeeded(){this.querySelectorAll("[slot='items']").forEach(t=>{t instanceof I&&(t.enableLineClamp=t.enableLineClamp||t.missingWidthForTexts>0)})}render(){if(!this.isConnected||!this.items)return;this.querySelectorAll("[slot='items']").forEach(s=>{this.removeChild(s)});let t=document.createDocumentFragment(),e=0;this.items.forEach((s,o)=>{let n=this.itemGenerator(s,o);this.isSeparator(n)||this.initListItem(n,e++),n.slot="items",t.appendChild(n)}),this.appendChild(t),this.updateFocusedElement()}initListItem(t,e){this.setSelectedAttr(t,this.selectedIndexes.includes(e)),t.addEventListener("click",s=>{this.handleItemClick(s,e)}),t.addEventListener("mousedown",s=>{s.button==1&&s.preventDefault()}),t.addEventListener("auxclick",s=>{this.handleItemClick(s,e)}),(!t.id||t.id.startsWith(this.id+"_item_"))&&(t.id=this.id+"_item_"+e)}ensureItemVisible(t){let e=t.getBoundingClientRect(),s=this.getBoundingClientRect();e.bottom>s.bottom?this.scrollTop+=e.bottom-s.bottom:e.top<s.top&&(this.scrollTop-=s.top-e.top)}updateFocusedElement(){let t=this.getListItem(this.focusIndex);t&&(this.focusTarget||document.activeElement==this)?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id),this.ensureItemVisible(t)):this.removeAttribute("aria-activedescendant")}handleItemClick(t,e){if(t.button!==null){let s=t.type=="auxclick"&&t.button==1||t.metaKey||t.ctrlKey;(t.button==0||t.button==1)&&this.handleSelection(e,s)}}handleSelection(t,e){let s=this.getListItem(t);if(s.getAttribute("aria-disabled")=="true"||s.hasAttribute("disabled"))return;let o=this.isSelected(s);this.selectionType!=="trigger-only"&&(this.selectionType==="single"?this.selectedIndexes=o?[]:[t]:this.toggleSelection(s)?this._selectedIndexes.push(t):this.removeFromSelectedIndexes(t)),this.focusIndex=t,this.dispatchEvent(new CustomEvent("selection",{detail:{index:t,selected:this.selectionType=="trigger-only"||!o,hasModifier:e},bubbles:!0,composed:!0}))}removeFromSelectedIndexes(t){let e=this._selectedIndexes.indexOf(t);e!==-1&&this._selectedIndexes.splice(e,1)}toggleSelection(t){let e=!t.hasAttribute("selected");return this.setSelectedAttr(t,e),e}setSelectedAttr(t,e){t&&(e?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(e)))}isSelected(t){return t.hasAttribute("selected")}};T.ID="sd-list",T.ensureDefined=()=>{I.ensureDefined(),customElements.get(T.ID)||customElements.define(T.ID,T)};var Mt=T;Mt.ensureDefined();return Ot(ne);})();
68
68
  /*! Bundled license information:
69
69
 
70
70
  @lit/reactive-element/css-tag.js:
@@ -75,51 +75,21 @@ var window;(window||={})["@cas-smartdesign/list"]=(()=>{var X=Object.definePrope
75
75
  *)
76
76
 
77
77
  @lit/reactive-element/reactive-element.js:
78
- (**
79
- * @license
80
- * Copyright 2017 Google LLC
81
- * SPDX-License-Identifier: BSD-3-Clause
82
- *)
83
-
84
78
  lit-html/lit-html.js:
85
- (**
86
- * @license
87
- * Copyright 2017 Google LLC
88
- * SPDX-License-Identifier: BSD-3-Clause
89
- *)
90
-
91
79
  lit-element/lit-element.js:
92
- (**
93
- * @license
94
- * Copyright 2017 Google LLC
95
- * SPDX-License-Identifier: BSD-3-Clause
96
- *)
97
-
98
- lit-html/is-server.js:
99
- (**
100
- * @license
101
- * Copyright 2022 Google LLC
102
- * SPDX-License-Identifier: BSD-3-Clause
103
- *)
104
-
105
80
  @lit/reactive-element/decorators/property.js:
106
- (**
107
- * @license
108
- * Copyright 2017 Google LLC
109
- * SPDX-License-Identifier: BSD-3-Clause
110
- *)
111
-
112
81
  lit-html/directive.js:
82
+ lit-html/directives/unsafe-html.js:
113
83
  (**
114
84
  * @license
115
85
  * Copyright 2017 Google LLC
116
86
  * SPDX-License-Identifier: BSD-3-Clause
117
87
  *)
118
88
 
119
- lit-html/directives/unsafe-html.js:
89
+ lit-html/is-server.js:
120
90
  (**
121
91
  * @license
122
- * Copyright 2017 Google LLC
92
+ * Copyright 2022 Google LLC
123
93
  * SPDX-License-Identifier: BSD-3-Clause
124
94
  *)
125
95