ox__label
"
class="tree-item__checkbox"
?disabled="${this.disabled}"
?checked="${wn(this.selected)}"
?indeterminate="${this.indeterminate}"
tabindex="-1"
>
`))}
`}};Wn.styles=[Do,Cn],Wn.dependencies={"sl-checkbox":Ln,"sl-icon":Nn,"sl-spinner":Fn},Vo([Qo()],Wn.prototype,"indeterminate",2),Vo([Qo()],Wn.prototype,"isLeaf",2),Vo([Qo()],Wn.prototype,"loading",2),Vo([Qo()],Wn.prototype,"selectable",2),Vo([Xo({type:Boolean,reflect:!0})],Wn.prototype,"expanded",2),Vo([Xo({type:Boolean,reflect:!0})],Wn.prototype,"selected",2),Vo([Xo({type:Boolean,reflect:!0})],Wn.prototype,"disabled",2),Vo([Xo({type:Boolean,reflect:!0})],Wn.prototype,"lazy",2),Vo([tr("slot:not([name])")],Wn.prototype,"defaultSlot",2),Vo([tr("slot[name=children]")],Wn.prototype,"childrenSlot",2),Vo([tr(".tree-item__item")],Wn.prototype,"itemElement",2),Vo([tr(".tree-item__children")],Wn.prototype,"childrenContainer",2),Vo([tr(".tree-item__expand-button slot")],Wn.prototype,"expandButtonSlot",2),Vo([Vi("loading",{waitUntilFirstUpdate:!0})],Wn.prototype,"handleLoadingChange",1),Vo([Vi("disabled")],Wn.prototype,"handleDisabledChange",1),Vo([Vi("selected")],Wn.prototype,"handleSelectedChange",1),Vo([Vi("expanded",{waitUntilFirstUpdate:!0})],Wn.prototype,"handleExpandedChange",1),Vo([Vi("expanded",{waitUntilFirstUpdate:!0})],Wn.prototype,"handleExpandAnimation",1),Vo([Vi("lazy",{waitUntilFirstUpdate:!0})],Wn.prototype,"handleLazyChange",1);var Gn=Wn;function Un(e,t,o){const r=e=>Object.is(e,-0)?0:e;return r(eo?o:e)}function Vn(e,t=!1){function o(e){const t=e.getChildrenItems({includeDisabled:!1});if(t.length){const o=t.every((e=>e.selected)),r=t.every((e=>!e.selected&&!e.indeterminate));e.selected=o,e.indeterminate=!o&&!r}}!function e(r){for(const o of r.getChildrenItems())o.selected=t?r.selected||o.selected:!o.disabled&&r.selected,e(o);t&&o(r)}(e),function e(t){const r=t.parentElement;Gn.isTreeItem(r)&&(o(r),e(r))}(e)}Ri("tree-item.expand",{keyframes:[{height:"0",opacity:"0",overflow:"hidden"},{height:"auto",opacity:"1",overflow:"hidden"}],options:{duration:250,easing:"cubic-bezier(0.4, 0.0, 0.2, 1)"}}),Ri("tree-item.collapse",{keyframes:[{height:"auto",opacity:"1",overflow:"hidden"},{height:"0",opacity:"0",overflow:"hidden"}],options:{duration:200,easing:"cubic-bezier(0.4, 0.0, 0.2, 1)"}});var jn=class extends rr{constructor(){super(),this.selection="single",this.clickTarget=null,this.initTreeItem=e=>{e.selectable="multiple"===this.selection,["expand","collapse"].filter((e=>!!this.querySelector(`[slot="${e}-icon"]`))).forEach((t=>{const o=e.querySelector(`[slot="${t}-icon"]`),r=this.getExpandButtonIcon(t);r&&(null===o?e.append(r):o.hasAttribute("data-default")&&o.replaceWith(r))}))},this.handleTreeChanged=e=>{for(const t of e){const e=[...t.addedNodes].filter(Gn.isTreeItem),o=[...t.removedNodes].filter(Gn.isTreeItem);e.forEach(this.initTreeItem),this.lastFocusedItem&&o.includes(this.lastFocusedItem)&&(this.lastFocusedItem=null)}},this.handleFocusOut=e=>{const t=e.relatedTarget;t&&this.contains(t)||(this.tabIndex=0)},this.handleFocusIn=e=>{const t=e.target;e.target===this&&this.focusItem(this.lastFocusedItem||this.getAllTreeItems()[0]),Gn.isTreeItem(t)&&!t.disabled&&(this.lastFocusedItem&&(this.lastFocusedItem.tabIndex=-1),this.lastFocusedItem=t,this.tabIndex=-1,t.tabIndex=0)},this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),this.addEventListener("sl-lazy-change",this.handleSlotChange)}async connectedCallback(){super.connectedCallback(),this.setAttribute("role","tree"),this.setAttribute("tabindex","0"),await this.updateComplete,this.mutationObserver=new MutationObserver(this.handleTreeChanged),this.mutatio