/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// identity function for calling harmony imports with the correct context
/******/ 	__webpack_require__.i = function(value) { return value; };
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 5);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/* unknown exports provided */
/* all exports used */
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/***/ (function(module, exports) {

eval("var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8od2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanM/MzY5OCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZztcclxuXHJcbi8vIFRoaXMgd29ya3MgaW4gbm9uLXN0cmljdCBtb2RlXHJcbmcgPSAoZnVuY3Rpb24oKSB7XHJcblx0cmV0dXJuIHRoaXM7XHJcbn0pKCk7XHJcblxyXG50cnkge1xyXG5cdC8vIFRoaXMgd29ya3MgaWYgZXZhbCBpcyBhbGxvd2VkIChzZWUgQ1NQKVxyXG5cdGcgPSBnIHx8IEZ1bmN0aW9uKFwicmV0dXJuIHRoaXNcIikoKSB8fCAoMSxldmFsKShcInRoaXNcIik7XHJcbn0gY2F0Y2goZSkge1xyXG5cdC8vIFRoaXMgd29ya3MgaWYgdGhlIHdpbmRvdyByZWZlcmVuY2UgaXMgYXZhaWxhYmxlXHJcblx0aWYodHlwZW9mIHdpbmRvdyA9PT0gXCJvYmplY3RcIilcclxuXHRcdGcgPSB3aW5kb3c7XHJcbn1cclxuXHJcbi8vIGcgY2FuIHN0aWxsIGJlIHVuZGVmaW5lZCwgYnV0IG5vdGhpbmcgdG8gZG8gYWJvdXQgaXQuLi5cclxuLy8gV2UgcmV0dXJuIHVuZGVmaW5lZCwgaW5zdGVhZCBvZiBub3RoaW5nIGhlcmUsIHNvIGl0J3NcclxuLy8gZWFzaWVyIHRvIGhhbmRsZSB0aGlzIGNhc2UuIGlmKCFnbG9iYWwpIHsgLi4ufVxyXG5cclxubW9kdWxlLmV4cG9ydHMgPSBnO1xyXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAod2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9");

/***/ }),
/* 1 */
/* unknown exports provided */
/* all exports used */
/*!**********************************!*\
  !*** ./~/zenscroll/zenscroll.js ***!
  \**********************************/
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\n * Zenscroll 4.0.0\n * https://github.com/zengabor/zenscroll/\n *\n * Copyright 2015–2017 Gabor Lenard\n *\n * This is free and unencumbered software released into the public domain.\n * \n * Anyone is free to copy, modify, publish, use, compile, sell, or\n * distribute this software, either in source code form or as a compiled\n * binary, for any purpose, commercial or non-commercial, and by any\n * means.\n * \n * In jurisdictions that recognize copyright laws, the author or authors\n * of this software dedicate any and all copyright interest in the\n * software to the public domain. We make this dedication for the benefit\n * of the public at large and to the detriment of our heirs and\n * successors. We intend this dedication to be an overt act of\n * relinquishment in perpetuity of all present and future rights to this\n * software under copyright law.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n * \n * For more information, please refer to <https://unlicense.org>\n * \n */\n\n/*jshint devel:true, asi:true */\n\n/*global define, module */\n\n\n(function (root, factory) {\n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory()),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))\n\t} else if (typeof module === \"object\" && module.exports) {\n\t\tmodule.exports = factory()\n\t} else {\n\t\t(function install() {\n\t\t\t// To make sure Zenscroll can be referenced from the header, before `body` is available\n\t\t\tif (document && document.body) {\n\t\t\t\troot.zenscroll = factory()\n\t\t\t} else {\n\t\t\t\t// retry 9ms later\n\t\t\t\tsetTimeout(install, 9)\n\t\t\t}\n\t\t})()\n\t}\n}(this, function () {\n\t\"use strict\"\n\n\n\t// Detect if the browser already supports native smooth scrolling (e.g., Firefox 36+ and Chrome 49+) and it is enabled:\n\tvar isNativeSmoothScrollEnabledOn = function (elem) {\n\t\treturn (\"getComputedStyle\" in window) &&\n\t\t\twindow.getComputedStyle(elem)[\"scroll-behavior\"] === \"smooth\"\n\t}\n\n\n\t// Exit if it’s not a browser environment:\n\tif (typeof window === \"undefined\" || !(\"document\" in window)) {\n\t\treturn {}\n\t}\n\n\n\tvar makeScroller = function (container, defaultDuration, edgeOffset) {\n\n\t\t// Use defaults if not provided\n\t\tdefaultDuration = defaultDuration || 999 //ms\n\t\tif (!edgeOffset && edgeOffset !== 0) {\n\t\t\t// When scrolling, this amount of distance is kept from the edges of the container:\n\t\t\tedgeOffset = 9 //px\n\t\t}\n\n\t\t// Handling the life-cycle of the scroller\n\t\tvar scrollTimeoutId\n\t\tvar setScrollTimeoutId = function (newValue) {\n\t\t\tscrollTimeoutId = newValue\n\t\t}\n\n\t\t/**\n\t\t * Stop the current smooth scroll operation immediately\n\t\t */\n\t\tvar stopScroll = function () {\n\t\t\tclearTimeout(scrollTimeoutId)\n\t\t\tsetScrollTimeoutId(0)\n\t\t}\n\n\t\tvar getTopWithEdgeOffset = function (elem) {\n\t\t\treturn Math.max(0, container.getTopOf(elem) - edgeOffset)\n\t\t}\n\n\t\t/**\n\t\t * Scrolls to a specific vertical position in the document.\n\t\t *\n\t\t * @param {targetY} The vertical position within the document.\n\t\t * @param {duration} Optionally the duration of the scroll operation.\n\t\t *        If not provided the default duration is used.\n\t\t * @param {onDone} An optional callback function to be invoked once the scroll finished.\n\t\t */\n\t\tvar scrollToY = function (targetY, duration, onDone) {\n\t\t\tstopScroll()\n\t\t\tif (duration === 0 || (duration && duration < 0) || isNativeSmoothScrollEnabledOn(container.body)) {\n\t\t\t\tcontainer.toY(targetY)\n\t\t\t\tif (onDone) {\n\t\t\t\t\tonDone()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar startY = container.getY()\n\t\t\t\tvar distance = Math.max(0, targetY) - startY\n\t\t\t\tvar startTime = new Date().getTime()\n\t\t\t\tduration = duration || Math.min(Math.abs(distance), defaultDuration);\n\t\t\t\t(function loopScroll() {\n\t\t\t\t\tsetScrollTimeoutId(setTimeout(function () {\n\t\t\t\t\t\t// Calculate percentage:\n\t\t\t\t\t\tvar p = Math.min(1, (new Date().getTime() - startTime) / duration)\n\t\t\t\t\t\t// Calculate the absolute vertical position:\n\t\t\t\t\t\tvar y = Math.max(0, Math.floor(startY + distance*(p < 0.5 ? 2*p*p : p*(4 - p*2)-1)))\n\t\t\t\t\t\tcontainer.toY(y)\n\t\t\t\t\t\tif (p < 1 && (container.getHeight() + y) < container.body.scrollHeight) {\n\t\t\t\t\t\t\tloopScroll()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetTimeout(stopScroll, 99) // with cooldown time\n\t\t\t\t\t\t\tif (onDone) {\n\t\t\t\t\t\t\t\tonDone()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 9))\n\t\t\t\t})()\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Scrolls to the top of a specific element.\n\t\t *\n\t\t * @param {elem} The element to scroll to.\n\t\t * @param {duration} Optionally the duration of the scroll operation.\n\t\t * @param {onDone} An optional callback function to be invoked once the scroll finished.\n\t\t */\n\t\tvar scrollToElem = function (elem, duration, onDone) {\n\t\t\tscrollToY(getTopWithEdgeOffset(elem), duration, onDone)\n\t\t}\n\n\t\t/**\n\t\t * Scrolls an element into view if necessary.\n\t\t *\n\t\t * @param {elem} The element.\n\t\t * @param {duration} Optionally the duration of the scroll operation.\n\t\t * @param {onDone} An optional callback function to be invoked once the scroll finished.\n\t\t */\n\t\tvar scrollIntoView = function (elem, duration, onDone) {\n\t\t\tvar elemHeight = elem.getBoundingClientRect().height\n\t\t\tvar elemBottom = container.getTopOf(elem) + elemHeight\n\t\t\tvar containerHeight = container.getHeight()\n\t\t\tvar y = container.getY()\n\t\t\tvar containerBottom = y + containerHeight\n\t\t\tif (getTopWithEdgeOffset(elem) < y || (elemHeight + edgeOffset) > containerHeight) {\n\t\t\t\t// Element is clipped at top or is higher than screen.\n\t\t\t\tscrollToElem(elem, duration, onDone)\n\t\t\t} else if ((elemBottom + edgeOffset) > containerBottom) {\n\t\t\t\t// Element is clipped at the bottom.\n\t\t\t\tscrollToY(elemBottom - containerHeight + edgeOffset, duration, onDone)\n\t\t\t} else if (onDone) {\n\t\t\t\tonDone()\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Scrolls to the center of an element.\n\t\t *\n\t\t * @param {elem} The element.\n\t\t * @param {duration} Optionally the duration of the scroll operation.\n\t\t * @param {offset} Optionally the offset of the top of the element from the center of the screen.\n\t\t * @param {onDone} An optional callback function to be invoked once the scroll finished.\n\t\t */\n\t\tvar scrollToCenterOf = function (elem, duration, offset, onDone) {\n\t\t\tscrollToY(Math.max(0, container.getTopOf(elem) - container.getHeight()/2 + (offset || elem.getBoundingClientRect().height/2)), duration, onDone)\n\t\t}\n\n\t\t/**\n\t\t * Changes default settings for this scroller.\n\t\t *\n\t\t * @param {newDefaultDuration} Optionally a new value for default duration, used for each scroll method by default.\n\t\t *        Ignored if null or undefined.\n\t\t * @param {newEdgeOffset} Optionally a new value for the edge offset, used by each scroll method by default. Ignored if null or undefined.\n\t\t * @returns An object with the current values.\n\t\t */\n\t\tvar setup = function (newDefaultDuration, newEdgeOffset) {\n\t\t\tif (newDefaultDuration === 0 || newDefaultDuration) {\n\t\t\t\tdefaultDuration = newDefaultDuration\n\t\t\t}\n\t\t\tif (newEdgeOffset === 0 || newEdgeOffset) {\n\t\t\t\tedgeOffset = newEdgeOffset\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tdefaultDuration: defaultDuration,\n\t\t\t\tedgeOffset: edgeOffset\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tsetup: setup,\n\t\t\tto: scrollToElem,\n\t\t\ttoY: scrollToY,\n\t\t\tintoView: scrollIntoView,\n\t\t\tcenter: scrollToCenterOf,\n\t\t\tstop: stopScroll,\n\t\t\tmoving: function () { return !!scrollTimeoutId },\n\t\t\tgetY: container.getY,\n\t\t\tgetTopOf: container.getTopOf\n\t\t}\n\n\t}\n\n\n\tvar docElem = document.documentElement\n\tvar getDocY = function () { return window.scrollY || docElem.scrollTop }\n\n\t// Create a scroller for the document:\n\tvar zenscroll = makeScroller({\n\t\tbody: document.scrollingElement || document.body,\n\t\ttoY: function (y) { window.scrollTo(0, y) },\n\t\tgetY: getDocY,\n\t\tgetHeight: function () { return window.innerHeight || docElem.clientHeight },\n\t\tgetTopOf: function (elem) { return elem.getBoundingClientRect().top + getDocY() - docElem.offsetTop }\n\t})\n\n\n\t/**\n\t * Creates a scroller from the provided container element (e.g., a DIV)\n\t *\n\t * @param {scrollContainer} The vertical position within the document.\n\t * @param {defaultDuration} Optionally a value for default duration, used for each scroll method by default.\n\t *        Ignored if 0 or null or undefined.\n\t * @param {edgeOffset} Optionally a value for the edge offset, used by each scroll method by default. \n\t *        Ignored if null or undefined.\n\t * @returns A scroller object, similar to `zenscroll` but controlling the provided element.\n\t */\n\tzenscroll.createScroller = function (scrollContainer, defaultDuration, edgeOffset) {\n\t\treturn makeScroller({\n\t\t\tbody: scrollContainer,\n\t\t\ttoY: function (y) { scrollContainer.scrollTop = y },\n\t\t\tgetY: function () { return scrollContainer.scrollTop },\n\t\t\tgetHeight: function () { return Math.min(scrollContainer.clientHeight, window.innerHeight || docElem.clientHeight) },\n\t\t\tgetTopOf: function (elem) { return elem.offsetTop }\n\t\t}, defaultDuration, edgeOffset)\n\t}\n\n\n\t// Automatic link-smoothing on achors\n\t// Exclude IE8- or when native is enabled or Zenscroll auto- is disabled\n\tif (\"addEventListener\" in window && !window.noZensmooth && !isNativeSmoothScrollEnabledOn(document.body)) {\n\n\n\t\tvar isScrollRestorationSupported = \"scrollRestoration\" in history\n\n\t\t// On first load & refresh make sure the browser restores the position first\n\t\tif (isScrollRestorationSupported) {\n\t\t\thistory.scrollRestoration = \"auto\"\n\t\t}\n\n\t\twindow.addEventListener(\"load\", function () {\n\n\t\t\tif (isScrollRestorationSupported) {\n\t\t\t\t// Set it to manual\n\t\t\t\tsetTimeout(function () { history.scrollRestoration = \"manual\" }, 9)\n\t\t\t\twindow.addEventListener(\"popstate\", function (event) {\n\t\t\t\t\tif (event.state && \"zenscrollY\" in event.state) {\n\t\t\t\t\t\tzenscroll.toY(event.state.zenscrollY)\n\t\t\t\t\t}\n\t\t\t\t}, false)\n\t\t\t}\n\n\t\t\t// Add edge offset on first load if necessary\n\t\t\t// This may not work on IE (or older computer?) as it requires more timeout, around 100 ms\n\t\t\tif (window.location.hash) {\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t// Adjustment is only needed if there is an edge offset:\n\t\t\t\t\tvar edgeOffset = zenscroll.setup().edgeOffset\n\t\t\t\t\tif (edgeOffset) {\n\t\t\t\t\t\tvar targetElem = document.getElementById(window.location.href.split(\"#\")[1])\n\t\t\t\t\t\tif (targetElem) {\n\t\t\t\t\t\t\tvar targetY = Math.max(0, zenscroll.getTopOf(targetElem) - edgeOffset)\n\t\t\t\t\t\t\tvar diff = zenscroll.getY() - targetY\n\t\t\t\t\t\t\t// Only do the adjustment if the browser is very close to the element:\n\t\t\t\t\t\t\tif (0 <= diff && diff < 9 ) {\n\t\t\t\t\t\t\t\twindow.scrollTo(0, targetY)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, 9)\n\t\t\t}\n\n\t\t}, false)\n\n\t\t// Handling clicks on anchors\n\t\tvar RE_noZensmooth = new RegExp(\"(^|\\\\s)noZensmooth(\\\\s|$)\")\n\t\twindow.addEventListener(\"click\", function (event) {\n\t\t\tvar anchor = event.target\n\t\t\twhile (anchor && anchor.tagName !== \"A\") {\n\t\t\t\tanchor = anchor.parentNode\n\t\t\t}\n\t\t\t// Let the browser handle the click if it wasn't with the primary button, or with some modifier keys:\n\t\t\tif (!anchor || event.which !== 1 || event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Save the current scrolling position so it can be used for scroll restoration:\n\t\t\tif (isScrollRestorationSupported) {\n\t\t\t\ttry {\n\t\t\t\t\thistory.replaceState({ zenscrollY: zenscroll.getY() }, \"\")\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// Avoid the Chrome Security exception on file protocol, e.g., file://index.html\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Find the referenced ID:\n\t\t\tvar href = anchor.getAttribute(\"href\") || \"\"\n\t\t\tif (href.indexOf(\"#\") === 0 && !RE_noZensmooth.test(anchor.className)) {\n\t\t\t\tvar targetY = 0\n\t\t\t\tvar targetElem = document.getElementById(href.substring(1))\n\t\t\t\tif (href !== \"#\") {\n\t\t\t\t\tif (!targetElem) {\n\t\t\t\t\t\t// Let the browser handle the click if the target ID is not found.\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\ttargetY = zenscroll.getTopOf(targetElem)\n\t\t\t\t}\n\t\t\t\tevent.preventDefault()\n\t\t\t\t// By default trigger the browser's `hashchange` event...\n\t\t\t\tvar onDone = function () { window.location = href }\n\t\t\t\t// ...unless there is an edge offset specified\n\t\t\t\tvar edgeOffset = zenscroll.setup().edgeOffset\n\t\t\t\tif (edgeOffset) {\n\t\t\t\t\ttargetY = Math.max(0, targetY - edgeOffset)\n\t\t\t\t\tonDone = function () { history.pushState(null, \"\", href) }\n\t\t\t\t}\n\t\t\t\tzenscroll.toY(targetY, null, onDone)\n\t\t\t}\n\t\t}, false)\n\n\t}\n\n\n\treturn zenscroll\n\n\n}));\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 20756 characters]");

