// Shared mutable state — imported as { S } in every module export const S = { cfg: { url: '', user: '', pass: '', lastfmKey: '', backendUrl: '', showPlayCount: false, showRomaji: false }, // Playback queue: [], qIdx: -1, _origQueue: null, shuffle: false, repeat: false, radioMode: false, audio: null, previewAudio: null, previewCurrent: null, _scrubbing: false, _msPosLast: 0, _trackChanging: false, queueOpen: false, // Now Playing overlay npOpen: false, npQueueMode: false, npLyricsMode: false, // Navigation history _navStack: [], _navCursor: -1, _navJumping: false, // Search searchTimer: null, globalSearchTimer: null, _mobileSearchTimer: null, // Song info / edit infoSong: null, // Download downloadTarget: null, dlType: 'track', jobs: {}, // Playlists _currentPlaylist: null, plModalSongs: [], cachedPlaylists: [], // Navidrome REST auth _ndToken: null, // Artist images cache artistImgCache: {}, // Audiobookshelf abs: { url: '', token: null, userId: null, currentLibraryId: null, }, absPlayer: { open: false, item: null, _sessionId: null, audioTracks: [], trackIdx: 0, chapters: [], chapterIdx: -1, playing: false, currentTime: 0, duration: 0, speed: 1.0, sleepRemaining: null, }, };