New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

absurd

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absurd - npm Package Compare versions

Comparing version 0.3.19 to 0.3.20

tests/bugs/browser-prefixes.bug.spec.js

4

client-side/build/absurd.min.js

@@ -1,2 +0,2 @@

var Absurd=function(){function b(a){return a?a.replace(/^\s+|\s+$/g,""):""}var d={api:{},helpers:{},plugins:{},processors:{css:{plugins:{}},html:{plugins:{},helpers:{}},component:{plugins:{}}}},e=function(a){return a.indexOf("css/CSS.js")>0||"/../CSS.js"==a?d.processors.css.CSS:a.indexOf("html/HTML.js")>0?d.processors.html.HTML:a.indexOf("component/Component.js")>0?d.processors.component.Component:"js-beautify"==a?{html:function(a){return a}}:"./helpers/PropAnalyzer"==a?d.processors.html.helpers.PropAnalyzer:"../../helpers/TransformUppercase"==a?d.helpers.TransformUppercase:"./helpers/TemplateEngine"==a?d.processors.html.helpers.TemplateEngine:"../helpers/Extend"==a?d.helpers.Extend:"../helpers/Clone"==a?d.helpers.Clone:"../helpers/Prefixes"==a||"/../../../helpers/Prefixes"==a?d.helpers.Prefixes:a==f+"/../../../../"?Absurd:"../helpers/CSSParse"==a?d.helpers.CSSParse:function(){}},f="",g=function(a,b){!function c(){a.length>0&&a.shift().apply(b||{},[c].concat(Array.prototype.slice.call(arguments,0)))}()},h=function(a){var b={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],body:[0,"",""],_default:[1,"<div>","</div>"]};b.optgroup=b.option,b.tbody=b.tfoot=b.colgroup=b.caption=b.thead,b.th=b.td;var c=/<\s*\w.*?>/g.exec(a),d=document.createElement("div");if(null!=c){var e=c[0].replace(/</g,"").replace(/>/g,"").split(" ")[0];if("body"===e.toLowerCase()){var f=(document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),document.createElement("body"));d.innerHTML=a.replace(/<body/g,"<div").replace(/<\/body>/g,"</div>");var g=d.firstChild.attributes;f.innerHTML=a;for(var h=0;h<g.length;h++)f.setAttribute(g[h].name,g[h].value);return f}var d,i=b[e]||b._default;a=i[1]+a+i[2],d.innerHTML=a;for(var j=i[0]+1;j--;)d=d.lastChild}else d.innerHTML=a,d=d.lastChild;return d},i=function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),!0):a.attachEvent?a.attachEvent("on"+b,c):void 0},j=function(a){for(var b,c=a.childNodes,d=c.length,e=0,f=/^\s*$/;d>e;e++)b=c[e],3==b.nodeType&&f.test(b.nodeValue)&&(a.removeChild(b),e--,d--);return a},k=function(b,c,d){for(var e=document.createElement(b),f=0;f<c.length,a=c[f];f++)e.setAttribute(a.name,a.value);return e.innerHTML=d,e},l=function(a,b){return b=b===!1?document:b||this.el||document,b.querySelector(a)},m=function(a,b){return b=b===!1?document:b||this.el||document,b.querySelectorAll(a)},n=function(a,b){return b=b||this.el,b&&b.currentStyle?b.currentStyle[a]:window.getComputedStyle?document.defaultView.getComputedStyle(b,null).getPropertyValue(a):null},q=function(a,b){if(b=b||this.el,b.classList)b.classList.add(a);else{var c=b.className;c.indexOf(a)<0&&(""==c?b.className=a:b.className+=" "+a)}return this},r=function(a,b){if(b=b||this.el,b.classList)b.classList.remove(a);else{for(var c=b.className.split(" "),d=[],e=0;e<c.length;e++)c[e]!=a&&d.push(c[e]);b.className=d.join(" ")}return this},s=function(a,b,c){c=c||this.el;for(var d=c.className.split(" "),e=!1,f=0;f<d.length;f++)d[f]==a&&(e=!0,d[f]=b);return e?(c.className=d.join(" "),this):q(b,c)},t=function(a,b){if(b=b||this.el,b.classList)b.classList.toggle(a);else{for(var c=b.className.split(" "),d=-1,e=c.length;e--;)c[e]===a&&(d=e);d>=0?c.splice(d,1):c.push(a),b.className=c.join(" ")}return this},u=function(a,b,c){return b instanceof Array&&(c=b,b=this),b||(b=this),function(){a.apply(b,(c||[]).concat(Array.prototype.slice.call(arguments,0)))}},w=function(a,b,c,e){var f=d.helpers.Extend({__name:a},e),o=d.helpers.Extend,p=[];f.listeners=p,f.on=function(a,b,c){return p[a]||(p[a]=[]),p[a].push({callback:b,scope:c}),this},f.off=function(a,b){return p[a]?(b||(p[a]=[]),this):this},f.dispatch=function(a,b,d){if(!b||"object"!=typeof b||b instanceof Array||(b.target=this),p[a])for(var e=0;e<p[a].length;e++){var f=p[a][e].callback;f.apply(d||p[a][e].scope||{},[b])}return this[a]&&"function"==typeof this[a]&&this[a](b),c&&c.dispatch(a,b),this};var v={};f.set=function(a,b){return v[a]=b,this},f.get=function(a){return v[a]};var w=!1;f.__handleCSS=function(c){return this.css?b.flush().add(this.css).compile(function(b,d){if(w)w.raw!==d&&(w.raw=d,w.element.innerHTML=d);else{var e=k("style",[{name:"id",value:a+"-css"},{name:"type",value:"text/css"}],d);(l("head")||l("body")).appendChild(e),w={raw:d,element:e}}c()}):c(),this},f.applyCSS=function(a,b,c){if(this.html&&"string"==typeof this.html&&!b){var d={};d[this.html]=a,a=d}return this.css=a,c||this.populate(),this};var x=!1;f.__mergeDOMElements=function(a,b){if(j(a),j(b),"undefined"!=typeof a&&"undefined"!=typeof b&&!a.isEqualNode(b)){if(a.nodeName!==b.nodeName)return void(a.parentNode&&a.parentNode.replaceChild(b,a));if(a.nodeValue!==b.nodeValue&&(a.nodeValue=b.nodeValue),a.attributes){for(var c,d,e=a.attributes,g=b.attributes,h={},i=0;i<e.length,c=e[i];i++){for(var k=0;k<g.length,d=g[k];k++)c.name===d.name&&(a.setAttribute(c.name,d.value),h[c.name]=!0);h[c.name]||a.removeAttribute(c.name)}for(var i=0;i<g.length,d=g[i];i++)h[d.name]||a.setAttribute(d.name,d.value)}var l=[];if(a.childNodes.length>=b.childNodes.length)for(var i=0;i<a.childNodes.length;i++)b.childNodes[i]||b.appendChild(document.createTextNode("")),l.push([a.childNodes[i],b.childNodes[i]]);else for(var i=0;i<b.childNodes.length;i++)a.appendChild(document.createTextNode("")),l.push([a.childNodes[i],b.childNodes[i]]);for(var i=0;i<l.length;i++)f.__mergeDOMElements(l[i][0],l[i][1])}},f.__handleHTML=function(a){var c=this,d=function(){b.flush().morph("html").add(x).compile(function(b,d){c.el?f.__mergeDOMElements(c.el,h(d)):c.el=h(d),a()},c)};if(this.html)if("string"==typeof this.html){if(!this.el){var e=l(this.html);e&&(this.el=e,x={"":this.el.outerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">")})}d()}else"object"==typeof this.html?(x=o({},this.html),d()):a();else a();return this},f.applyHTML=function(a,b){return this.html=a,b||this.populate(),this};var y=!1;f.__append=function(a){return!y&&this.el&&this.get("parent")&&(y=!0,this.get("parent").appendChild(this.el)),a(),this};var z={events:{}};f.__handleEvents=function(a){if(this.el){var b=this,c=function(a){var c=a.getAttribute("data-absurd-event"),d=function(c){if(c=c.split(":"),c.length>=2){var d=c[0],e=c[1];c.splice(0,2);var f=c;(!z.events[d]||z.events[d].indexOf(a)<0)&&(z.events[d]||(z.events[d]=[]),z.events[d].push(a),i(a,d,function(a){if("function"==typeof b[e]){var c=b[e];c.apply(b,[a].concat(f))}}))}};c=c.split(/, ?/g);for(var e=0;e<c.length;e++)d(c[e])};this.el.hasAttribute&&this.el.hasAttribute("data-absurd-event")&&c(this.el);for(var d=this.el.querySelectorAll?this.el.querySelectorAll("[data-absurd-event]"):[],e=0;e<d.length;e++)c(d[e])}return a(),this},f.__getAnimAndTransEndEventName=function(a){if(a){var b,c={animation:["animationend","transitionend"],OAnimation:["oAnimationEnd","oTransitionEnd"],MozAnimation:["animationend","transitionend"],WebkitAnimation:["webkitAnimationEnd","webkitTransitionEnd"]};for(b in c)if(void 0!==a.style[b])return c[b]}},f.onAnimationEnd=function(a,b){1==arguments.length&&(b=a,a=this.el);var c=this,d=f.__getAnimAndTransEndEventName(a);return d?void this.addEventListener(a,d[0],function(a){b.apply(c,[a])}):void b.apply(this,[{error:"Animations not supported."}])},f.onTransitionEnd=function(a,b){1==arguments.length&&(b=a,a=this.el);var c=this,d=f.__getAnimAndTransEndEventName(a);return d?void this.addEventListener(a,d[1],function(a){b.apply(c,[a])}):void b.apply(this,[{error:"Animations not supported."}])};var A={funcs:{},index:0};f.__handleAsyncFunctions=function(a){if(this.el){var b=[];if(this.el.hasAttribute&&this.el.hasAttribute("data-absurd-async"))b.push(this.el);else for(var c=this.el.querySelectorAll?this.el.querySelectorAll("[data-absurd-async]"):[],d=0;d<c.length;d++)b.push(c[d]);if(0===b.length)a();else{var e=this;!function f(){if(0===b.length)a();else{var c=b.shift(),d=c.getAttribute("data-absurd-async"),g=function(a){"string"==typeof a?c.parentNode.replaceChild(h(a),c):c.parentNode.replaceChild(a,c),f()};"function"==typeof e[A.funcs[d].name]?e[A.funcs[d].name].apply(e,[g].concat(A.funcs[d].args)):"function"==typeof A.funcs[d].func&&A.funcs[d].func.apply(e,[g].concat(A.funcs[d].args))}}()}}else a();return this},f.async=function(){var a=Array.prototype.slice.call(arguments,0),b=a.shift(),c="_"+A.index++;return A.funcs[c]={args:a,name:b},'<script data-absurd-async="'+c+'"></script>'},f.child=function(){var a=Array.prototype.slice.call(arguments,0),b=this.get("children"),c=b&&b[a.shift()],d="_"+A.index++;return A.funcs[d]={args:a,func:function(a){c.populate({callback:function(b){a(b.html.element)}})}},'<script data-absurd-async="'+d+'"></script>'},f.wire=function(a){return b.components.events.on(a,this[a]||function(){},this),this};var B=!1;return f.populate=function(a){return B?void 0:(B=!0,g([f.__handleCSS,f.__handleHTML,f.__append,f.__handleEvents,f.__handleAsyncFunctions,function(){B=!1,A={funcs:{},index:0};var b={css:w,html:{element:this.el}};this.dispatch("populated",b),a&&"function"==typeof a.callback&&a.callback(b)}],this),this)},f.str2DOMElement=h,f.addEventListener=i,f.queue=g,f.qs=l,f.qsa=m,f.getStyle=n,f.addClass=q,f.removeClass=r,f.replaceClass=s,f.bind=u,f.toggleClass=t,f.compileHTML=function(a,c,d){b.flush().morph("html").add(a).compile(c,d)},f.compileCSS=function(a,c,d){b.flush().add(a).compile(c,d)},f.delay=function(a,b,c){var d=this;setTimeout(function(){b.apply(d,c)},a)},f},x=function(a){a.di.register("is",{appended:function(a){return"undefined"==typeof a&&(a=this.host.html),l(a)?!0:!1},hidden:function(a){return a=a||this.host.el,null===a.offsetParent}}),a.di.register("router",{routes:[],mode:null,root:"/",getFragment:function(){var a="";if("history"===this.mode){if(!location)return"";a=this.clearSlashes(decodeURI(location.pathname+location.search)),a=a.replace(/\?(.*)$/,""),a="/"!=this.root?a.replace(this.root,""):a}else{if(!window)return"";var b=window.location.href.match(/#(.*)$/);a=b?b[1]:""}return this.clearSlashes(a)},clearSlashes:function(a){return a.toString().replace(/\/$/,"").replace(/^\//,"")},add:function(a,b){return"function"==typeof a&&(b=a,a=""),this.routes.push({re:a,handler:b}),this},remove:function(a){for(var b,c=0;c<this.routes.length,b=this.routes[c];c++)if(b.handler===a||b.re===a)return this.routes.splice(c,1),this;return this},flush:function(){return this.routes=[],this.mode=null,this.root="/",this},config:function(a){return this.mode=a&&a.mode&&"history"==a.mode&&history.pushState?"history":"hash",this.root=a&&a.root?"/"+this.clearSlashes(a.root)+"/":"/",this},listen:function(a){var b=this,c=b.getFragment(),d=function(){c!==b.getFragment()&&(c=b.getFragment(),b.check(c))};return clearInterval(this.interval),this.interval=setInterval(d,a||50),this},check:function(a){for(var b=a||this.getFragment(),c=0;c<this.routes.length;c++){var d=b.match(this.routes[c].re);if(d)return d.shift(),this.routes[c].handler.apply(this.host||{},d),this}return this},navigate:function(a){return a=a?a:"","history"===this.mode?history.pushState(null,null,this.root+this.clearSlashes(a)):(window.location.href.match(/#(.*)$/),window.location.href=window.location.href.replace(/#(.*)$/,"")+"#"+a),this}}),a.di.register("ajax",{request:function(a){"string"==typeof a&&(a={url:a}),a.url=a.url||"",a.method=a.method||"get",a.data=a.data||{};var b=function(a,b){var c,d=[];for(var e in a)d.push(e+"="+encodeURIComponent(a[e]));return c=d.join("&"),""!=c?b?b.indexOf("?")<0?"?"+c:"&"+c:c:""},c={host:this.host||{},process:function(a){var c=this;return this.xhr=null,window.ActiveXObject?this.xhr=new ActiveXObject("Microsoft.XMLHTTP"):window.XMLHttpRequest&&(this.xhr=new XMLHttpRequest),this.xhr&&(this.xhr.onreadystatechange=function(){if(4==c.xhr.readyState&&200==c.xhr.status){var b=c.xhr.responseText;a.json===!0&&"undefined"!=typeof JSON&&(b=JSON.parse(b)),c.doneCallback&&c.doneCallback.apply(c.host,[b,c.xhr])}else 4==c.xhr.readyState&&c.failCallback&&c.failCallback.apply(c.host,[c.xhr]);c.alwaysCallback&&c.alwaysCallback.apply(c.host,[c.xhr])},"get"==a.method?this.xhr.open("GET",a.url+b(a.data,a.url),!0):(this.xhr.open(a.method,a.url,!0),this.setHeaders({"X-Requested-With":"XMLHttpRequest","Content-type":"application/x-www-form-urlencoded"})),a.headers&&"object"==typeof a.headers&&this.setHeaders(a.headers),setTimeout(function(){"get"==a.method?c.xhr.send():c.xhr.send(b(a.data))},20)),this},done:function(a){return this.doneCallback=a,this},fail:function(a){return this.failCallback=a,this},always:function(a){return this.alwaysCallback=a,this},setHeaders:function(a){for(var b in a)this.xhr&&this.xhr.setRequestHeader(b,a[b])}};return c.process(a)}});var b=function(a,c){var d=b.prototype.host,e={el:null};switch(typeof a){case"undefined":e.el=d.el;break;case"string":c=c&&"string"==typeof c?l.apply(d,[c]):c,e.el=l(a,c||d.el||document);break;case"object":if("undefined"==typeof a.nodeName){var f=function(a,b){b=b||this;for(var c in b)"undefined"!=typeof b[c].el?b[c]=b[c].val(a):"object"==typeof b[c]&&(b[c]=f(a,b[c]));return delete b.val,b},g={val:f};for(var h in a)g[h]=b.apply(this,[a[h]]);return g}e.el=a}return e.val=function(a){if(!this.el)return null;var b=!!a,d=function(a){return b?(this.el.value=a,e):this.el.value};switch(this.el.nodeName.toLowerCase()){case"input":var f=this.el.getAttribute("type");if("radio"!=f&&"checkbox"!=f)return d.apply(this,[a]);for(var g=m('[name="'+this.el.getAttribute("name")+'"]',c),h=[],i=0;i<g.length;i++)b&&g[i].checked&&g[i].value!==a?g[i].removeAttribute("checked"):b&&g[i].value===a?(g[i].setAttribute("checked","checked"),g[i].checked="checked"):g[i].checked&&h.push(g[i].value);if(!b)return"radio"==f?h[0]:h;break;case"textarea":return d.apply(this,[a]);case"select":if(!b)return this.el.value;for(var j=m("option",this.el),i=0;i<j.length;i++)j[i].getAttribute("value")===a?this.el.selectedIndex=i:j[i].removeAttribute("selected");break;default:if(!b)return"undefined"!=typeof this.el.textContent?this.el.textContent:"undefined"!=typeof this.el.innerText?typeof this.el.innerText:this.el.innerHTML;this.el.innerHTML=a}return b?e:null},e.dom=function(a,c){return b(a,c||e.el)},e};a.di.register("dom",b);var c=function(b,d,e){var f=c.prototype.host,g=!(!window||!window.matchMedia||e);if(g){var h=window.matchMedia(b);d.apply(f,[h.matches,h.media]),h.addListener(function(a){d.apply(f,[a.matches,a.media])})}else{var i=".match-media-"+a.components.numOfComponents,j={},k={};j[i]={display:"block"},j[i]["@media "+b]={display:"none"},k["span"+i]="",a.component(i+"-component",{css:j,html:k,intervaliTime:30,status:"",loop:function(){var a=this;if(this.el){var b=this.getStyle("display");this.status!=b&&(this.status=b,d.apply(f,["none"===b]))}setTimeout(function(){a.loop()},this.intervaliTime)},constructor:["dom",function(a){var b=this;this.set("parent",a("body").el).populate(),setTimeout(function(){b.loop()},this.intervaliTime)}]})()}};a.di.register("mq",c)},y=function(){return function(a){var b=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},e={defaultProcessor:d.processors.css.CSS()},f={},g={},i={},j={};e.getRules=function(a){return"undefined"==typeof a?f:("undefined"==typeof f[a]&&(f[a]=[]),f[a])},e.getPlugins=function(){return i},e.getStorage=function(){return g},e.flush=function(){return f={},g=[],j={},e.defaultProcessor=d.processors.css.CSS(),e},e.import=function(){return e.callHooks("import",arguments)?e:e},e.handlecss=function(a,b){var c=e.getPlugins();if(a&&"stylesheet"===a.type&&a.stylesheet&&a.stylesheet.rules)for(var d=a.stylesheet.rules,f=0;rule=d[f];f++)switch(rule.type){case"rule":e.handlecssrule(rule);break;case"import":e.handlecssimport(rule,b);break;default:c[rule.type]&&c[rule.type](e,rule)}return e},e.handlecssimport=function(){return e},e.handlecssrule=function(a,c){var d={},f={};if(a.declarations&&a.declarations.length>0){for(var g=0;decl=a.declarations[g];g++)"declaration"===decl.type&&(f[decl.property]=decl.value);if(a.selectors&&a.selectors.length>0)for(var g=0;selector=a.selectors[g];g++)d[selector]=b({},f);e.add(d,c)}return e},e.addHook=function(a,b){j[a]||(j[a]=[]);for(var d=!1,e=0;c=j[a][e];e++)c===b&&(d=!0);d===!1?j[a].push(b):null},e.callHooks=function(a,b){if(j[a])for(var d=0;c=j[a][d];d++)if(c.apply(e,b)===!0)return!0;return!1},e.numOfAddedRules=0,e.components=function(a){var b=d.helpers.Extend,c=d.helpers.Clone,e={},f=[],g=b({},w()),h={};return function(a){window&&(window.addEventListener?window.addEventListener("load",a):window.attachEvent&&window.attachEvent("onload",a))}(function(){h.broadcast("ready")}),h={numOfComponents:0,events:g,register:function(d,h){return this.numOfComponents+=1,e[d]=function(){var e=b({},w(d,a,g,c(h)));return a.di.resolveObject(e),f.push(e),"function"==typeof e.constructor&&e.constructor.apply(e,Array.prototype.slice.call(arguments,0)),e}},get:function(a){if(e[a])return e[a];throw new Error("There is no component with name '"+a+"'.")},remove:function(a){return e[a]?(delete e[a],!0):!1},list:function(){var a=[];for(var b in e)a.push(b);return a},flush:function(){return e={},f=[],this},broadcast:function(a,b){for(var c=0;c<f.length,instance=f[c];c++)"function"==typeof instance[a]&&instance[a](b);return this}}}(e),e.component=function(a){return function(b,c){return"undefined"==typeof c?a.components.get(b):a.components.register(b,c)}}(e),e.di=d.DI(e),x(e),e.compile=function(a,c){if(e.callHooks("compile",arguments))return e;var d={combineSelectors:!0,minify:!1,processor:e.defaultProcessor,keepCamelCase:!1,api:e};c=b(d,c||{});var f=c.processor(e.getRules(),a||function(){},c);return e.flush(),f};for(var k in d.api)"compile"!==k&&(e[k]=d.api[k](e),e[k]=function(a){return function(){var b=d.api[a](e);return e.callHooks(a,arguments)?e:b.apply(e,arguments)}}(k));for(var l in d.processors.css.plugins)e.plugin(l,d.processors.css.plugins[l]());return"function"==typeof a&&a(e),"undefined"!=typeof Organic&&Organic.init(e),e.utils={str2DOMElement:h},e}};d.DI=function(){var a={dependencies:{},register:function(a,b){return this.dependencies[a]=b,this},resolve:function(){var a,b,c,d=this,e=!1;"string"==typeof arguments[0]?(a=arguments[1],b=arguments[0].replace(/ /g,"").split(","),c=arguments[2]||{}):(a=arguments[0],b=a.toString().match(/^function\s*[^\(]*\(\s*([^\)]*)\)/m)[1].replace(/ /g,"").split(","),c=arguments[1]||{});for(var f=0;f<b.length;f++)"undefined"!=typeof this.dependencies[b[f]]&&(e=!0);return e?function(){for(var e=[],f=Array.prototype.slice.call(arguments,0),g=0;g<b.length;g++){var h=b[g];if("undefined"!=typeof d.dependencies[h]){var i=d.dependencies[h];"function"==typeof i?i.prototype.host=c:"object"==typeof i&&(i.host=c),e.push(i)}else e.push(f.shift())}return a.apply(c,e)}:a},resolveObject:function(a){if("object"==typeof a)for(var b in a)"function"==typeof a[b]?a[b]=this.resolve(a[b],a):a[b]instanceof Array&&2==a[b].length&&"string"==typeof a[b][0]&&"function"==typeof a[b][1]&&(a[b]=this.resolve(a[b][0],a[b][1],a));return this},flush:function(){return this.dependencies={},this}};return a},d.api.add=function(a){var b=e("../helpers/Extend"),c=e("../helpers/Prefixes"),d=[],f={combineSelectors:!0,preventCombining:["@font-face"]},g=function(b,d,e,f,g){var i=c.nonPrefixProp(d),j=a.getPlugins()[i.prop];if("undefined"!=typeof j){var k=j(a,e,i.prefix);return k&&h(b,k,f,g),!0}return!1},h=function(a,b,e,i){if(e=e||"mainstream",null!==b&&"undefined"!=typeof b&&b!==!1)if(i||a||(a=""),"undefined"!=typeof b.classify&&b.classify===!0&&(b="undefined"!=typeof b.toJSON?b.toJSON():b.toString()),/, ?/g.test(a)&&f.combineSelectors)for(var j=a.replace(/, /g,",").split(","),k=0;k<j.length,p=j[k];k++)h(p,b,e,i);else if(!g(null,a,b,e,i))if("undefined"==typeof b.length||"object"!=typeof b){var l={},m=a,n={},o={};for(var q in b){b[q]&&"undefined"!=typeof b[q].classify&&b[q].classify===!0&&(b[q]="undefined"!=typeof b[q].toJSON?b[q].toJSON():b[q].toString());var r=typeof b[q];"object"!==r&&"function"!==r&&b[q]!==!1&&b[q]!==!0?g(a,q,b[q],e,i)===!1&&(m=0===m.indexOf("^")?m.substr(1,m.length-1)+("undefined"!=typeof i?" "+i:""):"undefined"!=typeof i?i+" "+a:a,l[q]=b[q],c.addPrefixes(q,l)):"object"===r?n[q]=b[q]:"function"===r&&(o[q]=b[q])}d.push({selector:m,props:l,stylesheet:e});for(var q in n)if(":"===q.charAt(0))h(a+q,n[q],e,i);else if(/&/g.test(q))if(/, ?/g.test(q)&&f.combineSelectors)for(var j=q.replace(/, /g,",").split(","),k=0;k<j.length,p=j[k];k++)p.indexOf("&")>=0?h(p.replace(/&/g,a),n[q],e,i):h(p,n[q],e,"undefined"!=typeof i?i+" "+a:a);else h(q.replace(/&/g,a),n[q],e,i);else 0===q.indexOf("@media")||0===q.indexOf("@supports")?h(a,n[q],q,i):0===a.indexOf("@media")||0===q.indexOf("@supports")?h(q,n[q],a,i):0===a.indexOf("^")?h(a.substr(1,a.length-1)+("undefined"!=typeof i?" "+i:"")+" "+q,n[q],e):g(a,q,n[q],e,i)===!1&&h(q,n[q],e,(i?i+" ":"")+a);for(var q in o){var s={};s[q]=o[q](),h(a,s,e,i)}}else for(var k=0;k<b.length,q=b[k];k++)h(a,q,e,i)},i=function(c,e,g){if(a.jsonify)return b(a.getRules(e||"mainstream"),c),a;try{d=[],a.numOfAddedRules+=1,"object"==typeof e&&"undefined"==typeof g&&(f={combineSelectors:"undefined"!=typeof e.combineSelectors?e.combineSelectors:f.combineSelectors,preventCombining:f.preventCombining.concat(e.preventCombining||[])},e=null),"undefined"!=typeof g&&(f={combineSelectors:g.combineSelectors||f.combineSelectors,preventCombining:f.preventCombining.concat(g.preventCombining||[])});var i,j=a.defaultProcessor.type;for(var k in c)h(k,c[k],e||"mainstream");for(var l=0;l<d.length;l++){var e=d[l].stylesheet,k=d[l].selector,m=d[l].props,n=a.getRules(e),o=f&&f.preventCombining?"|"+f.preventCombining.join("|"):"",i=o.indexOf("|"+k)>=0?"~~"+a.numOfAddedRules+"~~":"",p=n[i+k]||{};for(var q in m){var r=m[q];q=i+q,"object"!=typeof r&&(p[q]="css"==j?"+"===r.toString().charAt(0)?p&&p[q]?p[q]+", "+r.substr(1,r.length-1):r.substr(1,r.length-1):">"===r.toString().charAt(0)?p&&p[q]?p[q]+" "+r.substr(1,r.length-1):r.substr(1,r.length-1):r:r)}n[i+k]=p}return a}catch(s){throw new Error("Error adding: "+JSON.stringify({rules:c,error:s.toString()}))}};return i};var z=e("../helpers/Extend");d.api.compile=function(a){return function(){for(var b=null,c=function(){},d=null,e=0;e<arguments.length;e++)switch(typeof arguments[e]){case"function":c=arguments[e];break;case"string":b=arguments[e];break;case"object":d=arguments[e]}var f={combineSelectors:!0,minify:!1,keepCamelCase:!1,processor:a.defaultProcessor,api:a};return d=z(f,d||{}),d.processor(a.getRules(),function(d,e){if(null!=b)try{var f=e;"object"==typeof f&&(f=JSON.stringify(f)),C.writeFile(b,f,function(a){c(a,e)})}catch(d){c.apply({},arguments)}else c.apply({},arguments);a.flush()},d)}},d.api.compileFile=function(a){return a.compile};var A=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e};d.api.darken=function(){return function(a,b){return A(a,-(b/100))}},d.api.define=function(a){return function(b,c){return a.getStorage().__defined||(a.getStorage().__defined={}),a.getStorage().__defined[b]=c,a}},d.api.hook=function(a){return function(b,c){return a.addHook(b,c),a}},d.api.importCSS=function(a){var b=e("../helpers/CSSParse");return function(c){try{var d=b(c);a.handlecss(d,"")}catch(e){console.log("Error in the CSS: '"+c+"'",e,e.stack)}return a}};var A=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e};d.api.lighten=function(){return function(a,b){return A(a,b/100)}};var B={html:function(a){a.defaultProcessor=e(f+"/../processors/html/HTML.js")(),a.hook("add",function(b,c){return a.getRules(c||"mainstream").push(b),!0})},component:function(a){a.defaultProcessor=e(f+"/../processors/component/Component.js")(),a.hook("add",function(b){b instanceof Array||(b=[b]);for(var d=0;d<b.length,c=b[d];d++)a.getRules("mainstream").push(c);return!0})},jsonify:function(a){a.jsonify=!0}};d.api.morph=function(a){return function(b){return B[b]&&(a.flush(),B[b](a)),a}},d.api.plugin=function(a){var b=function(b,c){return a.getPlugins()[b]=c,a};return b},d.api.raw=function(a){return function(b){var c={},d={},e="____raw_"+a.numOfAddedRules;return d[e]=b,c[e]=d,a.add(c),a}};{var C=e("fs");e("path")}d.api.rawImport=function(a){var b=function(b){var c=C.readFileSync(b,{encoding:"utf8"});a.raw(c)};return function(c){var d,e,f;if("string"==typeof c)b(c);else for(e=0,f=c.length;f>e;e++)d=c[e],b(d);return a}},d.api.register=function(a){return function(b,c){return a[b]=c,a}},d.api.storage=function(a){var b=a.getStorage(),c=function(d,e){if("undefined"!=typeof e)b[d]=e;else{if("object"!=typeof d){if(b[d])return b[d];throw new Error("There is no data in the storage associated with '"+d+"'")}for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&c(f,d[f])}return a};return c};var D=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;d.helpers.CSSParse=function(a,c){function d(a){var b=a.match(/\n/g);b&&(F+=b.length);var c=a.lastIndexOf("\n");G=~c?a.length-c:G+a.length}function e(){var a={line:F,column:G};return c.position?function(b){return b.position=new f(a),n(),b}:g}function f(a){this.start=a,this.end={line:F,column:G},this.source=c.source}function g(a){return n(),a}function h(b){var d=new Error(b+" near line "+F+":"+G);throw d.filename=c.source,d.line=F,d.column=G,d.source=a,d}function i(){return{type:"stylesheet",stylesheet:{rules:l()}}}function j(){return m(/^{\s*/)}function k(){return m(/^}/)}function l(){var b,c=[];for(n(),o(c);a.length&&"}"!=a.charAt(0)&&(b=C()||E());)c.push(b),o(c);return c}function m(b){var c=b.exec(a);if(c){var e=c[0];return d(e),a=a.slice(e.length),c}}function n(){m(/^\s*/)}function o(a){var b;for(a=a||[];b=p();)a.push(b);return a}function p(){var b=e();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var c=2;""!=a.charAt(c)&&("*"!=a.charAt(c)||"/"!=a.charAt(c+1));)++c;if(c+=2,""===a.charAt(c-1))return h("End of comment missing");var f=a.slice(2,c-2);return G+=2,d(f),a=a.slice(c),G+=2,b({type:"comment",comment:f})}}function q(){var a=m(/^([^{]+)/);if(a)return b(a[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").split(/\s*,\s*/)}function r(){var a=e(),c=m(/^(\*?[-#\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);if(c){if(c=b(c[0]),!m(/^:\s*/))return h("property missing ':'");var d=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);if(!d)return h("property missing value");var f=a({type:"declaration",property:c.replace(D,""),value:b(d[0]).replace(D,"")});return m(/^[;\s]*/),f}}function s(){var a=[];if(!j())return h("missing '{'");o(a);for(var b;b=r();)a.push(b),o(a);return k()?a:h("missing '}'")}function t(){for(var a,b=[],c=e();a=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)b.push(a[1]),m(/^,\s*/);return b.length?c({type:"keyframe",values:b,declarations:s()}):void 0}function u(){var a=e(),b=m(/^@([-\w]+)?keyframes */);if(b){var c=b[1],b=m(/^([-\w]+)\s*/);if(!b)return h("@keyframes missing name");var d=b[1];if(!j())return h("@keyframes missing '{'");for(var f,g=o();f=t();)g.push(f),g=g.concat(o());return k()?a({type:"keyframes",name:d,vendor:c,keyframes:g}):h("@keyframes missing '}'")}}function v(){var a=e(),c=m(/^@supports *([^{]+)/);if(c){var d=b(c[1]);if(!j())return h("@supports missing '{'");var f=o().concat(l());return k()?a({type:"supports",supports:d,rules:f}):h("@supports missing '}'")}}function w(){var a=e(),b=m(/^@host */);if(b){if(!j())return h("@host missing '{'");var c=o().concat(l());return k()?a({type:"host",rules:c}):h("@host missing '}'")}}function x(){var a=e(),c=m(/^@media *([^{]+)/);if(c){var d=b(c[1]);if(!j())return h("@media missing '{'");var f=o().concat(l());return k()?a({type:"media",media:d,rules:f}):h("@media missing '}'")}}function y(){var a=e(),b=m(/^@page */);if(b){var c=q()||[];if(!j())return h("@page missing '{'");for(var d,f=o();d=r();)f.push(d),f=f.concat(o());return k()?a({type:"page",selectors:c,declarations:f}):h("@page missing '}'")}}function z(){var a=e(),c=m(/^@([-\w]+)?document *([^{]+)/);if(c){var d=b(c[1]),f=b(c[2]);if(!j())return h("@document missing '{'");var g=o().concat(l());return k()?a({type:"document",document:f,vendor:d,rules:g}):h("@document missing '}'")}}function A(){var a=e(),b=m(/^@font-face */);if(b){if(!j())return h("@font-face missing '{'");for(var c,d=o();c=r();)d.push(c),d=d.concat(o());return k()?a({type:"font-face",declarations:d}):h("@font-face missing '}'")}}function B(a){var b=new RegExp("^@"+a+" *([^;\\n]+);");return function(){var c=e(),d=m(b);if(d){var f={type:a};return f[a]=d[1].trim(),c(f)}}}function C(){return"@"==a[0]?u()||x()||v()||H()||I()||J()||z()||y()||w()||A():void 0}function E(){var a=e(),b=q();return b?(o(),a({type:"rule",selectors:b,declarations:s()})):h("selector missing")}c=c||{},c.position=c.position===!1?!1:!0;var F=1,G=1;f.prototype.content=a;var H=B("import"),I=B("charset"),J=B("namespace");return i()},d.helpers.Clone=function X(a){if(!a)return a;var b,c=[Number,String,Boolean];if(c.forEach(function(c){a instanceof c&&(b=c(a))}),"undefined"==typeof b)if("[object Array]"===Object.prototype.toString.call(a))b=[],a.forEach(function(a,c){b[c]=X(a)});else if("object"==typeof a)if(a.nodeType&&"function"==typeof a.cloneNode)var b=a.cloneNode(!0);else if(a.prototype)b=a;else if(a instanceof Date)b=new Date(a);else{b={};for(var d in a)b[d]=X(a[d])}else b=a;return b},d.helpers.ColorLuminance=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e},d.helpers.Extend=function(){for(var a=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},b=arguments[0],c=1;c<arguments.length;c++)b=a(b,arguments[c]);return b};var E=function(a){var b,c;return(c=a.match(/^\-(w|m|s|o)+\-/)||"-"===a.charAt(0))?null!==c&&c[0]?(b={prefix:c[0].replace(/-/g,"")},b.prop=a.replace(c[0],"")):(b={prefix:""},b.prop=a.substr(1,a.length)):b={prefix:!1,prop:a},b};d.helpers.Prefixes={addPrefixes:function(a,b){var c=a,d=E(a),e=b[a];d.prefix!==!1&&(delete b[c],b[d.prop]=e,(""===d.prefix||d.prefix.indexOf("w")>=0)&&(b["-webkit-"+d.prop]=e),(""===d.prefix||d.prefix.indexOf("m")>=0)&&(b["-moz-"+d.prop]=e),(""===d.prefix||d.prefix.indexOf("s")>=0)&&(b["-ms-"+d.prop]=e),(""===d.prefix||d.prefix.indexOf("o")>=0)&&(b["-o-"+d.prop]=e))},nonPrefixProp:function(a){var b=E(a);return b.prefix!==!1&&(b.prefix=""==b.prefix?"-":"-"+b.prefix+"-"),b}},d.helpers.RequireUncached=function(a){return delete e.cache[e.resolve(a)],e(a)},d.helpers.TransformUppercase=function(a){for(var b="",d=0;c=a.charAt(d);d++)b+=c===c.toUpperCase()&&c.toLowerCase()!==c.toUpperCase()?"-"+c.toLowerCase():c;return b};var F=function(a,b,d){var g="",h="",i=[],j=d.api;cssPreprocessor=e(f+"/../css/CSS.js")(),htmlPreprocessor=e(f+"/../html/HTML.js")();for(var k=function(a){for(var b=0;b<i.length,component=i[b];b++)"function"==typeof component&&(component=component()),j.add(component.css?component.css:{});cssPreprocessor(j.getRules(),function(b,c){g+=c,a(b)},d)},l=function(b){var c=0,e=null,f=function(){if(c>a.length-1)return void b(e);var g=a[c];"function"==typeof g&&(g=g()),j.morph("html").add(g.html?g.html:{}),htmlPreprocessor(j.getRules(),function(a,b){h+=b,c+=1,e=a,f()},d)};f()},m=function(a){for(var b in a)if("_include"===b)if(a[b]instanceof Array)for(var d=0;d<a[b].length,c=a[b][d];d++)"function"==typeof c&&(c=c()),i.push(c),m(c);else"function"==typeof a[b]&&(a[b]=a[b]()),i.push(a[b]),m(a[b]);else"object"==typeof a[b]&&m(a[b])},n=0;n<a.length,c=a[n];n++)"function"==typeof c&&(c=c()),i.push(c),m(c);
j.flush(),k(function(a){j.morph("html"),l(function(c){b(a||c?{error:{css:a,html:c}}:null,g,h)})})};d.processors.component.Component=function(){var a=function(a,b,c){F(a.mainstream,b,c)};return a.type="component",a};var G="\n",H={combineSelectors:!0,minify:!1,keepCamelCase:!1},I=e("../../helpers/TransformUppercase"),z=e("../../helpers/Extend"),J=function(a,b,c){var d="";c=c||[""," "];for(var e in a)if(0===e.indexOf("____raw"))d+=a[e][e]+G;else{var f=c[0]+e.replace(/~~(.+)~~/,"")+" {"+G,g="";for(var h in a[e]){var i=a[e][h];""===i&&(i='""'),h=h.replace(/~~(.+)~~/,""),h=h.replace(/^%(.*)+?%/,""),g+=b&&b.keepCamelCase===!0?c[1]+h+": "+i+";"+G:c[1]+I(h)+": "+i+";"+G}""!=g&&(f+=g,f+=c[0]+"}"+G,d+=f)}return d},K=function(a){var b={};for(var c in a){var d=a[c];if("mainstream"==c)for(var e in d){b[e]={};for(var f in d[e])b[e][f]=d[e][f]}else if(c.indexOf("@media")>=0){b[c]={};for(var e in d){b[c][e]={};for(var f in d[e])b[c][e][f]=d[e][f]}}}return b},L=function(a,b){var c=[],d={},b=[].concat(b||[]);b.splice(0,0,""),b=b.join("|");for(var e in a){var f=a[e];for(var g in f)c.push({selector:e,prop:g,value:f[g],combine:b.indexOf("|"+g)<0})}for(var h=0;h<c.length;h++)if(c[h].combine===!0&&c[h].selector!==!1)for(var i=h+1;i<c.length;i++)c[h].prop===c[i].prop&&c[h].value===c[i].value&&(c[h].selector+=", "+c[i].selector,c[i].selector=!1);for(var h=0;h<c.length;h++)c[h].selector!==!1&&(d[c[h].selector]||(d[c[h].selector]={}),d[c[h].selector][c[h].prop]=c[h].value);return d},M=function(a){return a=a.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),a=a.replace(/ {2,}/g," "),a=a.replace(/ ([{:}]) /g,"$1"),a=a.replace(/([;,]) /g,"$1"),a=a.replace(/ !/g,"!")},N=function(a,b){if(b&&b.api&&b.api.getStorage().__defined){var c=b.api.getStorage().__defined;for(var d in c){var e=new RegExp("<%( )?"+d+"( )?%>","g");a="function"!=typeof c[d]?a.replace(e,c[d]):a.replace(e,c[d]())}}return a};d.processors.css.CSS=function(){var a=function(a,b,c){if(c=c||H,c.api&&c.api.jsonify){var d=K(a,c);return b(null,d),d}var e="";for(var f in a){var g=a[f];g=c.combineSelectors?L(g,c.preventCombining):g,e+="mainstream"===f?J(g,c):f+" {"+G+J(g,c,[" "," "])+"}"+G}return e=N(e,c),c.minify?(e=M(e),b&&b(null,e)):b&&b(null,e),e};return a.type="css",a},d.processors.css.plugins.charset=function(){return function(a,b){"string"==typeof b?a.raw('@charset: "'+b+'";'):"object"==typeof b&&(b=b.charset.replace(/:/g,"").replace(/'/g,"").replace(/"/g,"").replace(/ /g,""),a.raw('@charset: "'+b+'";'))}},d.processors.css.plugins.document=function(){return function(a,b){if("object"==typeof b){var c="";if(c+="@"+b.vendor+"document",c+=" "+b.document,b.rules&&b.rules.length)for(var d=0;rule=b.rules[d];d++)a.handlecssrule(rule,c);else"undefined"!=typeof b.styles&&a.add(b.styles,c)}}},d.processors.css.plugins.keyframes=function(){return function(a,b){e(f+"/../CSS.js")(),e(f+"/../../../helpers/Prefixes");if("object"==typeof b){var c;if("undefined"!=typeof b.frames)c=b.frames;else if("undefined"!=typeof b.keyframes){c={};for(var d=0;rule=b.keyframes[d];d++)if("keyframe"===rule.type)for(var g=c[rule.values]={},h=0;declaration=rule.declarations[h];h++)"declaration"===declaration.type&&(g[declaration.property]=declaration.value)}if(a.jsonify){var i={};i.keyframes={name:b.name,frames:c},a.add(i)}else{var j=e(f+"/../../../../")();j.add(c).compile(function(c,d){var e="@keyframes "+b.name+" {\n";e+=d,e+="}",e=e+"\n"+e.replace("@keyframes","@-webkit-keyframes"),a.raw(e)},{combineSelectors:!1})}}}},d.processors.css.plugins.media=function(){return function(a,b){var c=e(f+"/../CSS.js")();if("object"==typeof b){for(var d="@media "+b.media+" {\n",g={},h={},i=0;rule=b.rules[i];i++){var j=g[rule.selectors.toString()]={},k=h[rule.selectors.toString()]={};if("rule"===rule.type)for(var l=0;declaration=rule.declarations[l];l++)"declaration"===declaration.type&&(j[declaration.property]=declaration.value,k[declaration.property]=declaration.value)}d+=c({mainstream:g}),d+="}",a.jsonify?a.add(h,"@media "+b.media):a.raw(d)}}},d.processors.css.plugins.namespace=function(){return function(a,b){"string"==typeof b?a.raw('@namespace: "'+b+'";'):"object"==typeof b&&(b=b.namespace.replace(/: /g,"").replace(/'/g,"").replace(/"/g,"").replace(/ /g,"").replace(/:h/g,"h"),a.raw('@namespace: "'+b+'";'))}},d.processors.css.plugins.page=function(){return function(a,b){if("object"==typeof b){var c="";c+=b.selectors.length>0?"@page "+b.selectors.join(", ")+" {\n":"@page {\n";for(var d=0;declaration=b.declarations[d];d++)"declaration"==declaration.type&&(c+=" "+declaration.property+": "+declaration.value+";\n");c+="}",a.raw(c)}}},d.processors.css.plugins.supports=function(){return function(a,b){var c=e(f+"/../CSS.js")();if("object"==typeof b){for(var d="@supports "+b.supports+" {\n",g={},h=0;rule=b.rules[h];h++){var i=g[rule.selectors.toString()]={};if("rule"===rule.type)for(var j=0;declaration=rule.declarations[j];j++)"declaration"===declaration.type&&(i[declaration.property]=declaration.value)}d+=c({mainstream:g}),d+="}",a.raw(d)}}};var O=null,G="\n",H={},P=e("js-beautify").html,Q=e("../../helpers/TransformUppercase"),R={},S=function(a){var b="";for(var c in O)if(c==a)for(var d=O[c].length,e=0;d>e;e++)b+=U("",O[c][e]);return b},T=function(a,b){return b&&b.keepCamelCase===!0?a:Q(a,b)},U=function(a,b){var c="",d="",f="",g=e("./helpers/PropAnalyzer")(a);if(a=g.tag,""!=g.attrs&&(d+=" "+g.attrs),"string"==typeof b||null===b)return V(a,d,b);var h=function(a){""!=f&&(f+=G),f+=a};for(var i in b){var j=b[i];switch(i){case"_attrs":for(var k in j)d+="function"==typeof j[k]?" "+T(k,R)+'="'+j[k]()+'"':" "+T(k,R)+'="'+j[k]+'"';break;case"_":h(j);break;case"_tpl":if("string"==typeof j)h(S(j));else if(j instanceof Array){for(var l="",m=0;tpl=j[m];m++)l+=S(tpl),m<j.length-1&&(l+=G);h(l)}break;case"_include":var l="",n=function(a){"function"==typeof a&&(a=a()),a.css&&a.html&&(a=a.html),l+=U("",a)};if(j instanceof Array)for(var m=0;m<j.length,o=j[m];m++)n(o);else"object"==typeof j&&n(j);h(l);break;default:switch(typeof j){case"string":h(U(i,j));break;case"object":if(j&&j.length&&j.length>0){for(var l="",m=0;v=j[m];m++)l+=U("","function"==typeof v?v():v),m<j.length-1&&(l+=G);h(U(i,l))}else h(U(i,j));break;case"function":h(U(i,j()))}}}return c+=""!=a?V(a,d,f):f},V=function(a,b,c){var d="";return""==a&&""==b&&""!=c?c:(a=""==a?"div":a,d+=null!==c?"<"+T(a,R)+b+">"+G+c+G+"</"+T(a,R)+">":"<"+T(a,R)+b+"/>")},W=function(a){return a=e("./helpers/TemplateEngine")(a.replace(/[\r\t\n]/g,""),R),R.minify?a:P(a,{indent_size:R.indentSize||4})};return d.processors.html.HTML=function(){var a=function(a,b,c){O=a,b=b||function(){},c=R=c||H;var d=W(S("mainstream"));return b(null,d),d};return a.type="html",a},d.processors.html.helpers.PropAnalyzer=function(a){var b={tag:"",attrs:""},d=(a.length,""),e=!1,f=[],g="",h=!1,i="",j=!1;if(/(#|\.|\[|\])/gi.test(a)===!1)return{tag:a,attrs:""};for(var k=0;k<a.length,c=a[k];k++)"["!==c||j?j?"]"!=c?i+=c:(j=!1,k-=1):"."!==c||e?e?"."!=c&&"#"!=c&&"["!=c&&"]"!=c?d+=c:(f.push(d),e=!1,d="",k-=1):"#"!==c||h?h?"."!=c&&"#"!=c&&"["!=c&&"]"!=c?g+=c:(h=!1,k-=1):"."!=c&&"#"!=c&&"["!=c&&"]"!=c&&(b.tag+=c):h=!0:e=!0:j=!0;""!=d&&f.push(d);for(var l="",k=0;cls=f[k];k++)l+=""===l?cls:" "+cls;return b.attrs+=""!=l?'class="'+l+'"':"",""!=g&&(b.attrs+=(""!=b.attrs?" ":"")+'id="'+g+'"'),""===b.tag&&""!=b.attrs&&(b.tag="div"),""!=i&&(b.attrs+=(""!=b.attrs?" ":"")+i),b},d.processors.html.helpers.TemplateEngine=function(a,b){for(var c,d=/<%(.+?)%>/g,e=/(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,f="with(obj) { var r=[];\n",g=0,h=function(a,b){return f+=b?a.match(e)?a+"\n":"r.push("+a+");\n":""!=a?'r.push("'+a.replace(/"/g,'\\"')+'");\n':"",h};match=d.exec(a);)h(a.slice(g,match.index))(match[1],!0),g=match.index+match[0].length;h(a.substr(g,a.length-g)),f=(f+'return r.join(""); }').replace(/[\r\t\n]/g,"");try{c=new Function("obj",f).apply(b,[b])}catch(i){console.error("'"+i.message+"'"," in \n\nCode:\n",f,"\n")}return c},y()}(window);
var Absurd=function(){function b(a){return a?a.replace(/^\s+|\s+$/g,""):""}var d={api:{},helpers:{},plugins:{},processors:{css:{plugins:{}},html:{plugins:{},helpers:{}},component:{plugins:{}}}},e=function(a){return a.indexOf("css/CSS.js")>0||"/../CSS.js"==a?d.processors.css.CSS:a.indexOf("html/HTML.js")>0?d.processors.html.HTML:a.indexOf("component/Component.js")>0?d.processors.component.Component:"js-beautify"==a?{html:function(a){return a}}:"./helpers/PropAnalyzer"==a?d.processors.html.helpers.PropAnalyzer:"../../helpers/TransformUppercase"==a?d.helpers.TransformUppercase:"./helpers/TemplateEngine"==a?d.processors.html.helpers.TemplateEngine:"../helpers/Extend"==a?d.helpers.Extend:"../helpers/Clone"==a?d.helpers.Clone:"../helpers/Prefixes"==a||"/../../../helpers/Prefixes"==a?d.helpers.Prefixes:a==f+"/../../../../"?Absurd:"../helpers/CSSParse"==a?d.helpers.CSSParse:function(){}},f="",g=function(a,b){!function c(){a.length>0&&a.shift().apply(b||{},[c].concat(Array.prototype.slice.call(arguments,0)))}()},h=function(a){var b={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],body:[0,"",""],_default:[1,"<div>","</div>"]};b.optgroup=b.option,b.tbody=b.tfoot=b.colgroup=b.caption=b.thead,b.th=b.td;var c=/<\s*\w.*?>/g.exec(a),d=document.createElement("div");if(null!=c){var e=c[0].replace(/</g,"").replace(/>/g,"").split(" ")[0];if("body"===e.toLowerCase()){var f=(document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),document.createElement("body"));d.innerHTML=a.replace(/<body/g,"<div").replace(/<\/body>/g,"</div>");var g=d.firstChild.attributes;f.innerHTML=a;for(var h=0;h<g.length;h++)f.setAttribute(g[h].name,g[h].value);return f}var d,i=b[e]||b._default;a=i[1]+a+i[2],d.innerHTML=a;for(var j=i[0]+1;j--;)d=d.lastChild}else d.innerHTML=a,d=d.lastChild;return d},i=function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),!0):a.attachEvent?a.attachEvent("on"+b,c):void 0},j=function(a){for(var b,c=a.childNodes,d=c.length,e=0,f=/^\s*$/;d>e;e++)b=c[e],3==b.nodeType&&f.test(b.nodeValue)&&(a.removeChild(b),e--,d--);return a},k=function(b,c,d){for(var e=document.createElement(b),f=0;f<c.length,a=c[f];f++)e.setAttribute(a.name,a.value);return e.innerHTML=d,e},l=function(a,b){return b=b===!1?document:b||this.el||document,b.querySelector(a)},m=function(a,b){return b=b===!1?document:b||this.el||document,b.querySelectorAll(a)},n=function(a,b){return b=b||this.el,b&&b.currentStyle?b.currentStyle[a]:window.getComputedStyle?document.defaultView.getComputedStyle(b,null).getPropertyValue(a):null},q=function(a,b){if(b=b||this.el,b.classList)b.classList.add(a);else{var c=b.className;c.indexOf(a)<0&&(""==c?b.className=a:b.className+=" "+a)}return this},r=function(a,b){if(b=b||this.el,b.classList)b.classList.remove(a);else{for(var c=b.className.split(" "),d=[],e=0;e<c.length;e++)c[e]!=a&&d.push(c[e]);b.className=d.join(" ")}return this},s=function(a,b,c){c=c||this.el;for(var d=c.className.split(" "),e=!1,f=0;f<d.length;f++)d[f]==a&&(e=!0,d[f]=b);return e?(c.className=d.join(" "),this):q(b,c)},t=function(a,b){if(b=b||this.el,b.classList)b.classList.toggle(a);else{for(var c=b.className.split(" "),d=-1,e=c.length;e--;)c[e]===a&&(d=e);d>=0?c.splice(d,1):c.push(a),b.className=c.join(" ")}return this},u=function(a,b,c){return b instanceof Array&&(c=b,b=this),b||(b=this),function(){a.apply(b,(c||[]).concat(Array.prototype.slice.call(arguments,0)))}},w=function(a,b,c,e){var f=d.helpers.Extend({__name:a},e),o=d.helpers.Extend,p=[];f.listeners=p,f.on=function(a,b,c){return p[a]||(p[a]=[]),p[a].push({callback:b,scope:c}),this},f.off=function(a,b){return p[a]?(b||(p[a]=[]),this):this},f.dispatch=function(a,b,d){if(!b||"object"!=typeof b||b instanceof Array||(b.target=this),p[a])for(var e=0;e<p[a].length;e++){var f=p[a][e].callback;f.apply(d||p[a][e].scope||{},[b])}return this[a]&&"function"==typeof this[a]&&this[a](b),c&&c.dispatch(a,b),this};var v={};f.set=function(a,b){return v[a]=b,this},f.get=function(a){return v[a]};var w=!1;f.__handleCSS=function(c){return this.css?b.flush().add(this.css).compile(function(b,d){if(w)w.raw!==d&&(w.raw=d,w.element.innerHTML=d);else{var e=k("style",[{name:"id",value:a+"-css"},{name:"type",value:"text/css"}],d);(l("head")||l("body")).appendChild(e),w={raw:d,element:e}}c()}):c(),this},f.applyCSS=function(a,b,c){if(this.html&&"string"==typeof this.html&&!b){var d={};d[this.html]=a,a=d}return this.css=a,c||this.populate(),this};var x=!1;f.__mergeDOMElements=function(a,b){if(j(a),j(b),"undefined"!=typeof a&&"undefined"!=typeof b&&!a.isEqualNode(b)){if(a.nodeName!==b.nodeName)return void(a.parentNode&&a.parentNode.replaceChild(b,a));if(a.nodeValue!==b.nodeValue&&(a.nodeValue=b.nodeValue),a.attributes){for(var c,d,e=a.attributes,g=b.attributes,h={},i=0;i<e.length,c=e[i];i++){for(var k=0;k<g.length,d=g[k];k++)c.name===d.name&&(a.setAttribute(c.name,d.value),h[c.name]=!0);h[c.name]||a.removeAttribute(c.name)}for(var i=0;i<g.length,d=g[i];i++)h[d.name]||a.setAttribute(d.name,d.value)}var l=[];if(a.childNodes.length>=b.childNodes.length)for(var i=0;i<a.childNodes.length;i++)b.childNodes[i]||b.appendChild(document.createTextNode("")),l.push([a.childNodes[i],b.childNodes[i]]);else for(var i=0;i<b.childNodes.length;i++)a.appendChild(document.createTextNode("")),l.push([a.childNodes[i],b.childNodes[i]]);for(var i=0;i<l.length;i++)f.__mergeDOMElements(l[i][0],l[i][1])}},f.__handleHTML=function(a){var c=this,d=function(){b.flush().morph("html").add(x).compile(function(b,d){c.el?f.__mergeDOMElements(c.el,h(d)):c.el=h(d),a()},c)};if(this.html)if("string"==typeof this.html){if(!this.el){var e=l(this.html);e&&(this.el=e,x={"":this.el.outerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">")})}d()}else"object"==typeof this.html?(x=o({},this.html),d()):a();else a();return this},f.applyHTML=function(a,b){return this.html=a,b||this.populate(),this};var y=!1;f.__append=function(a){return!y&&this.el&&this.get("parent")&&(y=!0,this.get("parent").appendChild(this.el)),a(),this};var z={events:{}};f.__handleEvents=function(a){if(this.el){var b=this,c=function(a){var c=a.getAttribute("data-absurd-event"),d=function(c){if(c=c.split(":"),c.length>=2){var d=c[0],e=c[1];c.splice(0,2);var f=c;(!z.events[d]||z.events[d].indexOf(a)<0)&&(z.events[d]||(z.events[d]=[]),z.events[d].push(a),i(a,d,function(a){if("function"==typeof b[e]){var c=b[e];c.apply(b,[a].concat(f))}}))}};c=c.split(/, ?/g);for(var e=0;e<c.length;e++)d(c[e])};this.el.hasAttribute&&this.el.hasAttribute("data-absurd-event")&&c(this.el);for(var d=this.el.querySelectorAll?this.el.querySelectorAll("[data-absurd-event]"):[],e=0;e<d.length;e++)c(d[e])}return a(),this},f.__getAnimAndTransEndEventName=function(a){if(a){var b,c={animation:["animationend","transitionend"],OAnimation:["oAnimationEnd","oTransitionEnd"],MozAnimation:["animationend","transitionend"],WebkitAnimation:["webkitAnimationEnd","webkitTransitionEnd"]};for(b in c)if(void 0!==a.style[b])return c[b]}},f.onAnimationEnd=function(a,b){1==arguments.length&&(b=a,a=this.el);var c=this,d=f.__getAnimAndTransEndEventName(a);return d?void this.addEventListener(a,d[0],function(a){b.apply(c,[a])}):void b.apply(this,[{error:"Animations not supported."}])},f.onTransitionEnd=function(a,b){1==arguments.length&&(b=a,a=this.el);var c=this,d=f.__getAnimAndTransEndEventName(a);return d?void this.addEventListener(a,d[1],function(a){b.apply(c,[a])}):void b.apply(this,[{error:"Animations not supported."}])};var A={funcs:{},index:0};f.__handleAsyncFunctions=function(a){if(this.el){var b=[];if(this.el.hasAttribute&&this.el.hasAttribute("data-absurd-async"))b.push(this.el);else for(var c=this.el.querySelectorAll?this.el.querySelectorAll("[data-absurd-async]"):[],d=0;d<c.length;d++)b.push(c[d]);if(0===b.length)a();else{var e=this;!function f(){if(0===b.length)a();else{var c=b.shift(),d=c.getAttribute("data-absurd-async"),g=function(a){"string"==typeof a?c.parentNode.replaceChild(h(a),c):c.parentNode.replaceChild(a,c),f()};"function"==typeof e[A.funcs[d].name]?e[A.funcs[d].name].apply(e,[g].concat(A.funcs[d].args)):"function"==typeof A.funcs[d].func&&A.funcs[d].func.apply(e,[g].concat(A.funcs[d].args))}}()}}else a();return this},f.async=function(){var a=Array.prototype.slice.call(arguments,0),b=a.shift(),c="_"+A.index++;return A.funcs[c]={args:a,name:b},'<script data-absurd-async="'+c+'"></script>'},f.child=function(){var a=Array.prototype.slice.call(arguments,0),b=this.get("children"),c=b&&b[a.shift()],d="_"+A.index++;return A.funcs[d]={args:a,func:function(a){c.populate({callback:function(b){a(b.html.element)}})}},'<script data-absurd-async="'+d+'"></script>'},f.wire=function(a){return b.components.events.on(a,this[a]||function(){},this),this};var B=!1;return f.populate=function(a){return B?void 0:(B=!0,g([f.__handleCSS,f.__handleHTML,f.__append,f.__handleEvents,f.__handleAsyncFunctions,function(){B=!1,A={funcs:{},index:0};var b={css:w,html:{element:this.el}};this.dispatch("populated",b),a&&"function"==typeof a.callback&&a.callback(b)}],this),this)},f.str2DOMElement=h,f.addEventListener=i,f.queue=g,f.qs=l,f.qsa=m,f.getStyle=n,f.addClass=q,f.removeClass=r,f.replaceClass=s,f.bind=u,f.toggleClass=t,f.compileHTML=function(a,c,d){b.flush().morph("html").add(a).compile(c,d)},f.compileCSS=function(a,c,d){b.flush().add(a).compile(c,d)},f.delay=function(a,b,c){var d=this;setTimeout(function(){b.apply(d,c)},a)},f},x=function(a){a.di.register("is",{appended:function(a){return"undefined"==typeof a&&(a=this.host.html),l(a)?!0:!1},hidden:function(a){return a=a||this.host.el,null===a.offsetParent}}),a.di.register("router",{routes:[],mode:null,root:"/",getFragment:function(){var a="";if("history"===this.mode){if(!location)return"";a=this.clearSlashes(decodeURI(location.pathname+location.search)),a=a.replace(/\?(.*)$/,""),a="/"!=this.root?a.replace(this.root,""):a}else{if(!window)return"";var b=window.location.href.match(/#(.*)$/);a=b?b[1]:""}return this.clearSlashes(a)},clearSlashes:function(a){return a.toString().replace(/\/$/,"").replace(/^\//,"")},add:function(a,b){return"function"==typeof a&&(b=a,a=""),this.routes.push({re:a,handler:b}),this},remove:function(a){for(var b,c=0;c<this.routes.length,b=this.routes[c];c++)if(b.handler===a||b.re===a)return this.routes.splice(c,1),this;return this},flush:function(){return this.routes=[],this.mode=null,this.root="/",this},config:function(a){return this.mode=a&&a.mode&&"history"==a.mode&&history.pushState?"history":"hash",this.root=a&&a.root?"/"+this.clearSlashes(a.root)+"/":"/",this},listen:function(a){var b=this,c=b.getFragment(),d=function(){c!==b.getFragment()&&(c=b.getFragment(),b.check(c))};return clearInterval(this.interval),this.interval=setInterval(d,a||50),this},check:function(a){for(var b=a||this.getFragment(),c=0;c<this.routes.length;c++){var d=b.match(this.routes[c].re);if(d)return d.shift(),this.routes[c].handler.apply(this.host||{},d),this}return this},navigate:function(a){return a=a?a:"","history"===this.mode?history.pushState(null,null,this.root+this.clearSlashes(a)):(window.location.href.match(/#(.*)$/),window.location.href=window.location.href.replace(/#(.*)$/,"")+"#"+a),this}}),a.di.register("ajax",{request:function(a){"string"==typeof a&&(a={url:a}),a.url=a.url||"",a.method=a.method||"get",a.data=a.data||{};var b=function(a,b){var c,d=[];for(var e in a)d.push(e+"="+encodeURIComponent(a[e]));return c=d.join("&"),""!=c?b?b.indexOf("?")<0?"?"+c:"&"+c:c:""},c={host:this.host||{},process:function(a){var c=this;return this.xhr=null,window.ActiveXObject?this.xhr=new ActiveXObject("Microsoft.XMLHTTP"):window.XMLHttpRequest&&(this.xhr=new XMLHttpRequest),this.xhr&&(this.xhr.onreadystatechange=function(){if(4==c.xhr.readyState&&200==c.xhr.status){var b=c.xhr.responseText;a.json===!0&&"undefined"!=typeof JSON&&(b=JSON.parse(b)),c.doneCallback&&c.doneCallback.apply(c.host,[b,c.xhr])}else 4==c.xhr.readyState&&c.failCallback&&c.failCallback.apply(c.host,[c.xhr]);c.alwaysCallback&&c.alwaysCallback.apply(c.host,[c.xhr])},"get"==a.method?this.xhr.open("GET",a.url+b(a.data,a.url),!0):(this.xhr.open(a.method,a.url,!0),this.setHeaders({"X-Requested-With":"XMLHttpRequest","Content-type":"application/x-www-form-urlencoded"})),a.headers&&"object"==typeof a.headers&&this.setHeaders(a.headers),setTimeout(function(){"get"==a.method?c.xhr.send():c.xhr.send(b(a.data))},20)),this},done:function(a){return this.doneCallback=a,this},fail:function(a){return this.failCallback=a,this},always:function(a){return this.alwaysCallback=a,this},setHeaders:function(a){for(var b in a)this.xhr&&this.xhr.setRequestHeader(b,a[b])}};return c.process(a)}});var b=function(a,c){var d=b.prototype.host,e={el:null};switch(typeof a){case"undefined":e.el=d.el;break;case"string":c=c&&"string"==typeof c?l.apply(d,[c]):c,e.el=l(a,c||d.el||document);break;case"object":if("undefined"==typeof a.nodeName){var f=function(a,b){b=b||this;for(var c in b)"undefined"!=typeof b[c].el?b[c]=b[c].val(a):"object"==typeof b[c]&&(b[c]=f(a,b[c]));return delete b.val,b},g={val:f};for(var h in a)g[h]=b.apply(this,[a[h]]);return g}e.el=a}return e.val=function(a){if(!this.el)return null;var b=!!a,d=function(a){return b?(this.el.value=a,e):this.el.value};switch(this.el.nodeName.toLowerCase()){case"input":var f=this.el.getAttribute("type");if("radio"!=f&&"checkbox"!=f)return d.apply(this,[a]);for(var g=m('[name="'+this.el.getAttribute("name")+'"]',c),h=[],i=0;i<g.length;i++)b&&g[i].checked&&g[i].value!==a?g[i].removeAttribute("checked"):b&&g[i].value===a?(g[i].setAttribute("checked","checked"),g[i].checked="checked"):g[i].checked&&h.push(g[i].value);if(!b)return"radio"==f?h[0]:h;break;case"textarea":return d.apply(this,[a]);case"select":if(!b)return this.el.value;for(var j=m("option",this.el),i=0;i<j.length;i++)j[i].getAttribute("value")===a?this.el.selectedIndex=i:j[i].removeAttribute("selected");break;default:if(!b)return"undefined"!=typeof this.el.textContent?this.el.textContent:"undefined"!=typeof this.el.innerText?typeof this.el.innerText:this.el.innerHTML;this.el.innerHTML=a}return b?e:null},e.dom=function(a,c){return b(a,c||e.el)},e};a.di.register("dom",b);var c=function(b,d,e){var f=c.prototype.host,g=!(!window||!window.matchMedia||e);if(g){var h=window.matchMedia(b);d.apply(f,[h.matches,h.media]),h.addListener(function(a){d.apply(f,[a.matches,a.media])})}else{var i=".match-media-"+a.components.numOfComponents,j={},k={};j[i]={display:"block"},j[i]["@media "+b]={display:"none"},k["span"+i]="",a.component(i+"-component",{css:j,html:k,intervaliTime:30,status:"",loop:function(){var a=this;if(this.el){var b=this.getStyle("display");this.status!=b&&(this.status=b,d.apply(f,["none"===b]))}setTimeout(function(){a.loop()},this.intervaliTime)},constructor:["dom",function(a){var b=this;this.set("parent",a("body").el).populate(),setTimeout(function(){b.loop()},this.intervaliTime)}]})()}};a.di.register("mq",c)},y=function(){return function(a){var b=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},e={defaultProcessor:d.processors.css.CSS()},f={},g={},i={},j={};e.getRules=function(a){return"undefined"==typeof a?f:("undefined"==typeof f[a]&&(f[a]=[]),f[a])},e.getPlugins=function(){return i},e.getStorage=function(){return g},e.flush=function(){return f={},g=[],j={},e.defaultProcessor=d.processors.css.CSS(),e},e.import=function(){return e.callHooks("import",arguments)?e:e},e.handlecss=function(a,b){var c=e.getPlugins();if(a&&"stylesheet"===a.type&&a.stylesheet&&a.stylesheet.rules)for(var d=a.stylesheet.rules,f=0;rule=d[f];f++)switch(rule.type){case"rule":e.handlecssrule(rule);break;case"import":e.handlecssimport(rule,b);break;default:c[rule.type]&&c[rule.type](e,rule)}return e},e.handlecssimport=function(){return e},e.handlecssrule=function(a,c){var d={},f={};if(a.declarations&&a.declarations.length>0){for(var g=0;decl=a.declarations[g];g++)"declaration"===decl.type&&(f[decl.property]=decl.value);if(a.selectors&&a.selectors.length>0)for(var g=0;selector=a.selectors[g];g++)d[selector]=b({},f);e.add(d,c)}return e},e.addHook=function(a,b){j[a]||(j[a]=[]);for(var d=!1,e=0;c=j[a][e];e++)c===b&&(d=!0);d===!1?j[a].push(b):null},e.callHooks=function(a,b){if(j[a])for(var d=0;c=j[a][d];d++)if(c.apply(e,b)===!0)return!0;return!1},e.numOfAddedRules=0,e.components=function(a){var b=d.helpers.Extend,c=d.helpers.Clone,e={},f=[],g=b({},w()),h={};return function(a){window&&(window.addEventListener?window.addEventListener("load",a):window.attachEvent&&window.attachEvent("onload",a))}(function(){h.broadcast("ready")}),h={numOfComponents:0,events:g,register:function(d,h){return this.numOfComponents+=1,e[d]=function(){var e=b({},w(d,a,g,c(h)));return a.di.resolveObject(e),f.push(e),"function"==typeof e.constructor&&e.constructor.apply(e,Array.prototype.slice.call(arguments,0)),e}},get:function(a){if(e[a])return e[a];throw new Error("There is no component with name '"+a+"'.")},remove:function(a){return e[a]?(delete e[a],!0):!1},list:function(){var a=[];for(var b in e)a.push(b);return a},flush:function(){return e={},f=[],this},broadcast:function(a,b){for(var c=0;c<f.length,instance=f[c];c++)"function"==typeof instance[a]&&instance[a](b);return this}}}(e),e.component=function(a){return function(b,c){return"undefined"==typeof c?a.components.get(b):a.components.register(b,c)}}(e),e.di=d.DI(e),x(e),e.compile=function(a,c){if(e.callHooks("compile",arguments))return e;var d={combineSelectors:!0,minify:!1,processor:e.defaultProcessor,keepCamelCase:!1,api:e};c=b(d,c||{});var f=c.processor(e.getRules(),a||function(){},c);return e.flush(),f};for(var k in d.api)"compile"!==k&&(e[k]=d.api[k](e),e[k]=function(a){return function(){var b=d.api[a](e);return e.callHooks(a,arguments)?e:b.apply(e,arguments)}}(k));for(var l in d.processors.css.plugins)e.plugin(l,d.processors.css.plugins[l]());return"function"==typeof a&&a(e),"undefined"!=typeof Organic&&Organic.init(e),e.utils={str2DOMElement:h},e}};d.DI=function(){var a={dependencies:{},register:function(a,b){return this.dependencies[a]=b,this},resolve:function(){var a,b,c,d=this,e=!1;"string"==typeof arguments[0]?(a=arguments[1],b=arguments[0].replace(/ /g,"").split(","),c=arguments[2]||{}):(a=arguments[0],b=a.toString().match(/^function\s*[^\(]*\(\s*([^\)]*)\)/m)[1].replace(/ /g,"").split(","),c=arguments[1]||{});for(var f=0;f<b.length;f++)"undefined"!=typeof this.dependencies[b[f]]&&(e=!0);return e?function(){for(var e=[],f=Array.prototype.slice.call(arguments,0),g=0;g<b.length;g++){var h=b[g];if("undefined"!=typeof d.dependencies[h]){var i=d.dependencies[h];"function"==typeof i?i.prototype.host=c:"object"==typeof i&&(i.host=c),e.push(i)}else e.push(f.shift())}return a.apply(c,e)}:a},resolveObject:function(a){if("object"==typeof a)for(var b in a)"function"==typeof a[b]?a[b]=this.resolve(a[b],a):a[b]instanceof Array&&2==a[b].length&&"string"==typeof a[b][0]&&"function"==typeof a[b][1]&&(a[b]=this.resolve(a[b][0],a[b][1],a));return this},flush:function(){return this.dependencies={},this}};return a},d.api.add=function(a){var b=e("../helpers/Extend"),c=e("../helpers/Prefixes"),d=[],f={combineSelectors:!0,preventCombining:["@font-face"]},g=function(b,d,e,f,g){var i=c.nonPrefixProp(d),j=a.getPlugins()[i.prop];if("undefined"!=typeof j){var k=j(a,e,i.prefix);return k&&h(b,k,f,g),!0}return!1},h=function(a,b,e,i){if(e=e||"mainstream",null!==b&&"undefined"!=typeof b&&b!==!1)if(i||a||(a=""),"undefined"!=typeof b.classify&&b.classify===!0&&(b="undefined"!=typeof b.toJSON?b.toJSON():b.toString()),/, ?/g.test(a)&&f.combineSelectors)for(var j=a.replace(/, /g,",").split(","),k=0;k<j.length,p=j[k];k++)h(p,b,e,i);else if(!g(null,a,b,e,i))if("undefined"==typeof b.length||"object"!=typeof b){var l={},m=a,n={},o={};for(var q in b){b[q]&&"undefined"!=typeof b[q].classify&&b[q].classify===!0&&(b[q]="undefined"!=typeof b[q].toJSON?b[q].toJSON():b[q].toString());var r=typeof b[q];"object"!==r&&"function"!==r&&b[q]!==!1&&b[q]!==!0?g(a,q,b[q],e,i)===!1&&(m=0===m.indexOf("^")?m.substr(1,m.length-1)+("undefined"!=typeof i?" "+i:""):"undefined"!=typeof i?i+" "+a:a,l[q]=b[q],c.addPrefixes(q,l)):"object"===r?n[q]=b[q]:"function"===r&&(o[q]=b[q])}d.push({selector:m,props:l,stylesheet:e});for(var q in n)if(":"===q.charAt(0))h(a+q,n[q],e,i);else if(/&/g.test(q))if(/, ?/g.test(q)&&f.combineSelectors)for(var j=q.replace(/, /g,",").split(","),k=0;k<j.length,p=j[k];k++)p.indexOf("&")>=0?h(p.replace(/&/g,a),n[q],e,i):h(p,n[q],e,"undefined"!=typeof i?i+" "+a:a);else h(q.replace(/&/g,a),n[q],e,i);else 0===q.indexOf("@media")||0===q.indexOf("@supports")?h(a,n[q],q,i):0===a.indexOf("@media")||0===q.indexOf("@supports")?h(q,n[q],a,i):0===a.indexOf("^")?h(a.substr(1,a.length-1)+("undefined"!=typeof i?" "+i:"")+" "+q,n[q],e):g(a,q,n[q],e,i)===!1&&h(q,n[q],e,(i?i+" ":"")+a);for(var q in o){var s={};s[q]=o[q](),h(a,s,e,i)}}else for(var k=0;k<b.length,q=b[k];k++)h(a,q,e,i)},i=function(c,e,g){if(a.jsonify)return b(a.getRules(e||"mainstream"),c),a;try{d=[],a.numOfAddedRules+=1,"object"==typeof e&&"undefined"==typeof g&&(f={combineSelectors:"undefined"!=typeof e.combineSelectors?e.combineSelectors:f.combineSelectors,preventCombining:f.preventCombining.concat(e.preventCombining||[])},e=null),"undefined"!=typeof g&&(f={combineSelectors:g.combineSelectors||f.combineSelectors,preventCombining:f.preventCombining.concat(g.preventCombining||[])});var i,j=a.defaultProcessor.type;for(var k in c)h(k,c[k],e||"mainstream");for(var l=0;l<d.length;l++){var e=d[l].stylesheet,k=d[l].selector,m=d[l].props,n=a.getRules(e),o=f&&f.preventCombining?"|"+f.preventCombining.join("|"):"",i=o.indexOf("|"+k)>=0?"~~"+a.numOfAddedRules+"~~":"",p=n[i+k]||{};for(var q in m){var r=m[q];q=i+q,"object"!=typeof r&&(p[q]="css"==j?"+"===r.toString().charAt(0)?p&&p[q]?p[q]+", "+r.substr(1,r.length-1):r.substr(1,r.length-1):">"===r.toString().charAt(0)?p&&p[q]?p[q]+" "+r.substr(1,r.length-1):r.substr(1,r.length-1):r:r)}n[i+k]=p}return a}catch(s){throw new Error("Error adding: "+JSON.stringify({rules:c,error:s.toString()}))}};return i};var z=e("../helpers/Extend");d.api.compile=function(a){return function(){for(var b=null,c=function(){},d=null,e=0;e<arguments.length;e++)switch(typeof arguments[e]){case"function":c=arguments[e];break;case"string":b=arguments[e];break;case"object":d=arguments[e]}var f={combineSelectors:!0,minify:!1,keepCamelCase:!1,processor:a.defaultProcessor,api:a};return d=z(f,d||{}),d.processor(a.getRules(),function(d,e){if(null!=b)try{var f=e;"object"==typeof f&&(f=JSON.stringify(f)),C.writeFile(b,f,function(a){c(a,e)})}catch(d){c.apply({},arguments)}else c.apply({},arguments);a.flush()},d)}},d.api.compileFile=function(a){return a.compile};var A=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e};d.api.darken=function(){return function(a,b){return A(a,-(b/100))}},d.api.define=function(a){return function(b,c){return a.getStorage().__defined||(a.getStorage().__defined={}),a.getStorage().__defined[b]=c,a}},d.api.hook=function(a){return function(b,c){return a.addHook(b,c),a}},d.api.importCSS=function(a){var b=e("../helpers/CSSParse");return function(c){try{var d=b(c);a.handlecss(d,"")}catch(e){console.log("Error in the CSS: '"+c+"'",e,e.stack)}return a}};var A=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e};d.api.lighten=function(){return function(a,b){return A(a,b/100)}};var B={html:function(a){a.defaultProcessor=e(f+"/../processors/html/HTML.js")(),a.hook("add",function(b,c){return a.getRules(c||"mainstream").push(b),!0})},component:function(a){a.defaultProcessor=e(f+"/../processors/component/Component.js")(),a.hook("add",function(b){b instanceof Array||(b=[b]);for(var d=0;d<b.length,c=b[d];d++)a.getRules("mainstream").push(c);return!0})},jsonify:function(a){a.jsonify=!0}};d.api.morph=function(a){return function(b){return B[b]&&(a.flush(),B[b](a)),a}},d.api.plugin=function(a){var b=function(b,c){return a.getPlugins()[b]=c,a};return b},d.api.raw=function(a){return function(b){var c={},d={},e="____raw_"+a.numOfAddedRules;return d[e]=b,c[e]=d,a.add(c),a}};{var C=e("fs");e("path")}d.api.rawImport=function(a){var b=function(b){var c=C.readFileSync(b,{encoding:"utf8"});a.raw(c)};return function(c){var d,e,f;if("string"==typeof c)b(c);else for(e=0,f=c.length;f>e;e++)d=c[e],b(d);return a}},d.api.register=function(a){return function(b,c){return a[b]=c,a}},d.api.storage=function(a){var b=a.getStorage(),c=function(d,e){if("undefined"!=typeof e)b[d]=e;else{if("object"!=typeof d){if(b[d])return b[d];throw new Error("There is no data in the storage associated with '"+d+"'")}for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&c(f,d[f])}return a};return c};var D=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;d.helpers.CSSParse=function(a,c){function d(a){var b=a.match(/\n/g);b&&(F+=b.length);var c=a.lastIndexOf("\n");G=~c?a.length-c:G+a.length}function e(){var a={line:F,column:G};return c.position?function(b){return b.position=new f(a),n(),b}:g}function f(a){this.start=a,this.end={line:F,column:G},this.source=c.source}function g(a){return n(),a}function h(b){var d=new Error(b+" near line "+F+":"+G);throw d.filename=c.source,d.line=F,d.column=G,d.source=a,d}function i(){return{type:"stylesheet",stylesheet:{rules:l()}}}function j(){return m(/^{\s*/)}function k(){return m(/^}/)}function l(){var b,c=[];for(n(),o(c);a.length&&"}"!=a.charAt(0)&&(b=C()||E());)c.push(b),o(c);return c}function m(b){var c=b.exec(a);if(c){var e=c[0];return d(e),a=a.slice(e.length),c}}function n(){m(/^\s*/)}function o(a){var b;for(a=a||[];b=p();)a.push(b);return a}function p(){var b=e();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var c=2;""!=a.charAt(c)&&("*"!=a.charAt(c)||"/"!=a.charAt(c+1));)++c;if(c+=2,""===a.charAt(c-1))return h("End of comment missing");var f=a.slice(2,c-2);return G+=2,d(f),a=a.slice(c),G+=2,b({type:"comment",comment:f})}}function q(){var a=m(/^([^{]+)/);if(a)return b(a[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").split(/\s*,\s*/)}function r(){var a=e(),c=m(/^(\*?[-#\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);if(c){if(c=b(c[0]),!m(/^:\s*/))return h("property missing ':'");var d=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);if(!d)return h("property missing value");var f=a({type:"declaration",property:c.replace(D,""),value:b(d[0]).replace(D,"")});return m(/^[;\s]*/),f}}function s(){var a=[];if(!j())return h("missing '{'");o(a);for(var b;b=r();)a.push(b),o(a);return k()?a:h("missing '}'")}function t(){for(var a,b=[],c=e();a=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)b.push(a[1]),m(/^,\s*/);return b.length?c({type:"keyframe",values:b,declarations:s()}):void 0}function u(){var a=e(),b=m(/^@([-\w]+)?keyframes */);if(b){var c=b[1],b=m(/^([-\w]+)\s*/);if(!b)return h("@keyframes missing name");var d=b[1];if(!j())return h("@keyframes missing '{'");for(var f,g=o();f=t();)g.push(f),g=g.concat(o());return k()?a({type:"keyframes",name:d,vendor:c,keyframes:g}):h("@keyframes missing '}'")}}function v(){var a=e(),c=m(/^@supports *([^{]+)/);if(c){var d=b(c[1]);if(!j())return h("@supports missing '{'");var f=o().concat(l());return k()?a({type:"supports",supports:d,rules:f}):h("@supports missing '}'")}}function w(){var a=e(),b=m(/^@host */);if(b){if(!j())return h("@host missing '{'");var c=o().concat(l());return k()?a({type:"host",rules:c}):h("@host missing '}'")}}function x(){var a=e(),c=m(/^@media *([^{]+)/);if(c){var d=b(c[1]);if(!j())return h("@media missing '{'");var f=o().concat(l());return k()?a({type:"media",media:d,rules:f}):h("@media missing '}'")}}function y(){var a=e(),b=m(/^@page */);if(b){var c=q()||[];if(!j())return h("@page missing '{'");for(var d,f=o();d=r();)f.push(d),f=f.concat(o());return k()?a({type:"page",selectors:c,declarations:f}):h("@page missing '}'")}}function z(){var a=e(),c=m(/^@([-\w]+)?document *([^{]+)/);if(c){var d=b(c[1]),f=b(c[2]);if(!j())return h("@document missing '{'");var g=o().concat(l());return k()?a({type:"document",document:f,vendor:d,rules:g}):h("@document missing '}'")}}function A(){var a=e(),b=m(/^@font-face */);if(b){if(!j())return h("@font-face missing '{'");for(var c,d=o();c=r();)d.push(c),d=d.concat(o());return k()?a({type:"font-face",declarations:d}):h("@font-face missing '}'")}}function B(a){var b=new RegExp("^@"+a+" *([^;\\n]+);");return function(){var c=e(),d=m(b);if(d){var f={type:a};return f[a]=d[1].trim(),c(f)}}}function C(){return"@"==a[0]?u()||x()||v()||H()||I()||J()||z()||y()||w()||A():void 0}function E(){var a=e(),b=q();return b?(o(),a({type:"rule",selectors:b,declarations:s()})):h("selector missing")}c=c||{},c.position=c.position===!1?!1:!0;var F=1,G=1;f.prototype.content=a;var H=B("import"),I=B("charset"),J=B("namespace");return i()},d.helpers.Clone=function X(a){if(!a)return a;var b,c=[Number,String,Boolean];if(c.forEach(function(c){a instanceof c&&(b=c(a))}),"undefined"==typeof b)if("[object Array]"===Object.prototype.toString.call(a))b=[],a.forEach(function(a,c){b[c]=X(a)});else if("object"==typeof a)if(a.nodeType&&"function"==typeof a.cloneNode)var b=a.cloneNode(!0);else if(a.prototype)b=a;else if(a instanceof Date)b=new Date(a);else{b={};for(var d in a)b[d]=X(a[d])}else b=a;return b},d.helpers.ColorLuminance=function(a,b){a=String(a).replace(/[^0-9a-f]/gi,""),a.length<6&&(a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),b=b||0;var c,d,e="#";for(d=0;3>d;d++)c=parseInt(a.substr(2*d,2),16),c=Math.round(Math.min(Math.max(0,c+c*b),255)).toString(16),e+=("00"+c).substr(c.length);return e},d.helpers.Extend=function(){for(var a=function(a,b){for(var c in b)hasOwnProperty.call(b,c)&&(a[c]=b[c]);return a},b=arguments[0],c=1;c<arguments.length;c++)b=a(b,arguments[c]);return b};var E=function(a){var b,c;return(c=a.match(/^\-(w|m|s|o)+\-/)||"-"===a.charAt(0))&&!a.match(/^\-(webkit|moz|ms)+\-/)?null!==c&&c[0]?(b={prefix:c[0].replace(/-/g,"")},b.prop=a.replace(c[0],"")):(b={prefix:""},b.prop=a.substr(1,a.length)):b={prefix:!1,prop:a},b};d.helpers.Prefixes={addPrefixes:function(a,b){var c=a,d=E(a),e=b[a];d.prefix!==!1&&(delete b[c],b[d.prop]=e,(""===d.prefix||d.prefix.indexOf("w")>=0)&&(b["-webkit-"+d.prop]=e),(""===d.prefix||d.prefix.indexOf("m")>=0)&&(b["-moz-"+d.prop]=e),(""===d.prefix||d.prefix.indexOf("s")>=0)&&(b["-ms-"+d.prop]=e),(""===d.prefix||d.prefix.indexOf("o")>=0)&&(b["-o-"+d.prop]=e))},nonPrefixProp:function(a){var b=E(a);return b.prefix!==!1&&(b.prefix=""==b.prefix?"-":"-"+b.prefix+"-"),b}},d.helpers.RequireUncached=function(a){return delete e.cache[e.resolve(a)],e(a)},d.helpers.TransformUppercase=function(a){for(var b="",d=0;c=a.charAt(d);d++)b+=c===c.toUpperCase()&&c.toLowerCase()!==c.toUpperCase()?"-"+c.toLowerCase():c;return b};var F=function(a,b,d){var g="",h="",i=[],j=d.api;cssPreprocessor=e(f+"/../css/CSS.js")(),htmlPreprocessor=e(f+"/../html/HTML.js")();for(var k=function(a){for(var b=0;b<i.length,component=i[b];b++)"function"==typeof component&&(component=component()),j.add(component.css?component.css:{});cssPreprocessor(j.getRules(),function(b,c){g+=c,a(b)},d)},l=function(b){var c=0,e=null,f=function(){if(c>a.length-1)return void b(e);var g=a[c];"function"==typeof g&&(g=g()),j.morph("html").add(g.html?g.html:{}),htmlPreprocessor(j.getRules(),function(a,b){h+=b,c+=1,e=a,f()},d)};f()},m=function(a){for(var b in a)if("_include"===b)if(a[b]instanceof Array)for(var d=0;d<a[b].length,c=a[b][d];d++)"function"==typeof c&&(c=c()),i.push(c),m(c);else"function"==typeof a[b]&&(a[b]=a[b]()),i.push(a[b]),m(a[b]);else"object"==typeof a[b]&&m(a[b])
},n=0;n<a.length,c=a[n];n++)"function"==typeof c&&(c=c()),i.push(c),m(c);j.flush(),k(function(a){j.morph("html"),l(function(c){b(a||c?{error:{css:a,html:c}}:null,g,h)})})};d.processors.component.Component=function(){var a=function(a,b,c){F(a.mainstream,b,c)};return a.type="component",a};var G="\n",H={combineSelectors:!0,minify:!1,keepCamelCase:!1},I=e("../../helpers/TransformUppercase"),z=e("../../helpers/Extend"),J=function(a,b,c){var d="";c=c||[""," "];for(var e in a)if(0===e.indexOf("____raw"))d+=a[e][e]+G;else{var f=c[0]+e.replace(/~~(.+)~~/,"")+" {"+G,g="";for(var h in a[e]){var i=a[e][h];""===i&&(i='""'),h=h.replace(/~~(.+)~~/,""),h=h.replace(/^%(.*)+?%/,""),g+=b&&b.keepCamelCase===!0?c[1]+h+": "+i+";"+G:c[1]+I(h)+": "+i+";"+G}""!=g&&(f+=g,f+=c[0]+"}"+G,d+=f)}return d},K=function(a){var b={};for(var c in a){var d=a[c];if("mainstream"==c)for(var e in d){b[e]={};for(var f in d[e])b[e][f]=d[e][f]}else if(c.indexOf("@media")>=0){b[c]={};for(var e in d){b[c][e]={};for(var f in d[e])b[c][e][f]=d[e][f]}}}return b},L=function(a,b){var c=[],d={},b=[].concat(b||[]);b.splice(0,0,""),b=b.join("|");for(var e in a){var f=a[e];for(var g in f)c.push({selector:e,prop:g,value:f[g],combine:b.indexOf("|"+g)<0})}for(var h=0;h<c.length;h++)if(c[h].combine===!0&&c[h].selector!==!1)for(var i=h+1;i<c.length;i++)c[h].prop===c[i].prop&&c[h].value===c[i].value&&(c[h].selector+=", "+c[i].selector,c[i].selector=!1);for(var h=0;h<c.length;h++)c[h].selector!==!1&&(d[c[h].selector]||(d[c[h].selector]={}),d[c[h].selector][c[h].prop]=c[h].value);return d},M=function(a){return a=a.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,""),a=a.replace(/ {2,}/g," "),a=a.replace(/ ([{:}]) /g,"$1"),a=a.replace(/([;,]) /g,"$1"),a=a.replace(/ !/g,"!")},N=function(a,b){if(b&&b.api&&b.api.getStorage().__defined){var c=b.api.getStorage().__defined;for(var d in c){var e=new RegExp("<%( )?"+d+"( )?%>","g");a="function"!=typeof c[d]?a.replace(e,c[d]):a.replace(e,c[d]())}}return a};d.processors.css.CSS=function(){var a=function(a,b,c){if(c=c||H,c.api&&c.api.jsonify){var d=K(a,c);return b(null,d),d}var e="";for(var f in a){var g=a[f];g=c.combineSelectors?L(g,c.preventCombining):g,e+="mainstream"===f?J(g,c):f+" {"+G+J(g,c,[" "," "])+"}"+G}return e=N(e,c),c.minify?(e=M(e),b&&b(null,e)):b&&b(null,e),e};return a.type="css",a},d.processors.css.plugins.charset=function(){return function(a,b){"string"==typeof b?a.raw('@charset: "'+b+'";'):"object"==typeof b&&(b=b.charset.replace(/:/g,"").replace(/'/g,"").replace(/"/g,"").replace(/ /g,""),a.raw('@charset: "'+b+'";'))}},d.processors.css.plugins.document=function(){return function(a,b){if("object"==typeof b){var c="";if(c+="@"+b.vendor+"document",c+=" "+b.document,b.rules&&b.rules.length)for(var d=0;rule=b.rules[d];d++)a.handlecssrule(rule,c);else"undefined"!=typeof b.styles&&a.add(b.styles,c)}}},d.processors.css.plugins.keyframes=function(){return function(a,b){e(f+"/../CSS.js")(),e(f+"/../../../helpers/Prefixes");if("object"==typeof b){var c;if("undefined"!=typeof b.frames)c=b.frames;else if("undefined"!=typeof b.keyframes){c={};for(var d=0;rule=b.keyframes[d];d++)if("keyframe"===rule.type)for(var g=c[rule.values]={},h=0;declaration=rule.declarations[h];h++)"declaration"===declaration.type&&(g[declaration.property]=declaration.value)}if(a.jsonify){var i={};i.keyframes={name:b.name,frames:c},a.add(i)}else{var j=e(f+"/../../../../")();j.add(c).compile(function(c,d){var e="@keyframes "+b.name+" {\n";e+=d,e+="}",e=e+"\n"+e.replace("@keyframes","@-webkit-keyframes"),a.raw(e)},{combineSelectors:!1})}}}},d.processors.css.plugins.media=function(){return function(a,b){var c=e(f+"/../CSS.js")();if("object"==typeof b){for(var d="@media "+b.media+" {\n",g={},h={},i=0;rule=b.rules[i];i++){var j=g[rule.selectors.toString()]={},k=h[rule.selectors.toString()]={};if("rule"===rule.type)for(var l=0;declaration=rule.declarations[l];l++)"declaration"===declaration.type&&(j[declaration.property]=declaration.value,k[declaration.property]=declaration.value)}d+=c({mainstream:g}),d+="}",a.jsonify?a.add(h,"@media "+b.media):a.raw(d)}}},d.processors.css.plugins.namespace=function(){return function(a,b){"string"==typeof b?a.raw('@namespace: "'+b+'";'):"object"==typeof b&&(b=b.namespace.replace(/: /g,"").replace(/'/g,"").replace(/"/g,"").replace(/ /g,"").replace(/:h/g,"h"),a.raw('@namespace: "'+b+'";'))}},d.processors.css.plugins.page=function(){return function(a,b){if("object"==typeof b){var c="";c+=b.selectors.length>0?"@page "+b.selectors.join(", ")+" {\n":"@page {\n";for(var d=0;declaration=b.declarations[d];d++)"declaration"==declaration.type&&(c+=" "+declaration.property+": "+declaration.value+";\n");c+="}",a.raw(c)}}},d.processors.css.plugins.supports=function(){return function(a,b){var c=e(f+"/../CSS.js")();if("object"==typeof b){for(var d="@supports "+b.supports+" {\n",g={},h=0;rule=b.rules[h];h++){var i=g[rule.selectors.toString()]={};if("rule"===rule.type)for(var j=0;declaration=rule.declarations[j];j++)"declaration"===declaration.type&&(i[declaration.property]=declaration.value)}d+=c({mainstream:g}),d+="}",a.raw(d)}}};var O=null,G="\n",H={},P=e("js-beautify").html,Q=e("../../helpers/TransformUppercase"),R={},S=function(a){var b="";for(var c in O)if(c==a)for(var d=O[c].length,e=0;d>e;e++)b+=U("",O[c][e]);return b},T=function(a,b){return b&&b.keepCamelCase===!0?a:Q(a,b)},U=function(a,b){var c="",d="",f="",g=e("./helpers/PropAnalyzer")(a);if(a=g.tag,""!=g.attrs&&(d+=" "+g.attrs),"string"==typeof b||null===b)return V(a,d,b);var h=function(a){""!=f&&(f+=G),f+=a};for(var i in b){var j=b[i];switch(i){case"_attrs":for(var k in j)d+="function"==typeof j[k]?" "+T(k,R)+'="'+j[k]()+'"':" "+T(k,R)+'="'+j[k]+'"';break;case"_":h(j);break;case"_tpl":if("string"==typeof j)h(S(j));else if(j instanceof Array){for(var l="",m=0;tpl=j[m];m++)l+=S(tpl),m<j.length-1&&(l+=G);h(l)}break;case"_include":var l="",n=function(a){"function"==typeof a&&(a=a()),a.css&&a.html&&(a=a.html),l+=U("",a)};if(j instanceof Array)for(var m=0;m<j.length,o=j[m];m++)n(o);else"object"==typeof j&&n(j);h(l);break;default:switch(typeof j){case"string":h(U(i,j));break;case"object":if(j&&j.length&&j.length>0){for(var l="",m=0;v=j[m];m++)l+=U("","function"==typeof v?v():v),m<j.length-1&&(l+=G);h(U(i,l))}else h(U(i,j));break;case"function":h(U(i,j()))}}}return c+=""!=a?V(a,d,f):f},V=function(a,b,c){var d="";return""==a&&""==b&&""!=c?c:(a=""==a?"div":a,d+=null!==c?"<"+T(a,R)+b+">"+G+c+G+"</"+T(a,R)+">":"<"+T(a,R)+b+"/>")},W=function(a){return a=e("./helpers/TemplateEngine")(a.replace(/[\r\t\n]/g,""),R),R.minify?a:P(a,{indent_size:R.indentSize||4})};return d.processors.html.HTML=function(){var a=function(a,b,c){O=a,b=b||function(){},c=R=c||H;var d=W(S("mainstream"));return b(null,d),d};return a.type="html",a},d.processors.html.helpers.PropAnalyzer=function(a){var b={tag:"",attrs:""},d=(a.length,""),e=!1,f=[],g="",h=!1,i="",j=!1;if(/(#|\.|\[|\])/gi.test(a)===!1)return{tag:a,attrs:""};for(var k=0;k<a.length,c=a[k];k++)"["!==c||j?j?"]"!=c?i+=c:(j=!1,k-=1):"."!==c||e?e?"."!=c&&"#"!=c&&"["!=c&&"]"!=c?d+=c:(f.push(d),e=!1,d="",k-=1):"#"!==c||h?h?"."!=c&&"#"!=c&&"["!=c&&"]"!=c?g+=c:(h=!1,k-=1):"."!=c&&"#"!=c&&"["!=c&&"]"!=c&&(b.tag+=c):h=!0:e=!0:j=!0;""!=d&&f.push(d);for(var l="",k=0;cls=f[k];k++)l+=""===l?cls:" "+cls;return b.attrs+=""!=l?'class="'+l+'"':"",""!=g&&(b.attrs+=(""!=b.attrs?" ":"")+'id="'+g+'"'),""===b.tag&&""!=b.attrs&&(b.tag="div"),""!=i&&(b.attrs+=(""!=b.attrs?" ":"")+i),b},d.processors.html.helpers.TemplateEngine=function(a,b){for(var c,d=/<%(.+?)%>/g,e=/(^( )?(var|if|for|else|switch|case|break|{|}|;))(.*)?/g,f="with(obj) { var r=[];\n",g=0,h=function(a,b){return f+=b?a.match(e)?a+"\n":"r.push("+a+");\n":""!=a?'r.push("'+a.replace(/"/g,'\\"')+'");\n':"",h};match=d.exec(a);)h(a.slice(g,match.index))(match[1],!0),g=match.index+match[0].length;h(a.substr(g,a.length-g)),f=(f+'return r.join(""); }').replace(/[\r\t\n]/g,"");try{c=new Function("obj",f).apply(b,[b])}catch(i){console.error("'"+i.message+"'"," in \n\nCode:\n",f,"\n")}return c},y()}(window);

@@ -1,2 +0,2 @@

/* version: 0.3.19, born: 27-3-2014 12:56 */
/* version: 0.3.20, born: 5-4-2014 23:3 */
var Organic = (function(w){

@@ -3,0 +3,0 @@ var o = {

@@ -0,0 +0,0 @@ #!/usr/bin/env node

// http://docs.emmet.io/css-abbreviations/vendor-prefixes/ (w: webkit, m: moz, s: ms, o: o)
var prefixExtract = function(prop) {
var result, match;
if(match = prop.match(/^\-(w|m|s|o)+\-/) || prop.charAt(0) === '-') {
if((match = prop.match(/^\-(w|m|s|o)+\-/) || prop.charAt(0) === '-') && !prop.match(/^\-(webkit|moz|ms)+\-/)) {
if(match !== null && match[0]) {

@@ -6,0 +6,0 @@ result = { prefix: match[0].replace(/-/g, '') }

{
"name": "absurd",
"version": "0.3.19",
"version": "0.3.20",
"homepage": "http://absurdjs.com/",

@@ -5,0 +5,0 @@ "description": "JavaScript library with superpowers - http://absurdjs.com/",

@@ -20,3 +20,3 @@ # AbsurdJS

## What it does
## About

@@ -28,4 +28,4 @@ AbsurdJS was started as CSS preprocessor, but later it was expanded to a HTML preprocessor. So, at the moment you could transform:

## How
## Usage
```
var api = Absurd();

@@ -43,3 +43,3 @@ api.add({

});
```
## Official site, documentation and online compilator

@@ -54,3 +54,2 @@

=======
## Extended

@@ -78,3 +77,11 @@

=======
## Contributors
* [Krasimir Tsonev](https://github.com/krasimir) Creator of AbsurdJS
* [RayoGundead](https://github.com/RayoGundead)
* [Daniel Beauchamp](https://github.com/Xulai)
* [Matias Lescano](https://github.com/mjlescano)
* [Volkan Altınbaş](https://github.com/valtinbas)
* [John-David Dalton](https://github.com/jdalton)
## Resources

@@ -86,1 +93,5 @@

## Who's Using Absurd?
* [Crimasi](https://github.com/Crimasi) - [Ascend-Web](https://github.com/Crimasi/Ascend-Web)

@@ -1141,3 +1141,3 @@ lib.DI = function(api) {

var result, match;
if(match = prop.match(/^\-(w|m|s|o)+\-/) || prop.charAt(0) === '-') {
if((match = prop.match(/^\-(w|m|s|o)+\-/) || prop.charAt(0) === '-') && !prop.match(/^\-(webkit|moz|ms)+\-/)) {
if(match !== null && match[0]) {

@@ -1144,0 +1144,0 @@ result = { prefix: match[0].replace(/-/g, '') }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc