Skip to content

Instantly share code, notes, and snippets.

@gfranko

gfranko/index.js

Created Feb 10, 2014
Embed
What would you like to do?
requirebin sketch
// Checks to see if any CSS rule using inline-block also includes the IE6 and IE7 inline-block hack
// If the IE hacks are not there, they are added
var css = require('css'),
_ = require('lodash'),
exampleCSS = '.example-selector { display: inline-block; }',
ast = css.parse(exampleCSS);
_.each(ast.stylesheet.rules, function(rule) {
fixIEBugs(rule);
});
function hasDeclaration(declarations, prop, val) {
return _.where(declarations, { 'property': prop, 'value': val }).length;
};
function fixIEBugs(rule) {
var declarations = rule.declarations;
if(declarations.length) {
if(hasDeclaration(declarations, 'display', 'inline-block')) {
if(!hasDeclaration(declarations, '*display', 'inline')) {
declarations.push({
'property': '*display',
'type': 'declaration',
'value': 'inline'
});
}
if(!hasDeclaration(declarations, 'zoom', '1')) {
declarations.push({
'property': 'zoom',
'type': 'declaration',
'value': '1'
});
}
}
}
};
console.log(css.stringify(ast));
function hasDeclaration(n,e,t){return _.where(n,{property:e,value:t}).length}function fixIEBugs(n){var e=n.declarations;e.length&&hasDeclaration(e,"display","inline-block")&&(hasDeclaration(e,"*display","inline")||e.push({property:"*display",type:"declaration",value:"inline"}),hasDeclaration(e,"zoom","1")||e.push({property:"zoom",type:"declaration",value:"1"}))}require=function e(n,t,r){function i(u,a){if(!t[u]){if(!n[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(o)return o(u,!0);throw Error("Cannot find module '"+u+"'")}var c=t[u]={exports:{}};n[u][0].call(c.exports,function(e){var t=n[u][1][e];return i(t?t:e)},c,c.exports,e,n,t,r)}return t[u].exports}for(var o="function"==typeof require&&require,u=0;r.length>u;u++)i(r[u]);return i}({"6+RPT1":[function(n,e,t){t.parse=n("css-parse"),t.stringify=n("css-stringify")},{"css-parse":3,"css-stringify":4}],css:[function(n,e){e.exports=n("6+RPT1")},{}],3:[function(n,e){function t(n){return n?n.replace(/^\s+|\s+$/g,""):""}e.exports=function(n,e){function r(n){var e=n.match(/\n/g);e&&(O+=e.length);var t=n.lastIndexOf("\n");L=~t?n.length-t:L+n.length}function i(){var n={line:O,column:L};return e.position?function(t){return t.position={start:n,end:{line:O,column:L},source:e.source},p(),t}:o}function o(n){return p(),n}function u(t){var r=Error(t+" near line "+O+":"+L);throw r.filename=e.source,r.line=O,r.column=L,r.source=n,r}function a(){return{type:"stylesheet",stylesheet:{rules:l()}}}function s(){return f(/^{\s*/)}function c(){return f(/^}/)}function l(){var e,t=[];for(p(),h(t);"}"!=n.charAt(0)&&(e=R()||M());)t.push(e),h(t);return t}function f(e){var t=e.exec(n);if(t){var i=t[0];return r(i),n=n.slice(i.length),t}}function p(){f(/^\s*/)}function h(n){var e;for(n=n||[];e=m();)n.push(e);return n}function m(){var e=i();if("/"==n.charAt(0)&&"*"==n.charAt(1)){for(var t=2;null!=n.charAt(t)&&("*"!=n.charAt(t)||"/"!=n.charAt(t+1));)++t;t+=2;var o=n.slice(2,t-2);return L+=2,r(o),n=n.slice(t),L+=2,e({type:"comment",comment:o})}}function g(){var n=f(/^([^{]+)/);if(n)return t(n[0]).split(/\s*,\s*/)}function v(){var n=i(),e=f(/^(\*?[-#\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=t(e[0]),!f(/^:\s*/))return u("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);if(!r)return u("property missing value");var o=n({type:"declaration",property:e,value:t(r[0])});return f(/^[;\s]*/),o}}function d(){var n=[];if(!s())return u("missing '{'");h(n);for(var e;e=v();)n.push(e),h(n);return c()?n:u("missing '}'")}function y(){for(var n,e=[],t=i();n=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(n[1]),f(/^,\s*/);return e.length?t({type:"keyframe",values:e,declarations:d()}):void 0}function _(){var n=i(),e=f(/^@([-\w]+)?keyframes */);if(e){var t=e[1],e=f(/^([-\w]+)\s*/);if(!e)return u("@keyframes missing name");var r=e[1];if(!s())return u("@keyframes missing '{'");for(var o,a=h();o=y();)a.push(o),a=a.concat(h());return c()?n({type:"keyframes",name:r,vendor:t,keyframes:a}):u("@keyframes missing '}'")}}function b(){var n=i(),e=f(/^@supports *([^{]+)/);if(e){var r=t(e[1]);if(!s())return u("@supports missing '{'");var o=h().concat(l());return c()?n({type:"supports",supports:r,rules:o}):u("@supports missing '}'")}}function w(){var n=i(),e=f(/^@host */);if(e){if(!s())return u("@host missing '{'");var t=h().concat(l());return c()?n({type:"host",rules:t}):u("@host missing '}'")}}function C(){var n=i(),e=f(/^@media *([^{]+)/);if(e){var r=t(e[1]);if(!s())return u("@media missing '{'");var o=h().concat(l());return c()?n({type:"media",media:r,rules:o}):u("@media missing '}'")}}function x(){var n=i(),e=f(/^@page */);if(e){var t=g()||[];if(!s())return u("@page missing '{'");for(var r,o=h();r=v();)o.push(r),o=o.concat(h());return c()?n({type:"page",selectors:t,declarations:o}):u("@page missing '}'")}}function A(){var n=i(),e=f(/^@([-\w]+)?document *([^{]+)/);if(e){var r=t(e[1]),o=t(e[2]);if(!s())return u("@document missing '{'");var a=h().concat(l());return c()?n({type:"document",document:o,vendor:r,rules:a}):u("@document missing '}'")}}function S(){return E("import")}function j(){return E("charset")}function k(){return E("namespace")}function E(n){var e=i(),r=f(RegExp("^@"+n+" *([^;\\n]+);"));if(r){var o={type:n};return o[n]=t(r[1]),e(o)}}function R(){return"@"==n[0]?_()||C()||b()||S()||j()||k()||A()||x()||w():void 0}function M(){var n=i(),e=g();return e?(h(),n({type:"rule",selectors:e,declarations:d()})):void 0}e=e||{};var O=1,L=1;return a()}},{}],4:[function(n,e){var t=n("./lib/compress"),r=n("./lib/identity");e.exports=function(e,i){i=i||{};var o=i.compress?new t(i):new r(i);if(i.sourcemap){var u=n("./lib/source-map-support");u(o);var a=o.compile(e);return{code:a,map:o.map.toJSON()}}var a=o.compile(e);return a}},{"./lib/compress":6,"./lib/identity":7,"./lib/source-map-support":8}],5:[function(n,e){function t(n){this.options=n||{}}e.exports=t,t.prototype.emit=function(n){return n},t.prototype.visit=function(n){return this[n.type](n)},t.prototype.mapVisit=function(n,e){var t="";e=e||"";for(var r=0,i=n.length;i>r;r++)t+=this.visit(n[r]),e&&i-1>r&&(t+=this.emit(e));return t}},{}],6:[function(n,e){function t(n){r.call(this,n)}var r=n("./compiler");e.exports=t,t.prototype.__proto__=r.prototype,t.prototype.compile=function(n){return n.stylesheet.rules.map(this.visit,this).join("")},t.prototype.comment=function(n){return this.emit("",n.position)},t.prototype.import=function(n){return this.emit("@import "+n.import+";",n.position)},t.prototype.media=function(n){return this.emit("@media "+n.media,n.position,!0)+this.emit("{")+this.mapVisit(n.rules)+this.emit("}")},t.prototype.document=function(n){var e="@"+(n.vendor||"")+"document "+n.document;return this.emit(e,n.position,!0)+this.emit("{")+this.mapVisit(n.rules)+this.emit("}")},t.prototype.charset=function(n){return this.emit("@charset "+n.charset+";",n.position)},t.prototype.namespace=function(n){return this.emit("@namespace "+n.namespace+";",n.position)},t.prototype.supports=function(n){return this.emit("@supports "+n.supports,n.position,!0)+this.emit("{")+this.mapVisit(n.rules)+this.emit("}")},t.prototype.keyframes=function(n){return this.emit("@"+(n.vendor||"")+"keyframes "+n.name,n.position,!0)+this.emit("{")+this.mapVisit(n.keyframes)+this.emit("}")},t.prototype.keyframe=function(n){var e=n.declarations;return this.emit(n.values.join(","),n.position,!0)+this.emit("{")+this.mapVisit(e)+this.emit("}")},t.prototype.page=function(n){var e=n.selectors.length?n.selectors.join(", "):"";return this.emit("@page "+e,n.position,!0)+this.emit("{")+this.mapVisit(n.declarations)+this.emit("}")},t.prototype.rule=function(n){var e=n.declarations;return e.length?this.emit(n.selectors.join(","),n.position,!0)+this.emit("{")+this.mapVisit(e)+this.emit("}"):""},t.prototype.declaration=function(n){return this.emit(n.property+":"+n.value,n.position)+this.emit(";")}},{"./compiler":5}],7:[function(n,e){function t(n){n=n||{},r.call(this,n),this.indentation=n.indent}var r=n("./compiler");e.exports=t,t.prototype.__proto__=r.prototype,t.prototype.compile=function(n){return this.stylesheet(n)},t.prototype.stylesheet=function(n){return this.mapVisit(n.stylesheet.rules,"\n\n")},t.prototype.comment=function(n){return this.emit(this.indent()+"/*"+n.comment+"*/",n.position)},t.prototype.import=function(n){return this.emit("@import "+n.import+";",n.position)},t.prototype.media=function(n){return this.emit("@media "+n.media,n.position,!0)+this.emit(" {\n"+this.indent(1))+this.mapVisit(n.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},t.prototype.document=function(n){var e="@"+(n.vendor||"")+"document "+n.document;return this.emit(e,n.position,!0)+this.emit(" {\n"+this.indent(1))+this.mapVisit(n.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},t.prototype.charset=function(n){return this.emit("@charset "+n.charset+";",n.position)},t.prototype.namespace=function(n){return this.emit("@namespace "+n.namespace+";",n.position)},t.prototype.supports=function(n){return this.emit("@supports "+n.supports,n.position,!0)+this.emit(" {\n"+this.indent(1))+this.mapVisit(n.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},t.prototype.keyframes=function(n){return this.emit("@"+(n.vendor||"")+"keyframes "+n.name,n.position,!0)+this.emit(" {\n"+this.indent(1))+this.mapVisit(n.keyframes,"\n")+this.emit(this.indent(-1)+"}")},t.prototype.keyframe=function(n){var e=n.declarations;return this.emit(this.indent())+this.emit(n.values.join(", "),n.position,!0)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},t.prototype.page=function(n){var e=n.selectors.length?n.selectors.join(", ")+" ":"";return this.emit("@page "+e,n.position,!0)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(n.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},t.prototype.rule=function(n){var e=this.indent(),t=n.declarations;return t.length?this.emit(n.selectors.map(function(n){return e+n}).join(",\n"),n.position,!0)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},t.prototype.declaration=function(n){return this.emit(this.indent())+this.emit(n.property+": "+n.value,n.position)+this.emit(";")},t.prototype.indent=function(n){return this.level=this.level||1,null!=n?(this.level+=n,""):Array(this.level).join(this.indentation||" ")}},{"./compiler":5}],8:[function(n,e,t){function r(n){var e=n.options.filename||"generated.css";n.map=new i({file:e}),n.position={line:1,column:1};for(var r in t)n[r]=t[r]}var i=n("source-map").SourceMapGenerator;e.exports=r,t.updatePosition=function(n){var e=n.match(/\n/g);e&&(this.position.line+=e.length);var t=n.lastIndexOf("\n");this.position.column=~t?n.length-t:this.position.column+n.length},t.emit=function(n,e,t){return e&&e.start&&this.map.addMapping({source:e.source||"source.css",generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:e.start.line,column:e.start.column-1}}),this.updatePosition(n),!t&&e&&e.end&&this.map.addMapping({source:e.source||"source.css",generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:e.end.line,column:e.end.column-1}}),n}},{"source-map":9}],9:[function(n,e,t){t.SourceMapGenerator=n("./source-map/source-map-generator").SourceMapGenerator,t.SourceMapConsumer=n("./source-map/source-map-consumer").SourceMapConsumer,t.SourceNode=n("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":14,"./source-map/source-map-generator":15,"./source-map/source-node":16}],10:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(){this._array=[],this._set={}}var r=n("./util");t.fromArray=function(n,e){for(var r=new t,i=0,o=n.length;o>i;i++)r.add(n[i],e);return r},t.prototype.add=function(n,e){var t=this.has(n),i=this._array.length;(!t||e)&&this._array.push(n),t||(this._set[r.toSetString(n)]=i)},t.prototype.has=function(n){return Object.prototype.hasOwnProperty.call(this._set,r.toSetString(n))},t.prototype.indexOf=function(n){if(this.has(n))return this._set[r.toSetString(n)];throw Error('"'+n+'" is not in the set.')},t.prototype.at=function(n){if(n>=0&&this._array.length>n)return this._array[n];throw Error("No element indexed by "+n)},t.prototype.toArray=function(){return this._array.slice()},e.ArraySet=t})},{"./util":17,amdefine:18}],11:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(n){return 0>n?(-n<<1)+1:(n<<1)+0}function r(n){var e=1===(1&n),t=n>>1;return e?-t:t}var i=n("./base64"),o=5,u=1<<o,a=u-1,s=u;e.encode=function(n){var e,r="",u=t(n);do e=u&a,u>>>=o,u>0&&(e|=s),r+=i.encode(e);while(u>0);return r},e.decode=function(n){var e,t,u=0,c=n.length,l=0,f=0;do{if(u>=c)throw Error("Expected more digits in base 64 VLQ value.");t=i.decode(n.charAt(u++)),e=!!(t&s),t&=a,l+=t<<f,f+=o}while(e);return{value:r(l),rest:n.slice(u)}}})},{"./base64":12,amdefine:18}],12:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){var t={},r={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(n,e){t[n]=e,r[e]=n}),e.encode=function(n){if(n in r)return r[n];throw new TypeError("Must be between 0 and 63: "+n)},e.decode=function(n){if(n in t)return t[n];throw new TypeError("Not a valid base 64 digit: "+n)}})},{amdefine:18}],13:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(n,e,r,i,o){var u=Math.floor((e-n)/2)+n,a=o(r,i[u],!0);return 0===a?i[u]:a>0?e-u>1?t(u,e,r,i,o):i[u]:u-n>1?t(n,u,r,i,o):0>n?null:i[n]}e.search=function(n,e,r){return e.length>0?t(-1,e.length,n,e,r):null}})},{amdefine:18}],14:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(n){var e=n;"string"==typeof n&&(e=JSON.parse(n.replace(/^\)\]\}'/,"")));var t=r.getArg(e,"version"),i=r.getArg(e,"sources"),u=r.getArg(e,"names",[]),a=r.getArg(e,"sourceRoot",null),s=r.getArg(e,"sourcesContent",null),c=r.getArg(e,"mappings"),l=r.getArg(e,"file",null);if(t!=this._version)throw Error("Unsupported version: "+t);this._names=o.fromArray(u,!0),this._sources=o.fromArray(i,!0),this.sourceRoot=a,this.sourcesContent=s,this._mappings=c,this.file=l}var r=n("./util"),i=n("./binary-search"),o=n("./array-set").ArraySet,u=n("./base64-vlq");t.fromSourceMap=function(n){var e=Object.create(t.prototype);return e._names=o.fromArray(n._names.toArray(),!0),e._sources=o.fromArray(n._sources.toArray(),!0),e.sourceRoot=n._sourceRoot,e.sourcesContent=n._generateSourcesContent(e._sources.toArray(),e.sourceRoot),e.file=n._file,e.__generatedMappings=n._mappings.slice().sort(r.compareByGeneratedPositions),e.__originalMappings=n._mappings.slice().sort(r.compareByOriginalPositions),e},t.prototype._version=3,Object.defineProperty(t.prototype,"sources",{get:function(){return this._sources.toArray().map(function(n){return this.sourceRoot?r.join(this.sourceRoot,n):n},this)}}),t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),t.prototype._parseMappings=function(n){for(var e,t,i=1,o=0,a=0,s=0,c=0,l=0,f=/^[,;]/,p=n;p.length>0;)if(";"===p.charAt(0))i++,p=p.slice(1),o=0;else if(","===p.charAt(0))p=p.slice(1);else{if(e={},e.generatedLine=i,t=u.decode(p),e.generatedColumn=o+t.value,o=e.generatedColumn,p=t.rest,p.length>0&&!f.test(p.charAt(0))){if(t=u.decode(p),e.source=this._sources.at(c+t.value),c+=t.value,p=t.rest,0===p.length||f.test(p.charAt(0)))throw Error("Found a source, but no line and column");if(t=u.decode(p),e.originalLine=a+t.value,a=e.originalLine,e.originalLine+=1,p=t.rest,0===p.length||f.test(p.charAt(0)))throw Error("Found a source and line, but no column");t=u.decode(p),e.originalColumn=s+t.value,s=e.originalColumn,p=t.rest,p.length>0&&!f.test(p.charAt(0))&&(t=u.decode(p),e.name=this._names.at(l+t.value),l+=t.value,p=t.rest)}this.__generatedMappings.push(e),"number"==typeof e.originalLine&&this.__originalMappings.push(e)}this.__originalMappings.sort(r.compareByOriginalPositions)},t.prototype._findMapping=function(n,e,t,r,o){if(0>=n[t])throw new TypeError("Line must be greater than or equal to 1, got "+n[t]);if(0>n[r])throw new TypeError("Column must be greater than or equal to 0, got "+n[r]);return i.search(n,e,o)},t.prototype.originalPositionFor=function(n){var e={generatedLine:r.getArg(n,"line"),generatedColumn:r.getArg(n,"column")},t=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositions);if(t){var i=r.getArg(t,"source",null);return i&&this.sourceRoot&&(i=r.join(this.sourceRoot,i)),{source:i,line:r.getArg(t,"originalLine",null),column:r.getArg(t,"originalColumn",null),name:r.getArg(t,"name",null)}}return{source:null,line:null,column:null,name:null}},t.prototype.sourceContentFor=function(n){if(!this.sourcesContent)return null;if(this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];var e;if(this.sourceRoot&&(e=r.urlParse(this.sourceRoot))){var t=n.replace(/^file:\/\//,"");if("file"==e.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!e.path||"/"==e.path)&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}throw Error('"'+n+'" is not in the SourceMap.')},t.prototype.generatedPositionFor=function(n){var e={source:r.getArg(n,"source"),originalLine:r.getArg(n,"line"),originalColumn:r.getArg(n,"column")};this.sourceRoot&&(e.source=r.relative(this.sourceRoot,e.source));var t=this._findMapping(e,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions);return t?{line:r.getArg(t,"generatedLine",null),column:r.getArg(t,"generatedColumn",null)}:{line:null,column:null}},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.prototype.eachMapping=function(n,e,i){var o,u=e||null,a=i||t.GENERATED_ORDER;switch(a){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var s=this.sourceRoot;o.map(function(n){var e=n.source;return e&&s&&(e=r.join(s,e)),{source:e,generatedLine:n.generatedLine,generatedColumn:n.generatedColumn,originalLine:n.originalLine,originalColumn:n.originalColumn,name:n.name}}).forEach(n,u)},e.SourceMapConsumer=t})},{"./array-set":10,"./base64-vlq":11,"./binary-search":13,"./util":17,amdefine:18}],15:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(n){this._file=i.getArg(n,"file"),this._sourceRoot=i.getArg(n,"sourceRoot",null),this._sources=new o,this._names=new o,this._mappings=[],this._sourcesContents=null}var r=n("./base64-vlq"),i=n("./util"),o=n("./array-set").ArraySet;t.prototype._version=3,t.fromSourceMap=function(n){var e=n.sourceRoot,r=new t({file:n.file,sourceRoot:e});return n.eachMapping(function(n){var t={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source&&(t.source=n.source,e&&(t.source=i.relative(e,t.source)),t.original={line:n.originalLine,column:n.originalColumn},n.name&&(t.name=n.name)),r.addMapping(t)}),n.sources.forEach(function(e){var t=n.sourceContentFor(e);t&&r.setSourceContent(e,t)}),r},t.prototype.addMapping=function(n){var e=i.getArg(n,"generated"),t=i.getArg(n,"original",null),r=i.getArg(n,"source",null),o=i.getArg(n,"name",null);this._validateMapping(e,t,r,o),r&&!this._sources.has(r)&&this._sources.add(r),o&&!this._names.has(o)&&this._names.add(o),this._mappings.push({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=t&&t.line,originalColumn:null!=t&&t.column,source:r,name:o})},t.prototype.setSourceContent=function(n,e){var t=n;this._sourceRoot&&(t=i.relative(this._sourceRoot,t)),null!==e?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(t)]=e):(delete this._sourcesContents[i.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(n,e){e||(e=n.file);var t=this._sourceRoot;t&&(e=i.relative(t,e));var r=new o,u=new o;this._mappings.forEach(function(o){if(o.source===e&&o.originalLine){var a=n.originalPositionFor({line:o.originalLine,column:o.originalColumn});null!==a.source&&(o.source=t?i.relative(t,a.source):a.source,o.originalLine=a.line,o.originalColumn=a.column,null!==a.name&&null!==o.name&&(o.name=a.name))}var s=o.source;s&&!r.has(s)&&r.add(s);var c=o.name;c&&!u.has(c)&&u.add(c)},this),this._sources=r,this._names=u,n.sources.forEach(function(e){var r=n.sourceContentFor(e);r&&(t&&(e=i.relative(t,e)),this.setSourceContent(e,r))},this)},t.prototype._validateMapping=function(n,e,t,r){if(!(n&&"line"in n&&"column"in n&&n.line>0&&n.column>=0&&!e&&!t&&!r||n&&"line"in n&&"column"in n&&e&&"line"in e&&"column"in e&&n.line>0&&n.column>=0&&e.line>0&&e.column>=0&&t))throw Error("Invalid mapping: "+JSON.stringify({generated:n,source:t,orginal:e,name:r}))},t.prototype._serializeMappings=function(){var n,e=0,t=1,o=0,u=0,a=0,s=0,c="";this._mappings.sort(i.compareByGeneratedPositions);for(var l=0,f=this._mappings.length;f>l;l++){if(n=this._mappings[l],n.generatedLine!==t)for(e=0;n.generatedLine!==t;)c+=";",t++;else if(l>0){if(!i.compareByGeneratedPositions(n,this._mappings[l-1]))continue;c+=","}c+=r.encode(n.generatedColumn-e),e=n.generatedColumn,n.source&&(c+=r.encode(this._sources.indexOf(n.source)-s),s=this._sources.indexOf(n.source),c+=r.encode(n.originalLine-1-u),u=n.originalLine-1,c+=r.encode(n.originalColumn-o),o=n.originalColumn,n.name&&(c+=r.encode(this._names.indexOf(n.name)-a),a=this._names.indexOf(n.name)))}return c},t.prototype._generateSourcesContent=function(n,e){return n.map(function(n){if(!this._sourcesContents)return null;e&&(n=i.relative(e,n));var t=i.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)},t.prototype.toJSON=function(){var n={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._sourceRoot&&(n.sourceRoot=this._sourceRoot),this._sourcesContents&&(n.sourcesContent=this._generateSourcesContent(n.sources,n.sourceRoot)),n},t.prototype.toString=function(){return JSON.stringify(this)},e.SourceMapGenerator=t})},{"./array-set":10,"./base64-vlq":11,"./util":17,amdefine:18}],16:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(n,e,t,r,i){this.children=[],this.sourceContents={},this.line=void 0===n?null:n,this.column=void 0===e?null:e,this.source=void 0===t?null:t,this.name=void 0===i?null:i,null!=r&&this.add(r)}var r=n("./source-map-generator").SourceMapGenerator,i=n("./util");t.fromStringWithSourceMap=function(n,e){function r(n,e){null===n||void 0===n.source?i.add(e):i.add(new t(n.originalLine,n.originalColumn,n.source,e,n.name))}var i=new t,o=n.split("\n"),u=1,a=0,s=null;return e.eachMapping(function(n){if(null===s){for(;n.generatedLine>u;)i.add(o.shift()+"\n"),u++;if(n.generatedColumn>a){var e=o[0];i.add(e.substr(0,n.generatedColumn)),o[0]=e.substr(n.generatedColumn),a=n.generatedColumn}}else if(n.generatedLine>u){var t="";do t+=o.shift()+"\n",u++,a=0;while(n.generatedLine>u);if(n.generatedColumn>a){var e=o[0];t+=e.substr(0,n.generatedColumn),o[0]=e.substr(n.generatedColumn),a=n.generatedColumn}r(s,t)}else{var e=o[0],t=e.substr(0,n.generatedColumn-a);o[0]=e.substr(n.generatedColumn-a),a=n.generatedColumn,r(s,t)}s=n},this),r(s,o.join("\n")),e.sources.forEach(function(n){var t=e.sourceContentFor(n);t&&i.setSourceContent(n,t)}),i},t.prototype.add=function(n){if(Array.isArray(n))n.forEach(function(n){this.add(n)},this);else{if(!(n instanceof t||"string"==typeof n))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);n&&this.children.push(n)}return this},t.prototype.prepend=function(n){if(Array.isArray(n))for(var e=n.length-1;e>=0;e--)this.prepend(n[e]);else{if(!(n instanceof t||"string"==typeof n))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+n);this.children.unshift(n)}return this},t.prototype.walk=function(n){for(var e,r=0,i=this.children.length;i>r;r++)e=this.children[r],e instanceof t?e.walk(n):""!==e&&n(e,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(n){var e,t,r=this.children.length;if(r>0){for(e=[],t=0;r-1>t;t++)e.push(this.children[t]),e.push(n);e.push(this.children[t]),this.children=e}return this},t.prototype.replaceRight=function(n,e){var r=this.children[this.children.length-1];return r instanceof t?r.replaceRight(n,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(n,e):this.children.push("".replace(n,e)),this},t.prototype.setSourceContent=function(n,e){this.sourceContents[i.toSetString(n)]=e},t.prototype.walkSourceContents=function(n){for(var e=0,r=this.children.length;r>e;e++)this.children[e]instanceof t&&this.children[e].walkSourceContents(n);for(var o=Object.keys(this.sourceContents),e=0,r=o.length;r>e;e++)n(i.fromSetString(o[e]),this.sourceContents[o[e]])},t.prototype.toString=function(){var n="";return this.walk(function(e){n+=e}),n},t.prototype.toStringWithSourceMap=function(n){var e={code:"",line:1,column:0},t=new r(n),i=!1,o=null,u=null,a=null,s=null;return this.walk(function(n,r){e.code+=n,null!==r.source&&null!==r.line&&null!==r.column?((o!==r.source||u!==r.line||a!==r.column||s!==r.name)&&t.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:e.line,column:e.column},name:r.name}),o=r.source,u=r.line,a=r.column,s=r.name,i=!0):i&&(t.addMapping({generated:{line:e.line,column:e.column}}),o=null,i=!1),n.split("").forEach(function(n){"\n"===n?(e.line++,e.column=0):e.column++})}),this.walkSourceContents(function(n,e){t.setSourceContent(n,e)}),{code:e.code,map:t}},e.SourceNode=t})},{"./source-map-generator":15,"./util":17,amdefine:18}],17:[function(n,e){if("function"!=typeof t)var t=n("amdefine")(e,n);t(function(n,e){function t(n,e,t){if(e in n)return n[e];if(3===arguments.length)return t;throw Error('"'+e+'" is a required argument.')}function r(n){var e=n.match(p);return e?{scheme:e[1],auth:e[3],host:e[4],port:e[6],path:e[7]}:null}function i(n){var e=n.scheme+"://";return n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}function o(n,e){var t;return e.match(p)||e.match(h)?e:"/"===e.charAt(0)&&(t=r(n))?(t.path=e,i(t)):n.replace(/\/$/,"")+"/"+e}function u(n){return"$"+n}function a(n){return n.substr(1)}function s(n,e){n=n.replace(/\/$/,"");var t=r(n);return"/"==e.charAt(0)&&t&&"/"==t.path?e.slice(1):0===e.indexOf(n+"/")?e.substr(n.length+1):e}function c(n,e){var t=n||"",r=e||"";return(t>r)-(r>t)}function l(n,e,t){var r;return(r=c(n.source,e.source))?r:(r=n.originalLine-e.originalLine)?r:(r=n.originalColumn-e.originalColumn,r||t?r:(r=c(n.name,e.name))?r:(r=n.generatedLine-e.generatedLine,r?r:n.generatedColumn-e.generatedColumn))}function f(n,e,t){var r;return(r=n.generatedLine-e.generatedLine)?r:(r=n.generatedColumn-e.generatedColumn,r||t?r:(r=c(n.source,e.source))?r:(r=n.originalLine-e.originalLine)?r:(r=n.originalColumn-e.originalColumn,r?r:c(n.name,e.name)))}e.getArg=t;var p=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/,h=/^data:.+\,.+/;e.urlParse=r,e.urlGenerate=i,e.join=o,e.toSetString=u,e.fromSetString=a,e.relative=s,e.compareByOriginalPositions=l,e.compareByGeneratedPositions=f})},{amdefine:18}],18:[function(n,e){function t(e,t){"use strict";function o(n){var e,t;for(e=0;n[e];e+=1)if(t=n[e],"."===t)n.splice(e,1),e-=1;else if(".."===t){if(1===e&&(".."===n[2]||".."===n[0]))break;e>0&&(n.splice(e-1,2),e-=2)}}function u(n,e){var t;return n&&"."===n.charAt(0)&&e&&(t=e.split("/"),t=t.slice(0,t.length-1),t=t.concat(n.split("/")),o(t),n=t.join("/")),n}function a(n){return function(e){return u(e,n)}}function s(n){function e(e){m[n]=e}return e.fromText=function(){throw Error("amdefine does not implement load.fromText")},e}function c(n,r,o){var u,a,s,c;if(n)a=m[n]={},s={id:n,uri:i,exports:a},u=f(t,a,s,n);else{if(g)throw Error("amdefine with no module ID cannot be called more than once per file.");g=!0,a=e.exports,s=e,u=f(t,a,s,e.id)}r&&(r=r.map(function(n){return u(n)})),c="function"==typeof o?o.apply(s.exports,r):o,void 0!==c&&(s.exports=c,n&&(m[n]=s.exports))}function l(n,e,t){Array.isArray(n)?(t=e,e=n,n=void 0):"string"!=typeof n&&(t=n,n=e=void 0),e&&!Array.isArray(e)&&(t=e,e=void 0),e||(e=["require","exports","module"]),n?h[n]=[n,e,t]:c(n,e,t)}var f,p,h={},m={},g=!1,v=n("path");return f=function(n,e,t,i){function o(o,u){return"string"==typeof o?p(n,e,t,o,i):(o=o.map(function(r){return p(n,e,t,r,i)}),r.nextTick(function(){u.apply(null,o)}),void 0)}return o.toUrl=function(n){return 0===n.indexOf(".")?u(n,v.dirname(t.filename)):n},o},t=t||function(){return e.require.apply(e,arguments)},p=function(n,e,t,r,i){var o,l,g=r.indexOf("!"),v=r;if(-1===g){if(r=u(r,i),"require"===r)return f(n,e,t,i);if("exports"===r)return e;if("module"===r)return t;if(m.hasOwnProperty(r))return m[r];if(h[r])return c.apply(null,h[r]),m[r];if(n)return n(v);throw Error("No module with ID: "+r)}return o=r.substring(0,g),r=r.substring(g+1,r.length),l=p(n,e,t,o,i),r=l.normalize?l.normalize(r,a(i)):u(r,i),m[r]?m[r]:(l.load(r,f(n,e,t,i),s(r),{}),m[r])},l.require=function(n){return m[n]?m[n]:h[n]?(c.apply(null,h[n]),m[n]):void 0},l.amd={},l}var r=n("__browserify_process"),i="/node_modules/css-stringify/node_modules/source-map/node_modules/amdefine/amdefine.js";e.exports=t},{__browserify_process:19,path:20}],19:[function(n,e){var t=e.exports={};t.nextTick=function(){var n="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(n)return function(n){return window.setImmediate(n)};if(e){var t=[];return window.addEventListener("message",function(n){if(n.source===window&&"process-tick"===n.data&&(n.stopPropagation(),t.length>0)){var e=t.shift();e()}},!0),function(n){t.push(n),window.postMessage("process-tick","*")}}return function(n){setTimeout(n,0)}}(),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.binding=function(){throw Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(){throw Error("process.chdir is not supported")}},{}],20:[function(n,e,t){function r(n,e){for(var t=0,r=n.length-1;r>=0;r--){var i=n[r];"."===i?n.splice(r,1):".."===i?(n.splice(r,1),t++):t&&(n.splice(r,1),t--)}if(e)for(;t--;t)n.unshift("..");return n}function i(n,e){if(n.filter)return n.filter(e);for(var t=[],r=0;n.length>r;r++)e(n[r],r,n)&&t.push(n[r]);return t}var o=n("__browserify_process"),u=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(n){return u.exec(n).slice(1)};t.resolve=function(){for(var n="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var u=t>=0?arguments[t]:o.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(n=u+"/"+n,e="/"===u.charAt(0))}return n=r(i(n.split("/"),function(n){return!!n}),!e).join("/"),(e?"/":"")+n||"."},t.normalize=function(n){var e=t.isAbsolute(n),o="/"===s(n,-1);return n=r(i(n.split("/"),function(n){return!!n}),!e).join("/"),n||e||(n="."),n&&o&&(n+="/"),(e?"/":"")+n},t.isAbsolute=function(n){return"/"===n.charAt(0)},t.join=function(){var n=Array.prototype.slice.call(arguments,0);return t.normalize(i(n,function(n){if("string"!=typeof n)throw new TypeError("Arguments to path.join must be strings");return n}).join("/"))},t.relative=function(n,e){function r(n){for(var e=0;n.length>e&&""===n[e];e++);for(var t=n.length-1;t>=0&&""===n[t];t--);return e>t?[]:n.slice(e,t-e+1)}n=t.resolve(n).substr(1),e=t.resolve(e).substr(1);for(var i=r(n.split("/")),o=r(e.split("/")),u=Math.min(i.length,o.length),a=u,s=0;u>s;s++)if(i[s]!==o[s]){a=s;break}for(var c=[],s=a;i.length>s;s++)c.push("..");return c=c.concat(o.slice(a)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(n){var e=a(n),t=e[0],r=e[1];return t||r?(r&&(r=r.substr(0,r.length-1)),t+r):"."},t.basename=function(n,e){var t=a(n)[2];return e&&t.substr(-1*e.length)===e&&(t=t.substr(0,t.length-e.length)),t},t.extname=function(n){return a(n)[3]};var s="b"==="ab".substr(-1)?function(n,e,t){return n.substr(e,t)}:function(n,e,t){return 0>e&&(e=n.length+e),n.substr(e,t)}},{__browserify_process:19}]},{},[]),require=function e(n,t,r){function i(u,a){if(!t[u]){if(!n[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(o)return o(u,!0);throw Error("Cannot find module '"+u+"'")}var c=t[u]={exports:{}};
n[u][0].call(c.exports,function(e){var t=n[u][1][e];return i(t?t:e)},c,c.exports,e,n,t,r)}return t[u].exports}for(var o="function"==typeof require&&require,u=0;r.length>u;u++)i(r[u]);return i}({uRgOwe:[function(n,e,t){var r="undefined"!=typeof self?self:"undefined"!=typeof window?window:{};(function(){function n(n,e,t){for(var r=(t||0)-1,i=n?n.length:0;i>++r;)if(n[r]===e)return r;return-1}function i(e,t){var r=typeof t;if(e=e.cache,"boolean"==r||null==t)return e[t]?0:-1;"number"!=r&&"string"!=r&&(r="object");var i="number"==r?t:b+t;return e=(e=e[r])&&e[i],"object"==r?e&&n(e,t)>-1?0:-1:e?0:-1}function o(n){var e=this.cache,t=typeof n;if("boolean"==t||null==n)e[n]=!0;else{"number"!=t&&"string"!=t&&(t="object");var r="number"==t?n:b+n,i=e[t]||(e[t]={});"object"==t?(i[r]||(i[r]=[])).push(n):i[r]=!0}}function u(n){return n.charCodeAt(0)}function a(n,e){for(var t=n.criteria,r=e.criteria,i=-1,o=t.length;o>++i;){var u=t[i],a=r[i];if(u!==a){if(u>a||u===v)return 1;if(a>u||a===v)return-1}}return n.index-e.index}function s(n){var e=-1,t=n.length,r=n[0],i=n[0|t/2],u=n[t-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&u&&"object"==typeof u)return!1;var a=f();a["false"]=a["null"]=a["true"]=a.undefined=!1;var s=f();for(s.array=n,s.cache=a,s.push=o;t>++e;)s.push(n[e]);return s}function c(n){return"\\"+H[n]}function l(){return d.pop()||[]}function f(){return y.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function p(n){n.length=0,C>d.length&&d.push(n)}function h(n){var e=n.cache;e&&h(e),n.array=n.cache=n.criteria=n.object=n.number=n.string=n.value=null,C>y.length&&y.push(n)}function m(n,e,t){e||(e=0),t===v&&(t=n?n.length:0);for(var r=-1,i=t-e||0,o=Array(0>i?0:i);i>++r;)o[r]=n[e+r];return o}function g(e){function t(n){return n&&"object"==typeof n&&!Xr(n)&&Nr.call(n,"__wrapped__")?n:new r(n)}function r(n,e){this.__chain__=!!e,this.__wrapped__=n}function o(n){function e(){if(r){var n=m(r);Pr.apply(n,arguments)}if(this instanceof e){var o=y(t.prototype),u=t.apply(o,n||arguments);return Me(u)?u:o}return t.apply(i,n||arguments)}var t=n[0],r=n[2],i=n[4];return Hr(e,n),e}function d(n,e,t,r,i){if(t){var o=t(n);if(o!==v)return o}var u=Me(n);if(!u)return n;var a=jr.call(n);if(!U[a])return n;var s=Kr[a];switch(a){case B:case V:return new s(+n);case G:case W:return new s(n);case $:return o=s(n.source,E.exec(n)),o.lastIndex=n.lastIndex,o}var c=Xr(n);if(e){var f=!r;r||(r=l()),i||(i=l());for(var h=r.length;h--;)if(r[h]==n)return i[h];o=c?s(n.length):{}}else o=c?m(n):ii({},n);return c&&(Nr.call(n,"index")&&(o.index=n.index),Nr.call(n,"input")&&(o.input=n.input)),e?(r.push(n),i.push(o),(c?He:ai)(n,function(n,u){o[u]=d(n,e,t,r,i)}),f&&(p(r),p(i)),o):o}function y(n){return Me(n)?Br(n):{}}function C(n,e,t){if("function"!=typeof n)return Xt;if(e===v||!("prototype"in n))return n;var r=n.__bindData__;if(r===v&&(Qr.funcNames&&(r=!n.name),r=r||!Qr.funcDecomp,!r)){var i=Or.call(n);Qr.funcNames||(r=!R.test(i)),r||(r=N.test(i),Hr(n,r))}if(r===!1||r!==!0&&1&r[1])return n;switch(t){case 1:return function(t){return n.call(e,t)};case 2:return function(t,r){return n.call(e,t,r)};case 3:return function(t,r,i){return n.call(e,t,r,i)};case 4:return function(t,r,i,o){return n.call(e,t,r,i,o)}}return Pt(n,e)}function H(n){function e(){var n=s?u:this;if(i){var h=m(i);Pr.apply(h,arguments)}if((o||l)&&(h||(h=m(arguments)),o&&Pr.apply(h,o),l&&a>h.length))return r|=16,H([t,f?r:-4&r,h,null,u,a]);if(h||(h=arguments),c&&(t=n[p]),this instanceof e){n=y(t.prototype);var g=t.apply(n,h);return Me(g)?g:n}return t.apply(n,h)}var t=n[0],r=n[1],i=n[2],o=n[3],u=n[4],a=n[5],s=1&r,c=2&r,l=4&r,f=8&r,p=t;return Hr(e,n),e}function Y(e,t){var r=-1,o=se(),u=e?e.length:0,a=u>=w&&o===n,c=[];if(a){var l=s(t);l?(o=i,t=l):a=!1}for(;u>++r;){var f=e[r];0>o(t,f)&&c.push(f)}return a&&h(t),c}function Z(n,e,t,r){for(var i=(r||0)-1,o=n?n.length:0,u=[];o>++i;){var a=n[i];if(a&&"object"==typeof a&&"number"==typeof a.length&&(Xr(a)||pe(a))){e||(a=Z(a,e,t));var s=-1,c=a.length,l=u.length;for(u.length+=c;c>++s;)u[l++]=a[s]}else t||u.push(a)}return u}function ne(n,e,t,r,i,o){if(t){var u=t(n,e);if(u!==v)return!!u}if(n===e)return 0!==n||1/n==1/e;var a=typeof n,s=typeof e;if(!(n!==n||n&&Q[a]||e&&Q[s]))return!1;if(null==n||null==e)return n===e;var c=jr.call(n),f=jr.call(e);if(c==I&&(c=z),f==I&&(f=z),c!=f)return!1;switch(c){case B:case V:return+n==+e;case G:return n!=+n?e!=+e:0==n?1/n==1/e:n==+e;case $:case W:return n==wr(e)}var h=c==D;if(!h){var m=Nr.call(n,"__wrapped__"),g=Nr.call(e,"__wrapped__");if(m||g)return ne(m?n.__wrapped__:n,g?e.__wrapped__:e,t,r,i,o);if(c!=z)return!1;var d=n.constructor,y=e.constructor;if(d!=y&&!(Re(d)&&d instanceof d&&Re(y)&&y instanceof y)&&"constructor"in n&&"constructor"in e)return!1}var _=!i;i||(i=l()),o||(o=l());for(var b=i.length;b--;)if(i[b]==n)return o[b]==e;var w=0;if(u=!0,i.push(n),o.push(e),h){if(b=n.length,w=e.length,u=w==b,u||r)for(;w--;){var C=b,x=e[w];if(r)for(;C--&&!(u=ne(n[C],x,t,r,i,o)););else if(!(u=ne(n[w],x,t,r,i,o)))break}}else ui(e,function(e,a,s){return Nr.call(s,a)?(w++,u=Nr.call(n,a)&&ne(n[a],e,t,r,i,o)):v}),u&&!r&&ui(n,function(n,e,t){return Nr.call(t,e)?u=--w>-1:v});return i.pop(),o.pop(),_&&(p(i),p(o)),u}function ee(n,e,t,r,i){(Xr(e)?He:ai)(e,function(e,o){var u,a,s=e,c=n[o];if(e&&((a=Xr(e))||si(e))){for(var l=r.length;l--;)if(u=r[l]==e){c=i[l];break}if(!u){var f;t&&(s=t(c,e),(f=s!==v)&&(c=s)),f||(c=a?Xr(c)?c:[]:si(c)?c:{}),r.push(e),i.push(c),f||ee(c,e,t,r,i)}}else t&&(s=t(c,e),s===v&&(s=e)),s!==v&&(c=s);n[o]=c})}function re(n,e){return n+Mr(Jr()*(e-n+1))}function ie(e,t,r){var o=-1,u=se(),a=e?e.length:0,c=[],f=!t&&a>=w&&u===n,m=r||f?l():c;if(f){var g=s(m);u=i,m=g}for(;a>++o;){var v=e[o],d=r?r(v,o,e):v;(t?!o||m[m.length-1]!==d:0>u(m,d))&&((r||f)&&m.push(d),c.push(v))}return f?(p(m.array),h(m)):r&&p(m),c}function oe(n){return function(e,r,i){var o={};r=t.createCallback(r,i,3);var u=-1,a=e?e.length:0;if("number"==typeof a)for(;a>++u;){var s=e[u];n(o,s,r(s,u,e),e)}else ai(e,function(e,t,i){n(o,e,r(e,t,i),i)});return o}}function ue(n,e,t,r,i,u){var a=1&e,s=2&e,c=4&e,l=16&e,f=32&e;if(!s&&!Re(n))throw new Cr;l&&!t.length&&(e&=-17,l=t=!1),f&&!r.length&&(e&=-33,f=r=!1);var p=n&&n.__bindData__;if(p&&p!==!0)return p=m(p),p[2]&&(p[2]=m(p[2])),p[3]&&(p[3]=m(p[3])),!a||1&p[1]||(p[4]=i),!a&&1&p[1]&&(e|=8),!c||4&p[1]||(p[5]=u),l&&Pr.apply(p[2]||(p[2]=[]),t),f&&Ir.apply(p[3]||(p[3]=[]),r),p[1]|=e,ue.apply(null,p);var h=1==e||17===e?o:H;return h([n,e,t,r,i,u])}function ae(n){return ni[n]}function se(){var e=(e=t.indexOf)===dt?n:e;return e}function ce(n){return"function"==typeof n&&kr.test(n)}function le(n){var e,t;return n&&jr.call(n)==z&&(e=n.constructor,!Re(e)||e instanceof e)?(ui(n,function(n,e){t=e}),t===v||Nr.call(n,t)):!1}function fe(n){return ei[n]}function pe(n){return n&&"object"==typeof n&&"number"==typeof n.length&&jr.call(n)==I||!1}function he(n,e,t,r){return"boolean"!=typeof e&&null!=e&&(r=t,t=e,e=!1),d(n,e,"function"==typeof t&&C(t,r,1))}function me(n,e,t){return d(n,!0,"function"==typeof e&&C(e,t,1))}function ge(n,e){var t=y(n);return e?ii(t,e):t}function ve(n,e,r){var i;return e=t.createCallback(e,r,3),ai(n,function(n,t,r){return e(n,t,r)?(i=t,!1):v}),i}function de(n,e,r){var i;return e=t.createCallback(e,r,3),_e(n,function(n,t,r){return e(n,t,r)?(i=t,!1):v}),i}function ye(n,e,t){var r=[];ui(n,function(n,e){r.push(e,n)});var i=r.length;for(e=C(e,t,3);i--&&e(r[i--],r[i],n)!==!1;);return n}function _e(n,e,t){var r=Zr(n),i=r.length;for(e=C(e,t,3);i--;){var o=r[i];if(e(n[o],o,n)===!1)break}return n}function be(n){var e=[];return ui(n,function(n,t){Re(n)&&e.push(t)}),e.sort()}function we(n,e){return n?Nr.call(n,e):!1}function Ce(n){for(var e=-1,t=Zr(n),r=t.length,i={};r>++e;){var o=t[e];i[n[o]]=o}return i}function xe(n){return n===!0||n===!1||n&&"object"==typeof n&&jr.call(n)==B||!1}function Ae(n){return n&&"object"==typeof n&&jr.call(n)==V||!1}function Se(n){return n&&1===n.nodeType||!1}function je(n){var e=!0;if(!n)return e;var t=jr.call(n),r=n.length;return t==D||t==W||t==I||t==z&&"number"==typeof r&&Re(n.splice)?!r:(ai(n,function(){return e=!1}),e)}function ke(n,e,t,r){return ne(n,e,"function"==typeof t&&C(t,r,2))}function Ee(n){return Fr(n)&&!Gr(parseFloat(n))}function Re(n){return"function"==typeof n}function Me(n){return!(!n||!Q[typeof n])}function Oe(n){return Ne(n)&&n!=+n}function Le(n){return null===n}function Ne(n){return"number"==typeof n||n&&"object"==typeof n&&jr.call(n)==G||!1}function Pe(n){return n&&"object"==typeof n&&jr.call(n)==$||!1}function qe(n){return"string"==typeof n||n&&"object"==typeof n&&jr.call(n)==W||!1}function Te(n){return n===v}function Ie(n,e,r){var i={};return e=t.createCallback(e,r,3),ai(n,function(n,t,r){i[t]=e(n,t,r)}),i}function De(n){var e=arguments,t=2;if(!Me(n))return n;if("number"!=typeof e[2]&&(t=e.length),t>3&&"function"==typeof e[t-2])var r=C(e[--t-1],e[t--],2);else t>2&&"function"==typeof e[t-1]&&(r=e[--t]);for(var i=m(arguments,1,t),o=-1,u=l(),a=l();t>++o;)ee(n,i[o],r,u,a);return p(u),p(a),n}function Be(n,e,r){var i={};if("function"!=typeof e){var o=[];ui(n,function(n,e){o.push(e)}),o=Y(o,Z(arguments,!0,!1,1));for(var u=-1,a=o.length;a>++u;){var s=o[u];i[s]=n[s]}}else e=t.createCallback(e,r,3),ui(n,function(n,t,r){e(n,t,r)||(i[t]=n)});return i}function Ve(n){for(var e=-1,t=Zr(n),r=t.length,i=hr(r);r>++e;){var o=t[e];i[e]=[o,n[o]]}return i}function Fe(n,e,r){var i={};if("function"!=typeof e)for(var o=-1,u=Z(arguments,!0,!1,1),a=Me(n)?u.length:0;a>++o;){var s=u[o];s in n&&(i[s]=n[s])}else e=t.createCallback(e,r,3),ui(n,function(n,t,r){e(n,t,r)&&(i[t]=n)});return i}function Ge(n,e,r,i){var o=Xr(n);if(null==r)if(o)r=[];else{var u=n&&n.constructor,a=u&&u.prototype;r=y(a)}return e&&(e=t.createCallback(e,i,4),(o?He:ai)(n,function(n,t,i){return e(r,n,t,i)})),r}function ze(n){for(var e=-1,t=Zr(n),r=t.length,i=hr(r);r>++e;)i[e]=n[t[e]];return i}function $e(n){for(var e=arguments,t=-1,r=Z(e,!0,!1,1),i=e[2]&&e[2][e[1]]===n?1:r.length,o=hr(i);i>++t;)o[t]=n[r[t]];return o}function We(n,e,t){var r=-1,i=se(),o=n?n.length:0,u=!1;return t=(0>t?$r(0,o+t):t)||0,Xr(n)?u=i(n,e,t)>-1:"number"==typeof o?u=(qe(n)?n.indexOf(e,t):i(n,e,t))>-1:ai(n,function(n){return++r>=t?!(u=n===e):v}),u}function Ue(n,e,r){var i=!0;e=t.createCallback(e,r,3);var o=-1,u=n?n.length:0;if("number"==typeof u)for(;u>++o&&(i=!!e(n[o],o,n)););else ai(n,function(n,t,r){return i=!!e(n,t,r)});return i}function Je(n,e,r){var i=[];e=t.createCallback(e,r,3);var o=-1,u=n?n.length:0;if("number"==typeof u)for(;u>++o;){var a=n[o];e(a,o,n)&&i.push(a)}else ai(n,function(n,t,r){e(n,t,r)&&i.push(n)});return i}function Ke(n,e,r){e=t.createCallback(e,r,3);var i=-1,o=n?n.length:0;if("number"!=typeof o){var u;return ai(n,function(n,t,r){return e(n,t,r)?(u=n,!1):v}),u}for(;o>++i;){var a=n[i];if(e(a,i,n))return a}}function Qe(n,e,r){var i;return e=t.createCallback(e,r,3),Xe(n,function(n,t,r){return e(n,t,r)?(i=n,!1):v}),i}function He(n,e,t){var r=-1,i=n?n.length:0;if(e=e&&t===v?e:C(e,t,3),"number"==typeof i)for(;i>++r&&e(n[r],r,n)!==!1;);else ai(n,e);return n}function Xe(n,e,t){var r=n?n.length:0;if(e=e&&t===v?e:C(e,t,3),"number"==typeof r)for(;r--&&e(n[r],r,n)!==!1;);else{var i=Zr(n);r=i.length,ai(n,function(n,t,o){return t=i?i[--r]:--r,e(o[t],t,o)})}return n}function Ye(n,e){var t=m(arguments,2),r=-1,i="function"==typeof e,o=n?n.length:0,u=hr("number"==typeof o?o:0);return He(n,function(n){u[++r]=(i?e:n[e]).apply(n,t)}),u}function Ze(n,e,r){var i=-1,o=n?n.length:0;if(e=t.createCallback(e,r,3),"number"==typeof o)for(var u=hr(o);o>++i;)u[i]=e(n[i],i,n);else u=[],ai(n,function(n,t,r){u[++i]=e(n,t,r)});return u}function nt(n,e,r){var i=-1/0,o=i;if("function"!=typeof e&&r&&r[e]===n&&(e=null),null==e&&Xr(n))for(var a=-1,s=n.length;s>++a;){var c=n[a];c>o&&(o=c)}else e=null==e&&qe(n)?u:t.createCallback(e,r,3),He(n,function(n,t,r){var u=e(n,t,r);u>i&&(i=u,o=n)});return o}function et(n,e,r){var i=1/0,o=i;if("function"!=typeof e&&r&&r[e]===n&&(e=null),null==e&&Xr(n))for(var a=-1,s=n.length;s>++a;){var c=n[a];o>c&&(o=c)}else e=null==e&&qe(n)?u:t.createCallback(e,r,3),He(n,function(n,t,r){var u=e(n,t,r);i>u&&(i=u,o=n)});return o}function tt(n,e,r,i){if(!n)return r;var o=3>arguments.length;e=t.createCallback(e,i,4);var u=-1,a=n.length;if("number"==typeof a)for(o&&(r=n[++u]);a>++u;)r=e(r,n[u],u,n);else ai(n,function(n,t,i){r=o?(o=!1,n):e(r,n,t,i)});return r}function rt(n,e,r,i){var o=3>arguments.length;return e=t.createCallback(e,i,4),Xe(n,function(n,t,i){r=o?(o=!1,n):e(r,n,t,i)}),r}function it(n,e,r){return e=t.createCallback(e,r,3),Je(n,function(n,t,r){return!e(n,t,r)})}function ot(n,e,t){if(n&&"number"!=typeof n.length&&(n=ze(n)),null==e||t)return n?n[re(0,n.length-1)]:v;var r=ut(n);return r.length=Wr($r(0,e),r.length),r}function ut(n){var e=-1,t=n?n.length:0,r=hr("number"==typeof t?t:0);return He(n,function(n){var t=re(0,++e);r[e]=r[t],r[t]=n}),r}function at(n){var e=n?n.length:0;return"number"==typeof e?e:Zr(n).length}function st(n,e,r){var i;e=t.createCallback(e,r,3);var o=-1,u=n?n.length:0;if("number"==typeof u)for(;u>++o&&!(i=e(n[o],o,n)););else ai(n,function(n,t,r){return!(i=e(n,t,r))});return!!i}function ct(n,e,r){var i=-1,o=Xr(e),u=n?n.length:0,s=hr("number"==typeof u?u:0);for(o||(e=t.createCallback(e,r,3)),He(n,function(n,t,r){var u=s[++i]=f();o?u.criteria=Ze(e,function(e){return n[e]}):(u.criteria=l())[0]=e(n,t,r),u.index=i,u.value=n}),u=s.length,s.sort(a);u--;){var c=s[u];s[u]=c.value,o||p(c.criteria),h(c)}return s}function lt(n){return n&&"number"==typeof n.length?m(n):ze(n)}function ft(n){for(var e=-1,t=n?n.length:0,r=[];t>++e;){var i=n[e];i&&r.push(i)}return r}function pt(n){return Y(n,Z(arguments,!0,!0,1))}function ht(n,e,r){var i=-1,o=n?n.length:0;for(e=t.createCallback(e,r,3);o>++i;)if(e(n[i],i,n))return i;return-1}function mt(n,e,r){var i=n?n.length:0;for(e=t.createCallback(e,r,3);i--;)if(e(n[i],i,n))return i;return-1}function gt(n,e,r){var i=0,o=n?n.length:0;if("number"!=typeof e&&null!=e){var u=-1;for(e=t.createCallback(e,r,3);o>++u&&e(n[u],u,n);)i++}else if(i=e,null==i||r)return n?n[0]:v;return m(n,0,Wr($r(0,i),o))}function vt(n,e,t,r){return"boolean"!=typeof e&&null!=e&&(r=t,t="function"!=typeof e&&r&&r[e]===n?null:e,e=!1),null!=t&&(n=Ze(n,t,r)),Z(n,e)}function dt(e,t,r){if("number"==typeof r){var i=e?e.length:0;r=0>r?$r(0,i+r):r||0}else if(r){var o=jt(e,t);return e[o]===t?o:-1}return n(e,t,r)}function yt(n,e,r){var i=0,o=n?n.length:0;if("number"!=typeof e&&null!=e){var u=o;for(e=t.createCallback(e,r,3);u--&&e(n[u],u,n);)i++}else i=null==e||r?1:e||i;return m(n,0,Wr($r(0,o-i),o))}function _t(){for(var e=[],t=-1,r=arguments.length,o=l(),u=se(),a=u===n,c=l();r>++t;){var f=arguments[t];(Xr(f)||pe(f))&&(e.push(f),o.push(a&&f.length>=w&&s(t?e[t]:c)))}var m=e[0],g=-1,v=m?m.length:0,d=[];n:for(;v>++g;){var y=o[0];if(f=m[g],0>(y?i(y,f):u(c,f))){for(t=r,(y||c).push(f);--t;)if(y=o[t],0>(y?i(y,f):u(e[t],f)))continue n;d.push(f)}}for(;r--;)y=o[r],y&&h(y);return p(o),p(c),d}function bt(n,e,r){var i=0,o=n?n.length:0;if("number"!=typeof e&&null!=e){var u=o;for(e=t.createCallback(e,r,3);u--&&e(n[u],u,n);)i++}else if(i=e,null==i||r)return n?n[o-1]:v;return m(n,$r(0,o-i))}function wt(n,e,t){var r=n?n.length:0;for("number"==typeof t&&(r=(0>t?$r(0,r+t):Wr(t,r-1))+1);r--;)if(n[r]===e)return r;return-1}function Ct(n){for(var e=arguments,t=0,r=e.length,i=n?n.length:0;r>++t;)for(var o=-1,u=e[t];i>++o;)n[o]===u&&(Tr.call(n,o--,1),i--);return n}function xt(n,e,t){n=+n||0,t="number"==typeof t?t:+t||1,null==e&&(e=n,n=0);for(var r=-1,i=$r(0,Er((e-n)/(t||1))),o=hr(i);i>++r;)o[r]=n,n+=t;return o}function At(n,e,r){var i=-1,o=n?n.length:0,u=[];for(e=t.createCallback(e,r,3);o>++i;){var a=n[i];e(a,i,n)&&(u.push(a),Tr.call(n,i--,1),o--)}return u}function St(n,e,r){if("number"!=typeof e&&null!=e){var i=0,o=-1,u=n?n.length:0;for(e=t.createCallback(e,r,3);u>++o&&e(n[o],o,n);)i++}else i=null==e||r?1:$r(0,e);return m(n,i)}function jt(n,e,r,i){var o=0,u=n?n.length:o;for(r=r?t.createCallback(r,i,1):Xt,e=r(e);u>o;){var a=o+u>>>1;e>r(n[a])?o=a+1:u=a}return o}function kt(){return ie(Z(arguments,!0,!0))}function Et(n,e,r,i){return"boolean"!=typeof e&&null!=e&&(i=r,r="function"!=typeof e&&i&&i[e]===n?null:e,e=!1),null!=r&&(r=t.createCallback(r,i,3)),ie(n,e,r)}function Rt(n){return Y(n,m(arguments,1))}function Mt(){for(var n=-1,e=arguments.length;e>++n;){var t=arguments[n];if(Xr(t)||pe(t))var r=r?ie(Y(r,t).concat(Y(t,r))):t}return r||[]}function Ot(){for(var n=arguments.length>1?arguments:arguments[0],e=-1,t=n?nt(pi(n,"length")):0,r=hr(0>t?0:t);t>++e;)r[e]=pi(n,e);return r}function Lt(n,e){var t=-1,r=n?n.length:0,i={};for(e||!r||Xr(n[0])||(e=[]);r>++t;){var o=n[t];e?i[o]=e[t]:o&&(i[o[0]]=o[1])}return i}function Nt(n,e){if(!Re(e))throw new Cr;return function(){return 1>--n?e.apply(this,arguments):v}}function Pt(n,e){return arguments.length>2?ue(n,17,m(arguments,2),null,e):ue(n,1,null,null,e)}function qt(n){for(var e=arguments.length>1?Z(arguments,!0,!1,1):be(n),t=-1,r=e.length;r>++t;){var i=e[t];n[i]=ue(n[i],1,null,null,n)}return n}function Tt(n,e){return arguments.length>2?ue(e,19,m(arguments,2),null,n):ue(e,3,null,null,n)}function It(){for(var n=arguments,e=n.length;e--;)if(!Re(n[e]))throw new Cr;return function(){for(var e=arguments,t=n.length;t--;)e=[n[t].apply(this,e)];return e[0]}}function Dt(n,e){return e="number"==typeof e?e:+e||n.length,ue(n,4,null,null,null,e)}function Bt(n,e,t){var r,i,o,u,a,s,c,l=0,f=!1,p=!0;if(!Re(n))throw new Cr;if(e=$r(0,e)||0,t===!0){var h=!0;p=!1}else Me(t)&&(h=t.leading,f="maxWait"in t&&($r(e,t.maxWait)||0),p="trailing"in t?t.trailing:p);var m=function(){var t=e-(mi()-u);if(0>=t){i&&Rr(i);var f=c;i=s=c=v,f&&(l=mi(),o=n.apply(a,r),s||i||(r=a=null))}else s=qr(m,t)},g=function(){s&&Rr(s),i=s=c=v,(p||f!==e)&&(l=mi(),o=n.apply(a,r),s||i||(r=a=null))};return function(){if(r=arguments,u=mi(),a=this,c=p&&(s||!h),f===!1)var t=h&&!s;else{i||h||(l=u);var v=f-(u-l),d=0>=v;d?(i&&(i=Rr(i)),l=u,o=n.apply(a,r)):i||(i=qr(g,v))}return d&&s?s=Rr(s):s||e===f||(s=qr(m,e)),t&&(d=!0,o=n.apply(a,r)),!d||s||i||(r=a=null),o}}function Vt(n){if(!Re(n))throw new Cr;var e=m(arguments,1);return qr(function(){n.apply(v,e)},1)}function Ft(n,e){if(!Re(n))throw new Cr;var t=m(arguments,2);return qr(function(){n.apply(v,t)},e)}function Gt(n,e){if(!Re(n))throw new Cr;var t=function(){var r=t.cache,i=e?e.apply(this,arguments):b+arguments[0];return Nr.call(r,i)?r[i]:r[i]=n.apply(this,arguments)};return t.cache={},t}function zt(n){var e,t;if(!Re(n))throw new Cr;return function(){return e?t:(e=!0,t=n.apply(this,arguments),n=null,t)}}function $t(n){return ue(n,16,m(arguments,1))}function Wt(n){return ue(n,32,null,m(arguments,1))}function Ut(n,e,t){var r=!0,i=!0;if(!Re(n))throw new Cr;return t===!1?r=!1:Me(t)&&(r="leading"in t?t.leading:r,i="trailing"in t?t.trailing:i),J.leading=r,J.maxWait=e,J.trailing=i,Bt(n,e,J)}function Jt(n,e){return ue(e,16,[n])}function Kt(n){return function(){return n}}function Qt(n,e,t){var r=typeof n;if(null==n||"function"==r)return C(n,e,t);if("object"!=r)return er(n);var i=Zr(n),o=i[0],u=n[o];return 1!=i.length||u!==u||Me(u)?function(e){for(var t=i.length,r=!1;t--&&(r=ne(e[i[t]],n[i[t]],null,!0)););return r}:function(n){var e=n[o];return u===e&&(0!==u||1/u==1/e)}}function Ht(n){return null==n?"":wr(n).replace(ri,ae)}function Xt(n){return n}function Yt(n,e,i){var o=!0,u=e&&be(e);e&&(i||u.length)||(null==i&&(i=e),a=r,e=n,n=t,u=be(e)),i===!1?o=!1:Me(i)&&"chain"in i&&(o=i.chain);var a=n,s=Re(a);He(u,function(t){var r=n[t]=e[t];s&&(a.prototype[t]=function(){var e=this.__chain__,t=this.__wrapped__,i=[t];Pr.apply(i,arguments);var u=r.apply(n,i);if(o||e){if(t===u&&Me(u))return this;u=new a(u),u.__chain__=e}return u})})}function Zt(){return e._=Sr,this}function nr(){}function er(n){return function(e){return e[n]}}function tr(n,e,t){var r=null==n,i=null==e;if(null==t&&("boolean"==typeof n&&i?(t=n,n=1):i||"boolean"!=typeof e||(t=e,i=!0)),r&&i&&(e=1),n=+n||0,i?(e=n,n=0):e=+e||0,t||n%1||e%1){var o=Jr();return Wr(n+o*(e-n+parseFloat("1e-"+((o+"").length-1))),e)}return re(n,e)}function rr(n,e){if(n){var t=n[e];return Re(t)?n[e]():t}}function ir(n,e,r){var i=t.templateSettings;n=wr(n||""),r=oi({},r,i);var o,u=oi({},r.imports,i.imports),a=Zr(u),s=ze(u),l=0,f=r.interpolate||L,p="__p += '",h=br((r.escape||L).source+"|"+f.source+"|"+(f===M?k:L).source+"|"+(r.evaluate||L).source+"|$","g");n.replace(h,function(e,t,r,i,u,a){return r||(r=i),p+=n.slice(l,a).replace(P,c),t&&(p+="' +\n__e("+t+") +\n'"),u&&(o=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),p+="';\n";var m=r.variable,g=m;g||(m="obj",p="with ("+m+") {\n"+p+"\n}\n"),p=(o?p.replace(A,""):p).replace(S,"$1").replace(j,"$1;"),p="function("+m+") {\n"+(g?"":m+" || ("+m+" = {});\n")+"var __t, __p = '', __e = _.escape"+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var d="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+T++ +"]")+"\n*/";try{var y=vr(a,"return "+p+d).apply(v,s)}catch(_){throw _.source=p,_}return e?y(e):(y.source=p,y)}function or(n,e,t){n=(n=+n)>-1?n:0;var r=-1,i=hr(n);for(e=C(e,t,1);n>++r;)i[r]=e(r);return i}function ur(n){return null==n?"":wr(n).replace(ti,fe)}function ar(n){var e=++_;return wr(null==n?"":n)+e}function sr(n){return n=new r(n),n.__chain__=!0,n}function cr(n,e){return e(n),n}function lr(){return this.__chain__=!0,this}function fr(){return wr(this.__wrapped__)}function pr(){return this.__wrapped__}e=e?te.defaults(X.Object(),e,te.pick(X,q)):X;var hr=e.Array,mr=e.Boolean,gr=e.Date,vr=e.Function,dr=e.Math,yr=e.Number,_r=e.Object,br=e.RegExp,wr=e.String,Cr=e.TypeError,xr=[],Ar=_r.prototype,Sr=e._,jr=Ar.toString,kr=br("^"+wr(jr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Er=dr.ceil,Rr=e.clearTimeout,Mr=dr.floor,Or=vr.prototype.toString,Lr=ce(Lr=_r.getPrototypeOf)&&Lr,Nr=Ar.hasOwnProperty,Pr=xr.push,qr=e.setTimeout,Tr=xr.splice,Ir=xr.unshift,Dr=function(){try{var n={},e=ce(e=_r.defineProperty)&&e,t=e(n,n,n)&&e}catch(r){}return t}(),Br=ce(Br=_r.create)&&Br,Vr=ce(Vr=hr.isArray)&&Vr,Fr=e.isFinite,Gr=e.isNaN,zr=ce(zr=_r.keys)&&zr,$r=dr.max,Wr=dr.min,Ur=e.parseInt,Jr=dr.random,Kr={};Kr[D]=hr,Kr[B]=mr,Kr[V]=gr,Kr[F]=vr,Kr[z]=_r,Kr[G]=yr,Kr[$]=br,Kr[W]=wr,r.prototype=t.prototype;var Qr=t.support={};Qr.funcDecomp=!ce(e.WinRTError)&&N.test(g),Qr.funcNames="string"==typeof vr.name,t.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:M,variable:"",imports:{_:t}},Br||(y=function(){function n(){}return function(t){if(Me(t)){n.prototype=t;var r=new n;n.prototype=null}return r||e.Object()}}());var Hr=Dr?function(n,e){K.value=e,Dr(n,"__bindData__",K)}:nr,Xr=Vr||function(n){return n&&"object"==typeof n&&"number"==typeof n.length&&jr.call(n)==D||!1},Yr=function(n){var e,t=n,r=[];if(!t)return r;if(!Q[typeof n])return r;for(e in t)Nr.call(t,e)&&r.push(e);return r},Zr=zr?function(n){return Me(n)?zr(n):[]}:Yr,ni={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ei=Ce(ni),ti=br("("+Zr(ei).join("|")+")","g"),ri=br("["+Zr(ni).join("")+"]","g"),ii=function(n,e,t){var r,i=n,o=i;if(!i)return o;var u=arguments,a=0,s="number"==typeof t?2:u.length;if(s>3&&"function"==typeof u[s-2])var c=C(u[--s-1],u[s--],2);else s>2&&"function"==typeof u[s-1]&&(c=u[--s]);for(;s>++a;)if(i=u[a],i&&Q[typeof i])for(var l=-1,f=Q[typeof i]&&Zr(i),p=f?f.length:0;p>++l;)r=f[l],o[r]=c?c(o[r],i[r]):i[r];return o},oi=function(n,e,t){var r,i=n,o=i;if(!i)return o;for(var u=arguments,a=0,s="number"==typeof t?2:u.length;s>++a;)if(i=u[a],i&&Q[typeof i])for(var c=-1,l=Q[typeof i]&&Zr(i),f=l?l.length:0;f>++c;)r=l[c],o[r]===v&&(o[r]=i[r]);return o},ui=function(n,e,t){var r,i=n,o=i;if(!i)return o;if(!Q[typeof i])return o;e=e&&t===v?e:C(e,t,3);for(r in i)if(e(i[r],r,n)===!1)return o;return o},ai=function(n,e,t){var r,i=n,o=i;if(!i)return o;if(!Q[typeof i])return o;e=e&&t===v?e:C(e,t,3);for(var u=-1,a=Q[typeof i]&&Zr(i),s=a?a.length:0;s>++u;)if(r=a[u],e(i[r],r,n)===!1)return o;return o},si=Lr?function(n){if(!n||jr.call(n)!=z)return!1;var e=n.valueOf,t=ce(e)&&(t=Lr(e))&&Lr(t);return t?n==t||Lr(n)==t:le(n)}:le,ci=oe(function(n,e,t){Nr.call(n,t)?n[t]++:n[t]=1}),li=oe(function(n,e,t){(Nr.call(n,t)?n[t]:n[t]=[]).push(e)}),fi=oe(function(n,e,t){n[t]=e}),pi=Ze,hi=Je,mi=ce(mi=gr.now)&&mi||function(){return(new gr).getTime()},gi=8==Ur(x+"08")?Ur:function(n,e){return Ur(qe(n)?n.replace(O,""):n,e||0)};return t.after=Nt,t.assign=ii,t.at=$e,t.bind=Pt,t.bindAll=qt,t.bindKey=Tt,t.chain=sr,t.compact=ft,t.compose=It,t.constant=Kt,t.countBy=ci,t.create=ge,t.createCallback=Qt,t.curry=Dt,t.debounce=Bt,t.defaults=oi,t.defer=Vt,t.delay=Ft,t.difference=pt,t.filter=Je,t.flatten=vt,t.forEach=He,t.forEachRight=Xe,t.forIn=ui,t.forInRight=ye,t.forOwn=ai,t.forOwnRight=_e,t.functions=be,t.groupBy=li,t.indexBy=fi,t.initial=yt,t.intersection=_t,t.invert=Ce,t.invoke=Ye,t.keys=Zr,t.map=Ze,t.mapValues=Ie,t.max=nt,t.memoize=Gt,t.merge=De,t.min=et,t.omit=Be,t.once=zt,t.pairs=Ve,t.partial=$t,t.partialRight=Wt,t.pick=Fe,t.pluck=pi,t.property=er,t.pull=Ct,t.range=xt,t.reject=it,t.remove=At,t.rest=St,t.shuffle=ut,t.sortBy=ct,t.tap=cr,t.throttle=Ut,t.times=or,t.toArray=lt,t.transform=Ge,t.union=kt,t.uniq=Et,t.values=ze,t.where=hi,t.without=Rt,t.wrap=Jt,t.xor=Mt,t.zip=Ot,t.zipObject=Lt,t.collect=Ze,t.drop=St,t.each=He,t.eachRight=Xe,t.extend=ii,t.methods=be,t.object=Lt,t.select=Je,t.tail=St,t.unique=Et,t.unzip=Ot,Yt(t),t.clone=he,t.cloneDeep=me,t.contains=We,t.escape=Ht,t.every=Ue,t.find=Ke,t.findIndex=ht,t.findKey=ve,t.findLast=Qe,t.findLastIndex=mt,t.findLastKey=de,t.has=we,t.identity=Xt,t.indexOf=dt,t.isArguments=pe,t.isArray=Xr,t.isBoolean=xe,t.isDate=Ae,t.isElement=Se,t.isEmpty=je,t.isEqual=ke,t.isFinite=Ee,t.isFunction=Re,t.isNaN=Oe,t.isNull=Le,t.isNumber=Ne,t.isObject=Me,t.isPlainObject=si,t.isRegExp=Pe,t.isString=qe,t.isUndefined=Te,t.lastIndexOf=wt,t.mixin=Yt,t.noConflict=Zt,t.noop=nr,t.now=mi,t.parseInt=gi,t.random=tr,t.reduce=tt,t.reduceRight=rt,t.result=rr,t.runInContext=g,t.size=at,t.some=st,t.sortedIndex=jt,t.template=ir,t.unescape=ur,t.uniqueId=ar,t.all=Ue,t.any=st,t.detect=Ke,t.findWhere=Ke,t.foldl=tt,t.foldr=rt,t.include=We,t.inject=tt,Yt(function(){var n={};return ai(t,function(e,r){t.prototype[r]||(n[r]=e)}),n}(),!1),t.first=gt,t.last=bt,t.sample=ot,t.take=gt,t.head=gt,ai(t,function(n,e){var i="sample"!==e;t.prototype[e]||(t.prototype[e]=function(e,t){var o=this.__chain__,u=n(this.__wrapped__,e,t);return o||null!=e&&(!t||i&&"function"==typeof e)?new r(u,o):u})}),t.VERSION="2.4.1",t.prototype.chain=lr,t.prototype.toString=fr,t.prototype.value=pr,t.prototype.valueOf=pr,He(["join","pop","shift"],function(n){var e=xr[n];t.prototype[n]=function(){var n=this.__chain__,t=e.apply(this.__wrapped__,arguments);return n?new r(t,n):t}}),He(["push","reverse","sort","unshift"],function(n){var e=xr[n];t.prototype[n]=function(){return e.apply(this.__wrapped__,arguments),this}}),He(["concat","slice","splice"],function(n){var e=xr[n];t.prototype[n]=function(){return new r(e.apply(this.__wrapped__,arguments),this.__chain__)}}),t}var v,d=[],y=[],_=0,b=+new Date+"",w=75,C=40,x=" \f \n\r\u2028\u2029 ᠎              ",A=/\b__p \+= '';/g,S=/\b(__p \+=) '' \+/g,j=/(__e\(.*?\)|\b__t\)) \+\n'';/g,k=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,E=/\w*$/,R=/^\s*function[ \n\r\t]+\w/,M=/<%=([\s\S]+?)%>/g,O=RegExp("^["+x+"]*0+(?=.$)"),L=/($^)/,N=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,q=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],T=0,I="[object Arguments]",D="[object Array]",B="[object Boolean]",V="[object Date]",F="[object Function]",G="[object Number]",z="[object Object]",$="[object RegExp]",W="[object String]",U={};U[F]=!1,U[I]=U[D]=U[B]=U[V]=U[G]=U[z]=U[$]=U[W]=!0;var J={leading:!1,maxWait:0,trailing:!1},K={configurable:!1,enumerable:!1,value:null,writable:!1},Q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},H={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},X=Q[typeof window]&&window||this,Y=Q[typeof t]&&t&&!t.nodeType&&t,Z=Q[typeof e]&&e&&!e.nodeType&&e,ne=Z&&Z.exports===Y&&Y,ee=Q[typeof r]&&r;!ee||ee.global!==ee&&ee.window!==ee||(X=ee);var te=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X._=te,define(function(){return te})):Y&&Z?ne?(Z.exports=te)._=te:Y._=te:X._=te}).call(this)},{}],lodash:[function(n,e){e.exports=n("uRgOwe")},{}]},{},[]);var css=require("css"),_=require("lodash"),exampleCSS=".example-selector { display: inline-block; }",ast=css.parse(exampleCSS);_.each(ast.stylesheet.rules,function(n){fixIEBugs(n)}),console.log(css.stringify(ast));
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; }
body, html { height: 100%; width: 100%; }</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.