<|start_filename|>themes/hugo-theme-relearn/layouts/partials/content-footer.html<|end_filename|>
{{- with .Params.LastModifierDisplayName }}
            <i class='fas fa-user'></i> {{ with $.Params.LastModifierEmail }}<a href="mailto:{{ . }}">{{ end }}{{ . }}{{ with $.Params.LastModifierEmail }}</a>{{ end }}
  {{- with $.Date }}
            <i class='fas fa-calendar'></i> {{ . | time.Format ":date_medium" }}
  {{- end }}
{{- end }}

<|start_filename|>themes/hugo-theme-relearn/layouts/_default/single.print.html<|end_filename|>
{{- .Scratch.Set "relearnOutputFormat" "PRINT" }}
{{- partial "header.html" . }}
{{- partial "content-print.html" . }}
{{- partial "footer.html" . }}

<|start_filename|>themes/hugo-theme-relearn/static/css/print.css<|end_filename|>
@import "theme-relearn-light.css";

#sidebar {
    display: none;
}
#body {
    margin-left: 0;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
}
#body #navigation {
    display: none;
}
html,
body #body{
    font-size: 8.9pt;
}
body {
    background-color: white;
}
pre code {
    font-size: 8.3pt;
}
code.copy-to-clipboard-code {
    border-bottom-right-radius: 2px;
    border-top-right-radius: 2px;
    border-right-width: 1px;
}
pre {
    border: 1px solid #ccc;
}
#body #topbar{
    background-color: #fff; /* avoid background bleeding*/
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding-left: 0; /* for print, we want to align with the footer to ease the layout */
    color: #777;
}
.navigation,
#top-print-link,
#top-github-link {
    /* we don't need this while printing */
    display: none;
}
#body #breadcrumbs {
    width: 100%;
}
#body #breadcrumbs .links {
    overflow-x: hidden;
    visibility: visible;
}
.copy-to-clipboard-button {
    display: none;
}

#body h1, #body h2, #body h3, #body h4, #body h5, #body h6 {
    /* better contrast for colored elements */
    color: black;
}
#body th, #body td,
#body code, #body strong, #body b,
#body li, #body dd, #body dt,
#body p,
#body .anchor,
#body a {
    /* better contrast for colored elements */
    color: black;
}
#body pre,
#body code {
    background-color: white;
    border-color: #ddd;
}

hr{
    border-bottom: 1px solid #ddd;
}
body,
#body,
#body-inner {
    overflow: visible !important; /* turn off limitations for perfect scrollbar */
}
#body #body-inner {
    /* reset paddings for chapters in screen */
    padding: 0 3rem 4rem 3rem;
}

#body #body-inner h1 {
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
    padding-bottom: .75rem;
}
#body-inner .chapter h3:first-of-type {
    margin-top: 2rem;
}
#body-inner .chapter p {
    font-size: 1rem;
}

.footline {
    /* in print mode show footer line to signal reader the end of document */
    border-top: 1px solid #ddd;
    color: #777;
    margin-top: 1.5rem;
    padding-top: .75rem;
}
#body #body-inner .footline a {
    text-decoration: none;
}
#body #body-inner a {
    /* in print we want to distinguish links in our content from
    normal text even if printed black/white;
    don't use a.highlight in selector to also get links that are
    put as HTML into markdown */
    text-decoration-line: underline;
}
#toc-menu {
    /* we don't need this while printing */
    display: none;
}
#body #sidebar-toggle-span {
    /* we don't need this while printing */
    display: none;
}
#breadcrumbs .links {
    display: inline;
}
#topbar{
    /* the header is sticky which is not suitable for print; */
    position: inherit; /* IE11 doesn't know "initial" here */
}
#topbar > div {
    background-color: #ffffff; /* IE11 doesn't know "initial" here */
}
#body .tab-nav-button:not(.active) {
    opacity: .5;
}
#head-tags {
    display: none;
}
mark {
    background: inherit;
    color: inherit;
}
.mermaid > svg:hover {
    border-color: transparent;
}
div.box {
    border: 1px solid #ddd;
}
div.box > .box-content {
    background-color: white;
}
rapi-doc{
    /* adjust rapi-doc internals to fill out available space */
    font-size: 4pt;
    margin-left: -12px;
    width: calc( 100% + 12px + 8px );
}
.btn-default,
#body .tab-nav-button {
    color: black !important;
}
#body .tab-nav-button.active {
    background-color: white !important;
    border-bottom-color: white !important;
    color: black;
}
#body .tab-nav-button:not(.active) {
    opacity: 1;
}

article {
    break-before: page;
}
#body-inner article:first-of-type {
    break-before: avoid;
}


