Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Updated lesscss to current release 1.1.3 #6

Merged
merged 3 commits into from

3 participants

David Herrmann Olmo Maldonado Konstantin Kudryashov
David Herrmann

I've removed the quite old version 1.0.33 of less and added 1.1.3.
There's also a small fix for the web debug panel in non-webroot environments.

Konstantin Kudryashov everzet merged commit 738e274 into from
Olmo Maldonado ibolmo commented on the diff
lib/less/sfLESS.class.php
((20 lines not shown))
{
- try
- {
- $fs->execute($command, null, array($this, 'throwCompilerError'));
- }
- catch (RuntimeException $e)
- {
- return false;
- }
+ require_once(sfConfig::get('sf_lib_dir').'/vendor/lessc.inc.php');
Olmo Maldonado
ibolmo added a note

Isn't this pointing to {root}/lib/vendor and not to {root}/plugins/sfLESSPlugin/lib/vendor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Olmo Maldonado ibolmo commented on the diff
lib/config/sfLESSConfig.class.php
@@ -67,6 +67,14 @@ public function isClientSideCompilation()
}
/**
+ * @see LESSConfig
+ */
+ public function isUseLessphp()
+ {
+ return sfConfig::get('app_sf_less_plugin_use_lessphp', parent::isClientSideCompilation());
Olmo Maldonado
ibolmo added a note

This should have been $this->isClientSideCompilation() since it skips:


  /**
   * @see LESSConfig
   */
  public function isClientSideCompilation()
  {
    return sfConfig::get('app_sf_less_plugin_use_js', parent::isClientSideCompilation());
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 19, 2011
  1. David Herrmann
Commits on Jul 28, 2011
  1. David Herrmann
Commits on Sep 20, 2011
  1. David Herrmann
This page is out of date. Refresh to see the latest.
19 lib/config/LESSConfig.class.php
View
@@ -49,6 +49,13 @@ class LESSConfig
protected $fixDuplicate = false;
/**
+ * Use lessphp for client-side compilation.
+ *
+ * @var boolean
+ */
+ protected $useLessphp = false;
+
+ /**
* Creates config instance
*
* @param boolean $checkDates whether we check dates before compile
@@ -106,7 +113,7 @@ public function setIsUseCompression($useCompression)
* @return string a path to CSS files directory
*/
public function getCssPaths()
- {
+ {
return 'web/css/';
}
@@ -127,7 +134,7 @@ public function getLessPaths()
*/
public function getLessJsPath()
{
- return '/sfLESSPlugin/js/less-1.0.33.min.js';
+ return '/sfLESSPlugin/js/less-1.1.3.min.js';
}
/**
@@ -139,6 +146,14 @@ public function isClientSideCompilation()
}
/**
+ * @return boolean Whether to use lessphp for client side compilation
+ */
+ public function isUseLessphp()
+ {
+ return $this->useLessphp;
+ }
+
+ /**
* Enable the client side compilation
*
* @param boolean $clientSide Wether to compile on the client side
10 lib/config/sfLESSConfig.class.php
View
@@ -38,7 +38,7 @@ public function isUseCompression()
* @see LESSConfig
*/
public function getCssPaths()
- {
+ {
return sfLESSUtils::getSepFixedPath(sfConfig::get('sf_web_dir')) . '/css/';
}
@@ -67,6 +67,14 @@ public function isClientSideCompilation()
}
/**
+ * @see LESSConfig
+ */
+ public function isUseLessphp()
+ {
+ return sfConfig::get('app_sf_less_plugin_use_lessphp', parent::isClientSideCompilation());
Olmo Maldonado
ibolmo added a note

This should have been $this->isClientSideCompilation() since it skips:


  /**
   * @see LESSConfig
   */
  public function isClientSideCompilation()
  {
    return sfConfig::get('app_sf_less_plugin_use_js', parent::isClientSideCompilation());
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ }
+
+ /**
* @see LESSConfig
*/
public function getFixDuplicate()
3  lib/debug/sfWebDebugPanelLESS.class.php
View
@@ -51,7 +51,8 @@ public static function listenToLoadDebugWebPanelEvent(sfEvent $event)
*/
public function getTitle()
{
- return '<img src="/sfLESSPlugin/images/css_go.png" alt="LESS helper" height="16" width="16" /> less';
+ $path = sfContext::getInstance()->getRequest()->getRelativeUrlRoot();
+ return '<img src="'.$path.'/sfLESSPlugin/images/css_go.png" alt="LESS helper" height="16" width="16" /> less';
}
/**
53 lib/less/sfLESS.class.php
View
@@ -121,7 +121,7 @@ public function findLessFiles()
* Returns CSS file path by its LESS alternative
*
* @param string $lessFile LESS file path
- *
+ *
* @return string CSS file path
*/
public function getCssPathOfLess($lessFile)
@@ -135,7 +135,7 @@ public function getCssPathOfLess($lessFile)
* Compiles LESS file to CSS
*
* @param string $lessFile a LESS file
- *
+ *
* @return boolean true if succesfully compiled & false in other way
*/
public function compile($lessFile)
@@ -152,7 +152,7 @@ public function compile($lessFile)
// If we check dates - recompile only really old CSS
if (self::getConfig()->isCheckDates())
- {
+ {
try
{
$d = new sfLESSDependency(sfConfig::get('sf_web_dir'),
@@ -174,7 +174,7 @@ public function compile($lessFile)
$buffer = $this->callLesscCompiler($lessFile, $cssFile);
if ($buffer !== false)
{
- $isCompiled = $this->writeCssFile($cssFile, $buffer) !== false;
+ $isCompiled = $this->writeCssFile($cssFile, $buffer) !== false;
}
}
@@ -228,32 +228,41 @@ public function writeCssFile($cssFile, $buffer)
*
* @param string $lessFile a LESS file
* @param string $cssFile a CSS file
- *
+ *
* @return string output
*/
public function callLesscCompiler($lessFile, $cssFile)
{
// Setting current file. We will output this var if compiler throws error
$this->currentFile = $lessFile;
-
- // Compile with lessc
- $fs = new sfFilesystem;
- $command = sprintf('lessc "%s" "%s"', $lessFile, $cssFile);
-
- if ('1.3.0' <= SYMFONY_VERSION)
+
+ if (self::getConfig()->isUseLessphp())
{
- try
- {
- $fs->execute($command, null, array($this, 'throwCompilerError'));
- }
- catch (RuntimeException $e)
- {
- return false;
- }
+ require_once(sfConfig::get('sf_lib_dir').'/vendor/lessc.inc.php');
Olmo Maldonado
ibolmo added a note

Isn't this pointing to {root}/lib/vendor and not to {root}/plugins/sfLESSPlugin/lib/vendor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ $less = new lessc($lessFile);
+ file_put_contents($cssFile, $less->parse());
}
else
{
- $fs->sh($command);
+ // Compile with lessc
+ $fs = new sfFilesystem;
+ $command = sprintf('lessc "%s" "%s"', $lessFile, $cssFile);
+
+ if ('1.3.0' <= SYMFONY_VERSION)
+ {
+ try
+ {
+ $fs->execute($command, null, array($this, 'throwCompilerError'));
+ }
+ catch (RuntimeException $e)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ $fs->sh($command);
+ }
}
// Setting current file to null
@@ -261,7 +270,7 @@ public function callLesscCompiler($lessFile, $cssFile)
return file_get_contents($cssFile);
}
-
+
/**
* Returns true if compiler can throw RuntimeException
*
@@ -278,7 +287,7 @@ public function canThrowExceptions()
* Throws formatted compiler error
*
* @param string $line error line
- *
+ *
* @return boolean
*/
public function throwCompilerError($line)
66 web/js/less-1.0.33.min.js
View
@@ -1,66 +0,0 @@
-//
-// LESS - Leaner CSS v1.0.33
-// http://lesscss.org
-//
-// Copyright (c) 2010, Alexis Sellier
-// Licensed under the Apache 2.0 License.
-//
-(function(E){function q(d){return E.less[d.split("/")[1]]}function R(){for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)if(d[b].type.match(S))(new o.Parser).parse(d[b].innerHTML||"",function(e,g){d[b].type="text/css";d[b].innerHTML=g.toCSS()})}function T(d,b){for(var e=0;e<o.sheets.length;e++)U(o.sheets[e],d,b,o.sheets.length-(e+1))}function U(d,b,e,g){var a=d.href.replace(/\?.*$/,""),j=C&&C.getItem(a),h=C&&C.getItem(a+":timestamp"),i={css:j,timestamp:h};$(d.href,function(n,r){if(!e&&
-i&&(new Date(r)).valueOf()===(new Date(i.timestamp)).valueOf()){N(i.css,d);b(null,d,{local:true,remaining:g})}else(new o.Parser({optimization:o.optimization,paths:[a.replace(/[\w\.-]+$/,"")]})).parse(n,function(x,u){if(x)return V(x,a);try{b(u,d,{local:false,lastModified:r,remaining:g});aa(document.getElementById("less-error-message:"+P(a)))}catch(v){V(v,a)}})},function(n,r){throw new Error("Couldn't load "+r+" ("+n+")");})}function P(d){return d.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,
-"").replace(/\.[^\/]+$/,"").replace(/[^\w-]+/g,"-")}function N(d,b,e){var g,a=b.href?b.href.replace(/\?.*$/,""):"",j="less:"+(b.title||P(a));if((g=document.getElementById(j))===null){g=document.createElement("style");g.type="text/css";g.media=b.media;g.id=j;document.getElementsByTagName("head")[0].appendChild(g)}if(g.styleSheet)try{g.styleSheet.cssText=d}catch(h){throw new Error("Couldn't reassign styleSheet.cssText.");}else(function(i){if(g.childNodes.length>0)g.firstChild.nodeValue!==i.nodeValue&&
-g.replaceChild(i,g.firstChild);else g.appendChild(i)})(document.createTextNode(d));if(e&&C){I("saving "+a+" to cache.");C.setItem(a,d);C.setItem(a+":timestamp",e)}}function $(d,b,e){function g(h,i,n){if(h.status>=200&&h.status<300)i(h.responseText,h.getResponseHeader("Last-Modified"));else typeof n==="function"&&n(h.status,d)}var a=ba(),j=O?false:o.async;typeof a.overrideMimeType==="function"&&a.overrideMimeType("text/css");a.open("GET",d,j);a.send(null);if(O)a.status===0?b(a.responseText):e(a.status);
-else if(j)a.onreadystatechange=function(){a.readyState==4&&g(a,b,e)};else g(a,b,e)}function ba(){if(E.XMLHttpRequest)return new XMLHttpRequest;else try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(d){I("browser doesn't support AJAX.");return null}}function aa(d){return d&&d.parentNode.removeChild(d)}function I(d){o.env=="development"&&typeof console!=="undefined"&&console.log("less: "+d)}function V(d,b){var e="less-error-message:"+P(b);if(!d.extract)throw d;var g=document.createElement("div"),
-a;g.id=e;g.className="less-error-message";g.innerHTML="<h3>"+(d.message||"There is an error in your .less file")+'</h3><p><a href="'+b+'">'+b+"</a> on line "+d.line+", column "+(d.column+1)+":</p>"+'<div>\n<pre class="ctx"><span>[-1]</span>{0}</pre>\n<pre><span>[0]</span>{current}</pre>\n<pre class="ctx"><span>[1]</span>{2}</pre>\n</div>'.replace(/\[(-?\d)\]/g,function(j,h){return parseInt(d.line)+parseInt(h)||""}).replace(/\{(\d)\}/g,function(j,h){return d.extract[parseInt(h)]||""}).replace(/\{current\}/,
-d.extract[1].slice(0,d.column)+'<span class="error">'+d.extract[1].slice(d.column)+"</span>");N(".less-error-message span {\nmargin-right: 15px;\n}\n.less-error-message pre {\ncolor: #ee4444;\npadding: 4px 0;\nmargin: 0;\n}\n.less-error-message pre.ctx {\ncolor: #dd7777;\n}\n.less-error-message h3 {\npadding: 15px 0 5px 0;\nmargin: 0;\n}\n.less-error-message a {\ncolor: #10a\n}\n.less-error-message .error {\ncolor: red;\nfont-weight: bold;\npadding-bottom: 2px;\nborder-bottom: 1px dashed red;\n}",
-{title:"error-message"});g.style.cssText="font-family: Arial, sans-serif;border: 1px solid #e00;background-color: #eee;border-radius: 5px;-webkit-border-radius: 5px;-moz-border-radius: 5px;color: #e00;padding: 15px;margin-bottom: 15px";if(o.env=="development")a=setInterval(function(){if(document.body){document.getElementById(e)?document.body.replaceChild(g,document.getElementById(e)):document.body.insertBefore(g,document.body.firstChild);clearInterval(a)}},10)}if(!Array.isArray)Array.isArray=function(d){return Object.prototype.toString.call(d)===
-"[object Array]"||d instanceof Array};if(!Array.prototype.forEach)Array.prototype.forEach=function(d,b){for(var e=this.length>>>0,g=0;g<e;g++)g in this&&d.call(b,this[g],g,this)};if(!Array.prototype.map)Array.prototype.map=function(d,b){for(var e=this.length>>>0,g=new Array(e),a=0;a<e;a++)if(a in this)g[a]=d.call(b,this[a],a,this);return g};if(!Array.prototype.filter)Array.prototype.filter=function(d,b){for(var e=[],g=0;g<this.length;g++)d.call(b,this[g])&&e.push(this[g]);return e};if(!Array.prototype.reduce)Array.prototype.reduce=
-function(d){var b=this.length>>>0,e=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var g=arguments[1];else{do{if(e in this){g=this[e++];break}if(++e>=b)throw new TypeError;}while(1)}for(;e<b;e++)if(e in this)g=d.call(null,g,this[e],e,this);return g};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(d,b){var e=this.length;b=b||0;if(!e)return-1;if(b>=e)return-1;if(b<0)b+=e;for(;b<e;b++)if(Object.prototype.hasOwnProperty.call(this,b))if(d===this[b])return b;return-1};
-if(!Object.keys)Object.keys=function(d){var b=[];for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&b.push(e);return b};if(!String.prototype.trim)String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var o,m;if(typeof E==="undefined"){o=exports;m=q("less/tree")}else{o=E.less={};m=E.less.tree={}}o.Parser=function(d){function b(){r=v[n];H=x=i}function e(){v[n]=r;H=i=x}function g(){if(i>H){v[n]=v[n].slice(i-H);H=i}}function a(f){var k,l,p;if(f instanceof
-Function)return f.call(W.parsers);else if(typeof f==="string"){f=h.charAt(i)===f?f:null;k=1;g()}else{g();if(f=f.exec(v[n]))k=f[0].length;else return null}if(f){mem=i+=k;for(p=i+v[n].length-k;i<p;){l=h.charCodeAt(i);if(!(l===32||l===10||l===9))break;i++}v[n]=v[n].slice(k+(i-mem));H=i;v[n].length===0&&n<v.length-1&&n++;return typeof f==="string"?f:f.length===1?f[0]:f}}function j(f){return typeof f==="string"?h.charAt(i)===f:f.test(v[n])?true:false}var h,i,n,r,x,u,v,H,W,X=function(){},Y=this.imports=
-{paths:d&&d.paths||[],queue:[],files:{},push:function(f,k){var l=this;this.queue.push(f);o.Parser.importer(f,this.paths,function(p){l.queue.splice(l.queue.indexOf(f),1);l.files[f]=p;k(p);l.queue.length===0&&X()})}};this.env=d=d||{};this.optimization="optimization"in this.env?this.env.optimization:1;this.env.filename=this.env.filename||null;return W={imports:Y,parse:function(f,k){var l,p,K=null;i=n=H=u=0;v=[];h=f.replace(/\r\n/g,"\n");v=function(L){for(var F=0,G=/[^"'`\{\}\/]+/g,z=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,
-A=0,w,y=L[0],B,s=0,t;s<h.length;s++){G.lastIndex=s;if(w=G.exec(h))if(w.index===s){s+=w[0].length;y.push(w[0])}t=h.charAt(s);z.lastIndex=s;if(!B&&t==="/"){w=h.charAt(s+1);if(w==="/"||w==="*")if(w=z.exec(h))if(w.index===s){s+=w[0].length;y.push(w[0]);t=h.charAt(s)}}if(t==="{"&&!B){A++;y.push(t)}else if(t==="}"&&!B){A--;y.push(t);L[++F]=y=[]}else{if(t==='"'||t==="'"||t==="`")B=B?B===t?false:B:t;y.push(t)}}if(A>0)throw new Error("Missing closing '}'");return L.map(function(D){return D.join("")})}([[]]);
-l=new m.Ruleset([],a(this.parsers.primary));l.root=true;l.toCSS=function(L){var F,G;return function(z,A){function w(t){return t?(h.slice(0,t).match(/\n/g)||"").length:null}var y=[];z=z||{};if(typeof A==="object"&&!Array.isArray(A)){A=Object.keys(A).map(function(t){var D=A[t];if(!(D instanceof m.Value)){D instanceof m.Expression||(D=new m.Expression([D]));D=new m.Value([D])}return new m.Rule("@"+t,D,false,0)});y=[new m.Ruleset(null,A)]}try{var B=L.call(this,{frames:y}).toCSS([],{compress:z.compress||
-false})}catch(s){G=h.split("\n");F=w(s.index);z=s.index;for(y=-1;z>=0&&h.charAt(z)!=="\n";z--)y++;throw{type:s.type,message:s.message,filename:d.filename,index:s.index,line:typeof F==="number"?F+1:null,callLine:s.call&&w(s.call)+1,callExtract:G[w(s.call)],stack:s.stack,column:y,extract:[G[F-1],G[F],G[F+1]]};}return z.compress?B.replace(/(\s)+/g,"$1"):B}}(l.eval);if(i<h.length-1){i=u;p=h.split("\n");f=(h.slice(0,i).match(/\n/g)||"").length+1;for(var Q=i,Z=-1;Q>=0&&h.charAt(Q)!=="\n";Q--)Z++;K={name:"ParseError",
-message:"Syntax Error on line "+f,filename:d.filename,line:f,column:Z,extract:[p[f-2],p[f-1],p[f]]}}if(this.imports.queue.length>0)X=function(){k(K,l)};else k(K,l)},parsers:{primary:function(){for(var f,k=[];(f=a(this.mixin.definition)||a(this.rule)||a(this.ruleset)||a(this.mixin.call)||a(this.comment)||a(this.directive))||a(/^[\s\n]+/);)f&&k.push(f);return k},comment:function(){var f;if(h.charAt(i)==="/")if(h.charAt(i+1)==="/")return new m.Comment(a(/^\/\/.*/),true);else if(f=a(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new m.Comment(f)},
-entities:{quoted:function(){var f;if(!(h.charAt(i)!=='"'&&h.charAt(i)!=="'"))if(f=a(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new m.Quoted(f[0],f[1]||f[2])},keyword:function(){var f;if(f=a(/^[A-Za-z-]+/))return new m.Keyword(f)},call:function(){var f,k;if(f=/^([\w-]+|%)\(/.exec(v[n])){f=f[1].toLowerCase();if(f==="url")return null;else i+=f.length+1;if(f==="alpha")return a(this.alpha);k=a(this.entities.arguments);if(a(")"))if(f)return new m.Call(f,k)}},arguments:function(){for(var f=
-[],k;k=a(this.expression);){f.push(k);if(!a(","))break}return f},literal:function(){return a(this.entities.dimension)||a(this.entities.color)||a(this.entities.quoted)},url:function(){var f;if(!(h.charAt(i)!=="u"||!a(/^url\(/))){f=a(this.entities.quoted)||a(this.entities.variable)||a(/^[-\w%@$\/.&=:;#+?]+/);if(!a(")"))throw new Error("missing closing ) for url()");return new m.URL(f.value||f instanceof m.Variable?f:new m.Anonymous(f))}},variable:function(){var f,k=i;if(h.charAt(i)==="@"&&(f=a(/^@[\w-]+/)))return new m.Variable(f,
-k)},color:function(){var f;if(h.charAt(i)==="#"&&(f=a(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new m.Color(f[1])},dimension:function(){var f;f=h.charCodeAt(i);if(!(f>57||f<45||f===47))if(f=a(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm)?/))return new m.Dimension(f[1],f[2])},javascript:function(){var f;if(h.charAt(i)==="`")if(f=a(/^`([^`]*)`/))return new m.JavaScript(f[1],i)}},variable:function(){var f;if(h.charAt(i)==="@"&&(f=a(/^(@[\w-]+)\s*:/)))return f[1]},shorthand:function(){var f,
-k;if(j(/^[@\w.%-]+\/[@\w.-]+/))if((f=a(this.entity))&&a("/")&&(k=a(this.entity)))return new m.Shorthand(f,k)},mixin:{call:function(){var f=[],k,l,p,K=i;k=h.charAt(i);if(!(k!=="."&&k!=="#")){for(;k=a(/^[#.][\w-]+/);){f.push(new m.Element(l,k));l=a(">")}a("(")&&(p=a(this.entities.arguments))&&a(")");if(f.length>0&&(a(";")||j("}")))return new m.mixin.Call(f,p,K)}},definition:function(){var f,k=[],l,p;if(!(h.charAt(i)!=="."&&h.charAt(i)!=="#"||j(/^[^{]*(;|})/)))if(f=a(/^([#.][\w-]+)\s*\(/)){for(f=f[1];l=
-a(this.entities.variable)||a(this.entities.literal)||a(this.entities.keyword);){if(l instanceof m.Variable)if(a(":"))if(p=a(this.expression))k.push({name:l.name,value:p});else throw new Error("Expected value");else k.push({name:l.name});else k.push({value:l});if(!a(","))break}if(!a(")"))throw new Error("Expected )");if(l=a(this.block))return new m.mixin.Definition(f,k,l)}}},entity:function(){return a(this.entities.literal)||a(this.entities.variable)||a(this.entities.url)||a(this.entities.call)||a(this.entities.keyword)||
-a(this.entities.javascript)},end:function(){return a(";")||j("}")},alpha:function(){var f;if(a(/^opacity=/i))if(f=a(/^\d+/)||a(this.entities.variable)){if(!a(")"))throw new Error("missing closing ) for alpha()");return new m.Alpha(f)}},element:function(){var f;c=a(this.combinator);if(f=a(/^[.#:]?[\w-]+/)||a("*")||a(this.attribute)||a(/^\([^)@]+\)/))return new m.Element(c,f)},combinator:function(){var f=h.charAt(i);if(f===">"||f==="&"||f==="+"||f==="~"){for(i++;h.charAt(i)===" ";)i++;return new m.Combinator(f)}else if(f===
-":"&&h.charAt(i+1)===":"){for(i+=2;h.charAt(i)===" ";)i++;return new m.Combinator("::")}else return h.charAt(i-1)===" "?new m.Combinator(" "):new m.Combinator(null)},selector:function(){for(var f,k=[],l;f=a(this.element);){l=h.charAt(i);k.push(f);if(l==="{"||l==="}"||l===";"||l===",")break}if(k.length>0)return new m.Selector(k)},tag:function(){return a(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||a("*")},attribute:function(){var f="",k,l,p;if(a("[")){if(k=a(/^[a-z-]+/)||a(this.entities.quoted))f=(p=a(/^[|~*$^]?=/))&&
-(l=a(this.entities.quoted)||a(/^[\w-]+/))?[k,p,l.toCSS?l.toCSS():l].join(""):k;if(a("]"))if(f)return"["+f+"]"}},block:function(){var f;if(a("{")&&(f=a(this.primary))&&a("}"))return f},ruleset:function(){var f=[],k,l;b();if(k=/^([.#: \w-]+)[\s\n]*\{/.exec(v[n])){i+=k[0].length-1;f=[new m.Selector([new m.Element(null,k[1])])]}else{for(;k=a(this.selector);){f.push(k);if(!a(","))break}k&&a(this.comment)}if(f.length>0&&(l=a(this.block)))return new m.Ruleset(f,l);else{u=i;e()}},rule:function(){var f;f=
-h.charAt(i);var k;b();if(!(f==="."||f==="#"||f==="&"))if(name=a(this.variable)||a(this.property)){if(name.charAt(0)!="@"&&(match=/^([^@+\/'"*`(;{}-]*);/.exec(v[n]))){i+=match[0].length-1;f=new m.Anonymous(match[1])}else f=name==="font"?a(this.font):a(this.value);k=a(this.important);if(f&&a(this.end))return new m.Rule(name,f,k,x);else{u=i;e()}}},"import":function(){var f;if(a(/^@import\s+/)&&(f=a(this.entities.quoted)||a(this.entities.url))&&a(";"))return new m.Import(f,Y)},directive:function(){var f,
-k,l;if(h.charAt(i)==="@")if(k=a(this["import"]))return k;else if(f=a(/^@media|@page/)){l=a(/^[^{]+/).trim();if(k=a(this.block))return new m.Directive(f+" "+l,k)}else if(f=a(/^@[-a-z]+/))if(f==="@font-face"){if(k=a(this.block))return new m.Directive(f,k)}else if((k=a(this.entity))&&a(";"))return new m.Directive(f,k)},font:function(){for(var f=[],k=[],l;l=a(this.shorthand)||a(this.entity);)k.push(l);f.push(new m.Expression(k));if(a(","))for(;l=a(this.expression);){f.push(l);if(!a(","))break}return new m.Value(f)},
-value:function(){for(var f,k=[];f=a(this.expression);){k.push(f);if(!a(","))break}if(k.length>0)return new m.Value(k)},important:function(){if(h.charAt(i)==="!")return a(/^! *important/)},sub:function(){var f;if(a("(")&&(f=a(this.expression))&&a(")"))return f},multiplication:function(){var f,k,l,p;if(f=a(this.operand)){for(;(l=a("/")||a("*"))&&(k=a(this.operand));)p=new m.Operation(l,[p||f,k]);return p||f}},addition:function(){var f,k,l,p;if(f=a(this.multiplication)){for(;(l=a(/^[-+]\s+/)||h.charAt(i-
-1)!=" "&&(a("+")||a("-")))&&(k=a(this.multiplication));)p=new m.Operation(l,[p||f,k]);return p||f}},operand:function(){return a(this.sub)||a(this.entities.dimension)||a(this.entities.color)||a(this.entities.variable)||a(this.entities.call)},expression:function(){for(var f,k=[];f=a(this.addition)||a(this.entity);)k.push(f);if(k.length>0)return new m.Expression(k)},property:function(){var f;if(f=a(/^(\*?-?[-a-z_0-9]+)\s*:/))return f[1]}}}};if(typeof E!=="undefined")o.Parser.importer=function(d,b,e){if(d.charAt(0)!==
-"/"&&b.length>0)d=b[0]+d;U({href:d,title:d},e,true)};(function(d){function b(a){return d.functions.hsla(a.h,a.s,a.l,a.a)}function e(a){if(a instanceof d.Dimension)return parseFloat(a.unit=="%"?a.value/100:a.value);else if(typeof a==="number")return a;else throw{error:"RuntimeError",message:"color functions take numbers as parameters"};}function g(a){return Math.min(1,Math.max(0,a))}d.functions={rgb:function(a,j,h){return this.rgba(a,j,h,1)},rgba:function(a,j,h,i){a=[a,j,h].map(function(n){return e(n)});
-i=e(i);return new d.Color(a,i)},hsl:function(a,j,h){return this.hsla(a,j,h,1)},hsla:function(a,j,h,i){function n(u){u=u<0?u+1:u>1?u-1:u;return u*6<1?x+(r-x)*u*6:u*2<1?r:u*3<2?x+(r-x)*(2/3-u)*6:x}a=e(a)%360/360;j=e(j);h=e(h);i=e(i);var r=h<=0.5?h*(j+1):h+j-h*j,x=h*2-r;return this.rgba(n(a+1/3)*255,n(a)*255,n(a-1/3)*255,i)},hue:function(a){return new d.Dimension(Math.round(a.toHSL().h))},saturation:function(a){return new d.Dimension(Math.round(a.toHSL().s*100),"%")},lightness:function(a){return new d.Dimension(Math.round(a.toHSL().l*
-100),"%")},alpha:function(a){return new d.Dimension(a.toHSL().a)},saturate:function(a,j){a=a.toHSL();a.s+=j.value/100;a.s=g(a.s);return b(a)},desaturate:function(a,j){a=a.toHSL();a.s-=j.value/100;a.s=g(a.s);return b(a)},lighten:function(a,j){a=a.toHSL();a.l+=j.value/100;a.l=g(a.l);return b(a)},darken:function(a,j){a=a.toHSL();a.l-=j.value/100;a.l=g(a.l);return b(a)},spin:function(a,j){a=a.toHSL();j=(a.h+j.value)%360;a.h=j<0?360+j:j;return b(a)},greyscale:function(a){return this.desaturate(a,new d.Dimension(100))},
-e:function(a){return new d.Anonymous(a instanceof d.JavaScript?a.evaluated:a)},"%":function(a){for(var j=Array.prototype.slice.call(arguments,1),h=a.content,i=0;i<j.length;i++)h=h.replace(/%s/,j[i].content).replace(/%[da]/,j[i].toCSS());h=h.replace(/%%/g,"%");return new d.Quoted('"'+h+'"',h)}}})(q("less/tree"));(function(d){d.Alpha=function(b){this.value=b};d.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(){return this}}})(q("less/tree"));
-(function(d){d.Anonymous=function(b){this.value=b.content||b};d.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(q("less/tree"));(function(d){d.Call=function(b,e){this.name=b;this.args=e};d.Call.prototype={eval:function(b){var e=this.args.map(function(g){return g.eval(b)});return this.name in d.functions?d.functions[this.name].apply(d.functions,e):new d.Anonymous(this.name+"("+e.map(function(g){return g.toCSS()}).join(", ")+")")},toCSS:function(b){return this.eval(b).toCSS()}}})(q("less/tree"));
-(function(d){d.Color=function(b,e){this.rgb=Array.isArray(b)?b:b.length==6?b.match(/.{2}/g).map(function(g){return parseInt(g,16)}):b.split("").map(function(g){return parseInt(g+g,16)});this.alpha=typeof e==="number"?e:1};d.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(b){return Math.round(b)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(b){b=Math.round(b);b=(b>255?255:b<0?0:b).toString(16);return b.length===1?"0"+
-b:b}).join("")},operate:function(b,e){var g=[];e instanceof d.Color||(e=e.toColor());for(var a=0;a<3;a++)g[a]=d.operate(b,this.rgb[a],e.rgb[a]);return new d.Color(g)},toHSL:function(){var b=this.rgb[0]/255,e=this.rgb[1]/255,g=this.rgb[2]/255,a=this.alpha,j=Math.max(b,e,g),h=Math.min(b,e,g),i,n=(j+h)/2,r=j-h;if(j===h)i=h=0;else{h=n>0.5?r/(2-j-h):r/(j+h);switch(j){case b:i=(e-g)/r+(e<g?6:0);break;case e:i=(g-b)/r+2;break;case g:i=(b-e)/r+4;break}i/=6}return{h:i*360,s:h,l:n,a:a}}}})(q("less/tree"));
-(function(d){d.Comment=function(b,e){this.value=b;this.silent=!!e};d.Comment.prototype={toCSS:function(b){return b.compress?"":this.value},eval:function(){return this}}})(q("less/tree"));(function(d){d.Dimension=function(b,e){this.value=parseFloat(b);this.unit=e||null};d.Dimension.prototype={eval:function(){return this},toColor:function(){return new d.Color([this.value,this.value,this.value])},toCSS:function(){return this.value+this.unit},operate:function(b,e){return new d.Dimension(d.operate(b,this.value,
-e.value),this.unit||e.unit)}}})(q("less/tree"));(function(d){d.Directive=function(b,e){this.name=b;if(Array.isArray(e))this.ruleset=new d.Ruleset([],e);else this.value=e};d.Directive.prototype={toCSS:function(b,e){if(this.ruleset){this.ruleset.root=true;return this.name+(e.compress?"{":" {\n ")+this.ruleset.toCSS(b,e).trim().replace(/\n/g,"\n ")+(e.compress?"}":"\n}\n")}else return this.name+" "+this.value.toCSS()+";\n"},eval:function(b){b.frames.unshift(this);this.ruleset=this.ruleset&&this.ruleset.eval(b);
-b.frames.shift();return this},variable:function(b){return d.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return d.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return d.Ruleset.prototype.rulesets.apply(this.ruleset)}}})(q("less/tree"));(function(d){d.Element=function(b,e){this.combinator=b instanceof d.Combinator?b:new d.Combinator(b);this.value=e.trim()};d.Element.prototype.toCSS=function(b){return this.combinator.toCSS(b||{})+this.value};d.Combinator=
-function(b){this.value=b===" "?" ":b?b.trim():""};d.Combinator.prototype.toCSS=function(b){return{"":""," ":" ","&":"",":":" :","::":"::","+":b.compress?"+":" + ","~":b.compress?"~":" ~ ",">":b.compress?">":" > "}[this.value]}})(q("less/tree"));(function(d){d.Expression=function(b){this.value=b};d.Expression.prototype={eval:function(b){return this.value.length>1?new d.Expression(this.value.map(function(e){return e.eval(b)})):this.value[0].eval(b)},toCSS:function(b){return this.value.map(function(e){return e.toCSS(b)}).join(" ")}}})(q("less/tree"));
-(function(d){d.Import=function(b,e){var g=this;this._path=b;this.path=b instanceof d.Quoted?/\.(le?|c)ss$/.test(b.content)?b.content:b.content+".less":b.value.content||b.value;(this.css=/css$/.test(this.path))||e.push(this.path,function(a){if(!a)throw new Error("Error parsing "+g.path);g.root=a})};d.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var e;if(this.css)return this;else{e=new d.Ruleset(null,this.root.rules.slice(0));for(var g=
-0;g<e.rules.length;g++)e.rules[g]instanceof d.Import&&Array.prototype.splice.apply(e.rules,[g,1].concat(e.rules[g].eval(b)));return e.rules}}}})(q("less/tree"));(function(d){d.JavaScript=function(b,e){this.expression=b;this.index=e};d.JavaScript.prototype={toCSS:function(){return JSON.stringify(this.evaluated)},eval:function(b){var e=new Function("return ("+this.expression+")"),g={};for(var a in b.frames[0].variables())g[a.slice(1)]={value:b.frames[0].variables()[a].value,toJS:function(){return this.value.eval(b).toCSS()}};
-try{this.evaluated=e.call(g)}catch(j){throw{message:"JavaScript evaluation error: '"+j.name+": "+j.message+"'",index:this.index};}return this}}})(q("less/tree"));(function(d){d.Keyword=function(b){this.value=b};d.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value}}})(q("less/tree"));(function(d){d.mixin={};d.mixin.Call=function(b,e,g){this.selector=new d.Selector(b);this.arguments=e;this.index=g};d.mixin.Call.prototype={eval:function(b){for(var e,g=[],a=false,j=0;j<
-b.frames.length;j++)if((e=b.frames[j].find(this.selector)).length>0){for(j=0;j<e.length;j++)if(e[j].match(this.arguments,b))try{Array.prototype.push.apply(g,e[j].eval(b,this.arguments).rules);a=true}catch(h){throw{message:h.message,index:h.index,stack:h.stack,call:this.index};}if(a)return g;else throw{message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(i){return i.toCSS()}).join(", ")+")`",index:this.index};}throw{message:this.selector.toCSS().trim()+
-" is undefined",index:this.index};}};d.mixin.Definition=function(b,e,g){this.name=b;this.selectors=[new d.Selector([new d.Element(null,b)])];this.params=e;this.arity=e.length;this.rules=g;this._lookups={};this.required=e.reduce(function(a,j){return j.name&&!j.value?a+1:a},0);this.parent=d.Ruleset.prototype;this.frames=[]};d.mixin.Definition.prototype={toCSS:function(){return""},variable:function(b){return this.parent.variable.call(this,b)},variables:function(){return this.parent.variables.call(this)},
-find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},eval:function(b,e){for(var g=new d.Ruleset(null,[]),a=0,j;a<this.params.length;a++)if(this.params[a].name)if(j=e&&e[a]||this.params[a].value)g.rules.unshift(new d.Rule(this.params[a].name,j.eval(b)));else throw{message:"wrong number of arguments for "+this.name+" ("+e.length+" for "+this.arity+")"};return(new d.Ruleset(null,this.rules.slice(0))).eval({frames:[this,g].concat(this.frames,
-b.frames)})},match:function(b,e){var g=b&&b.length||0;if(g<this.required)return false;g=Math.min(g,this.arity);for(var a=0;a<g;a++)if(!this.params[a].name)if(b[a].eval(e).toCSS()!=this.params[a].value.eval(e).toCSS())return false;return true}}})(q("less/tree"));(function(d){d.Operation=function(b,e){this.op=b.trim();this.operands=e};d.Operation.prototype.eval=function(b){var e=this.operands[0].eval(b);b=this.operands[1].eval(b);var g;if(e instanceof d.Dimension&&b instanceof d.Color)if(this.op===
-"*"||this.op==="+"){g=b;b=e;e=g}else throw{name:"OperationError",message:"Can't substract or divide a color from a number"};return e.operate(this.op,b)};d.operate=function(b,e,g){switch(b){case "+":return e+g;case "-":return e-g;case "*":return e*g;case "/":return e/g}}})(q("less/tree"));(function(d){d.Quoted=function(b,e){this.value=b;this.content=e};d.Quoted.prototype={toCSS:function(){return this.value},eval:function(){return this}}})(q("less/tree"));(function(d){d.Rule=function(b,e,g,a){this.name=
-b;this.value=e instanceof d.Value?e:new d.Value([e]);this.important=g?" "+g.trim():"";this.index=a;this.variable=b.charAt(0)==="@"?true:false};d.Rule.prototype.toCSS=function(b){return this.variable?"":this.name+(b.compress?":":": ")+this.value.toCSS(b)+this.important+";"};d.Rule.prototype.eval=function(b){return new d.Rule(this.name,this.value.eval(b),this.important,this.index)};d.Shorthand=function(b,e){this.a=b;this.b=e};d.Shorthand.prototype={toCSS:function(b){return this.a.toCSS(b)+"/"+this.b.toCSS(b)},
-eval:function(){return this}}})(q("less/tree"));(function(d){d.Ruleset=function(b,e){this.selectors=b;this.rules=e;this._lookups={}};d.Ruleset.prototype={eval:function(b){var e=new d.Ruleset(this.selectors,this.rules.slice(0));e.root=this.root;b.frames.unshift(e);if(e.root)for(var g=0;g<e.rules.length;g++)e.rules[g]instanceof d.Import&&Array.prototype.splice.apply(e.rules,[g,1].concat(e.rules[g].eval(b)));for(g=0;g<e.rules.length;g++)if(e.rules[g]instanceof d.mixin.Definition)e.rules[g].frames=b.frames.slice(0);
-for(g=0;g<e.rules.length;g++)e.rules[g]instanceof d.mixin.Call&&Array.prototype.splice.apply(e.rules,[g,1].concat(e.rules[g].eval(b)));g=0;for(var a;g<e.rules.length;g++){a=e.rules[g];a instanceof d.mixin.Definition||(e.rules[g]=a.eval?a.eval(b):a)}b.frames.shift();return e},match:function(b){return!b||b.length===0},variables:function(){return this._variables?this._variables:(this._variables=this.rules.reduce(function(b,e){if(e instanceof d.Rule&&e.variable===true)b[e.name]=e;return b},{}))},variable:function(b){return this.variables()[b]},
-rulesets:function(){return this._rulesets?this._rulesets:(this._rulesets=this.rules.filter(function(b){return b instanceof d.Ruleset||b instanceof d.mixin.Definition}))},find:function(b,e){e=e||this;var g=[],a=b.toCSS();if(a in this._lookups)return this._lookups[a];this.rulesets().forEach(function(j){if(j!==e)for(var h=0;h<j.selectors.length;h++)if(b.match(j.selectors[h])){b.elements.length>1?Array.prototype.push.apply(g,j.find(new d.Selector(b.elements.slice(1)),e)):g.push(j);break}});return this._lookups[a]=
-g},toCSS:function(b,e){var g=[],a=[],j=[],h=[];if(!this.root)if(b.length===0)h=this.selectors.map(function(r){return[r]});else for(var i=0;i<this.selectors.length;i++)for(var n=0;n<b.length;n++)h.push(b[n].concat([this.selectors[i]]));for(i=0;i<this.rules.length;i++){b=this.rules[i];if(b.rules||b instanceof d.Directive)j.push(b.toCSS(h,e));else if(b instanceof d.Comment)b.silent||(this.root?j.push(b.toCSS(e)):a.push(b.toCSS(e)));else if(b.toCSS&&!b.variable)a.push(b.toCSS(e));else b.value&&!b.variable&&
-a.push(b.value.toString())}j=j.join("");if(this.root)g.push(a.join(e.compress?"":"\n"));else if(a.length>0){h=h.map(function(r){return r.map(function(x){return x.toCSS(e)}).join("").trim()}).join(e.compress?",":h.length>3?",\n":", ");g.push(h,(e.compress?"{":" {\n ")+a.join(e.compress?"":"\n ")+(e.compress?"}":"\n}\n"))}g.push(j);return g.join("")+(e.compress?"\n":"")}}})(q("less/tree"));(function(d){d.Selector=function(b){this.elements=b;if(this.elements[0].combinator.value==="")this.elements[0].combinator.value=
-" "};d.Selector.prototype.match=function(b){return this.elements[0].value===b.elements[0].value?true:false};d.Selector.prototype.toCSS=function(b){if(this._css)return this._css;return this._css=this.elements.map(function(e){return typeof e==="string"?" "+e.trim():e.toCSS(b)}).join("")}})(q("less/tree"));(function(d){d.URL=function(b){this.value=b};d.URL.prototype={toCSS:function(){return"url("+this.value.toCSS()+")"},eval:function(b){this.value=this.value.eval(b);return this}}})(q("less/tree"));(function(d){d.Value=
-function(b){this.value=b;this.is="value"};d.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new d.Value(this.value.map(function(e){return e.eval(b)}))},toCSS:function(b){return this.value.map(function(e){return e.toCSS(b)}).join(b.compress?",":", ")}}})(q("less/tree"));(function(d){d.Variable=function(b,e){this.name=b;this.index=e};d.Variable.prototype={eval:function(b){var e,g,a=this.name;if(e=d.find(b.frames,function(j){if(g=j.variable(a))return g.value.eval(b)}))return e;
-else throw{message:"variable "+this.name+" is undefined",index:this.index};}}})(q("less/tree"));q("less/tree").find=function(d,b){for(var e=0,g;e<d.length;e++)if(g=b.call(d,d[e]))return g;return null};var O=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="resource:";o.env=location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||O?"development":"production";o.async=false;o.poll=O?1E3:1500;o.watch=function(){return this.watchMode=
-true};o.unwatch=function(){return this.watchMode=false};if(o.env==="development"){o.optimization=0;/!watch/.test(location.hash)&&o.watch();o.watchTimer=setInterval(function(){o.watchMode&&T(function(d,b,e){d&&N(d.toCSS(),b,e.lastModified)})},o.poll)}else o.optimization=3;var C;try{C=typeof E.localStorage==="undefined"?null:E.localStorage}catch(ca){C=null}var M=document.getElementsByTagName("link"),S=/^text\/(x-)?less$/;o.sheets=[];for(var J=0;J<M.length;J++)if(M[J].rel==="stylesheet/less"||M[J].rel.match(/stylesheet/)&&
-M[J].type.match(S))o.sheets.push(M[J]);o.refresh=function(d){var b=endTime=new Date;T(function(e,g,a){if(a.local)I("loading "+g.href+" from cache.");else{I("parsed "+g.href+" successfully.");N(e.toCSS(),g,a.lastModified)}I("css for "+g.href+" generated in "+(new Date-endTime)+"ms");a.remaining===0&&I("css generated in "+(new Date-b)+"ms");endTime=new Date},d);R()};o.refreshStyles=R;o.refresh(o.env==="development")})(window);
16 web/js/less-1.1.3.min.js
View
@@ -0,0 +1,16 @@
+//
+// LESS - Leaner CSS v1.1.3
+// http://lesscss.org
+//
+// Copyright (c) 2009-2011, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+//
+// LESS - Leaner CSS v1.1.3
+// http://lesscss.org
+//
+// Copyright (c) 2009-2011, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+(function(a,b){function v(a,b){var c="less-error-message:"+p(b),e=["<ul>",'<li><label>[-1]</label><pre class="ctx">{0}</pre></li>',"<li><label>[0]</label><pre>{current}</pre></li>",'<li><label>[1]</label><pre class="ctx">{2}</pre></li>',"</ul>"].join("\n"),f=document.createElement("div"),g,h;f.id=c,f.className="less-error-message",h="<h3>"+(a.message||"There is an error in your .less file")+"</h3>"+'<p><a href="'+b+'">'+b+"</a> ",a.extract&&(h+="on line "+a.line+", column "+(a.column+1)+":</p>"+e.replace(/\[(-?\d)\]/g,function(b,c){return parseInt(a.line)+parseInt(c)||""}).replace(/\{(\d)\}/g,function(b,c){return a.extract[parseInt(c)]||""}).replace(/\{current\}/,a.extract[1].slice(0,a.column)+'<span class="error">'+a.extract[1].slice(a.column)+"</span>")),f.innerHTML=h,q([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #ee4444;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.ctx {","color: #dd4444;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","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;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}function u(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function t(a){return a&&a.parentNode.removeChild(a)}function s(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){u("browser doesn't support AJAX.");return null}}function r(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var f=s(),h=g?!1:d.async;typeof f.overrideMimeType=="function"&&f.overrideMimeType("text/css"),f.open("GET",a,h),f.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),f.send(null),g?f.status===0?c(f.responseText):e(f.status,a):h?f.onreadystatechange=function(){f.readyState==4&&i(f,c,e)}:i(f,c,e)}function q(a,b,c){var d,e=b.href?b.href.replace(/\?.*$/,""):"",f="less:"+(b.title||p(e));(d=document.getElementById(f))===null&&(d=document.createElement("style"),d.type="text/css",d.media=b.media||"screen",d.id=f,document.getElementsByTagName("head")[0].appendChild(d));if(d.styleSheet)try{d.styleSheet.cssText=a}catch(g){throw new Error("Couldn't reassign styleSheet.cssText.")}else(function(a){d.childNodes.length>0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&h&&(u("saving "+e+" to cache."),h.setItem(e,a),h.setItem(e+":timestamp",c))}function p(a){return a.replace(/^[a-z]+:\/\/?[^\/]+/,"").replace(/^\//,"").replace(/\?.*$/,"").replace(/\.[^\.\/]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")}function o(b,c,e,f){var g=a.location.href.replace(/[#?].*$/,""),i=b.href.replace(/\?.*$/,""),j=h&&h.getItem(i),k=h&&h.getItem(i+":timestamp"),l={css:j,timestamp:k};/^(https?|file):/.test(i)||(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=g.slice(0,g.lastIndexOf("/")+1)+i),r(b.href,b.type,function(a,g){if(!e&&l&&g&&(new Date(g)).valueOf()===(new Date(l.timestamp)).valueOf())q(l.css,b),c(null,b,{local:!0,remaining:f});else try{(new d.Parser({optimization:d.optimization,paths:[i.replace(/[\w\.-]+$/,"")],mime:b.type})).parse(a,function(a,d){if(a)return v(a,i);try{c(d,b,{local:!1,lastModified:g,remaining:f}),t(document.getElementById("less-error-message:"+p(i)))}catch(a){v(a,i)}})}catch(h){v(h,i)}},function(a,b){throw new Error("Couldn't load "+b+" ("+a+")")})}function n(a,b){for(var c=0;c<d.sheets.length;c++)o(d.sheets[c],a,b,d.sheets.length-(c+1))}function m(){var a=document.getElementsByTagName("style");for(var b=0;b<a.length;b++)a[b].type.match(k)&&(new d.Parser).parse(a[b].innerHTML||"",function(c,d){a[b].type="text/css",a[b].innerHTML=d.toCSS()})}function c(b){return a.less[b.split("/")[1]]}Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"||a instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=this.length>>>0;for(var d=0;d<c;d++)d in this&&a.call(b,this[d],d,this)}),Array.prototype.map||(Array.prototype.map=function(a){var b=this.length>>>0,c=Array(b),d=arguments[1];for(var e=0;e<b;e++)e in this&&(c[e]=a.call(d,this[e],e,this));return c}),Array.prototype.filter||(Array.prototype.filter=function(a){var b=[],c=arguments[1];for(var d=0;d<this.length;d++)a.call(c,this[d])&&b.push(this[d]);return b}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=this.length>>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else for(;;){if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}for(;c<b;c++)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length,c=arguments[1]||0;if(!b)return-1;if(c>=b)return-1;c<0&&(c+=b);for(;c<b;c++){if(!Object.prototype.hasOwnProperty.call(this,c))continue;if(a===this[c])return c}return-1}),Object.keys||(Object.keys=function(a){var b=[];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c);return b}),String.prototype.trim||(String.prototype.trim=function(){return String(this).replace(/^\s\s*/,"").replace(/\s\s*$/,"")});var d,e;typeof a=="undefined"?(d=exports,e=c("less/tree")):(typeof a.less=="undefined"&&(a.less={}),d=a.less,e=a.less.tree={}),d.Parser=function(a){function t(a){return typeof a=="string"?b.charAt(c)===a:a.test(j[f])?!0:!1}function s(a){var d,e,g,h,i,m,n,o;if(a instanceof Function)return a.call(l.parsers);if(typeof a=="string")d=b.charAt(c)===a?a:null,g=1,r();else{r();if(d=a.exec(j[f]))g=d[0].length;else return null}if(d){o=c+=g,m=c+j[f].length-g;while(c<m){h=b.charCodeAt(c);if(h!==32&&h!==10&&h!==9)break;c++}j[f]=j[f].slice(g+(c-o)),k=c,j[f].length===0&&f<j.length-1&&f++;return typeof d=="string"?d:d.length===1?d[0]:d}}function r(){c>k&&(j[f]=j[f].slice(c-k),k=c)}function q(){j[f]=g,c=h,k=c}function p(){g=j[f],h=c,k=c}var b,c,f,g,h,i,j,k,l,m=this,n=function(){},o=this.imports={paths:a&&a.paths||[],queue:[],files:{},mime:a&&a.mime,push:function(b,c){var e=this;this.queue.push(b),d.Parser.importer(b,this.paths,function(a){e.queue.splice(e.queue.indexOf(b),1),e.files[b]=a,c(a),e.queue.length===0&&n()},a)}};this.env=a=a||{},this.optimization="optimization"in this.env?this.env.optimization:1,this.env.filename=this.env.filename||null;return l={imports:o,parse:function(d,g){var h,l,m,o,p,q,r=[],t,u=null;c=f=k=i=0,j=[],b=d.replace(/\r\n/g,"\n"),j=function(c){var d=0,e=/[^"'`\{\}\/\(\)]+/g,f=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,g=0,h,i=c[0],j,k;for(var l=0,m,n;l<b.length;l++){e.lastIndex=l,(h=e.exec(b))&&h.index===l&&(l+=h[0].length,i.push(h[0])),m=b.charAt(l),f.lastIndex=l,!k&&!j&&m==="/"&&(n=b.charAt(l+1),(n==="/"||n==="*")&&(h=f.exec(b))&&h.index===l&&(l+=h[0].length,i.push(h[0]),m=b.charAt(l)));if(m==="{"&&!k&&!j)g++,i.push(m);else if(m==="}"&&!k&&!j)g--,i.push(m),c[++d]=i=[];else if(m==="("&&!k&&!j)i.push(m),j=!0;else if(m===")"&&!k&&j)i.push(m),j=!1;else{if(m==='"'||m==="'"||m==="`")k?k=k===m?!1:k:k=m;i.push(m)}}if(g>0)throw{type:"Syntax",message:"Missing closing `}`",filename:a.filename};return c.map(function(a){return a.join("")})}([[]]),h=new e.Ruleset([],s(this.parsers.primary)),h.root=!0,h.toCSS=function(c){var d,f,g;return function(g,h){function n(a){return a?(b.slice(0,a).match(/\n/g)||"").length:null}var i=[];g=g||{},typeof h=="object"&&!Array.isArray(h)&&(h=Object.keys(h).map(function(a){var b=h[a];b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b]));return new e.Rule("@"+a,b,!1,0)}),i=[new e.Ruleset(null,h)]);try{var j=c.call(this,{frames:i}).toCSS([],{compress:g.compress||!1})}catch(k){f=b.split("\n"),d=n(k.index);for(var l=k.index,m=-1;l>=0&&b.charAt(l)!=="\n";l--)m++;throw{type:k.type,message:k.message,filename:a.filename,index:k.index,line:typeof d=="number"?d+1:null,callLine:k.call&&n(k.call)+1,callExtract:f[n(k.call)],stack:k.stack,column:m,extract:[f[d-1],f[d],f[d+1]]}}return g.compress?j.replace(/(\s)+/g,"$1"):j}}(h.eval);if(c<b.length-1){c=i,q=b.split("\n"),p=(b.slice(0,c).match(/\n/g)||"").length+1;for(var v=c,w=-1;v>=0&&b.charAt(v)!=="\n";v--)w++;u={name:"ParseError",message:"Syntax Error on line "+p,index:c,filename:a.filename,line:p,column:w,extract:[q[p-2],q[p-1],q[p]]}}this.imports.queue.length>0?n=function(){g(u,h)}:g(u,h)},parsers:{primary:function(){var a,b=[];while((a=s(this.mixin.definition)||s(this.rule)||s(this.ruleset)||s(this.mixin.call)||s(this.comment)||s(this.directive))||s(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(c)==="/"){if(b.charAt(c+1)==="/")return new e.Comment(s(/^\/\/.*/),!0);if(a=s(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)}},entities:{quoted:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)==='"'||b.charAt(d)==="'"){f&&s("~");if(a=s(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],f)}},keyword:function(){var a;if(a=s(/^[A-Za-z-]+/))return new e.Keyword(a)},call:function(){var a,b,d=c;if(!!(a=/^([\w-]+|%)\(/.exec(j[f]))){a=a[1].toLowerCase();if(a==="url")return null;c+=a.length;if(a==="alpha")return s(this.alpha);s("("),b=s(this.entities.arguments);if(!s(")"))return;if(a)return new e.Call(a,b,d)}},arguments:function(){var a=[],b;while(b=s(this.expression)){a.push(b);if(!s(","))break}return a},literal:function(){return s(this.entities.dimension)||s(this.entities.color)||s(this.entities.quoted)},url:function(){var a;if(b.charAt(c)==="u"&&!!s(/^url\(/)){a=s(this.entities.quoted)||s(this.entities.variable)||s(this.entities.dataURI)||s(/^[-\w%@$\/.&=:;#+?~]+/)||"";if(!s(")"))throw new Error("missing closing ) for url()");return new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),o.paths)}},dataURI:function(){var a;if(s(/^data:/)){a={},a.mime=s(/^[^\/]+\/[^,;)]+/)||"",a.charset=s(/^;\s*charset=[^,;)]+/)||"",a.base64=s(/^;\s*base64/)||"",a.data=s(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var a,d=c;if(b.charAt(c)==="@"&&(a=s(/^@@?[\w-]+/)))return new e.Variable(a,d)},color:function(){var a;if(b.charAt(c)==="#"&&(a=s(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,d=b.charCodeAt(c);if(!(d>57||d<45||d===47))if(a=s(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)==="`"){f&&s("~");if(a=s(/^`([^`]*)`/))return new e.JavaScript(a[1],c,f)}}},variable:function(){var a;if(b.charAt(c)==="@"&&(a=s(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!!t(/^[@\w.%-]+\/[@\w.-]+/)&&(a=s(this.entity))&&s("/")&&(b=s(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var a=[],d,f,g,h=c,i=b.charAt(c);if(i==="."||i==="#"){while(d=s(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))a.push(new e.Element(f,d)),f=s(">");s("(")&&(g=s(this.entities.arguments))&&s(")");if(a.length>0&&(s(";")||t("}")))return new e.mixin.Call(a,g,h)}},definition:function(){var a,d=[],f,g,h,i;if(!(b.charAt(c)!=="."&&b.charAt(c)!=="#"||t(/^[^{]*(;|})/)))if(f=s(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=f[1];while(h=s(this.entities.variable)||s(this.entities.literal)||s(this.entities.keyword)){if(h instanceof e.Variable)if(s(":"))if(i=s(this.expression))d.push({name:h.name,value:i});else throw new Error("Expected value");else d.push({name:h.name});else d.push({value:h});if(!s(","))break}if(!s(")"))throw new Error("Expected )");g=s(this.block);if(g)return new e.mixin.Definition(a,d,g)}}},entity:function(){return s(this.entities.literal)||s(this.entities.variable)||s(this.entities.url)||s(this.entities.call)||s(this.entities.keyword)||s(this.entities.javascript)||s(this.comment)},end:function(){return s(";")||t("}")},alpha:function(){var a;if(!!s(/^\(opacity=/i))if(a=s(/^\d+/)||s(this.entities.variable)){if(!s(")"))throw new Error("missing closing ) for alpha()");return new e.Alpha(a)}},element:function(){var a,b,c;c=s(this.combinator),a=s(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||s("*")||s(this.attribute)||s(/^\([^)@]+\)/);if(a)return new e.Element(c,a)},combinator:function(){var a,d=b.charAt(c);if(d===">"||d==="&"||d==="+"||d==="~"){c++;while(b.charAt(c)===" ")c++;return new e.Combinator(d)}if(d===":"&&b.charAt(c+1)===":"){c+=2;while(b.charAt(c)===" ")c++;return new e.Combinator("::")}return b.charAt(c-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,d,f=[],g,h;while(d=s(this.element)){g=b.charAt(c),f.push(d);if(g==="{"||g==="}"||g===";"||g===",")break}if(f.length>0)return new e.Selector(f)},tag:function(){return s(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||s("*")},attribute:function(){var a="",b,c,d;if(!!s("[")){if(b=s(/^[a-zA-Z-]+/)||s(this.entities.quoted))(d=s(/^[|~*$^]?=/))&&(c=s(this.entities.quoted)||s(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!s("]"))return;if(a)return"["+a+"]"}},block:function(){var a;if(s("{")&&(a=s(this.primary))&&s("}"))return a},ruleset:function(){var a=[],b,d,g;p();if(g=/^([.#: \w-]+)[\s\n]*\{/.exec(j[f]))c+=g[0].length-1,a=[new e.Selector([new e.Element(null,g[1])])];else while(b=s(this.selector)){a.push(b),s(this.comment);if(!s(","))break;s(this.comment)}if(a.length>0&&(d=s(this.block)))return new e.Ruleset(a,d);i=c,q()},rule:function(){var a,d,g=b.charAt(c),k,l;p();if(g!=="."&&g!=="#"&&g!=="&")if(a=s(this.variable)||s(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(j[f]))?(c+=l[0].length-1,d=new e.Anonymous(l[1])):a==="font"?d=s(this.font):d=s(this.value),k=s(this.important);if(d&&s(this.end))return new e.Rule(a,d,k,h);i=c,q()}},"import":function(){var a;if(s(/^@import\s+/)&&(a=s(this.entities.quoted)||s(this.entities.url))&&s(";"))return new e.Import(a,o)},directive:function(){var a,d,f,g;if(b.charAt(c)==="@"){if(d=s(this["import"]))return d;if(a=s(/^@media|@page|@-[-a-z]+/)){g=(s(/^[^{]+/)||"").trim();if(f=s(this.block))return new e.Directive(a+" "+g,f)}else if(a=s(/^@[-a-z]+/))if(a==="@font-face"){if(f=s(this.block))return new e.Directive(a,f)}else if((d=s(this.entity))&&s(";"))return new e.Directive(a,d)}},font:function(){var a=[],b=[],c,d,f,g;while(g=s(this.shorthand)||s(this.entity))b.push(g);a.push(new e.Expression(b));if(s(","))while(g=s(this.expression)){a.push(g);if(!s(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=s(this.expression)){b.push(a);if(!s(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(c)==="!")return s(/^! *important/)},sub:function(){var a;if(s("(")&&(a=s(this.expression))&&s(")"))return a},multiplication:function(){var a,b,c,d;if(a=s(this.operand)){while((c=s("/")||s("*"))&&(b=s(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,d,f,g;if(a=s(this.multiplication)){while((f=s(/^[-+]\s+/)||b.charAt(c-1)!=" "&&(s("+")||s("-")))&&(d=s(this.multiplication)))g=new e.Operation(f,[g||a,d]);return g||a}},operand:function(){var a,d=b.charAt(c+1);b.charAt(c)==="-"&&(d==="@"||d==="(")&&(a=s("-"));var f=s(this.sub)||s(this.entities.dimension)||s(this.entities.color)||s(this.entities.variable)||s(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),f]):f},expression:function(){var a,b,c=[],d;while(a=s(this.addition)||s(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=s(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}},typeof a!="undefined"&&(d.Parser.importer=function(a,b,c,d){a.charAt(0)!=="/"&&b.length>0&&(a=b[0]+a),o({href:a,title:a,type:d.mime},c,!0)}),function(a){function d(a){return Math.min(1,Math.max(0,a))}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){a=a<0?a+1:a>1?a-1:a;return a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();e.s+=c.value/100,e.s=d(e.s);return b(e)},desaturate:function(a,c){var e=a.toHSL();e.s-=c.value/100,e.s=d(e.s);return b(e)},lighten:function(a,c){var e=a.toHSL();e.l+=c.value/100,e.l=d(e.l);return b(e)},darken:function(a,c){var e=a.toHSL();e.l-=c.value/100,e.l=d(e.l);return b(e)},fadein:function(a,c){var e=a.toHSL();e.a+=c.value/100,e.a=d(e.a);return b(e)},fadeout:function(a,c){var e=a.toHSL();e.a-=c.value/100,e.a=d(e.a);return b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;d.h=e<0?360+e:e;return b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e<c.length;e++)d=d.replace(/%[sda]/i,function(a){var b=a.match(/s/i)?c[e].value:c[e].toCSS();return a.match(/[A-Z]$/)?encodeURIComponent(b):b});d=d.replace(/%%/g,"%");return new a.Quoted('"'+d+'"',d)},round:function(b){if(b instanceof a.Dimension)return new a.Dimension(Math.round(c(b)),b.unit);if(typeof b=="number")return Math.round(b);throw{error:"RuntimeError",message:"math functions take numbers as parameters"}}}}(c("less/tree")),function(a){a.Alpha=function(a){this.value=a},a.Alpha.prototype={toCSS:function(){return"alpha(opacity="+(this.value.toCSS?this.value.toCSS():this.value)+")"},eval:function(a){this.value.eval&&(this.value=this.value.eval(a));return this}}}(c("less/tree")),function(a){a.Anonymous=function(a){this.value=a.value||a},a.Anonymous.prototype={toCSS:function(){return this.value},eval:function(){return this}}}(c("less/tree")),function(a){a.Call=function(a,b,c){this.name=a,this.args=b,this.index=c},a.Call.prototype={eval:function(b){var c=this.args.map(function(a){return a.eval(b)});if(!(this.name in a.functions))return new a.Anonymous(this.name+"("+c.map(function(a){return a.toCSS()}).join(", ")+")");try{return a.functions[this.name].apply(a.functions,c)}catch(d){throw{message:"error evaluating function `"+this.name+"`",index:this.index}}},toCSS:function(a){return this.eval(a).toCSS()}}}(c("less/tree")),function(a){a.Color=function(a,b){Array.isArray(a)?this.rgb=a:a.length==6?this.rgb=a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):a.length==8?(this.alpha=parseInt(a.substring(0,2),16)/255,this.rgb=a.substr(2).match(/.{2}/g).map(function(a){return parseInt(a,16)})):this.rgb=a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha=typeof b=="number"?b:1},a.Color.prototype={eval:function(){return this},toCSS:function(){return this.alpha<1?"rgba("+this.rgb.map(function(a){return Math.round(a)}).concat(this.alpha).join(", ")+")":"#"+this.rgb.map(function(a){a=Math.round(a),a=(a>255?255:a<0?0:a).toString(16);return a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b<c?6:0);break;case b:g=(c-a)/j+2;break;case c:g=(a-b)/j+4}g/=6}return{h:g*360,s:h,l:i,a:d}}}}(c("less/tree")),function(a){a.Comment=function(a,b){this.value=a,this.silent=!!b},a.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}}(c("less/tree")),function(a){a.Dimension=function(a,b){this.value=parseFloat(a),this.unit=b||null},a.Dimension.prototype={eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},toCSS:function(){var a=this.value+this.unit;return a},operate:function(b,c){return new a.Dimension(a.operate(b,this.value,c.value),this.unit||c.unit)}}}(c("less/tree")),function(a){a.Directive=function(b,c){this.name=b,Array.isArray(c)?this.ruleset=new a.Ruleset([],c):this.value=c},a.Directive.prototype={toCSS:function(a,b){if(this.ruleset){this.ruleset.root=!0;return this.name+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")}return this.name+" "+this.value.toCSS()+";\n"},eval:function(a){a.frames.unshift(this),this.ruleset=this.ruleset&&this.ruleset.eval(a),a.frames.shift();return this},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(c("less/tree")),function(a){a.Element=function(b,c){this.combinator=b instanceof a.Combinator?b:new a.Combinator(b),this.value=c.trim()},a.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+this.value},a.Combinator=function(a){a===" "?this.value=" ":this.value=a?a.trim():""},a.Combinator.prototype.toCSS=function(a){return{"":""," ":" ","&":"",":":" :","::":"::","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}}(c("less/tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(" ")}}}(c("less/tree")),function(a){a.Import=function(b,c){var d=this;this._path=b,b instanceof a.Quoted?this.path=/\.(le?|c)ss$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css$/.test(this.path),this.css||c.push(this.path,function(a){if(!a)throw new Error("Error parsing "+d.path);d.root=a})},a.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var c;if(this.css)return this;c=new a.Ruleset(null,this.root.rules.slice(0));for(var d=0;d<c.rules.length;d++)c.rules[d]instanceof a.Import&&Array.prototype.splice.apply(c.rules,[d,1].concat(c.rules[d].eval(b)));return c.rules}}}(c("less/tree")),function(a){a.JavaScript=function(a,b,c){this.escaped=c,this.expression=a,this.index=b},a.JavaScript.prototype={eval:function(b){var c,d=this,e={},f=this.expression.replace(/@\{([\w-]+)\}/g,function(c,e){return a.jsify((new a.Variable("@"+e,d.index)).eval(b))});try{f=new Function("return ("+f+")")}catch(g){throw{message:"JavaScript evaluation error: `"+f+"`",index:this.index}}for(var h in b.frames[0].variables())e[h.slice(1)]={value:b.frames[0].variables()[h].value,toJS:function(){return this.value.eval(b).toCSS()}};try{c=f.call(e)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message+"'",index:this.index}}return typeof c=="string"?new a.Quoted('"'+c+'"',c,this.escaped,this.index):Array.isArray(c)?new a.Anonymous(c.join(", ")):new a.Anonymous(c)}}}(c("less/tree")),function(a){a.Keyword=function(a){this.value=a},a.Keyword.prototype={eval:function(){return this},toCSS:function(){return this.value}}}(c("less/tree")),function(a){a.mixin={},a.mixin.Call=function(b,c,d){this.selector=new a.Selector(b),this.arguments=c,this.index=d},a.mixin.Call.prototype={eval:function(a){var b,c,d=[],e=!1;for(var f=0;f<a.frames.length;f++)if((b=a.frames[f].find(this.selector)).length>0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g<b.length;g++)if(b[g].match(c,a))try{Array.prototype.push.apply(d,b[g].eval(a,this.arguments).rules),e=!0}catch(h){throw{message:h.message,index:h.index,stack:h.stack,call:this.index}}if(e)return d;throw{message:"No matching definition was found for `"+this.selector.toCSS().trim()+"("+this.arguments.map(function(a){return a.toCSS()}).join(", ")+")`",index:this.index}}throw{message:this.selector.toCSS().trim()+" is undefined",index:this.index}}},a.mixin.Definition=function(b,c,d){this.name=b,this.selectors=[new a.Selector([new a.Element(null,b)])],this.params=c,this.arity=c.length,this.rules=d,this._lookups={},this.required=c.reduce(function(a,b){return!b.name||b.name&&!b.value?a+1:a},0),this.parent=a.Ruleset.prototype,this.frames=[]},a.mixin.Definition.prototype={toCSS:function(){return""},variable:function(a){return this.parent.variable.call(this,a)},variables:function(){return this.parent.variables.call(this)},find:function(){return this.parent.find.apply(this,arguments)},rulesets:function(){return this.parent.rulesets.apply(this)},eval:function(b,c){var d=new a.Ruleset(null,[]),e,f=[];for(var g=0,h;g<this.params.length;g++)if(this.params[g].name)if(h=c&&c[g]||this.params[g].value)d.rules.unshift(new a.Rule(this.params[g].name,h.eval(b)));else throw{message:"wrong number of arguments for "+this.name+" ("+c.length+" for "+this.arity+")"};for(var g=0;g<Math.max(this.params.length,c&&c.length);g++)f.push(c[g]||this.params[g].value);d.rules.unshift(new a.Rule("@arguments",(new a.Expression(f)).eval(b)));return(new a.Ruleset(null,this.rules.slice(0))).eval({frames:[this,d].concat(this.frames,b.frames)})},match:function(a,b){var c=a&&a.length||0,d;if(c<this.required)return!1;if(this.required>0&&c>this.params.length)return!1;d=Math.min(c,this.arity);for(var e=0;e<d;e++)if(!this.params[e].name&&a[e].eval(b).toCSS()!=this.params[e].value.eval(b).toCSS())return!1;return!0}}}(c("less/tree")),function(a){a.Operation=function(a,b){this.op=a.trim(),this.operands=b},a.Operation.prototype.eval=function(b){var c=this.operands[0].eval(b),d=this.operands[1].eval(b),e;if(c instanceof a.Dimension&&d instanceof a.Color)if(this.op==="*"||this.op==="+")e=d,d=c,c=e;else throw{name:"OperationError",message:"Can't substract or divide a color from a number"};return c.operate(this.op,d)},a.operate=function(a,b,c){switch(a){case"+":return b+c;case"-":return b-c;case"*":return b*c;case"/":return b/c}}}(c("less/tree")),function(a){a.Quoted=function(a,b,c,d){this.escaped=c,this.value=b||"",this.quote=a.charAt(0),this.index=d},a.Quoted.prototype={toCSS:function(){return this.escaped?this.value:this.quote+this.value+this.quote},eval:function(b){var c=this,d=this.value.replace(/`([^`]+)`/g,function(d,e){return(new a.JavaScript(e,c.index,!0)).eval(b).value}).replace(/@\{([\w-]+)\}/g,function(d,e){var f=(new a.Variable("@"+e,c.index)).eval(b);return f.value||f.toCSS()});return new a.Quoted(this.quote+d+this.quote,d,this.escaped,this.index)}}}(c("less/tree")),function(a){a.Rule=function(b,c,d,e){this.name=b,this.value=c instanceof a.Value?c:new a.Value([c]),this.important=d?" "+d.trim():"",this.index=e,b.charAt(0)==="@"?this.variable=!0:this.variable=!1},a.Rule.prototype.toCSS=function(a){return this.variable?"":this.name+(a.compress?":":": ")+this.value.toCSS(a)+this.important+";"},a.Rule.prototype.eval=function(b){return new a.Rule(this.name,this.value.eval(b),this.important,this.index)},a.Shorthand=function(a,b){this.a=a,this.b=b},a.Shorthand.prototype={toCSS:function(a){return this.a.toCSS(a)+"/"+this.b.toCSS(a)},eval:function(){return this}}}(c("less/tree")),function(a){a.Ruleset=function(a,b){this.selectors=a,this.rules=b,this._lookups={}},a.Ruleset.prototype={eval:function(b){var c=new a.Ruleset(this.selectors,this.rules.slice(0));c.root=this.root,b.frames.unshift(c);if(c.root)for(var d=0;d<c.rules.length;d++)c.rules[d]instanceof a.Import&&Array.prototype.splice.apply(c.rules,[d,1].concat(c.rules[d].eval(b)));for(var d=0;d<c.rules.length;d++)c.rules[d]instanceof a.mixin.Definition&&(c.rules[d].frames=b.frames.slice(0));for(var d=0;d<c.rules.length;d++)c.rules[d]instanceof a.mixin.Call&&Array.prototype.splice.apply(c.rules,[d,1].concat(c.rules[d].eval(b)));for(var d=0,e;d<c.rules.length;d++)e=c.rules[d],e instanceof a.mixin.Definition||(c.rules[d]=e.eval?e.eval(b):e);b.frames.shift();return c},match:function(a){return!a||a.length===0},variables:function(){return this._variables?this._variables:this._variables=this.rules.reduce(function(b,c){c instanceof a.Rule&&c.variable===!0&&(b[c.name]=c);return b},{})},variable:function(a){return this.variables()[a]},rulesets:function(){return this._rulesets?this._rulesets:this._rulesets=this.rules.filter(function(b){return b instanceof a.Ruleset||b instanceof a.mixin.Definition})},find:function(b,c){c=c||this;var d=[],e,f,g=b.toCSS();if(g in this._lookups)return this._lookups[g];this.rulesets().forEach(function(e){if(e!==c)for(var g=0;g<e.selectors.length;g++)if(f=b.match(e.selectors[g])){b.elements.length>1?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}});return this._lookups[g]=d},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;if(!this.root)if(b.length===0)g=this.selectors.map(function(a){return[a]});else for(var j=0;j<this.selectors.length;j++)for(var k=0;k<b.length;k++)g.push(b[k].concat([this.selectors[j]]));for(var l=0;l<this.rules.length;l++)i=this.rules[l],i.rules||i instanceof a.Directive?f.push(i.toCSS(g,c)):i instanceof a.Comment?i.silent||(this.root?f.push(i.toCSS(c)):e.push(i.toCSS(c))):i.toCSS&&!i.variable?e.push(i.toCSS(c)):i.value&&!i.variable&&e.push(i.value.toString());f=f.join(""),this.root?d.push(e.join(c.compress?"":"\n")):e.length>0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":g.length>3?",\n":", "),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f);return d.join("")+(c.compress?"\n":"")}}}(c("less/tree")),function(a){a.Selector=function(a){this.elements=a,this.elements[0].combinator.value===""&&(this.elements[0].combinator.value=" ")},a.Selector.prototype.match=function(a){return this.elements[0].value===a.elements[0].value?!0:!1},a.Selector.prototype.toCSS=function(a){if(this._css)return this._css;return this._css=this.elements.map(function(b){return typeof b=="string"?" "+b.trim():b.toCSS(a)}).join("")}}(c("less/tree")),function(b){b.URL=function(b,c){b.data?this.attrs=b:(!/^(?:https?:\/|file:\/|data:\/)?\//.test(b.value)&&c.length>0&&typeof a!="undefined"&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("less/tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("less/tree")),function(a){a.Variable=function(a,b){this.name=a,this
+.index=b},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{message:"variable "+e+" is undefined",index:this.index}}}}(c("less/tree")),c("less/tree").find=function(a,b){for(var c=0,d;c<a.length;c++)if(d=b.call(a,a[c]))return d;return null},c("less/tree").jsify=function(a){return Array.isArray(a.value)&&a.value.length>1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)};var g=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||g?"development":"production"),d.async=!1,d.poll=d.poll||(g?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&n(function(a,b,c){a&&q(a.toCSS(),b,c.lastModified)})},d.poll)):d.optimization=3;var h;try{h=typeof a.localStorage=="undefined"?null:a.localStorage}catch(i){h=null}var j=document.getElementsByTagName("link"),k=/^text\/(x-)?less$/;d.sheets=[];for(var l=0;l<j.length;l++)(j[l].rel==="stylesheet/less"||j[l].rel.match(/stylesheet/)&&j[l].type.match(k))&&d.sheets.push(j[l]);d.refresh=function(a){var b,c;b=c=new Date,n(function(a,d,e){e.local?u("loading "+d.href+" from cache."):(u("parsed "+d.href+" successfully."),q(a.toCSS(),d,e.lastModified)),u("css for "+d.href+" generated in "+(new Date-c)+"ms"),e.remaining===0&&u("css generated in "+(new Date-b)+"ms"),c=new Date},a),m()},d.refreshStyles=m,d.refresh(d.env==="development")})(window)
Something went wrong with that request. Please try again.