1import { hapticsImpactLight } from "/js/haptics.js"; 2import "/js/components/account-switcher-dialog.js"; 3 4export class AccountSwitcherService { 5 constructor(dataLayer, auth) { 6 this.dataLayer = dataLayer; 7 this.auth = auth; 8 this.currentDialog = null; 9 } 10 11 openAccountSwitcherDialog() { 12 if (this.currentDialog !== null) { 13 console.warn("Account switcher dialog already open"); 14 return; 15 } 16 hapticsImpactLight(); 17 this.currentDialog = document.createElement("account-switcher-dialog"); 18 this.currentDialog.dataLayer = this.dataLayer; 19 this.currentDialog.auth = this.auth; 20 this.currentDialog.addEventListener("dialog-closed", () => { 21 if (this.currentDialog) { 22 this.currentDialog.remove(); 23 this.currentDialog = null; 24 } 25 }); 26 document.body.appendChild(this.currentDialog); 27 this.currentDialog.open(); 28 } 29}
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.