diff --git a/dist/less-1.0.10.js b/dist/less-1.0.13.js
similarity index 97%
rename from dist/less-1.0.10.js
rename to dist/less-1.0.13.js
index f9a027a..5d79731 100644
--- a/dist/less-1.0.10.js
+++ b/dist/less-1.0.13.js
@@ -1,5 +1,5 @@
//
-// LESS - Leaner CSS v1.0.10
+// LESS - Leaner CSS v1.0.13
// http://lesscss.org
//
// Copyright (c) 2010, Alexis Sellier
@@ -1911,42 +1911,54 @@ less.env = location.hostname == '127.0.0.1' ||
location.protocol == 'file:' ? 'development'
: 'production';
+less.watch = function () { return this.watchMode = true };
+less.unwatch = function () { return this.watchMode = false };
// Load the stylesheets when the body is ready
var readyTimer = setInterval(function () {
if (document.body) {
- if (!document.querySelectorAll && typeof(jQuery) === "undefined") {
- log("No selector method found");
- } else {
- sheets = (document.querySelectorAll || jQuery).call(document, 'link[rel="stylesheet/less"]');
- }
+ sheets = select('link[rel="stylesheet/less"]');
+
clearInterval(readyTimer);
loadStyleSheets(function (root, sheet, env) {
- createCSS(root.toCSS(), sheet, env.lastModified);
-
if (env.local) {
log("less: loading " + sheet.href + " from local storage.");
} else {
+ createCSS(root.toCSS(), sheet, env.lastModified);
log("less: parsed " + sheet.href + " successfully.");
}
});
}
}, 10);
+if (less.env === 'development' && /!refresh/.test(location.hash)) {
+ less.watchMode = true;
+}
+
//
// Auto-refresh
//
if (less.env === 'development') {
refreshTimer = setInterval(function () {
- if (/!refresh/.test(location.hash)) {
+ if (less.watchMode) {
loadStyleSheets(function (root, sheet, lastModified) {
- createCSS(root.toCSS(), sheet, lastModified);
+ if (root) {
+ createCSS(root.toCSS(), sheet, lastModified);
+ }
});
}
}, 1000);
}
+function select(str) {
+ if (!document.querySelectorAll && typeof(jQuery) === "undefined") {
+ log("No selector method found");
+ } else {
+ return (document.querySelectorAll || jQuery).call(document, str);
+ }
+}
+
function loadStyleSheets(callback) {
for (var i = 0; i < sheets.length; i++) {
loadStyleSheet(sheets[i], callback);
@@ -1980,26 +1992,39 @@ function loadStyleSheet(sheet, callback) {
}
function createCSS(styles, sheet, lastModified) {
- var css = document.createElement('style');
- css.type = 'text/css';
- css.media = 'screen';
- css.title = 'less-sheet';
+ var css, title, id;
- if (sheet) {
- css.title = sheet.title || sheet.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1];
+ // If there is no title set, use the filename, minus the extension
+ title = sheet.title || sheet.href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1];
+ id = '-less-' + title;
- // Don't update the local store if the file wasn't modified
- if (lastModified && typeof(localStorage) !== "undefined") {
- localStorage.setItem(sheet.href, JSON.stringify({ timestamp: lastModified, css: styles }));
- }
+ // If the stylesheet doesn't exist, create a new node
+ if ((css = document.getElementById(id)) === null) {
+ css = document.createElement('style');
+ css.type = 'text/css';
+ css.media = 'screen';
+ css.title = title;
+ css.id = id;
+ document.getElementsByTagName('head')[0].appendChild(css);
}
- if (css.styleSheet) {
- css.styleSheet.cssText = styles;
+ if (css.styleSheet) { // IE
+ try {
+ css.styleSheet.cssText = styles;
+ } catch (e) {
+ throw new(Error)("Couldn't reassign styleSheet.cssText.");
+ }
} else {
+ if (css.childNodes.length > 0) {
+ css.removeChild(css.childNodes[0]);
+ }
css.appendChild(document.createTextNode(styles));
}
- document.getElementsByTagName('head')[0].appendChild(css);
+
+ // Don't update the local store if the file wasn't modified
+ if (lastModified && typeof(localStorage) !== "undefined") {
+ localStorage.setItem(sheet.href, JSON.stringify({ timestamp: lastModified, css: styles }));
+ }
}
function xhr(url, callback, errback) {
@@ -2047,6 +2072,8 @@ function log(str) {
}
function error(e, href) {
+ if (document.getElementById('less-error-message')) { return }
+
var template = ['
',
'
[-1]{0}
',
'
[0]{current}
',
@@ -2092,7 +2119,7 @@ function error(e, href) {
'padding-bottom: 2px;',
'border-bottom: 1px dashed red;',
'}'
- ].join(''));
+ ].join(''), { title: 'error-message' });
elem.style.cssText = [
"font-family: Arial, sans-serif",
diff --git a/dist/less-1.0.10.min.js b/dist/less-1.0.13.min.js
similarity index 54%
rename from dist/less-1.0.10.min.js
rename to dist/less-1.0.13.min.js
index 3da892d..8866a41 100644
--- a/dist/less-1.0.10.min.js
+++ b/dist/less-1.0.13.min.js
@@ -1,38 +1,38 @@
//
-// LESS - Leaner CSS v1.0.10
+// LESS - Leaner CSS v1.0.13
// http://lesscss.org
//
// Copyright (c) 2010, Alexis Sellier
// Licensed under the MIT license.
//
-if(!Array.isArray)Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"||b instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(b,a){for(var e=this.length>>>0,f=0;f
>>0,f=new Array(e),g=0;g>>0,f=0;f>>0,f=new Array(e),h=0;h>>0,e=0;if(a===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var f=arguments[1];else{do{if(e in this){f=this[e++];break}if(++e>=a)throw new TypeError;}while(1)}for(;e=e)return-1;if(a<0)a+=e;for(;a=r+n[k].length&&k0){f=f.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g,function(v){return p.optimization>1?"":v.replace(/\n(\s*\n)+/g,"\n")});n=f.split(/^(?=\n)/mg)}else n=[f];i=new tree.Ruleset([],a(this.parsers.primary));i.root=true;i.toCSS=function(v){var t,u;return function(){try{return v.call(this)}catch(w){u=f.split("\n");t=(f.slice(0,w.index).match(/\n/g)||"").length+1;for(var x=w.index,z=-1;x>=0&&f.charAt(x)!=="\n";x--)z++;throw{name:"NameError",message:w.message,line:t,
-column:z,extract:[u[t-2],u[t-1],u[t]]};}}}(i.toCSS);if(g=0&&f.charAt(y)!=="\n";y--)A++;s={name:"ParseError",message:"Syntax Error on line "+d,filename:b.filename,line:d,column:A,extract:[o[d-2],o[d-1],o[d]]}}if(this.imports.queue.length>0)q=function(){h(s,i)};else h(s,i)},parsers:{primary:function(){for(var d,h=[];d=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||a(this.comment)||
-a(/[\n\s]+/g)||a(this.directive);)h.push(d);return h},comment:function(){var d;if(f.charAt(g)==="/")return(d=a(/\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/g))?new tree.Comment(d):a(/\/\/.*/g)},entities:{quoted:function(){var d;if(!(f.charAt(g)!=='"'&&f.charAt(g)!=="'"))if(d=a(/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/g))return new tree.Quoted(d[0],d[1]||d[2])},keyword:function(){var d;if(d=a(/[A-Za-z-]+/g))return new tree.Keyword(d)},call:function(){var d,h;if(d=a(/([a-zA-Z0-9_-]+|%)\(/g)){if(d[1].toLowerCase()===
-"alpha")return a(this.alpha);h=a(this.entities.arguments);if(a(")"))if(d)return new tree.Call(d[1],h)}},arguments:function(){for(var d=[],h;h=a(this.expression);){d.push(h);if(!a(","))break}return d},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var d;if(!(f.charAt(g)!=="u"||!a(/url\(/g))){d=a(this.entities.quoted)||a(/[-a-zA-Z0-9_%@$\/.&=:;#+?]+/g);if(!a(")"))throw new Error("missing closing ) for url()");return new tree.URL(d.value?
-d:new tree.Anonymous(d))}},variable:function(){var d,h=g;if(f.charAt(g)==="@"&&(d=a(/@[a-zA-Z0-9_-]+/g)))return new tree.Variable(d,h)},color:function(){var d;if(f.charAt(g)==="#"&&(d=a(/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/g)))return new tree.Color(d[1])},dimension:function(){var d;d=f.charCodeAt(g);if(!(d>57||d<45||d===47))if(d=a(/(-?[0-9]*\.?[0-9]+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm)?/g))return new tree.Dimension(d[1],d[2])}},variable:function(){var d;if(f.charAt(g)==="@"&&(d=a(/(@[a-zA-Z0-9_-]+)\s*:/g)))return d[1]},
-shorthand:function(){var d,h;if(e(/[@\w.-]+\/[@\w.-]+/g))if((d=a(this.entity))&&a("/")&&(h=a(this.entity)))return new tree.Shorthand(d,h)},mixin:{call:function(){for(var d=[],h,i,o,s=g;h=a(/[#.][a-zA-Z0-9_-]+/g);){d.push(new tree.Element(i,h));i=a(">")}a("(")&&(o=a(this.entities.arguments))&&a(")");if(d.length>0&&(a(";")||e("}")))return new tree.mixin.Call(d,o,s)},definition:function(){var d,h=[],i,o;if(!(f.charAt(g)!=="."||e(/[^{]*(;|})/g)))if(d=a(/([#.][a-zA-Z0-9_-]+)\s*\(/g)){for(d=d[1];i=a(/@[\w-]+/g)||
-a(this.entities.literal)||a(this.entities.keyword);){if(i[0]==="@")if(a(":"))if(o=a(this.expression))h.push({name:i,value:o});else throw new Error("Expected value");else h.push({name:i});else h.push({value:i});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(i=a(this.block))return new tree.mixin.Definition(d,h,i)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)},end:function(){return a(";")||
-e("}")},alpha:function(){var d;if(a(/opacity=/gi))if(d=a(/[0-9]+/g)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new tree.Alpha(d)}},element:function(){var d;c=a(this.combinator);if(d=a(/[.#:]?[a-zA-Z0-9_-]+/g)||a("*")||a(this.attribute)||a(/\([^)@]+\)/g))return new tree.Element(c,d)},combinator:function(){var d;return(d=a(/[+>~]/g)||a("&")||a(/::/g))?new tree.Combinator(d):new tree.Combinator(f.charAt(g-1)===" "?" ":null)},selector:function(){for(var d,
-h=[];d=a(this.element);)h.push(d);if(h.length>0)return new tree.Selector(h)},tag:function(){return a(/[a-zA-Z][a-zA-Z-]*[0-9]?/g)||a("*")},attribute:function(){var d="",h,i,o;if(a("[")){if(h=a(/[a-z-]+/g)||a(this.entities.quoted))d=(o=a(/[|~*$^]?=/g))&&(i=a(this.entities.quoted)||a(/[\w-]+/g))?[h,o,i.toCSS?i.toCSS():i].join(""):h;if(a("]"))if(d)return"["+d+"]"}},block:function(){var d;if(a("{")&&(d=a(this.primary))&&a("}"))return d},ruleset:function(){var d=[],h,i,o=g;if(h=e(/([a-z.#: _-]+)[\s\n]*\{/g)){g+=
-h[0].length-1;d=[new tree.Selector([new tree.Element(null,h[1])])]}else{for(;h=a(this.selector);){d.push(h);if(!a(","))break}h&&a(this.comment)}if(d.length>0&&(i=a(this.block)))return new tree.Ruleset(d,i);else{l=g;g=o}},rule:function(){var d,h=g;if(name=a(this.property)||a(this.variable)){if(name.charAt(0)!="@"&&(match=e(/([^@+\/*(;{}-]*);/g))){g+=match[0].length-1;d=new tree.Anonymous(match[1])}else d=name==="font"?a(this.font):a(this.value);if(a(this.end))return new tree.Rule(name,d,h);else{l=
-g;g=h}}},"import":function(){var d;if(a(/@import\s+/g)&&(d=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new tree.Import(d,m)},directive:function(){var d,h,i;if(f.charAt(g)==="@")if(h=a(this["import"]))return h;else if(d=a(/@media|@page/g)){i=a(/[^{]+/g).trim();if(h=a(this.block))return new tree.Directive(d+" "+i,h)}else if(d=a(/@[-a-z]+/g))if(d==="@font-face"){if(h=a(this.block))return new tree.Directive(d,h)}else if((h=a(this.entity))&&a(";"))return new tree.Directive(d,h)},font:function(){for(var d=
-[],h=[],i;i=a(this.shorthand)||a(this.entity);)h.push(i);d.push(new tree.Expression(h));if(a(","))for(;i=a(this.expression);){d.push(i);if(!a(","))break}return new tree.Value(d,a(this.important))},value:function(){for(var d,h=[];d=a(this.expression);){h.push(d);if(!a(","))break}d=a(this.important);if(h.length>0)return new tree.Value(h,d)},important:function(){return a(/!\s*important/g)},sub:function(){var d;if(a("(")&&(d=a(this.expression))&&a(")"))return d},multiplication:function(){var d,h,i,o;
-if(d=a(this.operand)){for(;(i=a(/[\/*]/g))&&(h=a(this.operand));)o=new tree.Operation(i,[o||d,h]);return o||d}},addition:function(){var d,h,i,o;if(d=a(this.multiplication)){for(;(i=a(/[-+]\s+/g)||f.charAt(g-1)!=" "&&a(/[-+]/g))&&(h=a(this.multiplication));)o=new tree.Operation(i,[o||d,h]);return o||d}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)},expression:function(){for(var d,h=[];d=a(this.addition)||a(this.entity);)h.push(d);
-if(h.length>0)return new tree.Expression(h)},property:function(){var d;if(d=a(/(\*?-?[-a-z_0-9]+)\s*:/g))return d[1]}}}};less.Parser.importer=null;if(typeof require!=="undefined")tree=require("less/tree");
-tree.functions={rgb:function(b,a,e){return this.rgba(b,a,e,1)},rgba:function(b,a,e,f){b=[b,a,e].map(function(g){return number(g)});f=number(f);return new tree.Color(b,f)},hsl:function(b,a,e){return this.hsla(b,a,e,1)},hsla:function(b,a,e,f){function g(n){n=n<0?n+1:n>1?n-1:n;return n*6<1?l+(k-l)*n*6:n*2<1?k:n*3<2?l+(k-l)*(2/3-n)*6:l}b=(number(b)%360+360)%360/360;a=number(a);e=number(e);f=number(f);var k=e<=0.5?e*(a+1):e+a-e*a,l=e*2-k;return this.rgba(g(b+1/3)*255,g(b)*255,g(b-1/3)*255,f)},saturate:function(b,
+less.Parser=function(b){function a(d){var g,i,m;if(d instanceof Function)return d.call(s.parsers);else if(typeof d==="string"){g=f.charAt(h)===d?d:null;i=1}else{if(h>=q+n[l].length&&l0){f=f.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g,function(w){return j.optimization>1?"":w.replace(/\n(\s*\n)+/g,"\n")});n=f.split(/^(?=\n)/mg)}else n=[f];i=new tree.Ruleset([],a(this.parsers.primary));i.root=true;i.toCSS=function(w){var t,v;return function(){try{return w.call(this)}catch(x){v=f.split("\n");t=(f.slice(0,x.index).match(/\n/g)||"").length+1;for(var y=x.index,z=-1;y>=0&&f.charAt(y)!=="\n";y--)z++;throw{name:"NameError",message:x.message,line:t,
+column:z,extract:[v[t-2],v[t-1],v[t]]};}}}(i.toCSS);if(h=0&&f.charAt(u)!=="\n";u--)A++;r={name:"ParseError",message:"Syntax Error on line "+d,filename:b.filename,line:d,column:A,extract:[m[d-2],m[d-1],m[d]]}}if(this.imports.queue.length>0)o=function(){g(r,i)};else g(r,i)},parsers:{primary:function(){for(var d,g=[];d=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||a(this.comment)||
+a(/[\n\s]+/g)||a(this.directive);)g.push(d);return g},comment:function(){var d;if(f.charAt(h)==="/")return(d=a(/\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/g))?new tree.Comment(d):a(/\/\/.*/g)},entities:{quoted:function(){var d;if(!(f.charAt(h)!=='"'&&f.charAt(h)!=="'"))if(d=a(/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/g))return new tree.Quoted(d[0],d[1]||d[2])},keyword:function(){var d;if(d=a(/[A-Za-z-]+/g))return new tree.Keyword(d)},call:function(){var d,g;if(d=a(/([a-zA-Z0-9_-]+|%)\(/g)){if(d[1].toLowerCase()===
+"alpha")return a(this.alpha);g=a(this.entities.arguments);if(a(")"))if(d)return new tree.Call(d[1],g)}},arguments:function(){for(var d=[],g;g=a(this.expression);){d.push(g);if(!a(","))break}return d},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var d;if(!(f.charAt(h)!=="u"||!a(/url\(/g))){d=a(this.entities.quoted)||a(/[-a-zA-Z0-9_%@$\/.&=:;#+?]+/g);if(!a(")"))throw new Error("missing closing ) for url()");return new tree.URL(d.value?
+d:new tree.Anonymous(d))}},variable:function(){var d,g=h;if(f.charAt(h)==="@"&&(d=a(/@[a-zA-Z0-9_-]+/g)))return new tree.Variable(d,g)},color:function(){var d;if(f.charAt(h)==="#"&&(d=a(/#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/g)))return new tree.Color(d[1])},dimension:function(){var d;d=f.charCodeAt(h);if(!(d>57||d<45||d===47))if(d=a(/(-?[0-9]*\.?[0-9]+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm)?/g))return new tree.Dimension(d[1],d[2])}},variable:function(){var d;if(f.charAt(h)==="@"&&(d=a(/(@[a-zA-Z0-9_-]+)\s*:/g)))return d[1]},
+shorthand:function(){var d,g;if(e(/[@\w.-]+\/[@\w.-]+/g))if((d=a(this.entity))&&a("/")&&(g=a(this.entity)))return new tree.Shorthand(d,g)},mixin:{call:function(){for(var d=[],g,i,m,r=h;g=a(/[#.][a-zA-Z0-9_-]+/g);){d.push(new tree.Element(i,g));i=a(">")}a("(")&&(m=a(this.entities.arguments))&&a(")");if(d.length>0&&(a(";")||e("}")))return new tree.mixin.Call(d,m,r)},definition:function(){var d,g=[],i,m;if(!(f.charAt(h)!=="."||e(/[^{]*(;|})/g)))if(d=a(/([#.][a-zA-Z0-9_-]+)\s*\(/g)){for(d=d[1];i=a(/@[\w-]+/g)||
+a(this.entities.literal)||a(this.entities.keyword);){if(i[0]==="@")if(a(":"))if(m=a(this.expression))g.push({name:i,value:m});else throw new Error("Expected value");else g.push({name:i});else g.push({value:i});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(i=a(this.block))return new tree.mixin.Definition(d,g,i)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)},end:function(){return a(";")||
+e("}")},alpha:function(){var d;if(a(/opacity=/gi))if(d=a(/[0-9]+/g)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new tree.Alpha(d)}},element:function(){var d;c=a(this.combinator);if(d=a(/[.#:]?[a-zA-Z0-9_-]+/g)||a("*")||a(this.attribute)||a(/\([^)@]+\)/g))return new tree.Element(c,d)},combinator:function(){var d;return(d=a(/[+>~]/g)||a("&")||a(/::/g))?new tree.Combinator(d):new tree.Combinator(f.charAt(h-1)===" "?" ":null)},selector:function(){for(var d,
+g=[];d=a(this.element);)g.push(d);if(g.length>0)return new tree.Selector(g)},tag:function(){return a(/[a-zA-Z][a-zA-Z-]*[0-9]?/g)||a("*")},attribute:function(){var d="",g,i,m;if(a("[")){if(g=a(/[a-z-]+/g)||a(this.entities.quoted))d=(m=a(/[|~*$^]?=/g))&&(i=a(this.entities.quoted)||a(/[\w-]+/g))?[g,m,i.toCSS?i.toCSS():i].join(""):g;if(a("]"))if(d)return"["+d+"]"}},block:function(){var d;if(a("{")&&(d=a(this.primary))&&a("}"))return d},ruleset:function(){var d=[],g,i,m=h;if(g=e(/([a-z.#: _-]+)[\s\n]*\{/g)){h+=
+g[0].length-1;d=[new tree.Selector([new tree.Element(null,g[1])])]}else{for(;g=a(this.selector);){d.push(g);if(!a(","))break}g&&a(this.comment)}if(d.length>0&&(i=a(this.block)))return new tree.Ruleset(d,i);else{k=h;h=m}},rule:function(){var d,g=h;if(name=a(this.property)||a(this.variable)){if(name.charAt(0)!="@"&&(match=e(/([^@+\/*(;{}-]*);/g))){h+=match[0].length-1;d=new tree.Anonymous(match[1])}else d=name==="font"?a(this.font):a(this.value);if(a(this.end))return new tree.Rule(name,d,g);else{k=
+h;h=g}}},"import":function(){var d;if(a(/@import\s+/g)&&(d=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new tree.Import(d,p)},directive:function(){var d,g,i;if(f.charAt(h)==="@")if(g=a(this["import"]))return g;else if(d=a(/@media|@page/g)){i=a(/[^{]+/g).trim();if(g=a(this.block))return new tree.Directive(d+" "+i,g)}else if(d=a(/@[-a-z]+/g))if(d==="@font-face"){if(g=a(this.block))return new tree.Directive(d,g)}else if((g=a(this.entity))&&a(";"))return new tree.Directive(d,g)},font:function(){for(var d=
+[],g=[],i;i=a(this.shorthand)||a(this.entity);)g.push(i);d.push(new tree.Expression(g));if(a(","))for(;i=a(this.expression);){d.push(i);if(!a(","))break}return new tree.Value(d,a(this.important))},value:function(){for(var d,g=[];d=a(this.expression);){g.push(d);if(!a(","))break}d=a(this.important);if(g.length>0)return new tree.Value(g,d)},important:function(){return a(/!\s*important/g)},sub:function(){var d;if(a("(")&&(d=a(this.expression))&&a(")"))return d},multiplication:function(){var d,g,i,m;
+if(d=a(this.operand)){for(;(i=a(/[\/*]/g))&&(g=a(this.operand));)m=new tree.Operation(i,[m||d,g]);return m||d}},addition:function(){var d,g,i,m;if(d=a(this.multiplication)){for(;(i=a(/[-+]\s+/g)||f.charAt(h-1)!=" "&&a(/[-+]/g))&&(g=a(this.multiplication));)m=new tree.Operation(i,[m||d,g]);return m||d}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)},expression:function(){for(var d,g=[];d=a(this.addition)||a(this.entity);)g.push(d);
+if(g.length>0)return new tree.Expression(g)},property:function(){var d;if(d=a(/(\*?-?[-a-z_0-9]+)\s*:/g))return d[1]}}}};less.Parser.importer=null;if(typeof require!=="undefined")tree=require("less/tree");
+tree.functions={rgb:function(b,a,e){return this.rgba(b,a,e,1)},rgba:function(b,a,e,f){b=[b,a,e].map(function(h){return number(h)});f=number(f);return new tree.Color(b,f)},hsl:function(b,a,e){return this.hsla(b,a,e,1)},hsla:function(b,a,e,f){function h(n){n=n<0?n+1:n>1?n-1:n;return n*6<1?k+(l-k)*n*6:n*2<1?l:n*3<2?k+(l-k)*(2/3-n)*6:k}b=(number(b)%360+360)%360/360;a=number(a);e=number(e);f=number(f);var l=e<=0.5?e*(a+1):e+a-e*a,k=e*2-l;return this.rgba(h(b+1/3)*255,h(b)*255,h(b-1/3)*255,f)},saturate:function(b,
a){b=b.toHSL();b.s+=a.value/100;b.s=clamp(b.s);return this.hsl(b.h,b.s,b.l)},desaturate:function(b,a){b=b.toHSL();b.s-=a.value/100;b.s=clamp(b.s);return this.hsl(b.h,b.s,b.l)},lighten:function(b,a){b=b.toHSL();b.l*=1+a.value/100;b.l=clamp(b.l);return this.hsl(b.h,b.s,b.l)},darken:function(b,a){b=b.toHSL();b.l*=1-a.value/100;b.l=clamp(b.l);return this.hsl(b.h,b.s,b.l)},greyscale:function(b){return this.desaturate(b,new tree.Dimension(100))},e:function(b){return new tree.Anonymous(b)},"%":function(b){for(var a=
Array.prototype.slice.call(arguments,1),e=b.content,f=0;f255?255:b<0?0:b).toString(16);return b.length===1?"0"+b:b}).join("")},operate:function(b,a){var e=[];a instanceof tree.Color||(a=a.toColor());for(var f=0;f<3;f++)e[f]=tree.operate(b,this.rgb[f],a.rgb[f]);return new tree.Color(e)},toHSL:function(){var b=this.rgb[0]/255,a=this.rgb[1]/255,e=this.rgb[2]/
-255,f=Math.max(b,a,e),g=Math.min(b,a,e),k,l=(f+g)/2,n=f-g;if(f===g)k=g=0;else{g=l>0.5?n/(2-f-g):n/(f+g);switch(f){case b:k=(a-e)/n+(a0.5?n/(2-f-h):n/(f+h);switch(f){case b:l=(a-e)/n+(a0){for(g=0;g0){for(h=0;h1?Array.prototype.push.apply(e,g.find(new tree.Selector(b.elements.slice(1)),a)):e.push(g);break}});
-return this._lookups[f]=e},toCSS:function(b,a){var e=[],f=[],g=[],k=[];if(this.root){b=[];a={frames:[]};for(var l=0;l0){k=k.map(function(r){return r.map(function(j){return j.toCSS()}).join("").trim()}).join(k.length>
-3?",\n":", ");e.push(k," {\n "+f.join("\n ")+"\n}\n")}e.push(g);a.frames.shift();return e.join("")}};if(typeof require!=="undefined")tree=require("less/tree");tree.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};tree.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false};
+rulesets:function(){return this._rulesets?this._rulesets:(this._rulesets=this.rules.filter(function(b){if(b instanceof tree.Ruleset||b instanceof tree.mixin.Definition)return b}))},find:function(b,a){a=a||this;var e=[],f=b.toCSS();if(f in this._lookups)return this._lookups[f];this.rulesets().forEach(function(h){if(h!==a)for(var l=0;l1?Array.prototype.push.apply(e,h.find(new tree.Selector(b.elements.slice(1)),a)):e.push(h);break}});
+return this._lookups[f]=e},toCSS:function(b,a){var e=[],f=[],h=[],l=[];if(this.root){b=[];a={frames:[]};for(var k=0;k0){l=l.map(function(q){return q.map(function(s){return s.toCSS()}).join("").trim()}).join(l.length>
+3?",\n":", ");e.push(l," {\n "+f.join("\n ")+"\n}\n")}e.push(h);a.frames.shift();return e.join("")}};if(typeof require!=="undefined")tree=require("less/tree");tree.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=" "};tree.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false};
tree.Selector.prototype.toCSS=function(){if(this._css)return this._css;return this._css=this.elements.map(function(b){return typeof b==="string"?" "+b.trim():b.toCSS()}).join("")};if(typeof require!=="undefined")tree=require("less/tree");tree.URL=function(b){this.value=b};tree.URL.prototype={toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(){return this}};if(typeof require!=="undefined")tree=require("less/tree");tree.Variable=function(b,a){this.name=b;this.index=a};
-tree.Variable.prototype={eval:function(b){var a,e,f=this.name;if(a=tree.find(b.frames,function(g){if(e=g.variable(f))return e.value.eval(b)}))return a;else throw{message:"variable "+this.name+" is undefined",index:this.index};}};if(typeof require!=="undefined")tree=exports;tree.find=function(b,a){for(var e=0,f;e=200&&m.status<300)p(m.responseText,m.getResponseHeader("Last-Modified"));else typeof q==="function"&&q(m.status)};m.send(null)}}function g(){if(window.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(j){k("less: browser doesn't support AJAX.");return null}}function k(j){less.env=="development"&&
-typeof console!=="undefined"&&console.log(j)}function l(j,p){var q=document.createElement("div"),m;q.id="less-error-message";q.innerHTML=""+(j.message||"There is an error in your .less file")+'
'+p+" on line "+j.line+", column "+(j.column+1)+":
"+'\n
[-1]{0}
\n
[0]{current}
\n
[1]{2}
\n
'.replace(/\[(-?\d)\]/g,function(d,h){return j.line+parseInt(h)}).replace(/\{(\d)\}/g,
-function(d,h){return j.extract[parseInt(h)]}).replace(/\{current\}/,j.extract[1].slice(0,j.column)+''+j.extract[1].slice(j.column)+"");e("#less-error-message span {margin-right: 15px;}#less-error-message pre {color: #ee4444;padding: 4px 0;margin: 0;}#less-error-message pre.ctx {color: #dd7777;}#less-error-message h3 {padding: 15px 0 5px 0;margin: 0;}#less-error-message a {color: #10a}#less-error-message .error {color: red;font-weight: bold;padding-bottom: 2px;border-bottom: 1px dashed red;}");
-q.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(less.env=="development")m=setInterval(function(){if(document.body){document.body.insertBefore(q,document.body.childNodes[0]);clearInterval(m)}},10)}var n=[];less.env=location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.protocol=="file:"?"development":"production";var r=setInterval(function(){if(document.body){if(!document.querySelectorAll&&
-typeof jQuery==="undefined")k("No selector method found");else n=(document.querySelectorAll||jQuery).call(document,'link[rel="stylesheet/less"]');clearInterval(r);b(function(j,p,q){e(j.toCSS(),p,q.lastModified);q.local?k("less: loading "+p.href+" from local storage."):k("less: parsed "+p.href+" successfully.")})}},10);if(less.env==="development")refreshTimer=setInterval(function(){/!refresh/.test(location.hash)&&b(function(j,p,q){e(j.toCSS(),p,q)})},1E3);less.Parser.importer=function(j,p,q){a({href:j,
-title:j},function(m){q(m)})}})();
+tree.Variable.prototype={eval:function(b){var a,e,f=this.name;if(a=tree.find(b.frames,function(h){if(e=h.variable(f))return e.value.eval(b)}))return a;else throw{message:"variable "+this.name+" is undefined",index:this.index};}};if(typeof require!=="undefined")tree=exports;tree.find=function(b,a){for(var e=0,f;e0&&d.removeChild(d.childNodes[0]);d.appendChild(document.createTextNode(j))}p&&typeof localStorage!=="undefined"&&localStorage.setItem(o.href,JSON.stringify({timestamp:p,css:j}))}function h(j,o,p){var d=l();if(window.location.protocol==="file:"){d.open("GET",j,false);d.send(null);d.status===0?o(d.responseText):p(d.status)}else{d.open("GET",j,true);d.onreadystatechange=function(){if(d.readyState==4)if(d.status>=200&&d.status<300)o(d.responseText,d.getResponseHeader("Last-Modified"));
+else typeof p==="function"&&p(d.status)};d.send(null)}}function l(){if(window.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(j){k("less: browser doesn't support AJAX.");return null}}function k(j){less.env=="development"&&typeof console!=="undefined"&&console.log(j)}function n(j,o){if(!document.getElementById("less-error-message")){var p=document.createElement("div"),d;p.id="less-error-message";p.innerHTML=""+(j.message||"There is an error in your .less file")+
+'
'+o+" on line "+j.line+", column "+(j.column+1)+":
"+'\n
[-1]{0}
\n
[0]{current}
\n
[1]{2}
\n
'.replace(/\[(-?\d)\]/g,function(g,i){return j.line+parseInt(i)}).replace(/\{(\d)\}/g,function(g,i){return j.extract[parseInt(i)]}).replace(/\{current\}/,j.extract[1].slice(0,j.column)+''+j.extract[1].slice(j.column)+"");f("#less-error-message span {margin-right: 15px;}#less-error-message pre {color: #ee4444;padding: 4px 0;margin: 0;}#less-error-message pre.ctx {color: #dd7777;}#less-error-message h3 {padding: 15px 0 5px 0;margin: 0;}#less-error-message a {color: #10a}#less-error-message .error {color: red;font-weight: bold;padding-bottom: 2px;border-bottom: 1px dashed red;}",
+{title:"error-message"});p.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(less.env=="development")d=setInterval(function(){if(document.body){document.body.insertBefore(p,document.body.childNodes[0]);clearInterval(d)}},10)}}var q=[];less.env=location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.protocol=="file:"?"development":"production";
+less.watch=function(){return this.watchMode=true};less.unwatch=function(){return this.watchMode=false};var s=setInterval(function(){if(document.body){q=b('link[rel="stylesheet/less"]');clearInterval(s);a(function(j,o,p){if(p.local)k("less: loading "+o.href+" from local storage.");else{f(j.toCSS(),o,p.lastModified);k("less: parsed "+o.href+" successfully.")}})}},10);if(less.env==="development"&&/!refresh/.test(location.hash))less.watchMode=true;if(less.env==="development")refreshTimer=setInterval(function(){less.watchMode&&
+a(function(j,o,p){j&&f(j.toCSS(),o,p)})},1E3);less.Parser.importer=function(j,o,p){e({href:j,title:j},function(d){p(d)})}})();