(function(Y,p,r,x,Pt,U,re,T,v,Q,Qe,ne){"use strict";constb={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"}};functionB(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functionbe(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)}}functionO(e,t,n){returnt&&be(e.prototype,t),n&&be(e,n),e}const{SET_ACTIVITY:Nt}=x.findByProps("SET_ACTIVITY"),Je=x.findByProps("getAssetIds"),Ze=x.findByStoreName("SelfPresenceStore"),he=x.findByStoreName("UserStore");functionae(){returnye(null)}functionye(e){S.pluginStopped&&(ue(),e=null),S.lastActivity=e,r.FluxDispatcher.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,pid:2312,socketId:"Multi-Scrobbler@Vendetta"})}asyncfunctionet(e,t=b.APPLICATION_ID){if(!e?.length)return[];try{returnawaitJe.fetchAssetIds(t,e)}catch(n){returnconsole.error("[Multi-Scrobbler] Failed to fetch assets:",n),[]}}constR={};R.componentMountErrors=[],R.componentMountCount=0,R.settingsLoadAttempts=0,R.serviceErrors={lastfm:[],librefm:[],listenbrainz:[]},R.apiCallCount=0,R.connectionAttempts=0,R.lastCredentialValidation={lastfm:!1,librefm:!1,listenbrainz:!1};constJ=function(...e){returnconsole.log("[Debug]",...e)},me=function(...e){returnconsole.error("[Debug] Error:",...e)};functionG(e,t){R[e]=t,e==="lastError"&&t?me("Error recorded:",t.message):e==="lastTrack"&&t?J("Track updated:",`${t.artist} - ${t.name}`):e==="currentService"&&t&&J("Service changed to:",t)}functionwe(){R.apiCallCount=(R.apiCallCount||0)+1,J(`API call count: ${R.apiCallCount}`)}functionZ(e,t){R.serviceErrors=R.serviceErrors||{lastfm:[],librefm:[],listenbrainz:[]},R.serviceErrors[e]=R.serviceErrors[e]||[],R.serviceErrors[e].push(`${newDate().toISOString()}: ${t}`),R.serviceErrors[e].length>10&&(R.serviceErrors[e]=R.serviceErrors[e].slice(-10)),me(`${e} error:`,t)}functionve(){R.lastSuccessfulUpdate=newDate().toISOString(),J("Successful update recorded at:",R.lastSuccessfulUpdate)}functionee(e){returnee=Object.setPrototypeOf?Object.getPrototypeOf:function(n){returnn.__proto__||Object.getPrototypeOf(n)},ee(e)}functionRe(){try{vare=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Re=function(){return!!e})()}functiontt(e){if(e===void0)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functionrt(e){"@swc/helpers - typeof";returne&&typeofSymbol<"u"&&e.constructor===Symbol?"symbol":typeofe}functionnt(e,t){returnt&&(rt(t)==="object"||typeoft=="function")?t:tt(e)}functionie(e,t,n){returnt=ee(t),nt(e,Re()?Reflect.construct(t,n||[],ee(e).constructor):t.apply(e,n))}functionse(e,t){returnse=Object.setPrototypeOf||function(a,i){returna.__proto__=i,a},se(e,t)}functionoe(e,t){if(typeoft!="function"&&t!==null)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&