wp_back/wp-content/plugins/slider-bws/bws_menu/js/codemirror.js

5 lines
149 KiB
JavaScript
Raw Permalink Normal View History

2024-05-20 15:37:46 +03:00
!function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof define&&define.amd)return define([],a);this.CodeMirror=a()}}(function(){"use strict";function z(a,c){if(!(this instanceof z))return new z(a,c);this.options=c=c||{},Fg($d,c,!1),N(c);var d=c.value;"string"==typeof d&&(d=new zf(d,c.mode)),this.doc=d;var e=this.display=new A(a,d);e.wrapper.CodeMirror=this,J(this),H(this),c.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),c.autofocus&&!r&&Rc(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new vg},b&&setTimeout(Gg(Qc,this,!0),20),Uc(this);var f=this;Ac(this,function(){f.curOp.forceUpdate=!0,Df(f,d),c.autofocus&&!r||Rg()==e.input?setTimeout(Gg(vd,f),20):wd(f);for(var a in _d)_d.hasOwnProperty(a)&&_d[a](f,c[a],be);for(var b=0;b<fe.length;++b)fe[b](f)})}function A(a,b){var d=this,e=d.input=Mg("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");h?e.style.width="1000px":e.setAttribute("wrap","off"),q&&(e.style.border="1px solid black"),e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck","false"),d.inputDiv=Mg("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),d.scrollbarH=Mg("div",[Mg("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar"),d.scrollbarV=Mg("div",[Mg("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),d.scrollbarFiller=Mg("div",null,"CodeMirror-scrollbar-filler"),d.gutterFiller=Mg("div",null,"CodeMirror-gutter-filler"),d.lineDiv=Mg("div",null,"CodeMirror-code"),d.selectionDiv=Mg("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Mg("div",null,"CodeMirror-cursors"),d.measure=Mg("div",null,"CodeMirror-measure"),d.lineMeasure=Mg("div",null,"CodeMirror-measure"),d.lineSpace=Mg("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Mg("div",[Mg("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Mg("div",[d.mover],"CodeMirror-sizer"),d.heightForcer=Mg("div",null,null,"position: absolute; height: "+qg+"px; width: 1px;"),d.gutters=Mg("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Mg("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Mg("div",[d.inputDiv,d.scrollbarH,d.scrollbarV,d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),c&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),q&&(e.style.width="0px"),h||(d.scroller.draggable=!0),m&&(d.inputDiv.style.height="1px",d.inputDiv.style.position="absolute"),c&&(d.scrollbarH.style.minHeight=d.scrollbarV.style.minWidth="18px"),a.appendChild?a.appendChild(d.wrapper):a(d.wrapper),d.viewFrom=d.viewTo=b.first,d.view=[],d.externalMeasured=null,d.viewOffset=0,d.lastSizeC=0,d.updateLineNumbers=null,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.prevInput="",d.alignWidgets=!1,d.pollingFast=!1,d.poll=new vg,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.inaccurateSelection=!1,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1}function B(a){a.doc.mode=z.getMode(a.options,a.doc.modeOption),C(a)}function C(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Tb(a,100),a.state.modeGen++,a.curOp&&Gc(a)}function D(a){a.options.lineWrapping?(Ug(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth=""):(Tg(a.display.wrapper,"CodeMirror-wrap"),M(a)),F(a),Gc(a),jc(a),setTimeout(function(){P(a)},100)}function E(a){var b=vc(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/wc(a.display)-3);return function(e){if(Ve(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}functi
}function Fc(a,b,c){for(var e,d=[],f=b;c>f;f=e){var g=new Ec(a.doc,Ef(a.doc,f),f);e=f+g.size,d.push(g)}return d}function Gc(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)y&&Te(a.doc,b)<e.viewTo&&Ic(a);else if(c<=e.viewFrom)y&&Ue(a.doc,c+d)>e.viewFrom?Ic(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Ic(a);else if(b<=e.viewFrom){var f=Kc(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Ic(a)}else if(c>=e.viewTo){var f=Kc(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Ic(a)}else{var g=Kc(a,b,b,-1),h=Kc(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Fc(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Ic(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Hc(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Jc(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Cg(g,c)&&g.push(c)}}}function Ic(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Jc(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function Kc(a,b,c,d){var f,e=Jc(a,b),g=a.display.view;if(!y)return{index:e,lineN:c};for(var h=0,i=a.display.viewFrom;e>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(e==g.length-1)return null;f=i+g[e].size-b,e++}else f=i-b;b+=f,c+=f}for(;Te(a.doc,c)!=c;){if(e==(0>d?0:g.length-1))return null;c+=d*g[e-(0>d?1:0)].size,e+=d}return{index:e,lineN:c}}function Lc(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Fc(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Fc(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Jc(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Fc(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Jc(a,c)))),d.viewTo=c}function Mc(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Nc(a){a.display.pollingFast||a.display.poll.set(a.options.pollInterval,function(){Pc(a),a.state.focused&&Nc(a)})}function Oc(a){function c(){var d=Pc(a);d||b?(a.display.pollingFast=!1,Nc(a)):(b=!0,a.display.poll.set(60,c))}var b=!1;a.display.pollingFast=!0,a.display.poll.set(20,c)}function Pc(a){var b=a.display.input,c=a.display.prevInput,e=a.doc;if(!a.state.focused||ch(b)&&!c||Tc(a)||a.options.disableInput)return!1;a.state.pasteIncoming&&a.state.fakedLastChar&&(b.value=b.value.substring(0,b.value.length-1),a.state.fakedLastChar=!1);var f=b.value;if(f==c&&!a.somethingSelected())return!1;if(g&&!d&&a.display.inputHasSelection===f)return Qc(a),!1;var h=!a.curOp;h&&yc(a),a.display.shift=!1;for(var i=0,j=Math.min(c.length,f.length);j>i&&c.charCodeAt(i)==f.charCodeAt(i);)++i;for(var k=f.slice(i),l=bh(k),m=a.state.pasteIncoming&&l.length>1&&e.sel.ranges.length==l.length,n=e.sel.ranges.length-1;n>=0;n--){var o=e.sel.ranges[n],p=o.from(),q=o.to();i<c.length?p=ob(p.line,p.ch-(c.length-i)):a.state.overwrite&&o.empty()&&!a.state.pasteIncoming&&(q=ob(q.line,Math.min(Ef(e,q.line).text.length,q.ch+Ag(l).length)));var r=a.curOp.updateInput,s={from:p,to:q,text:m?[l[n]]:l,origin:a.state.pasteIncoming?"paste":a.state.cutIncoming?"cut":"+input"};if(Gd(a.doc,s),kg(a,"inputRead",a,s),k&&!a.state.pasteIncoming&&a.options.electricChars&&a.options.smartIndent&&o.head.ch<100&&(!n||e.sel.ranges[n-1].head.line!=o.head.line)){var t=a.getModeAt(o.head);if(t.electricChars){for(var u=0;u<t.electricChars.length;u++)if(k.indexOf(t.electricChars.charAt(u))>-1){Ud(a,o.head.line,"smart");break}}else if(t.electricInput){var v=Ad(s);t.electricInput.test(Ef(e,v.line).text.slice(0,v.ch))&&Ud(a,o.head.line,"smart")}}}return Sd(a),a.curOp.updateInput=r,a.curOp.typing=!0,f.length>1e3||f.indexOf("
if(!(pb(j.to,h.from)<0||pb(j.from,h.to)>0)){var k=[i,1],l=pb(j.from,h.from),m=pb(j.to,h.to);(0>l||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function Ie(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function Je(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function Ke(a){return a.inclusiveLeft?-1:0}function Le(a){return a.inclusiveRight?1:0}function Me(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=pb(d.from,e.from)||Ke(a)-Ke(b);if(f)return-f;var g=pb(d.to,e.to)||Le(a)-Le(b);return g?g:b.id-a.id}function Ne(a,b){var d,c=y&&a.markedSpans;if(c)for(var e,f=0;f<c.length;++f)e=c[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!d||Me(d,e.marker)<0)&&(d=e.marker);return d}function Oe(a){return Ne(a,!0)}function Pe(a){return Ne(a,!1)}function Qe(a,b,c,d,e){var f=Ef(a,b),g=y&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=pb(j.from,c)||Ke(i.marker)-Ke(e),l=pb(j.to,d)||Le(i.marker)-Le(e);if(!(k>=0&&0>=l||0>=k&&l>=0)&&(0>=k&&(pb(j.to,c)||Le(i.marker)-Ke(e))>0||k>=0&&(pb(j.from,d)||Ke(i.marker)-Le(e))<0))return!0}}}function Re(a){for(var b;b=Oe(a);)a=b.find(-1,!0).line;return a}function Se(a){for(var b,c;b=Pe(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function Te(a,b){var c=Ef(a,b),d=Re(c);return c==d?b:If(d)}function Ue(a,b){if(b>a.lastLine())return b;var d,c=Ef(a,b);if(!Ve(a,c))return b;for(;d=Pe(c);)c=d.find(1,!0).line;return If(c)+1}function Ve(a,b){var c=y&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&We(a,b,d))return!0}}function We(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return We(a,d.line,ze(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&We(a,b,e))return!0}function Ye(a,b,c){Kf(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Rd(a,null,c)}function Ze(a){return null!=a.height?a.height:(Qg(document.body,a.node)||Pg(a.cm.display.measure,Mg("div",[a.node],null,"position: relative")),a.height=a.node.offsetHeight)}function $e(a,b,c,d){var e=new Xe(a,c,d);return e.noHScroll&&(a.display.alignWidgets=!0),Vd(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,!Ve(a.doc,b)){var d=Kf(b)<a.doc.scrollTop;Hf(b,b.height+Ze(e)),d&&Rd(a,null,e.height),a.curOp.forceUpdate=!0}return!0}),e}function af(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),Ie(a),Je(a,c);var e=d?d(a):1;e!=a.height&&Hf(a,e)}function bf(a){a.parent=null,Ie(a)}function cf(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function df(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var c=z.innerMode(a,b);return c.mode.blankLine?c.mode.blankLine(c.state):void 0}}function ef(a,b,c){var d=a.token(b,c);if(b.pos<=b.start)throw new Error("Mode "+a.name+" failed to advance stream.");return d}function ff(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var l,i=0,j=null,k=new pe(b,a.options.tabSize);for(""==b&&cf(df(c,d),f);!k.eol();){if(k.pos>a.options.maxHighlightLength?(h=!1,g&&jf(a,b,d,k.pos),k.pos=b.length,l=null):l=cf(ef(c,k,d),f),a.options.addModeClass){var m=z.innerMode(c,d).mode.name;m&&(l="m-"+(l?m+" "+l:m))}h&&j==l||(i<k.start&&e(k.start,j),i=k.start,j=l),k.start=k.pos}for(;i<k.pos;){var n=Math.min(k.pos,i+5e4);e
},!0),ae("coverGutterNextToScrollbar",!1,P,!0),ae("lineNumbers",!1,function(a){N(a.options),I(a)},!0),ae("firstLineNumber",1,I,!0),ae("lineNumberFormatter",function(a){return a},I,!0),ae("showCursorWhenSelecting",!1,Pb,!0),ae("resetSelectionOnContextMenu",!0),ae("readOnly",!1,function(a,b){"nocursor"==b?(wd(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||Qc(a))}),ae("disableInput",!1,function(a,b){b||Qc(a)},!0),ae("dragDrop",!0),ae("cursorBlinkRate",530),ae("cursorScrollMargin",0),ae("cursorHeight",1),ae("workTime",100),ae("workDelay",100),ae("flattenSpans",!0,C,!0),ae("addModeClass",!1,C,!0),ae("pollInterval",100),ae("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),ae("historyEventDelay",1250),ae("viewportMargin",10,function(a){a.refresh()},!0),ae("maxHighlightLength",1e4,C,!0),ae("moveInputWithCursor",!0,function(a,b){b||(a.display.inputDiv.style.top=a.display.inputDiv.style.left=0)}),ae("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),ae("autofocus",null);var ce=z.modes={},de=z.mimeModes={};z.defineMode=function(a,b){if(z.defaults.mode||"null"==a||(z.defaults.mode=a),arguments.length>2){b.dependencies=[];for(var c=2;c<arguments.length;++c)b.dependencies.push(arguments[c])}ce[a]=b},z.defineMIME=function(a,b){de[a]=b},z.resolveMode=function(a){if("string"==typeof a&&de.hasOwnProperty(a))a=de[a];else if(a&&"string"==typeof a.name&&de.hasOwnProperty(a.name)){var b=de[a.name];"string"==typeof b&&(b={name:b}),a=Eg(b,a),a.name=b.name}else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return z.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}},z.getMode=function(a,b){var b=z.resolveMode(b),c=ce[b.name];if(!c)return z.getMode(a,"text/plain");var d=c(a,b);if(ee.hasOwnProperty(b.name)){var e=ee[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}if(d.name=b.name,b.helperType&&(d.helperType=b.helperType),b.modeProps)for(var f in b.modeProps)d[f]=b.modeProps[f];return d},z.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),z.defineMIME("text/plain","null");var ee=z.modeExtensions={};z.extendMode=function(a,b){var c=ee.hasOwnProperty(a)?ee[a]:ee[a]={};Fg(b,c)},z.defineExtension=function(a,b){z.prototype[a]=b},z.defineDocExtension=function(a,b){zf.prototype[a]=b},z.defineOption=ae;var fe=[];z.defineInitHook=function(a){fe.push(a)};var ge=z.helpers={};z.registerHelper=function(a,b,c){ge.hasOwnProperty(a)||(ge[a]=z[a]={_global:[]}),ge[a][b]=c},z.registerGlobalHelper=function(a,b,c,d){z.registerHelper(a,b,d),ge[a]._global.push({pred:c,val:d})};var he=z.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},ie=z.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};z.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var je=z.commands={selectAll:function(a){a.setSelection(ob(a.firstLine(),0),ob(a.lastLine()),sg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),sg)},killLine:function(a){Wd(a,function(b){if(b.empty()){var c=Ef(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:ob(b.head.line+1,0)}:{from:b.head,to:ob(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Wd(a,function(b){return{from:ob(b.from().line,0),to:yb(a.doc,ob(b.to().line+1,0))}})},delLineLeft:function(a){Wd(a,function(a){return{from:ob(a.from().line,0),to:a.from()}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(ob(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(ob(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return kh(a,b.head.line)},ug)},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){var c=kh(a,b.head.line),d=a.getL
break}c="*"==d}return["comment","comment"]}function r(a,b){return a.skipTo("-->")?(a.match("-->"),b.tokenize=null):a.skipToEnd(),["comment","comment"]}a.defineMode("css",function(b,c){function p(a,b){return n=b,a}function q(a,b){var c=a.next();if(e[c]){var d=e[c](a,b);if(d!==!1)return d}return"@"==c?(a.eatWhile(/[\w\\\-]/),p("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?p(null,"compare"):'"'==c||"'"==c?(b.tokenize=r(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),p("atom","hash")):"!"==c?(a.match(/^\s*\w*/),p("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),p("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?p(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?p("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?p(null,c):"u"==c&&a.match("rl(")?(a.backUp(1),b.tokenize=s,p("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),p("property","word")):p(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),p("number","unit")):a.match(/^[^-]+-/)?p("meta","meta"):void 0}function r(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){")"==a&&b.backUp(1);break}d=!d&&"\\"==e}return(e==a||!d&&")"!=a)&&(c.tokenize=null),p("string","string")}}function s(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\')]/,!1)?null:r(")"),p(null,"(")}function t(a,b,c){this.type=a,this.indent=b,this.prev=c}function u(a,b,c){return a.context=new t(c,b.indentation()+d,a.context),c}function v(a){return a.context=a.context.prev,a.context.type}function w(a,b,c){return z[c.context.type](a,b,c)}function x(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return w(a,b,c)}function y(a){var b=a.current().toLowerCase();o=k.hasOwnProperty(b)?"atom":j.hasOwnProperty(b)?"keyword":"variable"}c.propertyKeywords||(c=a.resolveMode("text/css"));var n,o,d=b.indentUnit,e=c.tokenHooks,f=c.mediaTypes||{},g=c.mediaFeatures||{},h=c.propertyKeywords||{},i=c.nonStandardPropertyKeywords||{},j=c.colorKeywords||{},k=c.valueKeywords||{},l=c.fontProperties||{},m=c.allowNested,z={};return z.top=function(a,b,c){if("{"==a)return u(c,b,"block");if("}"==a&&c.context.prev)return v(c);if("@media"==a)return u(c,b,"media");if("@font-face"==a)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return u(c,b,"at");if("hash"==a)o="builtin";else if("word"==a)o="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return u(c,b,"interpolation");if(":"==a)return"pseudo";if(m&&"("==a)return u(c,b,"params")}return c.context.type},z.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return h.hasOwnProperty(d)?(o="property","maybeprop"):i.hasOwnProperty(d)?(o="string-2","maybeprop"):m?(o=b.match(/^\s*:/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==a?"block":m||"hash"!=a&&"qualifier"!=a?z.top(a,b,c):(o="error","block")},z.maybeprop=function(a,b,c){return":"==a?u(c,b,"prop"):w(a,b,c)},z.prop=function(a,b,c){if(";"==a)return v(c);if("{"==a&&m)return u(c,b,"propBlock");if("}"==a||"{"==a)return x(a,b,c);if("("==a)return u(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(b.current())){if("word"==a)y(b);else if("interpolation"==a)return u(c,b,"interpolation")}else o+=" error";return"prop"},z.propBlock=function(a,b,c){return"}"==a?v(c):"word"==a?(o="property","maybeprop"):c.context.type},z.parens=function(a,b,c){return"{"==a||"}"==a?x(a,b,c):")"==a?v(c):"parens"},z.pseudo=function(a,b,c){return"word"==a?(o="variable-3",c.context.type):w(a,b,c)},z.media=function(a,b,c){if("("==a)return u(c,b,"media_parens");if("}"==a)return x(a,b,c);if("{"==a)return v(c)&&u(c,b,m?"block":"top");if("word"==a){var d=b.current().toLowerCase();o="only"==d||"not"==d||"and"==d?"keyword":f.hasOwnProperty(d)?"attribute":g.hasOwnProperty(d)?"property":"error"}return c.context.type},z.media_parens=function(a,b,c){return")"==a?v(c):"{"==a||"}"==a?x(a,b,c,2):z.media(a,b,c)},z.font_face_before=function(a,b,c){return"{"==a?u(c,b,"font_face"):w(a,b,c)},z.font_face=function(a,b,c){return"}"==a?v(c):"word"==a?(o=l.