<|start_filename|>themes/hugo-theme-relearn/layouts/partials/footer.html<|end_filename|>

        </div>
      </main><!-- #body-inner -->
{{- partial "custom-comments.html" . }}
    </div><!-- #body -->
{{- partial "menu.html" . }}
    <script src="{{"js/clipboard.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
    <script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
    <script src="{{"js/featherlight.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
{{- $wantsMermaid := or (and (eq (.Scratch.Get "relearnOutputFormat") "HTML") (.Page.Store.Get "htmlHasMermaid")) (and (eq (.Scratch.Get "relearnOutputFormat") "PRINT") (.Page.Store.Get "printHasMermaid")) }}
{{- if (or $wantsMermaid (and (ne .Params.disableMermaid nil) (not .Params.disableMermaid)) (and (ne .Site.Params.disableMermaid nil) (not .Site.Params.disableMermaid)) ) }}
    <script src="{{"js/jquery.svg.pan.zoom.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
  {{- if isset .Params "custommermaidurl" }}
    <script src="{{ .Params.customMermaidURL }}"></script>
  {{- else if isset .Site.Params "custommermaidurl" }}
    <script src="{{ .Site.Params.customMermaidURL }}"></script>
  {{- else }}
    <script src="{{"js/mermaid.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
  {{- end }}
  {{- if isset .Params "mermaidinitialize" }}
    {{- $.Scratch.Set "mermaidInitialize" .Params.mermaidInitialize }}
  {{- else if isset .Site.Params "mermaidinitialize" }}
    {{- $.Scratch.Set "mermaidInitialize" .Site.Params.mermaidInitialize }}
  {{- else }}
    {{- $.Scratch.Set "mermaidInitialize" "{}" }}
  {{- end }}
    <script>
      function useMermaid( config ){
        if (typeof mermaid != 'undefined' && typeof mermaid.mermaidAPI != 'undefined') {
          mermaid.initialize( Object.assign( { "securityLevel": "antiscript", "startOnLoad": false  }, config ) );
          if( config.theme ){
            var write_style = variants.findLoadedStylesheet( 'variant-style' );
            write_style.setProperty( '--CONFIG-MERMAID-theme', config.theme );
          }
        }
      }
      useMermaid( JSON.parse({{ $.Scratch.Get "mermaidInitialize" }}) );
    </script>
{{- end }}
{{- $wantsSwagger := or (and (eq (.Scratch.Get "relearnOutputFormat") "HTML") (.Page.Store.Get "htmlHasSwagger")) (and (eq (.Scratch.Get "relearnOutputFormat") "PRINT") (.Page.Store.Get "printHasSwagger")) }}
{{- if (or $wantsSwagger (and (ne .Params.disableSwagger nil) (not .Params.disableSwagger)) (and (ne .Site.Params.disableSwagger nil) (not .Site.Params.disableSwagger)) ) }}
  {{- if isset .Params "customswaggerurl" }}
    <script src="{{ .Params.customSwaggerURL }}"></script>
  {{- else if isset .Site.Params "customswaggerurl" }}
    <script src="{{ .Site.Params.customSwaggerURL }}"></script>
  {{- else }}
    <script src="{{ "/js/rapidoc-min.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
  {{- end }}
  {{- if isset .Params "swaggerinitialize" }}
    {{- $.Scratch.Set "swaggerInitialize" .Params.swaggerInitialize }}
  {{- else if isset .Site.Params "swaggerinitialize" }}
    {{- $.Scratch.Set "swaggerInitialize" .Site.Params.swaggerInitialize }}
  {{- else }}
    {{- $.Scratch.Set "swaggerInitialize" "{}" }}
  {{- end }}
    <script>
      function useSwagger( config ){
        if( config.theme ){
          var write_style = variants.findLoadedStylesheet( 'variant-style' );
          write_style.setProperty( '--CONFIG-SWAGGER-theme', config.theme );
        }
      }
      useSwagger( JSON.parse({{ $.Scratch.Get "swaggerInitialize" }}) );
    </script>
{{- end }}
    <script src="{{"js/theme.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
    {{- partial "custom-footer.html" . }}
  </body>
</html>


<|start_filename|>themes/hugo-theme-relearn/layouts/_default/single.html<|end_filename|>
{{- .Scratch.Set "relearnOutputFormat" "HTML" }}
{{- partial "header.html" . }}
{{- partial "content-screen.html" . }}
{{- partial "footer.html" . }}

<|start_filename|>themes/hugo-theme-relearn/layouts/partials/article.html<|end_filename|>
{{- $content := .content }}
{{- with .page }}
          <article{{if .Params.chapter}} class="chapter"{{end}}>

{{ if and (not .IsHome ) (not .Params.chapter) }}<h1>{{ .Title }}</h1>
{{ end }}{{ $content | safeHTML }}
            <footer class="footline">
              {{- partial "content-footer.html" . }}
            </footer>
          </article>
{{- end }}

<|start_filename|>themes/hugo-theme-relearn/layouts/shortcodes/swagger.html<|end_filename|>
{{- $original := .Get "src" }}
{{- with .Page.Resources.Match $original }}
	{{- range . }}
		{{- $original = .RelPermalink }}
	{{- end }}
{{- end }}
<rapi-doc
  allow-spec-file-download="true"
  default-schema-tab="example"
  font-size="largest"
  layout="column"
  load-fonts="false"
  render-style="view"
  schema-description-expanded="true"
  schema-style="table"
  show-header="false"
  spec-url="{{ $original }}"
  sort-tags="true"
></rapi-doc>
{{- .Page.Store.Set "htmlHasSwagger" true }}

<|start_filename|>themes/hugo-theme-relearn/static/js/theme.js<|end_filename|>
var theme = true;
var isIE = /*@cc_on!@*/false || !!document.documentMode;
if( isIE ){
    // we don't support sidebar flyout in IE
    document.querySelector( 'body' ).classList.remove( 'mobile-support' );
}
else{
    document.querySelector( 'body' ).classList.add( 'mobile-support' );
}
var isPrint = document.querySelector( 'body' ).classList.contains( 'print' );

var touchsupport = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)

var formelements = 'button, datalist, fieldset, input, label, legend, meter, optgroup, option, output, progress, select, textarea';

function switchTab(tabGroup, tabId) {
    allTabItems = jQuery("[data-tab-group='"+tabGroup+"']");
    targetTabItems = jQuery("[data-tab-group='"+tabGroup+"'][data-tab-item='"+tabId+"']");

    // if event is undefined then switchTab was called from restoreTabSelection
    // so it's not a button event and we don't need to safe the selction or
    // prevent page jump
    var isButtonEvent = event != undefined;

    if(isButtonEvent){
      // save button position relative to viewport
      var yposButton = event.target.getBoundingClientRect().top;
    }

    allTabItems.removeClass("active");
    targetTabItems.addClass("active");

    if(isButtonEvent){
      // reset screen to the same position relative to clicked button to prevent page jump
      var yposButtonDiff = event.target.getBoundingClientRect().top - yposButton;
      window.scrollTo(window.scrollX, window.scrollY+yposButtonDiff);

      // Store the selection to make it persistent
      if(window.localStorage){
          var selectionsJSON = window.localStorage.getItem(baseUriFull+"tab-selections");
          if(selectionsJSON){
            var tabSelections = JSON.parse(selectionsJSON);
          }else{
            var tabSelections = {};
          }
          tabSelections[tabGroup] = tabId;
          window.localStorage.setItem(baseUriFull+"tab-selections", JSON.stringify(tabSelections));
      }
    }
}