/***/ }),
/* 2 */
/* unknown exports provided */
/* all exports used */
/*!******************************!*\
  !*** ./src/js/build-html.js ***!
  \******************************/
/***/ (function(module, exports) {

eval("/**\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 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 selector.\n   * @param {String} selector\n   * @param {Array} data\n   * @return {HTMLElement}\n   */\n  function render (selector, data) {\n    var collapsed = false\n    var container = createList(collapsed)\n\n    data.forEach(function (d) {\n      createEl(d, container)\n    })\n\n    var parent = document.querySelector(selector)\n\n    // Return if no parent is found.\n    if (parent === null) {\n      return\n    }\n\n    // Remove existing child if it exists.\n    if (parent.firstChild) {\n      parent.removeChild(parent.firstChild)\n    }\n\n    // Append the Elements that have been created;\n    return parent.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    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', '#' + 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 list = document.createElement('ul')\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    var top = document.documentElement.scrollTop || body.scrollTop\n    var posFixedEl = document.querySelector(options.positionFixedSelector)\n\n    if (options.fixedSidebarOffset === 'auto') {\n      options.fixedSidebarOffset = document.querySelector(options.tocSelector).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   * Update TOC highlighting and collpased groupings.\n   */\n  function updateToc (headingsArray) {\n    var top = document.documentElement.scrollTop || body.scrollTop\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      document.querySelector(options.tocSelector) !== null &&\n      headings.length > 0) {\n      some.call(headings, function (heading, i) {\n        if (heading.offsetTop > 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 = document.querySelector(options.tocSelector)\n        .querySelectorAll('.' + options.linkClass)\n      forEach.call(tocLinks, function (tocLink) {\n        tocLink.className = tocLink.className.split(SPACE_CHAR + options.activeLinkClass).join('')\n      })\n\n      // Add the active class to the active tocLink.\n      var activeTocLink = document.querySelector(options.tocSelector)\n        .querySelector('.' + options.linkClass +\n          '.node-name--' + topHeader.nodeName +\n          '[href=\"#' + topHeader.id + '\"]')\n      activeTocLink.className += SPACE_CHAR + options.activeLinkClass\n\n      var tocLists = document.querySelector(options.tocSelector)\n        .querySelectorAll('.' + options.listClass + '.' + options.collapsibleClass)\n\n      // Collapse the other collapsible lists.\n      forEach.call(tocLists, function (list) {\n        var collapsedClass = SPACE_CHAR + options.isCollapsedClass\n        if (list.className.indexOf(collapsedClass) === -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.nextSibling) {\n        activeTocLink.nextSibling.className = activeTocLink.nextSibling.className.split(SPACE_CHAR + options.isCollapsedClass).join('')\n      }\n      removeCollapsedFromParents(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.className.indexOf(options.collapsibleClass) !== -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//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 11608 characters]");

/***/ }),
/* 3 */
/* unknown exports provided */
/* all exports used */
/*!***********************************!*\
  !*** ./src/js/default-options.js ***!
  \***********************************/
