            const svgBase64 = btoa(unescape(encodeURIComponent(svgStr)));

                        if (format === 'svg') {
                            const blob = new Blob([svgStr], {type: 'image/svg+xml'});
                            const url = URL.createObjectURL(blob);
                            const a = document.createElement('a');
                            a.href = url;
                            a.download = 'mindmap.svg';
                            document
                                .b