function restoreTabSelections() {
    if(window.localStorage){
        var selectionsJSON = window.localStorage.getItem(baseUriFull+"tab-selections");
        if(selectionsJSON){
          var tabSelections = JSON.parse(selectionsJSON);
        }else{
          var tabSelections = {};
        }
        Object.keys(tabSelections).forEach(function(tabGroup) {
          var tabItem = tabSelections[tabGroup];
          switchTab(tabGroup, tabItem);
        });
    }
}

function initMermaid( update ) {
    // we are either in update or initialization mode;
    // during initialization, we want to edit the DOM;
    // during update we only want to execute if something chanegd
    var decodeHTML = function( html ){
        var txt = document.createElement( 'textarea' );
        txt.innerHTML = html;
        return txt.value;
    };

    var parseGraph = function( graph ){
        var d = /^\s*(%%\s*\{\s*\w+\s*:([^%]*?)%%\s*\n?)/g;
        var m = d.exec( graph );
        var dir = {};
        var content = graph;
        if( m && m.length == 3 ){
            dir = JSON.parse( '{ "dummy": ' + m[2] ).dummy;
            content = graph.substring( d.lastIndex );
        }
        return { dir: dir, content: content };
    };

    var serializeGraph = function( graph ){
        return '%%{init: ' + JSON.stringify( graph.dir ) + '}%%\n' + graph.content;
    };

    var init_func = function(){
        state.is_initialized = true;
        var is_initialized = false;
        var theme = variants.getColorValue( 'MERMAID-theme' );
        document.querySelectorAll('.mermaid').forEach( function( element ){
            var parse = parseGraph( decodeHTML( element.innerHTML ) );

            if( parse.dir.theme ){
                parse.dir.relearn_user_theme = true;
            }
            if( !parse.dir.relearn_user_theme ){
                parse.dir.theme = theme;
            }
            is_initialized = true;

            var graph = serializeGraph( parse );
            element.innerHTML = graph;
            var new_element = document.createElement( 'div' );
            new_element.classList.add( 'mermaid-container' );
            new_element.innerHTML = '<div class="mermaid-code">' + graph + '</div>' + element.outerHTML;
            element.parentNode.replaceChild( new_element, element );
        });
        return is_initialized;
    }

    var update_func = function(){
        var is_initialized = false;
        var theme = variants.getColorValue( 'MERMAID-theme' );
        document.querySelectorAll( '.mermaid-container' ).forEach( function( e ){
            var element = e.querySelector( '.mermaid' );
            var code = e.querySelector( '.mermaid-code' );
            var parse = parseGraph( decodeHTML( code.innerHTML ) );

            if( parse.dir.relearn_user_theme ){
                return;
            }
            if( parse.dir.theme == theme ){
                return;
            }
            is_initialized = true;

            parse.dir.theme = theme;
            var graph = serializeGraph( parse );
            element.removeAttribute('data-processed');
            element.innerHTML = graph;
            code.innerHTML = graph;
        });
        return is_initialized;
    };

    var state = this;
    if( update && !state.is_initialized ){
        return;
    }
    if( typeof variants == 'undefined' ){
        return;
    }
    if( typeof mermaid == 'undefined' || typeof mermaid.mermaidAPI == 'undefined' ){
        return;
    }

    var is_initialized = ( update ? update_func() : init_func() );
    if( is_initialized ){
        mermaid.init();
        $(".mermaid svg").svgPanZoom({});
    }
}

function initSwagger( update ){
    if( typeof variants == 'undefined' ){
        return;
    }
    var attrs = [
        [ 'bg-color', variants.getColorValue( 'MAIN-BG-color' ) ],
        [ 'mono-font', variants.getColorValue( 'CODE-font' ) ],
        [ 'primary-color', variants.getColorValue( 'TAG-BG-color' ) ],
        [ 'regular-font', variants.getColorValue( 'MAIN-font' ) ],
        [ 'text-color', variants.getColorValue( 'MAIN-TEXT-color' ) ],
        [ 'theme', variants.getColorValue( 'SWAGGER-theme' ) ],
    ];
    document.querySelectorAll( 'rapi-doc' ).forEach( function( e ){
        attrs.forEach( function( attr ){
            e.setAttribute( attr[0], attr[1] );
        });
    });
}

function initAnchorClipboard(){
    document.querySelectorAll( 'h1~h2,h1~h3,h1~h4,h1~h5,h1~h6').forEach( function( element ){
        var url = encodeURI(document.location.origin + document.location.pathname);
        var link = url + "#"+element.id;
        var new_element = document.createElement( 'span' );
        new_element.classList.add( 'anchor' );
        new_element.setAttribute( 'title', window.T_Copy_link_to_clipboard );
        new_element.setAttribute( 'data-clipboard-text', link );
        new_element.innerHTML = '<i class="fas fa-link fa-lg"></i>';
        element.appendChild( new_element );
    });

    $(".anchor").on('mouseleave', function(e) {
        $(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w');
    });

    var clip = new ClipboardJS('.anchor');
    clip.on('success', function(e) {
        e.clearSelection();
        $(e.trigger).attr('aria-label', window.T_Link_copied_to_clipboard).addClass('tooltipped tooltipped-s');
    });
}

function initCodeClipboard(){
    function fallbackMessage(action) {
        var actionMsg = '';
        var actionKey = (action === 'cut' ? 'X' : 'C');

        if (/iPhone|iPad/i.test(navigator.userAgent)) {
            actionMsg = 'No support :(';
        }
        else if (/Mac/i.test(navigator.userAgent)) {
            actionMsg = 'Press ⌘-' + actionKey + ' to ' + action;
        }
        else {
            actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;
        }

        return actionMsg;
    }

    $('code').each(function() {
        var code = $(this),
            text = code.text();

        if (text.length > 5) {
            var clip = new ClipboardJS('.copy-to-clipboard-button', {
                text: function(trigger) {
                    var text = $(trigger).prev('code').text();
                    // remove a trailing line break, this may most likely
                    // come from the browser / Hugo transformation
                    text = text.replace(/\n$/, '');
                    // removes leading $ signs from text in an assumption
                    // that this has to be the unix prompt marker - weird
                    return text.replace(/^\$\s/gm, '');
                }
            });

            clip.on('success', function(e) {
                e.clearSelection();
                var inPre = $(e.trigger).parent().prop('tagName') == 'PRE';
                $(e.trigger).attr('aria-label', window.T_Copied_to_clipboard).addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's'));
            });

            clip.on('error', function(e) {
                var inPre = $(e.trigger).parent().prop('tagName') == 'PRE';
                $(e.trigger).attr('aria-label', fallbackMessage(e.action)).addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's'));
                $(document).one('copy', function(){
                    $(e.trigger).attr('aria-label', window.T_Copied_to_clipboard).addClass('tooltipped tooltipped-' + (inPre ? 'w' : 's'));
                });
            });

            var parent = code.parent();
            var inPre = parent.prop('tagName') == 'PRE';
            code.addClass('copy-to-clipboard-code');
            if( inPre ){
                parent.addClass( 'copy-to-clipboard' );
            }
            else{
                code.replaceWith($('<span/>', {'class': 'copy-to-clipboard'}).append(code.clone() ));
                code = parent.children('.copy-to-clipboard').last().children('.copy-to-clipboard-code');
            }
            code.after( $('<span>').addClass("copy-to-clipboard-button").attr("title", window.T_Copy_to_clipboard).append("<i class='fas fa-copy'></i>") );
            code.next('.copy-to-clipboard-button').on('mouseleave', function() {
                $(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w');
            });
        }
    });
}

