, async ev => {
        if (ev.target.innerText !== 'delete') return;

        ev.preventDefault();

        const src = decodeURIComponent(ev.target.dataset.name);

        const message = `Please type the name of the stream "${src}" to confirm its deletion from the configuration. This action is irreversible.`;
        if (prompt(message) !== src) {
            alert('Stream name does not match. Deletion cancelled.');
            return;
        }

        const url = new URL('api/streams', location.href);