       });
            });


            let currentMarkdown = '';

            async function loadMindMap() {
                const urlParams = new URLSearchParams(window.location.search);
                const id = urlParams.get('id');

                if (!id) {
                    showError('No mind map ID provided');
                    return;
                }

                try {
                    const history = JSON.parse(localStorage.getItem('mindmap-history') || '[]');
                    co