function initArrowNav(){
    // button navigation
    jQuery(function() {
        jQuery('a.nav-prev').click(function(){
            location.href = jQuery(this).attr('href');
        });
        jQuery('a.nav-next').click(function() {
            location.href = jQuery(this).attr('href');
        });
    });

    // keyboard navigation
    jQuery(document).keydown(function(e) {
      if(e.which == '37') {
        jQuery('a.nav-prev').click();
      }
      if(e.which == '39') {
        jQuery('a.nav-next').click();
      }
    });

    // avoid keyboard navigation for input fields
    jQuery(formelements).keydown(function (e) {
        if (e.which == '37' || e.which == '39') {
            e.stopPropagation();
        }
    });
}

function initMenuScrollbar(){
    if( isPrint ){
        return;
    }

    var content = '#body-inner';
    var autofocus = false;
    document.addEventListener('keydown', function(event){
        // for initial keyboard scrolling support, no element
        // may be hovered, but we still want to react on
        // cursor/page up/down. because we can't hack
        // the scrollbars implementation, we try to trick
        // it and give focus to the scrollbar - only
        // to just remove the focus right after scrolling
        // happend
        var p = document.querySelector(content).matches(':hover');
        var m = document.querySelector('#content-wrapper').matches(':hover');
        var f = event.target.matches( formelements );
        if( !p && !m && !f ){
            // only do this hack if none of our scrollbars
            // is hovered
            autofocus = true;
            // if we are showing the sidebar as a flyout we
            // want to scroll the content-wrapper, otherwise we want
            // to scroll the body
            var n = document.querySelector('body').matches('.sidebar-flyout');
            if( n ){
                psm.scrollbarY.focus();
            }
            else{
                psc.scrollbarY.focus();
            }
        }
    });
    // scrollbars will install their own keyboard handlers
    // that need to be executed inbetween our own handlers
    var psm = new PerfectScrollbar('#content-wrapper');
    var psc = new PerfectScrollbar(content);
    document.addEventListener('keydown', function(){
        // if we facked initial scrolling, we want to
        // remove the focus to not leave visual markers on
        // the scrollbar
        if( autofocus ){
            psc.scrollbarY.blur();
            psm.scrollbarY.blur();
            autofocus = false;
        }
    });
    // on resize, we have to redraw the scrollbars to let new height
    // affect their size
    window.addEventListener('resize', function(){
        psm && psm.update();
        psc && psc.update();
    });
    // now that we may have collapsible menus, we need to call a resize
    // for the menu scrollbar if sections are expanded/collapsed
    document.querySelectorAll('#sidebar .collapsible-menu input.toggle').forEach( function(e){
        e.addEventListener('change', function(){
            psm && psm.update();
        });
    });
}

function initLightbox(){
    // wrap image inside a lightbox (to get a full size view in a popup)
    var images = $("main#body-inner img").not(".inline");
    images.wrap(function(){
        var image =$(this);
        var o = getUrlParameter(image[0].src);
        var f = o['featherlight'];
        // IF featherlight is false, do not use feather light
        if (f != 'false') {
            if (!image.parent("a").length) {
                var html = $( "<a>" ).attr("href", image[0].src).attr("data-featherlight", "image").get(0).outerHTML;
                return html;
            }
        }
    });

    $('a[rel="lightbox"]').featherlight({
        root: 'div#body'
    });
}