/***/ (function(module, exports) {

eval("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  // 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 collpased.\n  collapsibleClass: 'is-collapsible',\n  // Class to add to list items.\n  listItemClass: 'toc-list-item',\n  // How many heading levels should not be collpased.\n  // For example, number 6 will show everything since\n  // there are only 6 heading levels and number 0 will collpase 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  smoothScroll: true,\n  // Smooth scroll duration.\n  smoothScrollDuration: 420,\n  // Callback for scroll end (requires: smoothScroll).\n  scrollEndCallback: function (e) {},\n  // Headings offset between the headings and the top of the document.\n  headingsOffset: 0,\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}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3NyYy9qcy9kZWZhdWx0LW9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UwgbWFya3VwIGZyb20gdGhlXG4gIC8vIGhlYWRpbmcgbm9kZSBpbnN0ZWFkIG9mIGp1c3QgaW5jbHVkaW5nIHRoZSB0ZXh0Q29udGVudC5cbiAgaW5jbHVkZUh0bWw6IGZhbHNlXG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NyYy9qcy9kZWZhdWx0LW9wdGlvbnMuanNcbi8vIG1vZHVsZSBpZCA9IDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9");

/***/ }),
/* 4 */
/* unknown exports provided */
/* all exports used */
/*!*********************************!*\
  !*** ./src/js/parse-content.js ***!
  \*********************************/
