CodeMirror.defineMode("xml",function(e,t){function f(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if(r=="<"){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(p(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta";var i=e.eat("/");u="";var s;while(s=e.eat(/[^\s\u00a0=<>\"\'\/?]/))u+=s;return u?(a=i?"closeTag":"openTag",t.tokenize=l,"tag"):"tag error"}if(r=="&"){var o;return e.eat("#")?e.eat("x")?o=e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):o=e.eatWhile(/[\d]/)&&e.eat(";"):o=e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function l(e,t){var n=e.next();if(n==">"||n=="/"&&e.eat(">"))return t.tokenize=f,a=n==">"?"endTag":"selfcloseTag","tag";if(n=="=")return a="equals",null;if(n=="<"){t.tokenize=f;var r=t.tokenize(e,t);return r?r+" error":"error"}return/[\'\"]/.test(n)?(t.tokenize=c(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function c(e){var t=function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=l;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(n,r){while(!n.eol()){if(n.match(t)){r.tokenize=f;break}n.next()}return e}}function p(e){return function(t,n){var r;while((r=t.next())!=null){if(r=="<")return n.tokenize=p(e+1),n.tokenize(t,n);if(r==">"){if(e==1){n.tokenize=f;break}return n.tokenize=p(e-1),n.tokenize(t,n)}}return"meta"}}function g(){for(var e=arguments.length-1;e>=0;e--)d.cc.push(arguments[e])}function y(){return g.apply(null,arguments),!0}function b(e,t){var n=s.doNotIndent.hasOwnProperty(e)||d.context&&d.context.noIndent;d.context={prev:d.context,tagName:e,indent:d.indented,startOfLine:t,noIndent:n}}function w(){d.context&&(d.context=d.context.prev)}function E(e){if(e=="openTag")return d.tagName=u,d.tagStart=v.column(),y(N,S(d.startOfLine));if(e=="closeTag"){var t=!1;return d.context?d.context.tagName!=u&&(s.implicitlyClosed.hasOwnProperty(d.context.tagName.toLowerCase())&&w(),t=!d.context||d.context.tagName!=u):t=!0,t&&(m="error"),y(x(t))}return y()}function S(e){return function(t){var n=d.tagName;return d.tagName=d.tagStart=null,t=="selfcloseTag"||t=="endTag"&&s.autoSelfClosers.hasOwnProperty(n.toLowerCase())?(T(n.toLowerCase()),y()):t=="endTag"?(T(n.toLowerCase()),b(n,e),y()):y()}}function x(e){return function(t){return e&&(m="error"),t=="endTag"?(w(),y()):(m="error",y(arguments.callee))}}function T(e){var t;for(;;){if(!d.context)return;t=d.context.tagName.toLowerCase();if(!s.contextGrabbers.hasOwnProperty(t)||!s.contextGrabbers[t].hasOwnProperty(e))return;w()}}function N(e){return e=="word"?(m="attribute",y(C,N)):e=="endTag"||e=="selfcloseTag"?g():(m="error",y(N))}function C(e){if(e=="equals")return y(k,N);if(!s.allowMissing)m="error";else if(e=="word")return m="attribute",y(C,N);return e=="endTag"||e=="selfcloseTag"?g():y()}function k(e){return e=="string"?y(L):e=="word"&&s.allowUnquoted?(m="string",y()):(m="error",e=="endTag"||e=="selfCloseTag"?g():y())}function L(e){return e=="string"?y(L):g()}var n=e.indentUnit,r=t.multilineTagIndentFactor||1,i=t.multilineTagIndentPastTag||!0,s=t.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},o=t.alignCDATA,u,a,d,v,m;return{startState:function(){return{tokenize:f,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(e,t){!t.tagName&&e.sol()&&(t.startOfLine=!0,t.indented=e.indentation());if(e.eatSpace())return null;m=a=u=null;var n=t.tokenize(e,t);t.type=a;if((n||a)&&n!="comment"){d=t,v=e;for(;;){var r=t.cc.pop()||E;if(r(a||n))break}}return t.startOfLine=!1,m&&(n=m=="error"?n+" error":m),n},indent:function(e,t,s){var u=e.context;if(e.tokenize.isInAttribute)return e.stringStartCol+1;if(e.tokenize!=l&&e.tokenize!=f||u&&u.noIndent)return s?s.match(/^(\s*)/)[0].length:0;if(e.tagName)return i?e.tagStart+e.tagName.length+2:e.tagStart+n*r;if(o&&/",configuration:t.htmlMode?"html":"xml",helperType:t.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0});