(function(q,t){"function"===typeof define&&define.amd?define("orion/Deferred",t):"object"===typeof exports?module.exports=t():(q.orion=q.orion||{},q.orion.Deferred=t())})(this,function(){function q(){for(var c;c=y.shift();)c();z=!1}function t(c){y.push(c);z||(z=!0,l())}function B(c){return function(g){c(g)}}function w(){function c(){for(var a;a=k.shift();){var c=a.deferred,h="fulfilled"===b?"resolve":"reject";a=a[h];if("function"===typeof a)try{var e=a(d),g=e&&("object"===typeof e||"function"===typeof e)&&
e.then;if("function"===typeof g)if(e===c.promise)c.reject(new TypeError);else{var l=e.cancel;"function"===typeof l?c._parentCancel=l.bind(e):delete c._parentCancel;g.call(e,B(c.resolve),B(c.reject),B(c.progress))}else c.resolve(e)}catch(v){c.reject(v)}else c[h](d)}}function g(a){delete h._parentCancel;b="rejected";d=a;k.length&&t(c)}function e(a){function n(a){return function(c){(!b||"assumed"===b)&&a(c)}}delete h._parentCancel;try{var r=a&&("object"===typeof a||"function"===typeof a)&&a.then;if("function"===
typeof r)if(a===h)g(new TypeError);else{b="assumed";var l=a&&a.cancel;if("function"!==typeof l){var x=new w;a=x.promise;try{r(x.resolve,x.reject,x.progress)}catch(C){x.reject(C)}l=a.cancel;r=a.then}d=a;r.call(a,n(e),n(g));h._parentCancel=l.bind(a)}else b="fulfilled",d=a,k.length&&t(c)}catch(v){n(g)(v)}}function a(){var a=h._parentCancel;a?(delete h._parentCancel,a()):b||(a=Error("Cancel"),a.name="Cancel",g(a))}var d,b,k=[],h=this;this.resolve=function(a){b||e(a);return h};this.reject=function(a){b||
g(a);return h};this.progress=function(a){b||k.forEach(function(b){if(b.progress)try{b.progress(a)}catch(c){}});return h.promise};this.cancel=function(){h._parentCancel?setTimeout(a,0):a();return h};this.then=function(a,d,e){var g=new w;g._parentCancel=h.promise.cancel;k.push({resolve:a,reject:d,progress:e,deferred:g});("fulfilled"===b||"rejected"===b)&&t(c);return g.promise};this.promise={then:h.then,cancel:h.cancel}}var y=[],z=!1,l=function(){if("undefined"!==typeof process&&"function"===typeof process.nextTick){var c=
process.nextTick;return function(){c(q)}}if("function"===typeof MutationObserver){var g=document.createElement("div");(new MutationObserver(q)).observe(g,{attributes:!0});return function(){g.setAttribute("class","_tick")}}return function(){setTimeout(q,0)}}();w.all=function(c,g){function e(a,c){k||(b[a]=c,0===--d&&h.resolve(b))}function a(b,a){if(!k){if(g)try{e(b,g(a));return}catch(c){a=c}h.reject(a)}}var d=c.length,b=[],k=!1,h=new w;h.then(void 0,function(){k=!0;c.forEach(function(b){b.cancel&&b.cancel()})});
0===d?h.resolve(b):c.forEach(function(b,c){b.then(e.bind(void 0,c),a.bind(void 0,c))});return h.promise};w.when=function(c,g,e,a){var d;c&&"function"===typeof c.then||(d=new w,d.resolve(c),c=d.promise);return c.then(g,e,a)};return w});
(function(q,t){"function"===typeof define&&define.amd?define("orion/plugin",["orion/Deferred"],t):"object"===typeof exports?module.exports=t(require("orion/Deferred")):(q.orion=q.orion||{},q.orion.PluginProvider=t(q.orion.Deferred))})(this,function(q){function t(q,t){this.__objectId=q;this.__methods=t}return function(B){function w(b){k&&("undefined"===typeof ArrayBuffer&&(b=JSON.stringify(b)),k===self?k.postMessage(b):k.postMessage(b,"*"))}function y(){var b=[];Object.keys(C).forEach(function(a){var c=
C[a];b.push({serviceId:a,names:c.names,methods:c.methods,properties:c.properties})});return{headers:d||{},services:b}}function z(b,a){if(a&&a instanceof XMLHttpRequest){var c,d;try{c=a.status,d=a.statusText}catch(k){c=0,d=""}return{status:c||0,statusText:d}}return a}function l(b){var a=b?JSON.parse(JSON.stringify(b,z)):b;b instanceof Error&&(a.__isError=!0,a.message=a.message||b.message,a.name=a.name||b.name);return a}function c(a){if(!k)return(new q).reject(Error("plugin not connected"));a.id=String(h++);
var c=new q;I[a.id]=c;c.then(null,function(c){b&&c instanceof Error&&"Cancel"===c.name&&v({requestId:a.id,method:"cancel",params:c.message?[c.message]:[]})});var d=Object.prototype.toString;a.params.forEach(function(b,k){if("[object Object]"===d.call(b)&&!(b instanceof t)){var h,e;for(h in b)"[object Function]"===d.call(b[h])&&(e=e||[],e.push(h));if(e){var g=p++;x[g]=b;h=function(){delete x[g]};c.then(h,h);a.params[k]=new t(g,e)}}});v(a);return c.promise}function g(b,a){b||0===b?v({id:b,result:null,
error:a}):console.log(a)}function e(b,a,d,k){k.forEach(function(b,a){if(b&&"undefined"!==typeof b.__objectId){var d={};b.__methods.forEach(function(a){d[a]=function(){return c({objectId:b.__objectId,method:a,params:Array.prototype.slice.call(arguments)})}});k[a]=d}});var h=void 0===typeof b?null:{id:b,result:null,error:null};try{var e=d.apply(a,k);h&&(e&&"function"===typeof e.then?(r[b]=e,e.then(function(a){delete r[b];h.result=a;v(h)},function(a){r[b]&&(delete r[b],h.error=l(a),v(h))},function(){v({responseId:b,
method:"progress",params:Array.prototype.slice.call(arguments)})})):(h.result=e,v(h)))}catch(g){h&&(h.error=l(g),v(h))}}function a(b){if(!(b.source!==k&&"undefined"!==typeof window)){b="string"!==typeof b.data?b.data:JSON.parse(b.data);try{if(b.method){var a=b.method,c=b.params||[];if("serviceId"in b){var d=C[b.serviceId];d||g(b.id,"service not found");d=d.implementation;a in d?e(b.id,d,d[a],c):g(b.id,"method not found")}else if("objectId"in b){var h=x[b.objectId];h||g(b.id,"object not found");!a in
h?e(b.id,h,h[a],c):g(b.id,"method not found")}else if("requestId"in b){var p=r[b.requestId];p&&"cancel"===a&&p.cancel&&p.cancel.apply(p,c)}else if("responseId"in b){var n=I[b.responseId];n&&"progress"===a&&n.progress&&n.progress.apply(n,c)}else throw Error("Bad method: "+b.method);}else{var l=I[String(b.id)];delete I[String(b.id)];b.error?l.reject(b.error):l.resolve(b.result)}}catch(v){console.log("Plugin._messageHandler "+v)}}}var d=B,b=!1,k=null,h=0,p=0,n=0,r={},I={},x={},C={},v=w;this.updateHeaders=
function(a){if(b)throw Error("Cannot update headers. Plugin Provider is connected");d=a};this.registerServiceProvider=this.registerService=function(a,c,d){if(b)throw Error("Cannot register service. Plugin Provider is connected");"string"===typeof a?a=[a]:Array.isArray(a)||(a=[]);var h=null,k=[];for(h in c)"function"===typeof c[h]&&k.push(h);C[n++]={names:a,methods:k,implementation:c,properties:d||{},listeners:{}}};this.connect=function(c,d){if(!b){if("undefined"===typeof window)k=self;else if(window!==
window.parent)k=window.parent;else if(null!==window.opener)k=window.opener;else{d&&d("No valid plugin target");return}addEventListener("message",a,!1);var h={method:"plugin",params:[y()]};w(h);b=!0}c&&c()};this.disconnect=function(){b&&(removeEventListener("message",a),k=null,b=!1)}}});
var CSSLint=function(){function q(c,g){this.messages=[];this.stats=[];this.lines=c;this.ruleset=g}var t,B,w,y,z;(function(){function c(){this._listeners={}}function g(b){this._input=b.replace(/\n\r?/g,"\n");this._col=this._line=1;this._cursor=0}function e(b,a,c){this.col=c;this.line=a;this.message=b}function a(b,a,c,d){this.col=c;this.line=a;this.text=b;this.type=d}function d(b,a){this._reader=b?new g(b.toString()):null;this._token=null;this._tokenData=a;this._lt=[];this._ltIndex=0;this._ltIndexCache=
[]}c.prototype={constructor:c,addListener:function(b,a){this._listeners[b]||(this._listeners[b]=[]);this._listeners[b].push(a)},fire:function(b){"string"==typeof b&&(b={type:b});"undefined"!=typeof b.target&&(b.target=this);if("undefined"==typeof b.type)throw Error("Event object missing 'type' property.");if(this._listeners[b.type])for(var a=this._listeners[b.type].concat(),c=0,d=a.length;c<d;c++)a[c].call(this,b)},removeListener:function(b,a){if(this._listeners[b])for(var c=this._listeners[b],d=
0,e=c.length;d<e;d++)if(c[d]===a){c.splice(d,1);break}}};g.prototype={constructor:g,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(b){var a=null;this._cursor<this._input.length&&(a=this._input.charAt(this._cursor+("undefined"==typeof b?1:b)-1));return a},read:function(){var b=null;this._cursor<this._input.length&&("\n"==this._input.charAt(this._cursor)?(this._line++,this._col=1):this._col++,b=this._input.charAt(this._cursor++));
return b},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},readTo:function(b){for(var a="",c;a.length<b.length||a.lastIndexOf(b)!=a.length-b.length;)if(c=this.read())a+=c;else throw Error('Expected "'+b+'" at line '+this._line+", col "+this._col+".");return a},readWhile:function(b){for(var a="",c=this.read();null!==
c&&b(c);)a+=c,c=this.read();return a},readMatch:function(b){var a=this._input.substring(this._cursor),c=null;"string"==typeof b?0===a.indexOf(b)&&(c=this.readCount(b.length)):b instanceof RegExp&&b.test(a)&&(c=this.readCount(RegExp.lastMatch.length));return c},readCount:function(a){for(var c="";a--;)c+=this.read();return c}};e.prototype=Error();a.fromToken=function(b){return new a(b.value,b.startLine,b.startCol)};a.prototype={constructor:a,valueOf:function(){return this.toString()},toString:function(){return this.text}};
d.createTokenData=function(a){var c=[],d={};a=a.concat([]);var e=0,g=a.length+1;a.UNKNOWN=-1;for(a.unshift({name:"EOF"});e<g;e++)c.push(a[e].name),a[a[e].name]=e,a[e].text&&(d[a[e].text]=e);a.name=function(a){return c[a]};a.type=function(a){return d[a]};return a};d.prototype={constructor:d,match:function(a,c){a instanceof Array||(a=[a]);for(var d=this.get(c),e=0,g=a.length;e<g;)if(d==a[e++])return!0;this.unget();return!1},mustMatch:function(a,c){var d;a instanceof Array||(a=[a]);if(!this.match.apply(this,
arguments))throw d=this.LT(1),new e("Expected "+this._tokenData[a[0]].name+" at line "+d.startLine+", col "+d.startCol+".",d.startLine,d.startCol);},advance:function(a,c){for(;0!=this.LA(0)&&!this.match(a,c);)this.get();return this.LA(0)},get:function(a){var c=this._tokenData,d=0,e,g;if(this._lt.length&&0<=this._ltIndex&&this._ltIndex<this._lt.length){d++;this._token=this._lt[this._ltIndex++];for(g=c[this._token.type];void 0!==g.channel&&a!==g.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],
g=c[this._token.type],d++;if((void 0===g.channel||a===g.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(d),this._token.type}e=this._getToken();-1<e.type&&!c[e.type].hide&&(e.channel=c[e.type].channel,this._token=e,this._lt.push(e),this._ltIndexCache.push(this._lt.length-this._ltIndex+d),5<this._lt.length&&this._lt.shift(),5<this._ltIndexCache.length&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length);return(g=c[e.type])&&(g.hide||void 0!==g.channel&&a!==g.channel)?this.get(a):
e.type},LA:function(a){var c=a,d;if(0<a){if(5<a)throw Error("Too much lookahead.");for(;c;)d=this.get(),c--;for(;c<a;)this.unget(),c++}else if(0>a)if(this._lt[this._ltIndex+a])d=this._lt[this._ltIndex+a].type;else throw Error("Too much lookbehind.");else d=this._token.type;return d},LT:function(a){this.LA(a);return this._lt[this._ltIndex+a-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(a){return 0>a||a>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[a].name},
tokenType:function(a){return this._tokenData[a]||-1},unget:function(){if(this._ltIndexCache.length)this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1];else throw Error("Too much lookahead.");}};B=e;w=a;y=c;z=d})();(function(){function c(b,c,d){s.call(this,b,c,d,a.COMBINATOR_TYPE);this.type="unknown";/^\s+$/.test(b)?this.type="descendant":"\x3e"==b?this.type="child":"+"==b?this.type="adjacent-sibling":"~"==b&&(this.type="sibling")}function g(b,c){s.call(this,"("+b+(null!==
c?":"+c:"")+")",b.startLine,b.startCol,a.MEDIA_FEATURE_TYPE);this.name=b;this.value=c}function e(b,c,d,u,L){s.call(this,(b?b+" ":"")+(c?c+" ":"")+d.join(" and "),u,L,a.MEDIA_QUERY_TYPE);this.modifier=b;this.mediaType=c;this.features=d}function a(a){N.call(this);this.options=a||{};this._tokenStream=null}function d(b,c,d,u){s.call(this,b,d,u,a.PROPERTY_NAME_TYPE);this.hack=c}function b(b,c,d){s.call(this,b.join(" "),c,d,a.PROPERTY_VALUE_TYPE);this.parts=b}function k(b,c,d){s.call(this,b,c,d,a.PROPERTY_VALUE_PART_TYPE);
this.type="unknown";if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(b))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case "em":case "rem":case "ex":case "px":case "cm":case "mm":case "in":case "pt":case "pc":this.type="length";break;case "deg":case "rad":case "grad":this.type="angle";break;case "ms":case "s":this.type="time";break;case "hz":case "khz":this.type="frequency";break;case "dpi":case "dpcm":this.type="resolution"}else/^([+\-]?[\d\.]+)%$/i.test(b)?
(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)%$/i.test(b)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(b)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(b)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(b)?(this.type="color",b=RegExp.$1,3==b.length?(this.red=parseInt(b.charAt(0)+b.charAt(0),16),this.green=parseInt(b.charAt(1)+b.charAt(1),16),this.blue=parseInt(b.charAt(2)+b.charAt(2),16)):(this.red=parseInt(b.substring(0,
2),16),this.green=parseInt(b.substring(2,4),16),this.blue=parseInt(b.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(b)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(b)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^url\(["']?([^\)"']+)["']?\)/i.test(b)?(this.type="uri",this.uri=RegExp.$1):/^["'][^"']*["']/.test(b)?(this.type=
"string",this.value=eval(b)):P[b.toLowerCase()]?(this.type="color",b=P[b.toLowerCase()].substring(1),this.red=parseInt(b.substring(0,2),16),this.green=parseInt(b.substring(2,4),16),this.blue=parseInt(b.substring(4,6),16)):/^[\,\/]$/.test(b)?(this.type="operator",this.value=b):/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(b)&&(this.type="identifier",this.value=b)}function h(b,c,d){s.call(this,b.join(" "),c,d,a.SELECTOR_TYPE);this.parts=b;this.specificity=r.calculate(this)}function p(b,c,d,
u,L){s.call(this,d,u,L,a.SELECTOR_PART_TYPE);this.elementName=b;this.modifiers=c}function n(b,c,d,u){s.call(this,b,d,u,a.SELECTOR_SUB_PART_TYPE);this.type=c;this.args=[]}function r(a,b,c,u){this.a=a;this.b=b;this.c=c;this.d=u}function l(a){return null!=a&&/\d/.test(a)}function x(a){return null!=a&&/\s/.test(a)}function C(a){return null!=a&&Q.test(a)}function v(a){return null!=a&&/[a-z_\u0080-\uFFFF\\]/i.test(a)}function q(a){return null!=a&&(v(a)||/[0-9\-\\]/.test(a))}function E(a){O.call(this,a,
f)}function F(a,b,c){this.col=c;this.line=b;this.message=a}var N=y,O=z,D=B,s=w,P={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",
darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",
lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",
oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",
skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};c.prototype=new s;c.prototype.constructor=c;g.prototype=new s;g.prototype.constructor=g;e.prototype=new s;e.prototype.constructor=e;a.DEFAULT_TYPE=0;a.COMBINATOR_TYPE=1;a.MEDIA_FEATURE_TYPE=2;
a.MEDIA_QUERY_TYPE=3;a.PROPERTY_NAME_TYPE=4;a.PROPERTY_VALUE_TYPE=5;a.PROPERTY_VALUE_PART_TYPE=6;a.SELECTOR_TYPE=7;a.SELECTOR_PART_TYPE=8;a.SELECTOR_SUB_PART_TYPE=9;a.prototype=function(){var m=new N,K,H={constructor:a,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var u=this._tokenStream,a,b;this.fire("startstylesheet");
this._charset();for(this._skipCruft();u.peek()==f.IMPORT_SYM;)this._import(),this._skipCruft();for(;u.peek()==f.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(b=u.peek();b>f.EOF;){try{switch(b){case f.MEDIA_SYM:this._media();this._skipCruft();break;case f.PAGE_SYM:this._page();this._skipCruft();break;case f.FONT_FACE_SYM:this._font_face();this._skipCruft();break;case f.KEYFRAMES_SYM:this._keyframes();this._skipCruft();break;case f.S:this._readWhitespace();break;default:if(!this._ruleset())switch(b){case f.CHARSET_SYM:throw a=
u.LT(1),this._charset(!1),new D("@charset not allowed here.",a.startLine,a.startCol);case f.IMPORT_SYM:throw a=u.LT(1),this._import(!1),new D("@import not allowed here.",a.startLine,a.startCol);case f.NAMESPACE_SYM:throw a=u.LT(1),this._namespace(!1),new D("@namespace not allowed here.",a.startLine,a.startCol);default:u.get(),this._unexpectedToken(u.token())}}}catch(c){if(c instanceof D&&!this.options.strict)this.fire({type:"error",error:c,message:c.message,line:c.line,col:c.col});else throw c;}b=
u.peek()}b!=f.EOF&&this._unexpectedToken(u.token());this.fire("endstylesheet")},_charset:function(a){var b=this._tokenStream,c,d,m;b.match(f.CHARSET_SYM)&&(d=b.token().startLine,m=b.token().startCol,this._readWhitespace(),b.mustMatch(f.STRING),c=b.token(),c=c.value,this._readWhitespace(),b.mustMatch(f.SEMICOLON),!1!==a&&this.fire({type:"charset",charset:c,line:d,col:m}))},_import:function(a){var b=this._tokenStream,c,d,m=[];b.mustMatch(f.IMPORT_SYM);d=b.token();this._readWhitespace();b.mustMatch([f.STRING,
f.URI]);c=b.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();m=this._media_query_list();b.mustMatch(f.SEMICOLON);this._readWhitespace();!1!==a&&this.fire({type:"import",uri:c,media:m,line:d.startLine,col:d.startCol})},_namespace:function(a){var b=this._tokenStream,c,d,m,e;b.mustMatch(f.NAMESPACE_SYM);c=b.token().startLine;d=b.token().startCol;this._readWhitespace();b.match(f.IDENT)&&(m=b.token().value,this._readWhitespace());b.mustMatch([f.STRING,f.URI]);e=b.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,
"$1");this._readWhitespace();b.mustMatch(f.SEMICOLON);this._readWhitespace();!1!==a&&this.fire({type:"namespace",prefix:m,uri:e,line:c,col:d})},_media:function(){var a=this._tokenStream,b,c,d;a.mustMatch(f.MEDIA_SYM);b=a.token().startLine;c=a.token().startCol;this._readWhitespace();d=this._media_query_list();a.mustMatch(f.LBRACE);this._readWhitespace();for(this.fire({type:"startmedia",media:d,line:b,col:c});;)if(a.peek()==f.PAGE_SYM)this._page();else if(!this._ruleset())break;a.mustMatch(f.RBRACE);
this._readWhitespace();this.fire({type:"endmedia",media:d,line:b,col:c})},_media_query_list:function(){var a=this._tokenStream,b=[];this._readWhitespace();for((a.peek()==f.IDENT||a.peek()==f.LPAREN)&&b.push(this._media_query());a.match(f.COMMA);)this._readWhitespace(),b.push(this._media_query());return b},_media_query:function(){var a=this._tokenStream,b=null,c=null,d=null,m=[];a.match(f.IDENT)&&(c=a.token().value.toLowerCase(),"only"!=c&&"not"!=c?(a.unget(),c=null):d=a.token());this._readWhitespace();
a.peek()==f.IDENT?(b=this._media_type(),null===d&&(d=a.token())):a.peek()==f.LPAREN&&(null===d&&(d=a.LT(1)),m.push(this._media_expression()));if(null===b&&0===m.length)return null;for(this._readWhitespace();a.match(f.IDENT);)"and"!=a.token().value.toLowerCase()&&this._unexpectedToken(a.token()),this._readWhitespace(),m.push(this._media_expression());return new e(c,b,m,d.startLine,d.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var a=this._tokenStream,
b=null,c,d=null;a.mustMatch(f.LPAREN);b=this._media_feature();this._readWhitespace();a.match(f.COLON)&&(this._readWhitespace(),c=a.LT(1),d=this._expression());a.mustMatch(f.RPAREN);this._readWhitespace();return new g(b,d?new s(d,c.startLine,c.startCol):null)},_media_feature:function(){var a=this._tokenStream;a.mustMatch(f.IDENT);return s.fromToken(a.token())},_page:function(){var a=this._tokenStream,b,c,d=null,m=null;a.mustMatch(f.PAGE_SYM);b=a.token().startLine;c=a.token().startCol;this._readWhitespace();
a.match(f.IDENT)&&(d=a.token().value,"auto"===d.toLowerCase()&&this._unexpectedToken(a.token()));a.peek()==f.COLON&&(m=this._pseudo_page());this._readWhitespace();this.fire({type:"startpage",id:d,pseudo:m,line:b,col:c});this._readDeclarations(!0,!0);this.fire({type:"endpage",id:d,pseudo:m,line:b,col:c})},_margin:function(){var a=this._tokenStream,b,c=this._margin_sym();return c?(b=a.token().startLine,a=a.token().startCol,this.fire({type:"startpagemargin",margin:c,line:b,col:a}),this._readDeclarations(!0),
this.fire({type:"endpagemargin",margin:c,line:b,col:a}),!0):!1},_margin_sym:function(){var a=this._tokenStream;return a.match([f.TOPLEFTCORNER_SYM,f.TOPLEFT_SYM,f.TOPCENTER_SYM,f.TOPRIGHT_SYM,f.TOPRIGHTCORNER_SYM,f.BOTTOMLEFTCORNER_SYM,f.BOTTOMLEFT_SYM,f.BOTTOMCENTER_SYM,f.BOTTOMRIGHT_SYM,f.BOTTOMRIGHTCORNER_SYM,f.LEFTTOP_SYM,f.LEFTMIDDLE_SYM,f.LEFTBOTTOM_SYM,f.RIGHTTOP_SYM,f.RIGHTMIDDLE_SYM,f.RIGHTBOTTOM_SYM])?s.fromToken(a.token()):null},_pseudo_page:function(){var a=this._tokenStream;a.mustMatch(f.COLON);
a.mustMatch(f.IDENT);return a.token().value},_font_face:function(){var a=this._tokenStream,b;a.mustMatch(f.FONT_FACE_SYM);b=a.token().startLine;a=a.token().startCol;this._readWhitespace();this.fire({type:"startfontface",line:b,col:a});this._readDeclarations(!0);this.fire({type:"endfontface",line:b,col:a})},_operator:function(){var a=this._tokenStream,b=null;a.match([f.SLASH,f.COMMA])&&(b=a.token(),this._readWhitespace());return b?k.fromToken(b):null},_combinator:function(){var a=this._tokenStream,
b=null;a.match([f.PLUS,f.GREATER,f.TILDE])&&(a=a.token(),b=new c(a.value,a.startLine,a.startCol),this._readWhitespace());return b},_unary_operator:function(){var a=this._tokenStream;return a.match([f.MINUS,f.PLUS])?a.token().value:null},_property:function(){var a=this._tokenStream,b=null,c=null,m,e,g;a.peek()==f.STAR&&this.options.starHack&&(a.get(),m=a.token(),c=m.value,e=m.startLine,g=m.startCol);a.match(f.IDENT)&&(m=a.token(),a=m.value,"_"==a.charAt(0)&&this.options.underscoreHack&&(c="_",a=a.substring(1)),
b=new d(a,c,e||m.startLine,g||m.startCol),this._readWhitespace());return b},_ruleset:function(){var a=this._tokenStream,b;try{b=this._selectors_group()}catch(c){if(c instanceof D&&!this.options.strict){if(this.fire({type:"error",error:c,message:c.message,line:c.line,col:c.col}),a=a.advance([f.RBRACE]),a!=f.RBRACE)throw c;}else throw c;return!0}b&&(this.fire({type:"startrule",selectors:b,line:b[0].line,col:b[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:b,line:b[0].line,col:b[0].col}));
return b},_selectors_group:function(){var a=this._tokenStream,b=[],c;c=this._selector();if(null!==c)for(b.push(c);a.match(f.COMMA);)this._readWhitespace(),c=this._selector(),null!==c?b.push(c):this._unexpectedToken(a.LT(1));return b.length?b:null},_selector:function(){var a=this._tokenStream,b=[],d=null,m=null,f=null,d=this._simple_selector_sequence();if(null===d)return null;b.push(d);do if(m=this._combinator(),null!==m)b.push(m),d=this._simple_selector_sequence(),null===d?this._unexpectedToken(this.LT(1)):
b.push(d);else if(this._readWhitespace())f=new c(a.token().value,a.token().startLine,a.token().startCol),m=this._combinator(),d=this._simple_selector_sequence(),null===d?null!==m&&this._unexpectedToken(a.LT(1)):(null!==m?b.push(m):b.push(f),b.push(d));else break;while(1);return new h(b,b[0].line,b[0].col)},_simple_selector_sequence:function(){var a=this._tokenStream,b=null,c=[],d="",m=[function(){return a.match(f.HASH)?new n(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,
this._attrib,this._pseudo,this._negation],e=0,g=m.length,h=null,H,k;H=a.LT(1).startLine;k=a.LT(1).startCol;(b=this._type_selector())||(b=this._universal());for(null!==b&&(d+=b);a.peek()!==f.S;){for(;e<g&&null===h;)h=m[e++].call(this);if(null===h){if(""===d)return null;break}else e=0,c.push(h),d+=h.toString(),h=null}return""!==d?new p(b,c,d,H,k):null},_type_selector:function(){var a=this._tokenStream,b=this._namespace_prefix(),c=this._element_name();if(c)return b&&(c.text=b+c.text,c.col-=b.length),
c;b&&(a.unget(),1<b.length&&a.unget());return null},_class:function(){var a=this._tokenStream;return a.match(f.DOT)?(a.mustMatch(f.IDENT),a=a.token(),new n("."+a.value,"class",a.startLine,a.startCol-1)):null},_element_name:function(){var a=this._tokenStream;return a.match(f.IDENT)?(a=a.token(),new n(a.value,"elementName",a.startLine,a.startCol)):null},_namespace_prefix:function(){var a=this._tokenStream,b="";if(a.LA(1)===f.PIPE||a.LA(2)===f.PIPE)a.match([f.IDENT,f.STAR])&&(b+=a.token().value),a.mustMatch(f.PIPE),
b+="|";return b.length?b:null},_universal:function(){var a=this._tokenStream,b="",c;(c=this._namespace_prefix())&&(b+=c);a.match(f.STAR)&&(b+="*");return b.length?b:null},_attrib:function(){var a=this._tokenStream,b=null,c,d;return a.match(f.LBRACKET)?(d=a.token(),b=d.value,b+=this._readWhitespace(),(c=this._namespace_prefix())&&(b+=c),a.mustMatch(f.IDENT),b+=a.token().value,b+=this._readWhitespace(),a.match([f.PREFIXMATCH,f.SUFFIXMATCH,f.SUBSTRINGMATCH,f.EQUALS,f.INCLUDES,f.DASHMATCH])&&(b+=a.token().value,
b+=this._readWhitespace(),a.mustMatch([f.IDENT,f.STRING]),b+=a.token().value,b+=this._readWhitespace()),a.mustMatch(f.RBRACKET),new n(b+"]","attribute",d.startLine,d.startCol)):null},_pseudo:function(){var a=this._tokenStream,b=null,c=":",d,m;a.match(f.COLON)&&(a.match(f.COLON)&&(c+=":"),a.match(f.IDENT)?(b=a.token().value,d=a.token().startLine,m=a.token().startCol-c.length):a.peek()==f.FUNCTION&&(d=a.LT(1).startLine,m=a.LT(1).startCol-c.length,b=this._functional_pseudo()),b&&(b=new n(c+b,"pseudo",
d,m)));return b},_functional_pseudo:function(){var a=this._tokenStream,b=null;a.match(f.FUNCTION)&&(b=a.token().value,b+=this._readWhitespace(),b+=this._expression(),a.mustMatch(f.RPAREN),b+=")");return b},_expression:function(){for(var a=this._tokenStream,b="";a.match([f.PLUS,f.MINUS,f.DIMENSION,f.NUMBER,f.STRING,f.IDENT,f.LENGTH,f.FREQ,f.ANGLE,f.TIME,f.RESOLUTION]);)b+=a.token().value,b+=this._readWhitespace();return b.length?b:null},_negation:function(){var a=this._tokenStream,b,c,d="",m;b=null;
a.match(f.NOT)&&(d=a.token().value,b=a.token().startLine,c=a.token().startCol,d+=this._readWhitespace(),m=this._negation_arg(),d=d+m+this._readWhitespace(),a.match(f.RPAREN),d+=a.token().value,b=new n(d,"not",b,c),b.args.push(m));return b},_negation_arg:function(){var a=this._tokenStream,b=[this._type_selector,this._universal,function(){return a.match(f.HASH)?new n(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,this._attrib,this._pseudo],c=null,d=0,m=b.length,e,g;e=
a.LT(1).startLine;for(g=a.LT(1).startCol;d<m&&null===c;)c=b[d].call(this),d++;null===c&&this._unexpectedToken(a.LT(1));return"elementName"==c.type?new p(c,[],c.toString(),e,g):new p(null,[c],c.toString(),e,g)},_declaration:function(){var a=this._tokenStream,b=null,c=null,d=null,m=null,b=this._property();if(null!==b){a.mustMatch(f.COLON);this._readWhitespace();c=this._expr();(!c||0===c.length)&&this._unexpectedToken(a.LT(1));d=this._prio();try{this._validateProperty(b,c)}catch(e){m=e}this.fire({type:"property",
property:b,value:c,important:d,line:b.line,col:b.col,invalid:m});return!0}return!1},_prio:function(){var a=this._tokenStream.match(f.IMPORTANT_SYM);this._readWhitespace();return a},_expr:function(){var a=[],c=null,c=this._term();if(null!==c){a.push(c);do if((c=this._operator())&&a.push(c),c=this._term(),null===c)break;else a.push(c);while(1)}return 0<a.length?new b(a,a[0].startLine,a[0].startCol):null},_term:function(){var a=this._tokenStream,b=null,c=null,d,m,b=this._unary_operator();null!==b&&(d=
a.token().startLine,m=a.token().startCol);a.peek()==f.IE_FUNCTION&&this.options.ieFilters?(c=this._ie_function(),null===b&&(d=a.token().startLine,m=a.token().startCol)):a.match([f.NUMBER,f.PERCENTAGE,f.LENGTH,f.ANGLE,f.TIME,f.FREQ,f.STRING,f.IDENT,f.URI,f.UNICODE_RANGE])?(c=a.token().value,null===b&&(d=a.token().startLine,m=a.token().startCol),this._readWhitespace()):(c=this._hexcolor(),null===c?(null===b&&(d=a.LT(1).startLine,m=a.LT(1).startCol),null===c&&(c=a.LA(3)==f.EQUALS&&this.options.ieFilters?
this._ie_function():this._function())):null===b&&(d=a.token().startLine,m=a.token().startCol));return null!==c?new k(null!==b?b+c:c,d,m):null},_function:function(){var a=this._tokenStream,b=null,c=null;if(a.match(f.FUNCTION)){b=a.token().value;this._readWhitespace();c=this._expr();b+=c;if(this.options.ieFilters&&a.peek()==f.EQUALS){do{this._readWhitespace()&&(b+=a.token().value);a.LA(0)==f.COMMA&&(b+=a.token().value);a.match(f.IDENT);b+=a.token().value;a.match(f.EQUALS);b+=a.token().value;for(c=a.peek();c!=
f.COMMA&&c!=f.S&&c!=f.RPAREN;)a.get(),b+=a.token().value,c=a.peek()}while(a.match([f.COMMA,f.S]))}a.match(f.RPAREN);b+=")";this._readWhitespace()}return b},_ie_function:function(){var a=this._tokenStream,b=null,c;if(a.match([f.IE_FUNCTION,f.FUNCTION])){b=a.token().value;do{this._readWhitespace()&&(b+=a.token().value);a.LA(0)==f.COMMA&&(b+=a.token().value);a.match(f.IDENT);b+=a.token().value;a.match(f.EQUALS);b+=a.token().value;for(c=a.peek();c!=f.COMMA&&c!=f.S&&c!=f.RPAREN;)a.get(),b+=a.token().value,
c=a.peek()}while(a.match([f.COMMA,f.S]));a.match(f.RPAREN);b+=")";this._readWhitespace()}return b},_hexcolor:function(){var a=this._tokenStream,b=null;if(a.match(f.HASH)){a=a.token();b=a.value;if(!/#[a-f0-9]{3,6}/i.test(b))throw new D("Expected a hex color but found '"+b+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol);this._readWhitespace()}return b},_keyframes:function(){var a=this._tokenStream,b,c;a.mustMatch(f.KEYFRAMES_SYM);this._readWhitespace();c=this._keyframe_name();
this._readWhitespace();a.mustMatch(f.LBRACE);this.fire({type:"startkeyframes",name:c,line:c.line,col:c.col});this._readWhitespace();for(b=a.peek();b==f.IDENT||b==f.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),b=a.peek();this.fire({type:"endkeyframes",name:c,line:c.line,col:c.col});this._readWhitespace();a.mustMatch(f.RBRACE)},_keyframe_name:function(){var a=this._tokenStream;a.mustMatch([f.IDENT,f.STRING]);return s.fromToken(a.token())},_keyframe_rule:function(){var a=this._key_list();
this.fire({type:"startkeyframerule",keys:a,line:a[0].line,col:a[0].col});this._readDeclarations(!0);this.fire({type:"endkeyframerule",keys:a,line:a[0].line,col:a[0].col})},_key_list:function(){var a=this._tokenStream,b=[];b.push(this._key());for(this._readWhitespace();a.match(f.COMMA);)this._readWhitespace(),b.push(this._key()),this._readWhitespace();return b},_key:function(){var a=this._tokenStream,b;if(a.match(f.PERCENTAGE))return s.fromToken(a.token());if(a.match(f.IDENT)){b=a.token();if(/from|to/i.test(b.value))return s.fromToken(b);
a.unget()}this._unexpectedToken(a.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([f.S,f.CDO,f.CDC]););},_readDeclarations:function(a,b){var c=this._tokenStream;this._readWhitespace();a&&c.mustMatch(f.LBRACE);this._readWhitespace();try{for(;;){if(!b||!this._margin())if(this._declaration()){if(!c.match(f.SEMICOLON))break}else break;this._readWhitespace()}c.mustMatch(f.RBRACE);this._readWhitespace()}catch(d){if(d instanceof D&&!this.options.strict)if(this.fire({type:"error",error:d,message:d.message,
line:d.line,col:d.col}),c=c.advance([f.SEMICOLON,f.RBRACE]),c==f.SEMICOLON)this._readDeclarations(!1,b);else{if(c!=f.RBRACE)throw d;}else throw d;}},_readWhitespace:function(){for(var a=this._tokenStream,b="";a.match(f.S);)b+=a.token().value;return b},_unexpectedToken:function(a){throw new D("Unexpected token '"+a.value+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol);},_verifyEnd:function(){this._tokenStream.LA(1)!=f.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(a,
b){var c=a.text.toLowerCase();if(A[c]){if("function"==typeof A[c])A[c](b)}else if(0!==c.indexOf("-"))throw new F("Unknown property '"+a+"'.",a.line,a.col);},parse:function(a){this._tokenStream=new E(a,f);this._stylesheet()},parseStyleSheet:function(a){return this.parse(a)},parseMediaQuery:function(a){this._tokenStream=new E(a,f);a=this._media_query();this._verifyEnd();return a},parsePropertyValue:function(a){this._tokenStream=new E(a,f);this._readWhitespace();a=this._expr();this._readWhitespace();
this._verifyEnd();return a},parseRule:function(a){this._tokenStream=new E(a,f);this._readWhitespace();a=this._ruleset();this._readWhitespace();this._verifyEnd();return a},parseSelector:function(a){this._tokenStream=new E(a,f);this._readWhitespace();a=this._selector();this._readWhitespace();this._verifyEnd();return a}};for(K in H)m[K]=H[K];return m}();var G={"absolute-size":function(a){return this.identifier(a,"xx-small | x-small | small | medium | large | x-large | xx-large")},"relative-size":function(a){return this.identifier(a,
"smaller | larger")},identifier:function(a,b){var c=a.text.toString().toLowerCase(),d=b.split(" | "),f,e,g=!1;f=0;for(e=d.length;f<e&&!g;f++)c==d[f]&&(g=!0);return g},length:function(a){return"length"==a.type||"number"==a.type||"integer"==a.type||"0"==a},color:function(a){return"color"==a.type||"transparent"==a},number:function(a){return"number"==a.type||this.integer(a)},integer:function(a){return"integer"==a.type},angle:function(a){return"angle"==a.type},uri:function(a){return"uri"==a.type},image:function(a){return this.uri(a)},
percentage:function(a){return"percentage"==a.type||"0"==a},"border-width":function(a){return this.length(a)||this.identifier(a,"thin | medium | thick")},"border-style":function(a){return this.identifier(a,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"margin-width":function(a){return this.length(a)||this.percentage(a)||this.identifier(a,"auto")},"padding-width":function(a){return this.length(a)||this.percentage(a)}},A={"alignment-adjust":1,"alignment-baseline":1,
animation:1,"animation-delay":1,"animation-direction":1,"animation-duration":1,"animation-fill-mode":1,"animation-iteration-count":1,"animation-name":1,"animation-play-state":1,"animation-timing-function":1,appearance:1,azimuth:1,"backface-visibility":1,background:1,"background-attachment":["scroll | fixed | inherit"],"background-break":1,"background-clip":1,"background-color":["color","inherit"],"background-image":1,"background-origin":1,"background-position":1,"background-repeat":["repeat | repeat-x | repeat-y | no-repeat | inherit"],
"background-size":1,"baseline-shift":1,binding:1,bleed:1,"bookmark-label":1,"bookmark-level":1,"bookmark-state":1,"bookmark-target":1,border:1,"border-bottom":1,"border-bottom-color":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"border-bottom-style":["border-style"],"border-bottom-width":["border-width"],"border-collapse":["collapse | separate | inherit"],"border-color":{multi:["color","inherit"],max:4},"border-image":1,"border-image-outset":{multi:["length","number"],max:4},"border-image-repeat":{multi:["stretch | repeat | round"],
max:2},"border-image-slice":1,"border-image-source":["image","none"],"border-image-width":{multi:["length","percentage","number","auto"],max:4},"border-left":1,"border-left-color":["color","inherit"],"border-left-style":["border-style"],"border-left-width":["border-width"],"border-radius":1,"border-right":1,"border-right-color":["color","inherit"],"border-right-style":["border-style"],"border-right-width":["border-width"],"border-spacing":1,"border-style":{multi:["border-style"],max:4},"border-top":1,
"border-top-color":["color","inherit"],"border-top-left-radius":1,"border-top-right-radius":1,"border-top-style":["border-style"],"border-top-width":["border-width"],"border-width":{multi:["border-width"],max:4},bottom:["margin-width","inherit"],"box-align":["start | end | center | baseline | stretch"],"box-decoration-break":["slice |clone"],"box-direction":["normal | reverse | inherit"],"box-flex":["number"],"box-flex-group":["integer"],"box-lines":["single | multiple"],"box-ordinal-group":["integer"],
"box-orient":["horizontal | vertical | inline-axis | block-axis | inherit"],"box-pack":["start | end | center | justify"],"box-shadow":1,"box-sizing":["content-box | border-box | inherit"],"break-after":["auto | always | avoid | left | right | page | column | avoid-page | avoid-column"],"break-before":["auto | always | avoid | left | right | page | column | avoid-page | avoid-column"],"break-inside":["auto | avoid | avoid-page | avoid-column"],"caption-side":["top | bottom | inherit"],clear:["none | right | left | both | inherit"],
clip:1,color:["color","inherit"],"color-profile":1,"column-count":["integer","auto"],"column-fill":["auto | balance"],"column-gap":["length","normal"],"column-rule":1,"column-rule-color":["color"],"column-rule-style":["border-style"],"column-rule-width":["border-width"],"column-span":["none | all"],"column-width":["length","auto"],columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:1,cue:["cue-after | cue-before | inherit"],"cue-after":1,"cue-before":1,cursor:1,direction:["ltr | rtl | inherit"],
display:["inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid","none | inherit"],"dominant-baseline":1,"drop-initial-after-adjust":1,"drop-initial-after-align":1,"drop-initial-before-adjust":1,"drop-initial-before-align":1,"drop-initial-size":1,"drop-initial-value":1,elevation:1,"empty-cells":["show | hide | inherit"],
filter:1,fit:["fill | hidden | meet | slice"],"fit-position":1,"float":["left | right | none | inherit"],"float-offset":1,font:1,"font-family":1,"font-size":["absolute-size","relative-size","length","percentage","inherit"],"font-size-adjust":1,"font-stretch":1,"font-style":["normal | italic | oblique | inherit"],"font-variant":["normal | small-caps | inherit"],"font-weight":["normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit"],"grid-cell-stacking":["columns | rows | layer"],
"grid-column":1,"grid-columns":1,"grid-column-align":["start | end | center | stretch"],"grid-column-sizing":1,"grid-column-span":["integer"],"grid-flow":["none | rows | columns"],"grid-layer":["integer"],"grid-row":1,"grid-rows":1,"grid-row-align":["start | end | center | stretch"],"grid-row-span":["integer"],"grid-row-sizing":1,"hanging-punctuation":1,height:["margin-width","inherit"],"hyphenate-after":1,"hyphenate-before":1,"hyphenate-character":["string","auto"],"hyphenate-lines":1,"hyphenate-resource":1,
hyphens:["none | manual | auto"],icon:1,"image-orientation":["angle","auto"],"image-rendering":1,"image-resolution":1,"inline-box-align":1,left:["margin-width","inherit"],"letter-spacing":["length","normal | inherit"],"line-height":["number","length","percentage","normal | inherit"],"line-break":["auto | loose | normal | strict"],"line-stacking":1,"line-stacking-ruby":1,"line-stacking-shift":1,"line-stacking-strategy":1,"list-style":1,"list-style-image":["uri","none | inherit"],"list-style-position":["inside | outsider | inherit"],
"list-style-type":["disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit"],margin:{multi:["margin-width","inherit"],max:4},"margin-bottom":["margin-width","inherit"],"margin-left":["margin-width","inherit"],"margin-right":["margin-width","inherit"],"margin-top":["margin-width","inherit"],mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,
"marquee-speed":1,"marquee-style":1,"max-height":["length","percentage","none | inherit"],"max-width":["length","percentage","none | inherit"],"min-height":["length","percentage","inherit"],"min-width":["length","percentage","inherit"],"move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:["number","inherit"],orphans:["integer","inherit"],outline:1,"outline-color":["color","invert | inherit"],"outline-offset":1,"outline-style":["border-style","inherit"],"outline-width":["border-width",
"inherit"],overflow:["visible | hidden | scroll | auto | inherit"],"overflow-style":1,"overflow-x":1,"overflow-y":1,padding:{multi:["padding-width","inherit"],max:4},"padding-bottom":["padding-width","inherit"],"padding-left":["padding-width","inherit"],"padding-right":["padding-width","inherit"],"padding-top":["padding-width","inherit"],page:1,"page-break-after":["auto | always | avoid | left | right | inherit"],"page-break-before":["auto | always | avoid | left | right | inherit"],"page-break-inside":["auto | avoid | inherit"],
"page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,position:["static | relative | absolute | fixed | inherit"],"presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:["margin-width","inherit"],rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:["normal | none | spell-out | inherit"],
"speak-header":["once | always | inherit"],"speak-numeral":["digits | continuous | inherit"],"speak-punctuation":["code | none | inherit"],"speech-rate":1,src:1,stress:1,"string-set":1,"table-layout":["auto | fixed | inherit"],"tab-size":["integer","length"],target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":["left | right | center | justify | inherit"],"text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":["length","percentage","inherit"],"text-justify":["auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida"],
"text-outline":1,"text-shadow":1,"text-transform":["capitalize | uppercase | lowercase | none | inherit"],"text-wrap":["normal | none | avoid"],top:["margin-width","inherit"],transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":["normal | embed | bidi-override | inherit"],"user-modify":["read-only | read-write | write-only | inherit"],"user-select":["none | text | toggle | element | elements | all | inherit"],
"vertical-align":["percentage","length","baseline | sub | super | top | text-top | middle | bottom | text-bottom | inherit"],visibility:["visible | hidden | collapse | inherit"],"voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":["normal | pre | nowrap | pre-wrap | pre-line | inherit"],"white-space-collapse":1,widows:["integer","inherit"],width:["length","percentage","auto","inherit"],
"word-break":["normal | keep-all | break-all"],"word-spacing":["length","normal | inherit"],"word-wrap":1,"z-index":["integer","auto | inherit"],zoom:["number","percentage","normal"]};(function(){for(var a in A)A.hasOwnProperty(a)&&(A[a]instanceof Array?A[a]=function(a){return function(b){var c=!1,d=[],f=b.parts[0];if(1!=b.parts.length)throw new F("Expected 1 value but found "+b.parts.length+".",b.line,b.col);for(var m=0,e=a.length;m<e&&!c;m++)"undefined"==typeof G[a[m]]?(c=c||G.identifier(f,a[m]),
d.push("one of ("+a[m]+")")):(c=c||G[a[m]](f),d.push(a[m]));if(!c)throw new F("Expected "+d.join(" or ")+" but found '"+b+"'.",b.line,b.col);}}(A[a]):"object"==typeof A[a]&&(A[a]=function(a){return function(b){var c,d,m,f,e,g,h,k=b.parts;if(a.max&&k.length>a.max)throw new F("Expected a max of "+a.max+" property values but found "+k.length+".",b.line,b.col);a.multi&&(h=a.multi);d=0;for(m=k.length;d<m;d++){g=[];c=!1;f=0;for(e=h.length;f<e;f++)if("undefined"==typeof G[h[f]]){if(G.identifier(k[d],h[f])){c=
!0;break}g.push("one of ("+h[f]+")")}else{if(G[h[f]](k[d])){c=!0;break}g.push(h[f])}if(!c)throw new F("Expected "+g.join(" or ")+" but found '"+k[d]+"'.",b.line,b.col);}}}(A[a])))})();d.prototype=new s;d.prototype.constructor=d;d.prototype.toString=function(){return(this.hack?this.hack:"")+this.text};b.prototype=new s;b.prototype.constructor=b;k.prototype=new s;k.prototype.constructor=b;k.fromToken=function(a){return new k(a.value,a.startLine,a.startCol)};var J={":first-letter":1,":first-line":1,
":before":1,":after":1,ELEMENT:1,CLASS:2,isElement:function(a){return 0===a.indexOf("::")||J[a.toLowerCase()]==J.ELEMENT}};h.prototype=new s;h.prototype.constructor=h;p.prototype=new s;p.prototype.constructor=p;n.prototype=new s;n.prototype.constructor=n;r.prototype={constructor:r,compare:function(a){var b=["a","b","c","d"],c,d;c=0;for(d=b.length;c<d;c++){if(this[b[c]]<a[b[c]])return-1;if(this[b[c]]>a[b[c]])return 1}return 0},valueOf:function(){return 1E3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+
","+this.b+","+this.c+","+this.d}};r.calculate=function(a){function b(a){var c,d,m,h,k;a.elementName&&"*"!=a.text.charAt(a.text.length-1)&&g++;c=0;for(m=a.modifiers.length;c<m;c++)switch(k=a.modifiers[c],k.type){case "class":case "attribute":e++;break;case "id":f++;break;case "pseudo":J.isElement(k.text)?g++:e++;break;case "not":d=0;for(h=k.args.length;d<h;d++)b(k.args[d])}}var c,d,f=0,e=0,g=0;c=0;for(d=a.parts.length;c<d;c++)part=a.parts[c],part instanceof p&&b(part);return new r(0,f,e,g)};var M=
/^[0-9a-fA-F]$/,Q=/\n|\r\n|\r|\f/;E.prototype=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}(new O,{_getToken:function(a){var b=this._reader,c=null,d=b.getLine(),e=b.getCol();for(a=b.read();a;){switch(a){case "/":c="*"==b.peek()?this.commentToken(a,d,e):this.charToken(a,d,e);break;case "|":case "~":case "^":case "$":case "*":c="\x3d"==b.peek()?this.comparisonToken(a,d,e):this.charToken(a,d,e);break;case '"':case "'":c=this.stringToken(a,d,e);break;case "#":c=q(b.peek())?this.hashToken(a,
d,e):this.charToken(a,d,e);break;case ".":c=l(b.peek())?this.numberToken(a,d,e):this.charToken(a,d,e);break;case "-":c="-"==b.peek()?this.htmlCommentEndToken(a,d,e):v(b.peek())?this.identOrFunctionToken(a,d,e):this.charToken(a,d,e);break;case "!":c=this.importantToken(a,d,e);break;case "@":c=this.atRuleToken(a,d,e);break;case ":":c=this.notToken(a,d,e);break;case "\x3c":c=this.htmlCommentStartToken(a,d,e);break;case "U":case "u":if("+"==b.peek()){c=this.unicodeRangeToken(a,d,e);break}default:c=l(a)?
this.numberToken(a,d,e):x(a)?this.whitespaceToken(a,d,e):null!=a&&(v(a)||/\-\\/.test(a))?this.identOrFunctionToken(a,d,e):this.charToken(a,d,e)}break}!c&&null==a&&(c=this.createToken(f.EOF,null,d,e));return c},createToken:function(a,b,c,d,f){var e=this._reader;f=f||{};return{value:b,type:a,channel:f.channel,hide:f.hide||!1,startLine:c,startCol:d,endLine:e.getLine(),endCol:e.getCol()}},atRuleToken:function(a,b,c){var d=a,e=this._reader,g=f.CHAR;e.mark();d=this.readName();d=a+d;g=f.type(d.toLowerCase());
if(g==f.CHAR||g==f.UNKNOWN)g=f.CHAR,d=a,e.reset();return this.createToken(g,d,b,c)},charToken:function(a,b,c){var d=f.type(a);-1==d&&(d=f.CHAR);return this.createToken(d,a,b,c)},commentToken:function(a,b,c){a=this.readComment(a);return this.createToken(f.COMMENT,a,b,c)},comparisonToken:function(a,b,c){a+=this._reader.read();var d=f.type(a)||f.CHAR;return this.createToken(d,a,b,c)},hashToken:function(a,b,c){a=this.readName(a);return this.createToken(f.HASH,a,b,c)},htmlCommentStartToken:function(a,
b,c){var d=this._reader,e=a;d.mark();e+=d.readCount(3);if("\x3c!--"==e)return this.createToken(f.CDO,e,b,c);d.reset();return this.charToken(a,b,c)},htmlCommentEndToken:function(a,b,c){var d=this._reader,e=a;d.mark();e+=d.readCount(2);if("--\x3e"==e)return this.createToken(f.CDC,e,b,c);d.reset();return this.charToken(a,b,c)},identOrFunctionToken:function(a,b,c){var d=this._reader;a=this.readName(a);var e=f.IDENT;"("==d.peek()?(a+=d.read(),"url("==a.toLowerCase()?(e=f.URI,a=this.readURI(a),"url("==
a.toLowerCase()&&(e=f.FUNCTION)):e=f.FUNCTION):":"==d.peek()&&"progid"==a.toLowerCase()&&(a+=d.readTo("("),e=f.IE_FUNCTION);return this.createToken(e,a,b,c)},importantToken:function(a,b,c){var d=this._reader,e=a,g=f.CHAR,h,k;d.mark();for(k=d.read();k;){if("/"==k)if("*"!=d.peek())break;else{if(h=this.readComment(k),""==h)break}else if(x(k))e+=k+this.readWhitespace();else{/i/i.test(k)&&(h=d.readCount(8),/mportant/i.test(h)&&(e+=k+h,g=f.IMPORTANT_SYM));break}k=d.read()}return g==f.CHAR?(d.reset(),this.charToken(a,
b,c)):this.createToken(g,e,b,c)},notToken:function(a,b,c){var d=this._reader,e=a;d.mark();e+=d.readCount(4);if(":not("==e.toLowerCase())return this.createToken(f.NOT,e,b,c);d.reset();return this.charToken(a,b,c)},numberToken:function(a,b,c){var d=this._reader;a=this.readNumber(a);var e=f.NUMBER,g=d.peek();null!=g&&(v(g)||/\-\\/.test(g))?(d=this.readName(d.read()),a+=d,e=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(d)?f.LENGTH:/^deg|^rad$|^grad$/i.test(d)?f.ANGLE:
/^ms$|^s$/i.test(d)?f.TIME:/^hz$|^khz$/i.test(d)?f.FREQ:/^dpi$|^dpcm$/i.test(d)?f.RESOLUTION:f.DIMENSION):"%"==g&&(a+=d.read(),e=f.PERCENTAGE);return this.createToken(e,a,b,c)},stringToken:function(a,b,c){for(var d=a,e=this._reader,g=a,h=f.STRING,k=e.read();k;){d+=k;if(k==a&&"\\"!=g)break;if(C(e.peek())&&"\\"!=k){h=f.INVALID;break}g=k;k=e.read()}null==k&&(h=f.INVALID);return this.createToken(h,d,b,c)},unicodeRangeToken:function(a,b,c){var d=this._reader,e,g=f.CHAR;"+"==d.peek()&&(d.mark(),a+=d.read(),
a+=this.readUnicodeRangePart(!0),2==a.length?d.reset():(g=f.UNICODE_RANGE,-1==a.indexOf("?")&&"-"==d.peek()&&(d.mark(),e=d.read(),e+=this.readUnicodeRangePart(!1),1==e.length?d.reset():a+=e)));return this.createToken(g,a,b,c)},whitespaceToken:function(a,b,c){a+=this.readWhitespace();return this.createToken(f.S,a,b,c)},readUnicodeRangePart:function(a){for(var b=this._reader,c="",d=b.peek();null!=d&&M.test(d)&&6>c.length;)b.read(),c+=d,d=b.peek();if(a)for(;"?"==d&&6>c.length;)b.read(),c+=d,d=b.peek();
return c},readWhitespace:function(){for(var a=this._reader,b="",c=a.peek();x(c);)a.read(),b+=c,c=a.peek();return b},readNumber:function(a){var b=this._reader,c=a;a="."==a;for(var d=b.peek();d;){if(l(d))c+=b.read();else if("."==d)if(a)break;else a=!0,c+=b.read();else break;d=b.peek()}return c},readString:function(){for(var a=this._reader,b=a.read(),c=b,d=b,e=a.peek();e;){e=a.read();c+=e;if(e==b&&"\\"!=d)break;if(C(a.peek())&&"\\"!=e){c="";break}d=e;e=a.peek()}null==e&&(c="");return c},readURI:function(a){var b=
this._reader,c=a,d="",e=b.peek();for(b.mark();e&&x(e);)b.read(),e=b.peek();d="'"==e||'"'==e?this.readString():this.readURL();for(e=b.peek();e&&x(e);)b.read(),e=b.peek();""==d||")"!=e?(c=a,b.reset()):c+=d+b.read();return c},readURL:function(){for(var a=this._reader,b="",c=a.peek();/^[!#$%&\\*-~]$/.test(c);)b+=a.read(),c=a.peek();return b},readName:function(a){var b=this._reader;a=a||"";for(var c=b.peek();;)if("\\"==c)a+=this.readEscape(b.read()),c=b.peek();else if(c&&q(c))a+=b.read(),c=b.peek();else break;
return a},readEscape:function(a){var b=this._reader;a=a||"";var c=0,d=b.peek();if(null!=d&&M.test(d)){do a+=b.read(),d=b.peek();while(d&&null!=d&&M.test(d)&&6>++c)}3==a.length&&/\s/.test(d)||7==a.length||1==a.length?b.read():d="";return a+d},readComment:function(a){var b=this._reader;a=a||"";var c=b.read();if("*"==c){for(;c;){a+=c;if(2<a.length&&"*"==c&&"/"==b.peek()){a+=b.read();break}c=b.read()}return a}return""}});var f=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,
hide:!0,channel:"comment"},{name:"INCLUDES",text:"~\x3d"},{name:"DASHMATCH",text:"|\x3d"},{name:"PREFIXMATCH",text:"^\x3d"},{name:"SUFFIXMATCH",text:"$\x3d"},{name:"SUBSTRINGMATCH",text:"*\x3d"},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes",
"@-moz-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:"\x3e"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},
{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},
{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"\x3d"},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var a=[],b={};f.UNKNOWN=
-1;f.unshift({name:"EOF"});for(var c=0,d=f.length;c<d;c++)if(a.push(f[c].name),f[f[c].name]=c,f[c].text)if(f[c].text instanceof Array)for(var e=0;e<f[c].text.length;e++)b[f[c].text[e]]=c;else b[f[c].text]=c;f.name=function(b){return a[b]};f.type=function(a){return b[a]||-1}})();F.prototype=Error();t=a})();var l=function(){var c=[],g=[],e=new y;e.version="0.8.1";e.addRule=function(a){c.push(a);c[a.id]=a};e.clearRules=function(){c=[]};e.getRules=function(){return[].concat(c).sort(function(a,c){return a.id>
c.id?1:0})};e.addFormatter=function(a){g[a.id]=a};e.getFormatter=function(a){return g[a]};e.format=function(a,c,b,e){b=this.getFormatter(b);var g=null;b&&(g=b.startFormat(),g+=b.formatResults(a,c,e||{}),g+=b.endFormat());return g};e.hasFormat=function(a){return g.hasOwnProperty(a)};e.verify=function(a,d){var b=0,e=c.length,g,p=new t({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});g=a.split(/\n\r?/g);if(!d)for(d={};b<e;)d[c[b++].id]=1;e=new q(g,d);d.errors=2;for(b in d)d.hasOwnProperty(b)&&
c[b]&&c[b].init(p,e);try{p.parse(a)}catch(n){e.error("Fatal error, cannot continue: "+n.message,n.line,n.col,{})}b={messages:e.messages,stats:e.stats};b.messages.sort(function(a,b){return a.rollup&&!b.rollup?1:!a.rollup&&b.rollup?-1:a.line-b.line});return b};return e}();q.prototype={constructor:q,error:function(c,g,e,a){this.messages.push({type:"error",line:g,col:e,message:c,evidence:this.lines[g-1],rule:a||{}})},warn:function(c,g,e,a){this.report(c,g,e,a)},report:function(c,g,e,a){this.messages.push({type:2==
this.ruleset[a.id]?"error":"warning",line:g,col:e,message:c,evidence:this.lines[g-1],rule:a})},info:function(c,g,e,a){this.messages.push({type:"info",line:g,col:e,message:c,evidence:this.lines[g-1],rule:a})},rollupError:function(c,g){this.messages.push({type:"error",rollup:!0,message:c,rule:g})},rollupWarn:function(c,g){this.messages.push({type:"warning",rollup:!0,message:c,rule:g})},stat:function(c,g){this.stats[c]=g}};l._Reporter=q;l.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",
desc:"Don't use adjoining classes.",browsers:"IE6",init:function(c,g){var e=this;c.addListener("startrule",function(a){a=a.selectors;var d,b,k,h,p,n,l;for(p=0;p<a.length;p++){d=a[p];for(n=0;n<d.parts.length;n++)if(b=d.parts[n],b.type==c.SELECTOR_PART_TYPE)for(l=h=0;l<b.modifiers.length;l++)k=b.modifiers[l],"class"==k.type&&h++,1<h&&g.report("Don't use adjoining classes.",b.line,b.col,e)}})}});l.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",
browsers:"All",init:function(c,g){function e(){h={}}function a(){var a;if(h.height)for(a in k)k.hasOwnProperty(a)&&h[a]&&("padding"==a&&2===h[a].value.parts.length&&0===h[a].value.parts[0].value||g.report("Using height with "+a+" can sometimes make elements larger than you expect.",h[a].line,h[a].col,d));if(h.width)for(a in b)b.hasOwnProperty(a)&&h[a]&&("padding"==a&&2===h[a].value.parts.length&&0===h[a].value.parts[1].value||g.report("Using width with "+a+" can sometimes make elements larger than you expect.",
h[a].line,h[a].col,d))}var d=this,b={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},k={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},h;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",e);c.addListener("property",function(a){var c=a.property.text.toLowerCase();if(k[c]||b[c])!/^0\S*$/.test(a.value)&&!("border"==
c&&"none"==a.value)&&(h[c]={line:a.property.line,col:a.property.col,value:a.value});else if("width"==c||"height"==c)h[c]=1});c.addListener("endrule",a);c.addListener("endfontface",a);c.addListener("endpage",a);c.addListener("endpagemargin",a);c.addListener("endkeyframerule",a)}});l.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",browsers:"IE6, IE7",tags:["Compatibility"],init:function(c,g){var e=this;c.addListener("property",
function(a){"box-sizing"==a.property.text.toLowerCase()&&g.report("The box-sizing property isn't supported in IE6 and IE7.",a.line,a.col,e)})}});l.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",browsers:"All",init:function(c,g){var e=this,a,d,b,k,h,p,n,l=Array.prototype.push,q=[];a={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz",
"animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit moz","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz",
"box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz","column-gap":"webkit moz","column-rule":"webkit moz","column-rule-color":"webkit moz","column-rule-style":"webkit moz","column-rule-width":"webkit moz","column-width":"webkit moz",hyphens:"epub moz","line-break":"webkit ms",
"margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",transition:"webkit moz o","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz",
"word-break":"epub ms","writing-mode":"epub ms"};for(b in a)if(a.hasOwnProperty(b)){k=[];h=a[b].split(" ");p=0;for(n=h.length;p<n;p++)k.push("-"+h[p]+"-"+b);a[b]=k;l.apply(q,k)}c.addListener("startrule",function(){d=[]});c.addListener("property",function(a){a=a.property.text;-1<q.indexOf(a)&&d.push(a)});c.addListener("endrule",function(b){if(d.length){var c={},h,k,p,n,l,r,q;h=0;for(k=d.length;h<k;h++)for(n in p=d[h],a)a.hasOwnProperty(n)&&(l=a[n],-1<l.indexOf(p)&&(void 0===c[n]&&(c[n]={full:l.slice(0),
actual:[]}),-1===c[n].actual.indexOf(p)&&c[n].actual.push(p)));for(n in c)if(c.hasOwnProperty(n)&&(h=c[n],p=h.full,l=h.actual,p.length>l.length)){h=0;for(k=p.length;h<k;h++)r=p[h],-1===l.indexOf(r)&&(q=1===l.length?l[0]:2==l.length?l.join(" and "):l.join(", "),g.report("The property "+r+" is compatible with "+q+" and should be included as well.",b.selectors[0].line,b.selectors[0].col,e))}}})}});l.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",
browsers:"All",init:function(c,g){function e(a,c,d){if(h[a]&&("string"!=typeof k[a]||h[a].value.toLowerCase()!=k[a]))g.report(d||a+" can't be used with display: "+c+".",h[a].line,h[a].col,b)}function a(){h={}}function d(){var a=h.display?h.display.value:null;if(a)switch(a){case "inline":e("height",a);e("width",a);e("margin",a);e("margin-top",a);e("margin-bottom",a);e("float",a,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case "block":e("vertical-align",
a);break;case "inline-block":e("float",a);break;default:0===a.indexOf("table-")&&(e("margin",a),e("margin-left",a),e("margin-right",a),e("margin-top",a),e("margin-bottom",a),e("float",a))}}var b=this,k={display:1,"float":"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1},h;c.addListener("startrule",a);c.addListener("startfontface",a);c.addListener("startkeyframerule",
a);c.addListener("startpagemargin",a);c.addListener("startpage",a);c.addListener("property",function(a){var b=a.property.text.toLowerCase();k[b]&&(h[b]={value:a.value.text,line:a.property.line,col:a.property.col})});c.addListener("endrule",d);c.addListener("endfontface",d);c.addListener("endkeyframerule",d);c.addListener("endpagemargin",d);c.addListener("endpage",d)}});l.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",
browsers:"All",init:function(c,g){function e(a){d={}}var a=this,d,b;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",e);c.addListener("property",function(c){var e=c.property.text.toLowerCase();d[e]&&(b!=e||d[e]==c.value.text)&&g.report("Duplicate property '"+c.property+"' found.",c.line,c.col,a);d[e]=c.value.text;b=e})}});l.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",
browsers:"All",init:function(c,g){var e=this,a=0;c.addListener("startrule",function(){a=0});c.addListener("property",function(){a++});c.addListener("endrule",function(c){c=c.selectors;0===a&&g.report("Rule is empty.",c[0].line,c[0].col,e)})}});l.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(c,g){var e=this;c.addListener("error",function(a){g.error(a.message,a.line,a.col,e)})}});l.addRule({id:"floats",name:"Disallow too many floats",
desc:"This rule tests if the float property is used too many times",browsers:"All",init:function(c,g){var e=this,a=0;c.addListener("property",function(c){"float"==c.property.text.toLowerCase()&&"none"!=c.value.text.toLowerCase()&&a++});c.addListener("endstylesheet",function(){g.stat("floats",a);10<=a&&g.rollupWarn("Too many floats ("+a+"), you're probably using them for layout. Consider using a grid system instead.",e)})}});l.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",
browsers:"All",init:function(c,g){var e=this,a=0;c.addListener("startfontface",function(){a++});c.addListener("endstylesheet",function(){5<a&&g.rollupWarn("Too many @font-face declarations ("+a+").",e)})}});l.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(c,g){var e=this,a=0;c.addListener("property",function(c){"font-size"==c.property&&a++});c.addListener("endstylesheet",function(){g.stat("font-sizes",a);
10<=a&&g.rollupWarn("Too many font-size declarations ("+a+"), abstraction needed.",e)})}});l.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(c,g){var e=this,a;c.addListener("startrule",function(){a={moz:0,webkit:0,ms:0,o:0}});c.addListener("property",function(c){/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/.test(c.value)&&(a[RegExp.$1]=1)});c.addListener("endrule",function(c){var b=
[];a.moz||b.push("Firefox 3.6+");a.webkit||b.push("Webkit (Safari, Chrome)");a.ms||b.push("Internet Explorer 10+");a.o||b.push("Opera 11.1+");b.length&&4>b.length&&g.report("Missing vendor-prefixed CSS gradients for "+b.join(", ")+".",c.selectors[0].line,c.selectors[0].col,e)})}});l.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(a){a=a.selectors;var d,b,k,h,p,n,l;for(p=0;p<
a.length;p++){d=a[p];for(n=h=0;n<d.parts.length;n++)if(b=d.parts[n],b.type==c.SELECTOR_PART_TYPE)for(l=0;l<b.modifiers.length;l++)k=b.modifiers[l],"id"==k.type&&h++;1==h?g.report("Don't use IDs in selectors.",d.line,d.col,e):1<h&&g.report(h+" IDs in the selector, really?",d.line,d.col,e)}})}});l.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use \x3clink\x3e instead.",browsers:"All",init:function(c,g){var e=this;c.addListener("import",function(a){g.report("@import prevents parallel downloads, use \x3clink\x3e instead.",
a.line,a.col,e)})}});l.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",browsers:"All",init:function(c,g){var e=this,a=0;c.addListener("property",function(c){!0===c.important&&(a++,g.report("Use of !important",c.line,c.col,e))});c.addListener("endstylesheet",function(){g.stat("important",a);10<=a&&g.rollupWarn("Too many !important declarations ("+a+"), try to use less than 10 to avoid specifity issues.",e)})}});l.addRule({id:"known-properties",
name:"Require use of known properties",desc:"Properties should be known (listed in CSS specification) or be a vendor-prefixed property.",browsers:"All",init:function(c,g){var e=this;c.addListener("property",function(a){a.property.text.toLowerCase();a.invalid&&g.report(a.invalid.message,a.line,a.col,e)})}});l.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",browsers:"All",tags:["Accessibility"],init:function(c,g){function e(a){b=
a.selectors?{line:a.line,col:a.col,selectors:a.selectors,propCount:0,outline:!1}:null}function a(a){b&&b.outline&&(-1==b.selectors.toString().toLowerCase().indexOf(":focus")?g.report("Outlines should only be modified using :focus.",b.line,b.col,d):1==b.propCount&&g.report("Outlines shouldn't be hidden unless other visual changes are made.",b.line,b.col,d))}var d=this,b;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",
e);c.addListener("property",function(a){var c=a.property.text.toLowerCase();a=a.value;if(b&&(b.propCount++,"outline"==c&&("none"==a||"0"==a)))b.outline=!0});c.addListener("endrule",a);c.addListener("endfontface",a);c.addListener("endpage",a);c.addListener("endpagemargin",a);c.addListener("endkeyframerule",a)}});l.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(c,g){var e=this,a=
{};c.addListener("startrule",function(d){d=d.selectors;var b,k,h,l,n,r;for(l=0;l<d.length;l++){b=d[l];for(n=0;n<b.parts.length;n++)if(k=b.parts[n],k.type==c.SELECTOR_PART_TYPE)for(r=0;r<k.modifiers.length;r++)h=k.modifiers[r],k.elementName&&"id"==h.type?g.report("Element ("+k+") is overqualified, just use "+h+" without element name.",k.line,k.col,e):"class"==h.type&&(a[h]||(a[h]=[]),a[h].push({modifier:h,part:k}))}});c.addListener("endstylesheet",function(){for(var c in a)a.hasOwnProperty(c)&&1==
a[c].length&&a[c][0].part.elementName&&g.report("Element ("+a[c][0].part+") is overqualified, just use "+a[c][0].modifier+" without element name.",a[c][0].part.line,a[c][0].part.col,e)})}});l.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(a){a=a.selectors;var d,b,k,h;for(k=0;k<a.length;k++){d=a[k];for(h=0;h<d.parts.length;h++)b=d.parts[h],b.type==
c.SELECTOR_PART_TYPE&&b.elementName&&/h[1-6]/.test(b.elementName.toString())&&0<h&&g.report("Heading ("+b.elementName+") should not be qualified.",b.line,b.col,e)}})}});l.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(a){a=a.selectors;var d,b,k,h,l,n;for(h=0;h<a.length;h++){d=a[h];for(l=0;l<d.parts.length;l++)if(b=
d.parts[l],b.type==c.SELECTOR_PART_TYPE)for(n=0;n<b.modifiers.length;n++)k=b.modifiers[n],"attribute"==k.type&&/([\~\|\^\$\*]=)/.test(k)&&g.report("Attribute selectors with "+RegExp.$1+" are slow!",k.line,k.col,e)}})}});l.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(c,g){var e=0;c.addListener("startrule",function(){e++});c.addListener("endstylesheet",function(){g.stat("rule-count",e)})}});l.addRule({id:"shorthand",name:"Require shorthand properties",
desc:"Use shorthand properties where possible.",browsers:"All",init:function(c,g){function e(a){n={}}function a(a){var b,c,e,h;for(b in r)if(r.hasOwnProperty(b)){c=h=0;for(e=r[b].length;c<e;c++)h+=n[r[b][c]]?1:0;h==r[b].length&&g.report("The properties "+r[b].join(", ")+" can be replaced by "+b+".",a.line,a.col,d)}}var d=this,b,k,h,l={},n,r={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(b in r)if(r.hasOwnProperty(b)){k=
0;for(h=r[b].length;k<h;k++)l[r[b][k]]=b}c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("property",function(a){a=a.property.toString().toLowerCase();l[a]&&(n[a]=1)});c.addListener("endrule",a);c.addListener("endfontface",a)}});l.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(c,g){function e(a){b=!1}function a(a){b&&g.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.",
b.line,b.col,d)}var d=this,b=!1;c.addListener("startrule",e);c.addListener("startfontface",e);c.addListener("property",function(a){var c=a.property.toString().toLowerCase(),d=a.value;"text-indent"==c&&-99>d.parts[0].value?b=a.property:"direction"==c&&"ltr"==d&&(b=!1)});c.addListener("endrule",a);c.addListener("endfontface",a)}});l.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(c,g){var e=this,a={h1:0,
h2:0,h3:0,h4:0,h5:0,h6:0};c.addListener("startrule",function(c){c=c.selectors;var b,k,h,l;for(h=0;h<c.length;h++)if(b=c[h],b=b.parts[b.parts.length-1],b.elementName&&/(h[1-6])/i.test(b.elementName.toString())){for(l=0;l<b.modifiers.length;l++)if("pseudo"==b.modifiers[l].type){k=!0;break}k||(a[RegExp.$1]++,1<a[RegExp.$1]&&g.report("Heading ("+b.elementName+") has already been defined.",b.line,b.col,e))}});c.addListener("endstylesheet",function(c){var b;c=[];for(b in a)a.hasOwnProperty(b)&&1<a[b]&&
c.push(a[b]+" "+b+"s");c.length&&g.rollupWarn("You have "+c.join(", ")+" defined in this stylesheet.",e)})}});l.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(c,g){var e=this;c.addListener("startrule",function(a){a=a.selectors;var c,b;for(b=0;b<a.length;b++)c=a[b],c=c.parts[c.parts.length-1],"*"==c.elementName&&g.report(e.desc,c.line,c.col,e)})}});l.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",
desc:"When using a vendor-prefixed property, make sure to include the standard one.",browsers:"All",init:function(c,g){function e(){b={};k=1}function a(a){var c,e,k,l,q=[];for(c in b)h[c]&&q.push({actual:c,needed:h[c]});c=0;for(e=q.length;c<e;c++)k=q[c].needed,l=q[c].actual,b[k]?b[k][0].pos<b[l][0].pos&&g.report("Standard property '"+k+"' should come after vendor-prefixed property '"+l+"'.",a.line,a.col,d):g.report("Missing standard property '"+k+"' to go along with '"+l+"'.",a.line,a.col,d)}var d=
this,b,k,h={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius",
"-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule",
"-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow",
"-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing","-moz-user-select":"user-select","-khtml-user-select":"user-select","-webkit-user-select":"user-select"};c.addListener("startrule",e);c.addListener("startfontface",
e);c.addListener("startpage",e);c.addListener("startpagemargin",e);c.addListener("startkeyframerule",e);c.addListener("property",function(a){var c=a.property.text.toLowerCase();b[c]||(b[c]=[]);b[c].push({name:a.property,value:a.value,pos:k++})});c.addListener("endrule",a);c.addListener("endfontface",a);c.addListener("endpage",a);c.addListener("endpagemargin",a);c.addListener("endkeyframerule",a)}});l.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",
browsers:"All",init:function(c,g){var e=this;c.addListener("property",function(a){a=a.value.parts;for(var c=0,b=a.length;c<b;)(a[c].units||"percentage"==a[c].type)&&0===a[c].value&&g.report("Values of 0 shouldn't have units specified.",a[c].line,a[c].col,e),c++})}});l.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'\x3c?xml version\x3d"1.0" encoding\x3d"utf-8"?\x3e\x3ccheckstyle\x3e'},endFormat:function(){return"\x3c/checkstyle\x3e"},formatResults:function(c,
g,e){c=c.messages;var a=[];0<c.length&&(a.push('\x3cfile name\x3d"'+g+'"\x3e'),c.forEach(function(c,b){c.rollup||a.push('\x3cerror line\x3d"'+c.line+'" column\x3d"'+c.col+'" severity\x3d"'+c.type+'" message\x3d"'+(!c.message||c.message.constructor!==String?"":c.message.replace(/\"/g,"'").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;"))+'" source\x3d"'+(!c.rule||!("name"in c.rule)?"":"net.csslint."+c.rule.name.replace(/\s/g,""))+'"/\x3e')}),a.push("\x3c/file\x3e"));return a.join("")}});l.addFormatter({id:"compact",
name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(c,g,e){c=c.messages;var a="";e=e||{};if(0===c.length)return e.quiet?"":g+": Lint Free!";c.forEach(function(c,b){a=c.rollup?a+(g+": "+(c.type.charAt(0).toUpperCase()+c.type.slice(1))+" - "+c.message+"\n"):a+(g+": line "+c.line+", col "+c.col+", "+(c.type.charAt(0).toUpperCase()+c.type.slice(1))+" - "+c.message+"\n")});return a}});l.addFormatter({id:"csslint-xml",name:"CSSLint XML format",
startFormat:function(){return'\x3c?xml version\x3d"1.0" encoding\x3d"utf-8"?\x3e\x3ccsslint\x3e'},endFormat:function(){return"\x3c/csslint\x3e"},formatResults:function(c,g,e){c=c.messages;var a=[],d=function(a){return!a||a.constructor!==String?"":a.replace(/\"/g,"'").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")};0<c.length&&(a.push('\x3cfile name\x3d"'+g+'"\x3e'),c.forEach(function(b,c){b.rollup?a.push('\x3cissue severity\x3d"'+b.type+'" reason\x3d"'+d(b.message)+'" evidence\x3d"'+d(b.evidence)+
'"/\x3e'):a.push('\x3cissue line\x3d"'+b.line+'" char\x3d"'+b.col+'" severity\x3d"'+b.type+'" reason\x3d"'+d(b.message)+'" evidence\x3d"'+d(b.evidence)+'"/\x3e')}),a.push("\x3c/file\x3e"));return a.join("")}});l.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return'\x3c?xml version\x3d"1.0" encoding\x3d"utf-8"?\x3e\x3clint\x3e'},endFormat:function(){return"\x3c/lint\x3e"},formatResults:function(c,g,e){c=c.messages;var a=[],d=function(a){return!a||a.constructor!==String?
"":a.replace(/\"/g,"'").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")};0<c.length&&(a.push('\x3cfile name\x3d"'+g+'"\x3e'),c.forEach(function(b,c){b.rollup?a.push('\x3cissue severity\x3d"'+b.type+'" reason\x3d"'+d(b.message)+'" evidence\x3d"'+d(b.evidence)+'"/\x3e'):a.push('\x3cissue line\x3d"'+b.line+'" char\x3d"'+b.col+'" severity\x3d"'+b.type+'" reason\x3d"'+d(b.message)+'" evidence\x3d"'+d(b.evidence)+'"/\x3e')}),a.push("\x3c/file\x3e"));return a.join("")}});l.addFormatter({id:"text",name:"Plain Text",
startFormat:function(){return""},endFormat:function(){return""},formatResults:function(c,g,e){c=c.messages;var a="";e=e||{};if(0===c.length)return e.quiet?"":"\n\ncsslint: No errors in "+g+".";a="\n\ncsslint: There are "+c.length+" problems in "+g+".";e=g.lastIndexOf("/");var d=g;-1===e&&(e=g.lastIndexOf("\\"));-1<e&&(d=g.substring(e+1));c.forEach(function(b,c){a=a+"\n\n"+d;b.rollup?(a+="\n"+(c+1)+": "+b.type,a+="\n"+b.message):(a+="\n"+(c+1)+": "+b.type+" at line "+b.line+", col "+b.col,a+="\n"+
b.message,a+="\n"+b.evidence)});return a}});return l}();define("plugins/csslintPlugin/lib/csslint",[],function(){});
define("built-csslintPlugin.js",["orion/plugin","plugins/csslintPlugin/lib/csslint"],function(q,t){function B(c){var g=CSSLint.verify(c).messages;c=c.split(/\r?\n/);for(var e=[],a=0;a<g.length;a++){var d=g[a];d.line&&(d={description:d.message,line:d.line,start:d.col,end:c[d.line-1].indexOf(d.evidence)+d.evidence.length,severity:d.type},e.push(d))}return{problems:e}}function w(c){CSSLint.addRule({id:"css-outline",name:"CSS outline",desc:"CSS outline helper rule",browsers:"All",init:function(g,e){c.length=
0;g.addListener("startrule",function(a){if((a=a.selectors)&&a.length){for(var d=[],b=null,e=null,g=0;g<a.length;g++){var l=a[g];null===b&&(b=l.line);null===e&&(e=l.col);d.push(l.text)}c.push({label:d.join(", "),line:b,col:e})}})}})}try{var y=new q({name:"Orion CSSLint Support",version:"1.0",description:"This plugin provides a CSSLint service to support outline and validation of CSS files."});y.registerService("orion.edit.validator",{computeProblems:function(c,g){return c.getText().then(B)}},{contentType:["text/css"]});
var z=[];w(z);y.registerService("orion.edit.outliner",{getOutline:function(c,g){CSSLint.verify(c);return z}},{id:"orion.outline.css.csslint",name:"CSS rule outline",contentType:["text/css"]});y.connect()}catch(l){console.debug("Couldn't install csslintPlugin: "+l)}});
//@ sourceMappingURL=built-csslintPlugin.js.map