function initImageStyles(){
    // change image styles, depending on parameters set to the image
    var images = $("main#body-inner img").not(".inline");
    images.each(function(index){
        var image = $(this)
        var o = getUrlParameter(image[0].src);
        if (typeof o !== "undefined") {
            var h = o["height"];
            var w = o["width"];
            var c = o["classes"];
            image.css("width", function() {
                if (typeof w !== "undefined") {
                    return w;
                } else {
                    return "auto";
                }
            });
            image.css("height", function() {
                if (typeof h !== "undefined") {
                    return h;
                } else {
                    return "auto";
                }
            });
            if (typeof c !== "undefined") {
                var classes = c.split(',');
                for (i = 0; i < classes.length; i++) {
                    image.addClass(classes[i]);
                }
            }
        }
    });
}

function initToc(){
    function showNav(){
        var b = document.querySelector( 'body' );
        b.classList.toggle( 'sidebar-flyout' );
        var n = b.matches('.sidebar-flyout');
        if( n ){
            b.classList.remove( 'toc-flyout' );
        }
    }
    function showToc(){
        var b = document.querySelector( 'body' );
        b.classList.toggle( 'toc-flyout' );
    }

    document.querySelector( '#sidebar-overlay' ).addEventListener( 'click', showNav );
    document.querySelector( '#sidebar-toggle' ).addEventListener( 'click', showNav );
    document.querySelector( '#toc-overlay' ).addEventListener( 'click', showToc );
    var t = document.querySelector( '#toc-menu' );
    var p = document.querySelector( '.progress' );
    if( t && p ){
        // we may not have a toc
        t.addEventListener( 'click', showToc );
        p.addEventListener( 'click', showToc );
    }
}

function initSwipeHandler(){
    if( !touchsupport ){
        return;
    }

    var startx = null;
    var starty = null;
    var handleStartX = function(evt) {
        startx = evt.touches[0].clientX;
        starty = evt.touches[0].clientY;
        return false;
    };
    var handleMoveX = function(evt) {
        if( startx !== null ){
            var diffx = startx - evt.touches[0].clientX;
            var diffy = starty - evt.touches[0].clientY || .1 ;
            if( diffx / Math.abs( diffy ) < 2 ){
                // detect mostly vertical swipes and reset our starting pos
                // to not detect a horizontal move if vertical swipe is unprecise
                startx = evt.touches[0].clientX;
            }
            else if( diffx > 30 ){
                startx = null;
                starty = null;
                document.querySelector( 'body' ).classList.toggle( 'sidebar-flyout' );
            }
        }
        return false;
    };
    var handleEndX = function(evt) {
        startx = null;
        starty = null;
        return false;
    };

    document.querySelector( '#sidebar-overlay' ).addEventListener("touchstart", handleStartX, false);
    document.querySelector( '#sidebar' ).addEventListener("touchstart", handleStartX, false);
    document.querySelectorAll( '#sidebar *' ).forEach( function(e){ e.addEventListener("touchstart", handleStartX); }, false);
    document.querySelector( '#sidebar-overlay' ).addEventListener("touchmove", handleMoveX, false);
    document.querySelector( '#sidebar' ).addEventListener("touchmove", handleMoveX, false);
    document.querySelectorAll( '#sidebar *' ).forEach( function(e){ e.addEventListener("touchmove", handleMoveX); }, false);
    document.querySelector( '#sidebar-overlay' ).addEventListener("touchend", handleEndX, false);
    document.querySelector( '#sidebar' ).addEventListener("touchend", handleEndX, false);
    document.querySelectorAll( '#sidebar *' ).forEach( function(e){ e.addEventListener("touchend", handleEndX); }, false);
}

function scrollToActiveMenu() {
    window.setTimeout(function(){
        var e = document.querySelector( '#sidebar ul.topics li.active a' );
        if( e && e.scrollIntoView ){
            e.scrollIntoView({
                block: 'center',
            });
        }
    }, 10);
}

function scrollToFragment() {
    if( !window.location.hash || window.location.hash.length <= 1 ){
        return;
    }
    window.setTimeout(function(){
        var e = document.querySelector( window.location.hash );
        if( e && e.scrollIntoView ){
            e.scrollIntoView({
                block: 'start',
            });
        }
    }, 10);
}

// Get Parameters from some url
var getUrlParameter = function getUrlParameter(sPageURL) {
    var url = sPageURL.split('?');
    var obj = {};
    if (url.length == 2) {
      var sURLVariables = url[1].split('&'),
          sParameterName,
          i;
      for (i = 0; i < sURLVariables.length; i++) {
          sParameterName = sURLVariables[i].split('=');
          obj[sParameterName[0]] = sParameterName[1];
      }
    }
    return obj;
};

// debouncing function from <NAME>
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
(function($, sr) {

    var debounce = function(func, threshold, execAsap) {
        var timeout;

        return function debounced() {
            var obj = this, args = arguments;

            function delayed() {
                if (!execAsap)
                    func.apply(obj, args);
                timeout = null;
            };

            if (timeout)
                clearTimeout(timeout);
            else if (execAsap)
                func.apply(obj, args);

            timeout = setTimeout(delayed, threshold || 100);
        };
    }
    // smartresize
    jQuery.fn[sr] = function(fn) { return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };

})(jQuery, 'smartresize');

