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,SAASmE,cAAcxE,EAAQiG,aAC/D,GAAI+I,GAAOA,EAAIC,aAAeD,EAAIE,aAAc,CAC9C,IAAIC,EAAaH,EAAIxK,cAAc,IAAMxE,EAAQ2F,qBAC7CwJ,IACFH,EAAIvK,UAAY0K,EAAWlM","sources":["webpack://sakurairo-scripts/./node_modules/tocbot/src/js/build-html.js","webpack://sakurairo-scripts/./node_modules/tocbot/src/js/default-options.js","webpack://sakurairo-scripts/./node_modules/tocbot/src/js/index.js","webpack://sakurairo-scripts/./node_modules/tocbot/src/js/parse-content.js","webpack://sakurairo-scripts/./node_modules/tocbot/src/js/scroll-smooth/index.js","webpack://sakurairo-scripts/./node_modules/tocbot/src/js/update-toc-scroll.js"],"sourcesContent":["/* eslint no-var: off */\n\n/**\n * This file is responsible for building the DOM and updating DOM state.\n *\n * @author Tim Scanlin\n */\n\nmodule.exports = function (options) {\n var forEach = [].forEach\n var some = [].some\n var body = document.body\n var tocElement\n var currentlyHighlighting = true\n var SPACE_CHAR = ' '\n\n /**\n * Create link and list elements.\n * @param {Object} d\n * @param {HTMLElement} container\n * @return {HTMLElement}\n */\n function createEl (d, container) {\n var link = container.appendChild(createLink(d))\n if (d.children.length) {\n var list = createList(d.isCollapsed)\n d.children.forEach(function (child) {\n createEl(child, list)\n })\n link.appendChild(list)\n }\n }\n\n /**\n * Render nested heading array data into a given element.\n * @param {HTMLElement} parent Optional. If provided updates the {@see tocElement} to match.\n * @param {Array} data\n * @return {HTMLElement}\n */\n function render (parent, data) {\n var collapsed = false\n var container = createList(collapsed)\n\n data.forEach(function (d) {\n createEl(d, container)\n })\n\n // Return if no TOC element is provided or known.\n tocElement = parent || tocElement\n if (tocElement === null) {\n return\n }\n\n // Remove existing child if it exists.\n if (tocElement.firstChild) {\n tocElement.removeChild(tocElement.firstChild)\n }\n\n // Just return the parent and don't append the list if no links are found.\n if (data.length === 0) {\n return tocElement\n }\n\n // Append the Elements that have been created\n return tocElement.appendChild(container)\n }\n\n /**\n * Create link element.\n * @param {Object} data\n * @return {HTMLElement}\n */\n function createLink (data) {\n var item = document.createElement('li')\n var a = document.createElement('a')\n if (options.listItemClass) {\n item.setAttribute('class', options.listItemClass)\n }\n\n if (options.onClick) {\n a.onclick = options.onClick\n }\n\n if (options.includeTitleTags) {\n a.setAttribute('title', data.textContent)\n }\n\n if (options.includeHtml && data.childNodes.length) {\n forEach.call(data.childNodes, function (node) {\n a.appendChild(node.cloneNode(true))\n })\n } else {\n // Default behavior.\n a.textContent = data.textContent\n }\n a.setAttribute('href', options.basePath + '#' + data.id)\n a.setAttribute('class', options.linkClass +\n SPACE_CHAR + 'node-name--' + data.nodeName +\n SPACE_CHAR + options.extraLinkClasses)\n item.appendChild(a)\n return item\n }\n\n /**\n * Create list element.\n * @param {Boolean} isCollapsed\n * @return {HTMLElement}\n */\n function createList (isCollapsed) {\n var listElement = (options.orderedList) ? 'ol' : 'ul'\n var list = document.createElement(listElement)\n var classes = options.listClass +\n SPACE_CHAR + options.extraListClasses\n if (isCollapsed) {\n classes += SPACE_CHAR + options.collapsibleClass\n classes += SPACE_CHAR + options.isCollapsedClass\n }\n list.setAttribute('class', classes)\n return list\n }\n\n /**\n * Update fixed sidebar class.\n * @return {HTMLElement}\n */\n function updateFixedSidebarClass () {\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n var top\n top = document.querySelector(options.scrollContainer).scrollTop\n } else {\n top = document.documentElement.scrollTop || body.scrollTop\n }\n var posFixedEl = document.querySelector(options.positionFixedSelector)\n\n if (options.fixedSidebarOffset === 'auto') {\n options.fixedSidebarOffset = tocElement.offsetTop\n }\n\n if (top > options.fixedSidebarOffset) {\n if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) {\n posFixedEl.className += SPACE_CHAR + options.positionFixedClass\n }\n } else {\n posFixedEl.className = posFixedEl.className.split(SPACE_CHAR + options.positionFixedClass).join('')\n }\n }\n\n /**\n * Get top position of heading\n * @param {HTMLElement} obj\n * @return {int} position\n */\n function getHeadingTopPos (obj) {\n var position = 0\n if (obj !== null) {\n position = obj.offsetTop\n if (options.hasInnerContainers) { position += getHeadingTopPos(obj.offsetParent) }\n }\n return position\n }\n\n /**\n * Update TOC highlighting and collpased groupings.\n */\n function updateToc (headingsArray) {\n // If a fixed content container was set\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n var top\n top = document.querySelector(options.scrollContainer).scrollTop\n } else {\n top = document.documentElement.scrollTop || body.scrollTop\n }\n\n // Add fixed class at offset\n if (options.positionFixedSelector) {\n updateFixedSidebarClass()\n }\n\n // Get the top most heading currently visible on the page so we know what to highlight.\n var headings = headingsArray\n var topHeader\n // Using some instead of each so that we can escape early.\n if (currentlyHighlighting &&\n tocElement !== null &&\n headings.length > 0) {\n some.call(headings, function (heading, i) {\n if (getHeadingTopPos(heading) > top + options.headingsOffset + 10) {\n // Don't allow negative index value.\n var index = (i === 0) ? i : i - 1\n topHeader = headings[index]\n return true\n } else if (i === headings.length - 1) {\n // This allows scrolling for the last heading on the page.\n topHeader = headings[headings.length - 1]\n return true\n }\n })\n\n // Remove the active class from the other tocLinks.\n var tocLinks = tocElement\n .querySelectorAll('.' + options.linkClass)\n forEach.call(tocLinks, function (tocLink) {\n tocLink.className = tocLink.className.split(SPACE_CHAR + options.activeLinkClass).join('')\n })\n var tocLis = tocElement\n .querySelectorAll('.' + options.listItemClass)\n forEach.call(tocLis, function (tocLi) {\n tocLi.className = tocLi.className.split(SPACE_CHAR + options.activeListItemClass).join('')\n })\n\n // Add the active class to the active tocLink.\n var activeTocLink = tocElement\n .querySelector('.' + options.linkClass +\n '.node-name--' + topHeader.nodeName +\n '[href=\"' + options.basePath + '#' + topHeader.id.replace(/([ #;&,.+*~':\"!^$[\\]()=>|/@])/g, '\\\\$1') + '\"]')\n if (activeTocLink && activeTocLink.className.indexOf(options.activeLinkClass) === -1) {\n activeTocLink.className += SPACE_CHAR + options.activeLinkClass\n }\n var li = activeTocLink && activeTocLink.parentNode\n if (li && li.className.indexOf(options.activeListItemClass) === -1) {\n li.className += SPACE_CHAR + options.activeListItemClass\n }\n\n var tocLists = tocElement\n .querySelectorAll('.' + options.listClass + '.' + options.collapsibleClass)\n\n // Collapse the other collapsible lists.\n forEach.call(tocLists, function (list) {\n if (list.className.indexOf(options.isCollapsedClass) === -1) {\n list.className += SPACE_CHAR + options.isCollapsedClass\n }\n })\n\n // Expand the active link's collapsible list and its sibling if applicable.\n if (activeTocLink && activeTocLink.nextSibling && activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass) !== -1) {\n activeTocLink.nextSibling.className = activeTocLink.nextSibling.className.split(SPACE_CHAR + options.isCollapsedClass).join('')\n }\n removeCollapsedFromParents(activeTocLink && activeTocLink.parentNode.parentNode)\n }\n }\n\n /**\n * Remove collpased class from parent elements.\n * @param {HTMLElement} element\n * @return {HTMLElement}\n */\n function removeCollapsedFromParents (element) {\n if (element && element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) {\n element.className = element.className.split(SPACE_CHAR + options.isCollapsedClass).join('')\n return removeCollapsedFromParents(element.parentNode.parentNode)\n }\n return element\n }\n\n /**\n * Disable TOC Animation when a link is clicked.\n * @param {Event} event\n */\n function disableTocAnimation (event) {\n var target = event.target || event.srcElement\n if (typeof target.className !== 'string' || target.className.indexOf(options.linkClass) === -1) {\n return\n }\n // Bind to tocLink clicks to temporarily disable highlighting\n // while smoothScroll is animating.\n currentlyHighlighting = false\n }\n\n /**\n * Enable TOC Animation.\n */\n function enableTocAnimation () {\n currentlyHighlighting = true\n }\n\n return {\n enableTocAnimation: enableTocAnimation,\n disableTocAnimation: disableTocAnimation,\n render: render,\n updateToc: updateToc\n }\n}\n","module.exports = {\n // Where to render the table of contents.\n tocSelector: '.js-toc',\n // Where to grab the headings to build the table of contents.\n contentSelector: '.js-toc-content',\n // Which headings to grab inside of the contentSelector element.\n headingSelector: 'h1, h2, h3',\n // Headings that match the ignoreSelector will be skipped.\n ignoreSelector: '.js-toc-ignore',\n // For headings inside relative or absolute positioned containers within content\n hasInnerContainers: false,\n // Main class to add to links.\n linkClass: 'toc-link',\n // Extra classes to add to links.\n extraLinkClasses: '',\n // Class to add to active links,\n // the link corresponding to the top most heading on the page.\n activeLinkClass: 'is-active-link',\n // Main class to add to lists.\n listClass: 'toc-list',\n // Extra classes to add to lists.\n extraListClasses: '',\n // Class that gets added when a list should be collapsed.\n isCollapsedClass: 'is-collapsed',\n // Class that gets added when a list should be able\n // to be collapsed but isn't necessarily collapsed.\n collapsibleClass: 'is-collapsible',\n // Class to add to list items.\n listItemClass: 'toc-list-item',\n // Class to add to active list items.\n activeListItemClass: 'is-active-li',\n // How many heading levels should not be collapsed.\n // For example, number 6 will show everything since\n // there are only 6 heading levels and number 0 will collapse them all.\n // The sections that are hidden will open\n // and close as you scroll to headings within them.\n collapseDepth: 0,\n // Smooth scrolling enabled.\n scrollSmooth: true,\n // Smooth scroll duration.\n scrollSmoothDuration: 420,\n // Smooth scroll offset.\n scrollSmoothOffset: 0,\n // Callback for scroll end.\n scrollEndCallback: function (e) {},\n // Headings offset between the headings and the top of the document (this is meant for minor adjustments).\n headingsOffset: 1,\n // Timeout between events firing to make sure it's\n // not too rapid (for performance reasons).\n throttleTimeout: 50,\n // Element to add the positionFixedClass to.\n positionFixedSelector: null,\n // Fixed position class to add to make sidebar fixed after scrolling\n // down past the fixedSidebarOffset.\n positionFixedClass: 'is-position-fixed',\n // fixedSidebarOffset can be any number but by default is set\n // to auto which sets the fixedSidebarOffset to the sidebar\n // element's offsetTop from the top of the document on init.\n fixedSidebarOffset: 'auto',\n // includeHtml can be set to true to include the HTML markup from the\n // heading node instead of just including the textContent.\n includeHtml: false,\n // includeTitleTags automatically sets the html title tag of the link\n // to match the title. This can be useful for SEO purposes or\n // when truncating titles.\n includeTitleTags: false,\n // onclick function to apply to all links in toc. will be called with\n // the event as the first parameter, and this can be used to stop,\n // propagation, prevent default or perform action\n onClick: function (e) {},\n // orderedList can be set to false to generate unordered lists (ul)\n // instead of ordered lists (ol)\n orderedList: true,\n // If there is a fixed article scroll container, set to calculate titles' offset\n scrollContainer: null,\n // prevent ToC DOM rendering if it's already rendered by an external system\n skipRendering: false,\n // Optional callback to change heading labels.\n // For example it can be used to cut down and put ellipses on multiline headings you deem too long.\n // Called each time a heading is parsed. Expects a string and returns the modified label to display.\n // Additionally, the attribute `data-heading-label` may be used on a heading to specify\n // a shorter string to be used in the TOC.\n // function (string) => string\n headingLabelCallback: false,\n // ignore headings that are hidden in DOM\n ignoreHiddenElements: false,\n // Optional callback to modify properties of parsed headings.\n // The heading element is passed in node parameter and information parsed by default parser is provided in obj parameter.\n // Function has to return the same or modified obj.\n // The heading will be excluded from TOC if nothing is returned.\n // function (object, HTMLElement) => object | void\n headingObjectCallback: null,\n // Set the base path, useful if you use a `base` tag in `head`.\n basePath: '',\n // Only takes affect when `tocSelector` is scrolling,\n // keep the toc scroll position in sync with the content.\n disableTocScrollSync: false\n}\n","/* eslint no-var: off */\n/**\n * Tocbot\n * Tocbot creates a toble of contents based on HTML headings on a page,\n * this allows users to easily jump to different sections of the document.\n * Tocbot was inspired by tocify (http://gregfranko.com/jquery.tocify.js/).\n * The main differences are that it works natively without any need for jquery or jquery UI).\n *\n * @author Tim Scanlin\n */\n\n/* globals define */\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory(root))\n } else if (typeof exports === 'object') {\n module.exports = factory(root)\n } else {\n root.tocbot = factory(root)\n }\n})(typeof global !== 'undefined' ? global : this.window || this.global, function (root) {\n 'use strict'\n\n // Default options.\n var defaultOptions = require('./default-options.js')\n // Object to store current options.\n var options = {}\n // Object for public APIs.\n var tocbot = {}\n\n var BuildHtml = require('./build-html.js')\n var ParseContent = require('./parse-content.js')\n var updateTocScroll = require('./update-toc-scroll.js')\n // Keep these variables at top scope once options are passed in.\n var buildHtml\n var parseContent\n\n // Just return if its not a browser.\n var supports = !!root && !!root.document && !!root.document.querySelector && !!root.addEventListener // Feature test\n if (typeof window === 'undefined' && !supports) {\n return\n }\n var headingsArray\n\n // From: https://github.com/Raynos/xtend\n var hasOwnProperty = Object.prototype.hasOwnProperty\n function extend () {\n var target = {}\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n return target\n }\n\n // From: https://remysharp.com/2010/07/21/throttling-function-calls\n function throttle (fn, threshhold, scope) {\n threshhold || (threshhold = 250)\n var last\n var deferTimer\n return function () {\n var context = scope || this\n var now = +new Date()\n var args = arguments\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer)\n deferTimer = setTimeout(function () {\n last = now\n fn.apply(context, args)\n }, threshhold)\n } else {\n last = now\n fn.apply(context, args)\n }\n }\n }\n\n function getContentElement (options) {\n try {\n return options.contentElement || document.querySelector(options.contentSelector)\n } catch (e) {\n console.warn('Contents element not found: ' + options.contentSelector) // eslint-disable-line\n return null\n }\n }\n\n function getTocElement (options) {\n try {\n return options.tocElement || document.querySelector(options.tocSelector)\n } catch (e) {\n console.warn('TOC element not found: ' + options.tocSelector) // eslint-disable-line\n return null\n }\n }\n\n /**\n * Destroy tocbot.\n */\n tocbot.destroy = function () {\n var tocElement = getTocElement(options)\n if (tocElement === null) {\n return\n }\n\n if (!options.skipRendering) {\n // Clear HTML.\n if (tocElement) {\n tocElement.innerHTML = ''\n }\n }\n\n // Remove event listeners.\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).removeEventListener('scroll', this._scrollListener, false)\n document.querySelector(options.scrollContainer).removeEventListener('resize', this._scrollListener, false)\n if (buildHtml) {\n document.querySelector(options.scrollContainer).removeEventListener('click', this._clickListener, false)\n }\n } else {\n document.removeEventListener('scroll', this._scrollListener, false)\n document.removeEventListener('resize', this._scrollListener, false)\n if (buildHtml) {\n document.removeEventListener('click', this._clickListener, false)\n }\n }\n }\n\n /**\n * Initialize tocbot.\n * @param {object} customOptions\n */\n tocbot.init = function (customOptions) {\n // feature test\n if (!supports) {\n return\n }\n\n // Merge defaults with user options.\n // Set to options variable at the top.\n options = extend(defaultOptions, customOptions || {})\n this.options = options\n this.state = {}\n\n // Init smooth scroll if enabled (default).\n if (options.scrollSmooth) {\n options.duration = options.scrollSmoothDuration\n options.offset = options.scrollSmoothOffset\n tocbot.scrollSmooth = require('./scroll-smooth').initSmoothScrolling(options)\n }\n\n // Pass options to these modules.\n buildHtml = BuildHtml(options)\n parseContent = ParseContent(options)\n\n // For testing purposes.\n this._buildHtml = buildHtml\n this._parseContent = parseContent\n this._headingsArray = headingsArray\n\n // Destroy it if it exists first.\n tocbot.destroy()\n\n var contentElement = getContentElement(options)\n if (contentElement === null) {\n return\n }\n\n var tocElement = getTocElement(options)\n if (tocElement === null) {\n return\n }\n\n // Get headings array.\n headingsArray = parseContent.selectHeadings(contentElement, options.headingSelector)\n // Return if no headings are found.\n if (headingsArray === null) {\n return\n }\n\n // Build nested headings array.\n var nestedHeadingsObj = parseContent.nestHeadingsArray(headingsArray)\n var nestedHeadings = nestedHeadingsObj.nest\n\n // Render.\n if (!options.skipRendering) {\n buildHtml.render(tocElement, nestedHeadings)\n }\n\n // Update Sidebar and bind listeners.\n this._scrollListener = throttle(function (e) {\n buildHtml.updateToc(headingsArray)\n !options.disableTocScrollSync && updateTocScroll(options)\n var isTop = e && e.target && e.target.scrollingElement && e.target.scrollingElement.scrollTop === 0\n if ((e && (e.eventPhase === 0 || e.currentTarget === null)) || isTop) {\n buildHtml.updateToc(headingsArray)\n if (options.scrollEndCallback) {\n options.scrollEndCallback(e)\n }\n }\n }, options.throttleTimeout)\n this._scrollListener()\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).addEventListener('scroll', this._scrollListener, false)\n document.querySelector(options.scrollContainer).addEventListener('resize', this._scrollListener, false)\n } else {\n document.addEventListener('scroll', this._scrollListener, false)\n document.addEventListener('resize', this._scrollListener, false)\n }\n\n // Bind click listeners to disable animation.\n var timeout = null\n this._clickListener = throttle(function (event) {\n if (options.scrollSmooth) {\n buildHtml.disableTocAnimation(event)\n }\n buildHtml.updateToc(headingsArray)\n // Timeout to re-enable the animation.\n timeout && clearTimeout(timeout)\n timeout = setTimeout(function () {\n buildHtml.enableTocAnimation()\n }, options.scrollSmoothDuration)\n }, options.throttleTimeout)\n\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).addEventListener('click', this._clickListener, false)\n } else {\n document.addEventListener('click', this._clickListener, false)\n }\n\n return this\n }\n\n /**\n * Refresh tocbot.\n */\n tocbot.refresh = function (customOptions) {\n tocbot.destroy()\n tocbot.init(customOptions || this.options)\n }\n\n // Make tocbot available globally.\n root.tocbot = tocbot\n\n return tocbot\n})\n","/* eslint no-var: off */\n/**\n * This file is responsible for parsing the content from the DOM and making\n * sure data is nested properly.\n *\n * @author Tim Scanlin\n */\n\nmodule.exports = function parseContent (options) {\n var reduce = [].reduce\n\n /**\n * Get the last item in an array and return a reference to it.\n * @param {Array} array\n * @return {Object}\n */\n function getLastItem (array) {\n return array[array.length - 1]\n }\n\n /**\n * Get heading level for a heading dom node.\n * @param {HTMLElement} heading\n * @return {Number}\n */\n function getHeadingLevel (heading) {\n return +heading.nodeName.toUpperCase().replace('H', '')\n }\n\n /**\n * Get important properties from a heading element and store in a plain object.\n * @param {HTMLElement} heading\n * @return {Object}\n */\n function getHeadingObject (heading) {\n // each node is processed twice by this method because nestHeadingsArray() and addNode() calls it\n // first time heading is real DOM node element, second time it is obj\n // that is causing problem so I am processing only original DOM node\n if (!(heading instanceof window.HTMLElement)) return heading\n\n if (options.ignoreHiddenElements && (!heading.offsetHeight || !heading.offsetParent)) {\n return null\n }\n\n const headingLabel = heading.getAttribute('data-heading-label') ||\n (options.headingLabelCallback ? String(options.headingLabelCallback(heading.textContent)) : heading.textContent.trim())\n var obj = {\n id: heading.id,\n children: [],\n nodeName: heading.nodeName,\n headingLevel: getHeadingLevel(heading),\n textContent: headingLabel\n }\n\n if (options.includeHtml) {\n obj.childNodes = heading.childNodes\n }\n\n if (options.headingObjectCallback) {\n return options.headingObjectCallback(obj, heading)\n }\n\n return obj\n }\n\n /**\n * Add a node to the nested array.\n * @param {Object} node\n * @param {Array} nest\n * @return {Array}\n */\n function addNode (node, nest) {\n var obj = getHeadingObject(node)\n var level = obj.headingLevel\n var array = nest\n var lastItem = getLastItem(array)\n var lastItemLevel = lastItem\n ? lastItem.headingLevel\n : 0\n var counter = level - lastItemLevel\n\n while (counter > 0) {\n lastItem = getLastItem(array)\n // Handle case where there are multiple h5+ in a row.\n if (lastItem && level === lastItem.headingLevel) {\n break\n } else if (lastItem && lastItem.children !== undefined) {\n array = lastItem.children\n }\n counter--\n }\n\n if (level >= options.collapseDepth) {\n obj.isCollapsed = true\n }\n\n array.push(obj)\n return array\n }\n\n /**\n * Select headings in content area, exclude any selector in options.ignoreSelector\n * @param {HTMLElement} contentElement\n * @param {Array} headingSelector\n * @return {Array}\n */\n function selectHeadings (contentElement, headingSelector) {\n var selectors = headingSelector\n if (options.ignoreSelector) {\n selectors = headingSelector.split(',')\n .map(function mapSelectors (selector) {\n return selector.trim() + ':not(' + options.ignoreSelector + ')'\n })\n }\n try {\n return contentElement.querySelectorAll(selectors)\n } catch (e) {\n console.warn('Headers not found with selector: ' + selectors); // eslint-disable-line\n return null\n }\n }\n\n /**\n * Nest headings array into nested arrays with 'children' property.\n * @param {Array} headingsArray\n * @return {Object}\n */\n function nestHeadingsArray (headingsArray) {\n return reduce.call(headingsArray, function reducer (prev, curr) {\n var currentHeading = getHeadingObject(curr)\n if (currentHeading) {\n addNode(currentHeading, prev.nest)\n }\n return prev\n }, {\n nest: []\n })\n }\n\n return {\n nestHeadingsArray: nestHeadingsArray,\n selectHeadings: selectHeadings\n }\n}\n","/* eslint no-var: off */\n/* globals location, requestAnimationFrame */\n\nexports.initSmoothScrolling = initSmoothScrolling\n\nfunction initSmoothScrolling (options) {\n // if (isCssSmoothSCrollSupported()) { return }\n\n var duration = options.duration\n var offset = options.offset\n\n var pageUrl = location.hash\n ? stripHash(location.href)\n : location.href\n\n delegatedLinkHijacking()\n\n function delegatedLinkHijacking () {\n document.body.addEventListener('click', onClick, false)\n\n function onClick (e) {\n if (\n !isInPageLink(e.target) ||\n e.target.className.indexOf('no-smooth-scroll') > -1 ||\n (e.target.href.charAt(e.target.href.length - 2) === '#' &&\n e.target.href.charAt(e.target.href.length - 1) === '!') ||\n e.target.className.indexOf(options.linkClass) === -1) {\n return\n }\n\n // Don't prevent default or hash doesn't change.\n // e.preventDefault()\n\n jump(e.target.hash, {\n duration: duration,\n offset: offset,\n callback: function () {\n setFocus(e.target.hash)\n }\n })\n }\n }\n\n function isInPageLink (n) {\n return n.tagName.toLowerCase() === 'a' &&\n (n.hash.length > 0 || n.href.charAt(n.href.length - 1) === '#') &&\n (stripHash(n.href) === pageUrl || stripHash(n.href) + '#' === pageUrl)\n }\n\n function stripHash (url) {\n return url.slice(0, url.lastIndexOf('#'))\n }\n\n // function isCssSmoothSCrollSupported () {\n // return 'scrollBehavior' in document.documentElement.style\n // }\n\n // Adapted from:\n // https://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/\n function setFocus (hash) {\n var element = document.getElementById(hash.substring(1))\n\n if (element) {\n if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {\n element.tabIndex = -1\n }\n\n element.focus()\n }\n }\n}\n\nfunction jump (target, options) {\n var start = window.pageYOffset\n var opt = {\n duration: options.duration,\n offset: options.offset || 0,\n callback: options.callback,\n easing: options.easing || easeInOutQuad\n }\n // This makes ids that start with a number work: ('[id=\"' + decodeURI(target).split('#').join('') + '\"]')\n // DecodeURI for nonASCII hashes, they was encoded, but id was not encoded, it lead to not finding the tgt element by id.\n // And this is for IE: document.body.scrollTop\n // Handle decoded and non-decoded URIs since sometimes URLs automatically transform them (support for internation chars).\n var tgt = document.querySelector('[id=\"' + decodeURI(target).split('#').join('') + '\"]') ||\n document.querySelector('[id=\"' + (target).split('#').join('') + '\"]')\n var distance = typeof target === 'string'\n ? opt.offset + (\n target\n ? (tgt && tgt.getBoundingClientRect().top) || 0 // handle non-existent links better.\n : -(document.documentElement.scrollTop || document.body.scrollTop))\n : target\n var duration = typeof opt.duration === 'function'\n ? opt.duration(distance)\n : opt.duration\n var timeStart\n var timeElapsed\n\n requestAnimationFrame(function (time) { timeStart = time; loop(time) })\n function loop (time) {\n timeElapsed = time - timeStart\n\n window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration))\n\n if (timeElapsed < duration) { requestAnimationFrame(loop) } else { end() }\n }\n\n function end () {\n window.scrollTo(0, start + distance)\n\n if (typeof opt.callback === 'function') { opt.callback() }\n }\n\n // Robert Penner's easeInOutQuad - http://robertpenner.com/easing/\n function easeInOutQuad (t, b, c, d) {\n t /= d / 2\n if (t < 1) return c / 2 * t * t + b\n t--\n return -c / 2 * (t * (t - 2) - 1) + b\n }\n}\n","/* eslint no-var: off */\n\nmodule.exports = function updateTocScroll (options) {\n var toc = options.tocElement || document.querySelector(options.tocSelector)\n if (toc && toc.scrollHeight > toc.clientHeight) {\n var activeItem = toc.querySelector('.' + options.activeListItemClass)\n if (activeItem) {\n toc.scrollTop = activeItem.offsetTop\n }\n }\n}\n"],"names":["module","exports","options","tocElement","forEach","some","body","document","currentlyHighlighting","SPACE_CHAR","createEl","d","container","link","appendChild","data","item","createElement","a","listItemClass","setAttribute","onClick","onclick","includeTitleTags","textContent","includeHtml","childNodes","length","call","node","cloneNode","basePath","id","linkClass","nodeName","extraLinkClasses","createLink","children","list","createList","isCollapsed","child","listElement","classes","listClass","extraListClasses","collapsibleClass","isCollapsedClass","getHeadingTopPos","obj","position","offsetTop","hasInnerContainers","offsetParent","removeCollapsedFromParents","element","className","indexOf","split","join","parentNode","enableTocAnimation","disableTocAnimation","event","target","srcElement","render","parent","firstChild","removeChild","updateToc","headingsArray","top","scrollContainer","querySelector","scrollTop","documentElement","positionFixedSelector","posFixedEl","fixedSidebarOffset","positionFixedClass","updateFixedSidebarClass","topHeader","headings","heading","i","headingsOffset","tocLinks","querySelectorAll","tocLink","activeLinkClass","tocLis","tocLi","activeListItemClass","activeTocLink","replace","li","tocLists","nextSibling","tocSelector","contentSelector","headingSelector","ignoreSelector","collapseDepth","scrollSmooth","scrollSmoothDuration","scrollSmoothOffset","scrollEndCallback","e","throttleTimeout","orderedList","skipRendering","headingLabelCallback","ignoreHiddenElements","headingObjectCallback","disableTocScrollSync","root","g","this","window","global","buildHtml","parseContent","defaultOptions","tocbot","BuildHtml","ParseContent","updateTocScroll","supports","addEventListener","hasOwnProperty","Object","prototype","destroy","getTocElement","innerHTML","removeEventListener","_scrollListener","_clickListener","init","customOptions","extend","state","duration","offset","_buildHtml","_parseContent","_headingsArray","contentElement","getContentElement","selectHeadings","nestedHeadings","nestHeadingsArray","nest","throttle","isTop","scrollingElement","eventPhase","currentTarget","timeout","clearTimeout","setTimeout","refresh","arguments","source","key","fn","threshhold","scope","last","deferTimer","context","now","Date","args","apply","console","warn","reduce","getLastItem","array","getHeadingLevel","toUpperCase","getHeadingObject","HTMLElement","offsetHeight","headingLabel","getAttribute","String","trim","headingLevel","prev","curr","currentHeading","level","lastItem","counter","undefined","push","addNode","selectors","map","selector","initSmoothScrolling","pageUrl","location","hash","stripHash","href","url","slice","lastIndexOf","n","tagName","toLowerCase","charAt","timeStart","timeElapsed","start","pageYOffset","opt","callback","easing","easeInOutQuad","tgt","decodeURI","distance","getBoundingClientRect","loop","time","scrollTo","requestAnimationFrame","end","t","b","c","jump","getElementById","substring","test","tabIndex","focus","toc","scrollHeight","clientHeight","activeItem"],"sourceRoot":""}