!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("elm",function(){function u(e,t,r){return t(r),r(e,t)}var f=/[a-z_]/,o=/[A-Z]/,a=/[0-9]/,l=/[0-9A-Fa-f]/,c=/[0-7]/,s=/[a-z_A-Z0-9\']/,m=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,p=/[(),;[\]`{}]/,d=/[ \t\v\f]/;function h(){return function(e,t){if(e.eatWhile(d))return null;var r=e.next();if(p.test(r)){if("{"==r&&e.eat("-")){var n="comment";return e.eat("#")&&(n="meta"),u(e,t,function i(u,f){if(0==f)return h();return function(e,t){for(var r=f;!e.eol();){var n=e.next();if("{"==n&&e.eat("-"))++r;else if("-"==n&&e.eat("}")&&0==--r)return t(h()),u}return t(i(u,r)),u}}(n,1))}return null}if("'"==r)return e.eat("\\"),e.next(),e.eat("'")?"string":"error";if('"'==r)return u(e,t,x);if(o.test(r))return e.eatWhile(s),e.eat(".")?"qualifier":"variable-2";if(f.test(r)){var i=1===e.pos;return e.eatWhile(s),i?"type":"variable"}if(a.test(r)){if("0"==r){if(e.eat(/[xX]/))return e.eatWhile(l),"integer";if(e.eat(/[oO]/))return e.eatWhile(c),"number"}e.eatWhile(a);n="number";return e.eat(".")&&(n="number",e.eatWhile(a)),e.eat(/[eE]/)&&(n="number",e.eat(/[-+]/),e.eatWhile(a)),n}return m.test(r)?"-"==r&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(m))?(e.skipToEnd(),"comment"):(e.eatWhile(m),"builtin"):"error"}}function x(e,t){for(;!e.eol();){var r=e.next();if('"'==r)return t(h()),"string";if("\\"==r){if(e.eol()||e.eat(d))return t(n),"string";e.eat("&")||e.next()}}return t(h()),"error"}function n(e,t){return e.eat("\\")?u(e,t,x):(e.next(),t(h()),"error")}var i=function(){for(var e={},t=["case","of","as","if","then","else","let","in","infix","infixl","infixr","type","alias","input","output","foreign","loopback","module","where","import","exposing","_","..","|",":","=","\\",'"',"->","<-"],r=t.length;r--;)e[t[r]]="keyword";return e}();return{startState:function(){return{f:h()}},copyState:function(e){return{f:e.f}},token:function(e,t){var r=t.f(e,function(e){t.f=e}),n=e.current();return i.hasOwnProperty(n)?i[n]:r}}}),e.defineMIME("text/x-elm","elm")});