jQuery(function() {
    initArrowNav();
    initMermaid();
    initSwagger();
    initMenuScrollbar();
    scrollToActiveMenu();
    scrollToFragment();
    initLightbox();
    initImageStyles();
    initToc();
    initAnchorClipboard();
    initCodeClipboard();
    restoreTabSelections();
    initSwipeHandler();

    jQuery('[data-clear-history-toggle]').on('click', function() {
        for( var item in sessionStorage ){
          if( item.substring( 0, baseUriFull.length ) === baseUriFull ){
            sessionStorage.removeItem( item );
          }
        }
        location.reload();
        return false;
    });

    var ajax;
    jQuery('[data-search-input]').on('input', function() {
        var input = jQuery(this),
            value = input.val(),
            items = jQuery('[data-nav-id]');
        items.removeClass('search-match');
        if (!value.length) {
            $('ul.topics').removeClass('searched');
            items.css('display', 'block');
            sessionStorage.removeItem(baseUriFull+'search-value');
            $("mark").parents(".expand-marked").removeClass("expand-marked");
            $(".highlightable").unhighlight({ element: 'mark' })
            return;
        }

        sessionStorage.setItem(baseUriFull+'search-value', value);
        $("mark").parents(".expand-marked").removeClass("expand-marked");
        $(".highlightable").unhighlight({ element: 'mark' }).highlight(value, { element: 'mark' });
        $("mark").parents(".expand").addClass("expand-marked");

        if (ajax && ajax.abort) ajax.abort();

        jQuery('[data-search-clear]').on('click', function() {
            jQuery('[data-search-input]').val('').trigger('input');
            sessionStorage.removeItem(baseUriFull+'search-input');
            $("mark").parents(".expand-marked").removeClass("expand-marked");
            $(".highlightable").unhighlight({ element: 'mark' })
        });
    });

    $.expr[":"].contains = $.expr.createPseudo(function(arg) {
        return function( elem ) {
            return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
        };
    });

    if (sessionStorage.getItem(baseUriFull+'search-value')) {
        var searchValue = sessionStorage.getItem(baseUriFull+'search-value')
        $('[data-search-input]').val(searchValue);
        $('[data-search-input]').trigger('input');
        var searchedElem = $('#body-inner').find(':contains(' + searchValue + ')').get(0);
        if (searchedElem) {
            searchedElem.scrollIntoView(true);
            var scrolledY = window.scrollY;
            if(scrolledY){
                window.scroll(0, scrolledY - 125);
            }
        }
    }

    $(".highlightable").highlight(sessionStorage.getItem(baseUriFull+'search-value'), { element: 'mark' });
    $("mark").parents(".expand").addClass("expand-marked");

    $('#topbar a:not(:has(img)):not(.btn)').addClass('highlight');
    $('#body-inner a:not(:has(img)):not(.btn):not(a[rel="footnote"])').addClass('highlight');

    var visitedItem = baseUriFull + 'visited-url/'
    sessionStorage.setItem(visitedItem+jQuery('body').data('url'), 1);

    // loop through the sessionStorage and see if something should be marked as visited
    for( var item in sessionStorage ){
        if( item.substring( 0, visitedItem.length ) === visitedItem && sessionStorage.getItem( item ) == 1 ){
            var url = item.substring( visitedItem.length );
            // in case we have `relativeURLs=true` we have to strip the
            // relative path to root
            url = url.replace( /\.\.\//g, '/' ).replace( /^\/+\//, '/' );
            jQuery('[data-nav-id="' + url + '"]').addClass('visited');
        }
    }
});

jQuery.extend({
    highlight: function(node, re, nodeName, className) {
        if (node.nodeType === 3 && node.parentElement && node.parentElement.namespaceURI == 'http://www.w3.org/1999/xhtml') { // text nodes
            var match = node.data.match(re);
            if (match) {
                var highlight = document.createElement(nodeName || 'span');
                highlight.className = className || 'highlight';
                var wordNode = node.splitText(match.index);
                wordNode.splitText(match[0].length);
                var wordClone = wordNode.cloneNode(true);
                highlight.appendChild(wordClone);
                wordNode.parentNode.replaceChild(highlight, wordNode);
                return 1; //skip added node in parent
            }
        } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children
            !/(script|style)/i.test(node.tagName) && // ignore script and style nodes
            !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted
            for (var i = 0; i < node.childNodes.length; i++) {
                i += jQuery.highlight(node.childNodes[i], re, nodeName, className);
            }
        }
        return 0;
    }
});

jQuery.fn.unhighlight = function(options) {
    var settings = {
        className: 'highlight',
        element: 'span'
    };
    jQuery.extend(settings, options);

    return this.find(settings.element + "." + settings.className).each(function() {
        var parent = this.parentNode;
        parent.replaceChild(this.firstChild, this);
        parent.normalize();
    }).end();
};

jQuery.fn.highlight = function(words, options) {
    var settings = {
        className: 'highlight',
        element: 'span',
        caseSensitive: false,
        wordsOnly: false
    };
    jQuery.extend(settings, options);

    if (!words) { return; }

    if (words.constructor === String) {
        words = [words];
    }
    words = jQuery.grep(words, function(word, i) {
        return word != '';
    });
    words = jQuery.map(words, function(word, i) {
        return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
    });
    if (words.length == 0) { return this; }
    ;

    var flag = settings.caseSensitive ? "" : "i";
    var pattern = "(" + words.join("|") + ")";
    if (settings.wordsOnly) {
        pattern = "\\b" + pattern + "\\b";
    }
    var re = new RegExp(pattern, flag);

    return this.each(function() {
        jQuery.highlight(this, re, settings.element, settings.className);
    });
};


<|start_filename|>themes/hugo-theme-relearn/static/css/theme-neon.css<|end_filename|>
/* here in this showcase we use our own modified chroma syntax highlightning style;
   if you want to use a predefined style instead:
   - remove `markup.highlight.noClasses` from your config.toml
   - set `markup.highlight.style` to a predefined style name in your config.toml
   - remove the following `@import` of the self-defined chroma stylesheet */
@import "chroma-neon.css";

