-
Notifications
You must be signed in to change notification settings - Fork 0
/
575fda744365e513818d.worker.js.map
1 lines (1 loc) · 94 KB
/
575fda744365e513818d.worker.js.map
1
{"version":3,"sources":["webpack/bootstrap 575fda744365e513818d","./node_modules/lunr/lunr.js","./src/app/lunr_worker.js"],"names":["lunr","config","idx","Index","pipeline","add","trimmer","stopWordFilter","stemmer","call","version","utils","warn","global","message","console","asString","obj","toString","EventEmitter","events","prototype","addListener","args","Array","slice","arguments","fn","pop","names","TypeError","forEach","name","hasHandler","push","removeListener","fnIndex","indexOf","splice","length","emit","apply","undefined","tokenizer","isArray","map","t","toLowerCase","separator","seperator","trim","split","load","label","registeredFunctions","Error","registerFunction","Pipeline","_stack","warnIfFunctionNotRegistered","isRegistered","serialised","fnName","fns","after","existingFn","newFn","pos","before","remove","run","tokens","out","tokenLength","stackLength","i","token","j","reset","toJSON","Vector","_magnitude","list","Node","val","next","insert","prev","magnitude","node","sumOfSquares","Math","sqrt","dot","otherVector","otherNode","dotProduct","similarity","SortedSet","elements","serialisedData","set","element","locationFor","toArray","ctx","elem","start","end","sectionLength","pivot","floor","pivotElem","intersect","otherSet","intersectSet","a_len","b_len","a","b","clone","union","longSet","shortSet","unionSet","shortSetElements","_fields","_ref","documentStore","Store","tokenStore","TokenStore","corpusTokens","eventEmitter","tokenizerFn","_idfCache","on","bind","off","fields","ref","field","fieldName","opts","boost","refName","doc","emitEvent","docTokens","allDocumentTokens","docRef","fieldTokens","tf","fieldLength","tokenCount","k","has","get","update","idf","term","cacheKey","Object","hasOwnProperty","documentFrequency","count","log","search","query","queryTokens","queryVector","documentSets","fieldBoosts","reduce","memo","f","hasSomeToken","some","self","expand","key","similarityBoost","diff","max","matchingDocuments","refs","keys","refsLen","documentSet","score","documentVector","sort","documentRef","documentTokens","documentTokensLength","use","plugin","unshift","store","id","step2list","step3list","c","v","C","V","mgr0","meq1","mgr1","s_v","re_mgr0","RegExp","re_mgr1","re_meq1","re_s_v","re_1a","re2_1a","re_1b","re2_1b","re_1b_2","re2_1b_2","re3_1b_2","re4_1b_2","re_1c","re_2","re_3","re_4","re2_4","re_5","re_5_1","re3_5","porterStemmer","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","test","replace","fp","exec","generateStopWordFilter","stopWords","words","stopWord","root","docs","charAt","rest","getNode","concat","factory","define","exports","module"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;AC7DA;;;;;;AAMA,CAAC,CAAC,YAAU;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAIA,OAAO,SAAPA,IAAO,CAAUC,MAAV,EAAkB;AAC3B,QAAIC,MAAM,IAAIF,KAAKG,KAAT,EAAV;;AAEAD,QAAIE,QAAJ,CAAaC,GAAb,CACEL,KAAKM,OADP,EAEEN,KAAKO,cAFP,EAGEP,KAAKQ,OAHP;;AAMA,QAAIP,MAAJ,EAAYA,OAAOQ,IAAP,CAAYP,GAAZ,EAAiBA,GAAjB;;AAEZ,WAAOA,GAAP;AACD,GAZD;;AAcAF,OAAKU,OAAL,GAAe,OAAf;AACA;;;;;AAKA;;;AAGAV,OAAKW,KAAL,GAAa,EAAb;;AAEA;;;;;;AAMAX,OAAKW,KAAL,CAAWC,IAAX,GAAmB,UAAUC,MAAV,EAAkB;AACnC,WAAO,UAAUC,OAAV,EAAmB;AACxB,UAAID,OAAOE,OAAP,IAAkBA,QAAQH,IAA9B,EAAoC;AAClCG,gBAAQH,IAAR,CAAaE,OAAb;AAC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A;AACA,wDAAwD,oBAAoB;AAC5E;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,CAAC","file":"575fda744365e513818d.worker.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/app/lunr_worker.js\");\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 575fda744365e513818d","/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.2\n * Copyright (C) 2016 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * Convenience function for instantiating a new lunr index and configuring it\n * with the default pipeline functions and the passed config function.\n *\n * When using this convenience function a new index will be created with the\n * following functions already in the pipeline:\n *\n * lunr.StopWordFilter - filters out any stop words before they enter the\n * index\n *\n * lunr.stemmer - stems the tokens before entering the index.\n *\n * Example:\n *\n * var idx = lunr(function () {\n * this.field('title', 10)\n * this.field('tags', 100)\n * this.field('body')\n * \n * this.ref('cid')\n * \n * this.pipeline.add(function () {\n * // some custom pipeline function\n * })\n * \n * })\n *\n * @param {Function} config A function that will be called with the new instance\n * of the lunr.Index as both its context and first parameter. It can be used to\n * customize the instance of new lunr.Index.\n * @namespace\n * @module\n * @returns {lunr.Index}\n *\n */\nvar lunr = function (config) {\n var idx = new lunr.Index\n\n idx.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n if (config) config.call(idx, idx)\n\n return idx\n}\n\nlunr.version = \"0.7.2\"\n/*!\n * lunr.utils\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf Utils\n */\nlunr.utils.warn = (function (global) {\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message)\n }\n }\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf Utils\n */\nlunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\"\n } else {\n return obj.toString()\n }\n}\n/*!\n * lunr.EventEmitter\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers.\n *\n * @constructor\n */\nlunr.EventEmitter = function () {\n this.events = {}\n}\n\n/**\n * Binds a handler function to a specific event(s).\n *\n * Can bind a single function to many different events in one call.\n *\n * @param {String} [eventName] The name(s) of events to bind this function to.\n * @param {Function} fn The function to call when an event is fired.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.addListener = function () {\n var args = Array.prototype.slice.call(arguments),\n fn = args.pop(),\n names = args\n\n if (typeof fn !== \"function\") throw new TypeError (\"last argument must be a function\")\n\n names.forEach(function (name) {\n if (!this.hasHandler(name)) this.events[name] = []\n this.events[name].push(fn)\n }, this)\n}\n\n/**\n * Removes a handler function from a specific event.\n *\n * @param {String} eventName The name of the event to remove this function from.\n * @param {Function} fn The function to remove from an event.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.removeListener = function (name, fn) {\n if (!this.hasHandler(name)) return\n\n var fnIndex = this.events[name].indexOf(fn)\n this.events[name].splice(fnIndex, 1)\n\n if (!this.events[name].length) delete this.events[name]\n}\n\n/**\n * Calls all functions bound to the given event.\n *\n * Additional data can be passed to the event handler as arguments to `emit`\n * after the event name.\n *\n * @param {String} eventName The name of the event to emit.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.emit = function (name) {\n if (!this.hasHandler(name)) return\n\n var args = Array.prototype.slice.call(arguments, 1)\n\n this.events[name].forEach(function (fn) {\n fn.apply(undefined, args)\n })\n}\n\n/**\n * Checks whether a handler has ever been stored against an event.\n *\n * @param {String} eventName The name of the event to check.\n * @private\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.hasHandler = function (name) {\n return name in this.events\n}\n\n/*!\n * lunr.tokenizer\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * @module\n * @param {String} obj The string to convert into tokens\n * @see lunr.tokenizer.separator\n * @returns {Array}\n */\nlunr.tokenizer = function (obj) {\n if (!arguments.length || obj == null || obj == undefined) return []\n if (Array.isArray(obj)) return obj.map(function (t) { return lunr.utils.asString(t).toLowerCase() })\n\n // TODO: This exists so that the deprecated property lunr.tokenizer.seperator can still be used. By\n // default it is set to false and so the correctly spelt lunr.tokenizer.separator is used unless\n // the user is using the old property to customise the tokenizer.\n //\n // This should be removed when version 1.0.0 is released.\n var separator = lunr.tokenizer.seperator || lunr.tokenizer.separator\n\n return obj.toString().trim().toLowerCase().split(separator)\n}\n\n/**\n * This property is legacy alias for lunr.tokenizer.separator to maintain backwards compatability.\n * When introduced the token was spelt incorrectly. It will remain until 1.0.0 when it will be removed,\n * all code should use the correctly spelt lunr.tokenizer.separator property instead.\n *\n * @static\n * @see lunr.tokenizer.separator\n * @deprecated since 0.7.2 will be removed in 1.0.0\n * @private\n * @see lunr.tokenizer\n */\nlunr.tokenizer.seperator = false\n\n/**\n * The sperator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n\n/**\n * Loads a previously serialised tokenizer.\n *\n * A tokenizer function to be loaded must already be registered with lunr.tokenizer.\n * If the serialised tokenizer has not been registered then an error will be thrown.\n *\n * @param {String} label The label of the serialised tokenizer.\n * @returns {Function}\n * @memberOf tokenizer\n */\nlunr.tokenizer.load = function (label) {\n var fn = this.registeredFunctions[label]\n\n if (!fn) {\n throw new Error('Cannot load un-registered function: ' + label)\n }\n\n return fn\n}\n\nlunr.tokenizer.label = 'default'\n\nlunr.tokenizer.registeredFunctions = {\n 'default': lunr.tokenizer\n}\n\n/**\n * Register a tokenizer function.\n *\n * Functions that are used as tokenizers should be registered if they are to be used with a serialised index.\n *\n * Registering a function does not add it to an index, functions must still be associated with a specific index for them to be used when indexing and searching documents.\n *\n * @param {Function} fn The function to register.\n * @param {String} label The label to register this function with\n * @memberOf tokenizer\n */\nlunr.tokenizer.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing tokenizer: ' + label)\n }\n\n fn.label = label\n this.registeredFunctions[label] = fn\n}\n/*!\n * lunr.Pipeline\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = {}\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {Function} fn The function to check for.\n * @param {String} label The label to register this function with\n * @memberOf Pipeline\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {Function} fn The function to check for.\n * @private\n * @memberOf Pipeline\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n * @memberOf Pipeline\n */\nlunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load un-registered function: ' + fnName)\n }\n })\n\n return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} functions Any number of functions to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} existingFn A function that already exists in the pipeline.\n * @param {Function} newFn The new function to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} existingFn A function that already exists in the pipeline.\n * @param {Function} newFn The new function to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {Function} fn The function to remove from the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n var out = [],\n tokenLength = tokens.length,\n stackLength = this._stack.length\n\n for (var i = 0; i < tokenLength; i++) {\n var token = tokens[i]\n\n for (var j = 0; j < stackLength; j++) {\n token = this._stack[j](token, i, tokens)\n if (token === void 0 || token === '') break\n };\n\n if (token !== void 0 && token !== '') out.push(token)\n };\n\n return out\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Vectors implement vector related operations for\n * a series of elements.\n *\n * @constructor\n */\nlunr.Vector = function () {\n this._magnitude = null\n this.list = undefined\n this.length = 0\n}\n\n/**\n * lunr.Vector.Node is a simple struct for each node\n * in a lunr.Vector.\n *\n * @private\n * @param {Number} The index of the node in the vector.\n * @param {Object} The data at this node in the vector.\n * @param {lunr.Vector.Node} The node directly after this node in the vector.\n * @constructor\n * @memberOf Vector\n */\nlunr.Vector.Node = function (idx, val, next) {\n this.idx = idx\n this.val = val\n this.next = next\n}\n\n/**\n * Inserts a new value at a position in a vector.\n *\n * @param {Number} The index at which to insert a value.\n * @param {Object} The object to insert in the vector.\n * @memberOf Vector.\n */\nlunr.Vector.prototype.insert = function (idx, val) {\n this._magnitude = undefined;\n var list = this.list\n\n if (!list) {\n this.list = new lunr.Vector.Node (idx, val, list)\n return this.length++\n }\n\n if (idx < list.idx) {\n this.list = new lunr.Vector.Node (idx, val, list)\n return this.length++\n }\n\n var prev = list,\n next = list.next\n\n while (next != undefined) {\n if (idx < next.idx) {\n prev.next = new lunr.Vector.Node (idx, val, next)\n return this.length++\n }\n\n prev = next, next = next.next\n }\n\n prev.next = new lunr.Vector.Node (idx, val, next)\n return this.length++\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n var node = this.list,\n sumOfSquares = 0,\n val\n\n while (node) {\n val = node.val\n sumOfSquares += val * val\n node = node.next\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector The vector to compute the dot product with.\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n var node = this.list,\n otherNode = otherVector.list,\n dotProduct = 0\n\n while (node && otherNode) {\n if (node.idx < otherNode.idx) {\n node = node.next\n } else if (node.idx > otherNode.idx) {\n otherNode = otherNode.next\n } else {\n dotProduct += node.val * otherNode.val\n node = node.next\n otherNode = otherNode.next\n }\n }\n\n return dotProduct\n}\n\n/**\n * Calculates the cosine similarity between this vector and another\n * vector.\n *\n * @param {lunr.Vector} otherVector The other vector to calculate the\n * similarity with.\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude())\n}\n/*!\n * lunr.SortedSet\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.SortedSets are used to maintain an array of uniq values in a sorted\n * order.\n *\n * @constructor\n */\nlunr.SortedSet = function () {\n this.length = 0\n this.elements = []\n}\n\n/**\n * Loads a previously serialised sorted set.\n *\n * @param {Array} serialisedData The serialised set to load.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.load = function (serialisedData) {\n var set = new this\n\n set.elements = serialisedData\n set.length = serialisedData.length\n\n return set\n}\n\n/**\n * Inserts new items into the set in the correct position to maintain the\n * order.\n *\n * @param {Object} The objects to add to this set.\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.add = function () {\n var i, element\n\n for (i = 0; i < arguments.length; i++) {\n element = arguments[i]\n if (~this.indexOf(element)) continue\n this.elements.splice(this.locationFor(element), 0, element)\n }\n\n this.length = this.elements.length\n}\n\n/**\n * Converts this sorted set into an array.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.toArray = function () {\n return this.elements.slice()\n}\n\n/**\n * Creates a new array with the results of calling a provided function on every\n * element in this sorted set.\n *\n * Delegates to Array.prototype.map and has the same signature.\n *\n * @param {Function} fn The function that is called on each element of the\n * set.\n * @param {Object} ctx An optional object that can be used as the context\n * for the function fn.\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.map = function (fn, ctx) {\n return this.elements.map(fn, ctx)\n}\n\n/**\n * Executes a provided function once per sorted set element.\n *\n * Delegates to Array.prototype.forEach and has the same signature.\n *\n * @param {Function} fn The function that is called on each element of the\n * set.\n * @param {Object} ctx An optional object that can be used as the context\n * @memberOf SortedSet\n * for the function fn.\n */\nlunr.SortedSet.prototype.forEach = function (fn, ctx) {\n return this.elements.forEach(fn, ctx)\n}\n\n/**\n * Returns the index at which a given element can be found in the\n * sorted set, or -1 if it is not present.\n *\n * @param {Object} elem The object to locate in the sorted set.\n * @returns {Number}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.indexOf = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem === elem) return pivot\n\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem === elem) return pivot\n\n return -1\n}\n\n/**\n * Returns the position within the sorted set that an element should be\n * inserted at to maintain the current order of the set.\n *\n * This function assumes that the element to search for does not already exist\n * in the sorted set.\n *\n * @param {Object} elem The elem to find the position for in the set\n * @returns {Number}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.locationFor = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem > elem) return pivot\n if (pivotElem < elem) return pivot + 1\n}\n\n/**\n * Creates a new lunr.SortedSet that contains the elements in the intersection\n * of this set and the passed set.\n *\n * @param {lunr.SortedSet} otherSet The set to intersect with this set.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.intersect = function (otherSet) {\n var intersectSet = new lunr.SortedSet,\n i = 0, j = 0,\n a_len = this.length, b_len = otherSet.length,\n a = this.elements, b = otherSet.elements\n\n while (true) {\n if (i > a_len - 1 || j > b_len - 1) break\n\n if (a[i] === b[j]) {\n intersectSet.add(a[i])\n i++, j++\n continue\n }\n\n if (a[i] < b[j]) {\n i++\n continue\n }\n\n if (a[i] > b[j]) {\n j++\n continue\n }\n };\n\n return intersectSet\n}\n\n/**\n * Makes a copy of this set\n *\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.clone = function () {\n var clone = new lunr.SortedSet\n\n clone.elements = this.toArray()\n clone.length = clone.elements.length\n\n return clone\n}\n\n/**\n * Creates a new lunr.SortedSet that contains the elements in the union\n * of this set and the passed set.\n *\n * @param {lunr.SortedSet} otherSet The set to union with this set.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.union = function (otherSet) {\n var longSet, shortSet, unionSet\n\n if (this.length >= otherSet.length) {\n longSet = this, shortSet = otherSet\n } else {\n longSet = otherSet, shortSet = this\n }\n\n unionSet = longSet.clone()\n\n for(var i = 0, shortSetElements = shortSet.toArray(); i < shortSetElements.length; i++){\n unionSet.add(shortSetElements[i])\n }\n\n return unionSet\n}\n\n/**\n * Returns a representation of the sorted set ready for serialisation.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.toJSON = function () {\n return this.toArray()\n}\n/*!\n * lunr.Index\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Index is object that manages a search index. It contains the indexes\n * and stores all the tokens and document lookups. It also provides the main\n * user facing API for the library.\n *\n * @constructor\n */\nlunr.Index = function () {\n this._fields = []\n this._ref = 'id'\n this.pipeline = new lunr.Pipeline\n this.documentStore = new lunr.Store\n this.tokenStore = new lunr.TokenStore\n this.corpusTokens = new lunr.SortedSet\n this.eventEmitter = new lunr.EventEmitter\n this.tokenizerFn = lunr.tokenizer\n\n this._idfCache = {}\n\n this.on('add', 'remove', 'update', (function () {\n this._idfCache = {}\n }).bind(this))\n}\n\n/**\n * Bind a handler to events being emitted by the index.\n *\n * The handler can be bound to many events at the same time.\n *\n * @param {String} [eventName] The name(s) of events to bind the function to.\n * @param {Function} fn The serialised set to load.\n * @memberOf Index\n */\nlunr.Index.prototype.on = function () {\n var args = Array.prototype.slice.call(arguments)\n return this.eventEmitter.addListener.apply(this.eventEmitter, args)\n}\n\n/**\n * Removes a handler from an event being emitted by the index.\n *\n * @param {String} eventName The name of events to remove the function from.\n * @param {Function} fn The serialised set to load.\n * @memberOf Index\n */\nlunr.Index.prototype.off = function (name, fn) {\n return this.eventEmitter.removeListener(name, fn)\n}\n\n/**\n * Loads a previously serialised index.\n *\n * Issues a warning if the index being imported was serialised\n * by a different version of lunr.\n *\n * @param {Object} serialisedData The serialised set to load.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.load = function (serialisedData) {\n if (serialisedData.version !== lunr.version) {\n lunr.utils.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version)\n }\n\n var idx = new this\n\n idx._fields = serialisedData.fields\n idx._ref = serialisedData.ref\n\n idx.tokenizer(lunr.tokenizer.load(serialisedData.tokenizer))\n idx.documentStore = lunr.Store.load(serialisedData.documentStore)\n idx.tokenStore = lunr.TokenStore.load(serialisedData.tokenStore)\n idx.corpusTokens = lunr.SortedSet.load(serialisedData.corpusTokens)\n idx.pipeline = lunr.Pipeline.load(serialisedData.pipeline)\n\n return idx\n}\n\n/**\n * Adds a field to the list of fields that will be searchable within documents\n * in the index.\n *\n * An optional boost param can be passed to affect how much tokens in this field\n * rank in search results, by default the boost value is 1.\n *\n * Fields should be added before any documents are added to the index, fields\n * that are added after documents are added to the index will only apply to new\n * documents added to the index.\n *\n * @param {String} fieldName The name of the field within the document that\n * should be indexed\n * @param {Number} boost An optional boost that can be applied to terms in this\n * field.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.field = function (fieldName, opts) {\n var opts = opts || {},\n field = { name: fieldName, boost: opts.boost || 1 }\n\n this._fields.push(field)\n return this\n}\n\n/**\n * Sets the property used to uniquely identify documents added to the index,\n * by default this property is 'id'.\n *\n * This should only be changed before adding documents to the index, changing\n * the ref property without resetting the index can lead to unexpected results.\n *\n * The value of ref can be of any type but it _must_ be stably comparable and\n * orderable.\n *\n * @param {String} refName The property to use to uniquely identify the\n * documents in the index.\n * @param {Boolean} emitEvent Whether to emit add events, defaults to true\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.ref = function (refName) {\n this._ref = refName\n return this\n}\n\n/**\n * Sets the tokenizer used for this index.\n *\n * By default the index will use the default tokenizer, lunr.tokenizer. The tokenizer\n * should only be changed before adding documents to the index. Changing the tokenizer\n * without re-building the index can lead to unexpected results.\n *\n * @param {Function} fn The function to use as a tokenizer.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.tokenizer = function (fn) {\n var isRegistered = fn.label && (fn.label in lunr.tokenizer.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not a registered tokenizer. This may cause problems when serialising the index')\n }\n\n this.tokenizerFn = fn\n return this\n}\n\n/**\n * Add a document to the index.\n *\n * This is the way new documents enter the index, this function will run the\n * fields from the document through the index's pipeline and then add it to\n * the index, it will then show up in search results.\n *\n * An 'add' event is emitted with the document that has been added and the index\n * the document has been added to. This event can be silenced by passing false\n * as the second argument to add.\n *\n * @param {Object} doc The document to add to the index.\n * @param {Boolean} emitEvent Whether or not to emit events, default true.\n * @memberOf Index\n */\nlunr.Index.prototype.add = function (doc, emitEvent) {\n var docTokens = {},\n allDocumentTokens = new lunr.SortedSet,\n docRef = doc[this._ref],\n emitEvent = emitEvent === undefined ? true : emitEvent\n\n this._fields.forEach(function (field) {\n var fieldTokens = this.pipeline.run(this.tokenizerFn(doc[field.name]))\n\n docTokens[field.name] = fieldTokens\n\n for (var i = 0; i < fieldTokens.length; i++) {\n var token = fieldTokens[i]\n allDocumentTokens.add(token)\n this.corpusTokens.add(token)\n }\n }, this)\n\n this.documentStore.set(docRef, allDocumentTokens)\n\n for (var i = 0; i < allDocumentTokens.length; i++) {\n var token = allDocumentTokens.elements[i]\n var tf = 0;\n\n for (var j = 0; j < this._fields.length; j++){\n var field = this._fields[j]\n var fieldTokens = docTokens[field.name]\n var fieldLength = fieldTokens.length\n\n if (!fieldLength) continue\n\n var tokenCount = 0\n for (var k = 0; k < fieldLength; k++){\n if (fieldTokens[k] === token){\n tokenCount++\n }\n }\n\n tf += (tokenCount / fieldLength * field.boost)\n }\n\n this.tokenStore.add(token, { ref: docRef, tf: tf })\n };\n\n if (emitEvent) this.eventEmitter.emit('add', doc, this)\n}\n\n/**\n * Removes a document from the index.\n *\n * To make sure documents no longer show up in search results they can be\n * removed from the index using this method.\n *\n * The document passed only needs to have the same ref property value as the\n * document that was added to the index, they could be completely different\n * objects.\n *\n * A 'remove' event is emitted with the document that has been removed and the index\n * the document has been removed from. This event can be silenced by passing false\n * as the second argument to remove.\n *\n * @param {Object} doc The document to remove from the index.\n * @param {Boolean} emitEvent Whether to emit remove events, defaults to true\n * @memberOf Index\n */\nlunr.Index.prototype.remove = function (doc, emitEvent) {\n var docRef = doc[this._ref],\n emitEvent = emitEvent === undefined ? true : emitEvent\n\n if (!this.documentStore.has(docRef)) return\n\n var docTokens = this.documentStore.get(docRef)\n\n this.documentStore.remove(docRef)\n\n docTokens.forEach(function (token) {\n this.tokenStore.remove(token, docRef)\n }, this)\n\n if (emitEvent) this.eventEmitter.emit('remove', doc, this)\n}\n\n/**\n * Updates a document in the index.\n *\n * When a document contained within the index gets updated, fields changed,\n * added or removed, to make sure it correctly matched against search queries,\n * it should be updated in the index.\n *\n * This method is just a wrapper around `remove` and `add`\n *\n * An 'update' event is emitted with the document that has been updated and the index.\n * This event can be silenced by passing false as the second argument to update. Only\n * an update event will be fired, the 'add' and 'remove' events of the underlying calls\n * are silenced.\n *\n * @param {Object} doc The document to update in the index.\n * @param {Boolean} emitEvent Whether to emit update events, defaults to true\n * @see Index.prototype.remove\n * @see Index.prototype.add\n * @memberOf Index\n */\nlunr.Index.prototype.update = function (doc, emitEvent) {\n var emitEvent = emitEvent === undefined ? true : emitEvent\n\n this.remove(doc, false)\n this.add(doc, false)\n\n if (emitEvent) this.eventEmitter.emit('update', doc, this)\n}\n\n/**\n * Calculates the inverse document frequency for a token within the index.\n *\n * @param {String} token The token to calculate the idf of.\n * @see Index.prototype.idf\n * @private\n * @memberOf Index\n */\nlunr.Index.prototype.idf = function (term) {\n var cacheKey = \"@\" + term\n if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) return this._idfCache[cacheKey]\n\n var documentFrequency = this.tokenStore.count(term),\n idf = 1\n\n if (documentFrequency > 0) {\n idf = 1 + Math.log(this.documentStore.length / documentFrequency)\n }\n\n return this._idfCache[cacheKey] = idf\n}\n\n/**\n * Searches the index using the passed query.\n *\n * Queries should be a string, multiple words are allowed and will lead to an\n * AND based query, e.g. `idx.search('foo bar')` will run a search for\n * documents containing both 'foo' and 'bar'.\n *\n * All query tokens are passed through the same pipeline that document tokens\n * are passed through, so any language processing involved will be run on every\n * query term.\n *\n * Each query term is expanded, so that the term 'he' might be expanded to\n * 'hello' and 'help' if those terms were already included in the index.\n *\n * Matching documents are returned as an array of objects, each object contains\n * the matching document ref, as set for this index, and the similarity score\n * for this document against the query.\n *\n * @param {String} query The query to search the index with.\n * @returns {Object}\n * @see Index.prototype.idf\n * @see Index.prototype.documentVector\n * @memberOf Index\n */\nlunr.Index.prototype.search = function (query) {\n var queryTokens = this.pipeline.run(this.tokenizerFn(query)),\n queryVector = new lunr.Vector,\n documentSets = [],\n fieldBoosts = this._fields.reduce(function (memo, f) { return memo + f.boost }, 0)\n\n var hasSomeToken = queryTokens.some(function (token) {\n return this.tokenStore.has(token)\n }, this)\n\n if (!hasSomeToken) return []\n\n queryTokens\n .forEach(function (token, i, tokens) {\n var tf = 1 / tokens.length * this._fields.length * fieldBoosts,\n self = this\n\n var set = this.tokenStore.expand(token).reduce(function (memo, key) {\n var pos = self.corpusTokens.indexOf(key),\n idf = self.idf(key),\n similarityBoost = 1,\n set = new lunr.SortedSet\n\n // if the expanded key is not an exact match to the token then\n // penalise the score for this key by how different the key is\n // to the token.\n if (key !== token) {\n var diff = Math.max(3, key.length - token.length)\n similarityBoost = 1 / Math.log(diff)\n }\n\n // calculate the query tf-idf score for this token\n // applying an similarityBoost to ensure exact matches\n // these rank higher than expanded terms\n if (pos > -1) queryVector.insert(pos, tf * idf * similarityBoost)\n\n // add all the documents that have this key into a set\n // ensuring that the type of key is preserved\n var matchingDocuments = self.tokenStore.get(key),\n refs = Object.keys(matchingDocuments),\n refsLen = refs.length\n\n for (var i = 0; i < refsLen; i++) {\n set.add(matchingDocuments[refs[i]].ref)\n }\n\n return memo.union(set)\n }, new lunr.SortedSet)\n\n documentSets.push(set)\n }, this)\n\n var documentSet = documentSets.reduce(function (memo, set) {\n return memo.intersect(set)\n })\n\n return documentSet\n .map(function (ref) {\n return { ref: ref, score: queryVector.similarity(this.documentVector(ref)) }\n }, this)\n .sort(function (a, b) {\n return b.score - a.score\n })\n}\n\n/**\n * Generates a vector containing all the tokens in the document matching the\n * passed documentRef.\n *\n * The vector contains the tf-idf score for each token contained in the\n * document with the passed documentRef. The vector will contain an element\n * for every token in the indexes corpus, if the document does not contain that\n * token the element will be 0.\n *\n * @param {Object} documentRef The ref to find the document with.\n * @returns {lunr.Vector}\n * @private\n * @memberOf Index\n */\nlunr.Index.prototype.documentVector = function (documentRef) {\n var documentTokens = this.documentStore.get(documentRef),\n documentTokensLength = documentTokens.length,\n documentVector = new lunr.Vector\n\n for (var i = 0; i < documentTokensLength; i++) {\n var token = documentTokens.elements[i],\n tf = this.tokenStore.get(token)[documentRef].tf,\n idf = this.idf(token)\n\n documentVector.insert(this.corpusTokens.indexOf(token), tf * idf)\n };\n\n return documentVector\n}\n\n/**\n * Returns a representation of the index ready for serialisation.\n *\n * @returns {Object}\n * @memberOf Index\n */\nlunr.Index.prototype.toJSON = function () {\n return {\n version: lunr.version,\n fields: this._fields,\n ref: this._ref,\n tokenizer: this.tokenizerFn.label,\n documentStore: this.documentStore.toJSON(),\n tokenStore: this.tokenStore.toJSON(),\n corpusTokens: this.corpusTokens.toJSON(),\n pipeline: this.pipeline.toJSON()\n }\n}\n\n/**\n * Applies a plugin to the current index.\n *\n * A plugin is a function that is called with the index as its context.\n * Plugins can be used to customise or extend the behaviour the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied to the index.\n *\n * The plugin function will be called with the index as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index as its context.\n *\n * Example:\n *\n * var myPlugin = function (idx, arg1, arg2) {\n * // `this` is the index to be extended\n * // apply any extensions etc here.\n * }\n *\n * var idx = lunr(function () {\n * this.use(myPlugin, 'arg1', 'arg2')\n * })\n *\n * @param {Function} plugin The plugin to apply.\n * @memberOf Index\n */\nlunr.Index.prototype.use = function (plugin) {\n var args = Array.prototype.slice.call(arguments, 1)\n args.unshift(this)\n plugin.apply(this, args)\n}\n/*!\n * lunr.Store\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Store is a simple key-value store used for storing sets of tokens for\n * documents stored in index.\n *\n * @constructor\n * @module\n */\nlunr.Store = function () {\n this.store = {}\n this.length = 0\n}\n\n/**\n * Loads a previously serialised store\n *\n * @param {Object} serialisedData The serialised store to load.\n * @returns {lunr.Store}\n * @memberOf Store\n */\nlunr.Store.load = function (serialisedData) {\n var store = new this\n\n store.length = serialisedData.length\n store.store = Object.keys(serialisedData.store).reduce(function (memo, key) {\n memo[key] = lunr.SortedSet.load(serialisedData.store[key])\n return memo\n }, {})\n\n return store\n}\n\n/**\n * Stores the given tokens in the store against the given id.\n *\n * @param {Object} id The key used to store the tokens against.\n * @param {Object} tokens The tokens to store against the key.\n * @memberOf Store\n */\nlunr.Store.prototype.set = function (id, tokens) {\n if (!this.has(id)) this.length++\n this.store[id] = tokens\n}\n\n/**\n * Retrieves the tokens from the store for a given key.\n *\n * @param {Object} id The key to lookup and retrieve from the store.\n * @returns {Object}\n * @memberOf Store\n */\nlunr.Store.prototype.get = function (id) {\n return this.store[id]\n}\n\n/**\n * Checks whether the store contains a key.\n *\n * @param {Object} id The id to look up in the store.\n * @returns {Boolean}\n * @memberOf Store\n */\nlunr.Store.prototype.has = function (id) {\n return id in this.store\n}\n\n/**\n * Removes the value for a key in the store.\n *\n * @param {Object} id The id to remove from the store.\n * @memberOf Store\n */\nlunr.Store.prototype.remove = function (id) {\n if (!this.has(id)) return\n\n delete this.store[id]\n this.length--\n}\n\n/**\n * Returns a representation of the store ready for serialisation.\n *\n * @returns {Object}\n * @memberOf Store\n */\nlunr.Store.prototype.toJSON = function () {\n return {\n store: this.store,\n length: this.length\n }\n}\n\n/*!\n * lunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @module\n * @param {String} str The string to stem\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.stemmer = (function(){\n var step2list = {\n \"ational\" : \"ate\",\n \"tional\" : \"tion\",\n \"enci\" : \"ence\",\n \"anci\" : \"ance\",\n \"izer\" : \"ize\",\n \"bli\" : \"ble\",\n \"alli\" : \"al\",\n \"entli\" : \"ent\",\n \"eli\" : \"e\",\n \"ousli\" : \"ous\",\n \"ization\" : \"ize\",\n \"ation\" : \"ate\",\n \"ator\" : \"ate\",\n \"alism\" : \"al\",\n \"iveness\" : \"ive\",\n \"fulness\" : \"ful\",\n \"ousness\" : \"ous\",\n \"aliti\" : \"al\",\n \"iviti\" : \"ive\",\n \"biliti\" : \"ble\",\n \"logi\" : \"log\"\n },\n\n step3list = {\n \"icate\" : \"ic\",\n \"ative\" : \"\",\n \"alize\" : \"al\",\n \"iciti\" : \"ic\",\n \"ical\" : \"ic\",\n \"ful\" : \"\",\n \"ness\" : \"\"\n },\n\n c = \"[^aeiou]\", // consonant\n v = \"[aeiouy]\", // vowel\n C = c + \"[^aeiouy]*\", // consonant sequence\n V = v + \"[aeiou]*\", // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C, // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\", // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C, // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var porterStemmer = function porterStemmer(w) {\n var stem,\n suffix,\n firstch,\n re,\n re2,\n re3,\n re4;\n\n if (w.length < 3) { return w; }\n\n firstch = w.substr(0,1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a\n re2 = re2_1a;\n\n if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) { w = w + \"e\"; }\n else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n else if (re4.test(w)) { w = w + \"e\"; }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n w = stem;\n }\n }\n\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return porterStemmer;\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @module\n * @param {Array} token The token to pass through the filter\n * @returns {Function}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord\n return memo\n }, {})\n\n return function (token) {\n if (token && words[token] !== token) return token\n }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n 'a',\n 'able',\n 'about',\n 'across',\n 'after',\n 'all',\n 'almost',\n 'also',\n 'am',\n 'among',\n 'an',\n 'and',\n 'any',\n 'are',\n 'as',\n 'at',\n 'be',\n 'because',\n 'been',\n 'but',\n 'by',\n 'can',\n 'cannot',\n 'could',\n 'dear',\n 'did',\n 'do',\n 'does',\n 'either',\n 'else',\n 'ever',\n 'every',\n 'for',\n 'from',\n 'get',\n 'got',\n 'had',\n 'has',\n 'have',\n 'he',\n 'her',\n 'hers',\n 'him',\n 'his',\n 'how',\n 'however',\n 'i',\n 'if',\n 'in',\n 'into',\n 'is',\n 'it',\n 'its',\n 'just',\n 'least',\n 'let',\n 'like',\n 'likely',\n 'may',\n 'me',\n 'might',\n 'most',\n 'must',\n 'my',\n 'neither',\n 'no',\n 'nor',\n 'not',\n 'of',\n 'off',\n 'often',\n 'on',\n 'only',\n 'or',\n 'other',\n 'our',\n 'own',\n 'rather',\n 'said',\n 'say',\n 'says',\n 'she',\n 'should',\n 'since',\n 'so',\n 'some',\n 'than',\n 'that',\n 'the',\n 'their',\n 'them',\n 'then',\n 'there',\n 'these',\n 'they',\n 'this',\n 'tis',\n 'to',\n 'too',\n 'twas',\n 'us',\n 'wants',\n 'was',\n 'we',\n 'were',\n 'what',\n 'when',\n 'where',\n 'which',\n 'while',\n 'who',\n 'whom',\n 'why',\n 'will',\n 'with',\n 'would',\n 'yet',\n 'you',\n 'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the begining and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n return token.replace(/^\\W+/, '').replace(/\\W+$/, '')\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.TokenStore is used for efficient storing and lookup of the reverse\n * index of token to document ref.\n *\n * @constructor\n */\nlunr.TokenStore = function () {\n this.root = { docs: {} }\n this.length = 0\n}\n\n/**\n * Loads a previously serialised token store\n *\n * @param {Object} serialisedData The serialised token store to load.\n * @returns {lunr.TokenStore}\n * @memberOf TokenStore\n */\nlunr.TokenStore.load = function (serialisedData) {\n var store = new this\n\n store.root = serialisedData.root\n store.length = serialisedData.length\n\n return store\n}\n\n/**\n * Adds a new token doc pair to the store.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to store the doc under\n * @param {Object} doc The doc to store against the token\n * @param {Object} root An optional node at which to start looking for the\n * correct place to enter the doc, by default the root of this lunr.TokenStore\n * is used.\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.add = function (token, doc, root) {\n var root = root || this.root,\n key = token.charAt(0),\n rest = token.slice(1)\n\n if (!(key in root)) root[key] = {docs: {}}\n\n if (rest.length === 0) {\n root[key].docs[doc.ref] = doc\n this.length += 1\n return\n } else {\n return this.add(rest, doc, root[key])\n }\n}\n\n/**\n * Checks whether this key is contained within this lunr.TokenStore.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to check for\n * @param {Object} root An optional node at which to start\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.has = function (token) {\n if (!token) return false\n\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token.charAt(i)]) return false\n\n node = node[token.charAt(i)]\n }\n\n return true\n}\n\n/**\n * Retrieve a node from the token store for a given token.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the node for.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @see TokenStore.prototype.get\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.getNode = function (token) {\n if (!token) return {}\n\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token.charAt(i)]) return {}\n\n node = node[token.charAt(i)]\n }\n\n return node\n}\n\n/**\n * Retrieve the documents for a node for the given token.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the documents for.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.get = function (token, root) {\n return this.getNode(token, root).docs || {}\n}\n\nlunr.TokenStore.prototype.count = function (token, root) {\n return Object.keys(this.get(token, root)).length\n}\n\n/**\n * Remove the document identified by ref from the token in the store.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the documents for.\n * @param {String} ref The ref of the document to remove from this token.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.remove = function (token, ref) {\n if (!token) return\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!(token.charAt(i) in node)) return\n node = node[token.charAt(i)]\n }\n\n delete node.docs[ref]\n}\n\n/**\n * Find all the possible suffixes of the passed token using tokens\n * currently in the store.\n *\n * @param {String} token The token to expand.\n * @returns {Array}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.expand = function (token, memo) {\n var root = this.getNode(token),\n docs = root.docs || {},\n memo = memo || []\n\n if (Object.keys(docs).length) memo.push(token)\n\n Object.keys(root)\n .forEach(function (key) {\n if (key === 'docs') return\n\n memo.concat(this.expand(token + key, memo))\n }, this)\n\n return memo\n}\n\n/**\n * Returns a representation of the token store ready for serialisation.\n *\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.toJSON = function () {\n return {\n root: this.root,\n length: this.length\n }\n}\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory)\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory()\n } else {\n // Browser globals (root is window)\n root.lunr = factory()\n }\n }(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr\n }))\n})();\n\n\n\n// WEBPACK FOOTER //\n// ./node_modules/lunr/lunr.js","const lunr = require('lunr');\nconst STOPWORDS = ['a', 'and', 'the', 'but', 'or', 'is', 'at', 'be', 'by'];\n\nvar index = lunr(function () {\n this.field('title', {boost: 10});\n this.field('contents');\n this.field('summary');\n this.field('tokens');\n});\nlunr.stopWordFilter = lunr.generateStopWordFilter(STOPWORDS);\ndelete lunr.Pipeline.registeredFunctions.stopWordFilter;\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter');\n\nconst addItemToIndex = function(item) {\n if (item.hide && !item.searchable) return;\n var doc = {\n id: item.path,\n title: item.fullTitle || item.title,\n summary: item.summary,\n contents: item.contents,\n }\n doc.tokens = doc.title.replace(/\\W/, ' ');\n index.add(doc);\n if (item.children) item.children.forEach(function(c) { addItemToIndex(c) });\n}\n\nself.addEventListener('message', function (e) {\n e.data.items.forEach(function(item) {\n addItemToIndex(item);\n });\n self.postMessage(JSON.stringify({\n requestID: e.data.requestID,\n index: index.toJSON()\n }));\n}, false);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/lunr_worker.js\n// module id = ./src/app/lunr_worker.js\n// module chunks = main"],"sourceRoot":"webpack:///"}