(()=>(n,o)=>{const e=()=>new Promise((async(n,o)=>{await SpinQuery.condition((()=>unsafeWindow),(()=>unsafeWindow.onLoginInfoLoaded!==undefined));if(unsafeWindow.onLoginInfoLoaded){unsafeWindow.onLoginInfoLoaded(n)}else{logError(new Error("utils.playerReady 失败"));console.error(`typeof onLoginInfoLoaded === ${typeof unsafeWindow.onLoginInfoLoaded}`);o()}}));const i=async()=>{if(unsafeWindow.aid){return unsafeWindow.aid}if(_.has(unsafeWindow,"player.getVideoMessage")){const n=await SpinQuery.condition((()=>unsafeWindow.player.getVideoMessage()),(n=>n.aid!==undefined));unsafeWindow.aid=n.aid;return n.aid}throw new Error("Cannot find aid")};return{export:{playerReady:e,aidReady:i}}})();