Liferay.Loader.define("portal-search-web$codemirror@5.62.0/mode/jsx/jsx",["module","exports","require","../../lib/codemirror","../xml/xml","../javascript/javascript"],(function(t,e,n){var r;window,r=function(t){"use strict";function e(t,e,n,r){this.state=t,this.mode=e,this.depth=n,this.prev=r}function n(r){return new e(t.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}t.defineMode("jsx",(function(r,a){var i=t.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),o=t.getMode(r,a&&a.base||"javascript");function s(t){var e=t.tagName;t.tagName=null;var n=i.indent(t,"","");return t.tagName=e,n}return{startState:function(){return{context:new e(t.startState(o),o)}},copyState:function(t){return{context:n(t.context)}},token:function n(a,c){return c.context.mode==i?function(a,c,p){if(2==p.depth)return a.match(/^.*?\*\//)?p.depth=1:a.skipToEnd(),"comment";if("{"==a.peek()){i.skipAttribute(p.state);var d=s(p.state),u=p.state.context;if(u&&a.match(/^[^>]*>\s*$/,!1)){for(;u.prev&&!u.startOfLine;)u=u.prev;u.startOfLine?d-=r.indentUnit:p.prev.state.lexical&&(d=p.prev.state.lexical.indented)}else 1==p.depth&&(d+=r.indentUnit);return c.context=new e(t.startState(o,d),o,0,c.context),null}if(1==p.depth){if("<"==a.peek())return i.skipAttribute(p.state),c.context=new e(t.startState(i,s(p.state)),i,0,c.context),null;if(a.match("//"))return a.skipToEnd(),"comment";if(a.match("/*"))return p.depth=2,n(a,c)}var x,l=i.token(a,p.state),f=a.current();return/\btag\b/.test(l)?/>$/.test(f)?p.state.context?p.depth=0:c.context=c.context.prev:/^</.test(f)&&(p.depth=1):!l&&(x=f.indexOf("{"))>-1&&a.backUp(f.length-x),l}(a,c,c.context):function(n,r,a){if("<"==n.peek()&&o.expressionAllowed(n,a.state))return r.context=new e(t.startState(i,o.indent(a.state,"","")),i,0,r.context),o.skipExpression(a.state),null;var s=o.token(n,a.state);if(!s&&null!=a.depth){var c=n.current();"{"==c?a.depth++:"}"==c&&0==--a.depth&&(r.context=r.context.prev)}return s}(a,c,c.context)},indent:function(t,e,n){return t.context.mode.indent(t.context.state,e,n)},innerMode:function(t){return t.context}}}),"xml","javascript"),t.defineMIME("text/jsx","jsx"),t.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})},"object"==typeof e&&"object"==typeof t?r(n("../../lib/codemirror"),n("../xml/xml"),n("../javascript/javascript")):r(CodeMirror)}));
//# sourceMappingURL=jsx.js.map