Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/r/r",["module","exports","require","../../lib/codemirror"],(function(e,t,r){var n,o=void 0;window;n=function(e){"use strict";e.registerHelper("wordChars","r",/[\w.]/),e.defineMode("r",(function(t){function wordObj(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}var r=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],n=["list","quote","bquote","eval","return","call","parse","deparse"],o=["if","else","repeat","while","function","for","in","next","break"];e.registerHelper("hintWords","r",r.concat(n,o));var i,a=wordObj(r),c=wordObj(n),l=wordObj(o),u=wordObj(["if","else","repeat","while","function","for"]),f=/[+\-*\/^<>=!&|~$:]/;function tokenBase(e,t){i=null;var r=e.next();if("#"==r)return e.skipToEnd(),"comment";if("0"==r&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==r&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(r))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==r||'"'==r)return t.tokenize=function tokenString(e){return function(t,r){if(t.eat("\\")){var n=t.next();return"x"==n?t.match(/^[a-f0-9]{2}/i):("u"==n||"U"==n)&&t.eat("{")&&t.skipTo("}")?t.next():"u"==n?t.match(/^[a-f0-9]{4}/i):"U"==n?t.match(/^[a-f0-9]{8}/i):/[0-7]/.test(n)&&t.match(/^[0-7]{1,2}/),"string-2"}for(var o;null!=(o=t.next());){if(o==e){r.tokenize=tokenBase;break}if("\\"==o){t.backUp(1);break}}return"string"}}(r),"string";if("`"==r)return e.match(/[^`]+`/),"variable-3";if("."==r&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(r)){e.eatWhile(/[\w\.]/);var n=e.current();return a.propertyIsEnumerable(n)?"atom":l.propertyIsEnumerable(n)?(u.propertyIsEnumerable(n)&&!e.match(/\s*if(\s+|$)/,!1)&&(i="block"),"keyword"):c.propertyIsEnumerable(n)?"builtin":"variable"}return"%"==r?(e.skipTo("%")&&e.next(),"operator variable-2"):"<"==r&&e.eat("-")||"<"==r&&e.match("<-")||"-"==r&&e.match(/>>?/)?"operator arrow":"="==r&&t.ctx.argList?"arg-is":f.test(r)?"$"==r?"operator dollar":(e.eatWhile(f),"operator"):/[\(\){}\[\];]/.test(r)?(i=r,";"==r?"semi":null):null}function push(e,t,r){e.ctx={type:t,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function setFlag(e,t){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|t,column:r.column,prev:r.prev}}function pop(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}return{startState:function(){return{tokenize:tokenBase,ctx:{type:"top",indent:-t.indentUnit,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(0==(3&t.ctx.flags)&&(t.ctx.flags|=2),4&t.ctx.flags&&pop(t),t.indent=e.indentation()),e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"!=r&&0==(2&t.ctx.flags)&&setFlag(t,1),";"!=i&&"{"!=i&&"}"!=i||"block"!=t.ctx.type||pop(t),"{"==i?push(t,"}",e):"("==i?(push(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==i?push(t,"]",e):"block"==i?push(t,"block",e):i==t.ctx.type?pop(t):"block"==t.ctx.type&&"comment"!=r&&setFlag(t,4),t.afterIdent="variable"==r||"keyword"==r,r},indent:function(e,r){if(e.tokenize!=tokenBase)return 0;var n=r&&r.charAt(0),o=e.ctx,i=n==o.type;return 4&o.flags&&(o=o.prev),"block"==o.type?o.indent+("{"==n?0:t.indentUnit):1&o.flags?o.column+(i?0:1):o.indent+(i?0:t.indentUnit)},lineComment:"#"}})),e.defineMIME("text/x-rsrc","r")},"object"==typeof t&&"object"==typeof e?n(r("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],n):n(CodeMirror)}));
//# sourceMappingURL=r.js.map