{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 5d4776140a8b2573e895","webpack:///./src/helpers/is_array.js","webpack:///./src/bitap/index.js","webpack:///./src/helpers/deep_value.js","webpack:///./src/bitap/bitap_matched_indices.js","webpack:///./src/bitap/bitap_pattern_alphabet.js","webpack:///./src/bitap/bitap_regex_search.js","webpack:///./src/bitap/bitap_score.js","webpack:///./src/bitap/bitap_search.js","webpack:///./src/index.js"],"names":["module","exports","obj","Object","prototype","toString","call","bitapRegexSearch","require","bitapSearch","patternAlphabet","Bitap","pattern","location","distance","threshold","maxPatternLength","isCaseSensitive","tokenSeparator","findAllMatches","minMatchCharLength","options","toLowerCase","length","text","isMatch","score","matchedIndices","isArray","deepValue","path","list","push","dotIndex","indexOf","firstSegment","remaining","slice","value","undefined","i","len","matchmask","start","end","match","mask","charAt","matches","RegExp","replace","matchesLen","isMatched","errors","currentLocation","expectedLocation","accuracy","proximity","Math","abs","bitapScore","textLen","currentThreshold","bestLocation","patternLen","matchMask","min","lastIndexOf","lastBitArr","finalScore","binMax","locations","binMin","binMid","floor","max","finish","bitArr","Array","j","charMatch","Fuse","caseSensitive","id","keys","shouldSort","getFn","sortFn","a","b","tokenize","matchAllTokens","includeMatches","includeScore","verbose","set","_log","_prepareSearchers","tokenSearchers","fullSearcher","_search","weights","results","_computeScore","_sort","_format","tokens","split","resultMap","_analyze","key","record","index","item","keysLen","name","weight","Error","exists","averageScore","numTextMatches","mainSearchResult","search","words","scores","tokenSearcher","hasMatchInText","word","tokenSearchResult","scoresLen","checkTextMatches","existingResult","output","scoreLen","totalScore","bestScore","nScore","sort","finalOutput","transformers","result","data","indices","log","arguments"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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;;;2BAEO;AACN,UAAI,KAAKrH,OAAL,CAAayE,OAAjB,EAA0B;AAAA;;AACxB,6BAAQiD,GAAR,iBAAeC,SAAf;AACD;AACF;;;;;;AAGHhJ,OAAOC,OAAP,GAAiBgF,IAAjB,C","file":"fuse.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Fuse\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Fuse\"] = factory();\n\telse\n\t\troot[\"Fuse\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\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 = 8);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5d4776140a8b2573e895","module.exports = (obj) => {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\n\n// WEBPACK FOOTER //\n// ./src/helpers/is_array.js","const bitapRegexSearch = require('./bitap_regex_search')\nconst bitapSearch = require('./bitap_search')\nconst patternAlphabet = require('./bitap_pattern_alphabet')\n\nclass Bitap {\n constructor (pattern, { \n // Approximately where in the text is the pattern expected to be found?\n location = 0, \n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance = 100, \n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold = 0.6, \n // Machine word size\n maxPatternLength = 32,\n // Indicates whether comparisons should be case sensitive.\n isCaseSensitive = false,\n // Regex used to separate words when searching. Only applicable when `tokenize` is `true`.\n tokenSeparator = / +/g,\n // When true, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n findAllMatches = false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength = 1\n }) {\n this.options = {\n location,\n distance,\n threshold,\n maxPatternLength,\n isCaseSensitive,\n tokenSeparator,\n findAllMatches,\n minMatchCharLength\n }\n\n this.pattern = this.options.isCaseSensitive ? pattern : pattern.toLowerCase()\n\n if (this.pattern.length <= maxPatternLength) {\n this.patternAlphabet = patternAlphabet(this.pattern)\n }\n }\n\n search (text) {\n if (!this.options.isCaseSensitive) {\n text = text.toLowerCase()\n }\n\n // Exact match\n if (this.pattern === text) {\n return {\n isMatch: true,\n score: 0,\n matchedIndices: [[0, text.length - 1]]\n }\n }\n\n // When pattern length is greater than the machine word length, just do a a regex comparison\n const { maxPatternLength, tokenSeparator } = this.options\n if (this.pattern.length > maxPatternLength) {\n return bitapRegexSearch(text, this.pattern, tokenSeparator)\n }\n\n // Otherwise, use Bitap algorithm\n const { location, distance, threshold, findAllMatches, minMatchCharLength } = this.options\n return bitapSearch(text, this.pattern, this.patternAlphabet, {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength\n })\n }\n}\n\nmodule.exports = Bitap\n\n\n// WEBPACK FOOTER //\n// ./src/bitap/index.js","const isArray = require('./is_array')\n\nconst deepValue = (obj, path, list) => {\n if (!path) {\n // If there's no path left, we've gotten to the object we care about.\n list.push(obj)\n } else {\n const dotIndex = path.indexOf('.')\n let firstSegment = path\n let remaining = null\n\n if (dotIndex !== -1) {\n firstSegment = path.slice(0, dotIndex)\n remaining = path.slice(dotIndex + 1)\n }\n\n const value = obj[firstSegment]\n \n if (value !== null && value !== undefined) {\n if (!remaining && (typeof value === 'string' || typeof value === 'number')) {\n list.push(value)\n } else if (isArray(value)) {\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepValue(value[i], remaining, list)\n }\n } else if (remaining) {\n // An object. Recurse further.\n deepValue(value, remaining, list)\n }\n }\n }\n\n return list\n}\n\nmodule.exports = (obj, path) => {\n return deepValue(obj, path, [])\n}\n\n\n// WEBPACK FOOTER //\n// ./src/helpers/deep_value.js","module.exports = (matchmask = [], minMatchCharLength = 1) => {\n let matchedIndices = []\n let start = -1\n let end = -1\n let i = 0\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i]\n if (match && start === -1) {\n start = i\n } else if (!match && start !== -1) {\n end = i - 1\n if ((end - start) + 1 >= minMatchCharLength) {\n matchedIndices.push([start, end])\n }\n start = -1\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && (i - start) >= minMatchCharLength) {\n matchedIndices.push([start, i - 1])\n }\n\n return matchedIndices\n}\n\n\n// WEBPACK FOOTER //\n// ./src/bitap/bitap_matched_indices.js","module.exports = (pattern) => {\n let mask = {}\n let len = pattern.length\n\n for (let i = 0; i < len; i += 1) {\n mask[pattern.charAt(i)] = 0\n }\n\n for (let i = 0; i < len; i += 1) {\n mask[pattern.charAt(i)] |= 1 << (len - i - 1)\n }\n\n return mask\n}\n\n\n// WEBPACK FOOTER //\n// ./src/bitap/bitap_pattern_alphabet.js","module.exports = (text, pattern, tokenSeparator = / +/g) => {\n let matches = text.match(new RegExp(pattern.replace(tokenSeparator, '|')))\n let isMatch = !!matches\n let matchedIndices = []\n\n if (isMatch) {\n for (i = 0, matchesLen = matches.length; i < matchesLen; i += 1) {\n match = matches[i]\n matchedIndices.push([text.indexOf(match), match.length - 1])\n }\n }\n \n return {\n // TODO: revisit this score\n score: isMatched ? 0.5 : 1,\n isMatch,\n matchedIndices\n } \n}\n\n\n// WEBPACK FOOTER //\n// ./src/bitap/bitap_regex_search.js","module.exports = (pattern, { errors = 0, currentLocation = 0, expectedLocation = 0, distance = 100 }) => {\n const accuracy = errors / pattern.length\n const proximity = Math.abs(expectedLocation - currentLocation)\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + (proximity / distance)\n}\n\n\n// WEBPACK FOOTER //\n// ./src/bitap/bitap_score.js","const bitapScore = require('./bitap_score')\nconst matchedIndices = require('./bitap_matched_indices')\n\nmodule.exports = (text, pattern, patternAlphabet, { location = 0, distance = 100, threshold = 0.6, findAllMatches = false, minMatchCharLength = 1 }) => {\n const expectedLocation = location\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length\n // Highest score beyond which we give up.\n let currentThreshold = threshold\n // Is there a nearby exact match? (speedup)\n let bestLocation = text.indexOf(pattern, expectedLocation)\n\n const patternLen = pattern.length\n\n // a mask of the matches\n const matchMask = []\n for (let i = 0; i < textLen; i += 1) {\n matchMask[i] = 0\n }\n\n if (bestLocation != -1) {\n let score = bitapScore(pattern, { \n errors: 0, \n currentLocation: bestLocation, \n expectedLocation, \n distance \n })\n currentThreshold = Math.min(score, currentThreshold)\n\n // What about in the other direction? (speed up)\n bestLocation = text.lastIndexOf(pattern, expectedLocation + patternLen)\n\n if (bestLocation != -1) {\n let score = bitapScore(pattern, { \n errors: 0, \n currentLocation: bestLocation, \n expectedLocation, \n distance\n })\n currentThreshold = Math.min(score, currentThreshold)\n }\n }\n\n // Reset the best location\n bestLocation = -1\n\n let lastBitArr = []\n let finalScore = 1\n let binMax = patternLen + textLen\n\n const locations = []\n const mask = 1 << (patternLen - 1)\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0\n let binMid = binMax\n\n while (binMin < binMid) {\n const score = bitapScore(pattern, { \n errors: i, \n currentLocation: expectedLocation + binMid, \n expectedLocation, \n distance \n })\n\n if (score <= currentThreshold) {\n binMin = binMid\n } else {\n binMax = binMid\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin)\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid\n\n let start = Math.max(1, expectedLocation - binMid + 1)\n let finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen\n\n // Initialize the bit array\n let bitArr = Array(finish + 2)\n\n bitArr[finish + 1] = (1 << i) - 1\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1\n let charMatch = patternAlphabet[text.charAt(currentLocation)]\n\n if (charMatch) {\n matchMask[currentLocation] = 1\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch\n\n // Subsequent passes: fuzzy match\n if (i !== 0) {\n bitArr[j] |= (((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1) | lastBitArr[j + 1]\n }\n \n if (bitArr[j] & mask) {\n finalScore = bitapScore(pattern, { \n errors: i, \n currentLocation, \n expectedLocation, \n distance \n })\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore\n bestLocation = currentLocation\n locations.push(bestLocation)\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation)\n }\n }\n }\n\n // No hope for a (better) match at greater error levels. \n const score = bitapScore(pattern, { \n errors: i + 1, \n currentLocation: expectedLocation, \n expectedLocation, \n distance \n })\n \n if (score > currentThreshold) {\n break\n }\n \n lastBitArr = bitArr\n }\n\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n return {\n isMatch: bestLocation >= 0,\n score: finalScore === 0 ? 0.001 : finalScore,\n matchedIndices: matchedIndices(matchMask, minMatchCharLength)\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./src/bitap/bitap_search.js","const Bitap = require('./bitap')\nconst deepValue = require('./helpers/deep_value')\nconst isArray = require('./helpers/is_array')\n\nclass Fuse {\n constructor (list, { \n // Approximately where in the text is the pattern expected to be found?\n location = 0, \n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance = 100, \n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold = 0.6, \n // Machine word size\n maxPatternLength = 32,\n // Indicates whether comparisons should be case sensitive.\n caseSensitive = false,\n // Regex used to separate words when searching. Only applicable when `tokenize` is `true`.\n tokenSeparator = / +/g,\n // When true, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n findAllMatches = false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength = 1,\n // The name of the identifier property. If specified, the returned result will be a list\n // of the items' dentifiers, otherwise it will be a list of the items.\n id = null,\n // List of properties that will be searched. This also supports nested properties.\n keys = [],\n // Whether to sort the result list, by score\n shouldSort = true,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn = deepValue,\n // Default sort function\n sortFn = (a, b) => (a.score - b.score),\n // When true, the search algorithm will search individual words **and** the full string,\n // computing the final score as a function of both. Note that when `tokenize` is `true`,\n // the `threshold`, `distance`, and `location` are inconsequential for individual tokens.\n tokenize = false,\n // When true, the result set will only include records that match all tokens. Will only work\n // if `tokenize` is also true.\n matchAllTokens = false,\n // Will print to the console. Useful for debugging.\n\n includeMatches = false,\n includeScore = false,\n\n verbose = false\n }) {\n this.options = {\n location,\n distance,\n threshold,\n maxPatternLength,\n isCaseSensitive: caseSensitive,\n tokenSeparator,\n findAllMatches,\n minMatchCharLength,\n id,\n keys,\n includeMatches,\n includeScore,\n shouldSort,\n getFn,\n sortFn,\n verbose,\n tokenize,\n matchAllTokens\n }\n\n this.set(list)\n }\n\n set (list) {\n this.list = list\n return list\n }\n\n search (pattern) {\n this._log(`---------\\nSearch pattern: \"${pattern}\"`)\n\n const {\n tokenSearchers,\n fullSearcher\n } = this._prepareSearchers(pattern)\n\n let { weights, results } = this._search(tokenSearchers, fullSearcher)\n\n this._computeScore(weights, results)\n\n if (this.options.shouldSort) {\n this._sort(results)\n }\n \n return this._format(results)\n }\n\n _prepareSearchers (pattern = '') {\n const tokenSearchers = []\n\n if (this.options.tokenize) {\n // Tokenize on the separator\n const tokens = pattern.split(this.options.tokenSeparator)\n for (let i = 0, len = tokens.length; i < len; i += 1) {\n tokenSearchers.push(new Bitap(tokens[i], this.options))\n }\n }\n \n let fullSearcher = new Bitap(pattern, this.options)\n \n return { tokenSearchers, fullSearcher }\n }\n\n _search (tokenSearchers = [], fullSearcher) {\n const list = this.list\n const resultMap = {}\n const results = []\n\n // Check the first item in the list, if it's a string, then we assume\n // that every item in the list is also a string, and thus it's a flattened array.\n if (typeof list[0] === 'string') {\n // Iterate over every item\n for (let i = 0, len = list.length; i < len; i += 1) {\n this._analyze({\n key: '', \n value: list[i], \n record: i, \n index: i\n }, {\n resultMap, \n results,\n tokenSearchers,\n fullSearcher\n })\n }\n\n return { weights: null, results }\n }\n\n // Otherwise, the first item is an Object (hopefully), and thus the searching\n // is done on the values of the keys of each item.\n const weights = {}\n for (let i = 0, len = list.length; i < len; i += 1) {\n let item = list[i]\n // Iterate over every key\n for (let j = 0, keysLen = this.options.keys.length; j < keysLen; j += 1) {\n let key = this.options.keys[j]\n if (typeof key !== 'string') {\n weights[key.name] = {\n weight: (1 - key.weight) || 1\n }\n if (key.weight <= 0 || key.weight > 1) {\n throw new Error('Key weight has to be > 0 and <= 1')\n }\n key = key.name\n } else {\n weights[key] = {\n weight: 1\n }\n }\n\n this._analyze({\n key, \n value: this.options.getFn(item, key), \n record: item, \n index: i\n }, {\n resultMap, \n results,\n tokenSearchers, \n fullSearcher\n })\n }\n }\n\n return { weights, results }\n }\n\n _analyze ({ key, value, record, index }, { tokenSearchers = [], fullSearcher = [], resultMap = {}, results = [] }) {\n // Check if the texvaluet can be searched\n if (value === undefined || value === null) {\n return\n }\n\n let exists = false\n let averageScore = -1\n let numTextMatches = 0\n\n if (typeof value === 'string') {\n this._log(`\\nKey: ${key === '' ? '-': key}`)\n\n let mainSearchResult = fullSearcher.search(value)\n this._log(`Full text: \"${value}\", score: ${mainSearchResult.score}`)\n \n if (this.options.tokenize) {\n let words = value.split(this.options.tokenSeparator)\n let scores = []\n\n for (let i = 0; i < tokenSearchers.length; i += 1) {\n let tokenSearcher = tokenSearchers[i]\n\n this._log(`\\nPattern: \"${tokenSearcher.pattern}\"`)\n\n // let tokenScores = []\n let hasMatchInText = false\n\n for (let j = 0; j < words.length; j += 1) {\n let word = words[j]\n let tokenSearchResult = tokenSearcher.search(word)\n let obj = {}\n if (tokenSearchResult.isMatch) {\n obj[word] = tokenSearchResult.score\n exists = true\n hasMatchInText = true\n scores.push(tokenSearchResult.score)\n } else {\n obj[word] = 1\n if (!this.options.matchAllTokens) {\n scores.push(1)\n }\n }\n this._log(`Token: \"${word}\", score: ${obj[word]}`)\n // tokenScores.push(obj)\n }\n\n if (hasMatchInText) {\n numTextMatches += 1\n }\n }\n\n averageScore = scores[0]\n let scoresLen = scores.length\n for (let i = 1; i < scoresLen; i += 1) {\n averageScore += scores[i]\n }\n averageScore = averageScore / scoresLen\n\n this._log('Token score average:', averageScore)\n }\n\n let finalScore = mainSearchResult.score\n if (averageScore > -1) {\n finalScore = (finalScore + averageScore) / 2\n }\n\n this._log('Score average:', finalScore)\n\n let checkTextMatches = (this.options.tokenize && this.options.matchAllTokens) ? numTextMatches >= tokenSearchers.length : true\n\n this._log(`\\nCheck Matches: ${checkTextMatches}`)\n\n // If a match is found, add the item to , including its score\n if ((exists || mainSearchResult.isMatch) && checkTextMatches) {\n // Check if the item already exists in our results\n let existingResult = resultMap[index]\n\n if (existingResult) {\n // Use the lowest score\n // existingResult.score, bitapResult.score\n existingResult.output.push({\n key: key,\n score: finalScore,\n matchedIndices: mainSearchResult.matchedIndices\n })\n } else {\n // Add it to the raw result list\n resultMap[index] = {\n item: record,\n output: [{\n key: key,\n score: finalScore,\n matchedIndices: mainSearchResult.matchedIndices\n }]\n }\n\n results.push(resultMap[index])\n }\n }\n } else if (isArray(value)) {\n for (let i = 0, len = value.length; i < len; i += 1) {\n this._analyze({\n key, \n value: value[i], \n record, \n index\n }, {\n resultMap, \n results,\n tokenSearchers,\n fullSearcher\n })\n }\n }\n }\n\n _computeScore (weights, results) {\n this._log('\\n\\nComputing score:\\n')\n\n for (let i = 0, len = results.length; i < len; i += 1) {\n const output = results[i].output\n const scoreLen = output.length\n\n let totalScore = 0\n let bestScore = 1\n\n for (let j = 0; j < scoreLen; j += 1) {\n let score = output[j].score\n let weight = weights ? weights[output[j].key].weight : 1\n let nScore = score * weight\n\n if (weight !== 1) {\n bestScore = Math.min(bestScore, nScore)\n } else {\n output[j].nScore = nScore\n totalScore += nScore\n }\n }\n \n results[i].score = bestScore === 1 ? totalScore / scoreLen : bestScore\n\n this._log(results[i])\n }\n }\n\n _sort (results) {\n this._log('\\n\\nSorting....')\n results.sort(this.options.sortFn)\n }\n\n _format (results) {\n const finalOutput = []\n\n this._log('\\n\\nOutput:\\n\\n', results)\n\n let transformers = []\n\n if (this.options.includeMatches) {\n transformers.push((result, data) => {\n const output = result.output\n data.matches = []\n\n for (let i = 0, len = output.length; i < len; i += 1) {\n let item = output[i]\n let obj = {\n indices: item.matchedIndices\n }\n if (item.key) {\n obj.key = item.key\n }\n data.matches.push(obj)\n }\n })\n }\n \n if (this.options.includeScore) {\n transformers.push((result, data) => {\n data.score = result.score\n })\n }\n\n for (let i = 0, len = results.length; i < len; i += 1) {\n const result = results[i]\n\n if (this.options.id) {\n result.item = this.options.getFn(result.item, this.options.id)[0]\n }\n\n if (!transformers.length) {\n finalOutput.push(result.item)\n continue\n }\n\n const data = {\n item: result.item\n }\n\n for (let j = 0, len = transformers.length; j < len; j += 1) {\n transformers[j](result, data)\n }\n\n finalOutput.push(data)\n }\n\n return finalOutput\n }\n\n _log () {\n if (this.options.verbose) {\n console.log(...arguments)\n }\n }\n}\n\nmodule.exports = Fuse\n\n\n// WEBPACK FOOTER //\n// ./src/index.js"],"sourceRoot":""}