/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*! 
CSSLint
Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

/* 
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

*/

/*

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(){var q=this;if(!q.define)q.define=function(r){q.orion=q.orion||{};q.orion.PluginProvider=r();q.eclipse=q.orion;delete q.define}})();
define("orion/plugin",[],function(){return function(q){function r(d){b&&(typeof ArrayBuffer==="undefined"&&(d=JSON.stringify(d)),b===self?b.postMessage(d):b.postMessage(d,"*"))}function A(b,a){if(a&&a instanceof XMLHttpRequest){var c,h;try{c=a.status,h=a.statusText}catch(k){c=0,h=""}return{status:c||0,statusText:h}}return a}function w(b){var a=b?JSON.parse(JSON.stringify(b,A)):b;if(b instanceof Error)a.__isError=!0,a.message=a.message||b.message,a.name=a.name||b.name;return a}function z(b){return function(a){g&&
r({serviceId:b,method:"dispatchEvent",params:[a]})}}function t(d){if(d.source===b){var a=typeof d.data!=="string"?d.data:JSON.parse(d.data);if(typeof a.cancel==="string"){var j=f[a.id];j&&(delete f[a.id],j.cancel&&j.cancel(a.cancel))}else{var d=a.serviceId,h=a.method,k=a.params,g=c[d],o=g.implementation,i=o[h];h==="addEventListener"?(h=k[0],g.listeners[h]=g.listeners[h]||z(d),k=[h,g.listeners[h]]):h==="removeEventListener"&&(h=k[0],k=[h,g.listeners[h]],delete g.listeners[h]);var s={id:a.id,result:null,
error:null};try{(j=i.apply(o,k))&&typeof j.then==="function"?(f[a.id]=j,j.then(function(b){delete f[a.id];s.result=b;r(s)},function(b){if(f[a.id])delete f[a.id],s.error=w(b),r(s)},function(){r({requestId:a.id,method:"progress",params:Array.prototype.slice.call(arguments)})})):(s.result=j,r(s))}catch(G){s.error=w(G),r(s)}}}}var i=q,c=[],g=!1,f={},b=null;this.updateHeaders=function(b){if(g)throw Error("Cannot update headers. Plugin Provider is connected");i=b};this.registerServiceProvider=this.registerService=
function(b,a,j){if(g)throw Error("Cannot register service. Plugin Provider is connected");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var h=null,k=[];for(h in a)typeof a[h]==="function"&&k.push(h);c[c.length]={names:b,methods:k,implementation:a,properties:j||{},listeners:{}}};this.connect=function(d,a){if(!g){if(typeof window==="undefined")b=self;else if(window!==window.parent)b=window.parent;else if(window.opener!==null)b=window.opener;else{a&&a("No valid plugin target");return}addEventListener("message",
t,!1);for(var j=[],h=0;h<c.length;h++)j.push({serviceId:h,names:c[h].names,methods:c[h].methods,properties:c[h].properties});r({method:"plugin",params:[{headers:i||{},services:j}]});g=!0}d&&d()};this.disconnect=function(){g&&(removeEventListener("message",t),b=null,g=!1)}}});
var CSSLint=function(){var q,r,A,w,z;function t(c,g){this.messages=[];this.stats=[];this.lines=c;this.ruleset=g}(function(){function c(){this._listeners={}}function g(a){this._input=a.replace(/\n\r?/g,"\n");this._col=this._line=1;this._cursor=0}function f(a,b,c){this.col=c;this.line=b;this.message=a}function b(a,b,c,d){this.col=c;this.line=b;this.text=a;this.type=d}function d(a,b){this._reader=a?new g(a.toString()):null;this._token=null;this._tokenData=b;this._lt=[];this._ltIndex=0;this._ltIndexCache=
[]}c.prototype={constructor:c,addListener:function(a,b){this._listeners[a]||(this._listeners[a]=[]);this._listeners[a].push(b)},fire:function(a){typeof a=="string"&&(a={type:a});if(typeof a.target!="undefined")a.target=this;if(typeof a.type=="undefined")throw Error("Event object missing 'type' property.");if(this._listeners[a.type])for(var b=this._listeners[a.type].concat(),c=0,d=b.length;c<d;c++)b[c].call(this,a)},removeListener:function(a,b){if(this._listeners[a])for(var c=this._listeners[a],d=
0,f=c.length;d<f;d++)if(c[d]===b){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(a){var b=null;this._cursor<this._input.length&&(b=this._input.charAt(this._cursor+(typeof a=="undefined"?1:a)-1));return b},read:function(){var a=null;if(this._cursor<this._input.length)this._input.charAt(this._cursor)=="\n"?(this._line++,this._col=1):this._col++,a=this._input.charAt(this._cursor++);
return a},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){if(this._bookmark)this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark},readTo:function(a){for(var b="",c;b.length<a.length||b.lastIndexOf(a)!=b.length-a.length;)if(c=this.read())b+=c;else throw Error('Expected "'+a+'" at line '+this._line+", col "+this._col+".");return b},readWhile:function(a){for(var b="",c=this.read();c!==
null&&a(c);)b+=c,c=this.read();return b},readMatch:function(a){var b=this._input.substring(this._cursor),c=null;typeof a=="string"?b.indexOf(a)===0&&(c=this.readCount(a.length)):a instanceof RegExp&&a.test(b)&&(c=this.readCount(RegExp.lastMatch.length));return c},readCount:function(a){for(var b="";a--;)b+=this.read();return b}};f.prototype=Error();b.fromToken=function(a){return new b(a.value,a.startLine,a.startCol)};b.prototype={constructor:b,valueOf:function(){return this.toString()},toString:function(){return this.text}};
d.createTokenData=function(a){var b=[],c={},a=a.concat([]),d=0,f=a.length+1;a.UNKNOWN=-1;for(a.unshift({name:"EOF"});d<f;d++)b.push(a[d].name),a[a[d].name]=d,a[d].text&&(c[a[d].text]=d);a.name=function(a){return b[a]};a.type=function(a){return c[a]};return a};d.prototype={constructor:d,match:function(a,b){a instanceof Array||(a=[a]);for(var c=this.get(b),d=0,f=a.length;d<f;)if(c==a[d++])return!0;this.unget();return!1},mustMatch:function(a,b){var c;a instanceof Array||(a=[a]);if(!this.match.apply(this,
arguments))throw c=this.LT(1),new f("Expected "+this._tokenData[a[0]].name+" at line "+c.startLine+", col "+c.startCol+".",c.startLine,c.startCol);},advance:function(a,b){for(;this.LA(0)!=0&&!this.match(a,b);)this.get();return this.LA(0)},get:function(a){var b=this._tokenData,c=0,d,f;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){c++;this._token=this._lt[this._ltIndex++];for(f=b[this._token.type];f.channel!==void 0&&a!==f.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],
f=b[this._token.type],c++;if((f.channel===void 0||a===f.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(c),this._token.type}d=this._getToken();if(d.type>-1&&!b[d.type].hide)d.channel=b[d.type].channel,this._token=d,this._lt.push(d),this._ltIndexCache.push(this._lt.length-this._ltIndex+c),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length;return(f=b[d.type])&&(f.hide||f.channel!==void 0&&a!==f.channel)?this.get(a):
d.type},LA:function(a){var b=a,c;if(a>0){if(a>5)throw Error("Too much lookahead.");for(;b;)c=this.get(),b--;for(;b<a;)this.unget(),b++}else if(a<0)if(this._lt[this._ltIndex+a])c=this._lt[this._ltIndex+a].type;else throw Error("Too much lookbehind.");else c=this._token.type;return c},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 a<0||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.");}};r=f;A=b;w=c;z=d})();(function(){function c(a,c,e){p.call(this,a,c,e,b.COMBINATOR_TYPE);this.type="unknown";if(/^\s+$/.test(a))this.type="descendant";else if(a==">")this.type="child";else if(a=="+")this.type="adjacent-sibling";else if(a=="~")this.type="sibling"}function g(a,c){p.call(this,
"("+a+(c!==null?":"+c:"")+")",a.startLine,a.startCol,b.MEDIA_FEATURE_TYPE);this.name=a;this.value=c}function f(a,c,e,l,I){p.call(this,(a?a+" ":"")+(c?c+" ":"")+e.join(" and "),l,I,b.MEDIA_QUERY_TYPE);this.modifier=a;this.mediaType=c;this.features=e}function b(a){K.call(this);this.options=a||{};this._tokenStream=null}function d(a,c,e,l){p.call(this,a,e,l,b.PROPERTY_NAME_TYPE);this.hack=c}function a(a,c,e){p.call(this,a.join(" "),c,e,b.PROPERTY_VALUE_TYPE);this.parts=a}function j(a,c,e){p.call(this,
a,c,e,b.PROPERTY_VALUE_PART_TYPE);this.type="unknown";if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(a))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 if(/^([+\-]?[\d\.]+)%$/i.test(a))this.type=
"percentage",this.value=+RegExp.$1;else if(/^([+\-]?[\d\.]+)%$/i.test(a))this.type="percentage",this.value=+RegExp.$1;else if(/^([+\-]?\d+)$/i.test(a))this.type="integer",this.value=+RegExp.$1;else if(/^([+\-]?[\d\.]+)$/i.test(a))this.type="number",this.value=+RegExp.$1;else if(/^#([a-f0-9]{3,6})/i.test(a))this.type="color",a=RegExp.$1,a.length==3?(this.red=parseInt(a.charAt(0)+a.charAt(0),16),this.green=parseInt(a.charAt(1)+a.charAt(1),16),this.blue=parseInt(a.charAt(2)+a.charAt(2),16)):(this.red=
parseInt(a.substring(0,2),16),this.green=parseInt(a.substring(2,4),16),this.blue=parseInt(a.substring(4,6),16));else if(/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(a))this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3;else if(/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(a))this.type="color",this.red=+RegExp.$1*255/100,this.green=+RegExp.$2*255/100,this.blue=+RegExp.$3*255/100;else if(/^url\(["']?([^\)"']+)["']?\)/i.test(a))this.type="uri",this.uri=RegExp.$1;
else if(/^["'][^"']*["']/.test(a))this.type="string",this.value=eval(a);else if(L[a.toLowerCase()])this.type="color",a=L[a.toLowerCase()].substring(1),this.red=parseInt(a.substring(0,2),16),this.green=parseInt(a.substring(2,4),16),this.blue=parseInt(a.substring(4,6),16);else if(/^[\,\/]$/.test(a))this.type="operator",this.value=a;else if(/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(a))this.type="identifier",this.value=a}function h(a,c,e){p.call(this,a.join(" "),c,e,b.SELECTOR_TYPE);this.parts=
a;this.specificity=i.calculate(this)}function k(a,c,e,l,I){p.call(this,e,l,I,b.SELECTOR_PART_TYPE);this.elementName=a;this.modifiers=c}function n(a,c,e,l){p.call(this,a,e,l,b.SELECTOR_SUB_PART_TYPE);this.type=c;this.args=[]}function i(a,b,c,l){this.a=a;this.b=b;this.c=c;this.d=l}function x(a){return a!=null&&/\d/.test(a)}function s(a){return a!=null&&/\s/.test(a)}function G(a){return a!=null&&N.test(a)}function F(a){return a!=null&&/[a-z_\u0080-\uFFFF\\]/i.test(a)}function M(a){return a!=null&&(F(a)||
/[0-9\-\\]/.test(a))}function C(a){t.call(this,a,e)}function D(a,b,c){this.col=c;this.line=b;this.message=a}var K=w,t=z,y=r,p=A,L={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 p;c.prototype.constructor=c;g.prototype=new p;g.prototype.constructor=g;f.prototype=new p;f.prototype.constructor=f;b.DEFAULT_TYPE=
0;b.COMBINATOR_TYPE=1;b.MEDIA_FEATURE_TYPE=2;b.MEDIA_QUERY_TYPE=3;b.PROPERTY_NAME_TYPE=4;b.PROPERTY_VALUE_TYPE=5;b.PROPERTY_VALUE_PART_TYPE=6;b.SELECTOR_TYPE=7;b.SELECTOR_PART_TYPE=8;b.SELECTOR_SUB_PART_TYPE=9;b.prototype=function(){var m=new K,B,u={constructor:b,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 l=this._tokenStream,
a,b;this.fire("startstylesheet");this._charset();for(this._skipCruft();l.peek()==e.IMPORT_SYM;)this._import(),this._skipCruft();for(;l.peek()==e.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(b=l.peek();b>e.EOF;){try{switch(b){case e.MEDIA_SYM:this._media();this._skipCruft();break;case e.PAGE_SYM:this._page();this._skipCruft();break;case e.FONT_FACE_SYM:this._font_face();this._skipCruft();break;case e.KEYFRAMES_SYM:this._keyframes();this._skipCruft();break;case e.S:this._readWhitespace();
break;default:if(!this._ruleset())switch(b){case e.CHARSET_SYM:throw a=l.LT(1),this._charset(!1),new y("@charset not allowed here.",a.startLine,a.startCol);case e.IMPORT_SYM:throw a=l.LT(1),this._import(!1),new y("@import not allowed here.",a.startLine,a.startCol);case e.NAMESPACE_SYM:throw a=l.LT(1),this._namespace(!1),new y("@namespace not allowed here.",a.startLine,a.startCol);default:l.get(),this._unexpectedToken(l.token())}}}catch(c){if(c instanceof y&&!this.options.strict)this.fire({type:"error",
error:c,message:c.message,line:c.line,col:c.col});else throw c;}b=l.peek()}b!=e.EOF&&this._unexpectedToken(l.token());this.fire("endstylesheet")},_charset:function(l){var a=this._tokenStream,b,c,d;if(a.match(e.CHARSET_SYM))c=a.token().startLine,d=a.token().startCol,this._readWhitespace(),a.mustMatch(e.STRING),b=a.token(),b=b.value,this._readWhitespace(),a.mustMatch(e.SEMICOLON),l!==!1&&this.fire({type:"charset",charset:b,line:c,col:d})},_import:function(l){var a=this._tokenStream,b,c,d=[];a.mustMatch(e.IMPORT_SYM);
c=a.token();this._readWhitespace();a.mustMatch([e.STRING,e.URI]);b=a.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();d=this._media_query_list();a.mustMatch(e.SEMICOLON);this._readWhitespace();l!==!1&&this.fire({type:"import",uri:b,media:d,line:c.startLine,col:c.startCol})},_namespace:function(l){var a=this._tokenStream,b,c,d,m;a.mustMatch(e.NAMESPACE_SYM);b=a.token().startLine;c=a.token().startCol;this._readWhitespace();if(a.match(e.IDENT))d=a.token().value,this._readWhitespace();
a.mustMatch([e.STRING,e.URI]);m=a.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1");this._readWhitespace();a.mustMatch(e.SEMICOLON);this._readWhitespace();l!==!1&&this.fire({type:"namespace",prefix:d,uri:m,line:b,col:c})},_media:function(){var l=this._tokenStream,a,b,c;l.mustMatch(e.MEDIA_SYM);a=l.token().startLine;b=l.token().startCol;this._readWhitespace();c=this._media_query_list();l.mustMatch(e.LBRACE);this._readWhitespace();for(this.fire({type:"startmedia",media:c,line:a,col:b});;)if(l.peek()==
e.PAGE_SYM)this._page();else if(!this._ruleset())break;l.mustMatch(e.RBRACE);this._readWhitespace();this.fire({type:"endmedia",media:c,line:a,col:b})},_media_query_list:function(){var l=this._tokenStream,a=[];this._readWhitespace();for((l.peek()==e.IDENT||l.peek()==e.LPAREN)&&a.push(this._media_query());l.match(e.COMMA);)this._readWhitespace(),a.push(this._media_query());return a},_media_query:function(){var l=this._tokenStream,a=null,b=null,c=null,d=[];l.match(e.IDENT)&&(b=l.token().value.toLowerCase(),
b!="only"&&b!="not"?(l.unget(),b=null):c=l.token());this._readWhitespace();l.peek()==e.IDENT?(a=this._media_type(),c===null&&(c=l.token())):l.peek()==e.LPAREN&&(c===null&&(c=l.LT(1)),d.push(this._media_expression()));if(a===null&&d.length===0)return null;else for(this._readWhitespace();l.match(e.IDENT);)l.token().value.toLowerCase()!="and"&&this._unexpectedToken(l.token()),this._readWhitespace(),d.push(this._media_expression());return new f(b,a,d,c.startLine,c.startCol)},_media_type:function(){return this._media_feature()},
_media_expression:function(){var l=this._tokenStream,a=null,b,c=null;l.mustMatch(e.LPAREN);a=this._media_feature();this._readWhitespace();l.match(e.COLON)&&(this._readWhitespace(),b=l.LT(1),c=this._expression());l.mustMatch(e.RPAREN);this._readWhitespace();return new g(a,c?new p(c,b.startLine,b.startCol):null)},_media_feature:function(){var l=this._tokenStream;l.mustMatch(e.IDENT);return p.fromToken(l.token())},_page:function(){var l=this._tokenStream,a,b,c=null,d=null;l.mustMatch(e.PAGE_SYM);a=l.token().startLine;
b=l.token().startCol;this._readWhitespace();if(l.match(e.IDENT))c=l.token().value,c.toLowerCase()==="auto"&&this._unexpectedToken(l.token());l.peek()==e.COLON&&(d=this._pseudo_page());this._readWhitespace();this.fire({type:"startpage",id:c,pseudo:d,line:a,col:b});this._readDeclarations(!0,!0);this.fire({type:"endpage",id:c,pseudo:d,line:a,col:b})},_margin:function(){var l=this._tokenStream,a,b=this._margin_sym();return b?(a=l.token().startLine,l=l.token().startCol,this.fire({type:"startpagemargin",
margin:b,line:a,col:l}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:b,line:a,col:l}),!0):!1},_margin_sym:function(){var a=this._tokenStream;return a.match([e.TOPLEFTCORNER_SYM,e.TOPLEFT_SYM,e.TOPCENTER_SYM,e.TOPRIGHT_SYM,e.TOPRIGHTCORNER_SYM,e.BOTTOMLEFTCORNER_SYM,e.BOTTOMLEFT_SYM,e.BOTTOMCENTER_SYM,e.BOTTOMRIGHT_SYM,e.BOTTOMRIGHTCORNER_SYM,e.LEFTTOP_SYM,e.LEFTMIDDLE_SYM,e.LEFTBOTTOM_SYM,e.RIGHTTOP_SYM,e.RIGHTMIDDLE_SYM,e.RIGHTBOTTOM_SYM])?p.fromToken(a.token()):null},_pseudo_page:function(){var a=
this._tokenStream;a.mustMatch(e.COLON);a.mustMatch(e.IDENT);return a.token().value},_font_face:function(){var a=this._tokenStream,b;a.mustMatch(e.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([e.SLASH,e.COMMA])&&(b=a.token(),this._readWhitespace());return b?j.fromToken(b):null},_combinator:function(){var a=
this._tokenStream,b=null;a.match([e.PLUS,e.GREATER,e.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([e.MINUS,e.PLUS])?a.token().value:null},_property:function(){var a=this._tokenStream,b=null,c=null,m,f,u;if(a.peek()==e.STAR&&this.options.starHack)a.get(),m=a.token(),c=m.value,f=m.startLine,u=m.startCol;if(a.match(e.IDENT))m=a.token(),a=m.value,a.charAt(0)=="_"&&this.options.underscoreHack&&
(c="_",a=a.substring(1)),b=new d(a,c,f||m.startLine,u||m.startCol),this._readWhitespace();return b},_ruleset:function(){var a=this._tokenStream,b;try{b=this._selectors_group()}catch(c){if(c instanceof y&&!this.options.strict){if(this.fire({type:"error",error:c,message:c.message,line:c.line,col:c.col}),a=a.advance([e.RBRACE]),a!=e.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(c!==null)for(b.push(c);a.match(e.COMMA);)this._readWhitespace(),c=this._selector(),c!==null?b.push(c):this._unexpectedToken(a.LT(1));return b.length?b:null},_selector:function(){var a=this._tokenStream,b=[],e=null,d=null,m=null,e=this._simple_selector_sequence();if(e===null)return null;b.push(e);do if(d=this._combinator(),d!==null)b.push(d),e=this._simple_selector_sequence(),e===
null?this._unexpectedToken(this.LT(1)):b.push(e);else if(this._readWhitespace())m=new c(a.token().value,a.token().startLine,a.token().startCol),d=this._combinator(),e=this._simple_selector_sequence(),e===null?d!==null&&this._unexpectedToken(a.LT(1)):(d!==null?b.push(d):b.push(m),b.push(e));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(e.HASH)?new n(a.token().value,"id",a.token().startLine,
a.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],f=0,u=m.length,g=null,B,h;B=a.LT(1).startLine;h=a.LT(1).startCol;(b=this._type_selector())||(b=this._universal());for(b!==null&&(d+=b);;){if(a.peek()===e.S)break;for(;f<u&&g===null;)g=m[f++].call(this);if(g===null)if(d==="")return null;else break;else f=0,c.push(g),d+=g.toString(),g=null}return d!==""?new k(b,c,d,B,h):null},_type_selector:function(){var a=this._tokenStream,b=this._namespace_prefix(),c=this._element_name();
if(c){if(b)c.text=b+c.text,c.col-=b.length;return c}else return b&&(a.unget(),b.length>1&&a.unget()),null},_class:function(){var a=this._tokenStream;return a.match(e.DOT)?(a.mustMatch(e.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(e.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)===e.PIPE||a.LA(2)===e.PIPE)a.match([e.IDENT,
e.STAR])&&(b+=a.token().value),a.mustMatch(e.PIPE),b+="|";return b.length?b:null},_universal:function(){var a=this._tokenStream,b="",c;(c=this._namespace_prefix())&&(b+=c);a.match(e.STAR)&&(b+="*");return b.length?b:null},_attrib:function(){var a=this._tokenStream,b=null,c,d;return a.match(e.LBRACKET)?(d=a.token(),b=d.value,b+=this._readWhitespace(),(c=this._namespace_prefix())&&(b+=c),a.mustMatch(e.IDENT),b+=a.token().value,b+=this._readWhitespace(),a.match([e.PREFIXMATCH,e.SUFFIXMATCH,e.SUBSTRINGMATCH,
e.EQUALS,e.INCLUDES,e.DASHMATCH])&&(b+=a.token().value,b+=this._readWhitespace(),a.mustMatch([e.IDENT,e.STRING]),b+=a.token().value,b+=this._readWhitespace()),a.mustMatch(e.RBRACKET),new n(b+"]","attribute",d.startLine,d.startCol)):null},_pseudo:function(){var a=this._tokenStream,b=null,c=":",d,m;if(a.match(e.COLON)){a.match(e.COLON)&&(c+=":");if(a.match(e.IDENT))b=a.token().value,d=a.token().startLine,m=a.token().startCol-c.length;else if(a.peek()==e.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;if(a.match(e.FUNCTION))b=a.token().value,b+=this._readWhitespace(),b+=this._expression(),a.mustMatch(e.RPAREN),b+=")";return b},_expression:function(){for(var a=this._tokenStream,b="";a.match([e.PLUS,e.MINUS,e.DIMENSION,e.NUMBER,e.STRING,e.IDENT,e.LENGTH,e.FREQ,e.ANGLE,e.TIME,e.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;if(a.match(e.NOT))d=a.token().value,b=a.token().startLine,c=a.token().startCol,d+=this._readWhitespace(),m=this._negation_arg(),d+=m,d+=this._readWhitespace(),a.match(e.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(e.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,f,u;f=a.LT(1).startLine;for(u=a.LT(1).startCol;d<m&&c===null;)c=b[d].call(this),d++;c===null&&this._unexpectedToken(a.LT(1));return c.type=="elementName"?new k(c,[],c.toString(),f,u):new k(null,[c],c.toString(),f,u)},_declaration:function(){var a=this._tokenStream,b=null,c=null,d=null,m=null,b=this._property();if(b!==null){a.mustMatch(e.COLON);this._readWhitespace();c=this._expr();(!c||c.length===0)&&this._unexpectedToken(a.LT(1));d=this._prio();try{this._validateProperty(b,
c)}catch(f){m=f}this.fire({type:"property",property:b,value:c,important:d,line:b.line,col:b.col,invalid:m});return!0}else return!1},_prio:function(){var a=this._tokenStream.match(e.IMPORTANT_SYM);this._readWhitespace();return a},_expr:function(){var b=[],c=null,c=null,c=this._term();if(c!==null){b.push(c);do if((c=this._operator())&&b.push(c),c=this._term(),c===null)break;else b.push(c);while(1)}return b.length>0?new a(b,b[0].startLine,b[0].startCol):null},_term:function(){var a=this._tokenStream,
b=null,c=null,d,m,b=this._unary_operator();if(b!==null)d=a.token().startLine,m=a.token().startCol;if(a.peek()==e.IE_FUNCTION&&this.options.ieFilters){if(c=this._ie_function(),b===null)d=a.token().startLine,m=a.token().startCol}else if(a.match([e.NUMBER,e.PERCENTAGE,e.LENGTH,e.ANGLE,e.TIME,e.FREQ,e.STRING,e.IDENT,e.URI,e.UNICODE_RANGE])){c=a.token().value;if(b===null)d=a.token().startLine,m=a.token().startCol;this._readWhitespace()}else if(c=this._hexcolor(),c===null){if(b===null)d=a.LT(1).startLine,
m=a.LT(1).startCol;c===null&&(c=a.LA(3)==e.EQUALS&&this.options.ieFilters?this._ie_function():this._function())}else if(b===null)d=a.token().startLine,m=a.token().startCol;return c!==null?new j(b!==null?b+c:c,d,m):null},_function:function(){var a=this._tokenStream,b=null,c=null;if(a.match(e.FUNCTION)){b=a.token().value;this._readWhitespace();c=this._expr();b+=c;if(this.options.ieFilters&&a.peek()==e.EQUALS){do{this._readWhitespace()&&(b+=a.token().value);a.LA(0)==e.COMMA&&(b+=a.token().value);a.match(e.IDENT);
b+=a.token().value;a.match(e.EQUALS);b+=a.token().value;for(c=a.peek();c!=e.COMMA&&c!=e.S&&c!=e.RPAREN;)a.get(),b+=a.token().value,c=a.peek()}while(a.match([e.COMMA,e.S]))}a.match(e.RPAREN);b+=")";this._readWhitespace()}return b},_ie_function:function(){var a=this._tokenStream,b=null,c;if(a.match([e.IE_FUNCTION,e.FUNCTION])){b=a.token().value;do{this._readWhitespace()&&(b+=a.token().value);a.LA(0)==e.COMMA&&(b+=a.token().value);a.match(e.IDENT);b+=a.token().value;a.match(e.EQUALS);b+=a.token().value;
for(c=a.peek();c!=e.COMMA&&c!=e.S&&c!=e.RPAREN;)a.get(),b+=a.token().value,c=a.peek()}while(a.match([e.COMMA,e.S]));a.match(e.RPAREN);b+=")";this._readWhitespace()}return b},_hexcolor:function(){var a=this._tokenStream,b=null;if(a.match(e.HASH)){a=a.token();b=a.value;if(!/#[a-f0-9]{3,6}/i.test(b))throw new y("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(e.KEYFRAMES_SYM);this._readWhitespace();c=this._keyframe_name();this._readWhitespace();a.mustMatch(e.LBRACE);this.fire({type:"startkeyframes",name:c,line:c.line,col:c.col});this._readWhitespace();for(b=a.peek();b==e.IDENT||b==e.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(e.RBRACE)},_keyframe_name:function(){var a=this._tokenStream;a.mustMatch([e.IDENT,e.STRING]);return p.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(e.COMMA);)this._readWhitespace(),b.push(this._key()),this._readWhitespace();return b},_key:function(){var a=this._tokenStream,b;if(a.match(e.PERCENTAGE))return p.fromToken(a.token());
else if(a.match(e.IDENT)){b=a.token();if(/from|to/i.test(b.value))return p.fromToken(b);a.unget()}this._unexpectedToken(a.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([e.S,e.CDO,e.CDC]););},_readDeclarations:function(a,b){var c=this._tokenStream;this._readWhitespace();a&&c.mustMatch(e.LBRACE);this._readWhitespace();try{for(;;){if(!b||!this._margin())if(this._declaration()){if(!c.match(e.SEMICOLON))break}else break;this._readWhitespace()}c.mustMatch(e.RBRACE);this._readWhitespace()}catch(d){if(d instanceof
y&&!this.options.strict)if(this.fire({type:"error",error:d,message:d.message,line:d.line,col:d.col}),c=c.advance([e.SEMICOLON,e.RBRACE]),c==e.SEMICOLON)this._readDeclarations(!1,b);else{if(c!=e.RBRACE)throw d;}else throw d;}},_readWhitespace:function(){for(var a=this._tokenStream,b="";a.match(e.S);)b+=a.token().value;return b},_unexpectedToken:function(a){throw new y("Unexpected token '"+a.value+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol);},_verifyEnd:function(){this._tokenStream.LA(1)!=
e.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(a,b){var c=a.text.toLowerCase();if(v[c]){if(typeof v[c]=="function")v[c](b)}else if(c.indexOf("-")!==0)throw new D("Unknown property '"+a+"'.",a.line,a.col);},parse:function(a){this._tokenStream=new C(a,e);this._stylesheet()},parseStyleSheet:function(a){return this.parse(a)},parseMediaQuery:function(a){this._tokenStream=new C(a,e);a=this._media_query();this._verifyEnd();return a},parsePropertyValue:function(a){this._tokenStream=
new C(a,e);this._readWhitespace();a=this._expr();this._readWhitespace();this._verifyEnd();return a},parseRule:function(a){this._tokenStream=new C(a,e);this._readWhitespace();a=this._ruleset();this._readWhitespace();this._verifyEnd();return a},parseSelector:function(a){this._tokenStream=new C(a,e);this._readWhitespace();a=this._selector();this._readWhitespace();this._verifyEnd();return a}};for(B in u)m[B]=u[B];return m}();var E={"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(" | "),e,f,g=!1;for(e=0,f=d.length;e<f&&!g;e++)c==d[e]&&(g=!0);return g},length:function(a){return a.type=="length"||a.type=="number"||a.type=="integer"||a=="0"},color:function(a){return a.type=="color"||a=="transparent"},number:function(a){return a.type=="number"||this.integer(a)},integer:function(a){return a.type=="integer"},angle:function(a){return a.type==
"angle"},uri:function(a){return a.type=="uri"},image:function(a){return this.uri(a)},percentage:function(a){return a.type=="percentage"||a=="0"},"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)}},v={"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 v)v.hasOwnProperty(a)&&(v[a]instanceof Array?v[a]=function(a){return function(b){var c=!1,d=[],e=b.parts[0];if(b.parts.length!=1)throw new D("Expected 1 value but found "+b.parts.length+".",b.line,b.col);for(var m=0,f=a.length;m<f&&!c;m++)typeof E[a[m]]=="undefined"?(c=c||E.identifier(e,a[m]),d.push("one of ("+a[m]+")")):(c=c||E[a[m]](e),d.push(a[m]));if(!c)throw new D("Expected "+d.join(" or ")+" but found '"+b+"'.",b.line,b.col);}}(v[a]):typeof v[a]=="object"&&(v[a]=function(a){return function(b){var c,
d,e,m,f,g,h,k=b.parts;if(a.max&&k.length>a.max)throw new D("Expected a max of "+a.max+" property values but found "+k.length+".",b.line,b.col);if(a.multi)h=a.multi;for(d=0,e=k.length;d<e;d++){g=[];c=!1;for(m=0,f=h.length;m<f;m++)if(typeof E[h[m]]=="undefined"){if(E.identifier(k[d],h[m])){c=!0;break}g.push("one of ("+h[m]+")")}else{if(E[h[m]](k[d])){c=!0;break}g.push(h[m])}if(!c)throw new D("Expected "+g.join(" or ")+" but found '"+k[d]+"'.",b.line,b.col);}}}(v[a])))})();d.prototype=new p;d.prototype.constructor=
d;d.prototype.toString=function(){return(this.hack?this.hack:"")+this.text};a.prototype=new p;a.prototype.constructor=a;j.prototype=new p;j.prototype.constructor=a;j.fromToken=function(a){return new j(a.value,a.startLine,a.startCol)};var H={":first-letter":1,":first-line":1,":before":1,":after":1,ELEMENT:1,CLASS:2};H.isElement=function(a){return a.indexOf("::")===0||H[a.toLowerCase()]==H.ELEMENT};h.prototype=new p;h.prototype.constructor=h;k.prototype=new p;k.prototype.constructor=k;n.prototype=new p;
n.prototype.constructor=n;i.prototype={constructor:i,compare:function(a){var b=["a","b","c","d"],c,d;for(c=0,d=b.length;c<d;c++)if(this[b[c]]<a[b[c]])return-1;else if(this[b[c]]>a[b[c]])return 1;return 0},valueOf:function(){return this.a*1E3+this.b*100+this.c*10+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}};i.calculate=function(a){function b(a){var c,d,m,l,h;a.elementName&&a.text.charAt(a.text.length-1)!="*"&&g++;for(c=0,m=a.modifiers.length;c<m;c++)switch(h=a.modifiers[c],
h.type){case "class":case "attribute":f++;break;case "id":e++;break;case "pseudo":H.isElement(h.text)?g++:f++;break;case "not":for(d=0,l=h.args.length;d<l;d++)b(h.args[d])}}var c,d,e=0,f=0,g=0;for(c=0,d=a.parts.length;c<d;c++)part=a.parts[c],part instanceof k&&b(part);return new i(0,e,f,g)};var J=/^[0-9a-fA-F]$/,N=/\n|\r\n|\r|\f/;C.prototype=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}(new t,{_getToken:function(){var a,b=this._reader,c=null,d=b.getLine(),f=b.getCol();for(a=
b.read();a;){switch(a){case "/":c=b.peek()=="*"?this.commentToken(a,d,f):this.charToken(a,d,f);break;case "|":case "~":case "^":case "$":case "*":c=b.peek()=="="?this.comparisonToken(a,d,f):this.charToken(a,d,f);break;case '"':case "'":c=this.stringToken(a,d,f);break;case "#":c=M(b.peek())?this.hashToken(a,d,f):this.charToken(a,d,f);break;case ".":c=x(b.peek())?this.numberToken(a,d,f):this.charToken(a,d,f);break;case "-":c=b.peek()=="-"?this.htmlCommentEndToken(a,d,f):F(b.peek())?this.identOrFunctionToken(a,
d,f):this.charToken(a,d,f);break;case "!":c=this.importantToken(a,d,f);break;case "@":c=this.atRuleToken(a,d,f);break;case ":":c=this.notToken(a,d,f);break;case "<":c=this.htmlCommentStartToken(a,d,f);break;case "U":case "u":if(b.peek()=="+"){c=this.unicodeRangeToken(a,d,f);break}default:c=x(a)?this.numberToken(a,d,f):s(a)?this.whitespaceToken(a,d,f):a!=null&&(F(a)||/\-\\/.test(a))?this.identOrFunctionToken(a,d,f):this.charToken(a,d,f)}break}!c&&a==null&&(c=this.createToken(e.EOF,null,d,f));return c},
createToken:function(a,b,c,d,e){var f=this._reader,e=e||{};return{value:b,type:a,channel:e.channel,hide:e.hide||!1,startLine:c,startCol:d,endLine:f.getLine(),endCol:f.getCol()}},atRuleToken:function(a,b,c){var d=a,f=this._reader,g=e.CHAR;f.mark();d=this.readName();d=a+d;g=e.type(d.toLowerCase());if(g==e.CHAR||g==e.UNKNOWN)g=e.CHAR,d=a,f.reset();return this.createToken(g,d,b,c)},charToken:function(a,b,c){var d=e.type(a);if(d==-1)d=e.CHAR;return this.createToken(d,a,b,c)},commentToken:function(a,b,
c){a=this.readComment(a);return this.createToken(e.COMMENT,a,b,c)},comparisonToken:function(a,b,c){a+=this._reader.read();return this.createToken(e.type(a)||e.CHAR,a,b,c)},hashToken:function(a,b,c){a=this.readName(a);return this.createToken(e.HASH,a,b,c)},htmlCommentStartToken:function(a,b,c){var d=this._reader,f=a;d.mark();f+=d.readCount(3);return f=="<\!--"?this.createToken(e.CDO,f,b,c):(d.reset(),this.charToken(a,b,c))},htmlCommentEndToken:function(a,b,c){var d=this._reader,f=a;d.mark();f+=d.readCount(2);
return f=="--\>"?this.createToken(e.CDC,f,b,c):(d.reset(),this.charToken(a,b,c))},identOrFunctionToken:function(a,b,c){var d=this._reader,a=this.readName(a),f=e.IDENT;if(d.peek()=="(")if(a+=d.read(),a.toLowerCase()=="url("){if(f=e.URI,a=this.readURI(a),a.toLowerCase()=="url(")f=e.FUNCTION}else f=e.FUNCTION;else if(d.peek()==":"&&a.toLowerCase()=="progid")a+=d.readTo("("),f=e.IE_FUNCTION;return this.createToken(f,a,b,c)},importantToken:function(a,b,c){var d=this._reader,f=a,g=e.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(s(k))f+=k+this.readWhitespace();else{if(/i/i.test(k)&&(h=d.readCount(8),/mportant/i.test(h)))f+=k+h,g=e.IMPORTANT_SYM;break}k=d.read()}return g==e.CHAR?(d.reset(),this.charToken(a,b,c)):this.createToken(g,f,b,c)},notToken:function(a,b,c){var d=this._reader,f=a;d.mark();f+=d.readCount(4);return f.toLowerCase()==":not("?this.createToken(e.NOT,f,b,c):(d.reset(),this.charToken(a,b,c))},numberToken:function(a,
b,c){var d=this._reader,a=this.readNumber(a),f=e.NUMBER,g=d.peek();if(g!=null&&(F(g)||/\-\\/.test(g)))d=this.readName(d.read()),a+=d,f=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(d)?e.LENGTH:/^deg|^rad$|^grad$/i.test(d)?e.ANGLE:/^ms$|^s$/i.test(d)?e.TIME:/^hz$|^khz$/i.test(d)?e.FREQ:/^dpi$|^dpcm$/i.test(d)?e.RESOLUTION:e.DIMENSION;else if(g=="%")a+=d.read(),f=e.PERCENTAGE;return this.createToken(f,a,b,c)},stringToken:function(a,b,c){for(var d=a,f=this._reader,g=
a,h=e.STRING,k=f.read();k;){d+=k;if(k==a&&g!="\\")break;if(G(f.peek())&&k!="\\"){h=e.INVALID;break}g=k;k=f.read()}if(k==null)h=e.INVALID;return this.createToken(h,d,b,c)},unicodeRangeToken:function(a,b,c){var d=this._reader,f,g=e.CHAR;if(d.peek()=="+")d.mark(),a+=d.read(),a+=this.readUnicodeRangePart(!0),a.length==2?d.reset():(g=e.UNICODE_RANGE,a.indexOf("?")==-1&&d.peek()=="-"&&(d.mark(),f=d.read(),f+=this.readUnicodeRangePart(!1),f.length==1?d.reset():a+=f));return this.createToken(g,a,b,c)},whitespaceToken:function(a,
b,c){a+=this.readWhitespace();return this.createToken(e.S,a,b,c)},readUnicodeRangePart:function(a){for(var b=this._reader,c="",d=b.peek();d!=null&&J.test(d)&&c.length<6;)b.read(),c+=d,d=b.peek();if(a)for(;d=="?"&&c.length<6;)b.read(),c+=d,d=b.peek();return c},readWhitespace:function(){for(var a=this._reader,b="",c=a.peek();s(c);)a.read(),b+=c,c=a.peek();return b},readNumber:function(a){for(var b=this._reader,c=a,a=a==".",d=b.peek();d;){if(x(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(G(a.peek())&&e!="\\"){c="";break}d=e;e=a.peek()}e==null&&(c="");return c},readURI:function(a){var b=this._reader,c=a,d="",e=b.peek();for(b.mark();e&&s(e);)b.read(),e=b.peek();d=e=="'"||e=='"'?this.readString():this.readURL();for(e=b.peek();e&&s(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){for(var b=this._reader,a=a||"",c=b.peek();;)if(c=="\\")a+=this.readEscape(b.read()),c=b.peek();else if(c&&M(c))a+=b.read(),c=b.peek();else break;return a},readEscape:function(a){var b=this._reader,a=a||"",c=0,d=b.peek();if(d!=null&&J.test(d)){do a+=b.read(),d=b.peek();while(d&&d!=null&&J.test(d)&&++c<6)}a.length==3&&/\s/.test(d)||a.length==7||a.length==1?b.read():d="";return a+d},readComment:function(a){var b=
this._reader,a=a||"",c=b.read();if(c=="*"){for(;c;){a+=c;if(a.length>2&&c=="*"&&b.peek()=="/"){a+=b.read();break}c=b.read()}return a}else return""}});var e=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{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:">"},
{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:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var a=[],b={};e.UNKNOWN=-1;e.unshift({name:"EOF"});for(var c=0,d=e.length;c<d;c++)if(a.push(e[c].name),e[e[c].name]=c,e[c].text)if(e[c].text instanceof Array)for(var f=0;f<e[c].text.length;f++)b[e[c].text[f]]=c;else b[e[c].text]=c;e.name=function(b){return a[b]};e.type=function(a){return b[a]||-1}})();
D.prototype=Error();q=b})();var i=function(){var c=[],g=[],f=new w;f.version="0.8.1";f.addRule=function(b){c.push(b);c[b.id]=b};f.clearRules=function(){c=[]};f.getRules=function(){return[].concat(c).sort(function(b,c){return b.id>c.id?1:0})};f.addFormatter=function(b){g[b.id]=b};f.getFormatter=function(b){return g[b]};f.format=function(b,c,a,f){var a=this.getFormatter(a),g=null;a&&(g=a.startFormat(),g+=a.formatResults(b,c,f||{}),g+=a.endFormat());return g};f.hasFormat=function(b){return g.hasOwnProperty(b)};
f.verify=function(b,d){var a=0,f=c.length,g,k=new q({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});g=b.split(/\n\r?/g);if(!d)for(d={};a<f;)d[c[a++].id]=1;f=new t(g,d);d.errors=2;for(a in d)d.hasOwnProperty(a)&&c[a]&&c[a].init(k,f);try{k.parse(b)}catch(n){f.error("Fatal error, cannot continue: "+n.message,n.line,n.col,{})}a={messages:f.messages,stats:f.stats};a.messages.sort(function(a,b){return a.rollup&&!b.rollup?1:!a.rollup&&b.rollup?-1:a.line-b.line});return a};return f}();t.prototype=
{constructor:t,error:function(c,g,f,b){this.messages.push({type:"error",line:g,col:f,message:c,evidence:this.lines[g-1],rule:b||{}})},warn:function(c,g,f,b){this.report(c,g,f,b)},report:function(c,g,f,b){this.messages.push({type:this.ruleset[b.id]==2?"error":"warning",line:g,col:f,message:c,evidence:this.lines[g-1],rule:b})},info:function(c,g,f,b){this.messages.push({type:"info",line:g,col:f,message:c,evidence:this.lines[g-1],rule:b})},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}};i._Reporter=t;i.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",browsers:"IE6",init:function(c,g){var f=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,j,h,k,n,i;for(k=0;k<b.length;k++){d=b[k];for(n=0;n<d.parts.length;n++)if(a=d.parts[n],a.type==c.SELECTOR_PART_TYPE)for(i=h=0;i<a.modifiers.length;i++)j=
a.modifiers[i],j.type=="class"&&h++,h>1&&g.report("Don't use adjoining classes.",a.line,a.col,f)}})}});i.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 f(){h={}}function b(){var b;if(h.height)for(b in j)j.hasOwnProperty(b)&&h[b]&&(b=="padding"&&h[b].value.parts.length===2&&h[b].value.parts[0].value===0||g.report("Using height with "+b+" can sometimes make elements larger than you expect.",
h[b].line,h[b].col,d));if(h.width)for(b in a)a.hasOwnProperty(b)&&h[b]&&(b=="padding"&&h[b].value.parts.length===2&&h[b].value.parts[1].value===0||g.report("Using width with "+b+" can sometimes make elements larger than you expect.",h[b].line,h[b].col,d))}var d=this,a={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},j={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},h;c.addListener("startrule",f);c.addListener("startfontface",
f);c.addListener("startpage",f);c.addListener("startpagemargin",f);c.addListener("startkeyframerule",f);c.addListener("property",function(b){var c=b.property.text.toLowerCase();if(j[c]||a[c])!/^0\S*$/.test(b.value)&&!(c=="border"&&b.value=="none")&&(h[c]={line:b.property.line,col:b.property.col,value:b.value});else if(c=="width"||c=="height")h[c]=1});c.addListener("endrule",b);c.addListener("endfontface",b);c.addListener("endpage",b);c.addListener("endpagemargin",b);c.addListener("endkeyframerule",
b)}});i.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 f=this;c.addListener("property",function(b){b.property.text.toLowerCase()=="box-sizing"&&g.report("The box-sizing property isn't supported in IE6 and IE7.",b.line,b.col,f)})}});i.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 f=this,b,d,a,j,h,k,n,i=Array.prototype.push,x=[];b={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(a in b)if(b.hasOwnProperty(a)){j=[];h=b[a].split(" ");for(k=0,n=h.length;k<n;k++)j.push("-"+h[k]+"-"+a);b[a]=j;i.apply(x,j)}c.addListener("startrule",function(){d=[]});c.addListener("property",function(a){a=a.property.text;
x.indexOf(a)>-1&&d.push(a)});c.addListener("endrule",function(a){if(d.length){var c={},h,k,j,n,i,o,x;for(h=0,k=d.length;h<k;h++)for(n in j=d[h],b)b.hasOwnProperty(n)&&(i=b[n],i.indexOf(j)>-1&&(c[n]===void 0&&(c[n]={full:i.slice(0),actual:[]}),c[n].actual.indexOf(j)===-1&&c[n].actual.push(j)));for(n in c)if(c.hasOwnProperty(n)&&(h=c[n],j=h.full,i=h.actual,j.length>i.length))for(h=0,k=j.length;h<k;h++)o=j[h],i.indexOf(o)===-1&&(x=i.length===1?i[0]:i.length==2?i.join(" and "):i.join(", "),g.report("The property "+
o+" is compatible with "+x+" and should be included as well.",a.selectors[0].line,a.selectors[0].col,f))}})}});i.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 f(b,c,d){if(h[b]&&(typeof j[b]!="string"||h[b].value.toLowerCase()!=j[b]))g.report(d||b+" can't be used with display: "+c+".",h[b].line,h[b].col,a)}function b(){h={}}function d(){var a=
h.display?h.display.value:null;if(a)switch(a){case "inline":f("height",a);f("width",a);f("margin",a);f("margin-top",a);f("margin-bottom",a);f("float",a,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case "block":f("vertical-align",a);break;case "inline-block":f("float",a);break;default:a.indexOf("table-")===0&&(f("margin",a),f("margin-left",a),f("margin-right",a),f("margin-top",a),f("margin-bottom",a),f("float",a))}}var a=this,j={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",b);c.addListener("startfontface",b);c.addListener("startkeyframerule",b);c.addListener("startpagemargin",b);c.addListener("startpage",b);c.addListener("property",function(a){var b=a.property.text.toLowerCase();j[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)}});i.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(c,g){function f(){d={}}var b=this,d,a;c.addListener("startrule",f);c.addListener("startfontface",f);c.addListener("startpage",f);c.addListener("startpagemargin",f);c.addListener("startkeyframerule",
f);c.addListener("property",function(c){var f=c.property.text.toLowerCase();d[f]&&(a!=f||d[f]==c.value.text)&&g.report("Duplicate property '"+c.property+"' found.",c.line,c.col,b);d[f]=c.value.text;a=f})}});i.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(c,g){var f=this,b=0;c.addListener("startrule",function(){b=0});c.addListener("property",function(){b++});c.addListener("endrule",function(c){c=c.selectors;
b===0&&g.report("Rule is empty.",c[0].line,c[0].col,f)})}});i.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(c,g){var f=this;c.addListener("error",function(b){g.error(b.message,b.line,b.col,f)})}});i.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 f=this,b=0;c.addListener("property",function(c){c.property.text.toLowerCase()==
"float"&&c.value.text.toLowerCase()!="none"&&b++});c.addListener("endstylesheet",function(){g.stat("floats",b);b>=10&&g.rollupWarn("Too many floats ("+b+"), you're probably using them for layout. Consider using a grid system instead.",f)})}});i.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 f=this,b=0;c.addListener("startfontface",function(){b++});c.addListener("endstylesheet",function(){b>
5&&g.rollupWarn("Too many @font-face declarations ("+b+").",f)})}});i.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 f=this,b=0;c.addListener("property",function(c){c.property=="font-size"&&b++});c.addListener("endstylesheet",function(){g.stat("font-sizes",b);b>=10&&g.rollupWarn("Too many font-size declarations ("+b+"), abstraction needed.",f)})}});i.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 f=this,b;c.addListener("startrule",function(){b={moz:0,webkit:0,ms:0,o:0}});c.addListener("property",function(c){/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/.test(c.value)&&(b[RegExp.$1]=1)});c.addListener("endrule",function(c){var a=[];b.moz||a.push("Firefox 3.6+");b.webkit||a.push("Webkit (Safari, Chrome)");b.ms||a.push("Internet Explorer 10+");b.o||a.push("Opera 11.1+");a.length&&
a.length<4&&g.report("Missing vendor-prefixed CSS gradients for "+a.join(", ")+".",c.selectors[0].line,c.selectors[0].col,f)})}});i.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(c,g){var f=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,j,h,k,i,o;for(k=0;k<b.length;k++){d=b[k];for(i=h=0;i<d.parts.length;i++)if(a=d.parts[i],a.type==c.SELECTOR_PART_TYPE)for(o=0;o<a.modifiers.length;o++)j=a.modifiers[o],j.type==
"id"&&h++;h==1?g.report("Don't use IDs in selectors.",d.line,d.col,f):h>1&&g.report(h+" IDs in the selector, really?",d.line,d.col,f)}})}});i.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",browsers:"All",init:function(c,g){var f=this;c.addListener("import",function(b){g.report("@import prevents parallel downloads, use <link> instead.",b.line,b.col,f)})}});i.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",
browsers:"All",init:function(c,g){var f=this,b=0;c.addListener("property",function(c){c.important===!0&&(b++,g.report("Use of !important",c.line,c.col,f))});c.addListener("endstylesheet",function(){g.stat("important",b);b>=10&&g.rollupWarn("Too many !important declarations ("+b+"), try to use less than 10 to avoid specifity issues.",f)})}});i.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 f=this;c.addListener("property",function(b){b.property.text.toLowerCase();b.invalid&&g.report(b.invalid.message,b.line,b.col,f)})}});i.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 f(b){a=b.selectors?{line:b.line,col:b.col,selectors:b.selectors,propCount:0,outline:!1}:null}function b(){a&&a.outline&&(a.selectors.toString().toLowerCase().indexOf(":focus")==
-1?g.report("Outlines should only be modified using :focus.",a.line,a.col,d):a.propCount==1&&g.report("Outlines shouldn't be hidden unless other visual changes are made.",a.line,a.col,d))}var d=this,a;c.addListener("startrule",f);c.addListener("startfontface",f);c.addListener("startpage",f);c.addListener("startpagemargin",f);c.addListener("startkeyframerule",f);c.addListener("property",function(b){var c=b.property.text.toLowerCase(),b=b.value;if(a&&(a.propCount++,c=="outline"&&(b=="none"||b=="0")))a.outline=
!0});c.addListener("endrule",b);c.addListener("endfontface",b);c.addListener("endpage",b);c.addListener("endpagemargin",b);c.addListener("endkeyframerule",b)}});i.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 f=this,b={};c.addListener("startrule",function(d){var d=d.selectors,a,j,h,k,i,o;for(k=0;k<d.length;k++){a=d[k];for(i=0;i<a.parts.length;i++)if(j=a.parts[i],j.type==
c.SELECTOR_PART_TYPE)for(o=0;o<j.modifiers.length;o++)h=j.modifiers[o],j.elementName&&h.type=="id"?g.report("Element ("+j+") is overqualified, just use "+h+" without element name.",j.line,j.col,f):h.type=="class"&&(b[h]||(b[h]=[]),b[h].push({modifier:h,part:j}))}});c.addListener("endstylesheet",function(){for(var c in b)b.hasOwnProperty(c)&&b[c].length==1&&b[c][0].part.elementName&&g.report("Element ("+b[c][0].part+") is overqualified, just use "+b[c][0].modifier+" without element name.",b[c][0].part.line,
b[c][0].part.col,f)})}});i.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(c,g){var f=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,j,h;for(j=0;j<b.length;j++){d=b[j];for(h=0;h<d.parts.length;h++)a=d.parts[h],a.type==c.SELECTOR_PART_TYPE&&a.elementName&&/h[1-6]/.test(a.elementName.toString())&&h>0&&g.report("Heading ("+a.elementName+") should not be qualified.",a.line,a.col,f)}})}});
i.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 f=this;c.addListener("startrule",function(b){var b=b.selectors,d,a,j,h,k,i;for(h=0;h<b.length;h++){d=b[h];for(k=0;k<d.parts.length;k++)if(a=d.parts[k],a.type==c.SELECTOR_PART_TYPE)for(i=0;i<a.modifiers.length;i++)j=a.modifiers[i],j.type=="attribute"&&/([\~\|\^\$\*]=)/.test(j)&&g.report("Attribute selectors with "+
RegExp.$1+" are slow!",j.line,j.col,f)}})}});i.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(c,g){var f=0;c.addListener("startrule",function(){f++});c.addListener("endstylesheet",function(){g.stat("rule-count",f)})}});i.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(c,g){function f(){i={}}function b(a){var b,c,f,h;for(b in o)if(o.hasOwnProperty(b)){h=
0;for(c=0,f=o[b].length;c<f;c++)h+=i[o[b][c]]?1:0;h==o[b].length&&g.report("The properties "+o[b].join(", ")+" can be replaced by "+b+".",a.line,a.col,d)}}var d=this,a,j,h,k={},i,o={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(a in o)if(o.hasOwnProperty(a))for(j=0,h=o[a].length;j<h;j++)k[o[a][j]]=a;c.addListener("startrule",f);c.addListener("startfontface",f);c.addListener("property",function(a){a=a.property.toString().toLowerCase();
k[a]&&(i[a]=1)});c.addListener("endrule",b);c.addListener("endfontface",b)}});i.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(c,g){function f(){a=!1}function b(){a&&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.",a.line,a.col,d)}var d=this,a=!1;c.addListener("startrule",f);c.addListener("startfontface",
f);c.addListener("property",function(b){var c=b.property.toString().toLowerCase(),d=b.value;c=="text-indent"&&d.parts[0].value<-99?a=b.property:c=="direction"&&d=="ltr"&&(a=!1)});c.addListener("endrule",b);c.addListener("endfontface",b)}});i.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 f=this,b={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};c.addListener("startrule",function(c){var c=c.selectors,a,i,h,
k;for(h=0;h<c.length;h++)if(a=c[h],a=a.parts[a.parts.length-1],a.elementName&&/(h[1-6])/i.test(a.elementName.toString())){for(k=0;k<a.modifiers.length;k++)if(a.modifiers[k].type=="pseudo"){i=!0;break}i||(b[RegExp.$1]++,b[RegExp.$1]>1&&g.report("Heading ("+a.elementName+") has already been defined.",a.line,a.col,f))}});c.addListener("endstylesheet",function(){var c,a=[];for(c in b)b.hasOwnProperty(c)&&b[c]>1&&a.push(b[c]+" "+c+"s");a.length&&g.rollupWarn("You have "+a.join(", ")+" defined in this stylesheet.",
f)})}});i.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(c,g){var f=this;c.addListener("startrule",function(b){var b=b.selectors,c,a;for(a=0;a<b.length;a++)c=b[a],c=c.parts[c.parts.length-1],c.elementName=="*"&&g.report(f.desc,c.line,c.col,f)})}});i.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 f(){a={};i=1}function b(b){var c,f,i,j,q=[];for(c in a)h[c]&&q.push({actual:c,needed:h[c]});for(c=0,f=q.length;c<f;c++)i=q[c].needed,j=q[c].actual,a[i]?a[i][0].pos<a[j][0].pos&&g.report("Standard property '"+i+"' should come after vendor-prefixed property '"+j+"'.",b.line,b.col,d):g.report("Missing standard property '"+i+"' to go along with '"+j+"'.",b.line,b.col,d)}var d=this,a,i,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",f);c.addListener("startfontface",f);c.addListener("startpage",f);c.addListener("startpagemargin",f);c.addListener("startkeyframerule",f);c.addListener("property",function(b){var c=
b.property.text.toLowerCase();a[c]||(a[c]=[]);a[c].push({name:b.property,value:b.value,pos:i++})});c.addListener("endrule",b);c.addListener("endfontface",b);c.addListener("endpage",b);c.addListener("endpagemargin",b);c.addListener("endkeyframerule",b)}});i.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 f=this;c.addListener("property",function(b){for(var b=b.value.parts,c=0,a=b.length;c<a;)(b[c].units||
b[c].type=="percentage")&&b[c].value===0&&g.report("Values of 0 shouldn't have units specified.",b[c].line,b[c].col,f),c++})}});i.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},formatResults:function(c,g){var f=c.messages,b=[];f.length>0&&(b.push('<file name="'+g+'">'),f.forEach(function(c){c.rollup||b.push('<error line="'+c.line+'" column="'+c.col+'" severity="'+
c.type+'" message="'+(!c.message||c.message.constructor!==String?"":c.message.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;"))+'" source="'+(!c.rule||!("name"in c.rule)?"":"net.csslint."+c.rule.name.replace(/\s/g,""))+'"/>')}),b.push("</file>"));return b.join("")}});i.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(c,g,f){var c=c.messages,b="",f=f||{};if(c.length===0)return f.quiet?"":
g+": Lint Free!";c.forEach(function(c){b+=c.rollup?g+": "+(c.type.charAt(0).toUpperCase()+c.type.slice(1))+" - "+c.message+"\n":g+": line "+c.line+", col "+c.col+", "+(c.type.charAt(0).toUpperCase()+c.type.slice(1))+" - "+c.message+"\n"});return b}});i.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){return"</csslint>"},formatResults:function(c,g){var f=c.messages,b=[],d=function(a){return!a||
a.constructor!==String?"":a.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;")};f.length>0&&(b.push('<file name="'+g+'">'),f.forEach(function(a){a.rollup?b.push('<issue severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>'):b.push('<issue line="'+a.line+'" char="'+a.col+'" severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>')}),b.push("</file>"));return b.join("")}});i.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><lint>'},
endFormat:function(){return"</lint>"},formatResults:function(c,g){var f=c.messages,b=[],d=function(a){return!a||a.constructor!==String?"":a.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;")};f.length>0&&(b.push('<file name="'+g+'">'),f.forEach(function(a){a.rollup?b.push('<issue severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>'):b.push('<issue line="'+a.line+'" char="'+a.col+'" severity="'+a.type+'" reason="'+d(a.message)+'" evidence="'+d(a.evidence)+'"/>')}),
b.push("</file>"));return b.join("")}});i.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(c,g,f){var c=c.messages,b="",f=f||{};if(c.length===0)return f.quiet?"":"\n\ncsslint: No errors in "+g+".";var b="\n\ncsslint: There are "+c.length+" problems in "+g+".",f=g.lastIndexOf("/"),d=g;f===-1&&(f=g.lastIndexOf("\\"));f>-1&&(d=g.substring(f+1));c.forEach(function(a,c){b=b+"\n\n"+d;a.rollup?(b+="\n"+(c+1)+": "+a.type,b+="\n"+
a.message):(b+="\n"+(c+1)+": "+a.type+" at line "+a.line+", col "+a.col,b+="\n"+a.message,b+="\n"+a.evidence)});return b}});return i}();define("plugins/csslintPlugin/lib/csslint",function(){});
define('built-csslintPlugin.js',["orion/plugin","plugins/csslintPlugin/lib/csslint"],function(q){function r(i,c){for(var g=CSSLint.verify(c).messages,f=c.split(/\r?\n/),b=[],d=0;d<g.length;d++){var a=g[d];a.line&&(a={description:a.message,line:a.line,start:a.col,end:f[a.line-1].indexOf(a.evidence)+a.evidence.length,severity:a.type},b.push(a))}return{problems:b}}function A(i){CSSLint.addRule({id:"css-outline",name:"CSS outline",desc:"CSS outline helper rule",browsers:"All",init:function(c){i.length=
0;c.addListener("startrule",function(c){if((c=c.selectors)&&c.length){for(var f=[],b=null,d=null,a=0;a<c.length;a++){var j=c[a];if(b===null)b=j.line;if(d===null)d=j.col;f.push(j.text)}i.push({label:f.join(", "),line:b,col:d})}})}})}try{var w=new q({name:"Orion CSSLint Support",version:"1.0",description:"This plugin provides a CSSLint service to support outline and validation of CSS files."});w.registerService("orion.edit.validator",{checkSyntax:r},{contentType:["text/css"]});var z=[];A(z);w.registerService("orion.edit.outliner",
{getOutline:function(i){CSSLint.verify(i);return z}},{id:"orion.outline.css.csslint",name:"CSS rule outline",contentType:["text/css"]});w.connect()}catch(t){console.debug("Couldn't install csslintPlugin: "+t)}});