1{"version":3,"sources":["../../node_modules/codemirror/mode/troff/troff.js"],"names":["mod","exports","module","require","define","amd","CodeMirror","defineMode","words","tokenBase","stream","eatSpace","sol","ch","next","match","skipTo","eatWhile","eat","skipToEnd","cur","current","hasOwnProperty","tokenize","state","tokens","startState","token","defineMIME"],"mappings":"CAGA,SAAUA,GACR,SAAWC,UAAW,gBAAmBC,SAAU,SACjDF,EAAIG,QAAQ,6BACT,UAAWC,SAAU,YAAcA,OAAOC,IAC7CD,QAAQ,wBAAyBJ,OAEjCA,GAAIM,cACL,SAASA,GACZ,YAEAA,GAAWC,WAAW,QAAS,WAE7B,GAAIC,KAEJ,SAASC,GAAUC,GACjB,GAAIA,EAAOC,WAAY,MAAO,KAE9B,IAAIC,GAAMF,EAAOE,KACjB,IAAIC,GAAKH,EAAOI,MAEhB,IAAID,IAAO,KAAM,CACf,GAAIH,EAAOK,MAAM,OAASL,EAAOK,MAAM,OAASL,EAAOK,MAAM,OACzDL,EAAOK,MAAM,MAASL,EAAOK,MAAM,MACnCL,EAAOK,MAAM,MAASL,EAAOK,MAAM,KAAM,CAC3C,MAAO,SAET,GAAIL,EAAOK,MAAM,MAAO,CACtBL,EAAOM,OAAO,IACdN,GAAOI,MACP,OAAO,SAET,GAAIJ,EAAOK,MAAM,OAASL,EAAOK,MAAM,MAAO,CAC5CL,EAAOO,SAAS,QAChB,OAAO,SAET,GAAIP,EAAOK,MAAM,MAASL,EAAOK,MAAM,MAAQ,CAC7CL,EAAOO,SAAS,QAChB,OAAO,SAET,MAAO,SAET,GAAIL,IAAQC,IAAO,KAAOA,IAAO,KAAO,CACtC,GAAIH,EAAOQ,IAAI,OAASR,EAAOQ,IAAI,KAAO,CACxCR,EAAOS,WACP,OAAO,WAGX,GAAIP,GAAOC,IAAO,IAAK,CACrB,GAAIH,EAAOK,MAAM,OAASL,EAAOK,MAAM,OAASL,EAAOK,MAAM,MAAO,CAClE,MAAO,YAET,GAAIL,EAAOK,MAAM,QAAUL,EAAOK,MAAM,QAAUL,EAAOK,MAAM,QAAUL,EAAOK,MAAM,OAAQ,CAC5FL,EAAOS,WACP,OAAO,QAET,GAAKT,EAAOK,MAAM,UAAYL,EAAOK,MAAM,UAAcL,EAAOK,MAAM,UAAYL,EAAOK,MAAM,SAAW,CACxG,MAAO,aAGXL,EAAOO,SAAS,QAChB,IAAIG,GAAMV,EAAOW,SACjB,OAAOb,GAAMc,eAAeF,GAAOZ,EAAMY,GAAO,KAGlD,QAASG,GAASb,EAAQc,GACxB,OAAQA,EAAMC,OAAO,IAAMhB,GAAYC,EAAQc,GAGjD,OACEE,WAAY,WAAY,OAAQD,YAChCE,MAAO,SAASjB,EAAQc,GACtB,MAAOD,GAASb,EAAQc,MAK9BlB,GAAWsB,WAAW,aAAc,QACpCtB,GAAWsB,WAAW,eAAgB,QACtCtB,GAAWsB,WAAW,sBAAuB","file":"troff.min.js","sourcesContent":["// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function(mod) {\n  if (typeof exports == \"object\" && typeof module == \"object\")\n    mod(require(\"../../lib/codemirror\"));\n  else if (typeof define == \"function\" && define.amd)\n    define([\"../../lib/codemirror\"], mod);\n  else\n    mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode('troff', function() {\n\n  var words = {};\n\n  function tokenBase(stream) {\n    if (stream.eatSpace()) return null;\n\n    var sol = stream.sol();\n    var ch = stream.next();\n\n    if (ch === '\\\\') {\n      if (stream.match('fB') || stream.match('fR') || stream.match('fI') ||\n          stream.match('u')  || stream.match('d')  ||\n          stream.match('%')  || stream.match('&')) {\n        return 'string';\n      }\n      if (stream.match('m[')) {\n        stream.skipTo(']');\n        stream.next();\n        return 'string';\n      }\n      if (stream.match('s+') || stream.match('s-')) {\n        stream.eatWhile(/[\\d-]/);\n        return 'string';\n      }\n      if (stream.match('\\(') || stream.match('*\\(')) {\n        stream.eatWhile(/[\\w-]/);\n        return 'string';\n      }\n      return 'string';\n    }\n    if (sol && (ch === '.' || ch === '\\'')) {\n      if (stream.eat('\\\\') && stream.eat('\\\"')) {\n        stream.skipToEnd();\n        return 'comment';\n      }\n    }\n    if (sol && ch === '.') {\n      if (stream.match('B ') || stream.match('I ') || stream.match('R ')) {\n        return 'attribute';\n      }\n      if (stream.match('TH ') || stream.match('SH ') || stream.match('SS ') || stream.match('HP ')) {\n        stream.skipToEnd();\n        return 'quote';\n      }\n      if ((stream.match(/[A-Z]/) && stream.match(/[A-Z]/)) || (stream.match(/[a-z]/) && stream.match(/[a-z]/))) {\n        return 'attribute';\n      }\n    }\n    stream.eatWhile(/[\\w-]/);\n    var cur = stream.current();\n    return words.hasOwnProperty(cur) ? words[cur] : null;\n  }\n\n  function tokenize(stream, state) {\n    return (state.tokens[0] || tokenBase) (stream, state);\n  };\n\n  return {\n    startState: function() {return {tokens:[]};},\n    token: function(stream, state) {\n      return tokenize(stream, state);\n    }\n  };\n});\n\nCodeMirror.defineMIME('text/troff', 'troff');\nCodeMirror.defineMIME('text/x-troff', 'troff');\nCodeMirror.defineMIME('application/x-troff', 'troff');\n\n});\n"]}