mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
58 lines
54 KiB
JavaScript
58 lines
54 KiB
JavaScript
var Application=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t){"use strict";!function(e){function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return m.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function s(e){var t=new FileReader;return t.readAsArrayBuffer(e),a(t)}function u(e){var t=new FileReader;return t.readAsText(e),a(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(m.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(m.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):m.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},m.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(s)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},m.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function l(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}function f(e,t){t=t||{};var n=t.body;if(f.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=l(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function h(e){var t=new o,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(r)},o.prototype["delete"]=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},c.call(f.prototype),c.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];p.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,r){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=f.prototype.isPrototypeOf(e)&&!t?e:new f(e,t);var a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:h(a),url:o()},t="response"in a?a.response:a.responseText;n(new p(t,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&m.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(3),s=r(a),u=n(5),c=r(u),l=function(){function e(t){o(this,e),this.config_=t}return i(e,[{key:"initialize",value:function(){var e=this;new c["default"].Event.Listener(document,"DOMContentLoaded",function(){Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),s["default"].attach(document.body);var e=document.querySelectorAll("table:not([class])"),t=!0,n=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value,u=document.createElement("div");u.classList.add("md-typeset__table"),a.nextSibling?a.parentNode.insertBefore(u,a.nextSibling):a.parentNode.appendChild(u),u.appendChild(a)}}catch(c){n=!0,r=c}finally{try{!t&&i["return"]&&i["return"]()}finally{if(n)throw r}}}).listen();var t=function(e,t){return document.createEvent?e.dispatchEvent(new Event(t)):e.fireEvent("on"+t,document.createEventObject())},n=function(e,t){var n=t;if(e.length>n){for(;" "!==e[n]&&--n>0;);return e.substring(0,n)+"..."}return e};Modernizr.csscalc||new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener(window,["resize","orientationchange"],new c["default"].Sidebar.Container("[data-md-component=container]"))),new c["default"].Event.MatchMedia("(min-width: 1200px)",new c["default"].Event.Listener(window,["scroll","resize","orientationchange"],new c["default"].Sidebar.Position("[data-md-component=navigation]"))),new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener(window,["scroll","resize","orientationchange"],new c["default"].Sidebar.Position("[data-md-component=toc]"))),new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener(window,"scroll",new c["default"].Nav.Blur("[data-md-component=toc] .md-nav__link")));var r=document.querySelectorAll("[data-md-collapse]"),o=!0,i=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var f=u.value;new c["default"].Event.MatchMedia("(min-width: 1200px)",new c["default"].Event.Listener(f.previousElementSibling,"click",new c["default"].Nav.Collapse(f)))}}catch(d){i=!0,a=d}finally{try{!o&&l["return"]&&l["return"]()}finally{if(i)throw a}}new c["default"].Event.MatchMedia("(max-width: 959px)",new c["default"].Event.Listener("[data-md-toggle=search]","change",new c["default"].Search.Lock("[data-md-toggle=search]"))),new c["default"].Event.Listener(document.forms.search.query,["focus","keyup"],new c["default"].Search.Result("[data-md-component=result]",function(){return fetch(e.config_.url.base+"/mkdocs/search_index.json").then(function(e){return e.json()}).then(function(t){return t.docs.map(function(t){return t.location=e.config_.url.base+t.location,t.text=n(t.text,140),t})})})).listen(),new c["default"].Event.MatchMedia("(max-width: 1199px)",new c["default"].Event.Listener("[data-md-component=overlay]","touchstart",function(e){return e.preventDefault()})),new c["default"].Event.MatchMedia("(max-width: 959px)",new c["default"].Event.Listener("[data-md-component=navigation] [href^='#']","click",function(){var e=document.querySelector("[data-md-toggle=drawer]");e.checked&&(e.checked=!1,t(e,"change"))})),new c["default"].Event.Listener("[data-md-toggle=search]","change",function(e){setTimeout(function(e){var t=document.forms.search.query;e.checked&&t.focus()},400,e.target)}).listen(),new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener(document.forms.search.query,"focus",function(){var e=document.querySelector("[data-md-toggle=search]");e.checked||(e.checked=!0,t(e,"change"))})),new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener(document.body,"click",function(){var e=document.querySelector("[data-md-toggle=search]");e.checked&&(e.checked=!1,t(e,"change"))})),new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener("[data-md-toggle=search]","click",function(e){return e.stopPropagation()})),new c["default"].Event.MatchMedia("(min-width: 960px)",new c["default"].Event.Listener("[data-md-component=search]","click",function(e){return e.stopPropagation()})),function(){var e=document.querySelector("[data-md-source]");if(!e)return Promise.resolve([]);switch(e.dataset.mdSource){case"github":return new c["default"].Source.Adapter.GitHub(e).fetch();default:return Promise.resolve([])}}().then(function(e){var t=document.querySelectorAll("[data-md-source]"),n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value;new c["default"].Source.Repository(s).initialize(e)}}catch(u){r=!0,o=u}finally{try{!n&&a["return"]&&a["return"]()}finally{if(r)throw o}}})}}]),e}();t["default"]=l,e.exports=t["default"]},function(e,t,n){var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){"use strict";/**
|
|
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
|
|
*
|
|
* @codingstandard ftlabs-jsv2
|
|
* @copyright The Financial Times Limited [All Rights Reserved]
|
|
* @license MIT License (see LICENSE.txt)
|
|
*/
|
|
function i(e,t){function n(e,t){return function(){return e.apply(t,arguments)}}var r;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,this.tapTimeout=t.tapTimeout||700,!i.notNeeded(e)){for(var o=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],a=this,u=0,c=o.length;u<c;u++)a[o[u]]=n(a[o[u]],a);s&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,r){var o=Node.prototype.removeEventListener;"click"===t?o.call(e,t,n.hijacked||n,r):o.call(e,t,n,r)},e.addEventListener=function(t,n,r){var o=Node.prototype.addEventListener;"click"===t?o.call(e,t,n.hijacked||(n.hijacked=function(e){e.propagationStopped||n(e)}),r):o.call(e,t,n,r)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(e){r(e)},!1),e.onclick=null)}}var a=navigator.userAgent.indexOf("Windows Phone")>=0,s=navigator.userAgent.indexOf("Android")>0&&!a,u=/iP(ad|hone|od)/.test(navigator.userAgent)&&!a,c=u&&/OS 4_\d(_\d)?/.test(navigator.userAgent),l=u&&/OS [6-7]_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf("BB10")>0;i.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(u&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},i.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!s;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},i.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},i.prototype.determineEventType=function(e){return s&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},i.prototype.focus=function(e){var t;u&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},i.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},i.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},i.prototype.onTouchStart=function(e){var t,n,r;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],u){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!c){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTime<this.tapDelay&&e.preventDefault(),!0},i.prototype.touchHasMoved=function(e){var t=e.changedTouches[0],n=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>n||Math.abs(t.pageY-this.touchStartY)>n},i.prototype.onTouchMove=function(e){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},i.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},i.prototype.onTouchEnd=function(e){var t,n,r,o,i,a=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(e.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,l&&(i=e.changedTouches[0],a=document.elementFromPoint(i.pageX-window.pageXOffset,i.pageY-window.pageYOffset)||a,a.fastClickScrollParent=this.targetElement.fastClickScrollParent),r=a.tagName.toLowerCase(),"label"===r){if(t=this.findControl(a)){if(this.focus(a),s)return!1;a=t}}else if(this.needsFocus(a))return e.timeStamp-n>100||u&&window.top!==window&&"input"===r?(this.targetElement=null,!1):(this.focus(a),this.sendClick(a,e),u&&"select"===r||(this.targetElement=null,e.preventDefault()),!1);return!(!u||c||(o=a.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(a)||(e.preventDefault(),this.sendClick(a,e)),!1)},i.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},i.prototype.onMouse=function(e){return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},i.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},i.prototype.destroy=function(){var e=this.layer;s&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},i.notNeeded=function(e){var t,n,r,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!s)return!0;if(t=document.querySelector("meta[name=viewport]")){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(f&&(r=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),r[1]>=10&&r[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||("none"===e.style.touchAction||"manipulation"===e.style.touchAction))},i.attach=function(e,t){return new i(e,t)},"object"===o(n(4))&&n(4)?(r=function(){return i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))):"undefined"!=typeof e&&e.exports?(e.exports=i.attach,e.exports.FastClick=i):window.FastClick=i}()},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),i=r(o),a=n(9),s=r(a),u=n(12),c=r(u),l=n(17),f=r(l),d=n(20),h=r(d);t["default"]={Event:i["default"],Nav:s["default"],Search:c["default"],Sidebar:f["default"],Source:h["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=r(o),a=n(8),s=r(a);t["default"]={Listener:i["default"],MatchMedia:s["default"]},e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,r,o){var i=this;n(this,e),this.els_="string"==typeof t?document.querySelectorAll(t):[].concat(t),this.handler_="function"==typeof o?{update:o}:o,this.events_=[].concat(r),this.update_=function(e){return i.handler_.update(e)}}return r(e,[{key:"listen",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this.els_[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value,a=!0,s=!1,u=void 0;try{for(var c,l=this.events_[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value;i.addEventListener(f,this.update_,!1)}}catch(d){s=!0,u=d}finally{try{!a&&l["return"]&&l["return"]()}finally{if(s)throw u}}}}catch(d){t=!0,n=d}finally{try{!e&&o["return"]&&o["return"]()}finally{if(t)throw n}}"function"==typeof this.handler_.setup&&this.handler_.setup()}},{key:"unlisten",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this.els_[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value,a=!0,s=!1,u=void 0;try{for(var c,l=this.events_[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var f=c.value;i.removeEventListener(f,this.update_)}}catch(d){s=!0,u=d}finally{try{!a&&l["return"]&&l["return"]()}finally{if(s)throw u}}}}catch(d){t=!0,n=d}finally{try{!e&&o["return"]&&o["return"]()}finally{if(t)throw n}}"function"==typeof this.handler_.reset&&this.handler_.reset()}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function o(e,t){n(this,o),this.handler_=function(e){e.matches?t.listen():t.unlisten()};var r=window.matchMedia(e);r.addListener(this.handler_),this.handler_(r)};t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),i=r(o),a=n(11),s=r(a);t["default"]={Blur:i["default"],Collapse:s["default"]},e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.els_="string"==typeof t?document.querySelectorAll(t):t,this.index_=0,this.offset_=window.pageYOffset,this.anchors_=[].map.call(this.els_,function(e){return document.querySelector(e.hash).offsetTop-80})}return r(e,[{key:"setup",value:function(){this.update()}},{key:"update",value:function(){var e=window.pageYOffset;if(0!==this.anchors_.length){if(this.offset_<=e)for(var t=this.index_+1;t<this.els_.length&&this.anchors_[t]<=e;t++)t>0&&(this.els_[t-1].dataset.mdState="blur"),this.index_=t;else for(var n=this.index_;n>=0;n--){if(!(this.anchors_[n]>e)){this.index_=n;break}n>0&&delete this.els_[n-1].dataset.mdState}this.offset_=e}}},{key:"reset",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this.els_[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;delete i.dataset.mdState}}catch(a){t=!0,n=a}finally{try{!e&&o["return"]&&o["return"]()}finally{if(t)throw n}}this.index_=0,this.offset_=window.pageYOffset}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.el_="string"==typeof t?document.querySelector(t):t}return r(e,[{key:"update",value:function(){var e=this,t=this.el_.getBoundingClientRect().height;t?(this.el_.style.maxHeight=t+"px",requestAnimationFrame(function(){e.el_.dataset.mdState="animate",e.el_.style.maxHeight="0px"})):!function(){e.el_.dataset.mdState="expand",e.el_.style.maxHeight="";var t=e.el_.getBoundingClientRect().height;delete e.el_.dataset.mdState,e.el_.style.maxHeight="0px",requestAnimationFrame(function(){e.el_.dataset.mdState="animate",e.el_.style.maxHeight=t+"px"})}();var n=function r(e){delete e.target.dataset.mdState,e.target.style.maxHeight="",e.target.removeEventListener("transitionend",r,!1)};this.el_.addEventListener("transitionend",n,!1)}},{key:"reset",value:function(){delete this.el_.dataset.mdState,this.el_.style.maxHeight=""}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),i=r(o),a=n(14),s=r(a);t["default"]={Lock:i["default"],Result:s["default"]},e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.el_="string"==typeof t?document.querySelector(t):t}return r(e,[{key:"setup",value:function(){this.update()}},{key:"update",value:function(){var e=this;this.el_.checked?(this.offset_=window.pageYOffset,setTimeout(function(){window.scrollTo(0,0),e.el_.checked&&(document.body.dataset.mdState="lock")},400)):(delete document.body.dataset.mdState,setTimeout(function(){"undefined"!=typeof e.offset_&&window.scrollTo(0,e.offset_)},100))}},{key:"reset",value:function(){document.body.dataset.mdState&&window.scrollTo(0,this.offset_),delete document.body.dataset.mdState}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(16),u=o(s),c=function(){function e(t,n){i(this,e),this.el_="string"==typeof t?document.querySelector(t):t,this.data_=n,this.meta_=r.createElement("div",{"class":"md-search-result__meta"},"Type to start searching"),this.list_=r.createElement("ol",{"class":"md-search-result__list"}),this.el_.appendChild(this.meta_),this.el_.appendChild(this.list_)}return a(e,[{key:"update",value:function(e){var t=this;if("focus"!==e.type||this.index_){if("keyup"===e.type){for(;this.list_.firstChild;)this.list_.removeChild(this.list_.firstChild);var n=this.index_.search(e.target.value),o=!0,i=!1,a=void 0;try{for(var s,c=n[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var l=s.value,f=this.data_[l.ref];this.list_.appendChild(r.createElement("li",{"class":"md-search-result__item"},r.createElement("a",{href:f.location,title:f.title,"class":"md-search-result__link"},r.createElement("article",{"class":"md-search-result__article"},r.createElement("h1",{"class":"md-search-result__title"},f.title),r.createElement("p",{"class":"md-search-result__teaser"},f.text)))))}}catch(d){i=!0,a=d}finally{try{!o&&c["return"]&&c["return"]()}finally{if(i)throw a}}this.meta_.textContent=n.length+" search result"+(1!==n.length?"s":"")}}else!function(){var e=function(e){t.index_=(0,u["default"])(function(){this.field("title",{boost:10}),this.field("text"),this.ref("location")}),t.data_=e.reduce(function(e,n){return t.index_.add(n),e[n.location]=n,e},{})};setTimeout(function(){return"function"==typeof t.data_?t.data_().then(e):e(t.data_)},250)}()}}]),e}();t["default"]=c,e.exports=t["default"]}).call(t,n(15))},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={createElement:function(e,t){var n=document.createElement(e);if(t){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n.setAttribute(u,t[u])}}catch(c){o=!0,i=c}finally{try{!r&&s["return"]&&s["return"]()}finally{if(o)throw i}}}for(var l=function p(e){var t=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var s=i.value;"string"==typeof s||"number"==typeof s?n.textContent+=s:Array.isArray(s)?p(s):n.appendChild(s)}}catch(u){r=!0,o=u}finally{try{!t&&a["return"]&&a["return"]()}finally{if(r)throw o}}},f=arguments.length,d=Array(f>2?f-2:0),h=2;h<f;h++)d[h-2]=arguments[h];return l(d),n}},e.exports=t["default"]},function(e,t,n){var r,o;"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){var i=function a(e){var t=new a.Index;return t.pipeline.add(a.trimmer,a.stopWordFilter,a.stemmer),e&&e.call(t,t),t};i.version="0.7.1",/*!
|
|
* lunr.utils
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.utils={},i.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),i.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},/*!
|
|
* lunr.EventEmitter
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.EventEmitter=function(){this.events={}},i.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},i.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);this.events[e].splice(n,1),this.events[e].length||delete this.events[e]}},i.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)})}},i.EventEmitter.prototype.hasHandler=function(e){return e in this.events},/*!
|
|
* lunr.tokenizer
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return i.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(i.tokenizer.seperator):[]},i.tokenizer.seperator=/[\s\-]+/,i.tokenizer.load=function(e){var t=this.registeredFunctions[e];if(!t)throw new Error("Cannot load un-registered function: "+e);return t},i.tokenizer.label="default",i.tokenizer.registeredFunctions={"default":i.tokenizer},i.tokenizer.registerFunction=function(e,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing tokenizer: "+t),e.label=t,this.registeredFunctions[t]=e},/*!
|
|
* lunr.Pipeline
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.Pipeline=function(){this._stack=[]},i.Pipeline.registeredFunctions={},i.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing registered function: "+t),e.label=t,i.Pipeline.registeredFunctions[e.label]=e},i.Pipeline.warnIfFunctionNotRegistered=function(e){var t=e.label&&e.label in this.registeredFunctions;t||i.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},i.Pipeline.load=function(e){var t=new i.Pipeline;return e.forEach(function(e){var n=i.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load un-registered function: "+e);t.add(n)}),t},i.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){i.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},i.Pipeline.prototype.after=function(e,t){i.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},i.Pipeline.prototype.before=function(e,t){i.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},i.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},i.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,r=this._stack.length,o=0;o<n;o++){for(var i=e[o],a=0;a<r&&(i=this._stack[a](i,o,e),void 0!==i&&""!==i);a++);void 0!==i&&""!==i&&t.push(i)}return t},i.Pipeline.prototype.reset=function(){this._stack=[]},i.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return i.Pipeline.warnIfFunctionNotRegistered(e),e.label})},/*!
|
|
* lunr.Vector
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},i.Vector.Node=function(e,t,n){this.idx=e,this.val=t,this.next=n},i.Vector.prototype.insert=function(e,t){this._magnitude=void 0;var n=this.list;if(!n)return this.list=new i.Vector.Node(e,t,n),this.length++;if(e<n.idx)return this.list=new i.Vector.Node(e,t,n),this.length++;for(var r=n,o=n.next;void 0!=o;){if(e<o.idx)return r.next=new i.Vector.Node(e,t,o),this.length++;r=o,o=o.next}return r.next=new i.Vector.Node(e,t,o),this.length++},i.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e,t=this.list,n=0;t;)e=t.val,n+=e*e,t=t.next;return this._magnitude=Math.sqrt(n)},i.Vector.prototype.dot=function(e){for(var t=this.list,n=e.list,r=0;t&&n;)t.idx<n.idx?t=t.next:t.idx>n.idx?n=n.next:(r+=t.val*n.val,t=t.next,n=n.next);return r},i.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},/*!
|
|
* lunr.SortedSet
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.SortedSet=function(){this.length=0,this.elements=[]},i.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},i.SortedSet.prototype.add=function(){var e,t;for(e=0;e<arguments.length;e++)t=arguments[e],~this.indexOf(t)||this.elements.splice(this.locationFor(t),0,t);this.length=this.elements.length},i.SortedSet.prototype.toArray=function(){return this.elements.slice()},i.SortedSet.prototype.map=function(e,t){return this.elements.map(e,t)},i.SortedSet.prototype.forEach=function(e,t){return this.elements.forEach(e,t)},i.SortedSet.prototype.indexOf=function(e){for(var t=0,n=this.elements.length,r=n-t,o=t+Math.floor(r/2),i=this.elements[o];r>1;){if(i===e)return o;i<e&&(t=o),i>e&&(n=o),r=n-t,o=t+Math.floor(r/2),i=this.elements[o]}return i===e?o:-1},i.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,r=n-t,o=t+Math.floor(r/2),i=this.elements[o];r>1;)i<e&&(t=o),i>e&&(n=o),r=n-t,o=t+Math.floor(r/2),i=this.elements[o];return i>e?o:i<e?o+1:void 0},i.SortedSet.prototype.intersect=function(e){for(var t=new i.SortedSet,n=0,r=0,o=this.length,a=e.length,s=this.elements,u=e.elements;;){if(n>o-1||r>a-1)break;s[n]!==u[r]?s[n]<u[r]?n++:s[n]>u[r]&&r++:(t.add(s[n]),n++,r++)}return t},i.SortedSet.prototype.clone=function(){var e=new i.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},i.SortedSet.prototype.union=function(e){var t,n,r;this.length>=e.length?(t=this,n=e):(t=e,n=this),r=t.clone();for(var o=0,i=n.toArray();o<i.length;o++)r.add(i[o]);return r},i.SortedSet.prototype.toJSON=function(){return this.toArray()},/*!
|
|
* lunr.Index
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.Index=function(){this._fields=[],this._ref="id",this.pipeline=new i.Pipeline,this.documentStore=new i.Store,this.tokenStore=new i.TokenStore,this.corpusTokens=new i.SortedSet,this.eventEmitter=new i.EventEmitter,this.tokenizerFn=i.tokenizer,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},i.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},i.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},i.Index.load=function(e){e.version!==i.version&&i.utils.warn("version mismatch: current "+i.version+" importing "+e.version);var t=new this;return t._fields=e.fields,t._ref=e.ref,t.tokenizer=i.tokenizer.load(e.tokenizer),t.documentStore=i.Store.load(e.documentStore),t.tokenStore=i.TokenStore.load(e.tokenStore),t.corpusTokens=i.SortedSet.load(e.corpusTokens),t.pipeline=i.Pipeline.load(e.pipeline),t},i.Index.prototype.field=function(e,t){var t=t||{},n={name:e,boost:t.boost||1};return this._fields.push(n),this},i.Index.prototype.ref=function(e){return this._ref=e,this},i.Index.prototype.tokenizer=function(e){var t=e.label&&e.label in i.tokenizer.registeredFunctions;return t||i.utils.warn("Function is not a registered tokenizer. This may cause problems when serialising the index"),this.tokenizerFn=e,this},i.Index.prototype.add=function(e,t){var n={},r=new i.SortedSet,o=e[this._ref],t=void 0===t||t;this._fields.forEach(function(t){var o=this.pipeline.run(this.tokenizerFn(e[t.name]));n[t.name]=o;for(var i=0;i<o.length;i++){var a=o[i];r.add(a),this.corpusTokens.add(a)}},this),this.documentStore.set(o,r);for(var a=0;a<r.length;a++){for(var s=r.elements[a],u=0,c=0;c<this._fields.length;c++){var l=this._fields[c],f=n[l.name],d=f.length;if(d){for(var h=0,p=0;p<d;p++)f[p]===s&&h++;u+=h/d*l.boost}}this.tokenStore.add(s,{ref:o,tf:u})}t&&this.eventEmitter.emit("add",e,this)},i.Index.prototype.remove=function(e,t){var n=e[this._ref],t=void 0===t||t;if(this.documentStore.has(n)){var r=this.documentStore.get(n);this.documentStore.remove(n),r.forEach(function(e){this.tokenStore.remove(e,n)},this),t&&this.eventEmitter.emit("remove",e,this)}},i.Index.prototype.update=function(e,t){var t=void 0===t||t;this.remove(e,!1),this.add(e,!1),t&&this.eventEmitter.emit("update",e,this)},i.Index.prototype.idf=function(e){var t="@"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,t))return this._idfCache[t];var n=this.tokenStore.count(e),r=1;return n>0&&(r=1+Math.log(this.documentStore.length/n)),this._idfCache[t]=r},i.Index.prototype.search=function(e){var t=this.pipeline.run(this.tokenizerFn(e)),n=new i.Vector,r=[],o=this._fields.reduce(function(e,t){return e+t.boost},0),a=t.some(function(e){return this.tokenStore.has(e)},this);if(!a)return[];t.forEach(function(e,t,a){var s=1/a.length*this._fields.length*o,u=this,c=this.tokenStore.expand(e).reduce(function(t,r){var o=u.corpusTokens.indexOf(r),a=u.idf(r),c=1,l=new i.SortedSet;if(r!==e){var f=Math.max(3,r.length-e.length);c=1/Math.log(f)}o>-1&&n.insert(o,s*a*c);for(var d=u.tokenStore.get(r),h=Object.keys(d),p=h.length,m=0;m<p;m++)l.add(d[h[m]].ref);return t.union(l)},new i.SortedSet);r.push(c)},this);var s=r.reduce(function(e,t){return e.intersect(t)});return s.map(function(e){return{ref:e,score:n.similarity(this.documentVector(e))}},this).sort(function(e,t){return t.score-e.score})},i.Index.prototype.documentVector=function(e){for(var t=this.documentStore.get(e),n=t.length,r=new i.Vector,o=0;o<n;o++){var a=t.elements[o],s=this.tokenStore.get(a)[e].tf,u=this.idf(a);r.insert(this.corpusTokens.indexOf(a),s*u)}return r},i.Index.prototype.toJSON=function(){return{version:i.version,fields:this._fields,ref:this._ref,tokenizer:this.tokenizerFn.label,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},i.Index.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},/*!
|
|
* lunr.Store
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.Store=function(){this.store={},this.length=0},i.Store.load=function(e){var t=new this;return t.length=e.length,t.store=Object.keys(e.store).reduce(function(t,n){return t[n]=i.SortedSet.load(e.store[n]),t},{}),t},i.Store.prototype.set=function(e,t){this.has(e)||this.length++,this.store[e]=t},i.Store.prototype.get=function(e){return this.store[e]},i.Store.prototype.has=function(e){return e in this.store},i.Store.prototype.remove=function(e){this.has(e)&&(delete this.store[e],this.length--)},i.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},/*!
|
|
* lunr.stemmer
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
|
|
*/
|
|
i.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},t={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",r="[aeiouy]",o=n+"[^aeiouy]*",i=r+"[aeiou]*",a="^("+o+")?"+i+o,s="^("+o+")?"+i+o+"("+i+")?$",u="^("+o+")?"+i+o+i+o,c="^("+o+")?"+r,l=new RegExp(a),f=new RegExp(u),d=new RegExp(s),h=new RegExp(c),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,y=/^(.+?)eed$/,v=/^(.+?)(ed|ing)$/,g=/.$/,w=/(at|bl|iz)$/,b=new RegExp("([^aeiouylsz])\\1$"),_=new RegExp("^"+o+r+"[^aeiouwxy]$"),S=/^(.+?[^aeiou])y$/,k=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,x=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,E=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,T=/^(.+?)(s|t)(ion)$/,C=/^(.+?)e$/,P=/ll$/,O=new RegExp("^"+o+r+"[^aeiouwxy]$"),M=function(n){var r,o,i,a,s,u,c;if(n.length<3)return n;if(i=n.substr(0,1),"y"==i&&(n=i.toUpperCase()+n.substr(1)),a=p,s=m,a.test(n)?n=n.replace(a,"$1$2"):s.test(n)&&(n=n.replace(s,"$1$2")),a=y,s=v,a.test(n)){var M=a.exec(n);a=l,a.test(M[1])&&(a=g,n=n.replace(a,""))}else if(s.test(n)){var M=s.exec(n);r=M[1],s=h,s.test(r)&&(n=r,s=w,u=b,c=_,s.test(n)?n+="e":u.test(n)?(a=g,n=n.replace(a,"")):c.test(n)&&(n+="e"))}if(a=S,a.test(n)){var M=a.exec(n);r=M[1],n=r+"i"}if(a=k,a.test(n)){var M=a.exec(n);r=M[1],o=M[2],a=l,a.test(r)&&(n=r+e[o])}if(a=x,a.test(n)){var M=a.exec(n);r=M[1],o=M[2],a=l,a.test(r)&&(n=r+t[o])}if(a=E,s=T,a.test(n)){var M=a.exec(n);r=M[1],a=f,a.test(r)&&(n=r)}else if(s.test(n)){var M=s.exec(n);r=M[1]+M[2],s=f,s.test(r)&&(n=r)}if(a=C,a.test(n)){var M=a.exec(n);r=M[1],a=f,s=d,u=O,(a.test(r)||s.test(r)&&!u.test(r))&&(n=r)}return a=P,s=f,a.test(n)&&s.test(n)&&(a=g,n=n.replace(a,"")),"y"==i&&(n=i.toLowerCase()+n.substr(1)),n};return M}(),i.Pipeline.registerFunction(i.stemmer,"stemmer"),/*!
|
|
* lunr.stopWordFilter
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.generateStopWordFilter=function(e){var t=e.reduce(function(e,t){return e[t]=t,e},{});return function(e){if(e&&t[e]!==e)return e}},i.stopWordFilter=i.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),i.Pipeline.registerFunction(i.stopWordFilter,"stopWordFilter"),/*!
|
|
* lunr.trimmer
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
*/
|
|
i.trimmer=function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")},i.Pipeline.registerFunction(i.trimmer,"trimmer"),/*!
|
|
* lunr.stemmer
|
|
* Copyright (C) 2016 Oliver Nightingale
|
|
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
|
|
*/
|
|
i.TokenStore=function(){this.root={docs:{}},this.length=0},i.TokenStore.load=function(e){var t=new this;return t.root=e.root,t.length=e.length,t},i.TokenStore.prototype.add=function(e,t,n){var n=n||this.root,r=e.charAt(0),o=e.slice(1);return r in n||(n[r]={docs:{}}),0===o.length?(n[r].docs[t.ref]=t,void(this.length+=1)):this.add(o,t,n[r])},i.TokenStore.prototype.has=function(e){if(!e)return!1;for(var t=this.root,n=0;n<e.length;n++){if(!t[e.charAt(n)])return!1;t=t[e.charAt(n)]}return!0},i.TokenStore.prototype.getNode=function(e){if(!e)return{};for(var t=this.root,n=0;n<e.length;n++){if(!t[e.charAt(n)])return{};t=t[e.charAt(n)]}return t},i.TokenStore.prototype.get=function(e,t){return this.getNode(e,t).docs||{}},i.TokenStore.prototype.count=function(e,t){return Object.keys(this.get(e,t)).length},i.TokenStore.prototype.remove=function(e,t){if(e){for(var n=this.root,r=0;r<e.length;r++){if(!(e.charAt(r)in n))return;n=n[e.charAt(r)]}delete n.docs[t]}},i.TokenStore.prototype.expand=function(e,t){var n=this.getNode(e),r=n.docs||{},t=t||[];return Object.keys(r).length&&t.push(e),Object.keys(n).forEach(function(n){"docs"!==n&&t.concat(this.expand(e+n,t))},this),t},i.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},function(i,a){r=a,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o))}(this,function(){return i})}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),i=r(o),a=n(19),s=r(a);t["default"]={Container:i["default"],Position:s["default"]},e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.el_="string"==typeof t?document.querySelector(t):t,this.parent_=this.el_.parentNode}return r(e,[{key:"setup",value:function(){this.update()}},{key:"update",value:function(){var e=this.parent_.offsetHeight-this.el_.offsetTop;this.el_.style.minHeight=e+"px"}},{key:"reset",value:function(){this.el_.style.minHeight=""}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){n(this,e),this.el_="string"==typeof t?document.querySelector(t):t,this.parent_=this.el_.parentNode,this.offset_=this.el_.offsetTop-this.parent_.offsetTop,this.height_=0}return r(e,[{key:"setup",value:function(){this.update()}},{key:"update",value:function(){var e=window.pageYOffset,t=window.innerHeight;this.bounds_={top:this.parent_.offsetTop,bottom:this.parent_.offsetTop+this.parent_.offsetHeight};var n=t-this.bounds_.top-Math.max(0,this.offset_-e)-Math.max(0,e+t-this.bounds_.bottom);n!==this.height_&&(this.el_.style.height=(this.height_=n)+"px"),e>=this.offset_?"lock"!==this.el_.dataset.mdState&&(this.el_.dataset.mdState="lock"):"lock"===this.el_.dataset.mdState&&delete this.el_.dataset.mdState}},{key:"reset",value:function(){delete this.el_.dataset.mdState,this.el_.style.height="",this.height_=0}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),i=r(o),a=n(25),s=r(a);t["default"]={Adapter:i["default"],Repository:s["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(22),i=r(o);t["default"]={GitHub:i["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(23),c=r(u),l=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.base_=n.base_.replace("github.com/","api.github.com/repos/"),n}return a(t,e),s(t,[{key:"fetch_",value:function(){var e=this;return fetch(this.base_).then(function(e){return e.json()}).then(function(t){return[e.format_(t.stargazers_count)+" Stars",e.format_(t.forks_count)+" Forks"]})}}]),t}(c["default"]);t["default"]=l,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(24),s=r(a),u=function(){function e(t){o(this,e),this.el_="string"==typeof t?document.querySelector(t):t,this.base_=this.el_.href}return i(e,[{key:"fetch",value:function(){var e=this;return new Promise(function(t){var n=s["default"].getJSON(".cache-source");"undefined"!=typeof n?t(n):e.fetch_().then(function(e){s["default"].set(".cache-source",e,{expires:1/96}),t(e)})})}},{key:"fetch_",value:function(){throw new Error("fetch_(): Not implemented")}},{key:"format_",value:function(e){return e>1e4?(e/1e3).toFixed(0)+"k":e>1e3?(e/1e3).toFixed(1)+"k":e}}]),e}();t["default"]=u,e.exports=t["default"]},function(e,t,n){var r,o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a){var s=!1;if(r=a,o="function"==typeof r?r.call(t,n,t,e):r,!(void 0!==o&&(e.exports=o)),s=!0,"object"===i(t)&&(e.exports=a(),s=!0),!s){var u=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=u,c}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(n){function r(t,o,i){var a;if("undefined"!=typeof document){if(arguments.length>1){if(i=e({path:"/"},r.defaults,i),"number"==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}try{a=JSON.stringify(o),/^[\{\[]/.test(a)&&(o=a)}catch(u){}return o=n.write?n.write(o,t):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),document.cookie=[t,"=",o,i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}t||(a={});for(var c=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,f=0;f<c.length;f++){var d=c[f].split("="),h=d.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{var p=d[0].replace(l,decodeURIComponent);if(h=n.read?n.read(h,p):n(h,p)||h.replace(l,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(u){}if(t===p){a=h;break}t||(a[p]=h)}catch(u){}}return a}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}return t(function(){})})},function(e,t,n){(function(n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){r(this,e),this.el_="string"==typeof t?document.querySelector(t):t}return o(e,[{key:"initialize",value:function(e){this.el_.children[0].appendChild(n.createElement("ul",{"class":"md-source__facts"},e.map(function(e){return n.createElement("li",{"class":"md-source__fact"},e)}))),this.el_.dataset.mdState="done"}}]),e}();t["default"]=i,e.exports=t["default"]}).call(t,n(15))}]); |