(function(q,p,r,V,ft,$,Z,S,R){"use strict";constd={DEFAULT_APP_NAME:"Music",DEFAULT_TIME_INTERVAL:5,APPLICATION_ID:"1368513179272871956",MIN_UPDATE_INTERVAL:3,MAX_RETRY_ATTEMPTS:3,RETRY_DELAY:5e3,SERVICES:{lastfm:{name:"Last.fm",baseUrl:"https://ws.audioscrobbler.com/2.0",requiresApiKey:!0,requiresToken:!1},librefm:{name:"Libre.fm",baseUrl:"https://libre.fm/2.0",requiresApiKey:!0,requiresToken:!1},listenbrainz:{name:"ListenBrainz",baseUrl:"https://api.listenbrainz.org/1",requiresApiKey:!0,requiresToken:!0}},DEFAULT_HEADERS:{},DEFAULT_COVER_HASHES:["2a96cbd8b46e442fc41c2b86b821562f"],DEFAULT_SETTINGS:{username:"",apiKey:"",appName:"Music",timeInterval:5,showTimestamp:!0,listeningTo:!0,showLargeText:!0,ignoreYouTubeMusic:!1,verboseLogging:!1,service:void0,librefmUsername:"",librefmApiKey:"",listenbrainzUsername:"",listenbrainzToken:""},API_ERROR_CODES:{2:"Invalid service",3:"Invalid method",4:"Invalid format",5:"Invalid parameters",6:"Invalid resource specified",7:"Invalid session key",8:"Invalid API key",9:"Invalid session",10:"Invalid API signature",11:"Service offline",13:"Invalid method signature supplied",16:"Service temporarily unavailable",26:"Suspended API key",29:"Rate limit exceeded"}};functionF(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionce(e,t){for(varn=0;n<t.length;n++){vara=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}functionB(e,t,n){returnt&&ce(e.prototype,t),n&&ce(e,n),e}const{SET_ACTIVITY:dt}=V.findByProps("SET_ACTIVITY"),Ve=V.findByProps("getAssetIds"),Fe=V.findByStoreName("SelfPresenceStore"),ue=V.findByStoreName("UserStore");functionee(){returnge(null)}functionge(e){v.pluginStopped&&(se(),e=null),v.lastActivity=e,r.FluxDispatcher.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,pid:2312,socketId:"Multi-Scrobbler@Vendetta"})}asyncfunctionBe(e,t=d.APPLICATION_ID){if(!e?.length)return[];try{returnawaitVe.fetchAssetIds(t,e)}catch(n){returnconsole.error("[Multi-Scrobbler] Failed to fetch assets:",n),[]}}constw={};w.componentMountErrors=[],w.componentMountCount=0,w.settingsLoadAttempts=0,w.serviceErrors={lastfm:[],librefm:[],listenbrainz:[]},w.apiCallCount=0,w.connectionAttempts=0,w.lastCredentialValidation={lastfm:!1,librefm:!1,listenbrainz:!1};constX=function(...e){returnconsole.log("[Debug]",...e)},fe=function(...e){returnconsole.error("[Debug] Error:",...e)};functionj(e,t){w[e]=t,e==="lastError"&&t?fe("Error recorded:",t.message):e==="lastTrack"&&t?X("Track updated:",`${t.artist} - ${t.name}`):e==="currentService"&&t&&X("Service changed to:",t)}functionde(){w.apiCallCount=(w.apiCallCount||0)+1,X(`API call count: ${w.apiCallCount}`)}functionH(e,t){w.serviceErrors=w.serviceErrors||{lastfm:[],librefm:[],listenbrainz:[]},w.serviceErrors[e]=w.serviceErrors[e]||[],w.serviceErrors[e].push(`${newDate().toISOString()}: ${t}`),w.serviceErrors[e].length>10&&(w.serviceErrors[e]=w.serviceErrors[e].slice(-10)),fe(`${e} error:`,t)}functionpe(){w.lastSuccessfulUpdate=newDate().toISOString(),X("Successful update recorded at:",w.lastSuccessfulUpdate)}functionQ(e){returnQ=Object.setPrototypeOf?Object.getPrototypeOf:function(n){returnn.__proto__||Object.getPrototypeOf(n)},Q(e)}functionbe(){try{vare=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(be=function(){return!!e})()}functionOe(e){if(e===void0)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functionKe(e){"@swc/helpers - typeof";returne&&typeofSymbol<"u"&&e.constructor===Symbol?"symbol":typeofe}functionje(e,t){returnt&&(Ke(t)==="object"||typeoft=="function")?t:Oe(e)}functionte(e,t,n){returnt=Q(t),je(e,be()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}functionre(e,t){returnre=Object.setPrototypeOf||function(a,i){returna.__proto__=i,a},re(e,t)}functionne(e,t){if(typeoft!="function"&&t!==null)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{c