diff --git a/docs/assets/js/vendor/autoprefixer.js b/docs/assets/js/vendor/autoprefixer.js index 2919f5f62c..2fabe8bfa4 100644 --- a/docs/assets/js/vendor/autoprefixer.js +++ b/docs/assets/js/vendor/autoprefixer.js @@ -1,8 +1,8 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.autoprefixer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o b[0]) { @@ -157,45 +124,71 @@ } else if (a[0] < b[0]) { return -1; } else { - return parseFloat(a[1]) - parseFloat(b[1]); + d = parseFloat(a[1]) - parseFloat(b[1]); + if (d > 0) { + return 1; + } else if (d < 0) { + return -1; + } else { + return 0; + } } }); - return callback(sorted); }; - map = function(browsers, callback) { - var browser, name, version, _i, _len, _ref, _results; - _results = []; - for (_i = 0, _len = browsers.length; _i < _len; _i++) { - browser = browsers[_i]; - _ref = browser.split(' '), name = _ref[0], version = _ref[1]; - version = parseFloat(version); - _results.push(callback(browser, name, version)); + feature = function(data, opts, callback) { + var browser, match, need, ref, ref1, support, version, versions; + if (!callback) { + ref = [opts, {}], callback = ref[0], opts = ref[1]; } - return _results; + match = opts.match || /\sx($|\s)/; + need = []; + ref1 = data.stats; + for (browser in ref1) { + versions = ref1[browser]; + for (version in versions) { + support = versions[version]; + if (support.match(match)) { + need.push(browser + ' ' + version); + } + } + } + return callback(sort(need)); }; - filter = function(browsers, callback) { - return browsers.filter(function(browser) { - var name, version, _ref; - _ref = browser.split(' '), name = _ref[0], version = _ref[1]; - version = parseFloat(version); - return callback(name, version); - }); - }; + result = {}; prefix = function() { - var data, name, names, _i, _j, _len, _results; - names = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), data = arguments[_i++]; - _results = []; - for (_j = 0, _len = names.length; _j < _len; _j++) { - name = names[_j]; - _results.push(module.exports[name] = data); + var data, i, j, k, len, name, names, results; + names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++]; + results = []; + for (k = 0, len = names.length; k < len; k++) { + name = names[k]; + result[name] = {}; + results.push((function() { + var results1; + results1 = []; + for (i in data) { + results1.push(result[name][i] = data[i]); + } + return results1; + })()); } - return _results; + return results; }; - module.exports = {}; + add = function() { + var data, j, k, len, name, names, results; + names = 2 <= arguments.length ? slice.call(arguments, 0, j = arguments.length - 1) : (j = 0, []), data = arguments[j++]; + results = []; + for (k = 0, len = names.length; k < len; k++) { + name = names[k]; + results.push(result[name].browsers = sort(result[name].browsers.concat(data.browsers))); + } + return results; + }; + + module.exports = result; feature(require('caniuse-db/features-json/border-radius'), function(browsers) { return prefix('border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius', { @@ -214,6 +207,7 @@ feature(require('caniuse-db/features-json/css-animation'), function(browsers) { return prefix('animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes', { + mistakes: ['-ms-'], browsers: browsers }); }); @@ -242,17 +236,29 @@ }); }); - feature(require('caniuse-db/features-json/css-gradients'), function(browsers) { - browsers = map(browsers, function(browser, name, version) { - if (name === 'android' && version < 4 || name === 'ios_saf' && version < 5 || name === 'safari' && version < 5.1) { - return browser + ' old'; + gradients = require('caniuse-db/features-json/css-gradients'); + + feature(gradients, { + match: /y\sx/ + }, function(browsers) { + return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { + props: ['background', 'background-image', 'border-image', 'list-style', 'list-style-image', 'content', 'mask-image', 'mask'], + mistakes: ['-ms-'], + browsers: browsers + }); + }); + + feature(gradients, { + match: /a\sx/ + }, function(browsers) { + browsers = browsers.map(function(i) { + if (/op/.test(i)) { + return i; } else { - return browser; + return i + " old"; } }); - return prefix('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { - props: ['background', 'background-image', 'border-image', 'list-style', 'list-style-image', 'content'], - mistakes: ['-ms-'], + return add('linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient', { browsers: browsers }); }); @@ -286,18 +292,16 @@ }); }); - feature(require('caniuse-db/features-json/flexbox'), function(browsers) { - browsers = map(browsers, function(browser, name, version) { - if (name === 'safari' && version < 6.1) { - return browser + ' 2009'; - } else if (name === 'ios_saf' && version < 7) { - return browser + ' 2009'; - } else if (name === 'chrome' && version < 21) { - return browser + ' 2009'; - } else if (name === 'android' && version < 4.4) { - return browser + ' 2009'; + flexbox = require('caniuse-db/features-json/flexbox'); + + feature(flexbox, { + match: /a\sx/ + }, function(browsers) { + browsers = browsers.map(function(i) { + if (/ie|firefox/.test(i)) { + return i; } else { - return browser; + return i + " 2009"; } }); prefix('display-flex', 'inline-flex', { @@ -313,6 +317,20 @@ }); }); + feature(flexbox, { + match: /y\sx/ + }, function(browsers) { + add('display-flex', 'inline-flex', { + browsers: browsers + }); + add('flex', 'flex-grow', 'flex-shrink', 'flex-basis', { + browsers: browsers + }); + return add('flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content', { + browsers: browsers + }); + }); + feature(require('caniuse-db/features-json/calc'), function(browsers) { return prefix('calc', { props: ['*'], @@ -346,14 +364,16 @@ }); feature(require('caniuse-db/features-json/css-placeholder'), function(browsers) { - browsers = map(browsers, function(browser, name, version) { - if (name === 'firefox' && version <= 18) { - return browser + ' old'; + browsers = browsers.map(function(i) { + var name, ref, version; + ref = i.split(' '), name = ref[0], version = ref[1]; + if (name === 'firefox' && parseFloat(version) <= 18) { + return i + ' old'; } else { - return browser; + return i; } }); - return prefix('::placeholder', { + return prefix(':placeholder-shown', '::placeholder', { selector: true, browsers: browsers }); @@ -432,7 +452,11 @@ }); feature(require('caniuse-db/features-json/css-masks'), function(browsers) { - return prefix('clip-path', 'mask', 'mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-position', 'mask-repeat', 'mask-size', { + prefix('mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', { + browsers: browsers + }); + return prefix('clip-path', 'mask', 'mask-position', 'mask-size', { + transition: true, browsers: browsers }); }); @@ -489,13 +513,25 @@ }); }); - feature(require('caniuse-db/features-json/css-crisp-edges'), function(browsers) { + crispedges = require('caniuse-db/features-json/css-crisp-edges'); + + feature(crispedges, { + match: /y x/ + }, function(browsers) { return prefix('crisp-edges', { props: ['image-rendering'], browsers: browsers }); }); + feature(crispedges, { + match: /a x #2/ + }, function(browsers) { + return prefix('image-rendering', { + browsers: browsers + }); + }); + logicalProps = require('caniuse-db/features-json/css-logical-props'); feature(logicalProps, function(browsers) { @@ -505,10 +541,9 @@ }); }); - feature(logicalProps, function(browsers) { - browsers = filter(browsers, function(i) { - return i !== 'firefox' && i !== 'and_ff'; - }); + feature(logicalProps, { + match: /x\s#2/ + }, function(browsers) { return prefix('border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', { transition: true, browsers: browsers @@ -517,16 +552,16 @@ }).call(this); -},{"./browsers":2,"caniuse-db/features-json/background-img-opts":57,"caniuse-db/features-json/border-image":58,"caniuse-db/features-json/border-radius":59,"caniuse-db/features-json/calc":60,"caniuse-db/features-json/css-animation":61,"caniuse-db/features-json/css-boxdecorationbreak":62,"caniuse-db/features-json/css-boxshadow":63,"caniuse-db/features-json/css-crisp-edges":64,"caniuse-db/features-json/css-deviceadaptation":65,"caniuse-db/features-json/css-filters":66,"caniuse-db/features-json/css-gradients":67,"caniuse-db/features-json/css-hyphens":68,"caniuse-db/features-json/css-logical-props":69,"caniuse-db/features-json/css-masks":70,"caniuse-db/features-json/css-media-resolution":71,"caniuse-db/features-json/css-placeholder":72,"caniuse-db/features-json/css-selection":73,"caniuse-db/features-json/css-shapes":74,"caniuse-db/features-json/css-sticky":75,"caniuse-db/features-json/css-text-align-last":76,"caniuse-db/features-json/css-transitions":77,"caniuse-db/features-json/css3-boxsizing":78,"caniuse-db/features-json/css3-cursors-newer":79,"caniuse-db/features-json/css3-tabsize":80,"caniuse-db/features-json/flexbox":81,"caniuse-db/features-json/font-feature":82,"caniuse-db/features-json/fullscreen":83,"caniuse-db/features-json/intrinsic-width":84,"caniuse-db/features-json/multicolumn":85,"caniuse-db/features-json/object-fit":86,"caniuse-db/features-json/pointer":87,"caniuse-db/features-json/text-decoration":88,"caniuse-db/features-json/text-emphasis":89,"caniuse-db/features-json/text-overflow":90,"caniuse-db/features-json/text-size-adjust":91,"caniuse-db/features-json/transforms2d":92,"caniuse-db/features-json/transforms3d":93,"caniuse-db/features-json/user-select-none":94}],4:[function(require,module,exports){ +},{"caniuse-db/features-json/background-img-opts":57,"caniuse-db/features-json/border-image":58,"caniuse-db/features-json/border-radius":59,"caniuse-db/features-json/calc":60,"caniuse-db/features-json/css-animation":61,"caniuse-db/features-json/css-boxdecorationbreak":62,"caniuse-db/features-json/css-boxshadow":63,"caniuse-db/features-json/css-crisp-edges":64,"caniuse-db/features-json/css-deviceadaptation":65,"caniuse-db/features-json/css-filters":66,"caniuse-db/features-json/css-gradients":67,"caniuse-db/features-json/css-hyphens":68,"caniuse-db/features-json/css-logical-props":69,"caniuse-db/features-json/css-masks":70,"caniuse-db/features-json/css-media-resolution":71,"caniuse-db/features-json/css-placeholder":72,"caniuse-db/features-json/css-selection":73,"caniuse-db/features-json/css-shapes":74,"caniuse-db/features-json/css-sticky":75,"caniuse-db/features-json/css-text-align-last":76,"caniuse-db/features-json/css-transitions":77,"caniuse-db/features-json/css3-boxsizing":78,"caniuse-db/features-json/css3-cursors-newer":79,"caniuse-db/features-json/css3-tabsize":80,"caniuse-db/features-json/flexbox":81,"caniuse-db/features-json/font-feature":82,"caniuse-db/features-json/fullscreen":83,"caniuse-db/features-json/intrinsic-width":84,"caniuse-db/features-json/multicolumn":85,"caniuse-db/features-json/object-fit":86,"caniuse-db/features-json/pointer":87,"caniuse-db/features-json/text-decoration":88,"caniuse-db/features-json/text-emphasis":89,"caniuse-db/features-json/text-overflow":90,"caniuse-db/features-json/text-size-adjust":91,"caniuse-db/features-json/transforms2d":92,"caniuse-db/features-json/transforms3d":93,"caniuse-db/features-json/user-select-none":94}],3:[function(require,module,exports){ (function() { var AtRule, Prefixer, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); - AtRule = (function(_super) { - __extends(AtRule, _super); + AtRule = (function(superClass) { + extend(AtRule, superClass); function AtRule() { return AtRule.__super__.constructor.apply(this, arguments); @@ -548,18 +583,18 @@ }; AtRule.prototype.process = function(node) { - var parent, prefix, _i, _len, _ref, _results; + var j, len, parent, prefix, ref, results; parent = this.parentPrefix(node); - _ref = this.prefixes; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prefix = _ref[_i]; + ref = this.prefixes; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + prefix = ref[j]; if (parent && parent !== prefix) { continue; } - _results.push(this.add(node, prefix)); + results.push(this.add(node, prefix)); } - return _results; + return results; }; return AtRule; @@ -570,7 +605,7 @@ }).call(this); -},{"./prefixer":40}],5:[function(require,module,exports){ +},{"./prefixer":40}],4:[function(require,module,exports){ (function() { var Browsers, browserslist, utils; @@ -584,15 +619,15 @@ if (this.prefixesCache) { return this.prefixesCache; } - data = require('../data/browsers'); + data = require('caniuse-db/data').agents; return this.prefixesCache = utils.uniq((function() { - var _results; - _results = []; + var results; + results = []; for (name in data) { i = data[name]; - _results.push(i.prefix); + results.push("-" + i.prefix + "-"); } - return _results; + return results; })()).sort(function(a, b) { return b.length - a.length; }); @@ -605,27 +640,27 @@ return this.prefixesRegexp.test(value); }; - function Browsers(data, requirements, options) { - this.data = data; + function Browsers(data1, requirements, options) { + this.data = data1; this.options = options; this.selected = this.parse(requirements); } Browsers.prototype.parse = function(requirements) { - var _ref; + var ref; return browserslist(requirements, { - path: (_ref = this.options) != null ? _ref.from : void 0 + path: (ref = this.options) != null ? ref.from : void 0 }); }; Browsers.prototype.browsers = function(criteria) { - var browser, data, selected, versions, _ref; + var browser, data, ref, selected, versions; selected = []; - _ref = this.data; - for (browser in _ref) { - data = _ref[browser]; + ref = this.data; + for (browser in ref) { + data = ref[browser]; versions = criteria(data).map(function(version) { - return "" + browser + " " + version; + return browser + " " + version; }); selected = selected.concat(versions); } @@ -633,13 +668,14 @@ }; Browsers.prototype.prefix = function(browser) { - var name, version, _ref; - _ref = browser.split(' '), name = _ref[0], version = _ref[1]; - if (name === 'opera' && parseFloat(version) >= 15) { - return '-webkit-'; - } else { - return this.data[name].prefix; + var data, name, prefix, ref, version; + ref = browser.split(' '), name = ref[0], version = ref[1]; + data = this.data[name]; + if (data.prefix_exceptions) { + prefix = data.prefix_exceptions[version]; } + prefix || (prefix = data.prefix); + return '-' + prefix + '-'; }; Browsers.prototype.isSelected = function(browser) { @@ -654,11 +690,11 @@ }).call(this); -},{"../data/browsers":2,"./utils":46,"browserslist":55}],6:[function(require,module,exports){ +},{"./utils":46,"browserslist":55,"caniuse-db/data":56}],5:[function(require,module,exports){ (function() { var Browsers, Declaration, Prefixer, utils, vendor, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); @@ -668,8 +704,8 @@ utils = require('./utils'); - Declaration = (function(_super) { - __extends(Declaration, _super); + Declaration = (function(superClass) { + extend(Declaration, superClass); function Declaration() { return Declaration.__super__.constructor.apply(this, arguments); @@ -688,10 +724,10 @@ }; Declaration.prototype.otherPrefixes = function(value, prefix) { - var other, _i, _len, _ref; - _ref = Browsers.prefixes(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - other = _ref[_i]; + var j, len, other, ref; + ref = Browsers.prefixes(); + for (j = 0, len = ref.length; j < len; j++) { + other = ref[j]; if (other === prefix) { continue; } @@ -712,13 +748,13 @@ }; Declaration.prototype.maxPrefixed = function(prefixes, decl) { - var max, prefix, _i, _len; + var j, len, max, prefix; if (decl._autoprefixerMax) { return decl._autoprefixerMax; } max = 0; - for (_i = 0, _len = prefixes.length; _i < _len; _i++) { - prefix = prefixes[_i]; + for (j = 0, len = prefixes.length; j < len; j++) { + prefix = prefixes[j]; prefix = utils.removeNote(prefix); if (prefix.length > max) { max = prefix.length; @@ -728,14 +764,14 @@ }; Declaration.prototype.calcBefore = function(prefixes, decl, prefix) { - var before, diff, i, max, _i; + var before, diff, i, j, max, ref; if (prefix == null) { prefix = ''; } before = decl.style('before'); max = this.maxPrefixed(prefixes, decl); diff = max - utils.removeNote(prefix).length; - for (i = _i = 0; 0 <= diff ? _i < diff : _i > diff; i = 0 <= diff ? ++_i : --_i) { + for (i = j = 0, ref = diff; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { before += ' '; } return before; @@ -809,18 +845,18 @@ }).call(this); -},{"./browsers":5,"./prefixer":40,"./utils":46,"postcss/lib/vendor":113}],7:[function(require,module,exports){ +},{"./browsers":4,"./prefixer":40,"./utils":46,"postcss/lib/vendor":113}],6:[function(require,module,exports){ (function() { var AlignContent, Declaration, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - AlignContent = (function(_super) { - __extends(AlignContent, _super); + AlignContent = (function(superClass) { + extend(AlignContent, superClass); function AlignContent() { return AlignContent.__super__.constructor.apply(this, arguments); @@ -836,8 +872,8 @@ }; AlignContent.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return prefix + 'flex-line-pack'; } else { @@ -868,18 +904,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],8:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],7:[function(require,module,exports){ (function() { var AlignItems, Declaration, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - AlignItems = (function(_super) { - __extends(AlignItems, _super); + AlignItems = (function(superClass) { + extend(AlignItems, superClass); function AlignItems() { return AlignItems.__super__.constructor.apply(this, arguments); @@ -893,8 +929,8 @@ }; AlignItems.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-align'; } else if (spec === 2012) { @@ -927,18 +963,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],9:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],8:[function(require,module,exports){ (function() { var AlignSelf, Declaration, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - AlignSelf = (function(_super) { - __extends(AlignSelf, _super); + AlignSelf = (function(superClass) { + extend(AlignSelf, superClass); function AlignSelf() { return AlignSelf.__super__.constructor.apply(this, arguments); @@ -952,8 +988,8 @@ }; AlignSelf.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return prefix + 'flex-item-align'; } else { @@ -984,16 +1020,16 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],10:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],9:[function(require,module,exports){ (function() { var BackgroundSize, Declaration, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - BackgroundSize = (function(_super) { - __extends(BackgroundSize, _super); + BackgroundSize = (function(superClass) { + extend(BackgroundSize, superClass); function BackgroundSize() { return BackgroundSize.__super__.constructor.apply(this, arguments); @@ -1018,16 +1054,16 @@ }).call(this); -},{"../declaration":6}],11:[function(require,module,exports){ +},{"../declaration":5}],10:[function(require,module,exports){ (function() { var BlockLogical, Declaration, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - BlockLogical = (function(_super) { - __extends(BlockLogical, _super); + BlockLogical = (function(superClass) { + extend(BlockLogical, superClass); function BlockLogical() { return BlockLogical.__super__.constructor.apply(this, arguments); @@ -1055,16 +1091,16 @@ }).call(this); -},{"../declaration":6}],12:[function(require,module,exports){ +},{"../declaration":5}],11:[function(require,module,exports){ (function() { var BorderImage, Declaration, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - BorderImage = (function(_super) { - __extends(BorderImage, _super); + BorderImage = (function(superClass) { + extend(BorderImage, superClass); function BorderImage() { return BorderImage.__super__.constructor.apply(this, arguments); @@ -1085,18 +1121,18 @@ }).call(this); -},{"../declaration":6}],13:[function(require,module,exports){ +},{"../declaration":5}],12:[function(require,module,exports){ (function() { var BorderRadius, Declaration, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - BorderRadius = (function(_super) { - var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1; + BorderRadius = (function(superClass) { + var hor, i, j, len, len1, mozilla, normal, ref, ref1, ver; - __extends(BorderRadius, _super); + extend(BorderRadius, superClass); function BorderRadius() { return BorderRadius.__super__.constructor.apply(this, arguments); @@ -1108,12 +1144,12 @@ BorderRadius.toNormal = {}; - _ref = ['top', 'bottom']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ver = _ref[_i]; - _ref1 = ['left', 'right']; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - hor = _ref1[_j]; + ref = ['top', 'bottom']; + for (i = 0, len = ref.length; i < len; i++) { + ver = ref[i]; + ref1 = ['left', 'right']; + for (j = 0, len1 = ref1.length; j < len1; j++) { + hor = ref1[j]; normal = "border-" + ver + "-" + hor + "-radius"; mozilla = "border-radius-" + ver + hor; BorderRadius.names.push(normal); @@ -1143,16 +1179,16 @@ }).call(this); -},{"../declaration":6}],14:[function(require,module,exports){ +},{"../declaration":5}],13:[function(require,module,exports){ (function() { var BreakInside, Declaration, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - BreakInside = (function(_super) { - __extends(BreakInside, _super); + BreakInside = (function(superClass) { + extend(BreakInside, superClass); function BreakInside() { return BreakInside.__super__.constructor.apply(this, arguments); @@ -1199,16 +1235,16 @@ }).call(this); -},{"../declaration":6}],15:[function(require,module,exports){ +},{"../declaration":5}],14:[function(require,module,exports){ (function() { var CrispEdges, Value, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Value = require('../value'); - CrispEdges = (function(_super) { - __extends(CrispEdges, _super); + CrispEdges = (function(superClass) { + extend(CrispEdges, superClass); function CrispEdges() { return CrispEdges.__super__.constructor.apply(this, arguments); @@ -1232,11 +1268,11 @@ }).call(this); -},{"../value":47}],16:[function(require,module,exports){ +},{"../value":47}],15:[function(require,module,exports){ (function() { var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); @@ -1244,12 +1280,12 @@ Value = require('../value'); - OldDisplayFlex = (function(_super) { - __extends(OldDisplayFlex, _super); + OldDisplayFlex = (function(superClass) { + extend(OldDisplayFlex, superClass); - function OldDisplayFlex(unprefixed, prefixed) { + function OldDisplayFlex(unprefixed, prefixed1) { this.unprefixed = unprefixed; - this.prefixed = prefixed; + this.prefixed = prefixed1; } OldDisplayFlex.prototype.check = function(value) { @@ -1260,8 +1296,8 @@ })(OldValue); - DisplayFlex = (function(_super) { - __extends(DisplayFlex, _super); + DisplayFlex = (function(superClass) { + extend(DisplayFlex, superClass); DisplayFlex.names = ['display-flex', 'inline-flex']; @@ -1277,8 +1313,8 @@ }; DisplayFlex.prototype.prefixed = function(prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0); }; @@ -1302,18 +1338,18 @@ }).call(this); -},{"../old-value":39,"../value":47,"./flex-spec":25}],17:[function(require,module,exports){ +},{"../old-value":39,"../value":47,"./flex-spec":24}],16:[function(require,module,exports){ (function() { var FillAvailable, OldValue, Value, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); - FillAvailable = (function(_super) { - __extends(FillAvailable, _super); + FillAvailable = (function(superClass) { + extend(FillAvailable, superClass); function FillAvailable() { return FillAvailable.__super__.constructor.apply(this, arguments); @@ -1345,11 +1381,11 @@ }).call(this); -},{"../old-value":39,"../value":47}],18:[function(require,module,exports){ +},{"../old-value":39,"../value":47}],17:[function(require,module,exports){ (function() { var FilterValue, OldFilterValue, OldValue, Value, utils, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); @@ -1357,8 +1393,8 @@ utils = require('../utils'); - OldFilterValue = (function(_super) { - __extends(OldFilterValue, _super); + OldFilterValue = (function(superClass) { + extend(OldFilterValue, superClass); function OldFilterValue() { return OldFilterValue.__super__.constructor.apply(this, arguments); @@ -1383,8 +1419,8 @@ })(OldValue); - FilterValue = (function(_super) { - __extends(FilterValue, _super); + FilterValue = (function(superClass) { + extend(FilterValue, superClass); function FilterValue() { return FilterValue.__super__.constructor.apply(this, arguments); @@ -1416,16 +1452,16 @@ }).call(this); -},{"../old-value":39,"../utils":46,"../value":47}],19:[function(require,module,exports){ +},{"../old-value":39,"../utils":46,"../value":47}],18:[function(require,module,exports){ (function() { var Declaration, Filter, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - Filter = (function(_super) { - __extends(Filter, _super); + Filter = (function(superClass) { + extend(Filter, superClass); function Filter() { return Filter.__super__.constructor.apply(this, arguments); @@ -1447,18 +1483,18 @@ }).call(this); -},{"../declaration":6}],20:[function(require,module,exports){ +},{"../declaration":5}],19:[function(require,module,exports){ (function() { var Declaration, FlexBasis, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - FlexBasis = (function(_super) { - __extends(FlexBasis, _super); + FlexBasis = (function(superClass) { + extend(FlexBasis, superClass); function FlexBasis() { return FlexBasis.__super__.constructor.apply(this, arguments); @@ -1471,8 +1507,8 @@ }; FlexBasis.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return prefix + 'flex-preferred-size'; } else { @@ -1481,8 +1517,8 @@ }; FlexBasis.prototype.set = function(decl, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012 || spec === 'final') { return FlexBasis.__super__.set.apply(this, arguments); } @@ -1496,18 +1532,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],21:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],20:[function(require,module,exports){ (function() { var Declaration, FlexDirection, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - FlexDirection = (function(_super) { - __extends(FlexDirection, _super); + FlexDirection = (function(superClass) { + extend(FlexDirection, superClass); function FlexDirection() { return FlexDirection.__super__.constructor.apply(this, arguments); @@ -1520,8 +1556,8 @@ }; FlexDirection.prototype.insert = function(decl, prefix, prefixes) { - var already, cloned, dir, orient, spec, value, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var already, cloned, dir, orient, ref, spec, value; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { already = decl.parent.some(function(i) { return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'; @@ -1552,8 +1588,8 @@ }; FlexDirection.prototype.old = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return [prefix + 'box-orient', prefix + 'box-direction']; } else { @@ -1569,18 +1605,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],22:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],21:[function(require,module,exports){ (function() { var Declaration, FlexFlow, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - FlexFlow = (function(_super) { - __extends(FlexFlow, _super); + FlexFlow = (function(superClass) { + extend(FlexFlow, superClass); function FlexFlow() { return FlexFlow.__super__.constructor.apply(this, arguments); @@ -1589,8 +1625,8 @@ FlexFlow.names = ['flex-flow']; FlexFlow.prototype.set = function(decl, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return FlexFlow.__super__.set.apply(this, arguments); } else if (spec === 'final') { @@ -1606,18 +1642,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],23:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],22:[function(require,module,exports){ (function() { var Declaration, Flex, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - Flex = (function(_super) { - __extends(Flex, _super); + Flex = (function(superClass) { + extend(Flex, superClass); function Flex() { return Flex.__super__.constructor.apply(this, arguments); @@ -1630,8 +1666,8 @@ }; Flex.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-flex'; } else if (spec === 2012) { @@ -1649,18 +1685,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],24:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],23:[function(require,module,exports){ (function() { var Declaration, FlexShrink, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - FlexShrink = (function(_super) { - __extends(FlexShrink, _super); + FlexShrink = (function(superClass) { + extend(FlexShrink, superClass); function FlexShrink() { return FlexShrink.__super__.constructor.apply(this, arguments); @@ -1673,8 +1709,8 @@ }; FlexShrink.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012) { return prefix + 'flex-negative'; } else { @@ -1683,8 +1719,8 @@ }; FlexShrink.prototype.set = function(decl, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2012 || spec === 'final') { return FlexShrink.__super__.set.apply(this, arguments); } @@ -1698,7 +1734,7 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],25:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],24:[function(require,module,exports){ (function() { module.exports = function(prefix) { var spec; @@ -1711,18 +1747,18 @@ }).call(this); -},{}],26:[function(require,module,exports){ +},{}],25:[function(require,module,exports){ (function() { var FlexValues, OldValue, Value, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); Value = require('../value'); - FlexValues = (function(_super) { - __extends(FlexValues, _super); + FlexValues = (function(superClass) { + extend(FlexValues, superClass); function FlexValues() { return FlexValues.__super__.constructor.apply(this, arguments); @@ -1750,18 +1786,18 @@ }).call(this); -},{"../old-value":39,"../value":47}],27:[function(require,module,exports){ +},{"../old-value":39,"../value":47}],26:[function(require,module,exports){ (function() { var Declaration, FlexWrap, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - FlexWrap = (function(_super) { - __extends(FlexWrap, _super); + FlexWrap = (function(superClass) { + extend(FlexWrap, superClass); function FlexWrap() { return FlexWrap.__super__.constructor.apply(this, arguments); @@ -1785,18 +1821,20 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],28:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],27:[function(require,module,exports){ (function() { - var Declaration, Flex, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + var Declaration, Flex, flexSpec, list, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - Flex = (function(_super) { - __extends(Flex, _super); + list = require('postcss/lib/list'); + + Flex = (function(superClass) { + extend(Flex, superClass); function Flex() { return Flex.__super__.constructor.apply(this, arguments); @@ -1810,8 +1848,8 @@ }; Flex.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-flex'; } else { @@ -1827,7 +1865,7 @@ var spec; spec = flexSpec(prefix)[0]; if (spec === 2009) { - decl.value = decl.value.split(' ')[0]; + decl.value = list.space(decl.value)[0]; decl.value = Flex.oldValues[decl.value] || decl.value; return Flex.__super__.set.call(this, decl, prefix); } else { @@ -1843,16 +1881,16 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],29:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24,"postcss/lib/list":102}],28:[function(require,module,exports){ (function() { var Fullscreen, Selector, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Selector = require('../selector'); - Fullscreen = (function(_super) { - __extends(Fullscreen, _super); + Fullscreen = (function(superClass) { + extend(Fullscreen, superClass); function Fullscreen() { return Fullscreen.__super__.constructor.apply(this, arguments); @@ -1878,11 +1916,11 @@ }).call(this); -},{"../selector":44}],30:[function(require,module,exports){ +},{"../selector":44}],29:[function(require,module,exports){ (function() { var Gradient, OldValue, Value, isDirection, list, utils, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; OldValue = require('../old-value'); @@ -1894,8 +1932,8 @@ isDirection = /top|left|right|bottom/gi; - Gradient = (function(_super) { - __extends(Gradient, _super); + Gradient = (function(superClass) { + extend(Gradient, superClass); function Gradient() { return Gradient.__super__.constructor.apply(this, arguments); @@ -1916,9 +1954,7 @@ params = list.comma(args); params = _this.newDirection(params); if (prefix === '-webkit- old') { - if (args.indexOf('px') === -1) { - return _this.oldWebkit(value, args, params, after); - } + return _this.oldWebkit(value, args, params, after); } else { _this.convertDirection(params); return prefix + _this.name + '(' + params.join(', ') + ')' + after; @@ -1955,13 +1991,13 @@ if (first.indexOf('to ') === -1 && isDirection.test(first)) { first = first.split(' '); first = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = first.length; _i < _len; _i++) { - value = first[_i]; - _results.push(this.directions[value.toLowerCase()] || value); + var j, len, results; + results = []; + for (j = 0, len = first.length; j < len; j++) { + value = first[j]; + results.push(this.directions[value.toLowerCase()] || value); } - return _results; + return results; }).call(this); params[0] = 'to ' + first.join(' '); } @@ -1969,6 +2005,9 @@ }; Gradient.prototype.oldWebkit = function(value, args, params, after) { + if (args.indexOf('px') !== -1) { + return value; + } if (this.name !== 'linear-gradient') { return value; } @@ -2003,13 +2042,13 @@ param = param.split(' '); param.splice(0, 1); param = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = param.length; _i < _len; _i++) { - value = param[_i]; - _results.push(this.directions[value.toLowerCase()] || value); + var j, len, results; + results = []; + for (j = 0, len = param.length; j < len; j++) { + value = param[j]; + results.push(this.directions[value.toLowerCase()] || value); } - return _results; + return results; }).call(this); return param.join(' '); }; @@ -2022,7 +2061,7 @@ param = parseFloat(param); param = Math.abs(450 - param) % 360; param = this.roundFloat(param, 3); - return "" + param + "deg"; + return param + "deg"; }; Gradient.prototype.oldDirection = function(params) { @@ -2043,11 +2082,11 @@ Gradient.prototype.colorStops = function(params) { return params.map(function(param, i) { - var color, match, position, _ref; + var color, match, position, ref; if (i === 0) { return param; } - _ref = list.space(param), color = _ref[0], position = _ref[1]; + ref = list.space(param), color = ref[0], position = ref[1]; if (position == null) { match = param.match(/^(.*\))(\d.*)$/); if (match) { @@ -2090,9 +2129,13 @@ }; Gradient.prototype.add = function(decl, prefix) { - var prop; - prop = decl.prop; - if (prop === 'list-style' || prop === 'list-style-image' || prop === 'content') { + var p; + p = decl.prop; + if (p.indexOf('mask') !== -1) { + if (prefix === '-webkit-' || prefix === '-webkit- old') { + return Gradient.__super__.add.apply(this, arguments); + } + } else if (p === 'list-style' || p === 'list-style-image' || p === 'content') { if (prefix === '-webkit-' || prefix === '-webkit- old') { return Gradient.__super__.add.apply(this, arguments); } @@ -2109,16 +2152,67 @@ }).call(this); -},{"../old-value":39,"../utils":46,"../value":47,"postcss/lib/list":102}],31:[function(require,module,exports){ +},{"../old-value":39,"../utils":46,"../value":47,"postcss/lib/list":102}],30:[function(require,module,exports){ (function() { - var Declaration, InlineLogical, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + var Declaration, ImageRendering, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - InlineLogical = (function(_super) { - __extends(InlineLogical, _super); + ImageRendering = (function(superClass) { + extend(ImageRendering, superClass); + + function ImageRendering() { + return ImageRendering.__super__.constructor.apply(this, arguments); + } + + ImageRendering.names = ['image-rendering', 'interpolation-mode']; + + ImageRendering.prototype.check = function(decl) { + return decl.value === 'crisp-edges'; + }; + + ImageRendering.prototype.prefixed = function(prop, prefix) { + if (prefix === '-ms-') { + return '-ms-interpolation-mode'; + } else { + return ImageRendering.__super__.prefixed.apply(this, arguments); + } + }; + + ImageRendering.prototype.set = function(decl, prefix) { + if (prefix === '-ms-') { + decl.prop = '-ms-interpolation-mode'; + decl.value = 'nearest-neighbor'; + return decl; + } else { + return ImageRendering.__super__.set.apply(this, arguments); + } + }; + + ImageRendering.prototype.normalize = function(prop) { + return 'image-rendering'; + }; + + return ImageRendering; + + })(Declaration); + + module.exports = ImageRendering; + +}).call(this); + +},{"../declaration":5}],31:[function(require,module,exports){ +(function() { + var Declaration, InlineLogical, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + Declaration = require('../declaration'); + + InlineLogical = (function(superClass) { + extend(InlineLogical, superClass); function InlineLogical() { return InlineLogical.__super__.constructor.apply(this, arguments); @@ -2142,18 +2236,18 @@ }).call(this); -},{"../declaration":6}],32:[function(require,module,exports){ +},{"../declaration":5}],32:[function(require,module,exports){ (function() { var Declaration, JustifyContent, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - JustifyContent = (function(_super) { - __extends(JustifyContent, _super); + JustifyContent = (function(superClass) { + extend(JustifyContent, superClass); function JustifyContent() { return JustifyContent.__super__.constructor.apply(this, arguments); @@ -2169,8 +2263,8 @@ }; JustifyContent.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-pack'; } else if (spec === 2012) { @@ -2206,18 +2300,18 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],33:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],33:[function(require,module,exports){ (function() { var Declaration, Order, flexSpec, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; flexSpec = require('./flex-spec'); Declaration = require('../declaration'); - Order = (function(_super) { - __extends(Order, _super); + Order = (function(superClass) { + extend(Order, superClass); function Order() { return Order.__super__.constructor.apply(this, arguments); @@ -2226,8 +2320,8 @@ Order.names = ['order', 'flex-order', 'box-ordinal-group']; Order.prototype.prefixed = function(prop, prefix) { - var spec, _ref; - _ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1]; + var ref, spec; + ref = flexSpec(prefix), spec = ref[0], prefix = ref[1]; if (spec === 2009) { return prefix + 'box-ordinal-group'; } else if (spec === 2012) { @@ -2260,22 +2354,22 @@ }).call(this); -},{"../declaration":6,"./flex-spec":25}],34:[function(require,module,exports){ +},{"../declaration":5,"./flex-spec":24}],34:[function(require,module,exports){ (function() { var Placeholder, Selector, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Selector = require('../selector'); - Placeholder = (function(_super) { - __extends(Placeholder, _super); + Placeholder = (function(superClass) { + extend(Placeholder, superClass); function Placeholder() { return Placeholder.__super__.constructor.apply(this, arguments); } - Placeholder.names = ['::placeholder']; + Placeholder.names = [':placeholder-shown', '::placeholder']; Placeholder.prototype.possible = function() { return Placeholder.__super__.possible.apply(this, arguments).concat('-moz- old'); @@ -2304,13 +2398,13 @@ },{"../selector":44}],35:[function(require,module,exports){ (function() { var Declaration, TransformDecl, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Declaration = require('../declaration'); - TransformDecl = (function(_super) { - __extends(TransformDecl, _super); + TransformDecl = (function(superClass) { + extend(TransformDecl, superClass); function TransformDecl() { return TransformDecl.__super__.constructor.apply(this, arguments); @@ -2333,14 +2427,14 @@ }; TransformDecl.prototype.contain3d = function(decl) { - var func, _i, _len, _ref; + var func, i, len, ref; if (decl.prop === 'transform-origin') { return false; } - _ref = TransformDecl.functions3d; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - func = _ref[_i]; - if (decl.value.indexOf("" + func + "(") !== -1) { + ref = TransformDecl.functions3d; + for (i = 0, len = ref.length; i < len; i++) { + func = ref[i]; + if (decl.value.indexOf(func + "(") !== -1) { return true; } } @@ -2369,16 +2463,16 @@ }).call(this); -},{"../declaration":6}],36:[function(require,module,exports){ +},{"../declaration":5}],36:[function(require,module,exports){ (function() { var TransformValue, Value, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Value = require('../value'); - TransformValue = (function(_super) { - __extends(TransformValue, _super); + TransformValue = (function(superClass) { + extend(TransformValue, superClass); function TransformValue() { return TransformValue.__super__.constructor.apply(this, arguments); @@ -2432,15 +2526,15 @@ }; module.exports = function(prefixes) { - var atrules, browser, data, list, name, needTransition, out, props, selector, selectors, string, transitionProp, useTransition, value, values, version, versions, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; + var atrules, browser, data, j, k, l, len, len1, len2, list, name, needTransition, out, props, ref, ref1, ref2, ref3, ref4, ref5, ref6, selector, selectors, string, transitionProp, useTransition, value, values, version, versions; if (prefixes.browsers.selected.length === 0) { return "No browsers selected"; } versions = []; - _ref = prefixes.browsers.selected; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - browser = _ref[_i]; - _ref1 = browser.split(' '), name = _ref1[0], version = _ref1[1]; + ref = prefixes.browsers.selected; + for (j = 0, len = ref.length; j < len; j++) { + browser = ref[j]; + ref1 = browser.split(' '), name = ref1[0], version = ref1[1]; name = names[name] || capitalize(name); if (versions[name]) { versions[name].push(version); @@ -2457,9 +2551,9 @@ out += ' ' + browser + ': ' + list.join(', ') + "\n"; } atrules = ''; - _ref2 = prefixes.add; - for (name in _ref2) { - data = _ref2[name]; + ref2 = prefixes.add; + for (name in ref2) { + data = ref2[name]; if (name[0] === '@' && data.prefixes) { atrules += prefix(name, false, data.prefixes); } @@ -2468,9 +2562,9 @@ out += "\nAt-Rules:\n" + atrules; } selectors = ''; - _ref3 = prefixes.add.selectors; - for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { - selector = _ref3[_j]; + ref3 = prefixes.add.selectors; + for (k = 0, len1 = ref3.length; k < len1; k++) { + selector = ref3[k]; if (selector.prefixes) { selectors += prefix(selector.name, false, selector.prefixes); } @@ -2481,10 +2575,10 @@ values = ''; props = ''; useTransition = false; - needTransition = (_ref4 = prefixes.add.transition) != null ? _ref4.prefixes : void 0; - _ref5 = prefixes.add; - for (name in _ref5) { - data = _ref5[name]; + needTransition = (ref4 = prefixes.add.transition) != null ? ref4.prefixes : void 0; + ref5 = prefixes.add; + for (name in ref5) { + data = ref5[name]; if (name[0] !== '@' && data.prefixes) { transitionProp = needTransition && prefixes.data[name].transition; if (transitionProp) { @@ -2500,9 +2594,9 @@ })) { continue; } - _ref6 = data.values; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - value = _ref6[_k]; + ref6 = data.values; + for (l = 0, len2 = ref6.length; l < len2; l++) { + value = ref6[l]; string = prefix(value.name, false, value.prefixes); if (values.indexOf(string) === -1) { values += string; @@ -2531,15 +2625,15 @@ var OldSelector; OldSelector = (function() { - function OldSelector(selector, prefix) { - var _i, _len, _ref; - this.prefix = prefix; + function OldSelector(selector, prefix1) { + var i, len, prefix, ref; + this.prefix = prefix1; this.prefixed = selector.prefixed(this.prefix); this.regexp = selector.regexp(this.prefix); this.prefixeds = []; - _ref = selector.possible(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prefix = _ref[_i]; + ref = selector.possible(); + for (i = 0, len = ref.length; i < len; i++) { + prefix = ref[i]; this.prefixeds.push([selector.prefixed(prefix), selector.regexp(prefix)]); } this.unprefixed = selector.name; @@ -2547,7 +2641,7 @@ } OldSelector.prototype.isHack = function(rule) { - var before, index, regexp, rules, some, string, _i, _len, _ref, _ref1; + var before, i, index, len, ref, ref1, regexp, rules, some, string; index = rule.parent.index(rule) + 1; rules = rule.parent.nodes; while (index < rules.length) { @@ -2559,9 +2653,9 @@ return false; } some = false; - _ref = this.prefixeds; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - _ref1 = _ref[_i], string = _ref1[0], regexp = _ref1[1]; + ref = this.prefixeds; + for (i = 0, len = ref.length; i < len; i++) { + ref1 = ref[i], string = ref1[0], regexp = ref1[1]; if (before.indexOf(string) !== -1 && before.match(regexp)) { some = true; break; @@ -2631,7 +2725,7 @@ },{"./utils":46}],40:[function(require,module,exports){ (function() { var Browsers, Prefixer, clone, utils, vendor, - __hasProp = {}.hasOwnProperty; + hasProp = {}.hasOwnProperty; Browsers = require('./browsers'); @@ -2646,7 +2740,7 @@ } cloned = new obj.constructor(); for (i in obj) { - if (!__hasProp.call(obj, i)) continue; + if (!hasProp.call(obj, i)) continue; value = obj[i]; if (i === 'parent' && typeof value === 'object') { if (parent) { @@ -2667,20 +2761,20 @@ Prefixer = (function() { Prefixer.hack = function(klass) { - var name, _i, _len, _ref, _results; + var j, len, name, ref, results; this.hacks || (this.hacks = {}); - _ref = klass.names; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; - _results.push(this.hacks[name] = klass); + ref = klass.names; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + name = ref[j]; + results.push(this.hacks[name] = klass); } - return _results; + return results; }; Prefixer.load = function(name, prefixes, all) { - var klass, _ref; - klass = (_ref = this.hacks) != null ? _ref[name] : void 0; + var klass, ref; + klass = (ref = this.hacks) != null ? ref[name] : void 0; if (klass) { return new klass(name, prefixes, all); } else { @@ -2697,10 +2791,10 @@ return cloned; }; - function Prefixer(name, prefixes, all) { - this.name = name; - this.prefixes = prefixes; - this.all = all; + function Prefixer(name1, prefixes1, all1) { + this.name = name1; + this.prefixes = prefixes1; + this.all = all1; } Prefixer.prototype.parentPrefix = function(node) { @@ -2713,23 +2807,23 @@ }; Prefixer.prototype.process = function(node) { - var added, parent, prefix, prefixes, _i, _j, _len, _len1, _ref; + var added, j, k, len, len1, parent, prefix, prefixes, ref; if (!this.check(node)) { return; } parent = this.parentPrefix(node); prefixes = []; - _ref = this.prefixes; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prefix = _ref[_i]; + ref = this.prefixes; + for (j = 0, len = ref.length; j < len; j++) { + prefix = ref[j]; if (parent && parent !== utils.removeNote(prefix)) { continue; } prefixes.push(prefix); } added = []; - for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) { - prefix = prefixes[_j]; + for (k = 0, len1 = prefixes.length; k < len1; k++) { + prefix = prefixes[k]; if (this.add(node, prefix, added.concat([prefix]))) { added.push(prefix); } @@ -2749,7 +2843,7 @@ }).call(this); -},{"./browsers":5,"./utils":46,"postcss/lib/vendor":113}],41:[function(require,module,exports){ +},{"./browsers":4,"./utils":46,"postcss/lib/vendor":113}],41:[function(require,module,exports){ (function() { var AtRule, Browsers, Declaration, Prefixes, Processor, Resolution, Selector, Supports, Value, declsCache, utils, vendor; @@ -2813,6 +2907,8 @@ Declaration.hack(require('./hacks/flex-direction')); + Declaration.hack(require('./hacks/image-rendering')); + Declaration.hack(require('./hacks/justify-content')); Declaration.hack(require('./hacks/background-size')); @@ -2834,12 +2930,12 @@ declsCache = {}; Prefixes = (function() { - function Prefixes(data, browsers, options) { - var _ref; - this.data = data; + function Prefixes(data1, browsers, options) { + var ref; + this.data = data1; this.browsers = browsers; this.options = options != null ? options : {}; - _ref = this.preprocess(this.select(this.data)), this.add = _ref[0], this.remove = _ref[1]; + ref = this.preprocess(this.select(this.data)), this.add = ref[0], this.remove = ref[1]; this.processor = new Processor(this); } @@ -2936,14 +3032,14 @@ }; Prefixes.prototype.preprocess = function(selected) { - var add, name, old, olds, prefix, prefixed, prefixes, prop, props, remove, selector, value, values, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2; + var add, j, k, l, len, len1, len2, len3, len4, len5, len6, m, n, name, o, old, olds, p, prefix, prefixed, prefixes, prop, props, ref, ref1, ref2, remove, selector, value, values; add = { selectors: [], '@supports': new Supports(this) }; - _ref = selected.add; - for (name in _ref) { - prefixes = _ref[name]; + ref = selected.add; + for (name in ref) { + prefixes = ref[name]; if (name === '@keyframes' || name === '@viewport') { add[name] = new AtRule(name, prefixes, this); } else if (name === '@resolution') { @@ -2954,8 +3050,8 @@ props = this.data[name].transition ? this.transitionProps : this.data[name].props; if (props) { value = Value.load(name, prefixes, this); - for (_i = 0, _len = props.length; _i < _len; _i++) { - prop = props[_i]; + for (j = 0, len = props.length; j < len; j++) { + prop = props[j]; if (!add[prop]) { add[prop] = { values: [] @@ -2965,7 +3061,7 @@ } } if (!this.data[name].props) { - values = ((_ref1 = add[name]) != null ? _ref1.values : void 0) || []; + values = ((ref1 = add[name]) != null ? ref1.values : void 0) || []; add[name] = Declaration.load(name, prefixes, this); add[name].values = values; } @@ -2974,18 +3070,18 @@ remove = { selectors: [] }; - _ref2 = selected.remove; - for (name in _ref2) { - prefixes = _ref2[name]; + ref2 = selected.remove; + for (name in ref2) { + prefixes = ref2[name]; if (this.data[name].selector) { selector = Selector.load(name, prefixes); - for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) { - prefix = prefixes[_j]; + for (k = 0, len1 = prefixes.length; k < len1; k++) { + prefix = prefixes[k]; remove.selectors.push(selector.old(prefix)); } } else if (name === '@keyframes' || name === '@viewport') { - for (_k = 0, _len2 = prefixes.length; _k < _len2; _k++) { - prefix = prefixes[_k]; + for (l = 0, len2 = prefixes.length; l < len2; l++) { + prefix = prefixes[l]; prefixed = '@' + prefix + name.slice(1); remove[prefixed] = { remove: true @@ -2997,12 +3093,12 @@ props = this.data[name].transition ? this.transitionProps : this.data[name].props; if (props) { value = Value.load(name, [], this); - for (_l = 0, _len3 = prefixes.length; _l < _len3; _l++) { - prefix = prefixes[_l]; + for (m = 0, len3 = prefixes.length; m < len3; m++) { + prefix = prefixes[m]; old = value.old(prefix); if (old) { - for (_m = 0, _len4 = props.length; _m < _len4; _m++) { - prop = props[_m]; + for (n = 0, len4 = props.length; n < len4; n++) { + prop = props[n]; if (!remove[prop]) { remove[prop] = {}; } @@ -3015,12 +3111,12 @@ } } if (!this.data[name].props) { - for (_n = 0, _len5 = prefixes.length; _n < _len5; _n++) { - prefix = prefixes[_n]; + for (o = 0, len5 = prefixes.length; o < len5; o++) { + prefix = prefixes[o]; prop = vendor.unprefixed(name); olds = this.decl(name).old(name, prefix); - for (_o = 0, _len6 = olds.length; _o < _len6; _o++) { - prefixed = olds[_o]; + for (p = 0, len6 = olds.length; p < len6; p++) { + prefixed = olds[p]; if (!remove[prefixed]) { remove[prefixed] = {}; } @@ -3054,10 +3150,10 @@ }; Prefixes.prototype.values = function(type, prop) { - var data, global, values, _ref, _ref1; + var data, global, ref, ref1, values; data = this[type]; - global = (_ref = data['*']) != null ? _ref.values : void 0; - values = (_ref1 = data[prop]) != null ? _ref1.values : void 0; + global = (ref = data['*']) != null ? ref.values : void 0; + values = (ref1 = data[prop]) != null ? ref1.values : void 0; if (global && values) { return utils.uniq(global.concat(values)); } else { @@ -3117,7 +3213,7 @@ }).call(this); -},{"./at-rule":4,"./browsers":5,"./declaration":6,"./hacks/align-content":7,"./hacks/align-items":8,"./hacks/align-self":9,"./hacks/background-size":10,"./hacks/block-logical":11,"./hacks/border-image":12,"./hacks/border-radius":13,"./hacks/break-inside":14,"./hacks/crisp-edges":15,"./hacks/display-flex":16,"./hacks/fill-available":17,"./hacks/filter":19,"./hacks/filter-value":18,"./hacks/flex":28,"./hacks/flex-basis":20,"./hacks/flex-direction":21,"./hacks/flex-flow":22,"./hacks/flex-grow":23,"./hacks/flex-shrink":24,"./hacks/flex-values":26,"./hacks/flex-wrap":27,"./hacks/fullscreen":29,"./hacks/gradient":30,"./hacks/inline-logical":31,"./hacks/justify-content":32,"./hacks/order":33,"./hacks/placeholder":34,"./hacks/transform-decl":35,"./hacks/transform-value":36,"./processor":42,"./resolution":43,"./selector":44,"./supports":45,"./utils":46,"./value":47,"postcss/lib/vendor":113}],42:[function(require,module,exports){ +},{"./at-rule":3,"./browsers":4,"./declaration":5,"./hacks/align-content":6,"./hacks/align-items":7,"./hacks/align-self":8,"./hacks/background-size":9,"./hacks/block-logical":10,"./hacks/border-image":11,"./hacks/border-radius":12,"./hacks/break-inside":13,"./hacks/crisp-edges":14,"./hacks/display-flex":15,"./hacks/fill-available":16,"./hacks/filter":18,"./hacks/filter-value":17,"./hacks/flex":27,"./hacks/flex-basis":19,"./hacks/flex-direction":20,"./hacks/flex-flow":21,"./hacks/flex-grow":22,"./hacks/flex-shrink":23,"./hacks/flex-values":25,"./hacks/flex-wrap":26,"./hacks/fullscreen":28,"./hacks/gradient":29,"./hacks/image-rendering":30,"./hacks/inline-logical":31,"./hacks/justify-content":32,"./hacks/order":33,"./hacks/placeholder":34,"./hacks/transform-decl":35,"./hacks/transform-value":36,"./processor":42,"./resolution":43,"./selector":44,"./supports":45,"./utils":46,"./value":47,"postcss/lib/vendor":113}],42:[function(require,module,exports){ (function() { var Processor, Value, utils, vendor; @@ -3161,17 +3257,17 @@ })(this)); css.eachRule((function(_this) { return function(rule) { - var selector, _i, _len, _ref, _results; + var j, len, ref, results, selector; if (_this.disabled(rule)) { return; } - _ref = _this.prefixes.add.selectors; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - selector = _ref[_i]; - _results.push(selector.process(rule)); + ref = _this.prefixes.add.selectors; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + selector = ref[j]; + results.push(selector.process(rule)); } - return _results; + return results; }; })(this)); css.eachDecl((function(_this) { @@ -3187,14 +3283,14 @@ })(this)); return css.eachDecl((function(_this) { return function(decl) { - var unprefixed, value, _i, _len, _ref; + var j, len, ref, unprefixed, value; if (_this.disabled(decl)) { return; } unprefixed = _this.prefixes.unprefixed(decl.prop); - _ref = _this.prefixes.values('add', unprefixed); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - value = _ref[_i]; + ref = _this.prefixes.values('add', unprefixed); + for (j = 0, len = ref.length; j < len; j++) { + value = ref[j]; value.process(decl); } return Value.save(_this.prefixes, decl); @@ -3203,7 +3299,7 @@ }; Processor.prototype.remove = function(css) { - var checker, resolution, _i, _len, _ref; + var checker, j, len, ref, resolution; resolution = this.prefixes.remove['@resolution']; css.eachAtRule((function(_this) { return function(rule, i) { @@ -3216,9 +3312,9 @@ } }; })(this)); - _ref = this.prefixes.remove.selectors; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - checker = _ref[_i]; + ref = this.prefixes.remove.selectors; + for (j = 0, len = ref.length; j < len; j++) { + checker = ref[j]; css.eachRule((function(_this) { return function(rule, i) { if (checker.check(rule)) { @@ -3231,13 +3327,13 @@ } return css.eachDecl((function(_this) { return function(decl, i) { - var notHack, rule, unprefixed, _j, _len1, _ref1, _ref2; + var k, len1, notHack, ref1, ref2, rule, unprefixed; if (_this.disabled(decl)) { return; } rule = decl.parent; unprefixed = _this.prefixes.unprefixed(decl.prop); - if ((_ref1 = _this.prefixes.remove[decl.prop]) != null ? _ref1.remove : void 0) { + if ((ref1 = _this.prefixes.remove[decl.prop]) != null ? ref1.remove : void 0) { notHack = _this.prefixes.group(decl).down(function(other) { return other.prop === unprefixed; }); @@ -3249,9 +3345,9 @@ return; } } - _ref2 = _this.prefixes.values('remove', unprefixed); - for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { - checker = _ref2[_j]; + ref2 = _this.prefixes.values('remove', unprefixed); + for (k = 0, len1 = ref2.length; k < len1; k++) { + checker = ref2[k]; if (checker.check(decl.value)) { unprefixed = checker.unprefixed; notHack = _this.prefixes.group(decl).down(function(other) { @@ -3335,8 +3431,8 @@ },{"./utils":46,"./value":47,"postcss/lib/vendor":113}],43:[function(require,module,exports){ (function() { var Prefixer, Resolution, n2f, regexp, split, utils, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); @@ -3348,8 +3444,8 @@ split = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi)/i; - Resolution = (function(_super) { - __extends(Resolution, _super); + Resolution = (function(superClass) { + extend(Resolution, superClass); function Resolution() { return Resolution.__super__.constructor.apply(this, arguments); @@ -3370,12 +3466,12 @@ }; Resolution.prototype.clean = function(rule) { - var prefix, _i, _len, _ref; + var j, len, prefix, ref; if (!this.bad) { this.bad = []; - _ref = this.prefixes; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prefix = _ref[_i]; + ref = this.prefixes; + for (j = 0, len = ref.length; j < len; j++) { + prefix = ref[j]; this.bad.push(this.prefixName(prefix, 'min')); this.bad.push(this.prefixName(prefix, 'max')); } @@ -3397,16 +3493,18 @@ prefixes = parent ? [parent] : this.prefixes; return rule.params = utils.editList(rule.params, (function(_this) { return function(origin, prefixed) { - var prefix, processed, query, _i, _j, _len, _len1; - for (_i = 0, _len = origin.length; _i < _len; _i++) { - query = origin[_i]; + var j, k, len, len1, prefix, processed, query; + for (j = 0, len = origin.length; j < len; j++) { + query = origin[j]; if (query.indexOf('min-resolution') === -1 && query.indexOf('max-resolution') === -1) { prefixed.push(query); continue; } - for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) { - prefix = prefixes[_j]; - if (prefix !== '-moz-' || query.indexOf('dppx') !== -1) { + for (k = 0, len1 = prefixes.length; k < len1; k++) { + prefix = prefixes[k]; + if (prefix === '-moz-' && rule.params.indexOf('dpi') !== -1) { + continue; + } else { processed = query.replace(regexp, function(str) { var parts; parts = str.match(split); @@ -3433,8 +3531,8 @@ },{"./prefixer":40,"./utils":46,"num2fraction":95}],44:[function(require,module,exports){ (function() { var Browsers, OldSelector, Prefixer, Selector, utils, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; OldSelector = require('./old-selector'); @@ -3444,11 +3542,11 @@ utils = require('./utils'); - Selector = (function(_super) { - __extends(Selector, _super); + Selector = (function(superClass) { + extend(Selector, superClass); - function Selector(name, prefixes, all) { - this.name = name; + function Selector(name1, prefixes, all) { + this.name = name1; this.prefixes = prefixes; this.all = all; this.regexpCache = {}; @@ -3480,14 +3578,14 @@ }; Selector.prototype.prefixeds = function(rule) { - var prefix, prefixeds, _i, _len, _ref; + var i, len, prefix, prefixeds, ref; if (rule._autoprefixerPrefixeds) { return rule._autoprefixerPrefixeds; } prefixeds = {}; - _ref = this.possible(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prefix = _ref[_i]; + ref = this.possible(); + for (i = 0, len = ref.length; i < len; i++) { + prefix = ref[i]; prefixeds[prefix] = this.replace(rule.selector, prefix); } return rule._autoprefixerPrefixeds = prefixeds; @@ -3549,7 +3647,7 @@ }).call(this); -},{"./browsers":5,"./old-selector":38,"./prefixer":40,"./utils":46}],45:[function(require,module,exports){ +},{"./browsers":4,"./old-selector":38,"./prefixer":40,"./utils":46}],45:[function(require,module,exports){ (function() { var Prefixes, Supports, Value, findCondition, findDecl, list, postcss, split, utils; @@ -3570,8 +3668,8 @@ findCondition = /(not\s*)?\(\s*([^\(\):]+)\s*:\s*(.+?(?!\s*or\s*).+?)\s*\)*\s*\)\s*or\s*/gi; Supports = (function() { - function Supports(all) { - this.all = all; + function Supports(all1) { + this.all = all1; } Supports.prototype.virtual = function(prop, value) { @@ -3586,7 +3684,7 @@ }; Supports.prototype.prefixed = function(prop, value) { - var decl, prefixer, rule, _i, _j, _len, _len1, _ref, _ref1; + var decl, j, k, len, len1, prefixer, ref, ref1, rule; rule = this.virtual(prop, value); prefixer = this.all.add[prop]; if (prefixer != null) { @@ -3594,12 +3692,12 @@ prefixer.process(rule.first); } } - _ref = rule.nodes; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - decl = _ref[_i]; - _ref1 = this.all.values('add', prop); - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - value = _ref1[_j]; + ref = rule.nodes; + for (j = 0, len = ref.length; j < len; j++) { + decl = ref[j]; + ref1 = this.all.values('add', prop); + for (k = 0, len1 = ref1.length; k < len1; k++) { + value = ref1[k]; value.process(decl); } Value.save(this.all, decl); @@ -3610,21 +3708,21 @@ Supports.prototype.clean = function(params) { return params.replace(findCondition, (function(_this) { return function(all) { - var check, checker, prop, unprefixed, value, _, _i, _len, _ref, _ref1, _ref2; + var _, check, checker, j, len, prop, ref, ref1, ref2, unprefixed, value; if (all.slice(0, 3).toLowerCase() === 'not') { return all; } - _ref = all.match(split), _ = _ref[0], prop = _ref[1], value = _ref[2]; + ref = all.match(split), _ = ref[0], prop = ref[1], value = ref[2]; unprefixed = _this.all.unprefixed(prop); - if ((_ref1 = _this.all.cleaner().remove[prop]) != null ? _ref1.remove : void 0) { + if ((ref1 = _this.all.cleaner().remove[prop]) != null ? ref1.remove : void 0) { check = new RegExp('(\\(|\\s)' + utils.escapeRegexp(unprefixed) + ':'); if (check.test(params)) { return ''; } } - _ref2 = _this.all.cleaner().values('remove', unprefixed); - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - checker = _ref2[_i]; + ref2 = _this.all.cleaner().values('remove', unprefixed); + for (j = 0, len = ref2.length; j < len; j++) { + checker = ref2[j]; if (checker.check(value)) { return ''; } @@ -3640,14 +3738,14 @@ return function(all, prop, value) { var i, stringed; stringed = (function() { - var _i, _len, _ref, _results; - _ref = this.prefixed(prop, value); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push("(" + i.prop + ": " + i.value + ")"); + var j, len, ref, results; + ref = this.prefixed(prop, value); + results = []; + for (j = 0, len = ref.length; j < len; j++) { + i = ref[j]; + results.push("(" + i.prop + ": " + i.value + ")"); } - return _results; + return results; }).call(_this); if (stringed.length === 1) { return stringed[0]; @@ -3680,10 +3778,10 @@ throw err; }, uniq: function(array) { - var filtered, i, _i, _len; + var filtered, i, j, len; filtered = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - i = array[_i]; + for (j = 0, len = array.length; j < len; j++) { + i = array[j]; if (filtered.indexOf(i) === -1) { filtered.push(i); } @@ -3728,8 +3826,8 @@ },{"postcss/lib/list":102}],47:[function(require,module,exports){ (function() { var OldValue, Prefixer, Value, utils, vendor, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; Prefixer = require('./prefixer'); @@ -3739,25 +3837,25 @@ vendor = require('postcss/lib/vendor'); - Value = (function(_super) { - __extends(Value, _super); + Value = (function(superClass) { + extend(Value, superClass); function Value() { return Value.__super__.constructor.apply(this, arguments); } Value.save = function(prefixes, decl) { - var already, cloned, prefix, prefixed, propPrefix, rule, trimmed, value, _ref, _results; - _ref = decl._autoprefixerValues; - _results = []; - for (prefix in _ref) { - value = _ref[prefix]; + var already, cloned, prefix, prefixed, propPrefix, ref, results, rule, trimmed, value; + ref = decl._autoprefixerValues; + results = []; + for (prefix in ref) { + value = ref[prefix]; if (value === decl.value) { continue; } propPrefix = vendor.prefix(decl.prop); if (propPrefix === prefix) { - _results.push(decl.value = value); + results.push(decl.value = value); } else if (propPrefix === '-pie-') { continue; } else { @@ -3772,22 +3870,22 @@ }); if (!already) { if (value.indexOf('-webkit-filter') !== -1 && (decl.prop === 'transition' || decl.prop === 'trasition-property')) { - _results.push(decl.value = value); + results.push(decl.value = value); } else { cloned = this.clone(decl, { value: value }); - _results.push(decl.parent.insertBefore(decl, cloned)); + results.push(decl.parent.insertBefore(decl, cloned)); } } else { - _results.push(void 0); + results.push(void 0); } } else { - _results.push(void 0); + results.push(void 0); } } } - return _results; + return results; }; Value.prototype.check = function(decl) { @@ -3809,9 +3907,9 @@ }; Value.prototype.add = function(decl, prefix) { - var value, _ref; + var ref, value; decl._autoprefixerValues || (decl._autoprefixerValues = {}); - value = decl._autoprefixerValues[prefix] || ((_ref = decl._value) != null ? _ref.raw : void 0) || decl.value; + value = decl._autoprefixerValues[prefix] || ((ref = decl._value) != null ? ref.raw : void 0) || decl.value; value = this.replace(value, prefix); if (value) { return decl._autoprefixerValues[prefix] = value; @@ -3879,7 +3977,7 @@ Buffer.TYPED_ARRAY_SUPPORT = (function () { var buf = new ArrayBuffer(0) var arr = new Uint8Array(buf) arr.foo = function () { return 42 } - return 42 === arr.foo() && // typed array instances can be augmented + return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { @@ -3899,83 +3997,88 @@ Buffer.TYPED_ARRAY_SUPPORT = (function () { * By augmenting the instances, we can avoid modifying the `Uint8Array` * prototype. */ -function Buffer (subject, encoding, noZero) { - if (!(this instanceof Buffer)) - return new Buffer(subject, encoding, noZero) +function Buffer (subject, encoding) { + var self = this + if (!(self instanceof Buffer)) return new Buffer(subject, encoding) var type = typeof subject - - // Find the length var length - if (type === 'number') - length = subject > 0 ? subject >>> 0 : 0 - else if (type === 'string') { + + if (type === 'number') { + length = +subject + } else if (type === 'string') { length = Buffer.byteLength(subject, encoding) - } else if (type === 'object' && subject !== null) { // assume object is array-like - if (subject.type === 'Buffer' && isArray(subject.data)) - subject = subject.data - length = +subject.length > 0 ? Math.floor(+subject.length) : 0 - } else + } else if (type === 'object' && subject !== null) { + // assume object is array-like + if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data + length = +subject.length + } else { throw new TypeError('must start with number, buffer, array or string') + } - if (length > kMaxLength) - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength.toString(16) + ' bytes') + if (length > kMaxLength) { + throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + + kMaxLength.toString(16) + ' bytes') + } + + if (length < 0) length = 0 + else length >>>= 0 // coerce to uint32 - var buf if (Buffer.TYPED_ARRAY_SUPPORT) { // Preferred: Return an augmented `Uint8Array` instance for best performance - buf = Buffer._augment(new Uint8Array(length)) + self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this } else { // Fallback: Return THIS instance of Buffer (created by `new`) - buf = this - buf.length = length - buf._isBuffer = true + self.length = length + self._isBuffer = true } var i if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { // Speed optimization -- use set if we're copying from a typed array - buf._set(subject) + self._set(subject) } else if (isArrayish(subject)) { // Treat array-ish objects as a byte array if (Buffer.isBuffer(subject)) { - for (i = 0; i < length; i++) - buf[i] = subject.readUInt8(i) + for (i = 0; i < length; i++) { + self[i] = subject.readUInt8(i) + } } else { - for (i = 0; i < length; i++) - buf[i] = ((subject[i] % 256) + 256) % 256 + for (i = 0; i < length; i++) { + self[i] = ((subject[i] % 256) + 256) % 256 + } } } else if (type === 'string') { - buf.write(subject, 0, encoding) - } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) { + self.write(subject, 0, encoding) + } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) { for (i = 0; i < length; i++) { - buf[i] = 0 + self[i] = 0 } } - if (length > 0 && length <= Buffer.poolSize) - buf.parent = rootParent + if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent - return buf + return self } -function SlowBuffer(subject, encoding, noZero) { - if (!(this instanceof SlowBuffer)) - return new SlowBuffer(subject, encoding, noZero) +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - var buf = new Buffer(subject, encoding, noZero) + var buf = new Buffer(subject, encoding) delete buf.parent return buf } -Buffer.isBuffer = function (b) { +Buffer.isBuffer = function isBuffer (b) { return !!(b != null && b._isBuffer) } -Buffer.compare = function (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 var x = a.length var y = b.length @@ -3989,7 +4092,7 @@ Buffer.compare = function (a, b) { return 0 } -Buffer.isEncoding = function (encoding) { +Buffer.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': @@ -4008,8 +4111,8 @@ Buffer.isEncoding = function (encoding) { } } -Buffer.concat = function (list, totalLength) { - if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])') +Buffer.concat = function concat (list, totalLength) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') if (list.length === 0) { return new Buffer(0) @@ -4035,7 +4138,7 @@ Buffer.concat = function (list, totalLength) { return buf } -Buffer.byteLength = function (str, encoding) { +Buffer.byteLength = function byteLength (str, encoding) { var ret str = str + '' switch (encoding || 'utf8') { @@ -4071,7 +4174,7 @@ Buffer.prototype.length = undefined Buffer.prototype.parent = undefined // toString(encoding, start=0, end=buffer.length) -Buffer.prototype.toString = function (encoding, start, end) { +Buffer.prototype.toString = function toString (encoding, start, end) { var loweredCase = false start = start >>> 0 @@ -4107,43 +4210,84 @@ Buffer.prototype.toString = function (encoding, start, end) { return utf16leSlice(this, start, end) default: - if (loweredCase) - throw new TypeError('Unknown encoding: ' + encoding) + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = (encoding + '').toLowerCase() loweredCase = true } } } -Buffer.prototype.equals = function (b) { +Buffer.prototype.equals = function equals (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true return Buffer.compare(this, b) === 0 } -Buffer.prototype.inspect = function () { +Buffer.prototype.inspect = function inspect () { var str = '' var max = exports.INSPECT_MAX_BYTES if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) - str += ' ... ' + if (this.length > max) str += ' ... ' } return '' } -Buffer.prototype.compare = function (b) { +Buffer.prototype.compare = function compare (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 return Buffer.compare(this, b) } +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + // `get` will be removed in Node 0.13+ -Buffer.prototype.get = function (offset) { +Buffer.prototype.get = function get (offset) { console.log('.get() is deprecated. Access using array indexes instead.') return this.readUInt8(offset) } // `set` will be removed in Node 0.13+ -Buffer.prototype.set = function (v, offset) { +Buffer.prototype.set = function set (v, offset) { console.log('.set() is deprecated. Access using array indexes instead.') return this.writeUInt8(v, offset) } @@ -4168,9 +4312,9 @@ function hexWrite (buf, string, offset, length) { length = strLen / 2 } for (var i = 0; i < length; i++) { - var byte = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(byte)) throw new Error('Invalid hex string') - buf[offset + i] = byte + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed } return i } @@ -4195,11 +4339,11 @@ function base64Write (buf, string, offset, length) { } function utf16leWrite (buf, string, offset, length) { - var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length, 2) + var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) return charsWritten } -Buffer.prototype.write = function (string, offset, length, encoding) { +Buffer.prototype.write = function write (string, offset, length, encoding) { // Support both (string, offset, length, encoding) // and the legacy (string, encoding, offset, length) if (isFinite(offset)) { @@ -4216,8 +4360,9 @@ Buffer.prototype.write = function (string, offset, length, encoding) { offset = Number(offset) || 0 - if (length < 0 || offset < 0 || offset > this.length) - throw new RangeError('attempt to write outside buffer bounds'); + if (length < 0 || offset < 0 || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } var remaining = this.length - offset if (!length) { @@ -4260,7 +4405,7 @@ Buffer.prototype.write = function (string, offset, length, encoding) { return ret } -Buffer.prototype.toJSON = function () { +Buffer.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) @@ -4334,43 +4479,39 @@ function utf16leSlice (buf, start, end) { return res } -Buffer.prototype.slice = function (start, end) { +Buffer.prototype.slice = function slice (start, end) { var len = this.length start = ~~start end = end === undefined ? len : ~~end if (start < 0) { - start += len; - if (start < 0) - start = 0 + start += len + if (start < 0) start = 0 } else if (start > len) { start = len } if (end < 0) { end += len - if (end < 0) - end = 0 + if (end < 0) end = 0 } else if (end > len) { end = len } - if (end < start) - end = start + if (end < start) end = start var newBuf if (Buffer.TYPED_ARRAY_SUPPORT) { newBuf = Buffer._augment(this.subarray(start, end)) } else { var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined, true) + newBuf = new Buffer(sliceLen, undefined) for (var i = 0; i < sliceLen; i++) { newBuf[i] = this[i + start] } } - if (newBuf.length) - newBuf.parent = this.parent || this + if (newBuf.length) newBuf.parent = this.parent || this return newBuf } @@ -4379,62 +4520,58 @@ Buffer.prototype.slice = function (start, end) { * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) - throw new RangeError('offset is not uint') - if (offset + ext > length) - throw new RangeError('Trying to access beyond buffer length') + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } -Buffer.prototype.readUIntLE = function (offset, byteLength, noAssert) { +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset >>> 0 byteLength = byteLength >>> 0 - if (!noAssert) - checkOffset(offset, byteLength, this.length) + if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 - while (++i < byteLength && (mul *= 0x100)) + while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul + } return val } -Buffer.prototype.readUIntBE = function (offset, byteLength, noAssert) { +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset >>> 0 byteLength = byteLength >>> 0 - if (!noAssert) + if (!noAssert) { checkOffset(offset, byteLength, this.length) + } var val = this[offset + --byteLength] var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) - val += this[offset + --byteLength] * mul; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } return val } -Buffer.prototype.readUInt8 = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 1, this.length) +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) return this[offset] } -Buffer.prototype.readUInt16LE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 2, this.length) +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) return this[offset] | (this[offset + 1] << 8) } -Buffer.prototype.readUInt16BE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 2, this.length) +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) return (this[offset] << 8) | this[offset + 1] } -Buffer.prototype.readUInt32LE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 4, this.length) +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) return ((this[offset]) | (this[offset + 1] << 8) | @@ -4442,117 +4579,104 @@ Buffer.prototype.readUInt32LE = function (offset, noAssert) { (this[offset + 3] * 0x1000000) } -Buffer.prototype.readUInt32BE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 4, this.length) +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) } -Buffer.prototype.readIntLE = function (offset, byteLength, noAssert) { +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset >>> 0 byteLength = byteLength >>> 0 - if (!noAssert) - checkOffset(offset, byteLength, this.length) + if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 - while (++i < byteLength && (mul *= 0x100)) + while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul + } mul *= 0x80 - if (val >= mul) - val -= Math.pow(2, 8 * byteLength) + if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } -Buffer.prototype.readIntBE = function (offset, byteLength, noAssert) { +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset >>> 0 byteLength = byteLength >>> 0 - if (!noAssert) - checkOffset(offset, byteLength, this.length) + if (!noAssert) checkOffset(offset, byteLength, this.length) var i = byteLength var mul = 1 var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) + while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul + } mul *= 0x80 - if (val >= mul) - val -= Math.pow(2, 8 * byteLength) + if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } -Buffer.prototype.readInt8 = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) - return (this[offset]) +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) } -Buffer.prototype.readInt16LE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 2, this.length) +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset] | (this[offset + 1] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } -Buffer.prototype.readInt16BE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 2, this.length) +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset + 1] | (this[offset] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } -Buffer.prototype.readInt32LE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 4, this.length) +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) } -Buffer.prototype.readInt32BE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 4, this.length) +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) } -Buffer.prototype.readFloatLE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 4, this.length) +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, true, 23, 4) } -Buffer.prototype.readFloatBE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 4, this.length) +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, false, 23, 4) } -Buffer.prototype.readDoubleLE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 8, this.length) +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, true, 52, 8) } -Buffer.prototype.readDoubleBE = function (offset, noAssert) { - if (!noAssert) - checkOffset(offset, 8, this.length) +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, false, 52, 8) } @@ -4562,43 +4686,42 @@ function checkInt (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('index out of range') } -Buffer.prototype.writeUIntLE = function (value, offset, byteLength, noAssert) { +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset >>> 0 byteLength = byteLength >>> 0 - if (!noAssert) - checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) var mul = 1 var i = 0 this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) + while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = (value / mul) >>> 0 & 0xFF + } return offset + byteLength } -Buffer.prototype.writeUIntBE = function (value, offset, byteLength, noAssert) { +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset >>> 0 byteLength = byteLength >>> 0 - if (!noAssert) - checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) var i = byteLength - 1 var mul = 1 this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) + while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = (value / mul) >>> 0 & 0xFF + } return offset + byteLength } -Buffer.prototype.writeUInt8 = function (value, offset, noAssert) { +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 1, 0xff, 0) + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) this[offset] = value return offset + 1 @@ -4612,27 +4735,29 @@ function objectWriteUInt16 (buf, value, offset, littleEndian) { } } -Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) { +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 2, 0xffff, 0) + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = value this[offset + 1] = (value >>> 8) - } else objectWriteUInt16(this, value, offset, true) + } else { + objectWriteUInt16(this, value, offset, true) + } return offset + 2 } -Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) { +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 2, 0xffff, 0) + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = value - } else objectWriteUInt16(this, value, offset, false) + } else { + objectWriteUInt16(this, value, offset, false) + } return offset + 2 } @@ -4643,139 +4768,144 @@ function objectWriteUInt32 (buf, value, offset, littleEndian) { } } -Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) { +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 4, 0xffffffff, 0) + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24) this[offset + 2] = (value >>> 16) this[offset + 1] = (value >>> 8) this[offset] = value - } else objectWriteUInt32(this, value, offset, true) + } else { + objectWriteUInt32(this, value, offset, true) + } return offset + 4 } -Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) { +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 4, 0xffffffff, 0) + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = value - } else objectWriteUInt32(this, value, offset, false) + } else { + objectWriteUInt32(this, value, offset, false) + } return offset + 4 } -Buffer.prototype.writeIntLE = function (value, offset, byteLength, noAssert) { +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset >>> 0 if (!noAssert) { - checkInt(this, - value, - offset, - byteLength, - Math.pow(2, 8 * byteLength - 1) - 1, - -Math.pow(2, 8 * byteLength - 1)) + checkInt( + this, value, offset, byteLength, + Math.pow(2, 8 * byteLength - 1) - 1, + -Math.pow(2, 8 * byteLength - 1) + ) } var i = 0 var mul = 1 var sub = value < 0 ? 1 : 0 this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) + while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } return offset + byteLength } -Buffer.prototype.writeIntBE = function (value, offset, byteLength, noAssert) { +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset >>> 0 if (!noAssert) { - checkInt(this, - value, - offset, - byteLength, - Math.pow(2, 8 * byteLength - 1) - 1, - -Math.pow(2, 8 * byteLength - 1)) + checkInt( + this, value, offset, byteLength, + Math.pow(2, 8 * byteLength - 1) - 1, + -Math.pow(2, 8 * byteLength - 1) + ) } var i = byteLength - 1 var mul = 1 var sub = value < 0 ? 1 : 0 this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) + while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } return offset + byteLength } -Buffer.prototype.writeInt8 = function (value, offset, noAssert) { +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) if (value < 0) value = 0xff + value + 1 this[offset] = value return offset + 1 } -Buffer.prototype.writeInt16LE = function (value, offset, noAssert) { +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = value this[offset + 1] = (value >>> 8) - } else objectWriteUInt16(this, value, offset, true) + } else { + objectWriteUInt16(this, value, offset, true) + } return offset + 2 } -Buffer.prototype.writeInt16BE = function (value, offset, noAssert) { +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = value - } else objectWriteUInt16(this, value, offset, false) + } else { + objectWriteUInt16(this, value, offset, false) + } return offset + 2 } -Buffer.prototype.writeInt32LE = function (value, offset, noAssert) { +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = value this[offset + 1] = (value >>> 8) this[offset + 2] = (value >>> 16) this[offset + 3] = (value >>> 24) - } else objectWriteUInt32(this, value, offset, true) + } else { + objectWriteUInt32(this, value, offset, true) + } return offset + 4 } -Buffer.prototype.writeInt32BE = function (value, offset, noAssert) { +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value offset = offset >>> 0 - if (!noAssert) - checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (value < 0) value = 0xffffffff + value + 1 if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = value - } else objectWriteUInt32(this, value, offset, false) + } else { + objectWriteUInt32(this, value, offset, false) + } return offset + 4 } @@ -4786,39 +4916,39 @@ function checkIEEE754 (buf, value, offset, ext, max, min) { } function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) + if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 } -Buffer.prototype.writeFloatLE = function (value, offset, noAssert) { +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert) } -Buffer.prototype.writeFloatBE = function (value, offset, noAssert) { +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert) } function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) + if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } ieee754.write(buf, value, offset, littleEndian, 52, 8) return offset + 8 } -Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) { +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert) } -Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) { +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert) } // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function (target, target_start, start, end) { - var source = this - +Buffer.prototype.copy = function copy (target, target_start, start, end) { if (!start) start = 0 if (!end && end !== 0) end = this.length if (target_start >= target.length) target_start = target.length @@ -4827,19 +4957,20 @@ Buffer.prototype.copy = function (target, target_start, start, end) { // Copy 0 bytes; we're done if (end === start) return 0 - if (target.length === 0 || source.length === 0) return 0 + if (target.length === 0 || this.length === 0) return 0 // Fatal error conditions - if (target_start < 0) + if (target_start < 0) { throw new RangeError('targetStart out of bounds') - if (start < 0 || start >= source.length) throw new RangeError('sourceStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') if (end < 0) throw new RangeError('sourceEnd out of bounds') // Are we oob? - if (end > this.length) - end = this.length - if (target.length - target_start < end - start) + if (end > this.length) end = this.length + if (target.length - target_start < end - start) { end = target.length - target_start + start + } var len = end - start @@ -4855,7 +4986,7 @@ Buffer.prototype.copy = function (target, target_start, start, end) { } // fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function (value, start, end) { +Buffer.prototype.fill = function fill (value, start, end) { if (!value) value = 0 if (!start) start = 0 if (!end) end = this.length @@ -4889,7 +5020,7 @@ Buffer.prototype.fill = function (value, start, end) { * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. * Added in Node 0.12. Only available in browsers that support ArrayBuffer. */ -Buffer.prototype.toArrayBuffer = function () { +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { if (typeof Uint8Array !== 'undefined') { if (Buffer.TYPED_ARRAY_SUPPORT) { return (new Buffer(this)).buffer @@ -4913,12 +5044,11 @@ var BP = Buffer.prototype /** * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods */ -Buffer._augment = function (arr) { +Buffer._augment = function _augment (arr) { arr.constructor = Buffer arr._isBuffer = true - // save reference to original Uint8Array get/set methods before overwriting - arr._get = arr.get + // save reference to original Uint8Array set method before overwriting arr._set = arr.set // deprecated, will be removed in node 0.13+ @@ -4931,6 +5061,7 @@ Buffer._augment = function (arr) { arr.toJSON = BP.toJSON arr.equals = BP.equals arr.compare = BP.compare + arr.indexOf = BP.indexOf arr.copy = BP.copy arr.slice = BP.slice arr.readUIntLE = BP.readUIntLE @@ -5006,61 +5137,50 @@ function toHex (n) { return n.toString(16) } -function utf8ToBytes(string, units) { - var codePoint, length = string.length - var leadSurrogate = null +function utf8ToBytes (string, units) { units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null var bytes = [] var i = 0 - for (; i 0xD7FF && codePoint < 0xE000) { - // last char was a lead if (leadSurrogate) { - // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) leadSurrogate = codePoint continue - } - - // valid surrogate pair - else { + } else { + // valid surrogate pair codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 leadSurrogate = null } - } + } else { + // no lead yet - // no lead yet - else { - - // unexpected trail if (codePoint > 0xDBFF) { + // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue - } - - // unpaired lead - else if (i + 1 === length) { + } else if (i + 1 === length) { + // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue - } - - // valid lead - else { + } else { + // valid lead leadSurrogate = codePoint continue } } - } - - // valid bmp char, but last char was a lead - else if (leadSurrogate) { + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) leadSurrogate = null } @@ -5069,32 +5189,28 @@ function utf8ToBytes(string, units) { if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint) - } - else if (codePoint < 0x800) { + } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80 - ); - } - else if (codePoint < 0x10000) { + ) + } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 - ); - } - else if (codePoint < 0x200000) { + ) + } else if (codePoint < 0x200000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 - ); - } - else { + ) + } else { throw new Error('Invalid code point') } } @@ -5115,7 +5231,6 @@ function utf16leToBytes (str, units) { var c, hi, lo var byteArray = [] for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break c = str.charCodeAt(i) @@ -5132,11 +5247,9 @@ function base64ToBytes (str) { return base64.toByteArray(base64clean(str)) } -function blitBuffer (src, dst, offset, length, unitSize) { - if (unitSize) length -= length % unitSize; +function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) - break + if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i] } return i @@ -5662,6 +5775,7 @@ process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues +process.versions = {}; function noop() {} @@ -6014,7 +6128,7 @@ for ( var name in caniuse ) { module.exports = browserslist; },{"caniuse-db/data":56,"fs":48,"path":53}],56:[function(require,module,exports){ -module.exports={"eras":{"e-36":"36 versions back","e-35":"35 versions back","e-34":"34 versions back","e-33":"33 versions back","e-32":"32 versions back","e-31":"31 versions back","e-30":"30 versions back","e-29":"29 versions back","e-28":"28 versions back","e-27":"27 versions back","e-26":"26 versions back","e-25":"25 versions back","e-24":"24 versions back","e-23":"23 versions back","e-22":"22 versions back","e-21":"21 versions back","e-20":"20 versions back","e-19":"19 versions back","e-18":"18 versions back","e-17":"17 versions back","e-16":"16 versions back","e-15":"15 versions back","e-14":"14 versions back","e-13":"13 versions back","e-12":"12 versions back","e-11":"11 versions back","e-10":"10 versions back","e-9":"9 versions back","e-8":"8 versions back","e-7":"7 versions back","e-6":"6 versions back","e-5":"5 versions back","e-4":"4 versions back","e-3":"3 versions back","e-2":"2 versions back","e-1":"Previous version","e0":"Current","e1":"Near future","e2":"Farther future","e3":"3 versions ahead"},"agents":{"ie":{"browser":"IE","abbr":"IE","prefix":"ms","type":"desktop","usage_global":{"5.5":0.009298,"6":0.0737794,"7":0.187802,"8":4.07799,"9":2.1329,"10":1.63656,"11":8.33707,"TP":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.5","6","7","8","9","10","11","TP",null,null]},"firefox":{"browser":"Firefox","abbr":"FF","prefix":"moz","type":"desktop","usage_global":{"2":0.006597,"3":0.026388,"3.5":0.013194,"3.6":0.092358,"4":0.026388,"5":0.013194,"6":0.026388,"7":0.013194,"8":0.046179,"9":0.013194,"10":0.026388,"11":0.046179,"12":0.059373,"13":0.026388,"14":0.026388,"15":0.032985,"16":0.052776,"17":0.039582,"18":0.032985,"19":0.026388,"20":0.032985,"21":0.039582,"22":0.032985,"23":0.046179,"24":0.079164,"25":0.052776,"26":0.059373,"27":0.098955,"28":0.059373,"29":0.092358,"30":0.151731,"31":0.448596,"32":0.369432,"33":2.90928,"34":6.50464,"35":0.237492,"36":0.006597,"37":0.006597,"38":0},"versions":[null,"2","3","3.5","3.6","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38"]},"chrome":{"browser":"Chrome","abbr":"Chr.","prefix":"webkit","type":"desktop","usage_global":{"4":0.026388,"5":0.013194,"6":0.019791,"7":0.013194,"8":0.013194,"9":0.013194,"10":0.019791,"11":0.098955,"12":0.039582,"13":0.026388,"14":0.026388,"15":0.026388,"16":0.019791,"17":0.013194,"18":0.032985,"19":0.013194,"20":0.013194,"21":0.072567,"22":0.059373,"23":0.032985,"24":0.039582,"25":0.032985,"26":0.052776,"27":0.072567,"28":0.079164,"29":0.06597,"30":0.13194,"31":0.752058,"32":0.145134,"33":0.46179,"34":0.32985,"35":0.613521,"36":0.890595,"37":1.02253,"38":1.326,"39":25.3919,"40":0.125343,"41":0.184716,"42":0,"43":0},"versions":["4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43"]},"safari":{"browser":"Safari","abbr":"Saf.","prefix":"webkit","type":"desktop","usage_global":{"3.1":0,"3.2":0.008692,"4":0.052776,"5":0.125343,"5.1":0.409014,"6":0.098955,"6.1":0.277074,"7":0.448596,"7.1":0.567342,"8":1.00274},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.1","3.2","4","5","5.1","6","6.1","7","7.1","8",null,null,null]},"opera":{"browser":"Opera","abbr":"Op.","prefix":"webkit","type":"desktop","usage_global":{"9.5-9.6":0.00685,"10.0-10.1":0.013194,"10.5":0.008392,"10.6":0.007296,"11":0.014996,"11.1":0.008219,"11.5":0.00685,"11.6":0.013194,"12":0.013194,"12.1":0.19791,"15":0.00685,"16":0.00685,"17":0.00685,"18":0.013194,"19":0.006597,"20":0.013194,"21":0.006597,"22":0.006597,"23":0.013434,"24":0.013194,"25":0.026388,"26":0.606924,"27":0.006597,"28":0,"29":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.5-9.6","10.0-10.1","10.5","10.6","11","11.1","11.5","11.6","12","12.1","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29",null],"prefix_exceptions":{"9.5-9.6":"o","10.0-10.1":"o","10.5":"o","10.6":"o","11":"o","11.1":"o","11.5":"o","11.6":"o","12":"o","12.1":"o"}},"ios_saf":{"browser":"iOS Safari","abbr":"iOS","prefix":"webkit","type":"mobile","usage_global":{"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.0454654,"6.0-6.1":0.188026,"7.0-7.1":2.22703,"8":0.631121,"8.1":4.58892},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3.2","4.0-4.1","4.2-4.3","5.0-5.1","6.0-6.1","7.0-7.1","8","8.1",null,null,null]},"op_mini":{"browser":"Opera Mini","abbr":"O.Mini","prefix":"o","type":"mobile","usage_global":{"5.0-8.0":3.0738},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5.0-8.0",null,null,null]},"android":{"browser":"Android Browser","abbr":"And.","prefix":"webkit","type":"mobile","usage_global":{"2.1":0,"2.2":0.00527484,"2.3":0.148355,"3":0,"4":0.305941,"4.1":0.937603,"4.2-4.3":1.49344,"4.4":2.50621,"4.4.3-4.4.4":1.02464,"37":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"2.1","2.2","2.3","3","4","4.1","4.2-4.3","4.4","4.4.3-4.4.4","37",null,null,null]},"op_mob":{"browser":"Opera Mobile","abbr":"O.Mob","prefix":"o","type":"mobile","usage_global":{"10":0,"11.5":0,"12":0.00438935,"12.1":0.0219467,"24":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10",null,null,"11.5","12","12.1","24",null,null,null],"prefix_exceptions":{"24":"webkit"}},"bb":{"browser":"Blackberry Browser","abbr":"BB","prefix":"webkit","type":"mobile","usage_global":{"7":0.0935825,"10":0},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"7","10",null,null,null]},"and_chr":{"browser":"Chrome for Android","abbr":"Chr/And.","prefix":"webkit","type":"mobile","usage_global":{"40":10.5231},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"40",null,null,null]},"and_ff":{"browser":"Firefox for Android","abbr":"FF/And.","prefix":"moz","type":"mobile","usage_global":{"33":0.129314},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"33",null,null,null]},"ie_mob":{"browser":"IE Mobile","abbr":"IE.Mob","prefix":"ms","type":"mobile","usage_global":{"10":0.331242,"11":0.400403},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"10","11",null,null,null]},"and_uc":{"browser":"UC Browser for Android","abbr":"UC","prefix":"webkit","type":"mobile","usage_global":{"9.9":3.77733},"versions":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"9.9",null,null,null],"prefix_exceptions":{"9.9":"webkit"}}},"statuses":{"rec":"W3C Recommendation","pr":"W3C Proposed Recommendation","cr":"W3C Candidate Recommendation","wd":"W3C Working Draft","ls":"WHATWG Living Standard","other":"Other","unoff":"Unofficial / Note"},"cats":{"CSS":["CSS","CSS2","CSS3"],"HTML5":["Canvas","HTML5"],"JS API":["JS API"],"Other":["PNG","Other","DOM"],"SVG":["SVG"]},"updated":1422423430,"data":{"png-alpha":{"title":"PNG alpha transparency","description":"Semi-transparent areas in PNG files","spec":"http://www.w3.org/TR/PNG/","status":"rec","links":[{"url":"http://en.wikipedia.org/wiki/Portable_Network_Graphics","title":"Wikipedia"},{"url":"http://dillerdesign.com/experiment/DD_belatedPNG/","title":"Workaround for IE6"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"p","7":"y","8":"y","9":"y","10":"y","11":"y","TP":"y"},"firefox":{"2":"y","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y"},"safari":{"3.1":"y","3.2":"y","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","7.1":"y","8":"y"},"opera":{"9":"y","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y","8.1":"y"},"op_mini":{"5.0-8.0":"y"},"android":{"2.1":"y","2.2":"y","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3-4.4.4":"y","37":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","24":"y"},"and_chr":{"40":"y"},"and_ff":{"33":"y"},"ie_mob":{"10":"y","11":"y"},"and_uc":{"9.9":"y"}},"notes":"IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.","notes_by_num":{},"usage_perc_y":97.04,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":""},"apng":{"title":"Animated PNG (APNG)","description":"Like animated GIFs, but allowing 24-bit colors and alpha transparency","spec":"https://wiki.mozilla.org/APNG_Specification","status":"unoff","links":[{"url":"http://en.wikipedia.org/wiki/APNG","title":"Wikipedia"},{"url":"https://github.com/davidmz/apng-canvas","title":"Polyfill using canvas"},{"url":"https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp","title":"Chrome extension providing support"}],"categories":["PNG"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","TP":"n"},"firefox":{"2":"n","3":"y","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y"},"chrome":{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n","30":"n","31":"n","32":"n","33":"n","34":"n","35":"n","36":"n","37":"n","38":"n","39":"n","40":"n","41":"n","42":"n","43":"n"},"safari":{"3.1":"n","3.2":"n","4":"n","5":"n","5.1":"n","6":"n","6.1":"n","7":"n","7.1":"n","8":"y"},"opera":{"9":"n","9.5-9.6":"y","10.0-10.1":"y","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"n","29":"n"},"ios_saf":{"3.2":"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"n","8":"y","8.1":"y"},"op_mini":{"5.0-8.0":"n"},"android":{"2.1":"n","2.2":"n","2.3":"n","3":"n","4":"n","4.1":"n","4.2-4.3":"n","4.4":"n","4.4.3-4.4.4":"n","37":"n"},"bb":{"7":"n","10":"n"},"op_mob":{"10":"y","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","24":"n"},"and_chr":{"40":"n"},"and_ff":{"33":"y"},"ie_mob":{"10":"n","11":"n"},"and_uc":{"9.9":"n"}},"notes":"Where support for APNG is missing, only the first frame is displayed","notes_by_num":{},"usage_perc_y":18.54,"usage_perc_a":0,"ucprefix":false,"parent":"","keywords":"","ie_id":"","chrome_id":""},"video":{"title":"Video element","description":"Method of playing videos on webpages (without requiring a plug-in).","spec":"https://html.spec.whatwg.org/multipage/embedded-content.html#the-video-element","status":"ls","links":[{"url":"https://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/","title":"Detailed article on video/audio elements"},{"url":"http://webmproject.org","title":"WebM format information"},{"url":"http://camendesign.co.uk/code/video_for_everybody","title":"Video for Everybody"},{"url":"http://diveintohtml5.info/video.html","title":"Video on the Web - includes info on Android support"},{"url":"https://raw.github.com/phiggins42/has.js/master/detect/video.js#video","title":"has.js test"},{"url":"http://docs.webplatform.org/wiki/html/elements/video","title":"WebPlatform Docs"}],"categories":["HTML5"],"stats":{"ie":{"5.5":"n","6":"n","7":"n","8":"n","9":"y","10":"y","11":"y","TP":"y"},"firefox":{"2":"n","3":"n","3.5":"y","3.6":"y","4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y"},"chrome":{"4":"y","5":"y","6":"y","7":"y","8":"y","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y"},"safari":{"3.1":"n","3.2":"n","4":"y","5":"y","5.1":"y","6":"y","6.1":"y","7":"y","7.1":"y","8":"y"},"opera":{"9":"n","9.5-9.6":"n","10.0-10.1":"n","10.5":"y","10.6":"y","11":"y","11.1":"y","11.5":"y","11.6":"y","12":"y","12.1":"y","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y"},"ios_saf":{"3.2":"y","4.0-4.1":"y","4.2-4.3":"y","5.0-5.1":"y","6.0-6.1":"y","7.0-7.1":"y","8":"y","8.1":"y"},"op_mini":{"5.0-8.0":"n"},"android":{"2.1":"a","2.2":"a","2.3":"y","3":"y","4":"y","4.1":"y","4.2-4.3":"y","4.4":"y","4.4.3-4.4.4":"y","37":"y"},"bb":{"7":"y","10":"y"},"op_mob":{"10":"n","11":"y","11.1":"y","11.5":"y","12":"y","12.1":"y","24":"y"},"and_chr":{"40":"y"},"and_ff":{"33":"y"},"ie_mob":{"10":"y","11":"y"},"and_uc":{"9.9":"y"}},"notes":"Different browsers have support for different video formats, see sub-features for details. \r\n\r\nThe Android browser (before 2.3) requires [specific handling](http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/) to run the video element.","notes_by_num":{},"usage_perc_y":89.62,"usage_perc_a":0.01,"ucprefix":false,"parent":"","keywords":"