!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sieve",function(e){function n(e){for(var n={},t=e.split(" "),r=0;r<t.length;++r)n[t[r]]=!0;return n}var i=n("if elsif else stop require"),o=n("true false not"),r=e.indentUnit;function u(e,n){var t=e.next();if("/"==t&&e.eat("*"))return(n.tokenize=f)(e,n);if("#"===t)return e.skipToEnd(),"comment";if('"'==t)return n.tokenize=function(i){return function(e,n){for(var t,r=!1;null!=(t=e.next())&&(t!=i||r);)r=!r&&"\\"==t;return r||(n.tokenize=u),"string"}}(t),n.tokenize(e,n);if("("==t)return n._indent.push("("),n._indent.push("{"),null;if("{"===t)return n._indent.push("{"),null;if(")"==t&&(n._indent.pop(),n._indent.pop()),"}"===t)return n._indent.pop(),null;if(","==t)return null;if(";"==t)return null;if(/[{}\(\),;]/.test(t))return null;if(/\d/.test(t))return e.eatWhile(/[\d]/),e.eat(/[KkMmGg]/),"number";if(":"==t)return e.eatWhile(/[a-zA-Z_]/),e.eatWhile(/[a-zA-Z0-9_]/),"operator";e.eatWhile(/\w/);var r=e.current();return"text"==r&&e.eat(":")?(n.tokenize=l,"string"):i.propertyIsEnumerable(r)?"keyword":o.propertyIsEnumerable(r)?"atom":null}function l(e,n){return n._multiLineString=!0,e.sol()?("."==e.next()&&e.eol()&&(n._multiLineString=!1,n.tokenize=u),"string"):(e.eatSpace(),"#"==e.peek()?(e.skipToEnd(),"comment"):(e.skipToEnd(),"string"))}function f(e,n){for(var t,r=!1;null!=(t=e.next());){if(r&&"/"==t){n.tokenize=u;break}r="*"==t}return"comment"}return{startState:function(e){return{tokenize:u,baseIndent:e||0,_indent:[]}},token:function(e,n){return e.eatSpace()?null:(n.tokenize||u)(e,n)},indent:function(e,n){var t=e._indent.length;return n&&"}"==n[0]&&t--,t<0&&(t=0),t*r},electricChars:"}"}}),e.defineMIME("application/sieve","sieve")});