/***/ (function(module, exports) {

eval("/**\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.split('H').join('')\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    var obj = {\n      id: heading.id,\n      children: [],\n      nodeName: heading.nodeName,\n      headingLevel: getHeadingLevel(heading),\n      textContent: heading.textContent.trim()\n    }\n\n    if (options.includeHtml) {\n      obj.childNodes = heading.childNodes\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 = getHeadingLevel(node)\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      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 {String} contentSelector\n   * @param {Array} headingSelector\n   * @return {Array}\n   */\n  function selectHeadings (contentSelector, 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 document.querySelector(contentSelector)\n        .querySelectorAll(selectors)\n    } catch (e) {\n      console.warn('Element not found: ' + contentSelector); // 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\n      addNode(currentHeading, prev.nest)\n      return prev\n    }, {\n      nest: []\n    })\n  }\n\n  return {\n    nestHeadingsArray: nestHeadingsArray,\n    selectHeadings: selectHeadings\n  }\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 5396 characters]");

/***/ }),
/* 5 */
/* unknown exports provided */
/* all exports used */
/*!*************************!*\
  !*** ./src/js/index.js ***!
  \*************************/
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/**\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 (https://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 (true) {\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory(root)),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))\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 = __webpack_require__(/*! ./default-options.js */ 3)\n  // Object to store current options.\n  var options = {}\n  // Object for public APIs.\n  var tocbot = {}\n\n  var BuildHtml = __webpack_require__(/*! ./build-html.js */ 2)\n  var ParseContent = __webpack_require__(/*! ./parse-content.js */ 4)\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  if (typeof window === 'undefined') {\n    return\n  }\n  var supports = !!root.document.querySelector && !!root.addEventListener // Feature test\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  /**\n   * Destroy tocbot.\n   */\n  tocbot.destroy = function () {\n    // Clear HTML.\n    try {\n      document.querySelector(options.tocSelector).innerHTML = ''\n    } catch (e) {\n      console.warn('Element not found: ' + options.tocSelector); // eslint-disable-line\n    }\n\n    // Remove event listeners.\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   * 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.smoothScroll) {\n      tocbot.zenscroll = __webpack_require__(/*! zenscroll */ 1)\n      tocbot.zenscroll.setup(options.smoothScrollDuration)\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\n    // Destroy it if it exists first.\n    tocbot.destroy()\n\n    // Get headings array.\n    headingsArray = parseContent.selectHeadings(options.contentSelector, 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    buildHtml.render(options.tocSelector, nestedHeadings)\n\n    // Update Sidebar and bind listeners.\n    this._scrollListener = throttle(function (e) {\n      buildHtml.updateToc(headingsArray)\n      var isTop = e && e.target && e.target.scrollingElement && e.target.scrollingElement.scrollTop === 0\n      if ((e && e.eventPhase === 0) || isTop) {\n        buildHtml.enableTocAnimation()\n        buildHtml.updateToc(headingsArray)\n        if (options.scrollEndCallback) {\n          options.scrollEndCallback(e)\n        }\n      }\n    }, options.throttleTimeout)\n    this._scrollListener()\n    document.addEventListener('scroll', this._scrollListener, false)\n    document.addEventListener('resize', this._scrollListener, false)\n\n    // Bind click listeners to disable animation.\n    this._clickListener = throttle(function (event) {\n      if (options.smoothScroll) {\n        buildHtml.disableTocAnimation(event)\n      }\n      buildHtml.updateToc(headingsArray)\n    }, options.throttleTimeout)\n    document.addEventListener('click', this._clickListener, false)\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\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../~/webpack/buildin/global.js */ 0)))//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 9028 characters]");

/***/ })
/******/ ]);