1 |
- {"version":3,"file":"mode-rdoc-3736f030.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-rdoc.js"],"sourcesContent":["ace.define(\"ace/mode/latex_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar LatexHighlightRules = function () {\n this.$rules = {\n \"start\": [{\n token: \"comment\",\n regex: \"%.*$\"\n }, {\n token: [\"keyword\", \"lparen\", \"variable.parameter\", \"rparen\", \"lparen\", \"storage.type\", \"rparen\"],\n regex: \"(\\\\\\\\(?:documentclass|usepackage|input))(?:(\\\\[)([^\\\\]]*)(\\\\]))?({)([^}]*)(})\"\n }, {\n token: [\"keyword\", \"lparen\", \"variable.parameter\", \"rparen\"],\n regex: \"(\\\\\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?\"\n }, {\n token: [\"storage.type\", \"lparen\", \"variable.parameter\", \"rparen\"],\n regex: \"(\\\\\\\\begin)({)(verbatim)(})\",\n next: \"verbatim\"\n }, {\n token: [\"storage.type\", \"lparen\", \"variable.parameter\", \"rparen\"],\n regex: \"(\\\\\\\\begin)({)(lstlisting)(})\",\n next: \"lstlisting\"\n }, {\n token: [\"storage.type\", \"lparen\", \"variable.parameter\", \"rparen\"],\n regex: \"(\\\\\\\\(?:begin|end))({)([\\\\w*]*)(})\"\n }, {\n token: \"storage.type\",\n regex: /\\\\verb\\b\\*?/,\n next: [{\n token: [\"keyword.operator\", \"string\", \"keyword.operator\"],\n regex: \"(.)(.*?)(\\\\1|$)|\",\n next: \"start\"\n }]\n }, {\n token: \"storage.type\",\n regex: \"\\\\\\\\[a-zA-Z]+\"\n }, {\n token: \"lparen\",\n regex: \"[[({]\"\n }, {\n token: \"rparen\",\n regex: \"[\\\\])}]\"\n }, {\n token: \"constant.character.escape\",\n regex: \"\\\\\\\\[^a-zA-Z]?\"\n }, {\n token: \"string\",\n regex: \"\\\\${1,2}\",\n next: \"equation\"\n }],\n \"equation\": [{\n token: \"comment\",\n regex: \"%.*$\"\n }, {\n token: \"string\",\n regex: \"\\\\${1,2}\",\n next: \"start\"\n }, {\n token: \"constant.character.escape\",\n regex: \"\\\\\\\\(?:[^a-zA-Z]|[a-zA-Z]+)\"\n }, {\n token: \"error\",\n regex: \"^\\\\s*$\",\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }],\n \"verbatim\": [{\n token: [\"storage.type\", \"lparen\", \"variable.parameter\", \"rparen\"],\n regex: \"(\\\\\\\\end)({)(verbatim)(})\",\n next: \"start\"\n }, {\n defaultToken: \"text\"\n }],\n \"lstlisting\": [{\n token: [\"storage.type\", \"lparen\", \"variable.parameter\", \"rparen\"],\n regex: \"(\\\\\\\\end)({)(lstlisting)(})\",\n next: \"start\"\n }, {\n defaultToken: \"text\"\n }]\n };\n this.normalizeRules();\n};\noop.inherits(LatexHighlightRules, TextHighlightRules);\nexports.LatexHighlightRules = LatexHighlightRules;\n\n});\n\nace.define(\"ace/mode/rdoc_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\",\"ace/mode/latex_highlight_rules\"], function(require, exports, module){/*\n * rdoc_highlight_rules.js\n *\n * Copyright (C) 2009-11 by RStudio, Inc.\n *\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n *\n */\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar lang = require(\"../lib/lang\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar LaTeXHighlightRules = require(\"./latex_highlight_rules\");\nvar RDocHighlightRules = function () {\n this.$rules = {\n \"start\": [\n {\n token: \"comment\",\n regex: \"%.*$\"\n }, {\n token: \"text\",\n regex: \"\\\\\\\\[$&%#\\\\{\\\\}]\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\\\b\",\n next: \"nospell\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[[({]\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[\\\\])}]\"\n }, {\n token: \"text\",\n regex: \"\\\\s+\"\n }\n ],\n \"nospell\": [\n {\n token: \"comment\",\n regex: \"%.*$\",\n next: \"start\"\n }, {\n token: \"nospell.text\",\n regex: \"\\\\\\\\[$&%#\\\\{\\\\}]\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\\\b\"\n }, {\n token: \"keyword\",\n regex: \"\\\\\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])\",\n next: \"start\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[[({]\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"[\\\\])]\"\n }, {\n token: \"paren.keyword.operator\",\n regex: \"}\",\n next: \"start\"\n }, {\n token: \"nospell.text\",\n regex: \"\\\\s+\"\n }, {\n token: \"nospell.text\",\n regex: \"\\\\w+\"\n }\n ]\n };\n};\noop.inherits(RDocHighlightRules, TextHighlightRules);\nexports.RDocHighlightRules = RDocHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingBraceOutdent = function () { };\n(function () {\n this.checkOutdent = function (line, input) {\n if (!/^\\s+$/.test(line))\n return false;\n return /^\\s*\\}/.test(input);\n };\n this.autoOutdent = function (doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n if (!match)\n return 0;\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({ row: row, column: column });\n if (!openBracePos || openBracePos.row == row)\n return 0;\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column - 1), indent);\n };\n this.$getIndent = function (line) {\n return line.match(/^\\s*/)[0];\n };\n}).call(MatchingBraceOutdent.prototype);\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n\n});\n\nace.define(\"ace/mode/rdoc\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/rdoc_highlight_rules\",\"ace/mode/matching_brace_outdent\"], function(require, exports, module){/*\n * rdoc.js\n *\n * Copyright (C) 2009-11 by RStudio, Inc.\n *\n * The Initial Developer of the Original Code is\n * Ajax.org B.V.\n * Portions created by the Initial Developer are Copyright (C) 2010\n * the Initial Developer. All Rights Reserved.\n *\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n *\n */\n\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar RDocHighlightRules = require(\"./rdoc_highlight_rules\").RDocHighlightRules;\nvar MatchingBraceOutdent = require(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar Mode = function (suppressHighlighting) {\n this.HighlightRules = RDocHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.getNextLineIndent = function (state, line, tab) {\n return this.$getIndent(line);\n };\n this.$id = \"ace/mode/rdoc\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/rdoc\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","TextHighlightRules","LatexHighlightRules","RDocHighlightRules","Range","MatchingBraceOutdent","line","input","doc","row","match","column","openBracePos","indent","TextMode","Mode","suppressHighlighting","state","tab","m"],"mappings":"gaAAA,IAAI,OAAO,iCAAiC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAC5J,IAAIC,EAAMH,EAAQ,YAAY,EAC1BI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAsB,UAAY,CAClC,KAAK,OAAS,CACV,MAAS,CAAC,CACF,MAAO,UACP,MAAO,MACvB,EAAe,CACC,MAAO,CAAC,UAAW,SAAU,qBAAsB,SAAU,SAAU,eAAgB,QAAQ,EAC/F,MAAO,+EACvB,EAAe,CACC,MAAO,CAAC,UAAW,SAAU,qBAAsB,QAAQ,EAC3D,MAAO,uDACvB,EAAe,CACC,MAAO,CAAC,eAAgB,SAAU,qBAAsB,QAAQ,EAChE,MAAO,8BACP,KAAM,UACtB,EAAe,CACC,MAAO,CAAC,eAAgB,SAAU,qBAAsB,QAAQ,EAChE,MAAO,gCACP,KAAM,YACtB,EAAe,CACC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