:root {
    --MAIN-TEXT-color: #e0e0e0; /* Color of text by default */
    --MAIN-TITLES-TEXT-color: #f300b2; /* Color of titles h2-h3-h4-h5-h6 */

    /* optional overwrites for specific headers */
    --MAIN-TITLES-H3-color: #00f3d3; /* Color of h3 headlines */
    --MAIN-TITLES-H4-color: #ffff00; /* Color of h4 headlines */

    --MAIN-LINK-color: #1c90f3; /* Color of links */
    --MAIN-LINK-HOVER-color: #4cabff; /* Color of hovered links */
    --MAIN-ANCHOR-color: #4cabff; /* color of anchors on titles */
    --MAIN-BG-color: #202020; /* color for code background */

    /* adjusted to neon chroma style */
    --CODE-BLOCK-color: #f8f8f2; /* fallback color for block code text */
    --CODE-BLOCK-BG-color: #000000; /* fallback color for block code background */
    --CODE-BLOCK-BORDER-color: #000000; /* color of block code border */

    --CODE-INLINE-color: #82e550; /* color for inline code text */
    --CODE-INLINE-BG-color: #282a36; /* color for inline code background */
    --CODE-INLINE-BORDER-color: #464646; /* color of inline code border */

    --MERMAID-theme: dark; /* name of the default Mermaid theme for this variant, can be overridden in config.toml */
    --SWAGGER-theme: dark; /* name of the default Swagger theme for this variant, can be overridden in config.toml */

    --TAG-BG-color: #04d1b5; /* Background color of menu header */

    --MENU-HOME-LINK-color: #323232; /* Color of the home button text */
    --MENU-HOME-LINK-HOVER-color: #5e5e5e; /* Color of the hovered home button text */

    --MENU-HEADER-BG-color: rgba( 0, 0, 0, 0 ); /* Background color of menu header */
    --MENU-HEADER-BORDER-color: rgba( 0, 0, 0, 0 ); /*Color of menu header border */

    --MENU-SEARCH-color: #e0e0e0; /* Color of search field text */
    --MENU-SEARCH-BG-color: #323232; /* Search field background color (by default borders + icons) */
    --MENU-SEARCH-BORDER-color: #e0e0e0; /* Override search field border color */

    --MENU-SECTIONS-ACTIVE-BG-color: rgba( 0, 0, 0, .166 ); /* Background color of the active section and its children */
    --MENU-SECTIONS-BG-color: linear-gradient( 165deg, #f300b2d3 0%, #1c90f3b3 65%, #00e3d3b3 100% ); /* Background color of side bar */
    --MENU-SECTIONS-LINK-color: #ffffff; /* Color of links in menu */
    --MENU-SECTIONS-LINK-HOVER-color: #d0d0d0;  /* Color of links in menu, when hovered */
    --MENU-SECTION-ACTIVE-CATEGORY-color: #56ffe8; /* Color of active category text */
    --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #202020; /* Color of background for the active category (only) */

    --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
    --MENU-SECTION-HR-color: #bababa; /* Color of <hr> separator in menu */

    /* base styling for boxes */
    --BOX-CAPTION-color: rgba( 240, 240, 240, 1 ); /* color of the title text */
    --BOX-BG-color: rgba( 20, 20, 20, 1 ); /* color of the content background */
    --BOX-TEXT-color: initial; /* automatic color of the content text */

    /* optional base colors for colored boxes as in attachments and notice shortcode */
    --BOX-BLUE-color: rgba( 48, 117, 229, 1 );
    --BOX-GREEN-color: rgba( 42, 178, 24, 1 );
    --BOX-GREY-color: rgba( 128, 128, 128, 1 );
    --BOX-ORANGE-color: rgba( 237, 153, 9, 1 );
    --BOX-RED-color: rgba( 224, 62, 62, 1 );

    --BOX-BLUE-TEXT-color: var(--BOX-BLUE-color);
    --BOX-GREEN-TEXT-color: var(--BOX-GREEN-color);
    --BOX-GREY-TEXT-color: var(--BOX-GREY-color);
    --BOX-ORANGE-TEXT-color: var(--BOX-ORANGE-color);
    --BOX-RED-TEXT-color: var(--BOX-RED-color);
}

body a#logo,
body #logo svg,
body #logo svg * {
  color: var(--INTERNAL-MENU-SEARCH-BORDER-color);
  fill: var(--INTERNAL-MENU-SEARCH-BORDER-color) !important;
}

body a#logo{
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  4px #c0c0c0,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color),
        0 0  8px var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color),
        0 0  12px var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color);
}

body h1 {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  4px #fff,
        0 0  8px #fff,
        0 0  3px var(--INTERNAL-MAIN-TITLES-H1-color),
        0 0  6px var(--INTERNAL-MAIN-TITLES-H1-color),
        0 0  8px var(--INTERNAL-MAIN-TITLES-H1-color);
}

body h2 {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MAIN-TITLES-H2-color),
        0 0  8px var(--INTERNAL-MAIN-TITLES-H2-color),
        0 0 10px var(--INTERNAL-MAIN-TITLES-H2-color);
}

body h3 {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MAIN-TITLES-H3-color),
        0 0  8px var(--INTERNAL-MAIN-TITLES-H3-color),
        0 0 10px var(--INTERNAL-MAIN-TITLES-H3-color);
}

body h4 {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MAIN-TITLES-H4-color),
        0 0  8px var(--INTERNAL-MAIN-TITLES-H4-color),
        0 0 10px var(--INTERNAL-MAIN-TITLES-H4-color);
}

body h5 {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MAIN-TITLES-H5-color),
        0 0  8px var(--INTERNAL-MAIN-TITLES-H5-color),
        0 0 10px var(--INTERNAL-MAIN-TITLES-H5-color);
}

body h6 {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MAIN-TITLES-H6-color),
        0 0  8px var(--INTERNAL-MAIN-TITLES-H6-color),
        0 0 10px var(--INTERNAL-MAIN-TITLES-H5-color);
}

body #sidebar ul.topics li.active > label,
body #sidebar ul.topics li.active > a {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MENU-SECTION-ACTIVE-CATEGORY-color),
        0 0  8px var(--INTERNAL-MENU-SECTION-ACTIVE-CATEGORY-color);
}

