(async ()=>{                    var ref, ref1;                    const playerResponse = ytplayer === null || ytplayer === void 0 ? void 0 : (ref = ytplayer.config) === null || ref === void 0 ? void 0 : (ref1 = ref.args) === null || ref1 === void 0 ? void 0 : ref1.raw_player_response;                    if (!playerResponse) return alert("Error: Could not get player response");                    const escapeRegExp = (e)=>e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")                    , parseDecsig = (data)=>{                        try {                            if (data.startsWith("var script")) {                                const obj = {}, document = {                                    createElement: ()=>obj                                    ,                                    head: {                                        appendChild: ()=>{}                                    }                                };                                eval(data), data = obj.innerHTML;                            }                            const fnnameresult = /=([a-zA-Z0-9\$]+?)\(decodeURIComponent/.exec(data), fnname = fnnameresult[1], _argnamefnbodyresult = new RegExp(escapeRegExp(fnname) + "=function\\((.+?)\\){((.+)=\\2.+?)}").exec(data), [_, argname, fnbody] = _argnamefnbodyresult, helpernameresult = /;(.+?)\..+?\(/.exec(fnbody), helpername = helpernameresult[1], helperresult = new RegExp("var " + escapeRegExp(helpername) + "={[\\s\\S]+?};").exec(data), helper = helperresult[0];                            return new Function([                                argname                            ], helper + "\n" + fnbody);                        } catch (e) {                            console.log(e), alert("Error: Could not parse signature decoder");                        }                    }, parseQuery = (e)=>[                            ...new URLSearchParams(e).entries()                        ].reduce((t, [a, r])=>(t[a] = r, t)                        , {})                    ;                    try {                        const e = parseDecsig(await (await fetch(document.querySelector(%27script[src$="base.js"]%27).src)).text()), a = playerResponse.streamingData.adaptiveFormats.filter((n)=>n.mimeType.startsWith("audio/")                        ).sort((n, s)=>n.bitrate < s.bitrate                        )[0], r = parseQuery(a.signatureCipher);                        open(a.url || `${r.url}&${r.sp}=${e(r.s)}`);                    } catch (e) {                        console.log(e), alert("Error: An unknown error ocurred in the main process");                    }                })();