1import{Component}from"@theme/component";export class DtTabbedInfo extends Component{connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.#onClick),this.addEventListener("keydown",this.#onKeydown)}disconnectedCallback(){this.removeEventListener("click",this.#onClick),this.removeEventListener("keydown",this.#onKeydown),super.disconnectedCallback()}get#tabs(){return[...this.querySelectorAll('[role="tab"]')]}#onClick=event=>{const tab=event.target?.closest('[role="tab"]');tab&&this.#select(tab,!1)};#onKeydown=event=>{const tab=event.target?.closest('[role="tab"]');if(!tab)return;const tabs=this.#tabs,index=tabs.indexOf(tab);if(index===-1)return;let next=-1;switch(event.key){case"ArrowRight":next=(index+1)%tabs.length;break;case"ArrowLeft":next=(index-1+tabs.length)%tabs.length;break;case"Home":next=0;break;case"End":next=tabs.length-1;break;default:return}event.preventDefault(),this.#select(tabs[next],!0)};#select(tab,moveFocus){const tabs=this.#tabs;if(tabs.includes(tab)){for(const candidate of tabs){const selected=candidate===tab;candidate.setAttribute("aria-selected",String(selected)),candidate.tabIndex=selected?0:-1;const panelId=candidate.getAttribute("aria-controls"),panel=panelId?this.querySelector(`#${CSS.escape(panelId)}`):null;panel instanceof HTMLElement&&(panel.hidden=!selected)}moveFocus&&tab.focus()}}}customElements.get("dt-tabbed-info")||customElements.define("dt-tabbed-info",DtTabbedInfo); 2//# sourceMappingURL=/cdn/shop/t/447/assets/dt-tabbed-info.js.map?v=175561260614161202491790238718
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.