body #sidebar select:hover,
body #sidebar label:hover,
body #sidebar a:hover {
    color: #fff;
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  8px #808080,
        0 0  4px var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color),
        0 0  8px var(--INTERNAL-MENU-SECTIONS-LINK-HOVER-color);
}

body h1 a,
body h2 a,
body h3 a,
body h4 a,
body h5 a,
body h6 a,
body .anchor {
    text-shadow: none;
}

body div.box {
    box-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  4px #808080,
        0 0  4px var(--VARIABLE-BOX-color),
        0 0  8px var(--VARIABLE-BOX-color);
}

body div.box > .box-label {
    text-shadow:
        0 0  1px #fff,
        0 0  2px #fff,
        0 0  4px #808080,
        0 0  4px var(--VARIABLE-BOX-CAPTION-color),
        0 0  8px var(--VARIABLE-BOX-CAPTION-color);
}

body div.box.transparent {
    box-shadow: none;
}

@media print {
    #body h1,
    #body h2,
    #body h3,
    #body h4,
    #body h5,
    #body h6 {
        text-shadow: none;
    }
    #body div.box,
    #body div.box > .box-label {
        box-shadow: none;
        text-shadow: none;
    }
}

/* if we are in print chapter preview our @media statement from
above will not apply, so we have to repeat it here */
.print #body h1,
.print #body h2,
.print #body h3,
.print #body h4,
.print #body h5,
.print #body h6 {
    text-shadow: none;
}
.print #body div.box,
.print #body div.box > .box-label {
    box-shadow: none;
    text-shadow: none;
}


<|start_filename|>themes/hugo-theme-relearn/layouts/partials/content-print.html<|end_filename|>
{{- $currentNode := . }}
{{- $isActive := .IsHome }}
{{- $pages := .Site.Home.Sections }}
{{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }}
{{- $currentOrdersectionsby := .Site.Home.Params.ordersectionsby | default $defaultOrdersectionsby }}
{{- if $isActive }}
  {{- template "section-print" dict "sect" . "currentnode" $currentNode  }}
  {{- if or .IsHome .Params.chapter $pages }}
          <section>
  {{- end }}
{{- end }}
{{- if eq $currentOrdersectionsby "title" }}
  {{- range $pages.ByTitle }}
    {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "isActive" $isActive }}
  {{- end }}
{{- else }}
  {{- range $pages.ByWeight }}
    {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "isActive" $isActive }}
  {{- end }}
{{- end }}
{{- if $isActive }}
  {{- if or .IsHome .Params.chapter $pages }}
          </section>
  {{- end }}
{{- end }}
{{- define "section-tree-print" }}
  {{- $currentNode := .currentnode }}
  {{- $isActive := .isActive }}
  {{- $currentFileRelPermalink := .currentnode.RelPermalink }}
  {{- with .sect }}
    {{- $currentIsActive := eq .RelPermalink $currentFileRelPermalink }}
    {{- $isActive = or $currentIsActive $isActive }}
    {{- $pages := .Pages }}
    {{- if .Page.IsHome }}
      {{- $pages = .Sections }}
    {{- else if .Page.Sections}}
      {{- $pages = (.Pages | union .Sections) }}
    {{- end }}
    {{- $relearnIsHiddenFrom := index ($currentNode.Scratch.Get "relearnIsHiddenFrom") .RelPermalink }}
    {{- $hidden := and $relearnIsHiddenFrom (not $.showhidden) (not (.IsAncestor $currentNode)) }}
    {{- if $hidden }}
    {{- else if or .IsSection .IsHome }}
      {{- $defaultOrdersectionsby := .Site.Params.ordersectionsby | default "weight" }}
      {{- $currentOrdersectionsby := .Params.ordersectionsby | default $defaultOrdersectionsby }}
      {{- if $isActive }}
        {{- template "section-print" dict "sect" . "currentnode" $currentNode  }}
        {{- if or .IsHome .Params.chapter $pages }}
          <section>
        {{- end }}
      {{- end }}
      {{- if eq $currentOrdersectionsby "title" }}
        {{- range $pages.ByTitle }}
          {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "isActive" $isActive }}
        {{- end }}
      {{- else }}
        {{- range $pages.ByWeight }}
          {{- template "section-tree-print" dict "sect" . "currentnode" $currentNode "isActive" $isActive }}
        {{- end }}
      {{- end }}
      {{- if $isActive }}
        {{- if or .IsHome .Params.chapter $pages }}
          </section>
        {{- end }}
      {{- end }}
    {{- else }}
      {{- if $isActive }}
        {{- template "section-print" dict "sect" . "currentnode" $currentNode }}
      {{- end }}
    {{- end }}
  {{- end }}
{{- end }}
{{- define "section-print" }}
  {{- $currentNode := .currentnode }}
  {{- with .sect }}
    {{- $currentNode.Page.Store.Set "printHasMermaid" (or ($currentNode.Page.Store.Get "printHasMermaid") (.Page.Store.Get "htmlHasMermaid")) }}
    {{- $currentNode.Page.Store.Set "printHasSwagger" (or ($currentNode.Page.Store.Get "printHasSwagger") (.Page.Store.Get "htmlHasSwagger")) }}
    {{/* if we have a relative link in a print page, our print URL is one level to deep; so we are making it absolute to our page by prepending the page's permalink */}}
    {{- $link_prefix := strings.TrimRight "/" .Page.RelPermalink }}
    {{- $content := partial "content.html" . }}
    {{- $content = replaceRE "((?:src|href)\\s*=(?:\\s*[\"']\\s*)?)(\\.[^\"'\\s>]*|[\\w]+[^\"'\\s>:]*)([\"'\\s>])" (printf "${1}%s/${2}${3}" $link_prefix) $content }}
    {{- partial "article.html" (dict "page" . "content" $content) }}
  {{- end }}
{{- end }}