function SaveAsFile(filename, content) {
    const anchorElement = document.createElement('a');
    anchorElement.href = "data:application/octet-stream;base64," + content;
    anchorElement.download = filename ?? '';
    anchorElement.click();
    anchorElement.remove();
}