diff --git a/public/cache.manifest b/public/cache.manifest index 9d493de0..b44a7f5b 100644 --- a/public/cache.manifest +++ b/public/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -#Date Wed Oct 16 2013 00:12:57 +#Date Sun Oct 20 2013 00:00:12 CACHE: res/worker.js diff --git a/public/res-min/main.js b/public/res-min/main.js index b9509f18..1407cbc4 100644 --- a/public/res-min/main.js +++ b/public/res-min/main.js @@ -8365,7 +8365,7 @@ function runDelayedFunction() { }); }; }.call(r.prototype), t.CommandManager = r; -}), define("ace/commands/default_commands", [ "require", "exports", "module", "ace/lib/lang", "ace/config" ], function(e, t) { +}), define("ace/commands/default_commands", [ "require", "exports", "module", "ace/lib/lang", "ace/config", "ace/range" ], function(e, t) { function n(e, t) { return { win: e, @@ -8373,7 +8373,9 @@ function runDelayedFunction() { }; } var i = e("ace/lib/lang"); - e("ace/config"), t.commands = [ { + e("ace/config"); + var o = e("ace/range").Range; + t.commands = [ { name: "overwrite", bindKey: "Insert", exec: function(e) { @@ -8684,7 +8686,8 @@ function runDelayedFunction() { name: "indent", bindKey: n("Tab", "Tab"), exec: function(e) { - e.indent(); + var t = e.getSelectionRange(), n = new o(t.end.row, 0, t.end.row, t.end.column), i = e.session.getTextRange(n), r = e.session.getTokenAt(t.end.row, t.end.column); + "markup.list" == r.type && /^\s*(?:[-+*]|\d+\.)\s+$/.test(i) ? e.blockIndent() : e.indent(); }, multiSelectAction: "forEach" }, { @@ -20739,7 +20742,7 @@ if (hljs.LANGUAGES.glsl = function(e) { a = e, h(); }, r.onPublishRemoved = h, r.onNewPublishSuccess = h, r; }), define("text!html/buttonShare.html", [], function() { - return '\n
\n'; + return '\n \n'; }), define("text!html/buttonShareLocation.html", [], function() { return '\n'; }), define("extensions/buttonShare", [ "jquery", "underscore", "classes/Extension", "text!html/buttonShare.html", "text!html/buttonShareLocation.html" ], function(e, t, n, i, o) { @@ -20848,7 +20851,7 @@ if (hljs.LANGUAGES.glsl = function(e) { }); }, s; }), define("text!html/buttonViewer.html", [], function() { - return '\n \n\n'; + return '\n \n\n'; }), define("extensions/buttonViewer", [ "jquery", "classes/Extension", "text!html/buttonViewer.html" ], function(e, t, n) { var i = new t("buttonViewer", 'Button "Viewer"', !0, !0); return i.settingsBlock = 'Adds a "Viewer" button over the preview.
', i.onCreatePreviewButton = function() { @@ -21756,10 +21759,11 @@ if (hljs.LANGUAGES.glsl = function(e) { }, n; }(), t.Tour = n; })(jQuery, window); -}.call(this), define("bootstrap-tour", function() {}), define("extensions/welcomeTour", [ "jquery", "classes/Extension", "bootstrap-tour" ], function(e, t) { - var n = new t("welcomeTour", "Welcome tour", !1, !0); - return n.onReady = function() { - var t = new Tour({ +}.call(this), define("bootstrap-tour", function() {}), define("extensions/welcomeTour", [ "underscore", "jquery", "classes/Extension", "bootstrap-tour" ], function(e, t, n) { + var i = new n("welcomeTour", "Welcome tour", !1, !0); + return i.onReady = function() { + var n = new Tour({ + keyboard: !1, storage: { getItem: function() {}, setItem: function() {}, @@ -21768,47 +21772,47 @@ if (hljs.LANGUAGES.glsl = function(e) { onEnd: function() { localStorage.welcomeTour = "done"; }, - template: [ "Next
to take a quick tour.",
+ content: [ '', 'You are using the new secured platform. If you want to recover your documents from the old platform, click here.
', "Please clickNext
to take a quick tour." ].join(""),
placement: "bottom"
}, {
element: ".navbar .action-create-file",
title: "New document",
- content: "Click the New document
button to create a new document.",
+ content: 'Click the New document
button to create a new document.',
placement: "left",
reflex: !0
}, {
element: ".document-panel .collapse-button",
title: "Toggle document",
- content: [ "Click the Select document
button to switch to another document.
Ctrl+[
and Ctrl+]
shortcuts to toggle quickly." ].join(""),
+ content: [ 'Click the Select document
button to switch to another document.
Ctrl+[
and Ctrl+]
shortcuts to toggle quickly." ].join(""),
placement: "left",
reflex: !0
}, {
element: ".menu-panel .collapse-button",
title: "Menu",
- content: [ "Use the menu to synchronize your document on Google Drive
or Dropbox
.
GitHub
, Blogger
..." ].join(""),
+ content: [ 'Use the menu to synchronize your document on Google Drive
or Dropbox
.
GitHub
, Blogger
...' ].join(""),
placement: "right",
reflex: !0
}, {
element: "#extension-buttons .button-synchronize",
title: "Synchronize",
- content: "Once imported/exported, use the Synchronize
button to force the synchronization (this is done automatically every 3 minutes).
Once imported/exported, use the Synchronize
button to force the synchronization (this is done automatically every 3 minutes).
Publish
button to update your publication.",
+ content: 'Once published, use the Publish
button to update your publication.',
placement: "bottom",
reflex: !0
- } ]), _.has(localStorage, "welcomeTour") || t.start(), e(".action-welcome-tour").click(function() {
- t.restart();
+ } ]), e.has(localStorage, "welcomeTour") || n.start(), t(".action-welcome-tour").click(function() {
+ n.restart();
});
- }, n;
+ }, i;
}), define("text!bower-libs/Typo.js/typo/typo.js", [], function() {
return '\'use strict\';\n\n/**\n * Typo is a JavaScript implementation of a spellchecker using hunspell-style \n * dictionaries.\n */\n\n/**\n * Typo constructor.\n *\n * @param {String} [dictionary] The locale code of the dictionary being used. e.g.,\n * "en_US". This is only used to auto-load dictionaries.\n * @param {String} [affData] The data from the dictionary\'s .aff file. If omitted\n * and the first argument is supplied, in "chrome" platform,\n * the .aff file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].aff\n * In other platform, it will be loaded from\n * [setting.path]/dictionaries/[dictionary]/[dictionary].aff\n * @param {String} [wordsData] The data from the dictionary\'s .dic file. If omitted,\n * and the first argument is supplied, in "chrome" platform,\n * the .dic file will be loaded automatically from\n * lib/typo/dictionaries/[dictionary]/[dictionary].dic\n * In other platform, it will be loaded from\n * [setting.path]/dictionaries/[dictionary]/[dictionary].dic\n * @param {Object} [settings] Constructor settings. Available properties are:\n * {String} [platform]: "chrome" for Chrome Extension or other\n * value for the usual web.\n * {String} [path]: path to load dictionary from in non-chrome\n * environment.\n * {Object} [flags]: flag information.\n *\n *\n * @returns {Typo} A Typo object.\n */\n\nvar Typo = function (dictionary, affData, wordsData, settings) {\n settings = settings || {};\n \n /** Determines the method used for auto-loading .aff and .dic files. **/\n this.platform = settings.platform || "chrome"; \n \n this.dictionary = null;\n \n this.rules = {};\n this.dictionaryTable = {};\n \n this.compoundRules = [];\n this.compoundRuleCodes = {};\n \n this.replacementTable = [];\n \n this.flags = settings.flags || {}; \n \n if (dictionary) {\n this.dictionary = dictionary;\n \n if (this.platform == "chrome") {\n if (!affData) affData = this._readFile(chrome.extension.getURL("lib/typo/dictionaries/" + dictionary + "/" + dictionary + ".aff"));\n if (!wordsData) wordsData = this._readFile(chrome.extension.getURL("lib/typo/dictionaries/" + dictionary + "/" + dictionary + ".dic"));\n } else {\n var path = settings.dictionaryPath || \'\';\n \n if (!affData) affData = this._readFile(path + "/" + dictionary + "/" + dictionary + ".aff");\n if (!wordsData) wordsData = this._readFile(path + "/" + dictionary + "/" + dictionary + ".dic");\n }\n \n this.rules = this._parseAFF(affData);\n \n // Save the rule codes that are used in compound rules.\n this.compoundRuleCodes = {};\n \n for (var i = 0, _len = this.compoundRules.length; i < _len; i++) {\n var rule = this.compoundRules[i];\n \n for (var j = 0, _jlen = rule.length; j < _jlen; j++) {\n this.compoundRuleCodes[rule[j]] = [];\n }\n }\n \n // If we add this ONLYINCOMPOUND flag to this.compoundRuleCodes, then _parseDIC\n // will do the work of saving the list of words that are compound-only.\n if ("ONLYINCOMPOUND" in this.flags) {\n this.compoundRuleCodes[this.flags.ONLYINCOMPOUND] = [];\n }\n \n this.dictionaryTable = this._parseDIC(wordsData);\n \n // Get rid of any codes from the compound rule codes that are never used \n // (or that were special regex characters). Not especially necessary... \n for (var i in this.compoundRuleCodes) {\n if (this.compoundRuleCodes[i].length == 0) {\n delete this.compoundRuleCodes[i];\n }\n }\n \n // Build the full regular expressions for each compound rule.\n // I have a feeling (but no confirmation yet) that this method of \n // testing for compound words is probably slow.\n for (var i = 0, _len = this.compoundRules.length; i < _len; i++) {\n var ruleText = this.compoundRules[i];\n \n var expressionText = "";\n \n for (var j = 0, _jlen = ruleText.length; j < _jlen; j++) {\n var character = ruleText[j];\n \n if (character in this.compoundRuleCodes) {\n expressionText += "(" + this.compoundRuleCodes[character].join("|") + ")";\n }\n else {\n expressionText += character;\n }\n }\n \n this.compoundRules[i] = new RegExp(expressionText, "i");\n }\n }\n \n return this;\n};\n\nTypo.prototype = {\n /**\n * Loads a Typo instance from a hash of all of the Typo properties.\n *\n * @param object obj A hash of Typo properties, probably gotten from a JSON.parse(JSON.stringify(typo_instance)).\n */\n \n load : function (obj) {\n for (var i in obj) {\n this[i] = obj[i];\n }\n \n return this;\n },\n \n /**\n * Read the contents of a file.\n * \n * @param {String} path The path (relative) to the file.\n * @param {String} [charset="ISO8859-1"] The expected charset of the file\n * @returns string The file data.\n */\n \n _readFile : function (path, charset) {\n if (!charset) charset = "ISO8859-1";\n \n var req = new XMLHttpRequest();\n req.open("GET", path, false);\n \n if (req.overrideMimeType)\n req.overrideMimeType("text/plain; charset=" + charset);\n \n req.send(null);\n \n return req.responseText;\n },\n \n /**\n * Parse the rules out from a .aff file.\n *\n * @param {String} data The contents of the affix file.\n * @returns object The rules from the file.\n */\n \n _parseAFF : function (data) {\n var rules = {};\n \n // Remove comment lines\n data = this._removeAffixComments(data);\n \n var lines = data.split("\\n");\n \n for (var i = 0, _len = lines.length; i < _len; i++) {\n var line = lines[i];\n \n var definitionParts = line.split(/\\s+/);\n \n var ruleType = definitionParts[0];\n \n if (ruleType == "PFX" || ruleType == "SFX") {\n var ruleCode = definitionParts[1];\n var combineable = definitionParts[2];\n var numEntries = parseInt(definitionParts[3], 10);\n \n var entries = [];\n \n for (var j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n var line = lines[j];\n \n var lineParts = line.split(/\\s+/);\n var charactersToRemove = lineParts[2];\n \n var additionParts = lineParts[3].split("/");\n \n var charactersToAdd = additionParts[0];\n if (charactersToAdd === "0") charactersToAdd = "";\n \n var continuationClasses = this.parseRuleCodes(additionParts[1]);\n \n var regexToMatch = lineParts[4];\n \n var entry = {};\n entry.add = charactersToAdd;\n \n if (continuationClasses.length > 0) entry.continuationClasses = continuationClasses;\n \n if (regexToMatch !== ".") {\n if (ruleType === "SFX") {\n entry.match = new RegExp(regexToMatch + "$");\n }\n else {\n entry.match = new RegExp("^" + regexToMatch);\n }\n }\n \n if (charactersToRemove != "0") {\n if (ruleType === "SFX") {\n entry.remove = new RegExp(charactersToRemove + "$");\n }\n else {\n entry.remove = charactersToRemove;\n }\n }\n \n entries.push(entry);\n }\n \n rules[ruleCode] = { "type" : ruleType, "combineable" : (combineable == "Y"), "entries" : entries };\n \n i += numEntries;\n }\n else if (ruleType === "COMPOUNDRULE") {\n var numEntries = parseInt(definitionParts[1], 10);\n \n for (var j = i + 1, _jlen = i + 1 + numEntries; j < _jlen; j++) {\n var line = lines[j];\n \n var lineParts = line.split(/\\s+/);\n this.compoundRules.push(lineParts[1]);\n }\n \n i += numEntries;\n }\n else if (ruleType === "REP") {\n var lineParts = line.split(/\\s+/);\n \n if (lineParts.length === 3) {\n this.replacementTable.push([ lineParts[1], lineParts[2] ]);\n }\n }\n else {\n // ONLYINCOMPOUND\n // COMPOUNDMIN\n // FLAG\n // KEEPCASE\n // NEEDAFFIX\n \n this.flags[ruleType] = definitionParts[1];\n }\n }\n \n return rules;\n },\n \n /**\n * Removes comment lines and then cleans up blank lines and trailing whitespace.\n *\n * @param {String} data The data from an affix file.\n * @return {String} The cleaned-up data.\n */\n \n _removeAffixComments : function (data) {\n // Remove comments\n data = data.replace(/#.*$/mg, "");\n \n // Trim each line\n data = data.replace(/^\\s\\s*/m, \'\').replace(/\\s\\s*$/m, \'\');\n \n // Remove blank lines.\n data = data.replace(/\\n{2,}/g, "\\n");\n \n // Trim the entire string\n data = data.replace(/^\\s\\s*/, \'\').replace(/\\s\\s*$/, \'\');\n \n return data;\n },\n \n /**\n * Parses the words out from the .dic file.\n *\n * @param {String} data The data from the dictionary file.\n * @returns object The lookup table containing all of the words and\n * word forms from the dictionary.\n */\n \n _parseDIC : function (data) {\n data = this._removeDicComments(data);\n \n var lines = data.split("\\n");\n var dictionaryTable = {};\n \n function addWord(word, rules) {\n // Some dictionaries will list the same word multiple times with different rule sets.\n if (!(word in dictionaryTable) || typeof dictionaryTable[word] != \'object\') {\n dictionaryTable[word] = [];\n }\n \n dictionaryTable[word].push(rules);\n }\n \n // The first line is the number of words in the dictionary.\n for (var i = 1, _len = lines.length; i < _len; i++) {\n var line = lines[i];\n \n var parts = line.split("/", 2);\n \n var word = parts[0];\n\n // Now for each affix rule, generate that form of the word.\n if (parts.length > 1) {\n var ruleCodesArray = this.parseRuleCodes(parts[1]);\n \n // Save the ruleCodes for compound word situations.\n if (!("NEEDAFFIX" in this.flags) || ruleCodesArray.indexOf(this.flags.NEEDAFFIX) == -1) {\n addWord(word, ruleCodesArray);\n }\n \n for (var j = 0, _jlen = ruleCodesArray.length; j < _jlen; j++) {\n var code = ruleCodesArray[j];\n \n var rule = this.rules[code];\n \n if (rule) {\n var newWords = this._applyRule(word, rule);\n \n for (var ii = 0, _iilen = newWords.length; ii < _iilen; ii++) {\n var newWord = newWords[ii];\n \n addWord(newWord, []);\n \n if (rule.combineable) {\n for (var k = j + 1; k < _jlen; k++) {\n var combineCode = ruleCodesArray[k];\n \n var combineRule = this.rules[combineCode];\n \n if (combineRule) {\n if (combineRule.combineable && (rule.type != combineRule.type)) {\n var otherNewWords = this._applyRule(newWord, combineRule);\n \n for (var iii = 0, _iiilen = otherNewWords.length; iii < _iiilen; iii++) {\n var otherNewWord = otherNewWords[iii];\n addWord(otherNewWord, []);\n }\n }\n }\n }\n }\n }\n }\n \n if (code in this.compoundRuleCodes) {\n this.compoundRuleCodes[code].push(word);\n }\n }\n }\n else {\n addWord(word, []);\n }\n }\n \n return dictionaryTable;\n },\n \n \n /**\n * Removes comment lines and then cleans up blank lines and trailing whitespace.\n *\n * @param {String} data The data from a .dic file.\n * @return {String} The cleaned-up data.\n */\n \n _removeDicComments : function (data) {\n // I can\'t find any official documentation on it, but at least the de_DE\n // dictionary uses tab-indented lines as comments.\n \n // Remove comments\n data = data.replace(/^\\t.*$/mg, "");\n \n return data;\n \n // Trim each line\n data = data.replace(/^\\s\\s*/m, \'\').replace(/\\s\\s*$/m, \'\');\n \n // Remove blank lines.\n data = data.replace(/\\n{2,}/g, "\\n");\n \n // Trim the entire string\n data = data.replace(/^\\s\\s*/, \'\').replace(/\\s\\s*$/, \'\');\n \n return data;\n },\n \n parseRuleCodes : function (textCodes) {\n if (!textCodes) {\n return [];\n }\n else if (!("FLAG" in this.flags)) {\n return textCodes.split("");\n }\n else if (this.flags.FLAG === "long") {\n var flags = [];\n \n for (var i = 0, _len = textCodes.length; i < _len; i += 2) {\n flags.push(textCodes.substr(i, 2));\n }\n \n return flags;\n }\n else if (this.flags.FLAG === "num") {\n return textCode.split(",");\n }\n },\n \n /**\n * Applies an affix rule to a word.\n *\n * @param {String} word The base word.\n * @param {Object} rule The affix rule.\n * @returns {String[]} The new words generated by the rule.\n */\n \n _applyRule : function (word, rule) {\n var entries = rule.entries;\n var newWords = [];\n \n for (var i = 0, _len = entries.length; i < _len; i++) {\n var entry = entries[i];\n \n if (!entry.match || word.match(entry.match)) {\n var newWord = word;\n \n if (entry.remove) {\n newWord = newWord.replace(entry.remove, "");\n }\n \n if (rule.type === "SFX") {\n newWord = newWord + entry.add;\n }\n else {\n newWord = entry.add + newWord;\n }\n \n newWords.push(newWord);\n \n if ("continuationClasses" in entry) {\n for (var j = 0, _jlen = entry.continuationClasses.length; j < _jlen; j++) {\n var continuationRule = this.rules[entry.continuationClasses[j]];\n \n if (continuationRule) {\n newWords = newWords.concat(this._applyRule(newWord, continuationRule));\n }\n /*\n else {\n // This shouldn\'t happen, but it does, at least in the de_DE dictionary.\n // I think the author mistakenly supplied lower-case rule codes instead \n // of upper-case.\n }\n */\n }\n }\n }\n }\n \n return newWords;\n },\n \n /**\n * Checks whether a word or a capitalization variant exists in the current dictionary.\n * The word is trimmed and several variations of capitalizations are checked.\n * If you want to check a word without any changes made to it, call checkExact()\n *\n * @see http://blog.stevenlevithan.com/archives/faster-trim-javascript re:trimming function\n *\n * @param {String} aWord The word to check.\n * @returns {Boolean}\n */\n \n check : function (aWord) {\n // Remove leading and trailing whitespace\n var trimmedWord = aWord.replace(/^\\s\\s*/, \'\').replace(/\\s\\s*$/, \'\');\n \n if (this.checkExact(trimmedWord)) {\n return true;\n }\n \n // The exact word is not in the dictionary.\n if (trimmedWord.toUpperCase() === trimmedWord) {\n // The word was supplied in all uppercase.\n // Check for a capitalized form of the word.\n var capitalizedWord = trimmedWord[0] + trimmedWord.substring(1).toLowerCase();\n \n if (this.hasFlag(capitalizedWord, "KEEPCASE")) {\n // Capitalization variants are not allowed for this word.\n return false;\n }\n \n if (this.checkExact(capitalizedWord)) {\n return true;\n }\n }\n \n var lowercaseWord = trimmedWord.toLowerCase();\n \n if (lowercaseWord !== trimmedWord) {\n if (this.hasFlag(lowercaseWord, "KEEPCASE")) {\n // Capitalization variants are not allowed for this word.\n return false;\n }\n \n // Check for a lowercase form\n if (this.checkExact(lowercaseWord)) {\n return true;\n }\n }\n \n return false;\n },\n \n /**\n * Checks whether a word exists in the current dictionary.\n *\n * @param {String} word The word to check.\n * @returns {Boolean}\n */\n \n checkExact : function (word) {\n var ruleCodes = this.dictionaryTable[word];\n \n if (typeof ruleCodes === \'undefined\') {\n // Check if this might be a compound word.\n if ("COMPOUNDMIN" in this.flags && word.length >= this.flags.COMPOUNDMIN) {\n for (var i = 0, _len = this.compoundRules.length; i < _len; i++) {\n if (word.match(this.compoundRules[i])) {\n return true;\n }\n }\n }\n \n return false;\n }\n else {\n for (var i = 0, _len = ruleCodes.length; i < _len; i++) {\n if (!this.hasFlag(word, "ONLYINCOMPOUND", ruleCodes[i])) {\n return true;\n }\n }\n \n return false;\n }\n },\n \n /**\n * Looks up whether a given word is flagged with a given flag.\n *\n * @param {String} word The word in question.\n * @param {String} flag The flag in question.\n * @return {Boolean}\n */\n \n hasFlag : function (word, flag, wordFlags) {\n if (flag in this.flags) {\n if (typeof wordFlags === \'undefined\') {\n var wordFlags = Array.prototype.concat.apply([], this.dictionaryTable[word]);\n }\n \n if (wordFlags && wordFlags.indexOf(this.flags[flag]) !== -1) {\n return true;\n }\n }\n \n return false;\n },\n \n /**\n * Returns a list of suggestions for a misspelled word.\n *\n * @see http://www.norvig.com/spell-correct.html for the basis of this suggestor.\n * This suggestor is primitive, but it works.\n *\n * @param {String} word The misspelling.\n * @param {Number} [limit=5] The maximum number of suggestions to return.\n * @returns {String[]} The array of suggestions.\n */\n \n alphabet : "",\n \n suggest : function (word, limit) {\n if (!limit) limit = 5;\n \n if (this.check(word)) return [];\n \n // Check the replacement table.\n for (var i = 0, _len = this.replacementTable.length; i < _len; i++) {\n var replacementEntry = this.replacementTable[i];\n \n if (word.indexOf(replacementEntry[0]) !== -1) {\n var correctedWord = word.replace(replacementEntry[0], replacementEntry[1]);\n \n if (this.check(correctedWord)) {\n return [ correctedWord ];\n }\n }\n }\n \n var self = this;\n self.alphabet = "abcdefghijklmnopqrstuvwxyz";\n \n /*\n if (!self.alphabet) {\n // Use the alphabet as implicitly defined by the words in the dictionary.\n var alphaHash = {};\n \n for (var i in self.dictionaryTable) {\n for (var j = 0, _len = i.length; j < _len; j++) {\n alphaHash[i[j]] = true;\n }\n }\n \n for (var i in alphaHash) {\n self.alphabet += i;\n }\n \n var alphaArray = self.alphabet.split("");\n alphaArray.sort();\n self.alphabet = alphaArray.join("");\n }\n */\n \n function edits1(words) {\n var rv = [];\n \n for (var ii = 0, _iilen = words.length; ii < _iilen; ii++) {\n var word = words[ii];\n \n var splits = [];\n \n for (var i = 0, _len = word.length + 1; i < _len; i++) {\n splits.push([ word.substring(0, i), word.substring(i, word.length) ]);\n }\n \n var deletes = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1]) {\n deletes.push(s[0] + s[1].substring(1));\n }\n }\n \n var transposes = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1].length > 1) {\n transposes.push(s[0] + s[1][1] + s[1][0] + s[1].substring(2));\n }\n }\n \n var replaces = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1]) {\n for (var j = 0, _jlen = self.alphabet.length; j < _jlen; j++) {\n replaces.push(s[0] + self.alphabet[j] + s[1].substring(1));\n }\n }\n }\n \n var inserts = [];\n \n for (var i = 0, _len = splits.length; i < _len; i++) {\n var s = splits[i];\n \n if (s[1]) {\n for (var j = 0, _jlen = self.alphabet.length; j < _jlen; j++) {\n replaces.push(s[0] + self.alphabet[j] + s[1]);\n }\n }\n }\n \n rv = rv.concat(deletes);\n rv = rv.concat(transposes);\n rv = rv.concat(replaces);\n rv = rv.concat(inserts);\n }\n \n return rv;\n }\n \n function known(words) {\n var rv = [];\n \n for (var i = 0; i < words.length; i++) {\n if (self.check(words[i])) {\n rv.push(words[i]);\n }\n }\n \n return rv;\n }\n \n function correct(word) {\n // Get the edit-distance-1 and edit-distance-2 forms of this word.\n var ed1 = edits1([word]);\n var ed2 = edits1(ed1);\n \n var corrections = known(ed1).concat(known(ed2));\n \n // Sort the edits based on how many different ways they were created.\n var weighted_corrections = {};\n \n for (var i = 0, _len = corrections.length; i < _len; i++) {\n if (!(corrections[i] in weighted_corrections)) {\n weighted_corrections[corrections[i]] = 1;\n }\n else {\n weighted_corrections[corrections[i]] += 1;\n }\n }\n \n var sorted_corrections = [];\n \n for (var i in weighted_corrections) {\n sorted_corrections.push([ i, weighted_corrections[i] ]);\n }\n \n function sorter(a, b) {\n if (a[1] < b[1]) {\n return -1;\n }\n \n return 1;\n }\n \n sorted_corrections.sort(sorter).reverse();\n \n var rv = [];\n \n for (var i = 0, _len = Math.min(limit, sorted_corrections.length); i < _len; i++) {\n if (!self.hasFlag(sorted_corrections[i][0], "NOSUGGEST")) {\n rv.push(sorted_corrections[i][0]);\n }\n }\n \n return rv;\n }\n \n return correct(word);\n }\n};\n';
}), define("text!bower-libs/lz-string/libs/lz-string-1.3.3.js", [], function() {
@@ -22366,7 +22370,7 @@ if (hljs.LANGUAGES.glsl = function(e) {
});
}, r;
}), define("text!html/bodyIndex.html", [], function() {
- return ' \n\n\n\n\n\n \n\n\n