r('.share-link');
        shareLink.select();
        document.execCommand('copy');

        if (window.dataLayer) {
            window
                .dataLayer
                .push(
                    {'event': 'mindmap_share_link_copy', 'mindmap_category': 'User Interaction', 'mindmap_action': 'Copy Share Link'}
                );
        }
    }

    function closeShareDialog() {
        const dialog = document.querySelector('.share-dialog');
        const overlay = document.querySelector('.overlay')