<!--INDEX-->
<!DOCTYPE html>
<html lang="en-us">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>GalaSoft Laurent Bugnion</title>

    <base href="/" />

    <link rel="icon" href="/favicon.ico" type="image/icon type">

    <link href="css/reset.css" rel="stylesheet" />
    <link href="css/base.css" rel="stylesheet" />
    <link href="css/gslb.css" rel="stylesheet" />
    <link href="css/blog.css" rel="stylesheet" />
    <link href="css/publications.css" rel="stylesheet" />
    <link href="css/all.min.css" rel="stylesheet">
    <link href="css/code/shCore.css" rel="stylesheet" />
    <link href="css/code/shThemeVS2012Light.css" rel="stylesheet" />

    <script src="script/code/shCore.js"></script>
    <script src="script/code/shBrushCSharp.js"></script>
    <script src="script/code/shBrushCss.js"></script>
    <script src="script/code/shBrushJScript.js"></script>
    <script src="script/code/shBrushPlain.js"></script>
    <script src="script/code/shBrushXml.js"></script>
    <script src="script/code/shBrushPowerShell.js"></script>

    <script>
        SyntaxHighlighter.config.bloggerMode = true;
        SyntaxHighlighter.defaults["auto-links"] = false;
        SyntaxHighlighter.defaults["tab-size"] = 2;
        SyntaxHighlighter.defaults["toolbar"] = false;
        //SyntaxHighlighter.all();
    </script>

    <script>

        window.branding = {

            setTitle: (title) => { document.title = title; }
        }

        window.layout = {

            overrideSideBarCheck: false,

            toggleSidebar: () => {
                var sidebar = document.getElementById("sidebar");
                var cache = document.getElementById("cache");

                if (sidebar != null) {

                    sidebar.style.visibility = sidebar.style.visibility == "visible" ? "collapse" : "visible";
                    cache.style.visibility = cache.style.visibility == "visible" ? "collapse" : "visible";

                    if (sidebar.style.visibility == "visible") {
                        layout.overrideSideBarCheck = true;
                    }
                    else {
                        layout.overrideSideBarCheck = false;
                    }
                }
            },

            checkSidebar: () => {

                var sidebar = document.getElementById("sidebar");

                if (sidebar == null) {
                    return;
                }

                var cache = document.getElementById("cache");

                if (body.clientWidth > 930) {

                    if (layout.isMobile()) {

                    //     sidebar.style.visibility = "collapse";
                    //     cache.style.visibility = "collapse";
                    //     alert("002");
                    // }
                    // else {
                        sidebar.style.visibility = "visible";
                        cache.style.visibility = "collapse";
                    }
                }
                else {
                    sidebar.style.visibility = "collapse";
                    cache.style.visibility = "collapse";
                }
            },

            isMobile: () => {
                if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
                    // true for mobile device
                    return true;
                } else {
                    // false for not mobile device
                    return false;
                }
            },
        }

        window.syntax = {
            highlight: () => {
                // Call the SyntaxHighlighter
                SyntaxHighlighter.highlight();
            },

            copyCode: (link) =>
            {
                var highlight = link
                    .parentElement
                    .parentElement
                    .nextElementSibling
                    .firstElementChild;

                var cells = highlight.getElementsByTagName("td");
                var codeCell = cells[cells.length - 1];
                var code = "";

                for (var index = 0; index < codeCell.innerText.length; index++) {
                    if (codeCell.innerText.charCodeAt(index) == 160) {
                        code += ' ';
                    }
                    else {
                        code += codeCell.innerText[index];
                    }
                }

                navigator.clipboard.writeText(code);

                link.innerText = "[copied]";

                setTimeout(() => {
                    link.innerText = "[copy]";
                }, 1500);

                if (window.event.preventDefault)
                {
                    window.event.preventDefault();
                }
            }
        }

        window.disqus = {
            pageUrl: null,
            pageId: null,

            showComments: (pageUrl, pageId) => {

                disqus.pageUrl = pageUrl;
                disqus.pageId = pageId;

                var d = document, s = d.createElement('script');
                s.src = 'https://gslb.disqus.com/embed.js';
                s.setAttribute('data-timestamp', +new Date());
                (d.head || d.body).appendChild(s);
            }
        }

        function confirmAction(message) {
            return confirm(message);
        }

        var disqus_config = function () {
            // Replace PAGE_URL with your page's canonical URL variable
            this.page.url = disqus.pageUrl;
            // Replace PAGE_IDENTIFIER with your page's unique identifier variable
            this.page.identifier = disqus.pageId;
        };

    </script>
</head>

<body>
    <div id="app">Loading...</div>

    <div id="blazor-error-ui">
        An unhandled error has occurred.
        <a href="" class="reload">Reload</a>
        <a class="dismiss">🗙</a>
    </div>
    <script src="_framework/blazor.webassembly.js"></script>

    <script>
        var body = document.getElementsByTagName("body")[0];

        body.onresize = function () {

            if (layout.overrideSideBarCheck) {
                return;
            }

            layout.checkSidebar();
        }

    </script>
</body>

</html>
