mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-15 03:17:40 +01:00
58 lines
74 KiB
JavaScript
58 lines
74 KiB
JavaScript
|
var Application=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),n(65),n(66),t.exports=n(67)},function(t,e,n){"use strict";n(2),n(22),n(48),n(52),t.exports=n(21).Promise},function(t,e,n){"use strict";var r=n(3),o={};o[n(5)("toStringTag")]="z",o+""!="[object z]"&&n(9)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){"use strict";var r=n(4),o=n(5)("toStringTag"),i="Arguments"==r(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){"use strict";var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){"use strict";var r=n(6)("wks"),o=n(8),i=n(7).Symbol,s="function"==typeof i,a=t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))};a.store=r},function(t,e,n){"use strict";var r=n(7),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e){"use strict";var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){"use strict";var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){"use strict";var r=n(7),o=n(10),i=n(20),s=n(8)("src"),a="toString",u=Function[a],c=(""+u).split(a);n(21).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,s)||o(n,s,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[s]||u.call(this)})},function(t,e,n){"use strict";var r=n(11),o=n(19);t.exports=n(15)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var r=n(12),o=n(14),i=n(18),s=Object.defineProperty;e.f=n(15)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return"object"===("undefined"==typeof t?"undefined":n(t))?null!==t:"function"==typeof t}},function(t,e,n){"use strict";t.exports=!n(15)&&!n(16)(function(){return 7!=Object.defineProperty(n(17)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";t.exports=!n(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var r=n(13),o=n(7).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){"use strict";var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){"use strict";var n=t.exports={version:"2.4.0"};"numbe
|
||
|
* @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(t,e){function n(t,e){return function(){return t.apply(e,arguments)}}var r;if(e=e||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=e.touchBoundary||10,this.layer=t,this.tapDelay=e.tapDelay||200,this.tapTimeout=e.tapTimeout||700,!i.notNeeded(t)){for(var o=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,u=0,c=o.length;u<c;u++)s[o[u]]=n(s[o[u]],s);a&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0)),t.addEventListener("click",this.onClick,!0),t.addEventListener("touchstart",this.onTouchStart,!1),t.addEventListener("touchmove",this.onTouchMove,!1),t.addEventListener("touchend",this.onTouchEnd,!1),t.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(e,n,r){var o=Node.prototype.removeEventListener;"click"===e?o.call(t,e,n.hijacked||n,r):o.call(t,e,n,r)},t.addEventListener=function(e,n,r){var o=Node.prototype.addEventListener;"click"===e?o.call(t,e,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),r):o.call(t,e,n,r)}),"function"==typeof t.onclick&&(r=t.onclick,t.addEventListener("click",function(t){r(t)},!1),t.onclick=null)}}var s=navigator.userAgent.indexOf("Windows Phone")>=0,a=navigator.userAgent.indexOf("Android")>0&&!s,u=/iP(ad|hone|od)/.test(navigator.userAgent)&&!s,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(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(u&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},i.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!a;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},i.prototype.sendClick=function(t,e){var n,r;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),r=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},i.prototype.determineEventType=function(t){return a&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},i.prototype.focus=function(t){var e;u&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},i.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},i.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},i.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],u){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!c){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTime<this.tapDelay&&t.preventDefault(),!0},i.prototype.touchHasMoved=function(t){var e=t.changedTouches[0],n=this.touchBoundary;return Math.abs(e.pageX-this.touchStartX)>n||Math.abs(e.pageY-this.touchStartY)>n},i.prototype.onTouchMove=function(t){return!this.trackingClick||((this.targetElement!==this.
|
||
|
* lunr.utils
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.utils={},i.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),i.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},/*!
|
||
|
* lunr.EventEmitter
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.EventEmitter=function(){this.events={}},i.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},i.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},i.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},i.EventEmitter.prototype.hasHandler=function(t){return t in this.events},/*!
|
||
|
* lunr.tokenizer
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.tokenizer=function(t){if(!arguments.length||null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(t){return i.utils.asString(t).toLowerCase()});var e=i.tokenizer.seperator||i.tokenizer.separator;return t.toString().trim().toLowerCase().split(e)},i.tokenizer.seperator=!1,i.tokenizer.separator=/[\s\-]+/,i.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw new Error("Cannot load un-registered function: "+t);return e},i.tokenizer.label="default",i.tokenizer.registeredFunctions={default:i.tokenizer},i.tokenizer.registerFunction=function(t,e){e in this.registeredFunctions&&i.utils.warn("Overwriting existing tokenizer: "+e),t.label=e,this.registeredFunctions[e]=t},/*!
|
||
|
* lunr.Pipeline
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.Pipeline=function(){this._stack=[]},i.Pipeline.registeredFunctions={},i.Pipeline.registerFunction=function(t,e){e in this.registeredFunctions&&i.utils.warn("Overwriting existing registered function: "+e),t.label=e,i.Pipeline.registeredFunctions[t.label]=t},i.Pipeline.warnIfFunctionNotRegistered=function(t){var e=t.label&&t.label in this.registeredFunctions;e||i.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},i.Pipeline.load=function(t){var e=new i.Pipeline;return t.forEach(function(t){var n=i.Pipeline.registeredFunctions[t];if(!n)throw new Error("Cannot load un-registered function: "+t);e.add(n)}),e},i.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){i.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},i.Pipeline.prototype.after=function(t,e){i.Pipeline.warnIfFunctionNotRegistered(e);var n=this._stack.indexOf(t);if(n==-1)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,e)},i.Pipeline.prototype.before=function(t,e){i.Pipeline.warnIfFunctionNotRegistered(e);var n=this._stack.indexOf(t);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,e)},i.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);e!=-1&&this._stack.splice(e,1)},i.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,r=this._stack.length,o=0;o<n;o++){for(var i=t[o],s=0;s<r&&(i=this._stack[s](i,o,t),void 0!==i&&""!==i);s++);void 0!==i&&""!==i&&e.push(i)}return e},i.Pipeline.prototype.reset=function(){this._stack=[]},i.Pipeline.prototype.toJSON=function(){return this._stack.map(function(t){return i.Pipeline.warnIfFunctionNotRegistered(t),t.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(t,e,n){this.idx=t,this.val=e,this.next=n},i.Vector.prototype.insert=function(t,e){this._magnitude=void 0;var n=this.list;if(!n)return this.list=new i.Vector.Node(t,e,n),this.length++;if(t<n.idx)return this.list=new i.Vector.Node(t,e,n),this.length++;for(var r=n,o=n.next;void 0!=o;){if(t<o.idx)return r.next=new i.Vector.Node(t,e,o),this.length++;r=o,o=o.next}return r.next=new i.Vector.Node(t,e,o),this.length++},i.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t,e=this.list,n=0;e;)t=e.val,n+=t*t,e=e.next;return this._magnitude=Math.sqrt(n)},i.Vector.prototype.dot=function(t){for(var e=this.list,n=t.list,r=0;e&&n;)e.idx<n.idx?e=e.next:e.idx>n.idx?n=n.next:(r+=e.val*n.val,e=e.next,n=n.next);return r},i.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},/*!
|
||
|
* lunr.SortedSet
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.SortedSet=function(){this.length=0,this.elements=[]},i.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},i.SortedSet.prototype.add=function(){var t,e;for(t=0;t<arguments.length;t++)e=arguments[t],~this.indexOf(e)||this.elements.splice(this.locationFor(e),0,e);this.length=this.elements.length},i.SortedSet.prototype.toArray=function(){return this.elements.slice()},i.SortedSet.prototype.map=function(t,e){return this.elements.map(t,e)},i.SortedSet.prototype.forEach=function(t,e){return this.elements.forEach(t,e)},i.SortedSet.prototype.indexOf=function(t){for(var e=0,n=this.elements.length,r=n-e,o=e+Math.floor(r/2),i=this.elements[o];r>1;){if(i===t)return o;i<t&&(e=o),i>t&&(n=o),r=n-e,o=e+Math.floor(r/2),i=this.elements[o]}return i===t?o:-1},i.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,r=n-e,o=e+Math.floor(r/2),i=this.elements[o];r>1;)i<t&&(e=o),i>t&&(n=o),r=n-e,o=e+Math.floor(r/2),i=this.elements[o];return i>t?o:i<t?o+1:void 0},i.SortedSet.prototype.intersect=function(t){for(var e=new i.SortedSet,n=0,r=0,o=this.length,s=t.length,a=this.elements,u=t.elements;;){if(n>o-1||r>s-1)break;a[n]!==u[r]?a[n]<u[r]?n++:a[n]>u[r]&&r++:(e.add(a[n]),n++,r++)}return e},i.SortedSet.prototype.clone=function(){var t=new i.SortedSet;return t.elements=this.toArray(),t.length=t.elements.length,t},i.SortedSet.prototype.union=function(t){var e,n,r;this.length>=t.length?(e=this,n=t):(e=t,n=this),r=e.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 t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},i.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},i.Index.load=function(t){t.version!==i.version&&i.utils.warn("version mismatch: current "+i.version+" importing "+t.version);var e=new this;return e._fields=t.fields,e._ref=t.ref,e.tokenizer(i.tokenizer.load(t.tokenizer)),e.documentStore=i.Store.load(t.documentStore),e.tokenStore=i.TokenStore.load(t.tokenStore),e.corpusTokens=i.SortedSet.load(t.corpusTokens),e.pipeline=i.Pipeline.load(t.pipeline),e},i.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},i.Index.prototype.ref=function(t){return this._ref=t,this},i.Index.prototype.tokenizer=function(t){var e=t.label&&t.label in i.tokenizer.registeredFunctions;return e||i.utils.warn("Function is not a registered tokenizer. This may cause problems when serialising the index"),this.tokenizerFn=t,this},i.Index.prototype.add=function(t,e){var n={},r=new i.SortedSet,o=t[this._ref],e=void 0===e||e;this._fields.forEach(function(e){var o=this.pipeline.run(this.tokenizerFn(t[e.name]));n[e.name]=o;for(var i=0;i<o.length;i++){var s=o[i];r.add(s),this.corpusTokens.add(s)}},this),this.documentStore.set(o,r);for(var s=0;s<r.length;s++){for(var a=r.elements[s],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]===a&&h++;u+=h/d*l.boost}}this.tokenStore.add(a,{ref:o,tf:u})}e&&this.eventEmitter.emit("add",t,this)},i.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e||e;if(this.documentStore.has(n)){var r=this.documentStore.get(n);this.documentStore.remove(n),r.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},i.Index.prototype.update=function(t,e){var e=void 0===e||e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},i.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),r=1;return n>0&&(r=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=r},i.Index.prototype.search=function(t){var e=this.pipeline.run(this.tokenizerFn(t)),n=new i.Vector,r=[],o=this._fields.reduce(function(t,e){return t+e.boost},0),s=e.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];e.forEach(function(t,e,s){var a=1/s.length*this._fields.length*o,u=this,c=this.tokenStore.expand(t).reduce(function(e,r){var o=u.corpusTokens.indexOf(r),s=u.idf(r),c=1,l=new i.SortedSet;if(r!==t){var f=Math.max(3,r.length-t.length);c=1/Math.log(f)}o>-1&&n.insert(o,a*s*c);for(var d=u.tokenStore.get(r),h=Object.keys(d),p=h.length,v=0;v<p;v++)l.add(d[h[v]].ref);return e.union(l)},new i.SortedSet);r.push(c)},this);var a=r.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:n.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},i.Index.prototype.documentVector=function(t){for(var e=this.documentStore.get(t),n=e.length,r=new i.Vector,o=0;o<n;o++){var s=e.elements[o],a=this.tokenStore.get(s)[t].tf,u=this.idf(s);r.insert(this.corpusTokens.indexOf(s),a*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(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},/*!
|
||
|
* lunr.Store
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.Store=function(){this.store={},this.length=0},i.Store.load=function(t){var e=new this;return e.length=t.length,e.store=Object.keys(t.store).reduce(function(e,n){return e[n]=i.SortedSet.load(t.store[n]),e},{}),e},i.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},i.Store.prototype.get=function(t){return this.store[t]},i.Store.prototype.has=function(t){return t in this.store},i.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],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 t={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"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",r="[aeiouy]",o=n+"[^aeiouy]*",i=r+"[aeiou]*",s="^("+o+")?"+i+o,a="^("+o+")?"+i+o+"("+i+")?$",u="^("+o+")?"+i+o+i+o,c="^("+o+")?"+r,l=new RegExp(s),f=new RegExp(u),d=new RegExp(a),h=new RegExp(c),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,y=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,g=/.$/,b=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),_=new RegExp("^"+o+r+"[^aeiouwxy]$"),S=/^(.+?[^aeiou])y$/,x=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,k=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,T=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,C=/ll$/,P=new RegExp("^"+o+r+"[^aeiouwxy]$"),A=function(n){var r,o,i,s,a,u,c;if(n.length<3)return n;if(i=n.substr(0,1),"y"==i&&(n=i.toUpperCase()+n.substr(1)),s=p,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=y,a=m,s.test(n)){var A=s.exec(n);s=l,s.test(A[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var A=a.exec(n);r=A[1],a=h,a.test(r)&&(n=r,a=b,u=w,c=_,a.test(n)?n+="e":u.test(n)?(s=g,n=n.replace(s,"")):c.test(n)&&(n+="e"))}if(s=S,s.test(n)){var A=s.exec(n);r=A[1],n=r+"i"}if(s=x,s.test(n)){var A=s.exec(n);r=A[1],o=A[2],s=l,s.test(r)&&(n=r+t[o])}if(s=E,s.test(n)){var A=s.exec(n);r=A[1],o=A[2],s=l,s.test(r)&&(n=r+e[o])}if(s=k,a=T,s.test(n)){var A=s.exec(n);r=A[1],s=f,s.test(r)&&(n=r)}else if(a.test(n)){var A=a.exec(n);r=A[1]+A[2],a=f,a.test(r)&&(n=r)}if(s=O,s.test(n)){var A=s.exec(n);r=A[1],s=f,a=d,u=P,(s.test(r)||a.test(r)&&!u.test(r))&&(n=r)}return s=C,a=f,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==i&&(n=i.toLowerCase()+n.substr(1)),n};return A}(),i.Pipeline.registerFunction(i.stemmer,"stemmer"),/*!
|
||
|
* lunr.stopWordFilter
|
||
|
* Copyright (C) 2016 Oliver Nightingale
|
||
|
*/
|
||
|
i.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){if(t&&e[t]!==t)return t}},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(t){return t.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(t){var e=new this;return e.root=t.root,e.length=t.length,e},i.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,r=t.charAt(0),o=t.slice(1);return r in n||(n[r]={docs:{}}),0===o.length?(n[r].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[r])},i.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n<t.length;n++){if(!e[t.charAt(n)])return!1;e=e[t.charAt(n)]}return!0},i.TokenStore.prototype.getNode=function(t){if(!t)return{};for(var e=this.root,n=0;n<t.length;n++){if(!e[t.charAt(n)])return{};e=e[t.charAt(n)]}return e},i.TokenStore.prototype.get=function(t,e){return this.getNode(t,e).docs||{}},i.TokenStore.prototype.count=function(t,e){return Object.keys(this.get(t,e)).length},i.TokenStore.prototype.remove=function(t,e){if(t){for(var n=this.root,r=0;r<t.length;r++){if(!(t.charAt(r)in n))return;n=n[t.charAt(r)]}delete n.docs[e]}},i.TokenStore.prototype.expand=function(t,e){var n=this.getNode(t),r=n.docs||{},e=e||[];return Object.keys(r).length&&e.push(t),Object.keys(n).forEach(function(n){"docs"!==n&&e.concat(this.expand(t+n,e))},this),e},i.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},function(i,s){r=s,o="function"==typeof r?r.call(e,n,e,t):r,!(void 0!==o&&(t.exports=o))}(this,function(){return i})}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(84),i=r(o),s=n(85),a=r(s);e.default={Container:i.default,Position:a.default},t.exports=e.default},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){n(this,t),this.el_="string"==typeof e?document.querySelector(e):e,this.parent_=this.el_.parentNode}return r(t,[{key:"setup",value:function(){this.update()}},{key:"update",value:function(){var t=this.parent_.offsetHeight-this.el_.offsetTop;this.el_.style.minHeight=t+"px"}},{key:"reset",value:function(){this.el_.style.minHeight=""}}]),t}();e.default=o,t.exports=e.default},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(){function t(e){n(this,t),this.el_="string"==typeof e?document.querySelector(e):e,this.parent_=this.el_.parentNode,this.height_=0}return r(t,[{key:"setup",value:function(){this.offset_=this.el_.offsetTop-this.parent_.offsetTop,this.update()}},{key:"update",value:function(){var t=window.pageYOffset,e=window.innerHeight;this.bounds_={top:this.parent_.offsetTop,bottom:this.parent_.offsetTop+this.parent_.offsetHeight};var n=e-this.bounds_.top-Math.max(0,this.offset_-t)-Math.max(0,t+e-this.bounds_.bottom);n!==this.height_&&(this.el_.style.height=(this.height_=n)+"px"),t>=this.offset_?"lock"!==this.el_.dataset.mdState&&(this.el_.dataset.mdState="lock"):"lock"===this.el_.dataset.mdState&&(this.el_.dataset.mdState="")}},{key:"reset",value:function(){this.el_.dataset.mdState="",this.el_.style.height="",this.height_=0}}]),t}();e.default=o,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(87),i=r(o),s=n(91),a=r(s);e.default={Adapter:i.default,Repository:a.default},t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(
|