!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)= 0 && matches.item(i) !== this) { } return i > -1; }; } // Get the closest matching element for (; elem && elem !== document; elem = elem.parentNode) { if (elem.matches(selector)) return elem; } return null; }; function activateMenu() { var menuItems = document.getElementsByClassName("sub-menu-item"); if (menuItems) { var matchingMenuItem = null; for (var idx = 0; idx < menuItems.length; idx++) { if (menuItems[idx].href === window.location.href) { matchingMenuItem = menuItems[idx]; } } if (matchingMenuItem) { matchingMenuItem.classList.add('active'); var immediateParent = getClosest(matchingMenuItem, 'li'); if (immediateParent) { immediateParent.classList.add('active'); } var parent = getClosest(matchingMenuItem, '.parent-menu-item'); if (parent) { parent.classList.add('active'); var parentMenuitem = parent.querySelector('.menu-item'); if (parentMenuitem) { parentMenuitem.classList.add('active'); } var parentOfParent = getClosest(parent, '.parent-parent-menu-item'); if (parentOfParent) { parentOfParent.classList.add('active'); } } else { var parentOfParent = getClosest(matchingMenuItem, '.parent-parent-menu-item'); if (parentOfParent) { parentOfParent.classList.add('active'); } } } } } // Sidebar Menu function activateSidebarMenu() { var current = location.pathname.substring(location.pathname.lastIndexOf('/') + 1); if (current !== "" && document.getElementById("sidebar")) { var menuItems = document.querySelectorAll('#sidebar button'); for (var i = 0, len = menuItems.length; i < len; i++) { if (menuItems[i].getAttribute("href").indexOf(current) !== -1) { menuItems[i].parentElement.className += " active"; if (menuItems[i].closest(".sidebar-submenu")) { menuItems[i].closest(".sidebar-submenu").classList.add("d-block"); } if (menuItems[i].closest(".sidebar-dropdown")) { menuItems[i].closest(".sidebar-dropdown").classList.add("active"); } } } } } if (document.getElementById("close-sidebar")) { document.getElementById("close-sidebar").addEventListener("click", function () { document.getElementsByClassName("page-wrapper")[0].classList.toggle("toggled"); }); } // Close Sidebar (mobile) if (!window.matchMedia('(min-width: 1024px)').matches) { if (document.getElementById("close-sidebar")) { const closeSidebar = document.getElementById("close-sidebar"); const sidebar = document.getElementById("sidebar"); const sidebarMenuLinks = Array.from(document.querySelectorAll(".sidebar-root-link,.sidebar-nested-link")); // Close sidebar by clicking outside document.addEventListener('click', function(elem) { if (!closeSidebar.contains(elem.target) && !sidebar.contains(elem.target)) document.getElementsByClassName("page-wrapper")[0].classList.add("toggled"); }); // Close sidebar immediately when clicking sidebar menu item sidebarMenuLinks.forEach(menuLink => { menuLink.addEventListener("click", function () { document.getElementsByClassName("page-wrapper")[0].classList.add("toggled"); }); }); } } // Clickable Menu if (document.getElementById("navigation")) { var elements = document.getElementById("navigation").getElementsByTagName("a"); for (var i = 0, len = elements.length; i < len; i++) { elements[i].onclick = function (elem) { if (elem.target.getAttribute("href") === "javascript:void(0)") { var submenu = elem.target.nextElementSibling.nextElementSibling; submenu.classList.toggle('open'); } } } } if (document.getElementById("sidebar")) { var elements = document.getElementById("sidebar").getElementsByTagName("button"); for (var i = 0, len = elements.length; i < len; i++) { elements[i].onclick = function (elem) { // if(elem.target !== document.querySelectorAll("li.sidebar-dropdown.active > a")[0]){ // document.querySelectorAll("li.sidebar-dropdown.active")[0]?.classList?.toggle("active"); // document.querySelectorAll("div.sidebar-submenu.d-block")[0]?.classList?.toggle("d-block"); // } // if(elem.target.getAttribute("href") === "javascript:void(0)") { elem.target.parentElement.classList.toggle("active"); elem.target.nextElementSibling.classList.toggle("d-block"); // } } } } // Menu sticky function windowScroll() { var navbar = document.getElementById("topnav"); if (navbar === null) { } else if (document.body.scrollTop >= 50 || document.documentElement.scrollTop >= 50) { navbar.classList.add("nav-sticky"); } else { navbar.classList.remove("nav-sticky"); } } window.addEventListener('scroll', (ev) => { ev.preventDefault(); windowScroll(); }) // back-to-top var mybutton = document.getElementById("back-to-top"); window.onscroll = function () { scrollFunction(); }; function scrollFunction() { if (mybutton != null) { if (document.body.scrollTop > 500 || document.documentElement.scrollTop > 500) { mybutton.style.display = "block"; } else { mybutton.style.display = "none"; } } } function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } // dd-menu if (document.getElementsByClassName("dd-menu")) { var ddmenu = document.getElementsByClassName("dd-menu"); for (var i = 0, len = ddmenu.length; i < len; i++) { ddmenu[i].onclick = function (elem) { elem.stopPropagation(); } } } // Active Sidebar (function () { var current = location.pathname.substring(location.pathname.lastIndexOf('/') + 1); if (current === "") return; var menuItems = document.querySelectorAll('.sidebar-nav a'); for (var i = 0, len = menuItems.length; i < len; i++) { if (menuItems[i].getAttribute("href").indexOf(current) !== -1) { menuItems[i].parentElement.className += " active"; } } })(); // Last Modified Date of current page (relative time format) if (document.getElementById("relativetime")) { dayjs.extend(window.dayjs_plugin_relativeTime); const modId = document.getElementById('relativetime'); let modAgo = dayjs(modId.getAttribute('data-authdate')).fromNow(); document.getElementById("relativetime").innerHTML = modAgo; }; // Initialize Bootstrap Tooltips const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new Tooltip(tooltipTriggerEl)) /** * Sanitize and encode all HTML in a user-submitted string * https://portswigger.net/web-security/cross-site-scripting/preventing * @param {String} str The user-submitted string * @return {String} str The sanitized string */ var sanitizeHTML = function (str) { return str.replace(/[^\w. ]/gi, function (c) { return '&#' + c.charCodeAt(0) + ';'; }); }; ; !function(t,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.scrollSpy=o():t.scrollSpy=o()}(self,(()=>(()=>{var t={138:(t,o,e)=>{t.exports=(t,o={})=>{const{ScrollSpy:s}=e(218),i=new s(t,o);return window.onload=i.onScroll(),window.addEventListener("scroll",(()=>i.onScroll())),i}},218:(t,o,e)=>{"use strict";e.r(o),e.d(o,{ScrollSpy:()=>s});class s{constructor(t,o={}){if(!t)throw new Error("First argument is query selector to your navigation.");if("object"!=typeof o)throw new Error("Second argument must be instance of Object.");o.smoothScroll=!0===o.smoothScroll&&{}||o.smoothScroll,this.menuList=t instanceof HTMLElement?t:document.querySelector(t),this.options=Object.assign({},{sectionClass:".scrollspy",menuActiveTarget:"li > a",offset:0,hrefAttribute:"href",activeClass:"active",scrollContainer:"",smoothScroll:{}},o),this.options.scrollContainer?this.scroller=this.options.scrollContainer instanceof HTMLElement?this.options.scrollContainer:document.querySelector(this.options.scrollContainer):this.scroller=window,this.sections=document.querySelectorAll(this.options.sectionClass),this.attachEventListeners()}attachEventListeners(){if(this.scroller&&(this.scroller.addEventListener("scroll",(()=>this.onScroll())),this.options.smoothScroll)){this.menuList.querySelectorAll(this.options.menuActiveTarget).forEach((t=>t.addEventListener("click",this.onClick.bind(this))))}}onClick(t){const o=t.target.getAttribute(this.options.hrefAttribute),e=document.querySelector(o);e&&this.options.smoothScroll&&(t.preventDefault(),this.scrollTo(e))}onScroll(){const t=this.getSectionInView(),o=this.getMenuItemBySection(t);o&&(this.removeCurrentActive({ignore:o}),this.setActive(o))}scrollTo(t){const o="function"==typeof this.options.smoothScrollBehavior&&this.options.smoothScrollBehavior;o?o(t,this.options.smoothScroll):t.scrollIntoView({...this.options.smoothScroll,behavior:"smooth"})}getMenuItemBySection(t){if(!t)return;const o=t.getAttribute("id");return this.menuList.querySelector(`[${this.options.hrefAttribute}="#${o}"]`)}getSectionInView(){for(let t=0;to&&s<=e)return this.sections[t]}}setActive(t){t.classList.contains(this.options.activeClass)||t.classList.add(this.options.activeClass)}removeCurrentActive({ignore:t}){const{hrefAttribute:o,menuActiveTarget:e,activeClass:s}=this.options,i=`${e}.${s}:not([${o}="${t.getAttribute(o)}"])`;this.menuList.querySelectorAll(i).forEach((t=>t.classList.remove(this.options.activeClass)))}}}},o={};function e(s){var i=o[s];if(void 0!==i)return i.exports;var r=o[s]={exports:{}};return t[s](r,r.exports,e),r.exports}return e.d=(t,o)=>{for(var s in o)e.o(o,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:o[s]})},e.o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e(138)})())); ; (() => { // window.onload = function() { scrollSpy("toc", { sectionClass: "h1,h2,h3,h4", // menuActiveTarget: 'href', offset: 100 // scrollContainer: null, // smooth scroll // smoothScroll: true, // smoothScrollBehavior: function(element) { // console.log('run "smoothScrollBehavior"...', element) // element.scrollIntoView({ behavior: 'smooth' }) // } }); }; })(); ; // ToC Mobile Menu (Bootstrap 5 Dropdown with ScrollSpy) const scrollArea = document.getElementById('content'); const tocBtn = document.getElementById('toc-dropdown-btn'); scrollArea.addEventListener("activate.bs.scrollspy", function(){ var currentItem = document.querySelector('.dropdown-menu li > a.active').innerHTML; tocBtn.innerHTML = currentItem; }) tocBtn.addEventListener('shown.bs.dropdown', event => { tocBtn.style.borderBottom = 'none' tocBtn.style.borderRadius = '4px 4px 0 0' // console.log("dropdown opened"); }) tocBtn.addEventListener('hidden.bs.dropdown', event => { tocBtn.style.borderBottom = '1px solid var(--alert-border-color)' tocBtn.style.borderRadius = '4px' // console.log("dropdown closed"); }); ; (() => { var __getOwnPropNames = Object.getOwnPropertyNames; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; // ns-hugo-params: var stdin_default; var init_stdin = __esm({ "ns-hugo-params:"() { stdin_default = { langPath: "http://localhost:1313/docs/js/components/" }; } }); // var require_stdin = __commonJS({ ""(exports, module) { init_stdin(); var _self = typeof window !== "undefined" ? window : typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope ? self : {}; var Prism = (function(_self2) { var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i; var uniqueId = 0; var plainTextGrammar = {}; var _ = { /** * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load * additional languages or plugins yourself. * * By setting this value to `true`, Prism will not automatically highlight all code elements on the page. * * You obviously have to change this value before the automatic highlighting started. To do this, you can add an * empty Prism object into the global scope before loading the Prism script like this: * * ```js * window.Prism = window.Prism || {}; * Prism.manual = true; * // add a new