UNPKG

799 kBSource Map (JSON)View Raw
1{"version":3,"file":"dep-cb9bf5e2.js","sources":["../../../../../node_modules/clean-css/lib/optimizer/level-0/optimize.js","../../../../../node_modules/clean-css/lib/utils/natural-compare.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/sort-selectors.js","../../../../../node_modules/clean-css/lib/utils/override.js","../../../../../node_modules/clean-css/lib/options/format.js","../../../../../node_modules/clean-css/lib/tokenizer/marker.js","../../../../../node_modules/clean-css/lib/utils/format-position.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/tidy-rules.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/tidy-block.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/tidy-at-rule.js","../../../../../node_modules/clean-css/lib/optimizer/hack.js","../../../../../node_modules/clean-css/lib/optimizer/remove-unused.js","../../../../../node_modules/clean-css/lib/optimizer/restore-from-optimizing.js","../../../../../node_modules/clean-css/lib/tokenizer/token.js","../../../../../node_modules/clean-css/lib/optimizer/wrap-for-optimizing.js","../../../../../node_modules/clean-css/lib/optimizer/invalid-property-error.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/break-up.js","../../../../../node_modules/clean-css/lib/optimizer/vendor-prefixes.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/properties/understandable.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/can-override.js","../../../../../node_modules/clean-css/lib/optimizer/clone.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/restore.js","../../../../../node_modules/clean-css/lib/options/rounding-precision.js","../../../../../node_modules/clean-css/lib/options/optimization-level.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/background.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/box-shadow.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/border-radius.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/filter.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/font-weight.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/margin.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/outline.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/padding.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hex.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hsl.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-rgb.js","../../../../../node_modules/clean-css/lib/utils/split.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/degrees.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/starts-as-url.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/fraction.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/precision.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/text-quotes.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/time.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/unit.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-quotes.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-whitespace.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/whitespace.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/zero.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers.js","../../../../../node_modules/clean-css/lib/optimizer/configuration.js","../../../../../node_modules/clean-css/lib/writer/helpers.js","../../../../../node_modules/clean-css/lib/writer/one-time.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/optimize.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/is-mergeable.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/every-values-pair.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/has-inherit.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/has-same-values.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/restore-with-components.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/merge-into-shorthands.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/has-unset.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/find-component-in.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/is-component-of.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/is-mergeable-shorthand.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/overrides-non-component-shorthand.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/override-properties.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/optimize.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-adjacent.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/rules-overlap.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/specificity.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/specificities-overlap.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/reorderable.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/extract-properties.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-media-queries.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-body.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-selector.js","../../../../../node_modules/clean-css/lib/utils/clone-array.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/reduce-non-adjacent.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-font-at-rules.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-media-queries.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/tidy-rule-duplicates.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/restructure.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/optimize.js","../../../../../node_modules/clean-css/lib/optimizer/validator.js","../../../../../node_modules/clean-css/lib/options/compatibility.js","../../../../../node_modules/clean-css/lib/utils/is-http-resource.js","../../../../../node_modules/clean-css/lib/utils/is-https-resource.js","../../../../../node_modules/clean-css/lib/reader/load-remote-resource.js","../../../../../node_modules/clean-css/lib/options/fetch.js","../../../../../node_modules/clean-css/lib/options/inline.js","../../../../../node_modules/clean-css/lib/options/inline-request.js","../../../../../node_modules/clean-css/lib/options/inline-timeout.js","../../../../../node_modules/clean-css/lib/options/plugins.js","../../../../../node_modules/clean-css/lib/options/rebase.js","../../../../../node_modules/clean-css/lib/options/rebase-to.js","../../../../../node_modules/clean-css/lib/reader/input-source-map-tracker.js","../../../../../node_modules/clean-css/lib/utils/is-remote-resource.js","../../../../../node_modules/clean-css/lib/utils/has-protocol.js","../../../../../node_modules/clean-css/lib/reader/is-allowed-resource.js","../../../../../node_modules/clean-css/lib/reader/match-data-uri.js","../../../../../node_modules/clean-css/lib/reader/rebase-local-map.js","../../../../../node_modules/clean-css/lib/reader/rebase-remote-map.js","../../../../../node_modules/clean-css/lib/utils/is-data-uri-resource.js","../../../../../node_modules/clean-css/lib/reader/apply-source-maps.js","../../../../../node_modules/clean-css/lib/reader/extract-import-url-and-media.js","../../../../../node_modules/clean-css/lib/reader/load-original-sources.js","../../../../../node_modules/clean-css/lib/reader/normalize-path.js","../../../../../node_modules/clean-css/lib/reader/restore-import.js","../../../../../node_modules/clean-css/lib/reader/rewrite-url.js","../../../../../node_modules/clean-css/lib/utils/is-import.js","../../../../../node_modules/clean-css/lib/reader/rebase.js","../../../../../node_modules/clean-css/lib/tokenizer/tokenize.js","../../../../../node_modules/clean-css/lib/reader/read-sources.js","../../../../../node_modules/clean-css/lib/writer/simple.js","../../../../../node_modules/clean-css/lib/writer/source-maps.js","../../../../../node_modules/clean-css/lib/clean.js","../../../../../node_modules/clean-css/index.js"],"sourcesContent":["function level0Optimize(tokens) {\n // noop as level 0 means no optimizations!\n return tokens;\n}\n\nmodule.exports = level0Optimize;\n","// adapted from http://nedbatchelder.com/blog/200712.html#e20071211T054956\n\nvar NUMBER_PATTERN = /([0-9]+)/;\n\nfunction naturalCompare(value1, value2) {\n var keys1 = ('' + value1).split(NUMBER_PATTERN).map(tryParseInt);\n var keys2 = ('' + value2).split(NUMBER_PATTERN).map(tryParseInt);\n var key1;\n var key2;\n var compareFirst = Math.min(keys1.length, keys2.length);\n var i, l;\n\n for (i = 0, l = compareFirst; i < l; i++) {\n key1 = keys1[i];\n key2 = keys2[i];\n\n if (key1 != key2) {\n return key1 > key2 ? 1 : -1;\n }\n }\n\n return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1);\n}\n\nfunction tryParseInt(value) {\n return ('' + parseInt(value)) == value ?\n parseInt(value) :\n value;\n}\n\nmodule.exports = naturalCompare;\n","var naturalCompare = require('../../utils/natural-compare');\n\nfunction naturalSorter(scope1, scope2) {\n return naturalCompare(scope1[1], scope2[1]);\n}\n\nfunction standardSorter(scope1, scope2) {\n return scope1[1] > scope2[1] ? 1 : -1;\n}\n\nfunction sortSelectors(selectors, method) {\n switch (method) {\n case 'natural':\n return selectors.sort(naturalSorter);\n case 'standard':\n return selectors.sort(standardSorter);\n case 'none':\n case false:\n return selectors;\n }\n}\n\nmodule.exports = sortSelectors;\n","function override(source1, source2) {\n var target = {};\n var key1;\n var key2;\n var item;\n\n for (key1 in source1) {\n item = source1[key1];\n\n if (Array.isArray(item)) {\n target[key1] = item.slice(0);\n } else if (typeof item == 'object' && item !== null) {\n target[key1] = override(item, {});\n } else {\n target[key1] = item;\n }\n }\n\n for (key2 in source2) {\n item = source2[key2];\n\n if (key2 in target && Array.isArray(item)) {\n target[key2] = item.slice(0);\n } else if (key2 in target && typeof item == 'object' && item !== null) {\n target[key2] = override(target[key2], item);\n } else {\n target[key2] = item;\n }\n }\n\n return target;\n}\n\nmodule.exports = override;\n","var systemLineBreak = require('os').EOL;\n\nvar override = require('../utils/override');\n\nvar Breaks = {\n AfterAtRule: 'afterAtRule',\n AfterBlockBegins: 'afterBlockBegins',\n AfterBlockEnds: 'afterBlockEnds',\n AfterComment: 'afterComment',\n AfterProperty: 'afterProperty',\n AfterRuleBegins: 'afterRuleBegins',\n AfterRuleEnds: 'afterRuleEnds',\n BeforeBlockEnds: 'beforeBlockEnds',\n BetweenSelectors: 'betweenSelectors'\n};\n\nvar BreakWith = {\n CarriageReturnLineFeed: '\\r\\n',\n LineFeed: '\\n',\n System: systemLineBreak\n};\n\nvar IndentWith = {\n Space: ' ',\n Tab: '\\t'\n};\n\nvar Spaces = {\n AroundSelectorRelation: 'aroundSelectorRelation',\n BeforeBlockBegins: 'beforeBlockBegins',\n BeforeValue: 'beforeValue'\n};\n\nvar DEFAULTS = {\n breaks: breaks(false),\n breakWith: BreakWith.System,\n indentBy: 0,\n indentWith: IndentWith.Space,\n spaces: spaces(false),\n wrapAt: false,\n semicolonAfterLastProperty: false\n};\n\nvar BEAUTIFY_ALIAS = 'beautify';\nvar KEEP_BREAKS_ALIAS = 'keep-breaks';\n\nvar OPTION_SEPARATOR = ';';\nvar OPTION_NAME_VALUE_SEPARATOR = ':';\nvar HASH_VALUES_OPTION_SEPARATOR = ',';\nvar HASH_VALUES_NAME_VALUE_SEPARATOR = '=';\n\nvar FALSE_KEYWORD_1 = 'false';\nvar FALSE_KEYWORD_2 = 'off';\nvar TRUE_KEYWORD_1 = 'true';\nvar TRUE_KEYWORD_2 = 'on';\n\nfunction breaks(value) {\n var breakOptions = {};\n\n breakOptions[Breaks.AfterAtRule] = value;\n breakOptions[Breaks.AfterBlockBegins] = value;\n breakOptions[Breaks.AfterBlockEnds] = value;\n breakOptions[Breaks.AfterComment] = value;\n breakOptions[Breaks.AfterProperty] = value;\n breakOptions[Breaks.AfterRuleBegins] = value;\n breakOptions[Breaks.AfterRuleEnds] = value;\n breakOptions[Breaks.BeforeBlockEnds] = value;\n breakOptions[Breaks.BetweenSelectors] = value;\n\n return breakOptions;\n}\n\nfunction spaces(value) {\n var spaceOptions = {};\n\n spaceOptions[Spaces.AroundSelectorRelation] = value;\n spaceOptions[Spaces.BeforeBlockBegins] = value;\n spaceOptions[Spaces.BeforeValue] = value;\n\n return spaceOptions;\n}\n\nfunction formatFrom(source) {\n if (source === undefined || source === false) {\n return false;\n }\n\n if (typeof source == 'object' && 'breakWith' in source) {\n source = override(source, { breakWith: mapBreakWith(source.breakWith) });\n }\n\n if (typeof source == 'object' && 'indentBy' in source) {\n source = override(source, { indentBy: parseInt(source.indentBy) });\n }\n\n if (typeof source == 'object' && 'indentWith' in source) {\n source = override(source, { indentWith: mapIndentWith(source.indentWith) });\n }\n\n if (typeof source == 'object') {\n return remapBreaks(override(DEFAULTS, source));\n }\n\n if (typeof source == 'string' && source == BEAUTIFY_ALIAS) {\n return remapBreaks(\n override(DEFAULTS, {\n breaks: breaks(true),\n indentBy: 2,\n spaces: spaces(true)\n })\n );\n }\n\n if (typeof source == 'string' && source == KEEP_BREAKS_ALIAS) {\n return remapBreaks(\n override(DEFAULTS, {\n breaks: {\n afterAtRule: true,\n afterBlockBegins: true,\n afterBlockEnds: true,\n afterComment: true,\n afterRuleEnds: true,\n beforeBlockEnds: true\n }\n })\n );\n }\n\n if (typeof source == 'string') {\n return remapBreaks(override(DEFAULTS, toHash(source)));\n }\n\n return DEFAULTS;\n}\n\nfunction toHash(string) {\n return string\n .split(OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n\n if (name == 'breaks' || name == 'spaces') {\n accumulator[name] = hashValuesToHash(value);\n } else if (name == 'indentBy' || name == 'wrapAt') {\n accumulator[name] = parseInt(value);\n } else if (name == 'indentWith') {\n accumulator[name] = mapIndentWith(value);\n } else if (name == 'breakWith') {\n accumulator[name] = mapBreakWith(value);\n }\n\n return accumulator;\n }, {});\n}\n\nfunction hashValuesToHash(string) {\n return string\n .split(HASH_VALUES_OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n\n accumulator[name] = normalizeValue(value);\n\n return accumulator;\n }, {});\n}\n\n\nfunction normalizeValue(value) {\n switch (value) {\n case FALSE_KEYWORD_1:\n case FALSE_KEYWORD_2:\n return false;\n case TRUE_KEYWORD_1:\n case TRUE_KEYWORD_2:\n return true;\n default:\n return value;\n }\n}\n\nfunction mapBreakWith(value) {\n switch (value) {\n case 'windows':\n case 'crlf':\n case BreakWith.CarriageReturnLineFeed:\n return BreakWith.CarriageReturnLineFeed;\n case 'unix':\n case 'lf':\n case BreakWith.LineFeed:\n return BreakWith.LineFeed;\n default:\n return systemLineBreak;\n }\n}\n\nfunction mapIndentWith(value) {\n switch (value) {\n case 'space':\n return IndentWith.Space;\n case 'tab':\n return IndentWith.Tab;\n default:\n return value;\n }\n}\n\nfunction remapBreaks(source) {\n for (var key in Breaks) {\n var breakName = Breaks[key];\n var breakValue = source.breaks[breakName];\n\n if (breakValue === true) {\n source.breaks[breakName] = source.breakWith;\n } else if (breakValue === false) {\n source.breaks[breakName] = '';\n } else {\n source.breaks[breakName] = source.breakWith.repeat(parseInt(breakValue));\n }\n }\n\n return source;\n}\n\nmodule.exports = {\n Breaks: Breaks,\n Spaces: Spaces,\n formatFrom: formatFrom\n};\n","var Marker = {\n ASTERISK: '*',\n AT: '@',\n BACK_SLASH: '\\\\',\n CARRIAGE_RETURN: '\\r',\n CLOSE_CURLY_BRACKET: '}',\n CLOSE_ROUND_BRACKET: ')',\n CLOSE_SQUARE_BRACKET: ']',\n COLON: ':',\n COMMA: ',',\n DOUBLE_QUOTE: '\"',\n EXCLAMATION: '!',\n FORWARD_SLASH: '/',\n INTERNAL: '-clean-css-',\n NEW_LINE_NIX: '\\n',\n OPEN_CURLY_BRACKET: '{',\n OPEN_ROUND_BRACKET: '(',\n OPEN_SQUARE_BRACKET: '[',\n SEMICOLON: ';',\n SINGLE_QUOTE: '\\'',\n SPACE: ' ',\n TAB: '\\t',\n UNDERSCORE: '_'\n};\n\nmodule.exports = Marker;\n","function formatPosition(metadata) {\n var line = metadata[0];\n var column = metadata[1];\n var source = metadata[2];\n\n return source ?\n source + ':' + line + ':' + column :\n line + ':' + column;\n}\n\nmodule.exports = formatPosition;\n","var Spaces = require('../../options/format').Spaces;\nvar Marker = require('../../tokenizer/marker');\nvar formatPosition = require('../../utils/format-position');\n\nvar CASE_ATTRIBUTE_PATTERN = /[\\s\"'][iI]\\s*\\]/;\nvar CASE_RESTORE_PATTERN = /([\\d\\w])([iI])\\]/g;\nvar DOUBLE_QUOTE_CASE_PATTERN = /=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"([iI])/g;\nvar DOUBLE_QUOTE_PATTERN = /=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"(\\s|\\])/g;\nvar HTML_COMMENT_PATTERN = /^(?:(?:<!--|-->)\\s*)+/;\nvar SINGLE_QUOTE_CASE_PATTERN = /='([a-zA-Z][a-zA-Z\\d\\-_]+)'([iI])/g;\nvar SINGLE_QUOTE_PATTERN = /='([a-zA-Z][a-zA-Z\\d\\-_]+)'(\\s|\\])/g;\nvar RELATION_PATTERN = /[>\\+~]/;\nvar WHITESPACE_PATTERN = /\\s/;\n\nvar ASTERISK_PLUS_HTML_HACK = '*+html ';\nvar ASTERISK_FIRST_CHILD_PLUS_HTML_HACK = '*:first-child+html ';\nvar LESS_THAN = '<';\n\nvar PSEUDO_CLASSES_WITH_SELECTORS = [\n ':current',\n ':future',\n ':has',\n ':host',\n ':host-context',\n ':is',\n ':not',\n ':past',\n ':where'\n];\n\nfunction hasInvalidCharacters(value) {\n var isEscaped;\n var isInvalid = false;\n var character;\n var isQuote = false;\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n if (isEscaped) {\n // continue as always\n } else if (character == Marker.SINGLE_QUOTE || character == Marker.DOUBLE_QUOTE) {\n isQuote = !isQuote;\n } else if (!isQuote && (character == Marker.CLOSE_CURLY_BRACKET || character == Marker.EXCLAMATION || character == LESS_THAN || character == Marker.SEMICOLON)) {\n isInvalid = true;\n break;\n } else if (!isQuote && i === 0 && RELATION_PATTERN.test(character)) {\n isInvalid = true;\n break;\n }\n\n isEscaped = character == Marker.BACK_SLASH;\n }\n\n return isInvalid;\n}\n\nfunction removeWhitespace(value, format) {\n var stripped = [];\n var character;\n var isNewLineNix;\n var isNewLineWin;\n var isEscaped;\n var wasEscaped;\n var isQuoted;\n var isSingleQuoted;\n var isDoubleQuoted;\n var isAttribute;\n var isRelation;\n var isWhitespace;\n var isSpaceAwarePseudoClass;\n var roundBracketLevel = 0;\n var wasComma = false;\n var wasRelation = false;\n var wasWhitespace = false;\n var withCaseAttribute = CASE_ATTRIBUTE_PATTERN.test(value);\n var spaceAroundRelation = format && format.spaces[Spaces.AroundSelectorRelation];\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n isNewLineNix = character == Marker.NEW_LINE_NIX;\n isNewLineWin = character == Marker.NEW_LINE_NIX && value[i - 1] == Marker.CARRIAGE_RETURN;\n isQuoted = isSingleQuoted || isDoubleQuoted;\n isRelation = !isAttribute && !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);\n isWhitespace = WHITESPACE_PATTERN.test(character);\n isSpaceAwarePseudoClass = roundBracketLevel == 1 && character == Marker.CLOSE_ROUND_BRACKET ?\n false :\n isSpaceAwarePseudoClass || (roundBracketLevel === 0 && character == Marker.COLON && isPseudoClassWithSelectors(value, i));\n\n if (wasEscaped && isQuoted && isNewLineWin) {\n // swallow escaped new windows lines in comments\n stripped.pop();\n stripped.pop();\n } else if (isEscaped && isQuoted && isNewLineNix) {\n // swallow escaped new *nix lines in comments\n stripped.pop();\n } else if (isEscaped) {\n stripped.push(character);\n } else if (character == Marker.OPEN_SQUARE_BRACKET && !isQuoted) {\n stripped.push(character);\n isAttribute = true;\n } else if (character == Marker.CLOSE_SQUARE_BRACKET && !isQuoted) {\n stripped.push(character);\n isAttribute = false;\n } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted) {\n stripped.push(character);\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted) {\n stripped.push(character);\n roundBracketLevel--;\n } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {\n stripped.push(character);\n isSingleQuoted = true;\n } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {\n stripped.push(character);\n isDoubleQuoted = true;\n } else if (character == Marker.SINGLE_QUOTE && isQuoted) {\n stripped.push(character);\n isSingleQuoted = false;\n } else if (character == Marker.DOUBLE_QUOTE && isQuoted) {\n stripped.push(character);\n isDoubleQuoted = false;\n } else if (isWhitespace && wasRelation && !spaceAroundRelation) {\n continue;\n } else if (!isWhitespace && wasRelation && spaceAroundRelation) {\n stripped.push(Marker.SPACE);\n stripped.push(character);\n } else if (isWhitespace && !wasWhitespace && wasComma && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {\n // skip space\n } else if (isWhitespace && !wasWhitespace && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {\n stripped.push(character);\n } else if (isWhitespace && (isAttribute || roundBracketLevel > 0) && !isQuoted) {\n // skip space\n } else if (isWhitespace && wasWhitespace && !isQuoted) {\n // skip extra space\n } else if ((isNewLineWin || isNewLineNix) && (isAttribute || roundBracketLevel > 0) && isQuoted) {\n // skip newline\n } else if (isRelation && wasWhitespace && !spaceAroundRelation) {\n stripped.pop();\n stripped.push(character);\n } else if (isRelation && !wasWhitespace && spaceAroundRelation) {\n stripped.push(Marker.SPACE);\n stripped.push(character);\n } else if (isWhitespace) {\n stripped.push(Marker.SPACE);\n } else {\n stripped.push(character);\n }\n\n wasEscaped = isEscaped;\n isEscaped = character == Marker.BACK_SLASH;\n wasRelation = isRelation;\n wasWhitespace = isWhitespace;\n wasComma = character == Marker.COMMA;\n }\n\n return withCaseAttribute ?\n stripped.join('').replace(CASE_RESTORE_PATTERN, '$1 $2]') :\n stripped.join('');\n}\n\nfunction isPseudoClassWithSelectors(value, colonPosition) {\n var pseudoClass = value.substring(colonPosition, value.indexOf(Marker.OPEN_ROUND_BRACKET, colonPosition));\n\n return PSEUDO_CLASSES_WITH_SELECTORS.indexOf(pseudoClass) > -1;\n}\n\nfunction removeQuotes(value) {\n if (value.indexOf('\\'') == -1 && value.indexOf('\"') == -1) {\n return value;\n }\n\n return value\n .replace(SINGLE_QUOTE_CASE_PATTERN, '=$1 $2')\n .replace(SINGLE_QUOTE_PATTERN, '=$1$2')\n .replace(DOUBLE_QUOTE_CASE_PATTERN, '=$1 $2')\n .replace(DOUBLE_QUOTE_PATTERN, '=$1$2');\n}\n\nfunction tidyRules(rules, removeUnsupported, adjacentSpace, format, warnings) {\n var list = [];\n var repeated = [];\n\n function removeHTMLComment(rule, match) {\n warnings.push('HTML comment \\'' + match + '\\' at ' + formatPosition(rule[2][0]) + '. Removing.');\n return '';\n }\n\n for (var i = 0, l = rules.length; i < l; i++) {\n var rule = rules[i];\n var reduced = rule[1];\n\n reduced = reduced.replace(HTML_COMMENT_PATTERN, removeHTMLComment.bind(null, rule));\n\n if (hasInvalidCharacters(reduced)) {\n warnings.push('Invalid selector \\'' + rule[1] + '\\' at ' + formatPosition(rule[2][0]) + '. Ignoring.');\n continue;\n }\n\n reduced = removeWhitespace(reduced, format);\n reduced = removeQuotes(reduced);\n\n if (adjacentSpace && reduced.indexOf('nav') > 0) {\n reduced = reduced.replace(/\\+nav(\\S|$)/, '+ nav$1');\n }\n\n if (removeUnsupported && reduced.indexOf(ASTERISK_PLUS_HTML_HACK) > -1) {\n continue;\n }\n\n if (removeUnsupported && reduced.indexOf(ASTERISK_FIRST_CHILD_PLUS_HTML_HACK) > -1) {\n continue;\n }\n\n if (reduced.indexOf('*') > -1) {\n reduced = reduced\n .replace(/\\*([:#\\.\\[])/g, '$1')\n .replace(/^(\\:first\\-child)?\\+html/, '*$1+html');\n }\n\n if (repeated.indexOf(reduced) > -1) {\n continue;\n }\n\n rule[1] = reduced;\n repeated.push(reduced);\n list.push(rule);\n }\n\n if (list.length == 1 && list[0][1].length === 0) {\n warnings.push('Empty selector \\'' + list[0][1] + '\\' at ' + formatPosition(list[0][2][0]) + '. Ignoring.');\n list = [];\n }\n\n return list;\n}\n\nmodule.exports = tidyRules;\n","var SUPPORTED_COMPACT_BLOCK_MATCHER = /^@media\\W/;\nvar SUPPORTED_QUOTE_REMOVAL_MATCHER = /^@(?:keyframes|-moz-keyframes|-o-keyframes|-webkit-keyframes)\\W/;\n\nfunction tidyBlock(values, spaceAfterClosingBrace) {\n var withoutSpaceAfterClosingBrace;\n var withoutQuotes;\n var i;\n\n for (i = values.length - 1; i >= 0; i--) {\n withoutSpaceAfterClosingBrace = !spaceAfterClosingBrace && SUPPORTED_COMPACT_BLOCK_MATCHER.test(values[i][1]);\n withoutQuotes = SUPPORTED_QUOTE_REMOVAL_MATCHER.test(values[i][1]);\n\n values[i][1] = values[i][1]\n .replace(/\\n|\\r\\n/g, ' ')\n .replace(/\\s+/g, ' ')\n .replace(/(,|:|\\() /g, '$1')\n .replace(/ \\)/g, ')');\n\n if (withoutQuotes) {\n values[i][1] = values[i][1]\n .replace(/'([a-zA-Z][a-zA-Z\\d\\-_]+)'/, '$1')\n .replace(/\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"/, '$1');\n }\n\n if (withoutSpaceAfterClosingBrace) {\n values[i][1] = values[i][1]\n .replace(/\\) /g, ')');\n }\n }\n\n return values;\n}\n\nmodule.exports = tidyBlock;\n","function tidyAtRule(value) {\n return value\n .replace(/\\s+/g, ' ')\n .replace(/url\\(\\s+/g, 'url(')\n .replace(/\\s+\\)/g, ')')\n .trim();\n}\n\nmodule.exports = tidyAtRule;\n","var Hack = {\n ASTERISK: 'asterisk',\n BANG: 'bang',\n BACKSLASH: 'backslash',\n UNDERSCORE: 'underscore'\n};\n\nmodule.exports = Hack;\n","function removeUnused(properties) {\n for (var i = properties.length - 1; i >= 0; i--) {\n var property = properties[i];\n\n if (property.unused) {\n property.all.splice(property.position, 1);\n }\n }\n}\n\nmodule.exports = removeUnused;\n","var Hack = require('./hack');\n\nvar Marker = require('../tokenizer/marker');\n\nvar ASTERISK_HACK = '*';\nvar BACKSLASH_HACK = '\\\\';\nvar IMPORTANT_TOKEN = '!important';\nvar UNDERSCORE_HACK = '_';\nvar BANG_HACK = '!ie';\n\nfunction restoreFromOptimizing(properties, restoreCallback) {\n var property;\n var restored;\n var current;\n var i;\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n\n if (property.dynamic && property.important) {\n restoreImportant(property);\n continue;\n }\n\n if (property.dynamic) {\n continue;\n }\n\n if (property.unused) {\n continue;\n }\n\n if (!property.dirty && !property.important && !property.hack) {\n continue;\n }\n\n if (property.optimizable && restoreCallback) {\n restored = restoreCallback(property);\n property.value = restored;\n } else {\n restored = property.value;\n }\n\n if (property.important) {\n restoreImportant(property);\n }\n\n if (property.hack) {\n restoreHack(property);\n }\n\n if ('all' in property) {\n current = property.all[property.position];\n current[1][1] = property.name;\n\n current.splice(2, current.length - 1);\n Array.prototype.push.apply(current, restored);\n }\n }\n}\n\nfunction restoreImportant(property) {\n property.value[property.value.length - 1][1] += IMPORTANT_TOKEN;\n}\n\nfunction restoreHack(property) {\n if (property.hack[0] == Hack.UNDERSCORE) {\n property.name = UNDERSCORE_HACK + property.name;\n } else if (property.hack[0] == Hack.ASTERISK) {\n property.name = ASTERISK_HACK + property.name;\n } else if (property.hack[0] == Hack.BACKSLASH) {\n property.value[property.value.length - 1][1] += BACKSLASH_HACK + property.hack[1];\n } else if (property.hack[0] == Hack.BANG) {\n property.value[property.value.length - 1][1] += Marker.SPACE + BANG_HACK;\n }\n}\n\nmodule.exports = restoreFromOptimizing;\n","var Token = {\n AT_RULE: 'at-rule', // e.g. `@import`, `@charset`\n AT_RULE_BLOCK: 'at-rule-block', // e.g. `@font-face{...}`\n AT_RULE_BLOCK_SCOPE: 'at-rule-block-scope', // e.g. `@font-face`\n COMMENT: 'comment', // e.g. `/* comment */`\n NESTED_BLOCK: 'nested-block', // e.g. `@media screen{...}`, `@keyframes animation {...}`\n NESTED_BLOCK_SCOPE: 'nested-block-scope', // e.g. `@media`, `@keyframes`\n PROPERTY: 'property', // e.g. `color:red`\n PROPERTY_BLOCK: 'property-block', // e.g. `--var:{color:red}`\n PROPERTY_NAME: 'property-name', // e.g. `color`\n PROPERTY_VALUE: 'property-value', // e.g. `red`\n RAW: 'raw', // e.g. anything between /* clean-css ignore:start */ and /* clean-css ignore:end */ comments\n RULE: 'rule', // e.g `div > a{...}`\n RULE_SCOPE: 'rule-scope' // e.g `div > a`\n};\n\nmodule.exports = Token;\n","var Hack = require('./hack');\n\nvar Marker = require('../tokenizer/marker');\nvar Token = require('../tokenizer/token');\n\nvar Match = {\n ASTERISK: '*',\n BACKSLASH: '\\\\',\n BANG: '!',\n BANG_SUFFIX_PATTERN: /!\\w+$/,\n IMPORTANT_TOKEN: '!important',\n IMPORTANT_TOKEN_PATTERN: new RegExp('!important$', 'i'),\n IMPORTANT_WORD: 'important',\n IMPORTANT_WORD_PATTERN: new RegExp('important$', 'i'),\n SUFFIX_BANG_PATTERN: /!$/,\n UNDERSCORE: '_',\n VARIABLE_REFERENCE_PATTERN: /var\\(--.+\\)$/\n};\n\nfunction wrapAll(properties, skipProperties) {\n var wrapped = [];\n var single;\n var property;\n var i;\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n\n if (property[0] != Token.PROPERTY) {\n continue;\n }\n\n if (skipProperties && skipProperties.indexOf(property[1][1]) > -1) {\n continue;\n }\n\n single = wrapSingle(property);\n single.all = properties;\n single.position = i;\n wrapped.unshift(single);\n }\n\n return wrapped;\n}\n\nfunction someVariableReferences(property) {\n var i, l;\n var value;\n\n // skipping `property` and property name tokens\n for (i = 2, l = property.length; i < l; i++) {\n value = property[i];\n\n if (value[0] != Token.PROPERTY_VALUE) {\n continue;\n }\n\n if (isVariableReference(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isVariableReference(value) {\n return Match.VARIABLE_REFERENCE_PATTERN.test(value);\n}\n\nfunction isMultiplex(property) {\n var value;\n var i, l;\n\n for (i = 3, l = property.length; i < l; i++) {\n value = property[i];\n\n if (value[0] == Token.PROPERTY_VALUE && (value[1] == Marker.COMMA || value[1] == Marker.FORWARD_SLASH)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction hackFrom(property) {\n var match = false;\n var name = property[1][1];\n var lastValue = property[property.length - 1];\n\n if (name[0] == Match.UNDERSCORE) {\n match = [Hack.UNDERSCORE];\n } else if (name[0] == Match.ASTERISK) {\n match = [Hack.ASTERISK];\n } else if (lastValue[1][0] == Match.BANG && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)) {\n match = [Hack.BANG];\n } else if (lastValue[1].indexOf(Match.BANG) > 0 && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN) && Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {\n match = [Hack.BANG];\n } else if (lastValue[1].indexOf(Match.BACKSLASH) > 0 && lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {\n match = [Hack.BACKSLASH, lastValue[1].substring(lastValue[1].indexOf(Match.BACKSLASH) + 1)];\n } else if (lastValue[1].indexOf(Match.BACKSLASH) === 0 && lastValue[1].length == 2) {\n match = [Hack.BACKSLASH, lastValue[1].substring(1)];\n }\n\n return match;\n}\n\nfunction isImportant(property) {\n if (property.length < 3)\n return false;\n\n var lastValue = property[property.length - 1];\n if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {\n return true;\n } else if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1]) && Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {\n return true;\n }\n\n return false;\n}\n\nfunction stripImportant(property) {\n var lastValue = property[property.length - 1];\n var oneButLastValue = property[property.length - 2];\n\n if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {\n lastValue[1] = lastValue[1].replace(Match.IMPORTANT_TOKEN_PATTERN, '');\n } else {\n lastValue[1] = lastValue[1].replace(Match.IMPORTANT_WORD_PATTERN, '');\n oneButLastValue[1] = oneButLastValue[1].replace(Match.SUFFIX_BANG_PATTERN, '');\n }\n\n if (lastValue[1].length === 0) {\n property.pop();\n }\n\n if (oneButLastValue[1].length === 0) {\n property.pop();\n }\n}\n\nfunction stripPrefixHack(property) {\n property[1][1] = property[1][1].substring(1);\n}\n\nfunction stripSuffixHack(property, hackFrom) {\n var lastValue = property[property.length - 1];\n lastValue[1] = lastValue[1]\n .substring(0, lastValue[1].indexOf(hackFrom[0] == Hack.BACKSLASH ? Match.BACKSLASH : Match.BANG))\n .trim();\n\n if (lastValue[1].length === 0) {\n property.pop();\n }\n}\n\nfunction wrapSingle(property) {\n var importantProperty = isImportant(property);\n if (importantProperty) {\n stripImportant(property);\n }\n\n var whichHack = hackFrom(property);\n if (whichHack[0] == Hack.ASTERISK || whichHack[0] == Hack.UNDERSCORE) {\n stripPrefixHack(property);\n } else if (whichHack[0] == Hack.BACKSLASH || whichHack[0] == Hack.BANG) {\n stripSuffixHack(property, whichHack);\n }\n\n return {\n block: property[2] && property[2][0] == Token.PROPERTY_BLOCK,\n components: [],\n dirty: false,\n dynamic: someVariableReferences(property),\n hack: whichHack,\n important: importantProperty,\n name: property[1][1],\n multiplex: property.length > 3 ? isMultiplex(property) : false,\n optimizable: true,\n position: 0,\n shorthand: false,\n unused: false,\n value: property.slice(2)\n };\n}\n\nmodule.exports = {\n all: wrapAll,\n single: wrapSingle\n};\n","function InvalidPropertyError(message) {\n this.name = 'InvalidPropertyError';\n this.message = message;\n this.stack = (new Error()).stack;\n}\n\nInvalidPropertyError.prototype = Object.create(Error.prototype);\nInvalidPropertyError.prototype.constructor = InvalidPropertyError;\n\nmodule.exports = InvalidPropertyError;\n","var InvalidPropertyError = require('../invalid-property-error');\n\nvar wrapSingle = require('../wrap-for-optimizing').single;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nvar formatPosition = require('../../utils/format-position');\n\nfunction _anyIsInherit(values) {\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == 'inherit') {\n return true;\n }\n }\n\n return false;\n}\n\nfunction _colorFilter(validator) {\n return function (value) {\n return value[1] == 'invert' || validator.isColor(value[1]) || validator.isPrefixed(value[1]);\n };\n}\n\nfunction _styleFilter(validator) {\n return function (value) {\n return value[1] != 'inherit' && validator.isStyleKeyword(value[1]) && !validator.isColorFunction(value[1]);\n };\n}\n\nfunction _wrapDefault(name, property, configuration) {\n var descriptor = configuration[name];\n if (descriptor.doubleValues && descriptor.defaultValue.length == 2) {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[0]],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[1]]\n ]);\n } else if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[0]]\n ]);\n } else {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue]\n ]);\n }\n}\n\nfunction _widthFilter(validator) {\n return function (value) {\n return value[1] != 'inherit' &&\n (validator.isWidth(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) &&\n !validator.isStyleKeyword(value[1]) &&\n !validator.isColorFunction(value[1]);\n };\n}\n\nfunction animation(property, configuration, validator) {\n var duration = _wrapDefault(property.name + '-duration', property, configuration);\n var timing = _wrapDefault(property.name + '-timing-function', property, configuration);\n var delay = _wrapDefault(property.name + '-delay', property, configuration);\n var iteration = _wrapDefault(property.name + '-iteration-count', property, configuration);\n var direction = _wrapDefault(property.name + '-direction', property, configuration);\n var fill = _wrapDefault(property.name + '-fill-mode', property, configuration);\n var play = _wrapDefault(property.name + '-play-state', property, configuration);\n var name = _wrapDefault(property.name + '-name', property, configuration);\n var components = [duration, timing, delay, iteration, direction, fill, play, name];\n var values = property.value;\n var value;\n var durationSet = false;\n var timingSet = false;\n var delaySet = false;\n var iterationSet = false;\n var directionSet = false;\n var fillSet = false;\n var playSet = false;\n var nameSet = false;\n var i;\n var l;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n duration.value = timing.value = delay.value = iteration.value = direction.value = fill.value = play.value = name.value = property.value;\n return components;\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isTime(value[1]) && !durationSet) {\n duration.value = [value];\n durationSet = true;\n } else if (validator.isTime(value[1]) && !delaySet) {\n delay.value = [value];\n delaySet = true;\n } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {\n timing.value = [value];\n timingSet = true;\n } else if ((validator.isAnimationIterationCountKeyword(value[1]) || validator.isPositiveNumber(value[1])) && !iterationSet) {\n iteration.value = [value];\n iterationSet = true;\n } else if (validator.isAnimationDirectionKeyword(value[1]) && !directionSet) {\n direction.value = [value];\n directionSet = true;\n } else if (validator.isAnimationFillModeKeyword(value[1]) && !fillSet) {\n fill.value = [value];\n fillSet = true;\n } else if (validator.isAnimationPlayStateKeyword(value[1]) && !playSet) {\n play.value = [value];\n playSet = true;\n } else if ((validator.isAnimationNameKeyword(value[1]) || validator.isIdentifier(value[1])) && !nameSet) {\n name.value = [value];\n nameSet = true;\n } else {\n throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');\n }\n }\n\n return components;\n}\n\nfunction background(property, configuration, validator) {\n var image = _wrapDefault('background-image', property, configuration);\n var position = _wrapDefault('background-position', property, configuration);\n var size = _wrapDefault('background-size', property, configuration);\n var repeat = _wrapDefault('background-repeat', property, configuration);\n var attachment = _wrapDefault('background-attachment', property, configuration);\n var origin = _wrapDefault('background-origin', property, configuration);\n var clip = _wrapDefault('background-clip', property, configuration);\n var color = _wrapDefault('background-color', property, configuration);\n var components = [image, position, size, repeat, attachment, origin, clip, color];\n var values = property.value;\n\n var positionSet = false;\n var clipSet = false;\n var originSet = false;\n var repeatSet = false;\n\n var anyValueSet = false;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n // NOTE: 'inherit' is not a valid value for background-attachment\n color.value = image.value = repeat.value = position.value = size.value = origin.value = clip.value = property.value;\n return components;\n }\n\n if (property.value.length == 1 && property.value[0][1] == '0 0') {\n return components;\n }\n\n for (var i = values.length - 1; i >= 0; i--) {\n var value = values[i];\n\n if (validator.isBackgroundAttachmentKeyword(value[1])) {\n attachment.value = [value];\n anyValueSet = true;\n } else if (validator.isBackgroundClipKeyword(value[1]) || validator.isBackgroundOriginKeyword(value[1])) {\n if (clipSet) {\n origin.value = [value];\n originSet = true;\n } else {\n clip.value = [value];\n clipSet = true;\n }\n anyValueSet = true;\n } else if (validator.isBackgroundRepeatKeyword(value[1])) {\n if (repeatSet) {\n repeat.value.unshift(value);\n } else {\n repeat.value = [value];\n repeatSet = true;\n }\n anyValueSet = true;\n } else if (validator.isBackgroundPositionKeyword(value[1]) || validator.isBackgroundSizeKeyword(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) {\n if (i > 0) {\n var previousValue = values[i - 1];\n\n if (previousValue[1] == Marker.FORWARD_SLASH) {\n size.value = [value];\n } else if (i > 1 && values[i - 2][1] == Marker.FORWARD_SLASH) {\n size.value = [previousValue, value];\n i -= 2;\n } else {\n if (!positionSet)\n position.value = [];\n\n position.value.unshift(value);\n positionSet = true;\n }\n } else {\n if (!positionSet)\n position.value = [];\n\n position.value.unshift(value);\n positionSet = true;\n }\n anyValueSet = true;\n } else if ((color.value[0][1] == configuration[color.name].defaultValue || color.value[0][1] == 'none') && (validator.isColor(value[1]) || validator.isPrefixed(value[1]))) {\n color.value = [value];\n anyValueSet = true;\n } else if (validator.isUrl(value[1]) || validator.isFunction(value[1])) {\n image.value = [value];\n anyValueSet = true;\n }\n }\n\n if (clipSet && !originSet)\n origin.value = clip.value.slice(0);\n\n if (!anyValueSet) {\n throw new InvalidPropertyError('Invalid background value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n return components;\n}\n\nfunction borderRadius(property, configuration) {\n var values = property.value;\n var splitAt = -1;\n\n for (var i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == Marker.FORWARD_SLASH) {\n splitAt = i;\n break;\n }\n }\n\n if (splitAt === 0 || splitAt === values.length - 1) {\n throw new InvalidPropertyError('Invalid border-radius value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n var target = _wrapDefault(property.name, property, configuration);\n target.value = splitAt > -1 ?\n values.slice(0, splitAt) :\n values.slice(0);\n target.components = fourValues(target, configuration);\n\n var remainder = _wrapDefault(property.name, property, configuration);\n remainder.value = splitAt > -1 ?\n values.slice(splitAt + 1) :\n values.slice(0);\n remainder.components = fourValues(remainder, configuration);\n\n for (var j = 0; j < 4; j++) {\n target.components[j].multiplex = true;\n target.components[j].value = target.components[j].value.concat(remainder.components[j].value);\n }\n\n return target.components;\n}\n\nfunction font(property, configuration, validator) {\n var style = _wrapDefault('font-style', property, configuration);\n var variant = _wrapDefault('font-variant', property, configuration);\n var weight = _wrapDefault('font-weight', property, configuration);\n var stretch = _wrapDefault('font-stretch', property, configuration);\n var size = _wrapDefault('font-size', property, configuration);\n var height = _wrapDefault('line-height', property, configuration);\n var family = _wrapDefault('font-family', property, configuration);\n var components = [style, variant, weight, stretch, size, height, family];\n var values = property.value;\n var fuzzyMatched = 4; // style, variant, weight, and stretch\n var index = 0;\n var isStretchSet = false;\n var isStretchValid;\n var isStyleSet = false;\n var isStyleValid;\n var isVariantSet = false;\n var isVariantValid;\n var isWeightSet = false;\n var isWeightValid;\n var isSizeSet = false;\n var appendableFamilyName = false;\n\n if (!values[index]) {\n throw new InvalidPropertyError('Missing font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');\n }\n\n if (values.length == 1 && values[0][1] == 'inherit') {\n style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;\n return components;\n }\n\n if (values.length == 1 && (validator.isFontKeyword(values[0][1]) || validator.isGlobal(values[0][1]) || validator.isPrefixed(values[0][1]))) {\n values[0][1] = Marker.INTERNAL + values[0][1];\n style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;\n return components;\n }\n\n if (values.length < 2 || !_anyIsFontSize(values, validator) || !_anyIsFontFamily(values, validator)) {\n throw new InvalidPropertyError('Invalid font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid font values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n // fuzzy match style, variant, weight, and stretch on first elements\n while (index < fuzzyMatched) {\n isStretchValid = validator.isFontStretchKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isStyleValid = validator.isFontStyleKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isVariantValid = validator.isFontVariantKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isWeightValid = validator.isFontWeightKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n\n if (isStyleValid && !isStyleSet) {\n style.value = [values[index]];\n isStyleSet = true;\n } else if (isVariantValid && !isVariantSet) {\n variant.value = [values[index]];\n isVariantSet = true;\n } else if (isWeightValid && !isWeightSet) {\n weight.value = [values[index]];\n isWeightSet = true;\n } else if (isStretchValid && !isStretchSet) {\n stretch.value = [values[index]];\n isStretchSet = true;\n } else if (isStyleValid && isStyleSet || isVariantValid && isVariantSet || isWeightValid && isWeightSet || isStretchValid && isStretchSet) {\n throw new InvalidPropertyError('Invalid font style / variant / weight / stretch value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n } else {\n break;\n }\n\n index++;\n }\n\n // now comes font-size ...\n if (validator.isFontSizeKeyword(values[index][1]) || validator.isUnit(values[index][1]) && !validator.isDynamicUnit(values[index][1])) {\n size.value = [values[index]];\n isSizeSet = true;\n index++;\n } else {\n throw new InvalidPropertyError('Missing font size at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n if (!values[index]) {\n throw new InvalidPropertyError('Missing font family at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n // ... and perhaps line-height\n if (isSizeSet && values[index] && values[index][1] == Marker.FORWARD_SLASH && values[index + 1] && (validator.isLineHeightKeyword(values[index + 1][1]) || validator.isUnit(values[index + 1][1]) || validator.isNumber(values[index + 1][1]))) {\n height.value = [values[index + 1]];\n index++;\n index++;\n }\n\n // ... and whatever comes next is font-family\n family.value = [];\n\n while (values[index]) {\n if (values[index][1] == Marker.COMMA) {\n appendableFamilyName = false;\n } else {\n if (appendableFamilyName) {\n family.value[family.value.length - 1][1] += Marker.SPACE + values[index][1];\n } else {\n family.value.push(values[index]);\n }\n\n appendableFamilyName = true;\n }\n\n index++;\n }\n\n if (family.value.length === 0) {\n throw new InvalidPropertyError('Missing font family at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n return components;\n}\n\nfunction _anyIsFontSize(values, validator) {\n var value;\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isFontSizeKeyword(value[1]) || validator.isUnit(value[1]) && !validator.isDynamicUnit(value[1]) || validator.isFunction(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction _anyIsFontFamily(values, validator) {\n var value;\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isIdentifier(value[1]) || validator.isQuotedText(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction fourValues(property, configuration) {\n var componentNames = configuration[property.name].components;\n var components = [];\n var value = property.value;\n\n if (value.length < 1)\n return [];\n\n if (value.length < 2)\n value[1] = value[0].slice(0);\n if (value.length < 3)\n value[2] = value[0].slice(0);\n if (value.length < 4)\n value[3] = value[1].slice(0);\n\n for (var i = componentNames.length - 1; i >= 0; i--) {\n var component = wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, componentNames[i]]\n ]);\n component.value = [value[i]];\n components.unshift(component);\n }\n\n return components;\n}\n\nfunction multiplex(splitWith) {\n return function (property, configuration, validator) {\n var splitsAt = [];\n var values = property.value;\n var i, j, l, m;\n\n // find split commas\n for (i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == ',')\n splitsAt.push(i);\n }\n\n if (splitsAt.length === 0)\n return splitWith(property, configuration, validator);\n\n var splitComponents = [];\n\n // split over commas, and into components\n for (i = 0, l = splitsAt.length; i <= l; i++) {\n var from = i === 0 ? 0 : splitsAt[i - 1] + 1;\n var to = i < l ? splitsAt[i] : values.length;\n\n var _property = _wrapDefault(property.name, property, configuration);\n _property.value = values.slice(from, to);\n\n if (_property.value.length > 0) {\n splitComponents.push(splitWith(_property, configuration, validator));\n }\n }\n\n var components = splitComponents[0];\n\n // group component values from each split\n for (i = 0, l = components.length; i < l; i++) {\n components[i].multiplex = true;\n\n for (j = 1, m = splitComponents.length; j < m; j++) {\n components[i].value.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n Array.prototype.push.apply(components[i].value, splitComponents[j][i].value);\n }\n }\n\n return components;\n };\n}\n\nfunction listStyle(property, configuration, validator) {\n var type = _wrapDefault('list-style-type', property, configuration);\n var position = _wrapDefault('list-style-position', property, configuration);\n var image = _wrapDefault('list-style-image', property, configuration);\n var components = [type, position, image];\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n type.value = position.value = image.value = [property.value[0]];\n return components;\n }\n\n var values = property.value.slice(0);\n var total = values.length;\n var index = 0;\n\n // `image` first...\n for (index = 0, total = values.length; index < total; index++) {\n if (validator.isUrl(values[index][1]) || values[index][1] == '0') {\n image.value = [values[index]];\n values.splice(index, 1);\n break;\n }\n }\n\n // ... then `position`\n for (index = 0, total = values.length; index < total; index++) {\n if (validator.isListStylePositionKeyword(values[index][1])) {\n position.value = [values[index]];\n values.splice(index, 1);\n break;\n }\n }\n\n // ... and what's left is a `type`\n if (values.length > 0 && (validator.isListStyleTypeKeyword(values[0][1]) || validator.isIdentifier(values[0][1]))) {\n type.value = [values[0]];\n }\n\n return components;\n}\n\nfunction transition(property, configuration, validator) {\n var prop = _wrapDefault(property.name + '-property', property, configuration);\n var duration = _wrapDefault(property.name + '-duration', property, configuration);\n var timing = _wrapDefault(property.name + '-timing-function', property, configuration);\n var delay = _wrapDefault(property.name + '-delay', property, configuration);\n var components = [prop, duration, timing, delay];\n var values = property.value;\n var value;\n var durationSet = false;\n var delaySet = false;\n var propSet = false;\n var timingSet = false;\n var i;\n var l;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n prop.value = duration.value = timing.value = delay.value = property.value;\n return components;\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isTime(value[1]) && !durationSet) {\n duration.value = [value];\n durationSet = true;\n } else if (validator.isTime(value[1]) && !delaySet) {\n delay.value = [value];\n delaySet = true;\n } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {\n timing.value = [value];\n timingSet = true;\n } else if (validator.isIdentifier(value[1]) && !propSet) {\n prop.value = [value];\n propSet = true;\n } else {\n throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');\n }\n }\n\n return components;\n}\n\nfunction widthStyleColor(property, configuration, validator) {\n var descriptor = configuration[property.name];\n var components = [\n _wrapDefault(descriptor.components[0], property, configuration),\n _wrapDefault(descriptor.components[1], property, configuration),\n _wrapDefault(descriptor.components[2], property, configuration)\n ];\n var color, style, width;\n\n for (var i = 0; i < 3; i++) {\n var component = components[i];\n\n if (component.name.indexOf('color') > 0)\n color = component;\n else if (component.name.indexOf('style') > 0)\n style = component;\n else\n width = component;\n }\n\n if ((property.value.length == 1 && property.value[0][1] == 'inherit') ||\n (property.value.length == 3 && property.value[0][1] == 'inherit' && property.value[1][1] == 'inherit' && property.value[2][1] == 'inherit')) {\n color.value = style.value = width.value = [property.value[0]];\n return components;\n }\n\n var values = property.value.slice(0);\n var match, matches;\n\n // NOTE: usually users don't follow the required order of parts in this shorthand,\n // so we'll try to parse it caring as little about order as possible\n\n if (values.length > 0) {\n matches = values.filter(_widthFilter(validator));\n match = matches.length > 1 && (matches[0][1] == 'none' || matches[0][1] == 'auto') ? matches[1] : matches[0];\n if (match) {\n width.value = [match];\n values.splice(values.indexOf(match), 1);\n }\n }\n\n if (values.length > 0) {\n match = values.filter(_styleFilter(validator))[0];\n if (match) {\n style.value = [match];\n values.splice(values.indexOf(match), 1);\n }\n }\n\n if (values.length > 0) {\n match = values.filter(_colorFilter(validator))[0];\n if (match) {\n color.value = [match];\n values.splice(values.indexOf(match), 1);\n }\n }\n\n return components;\n}\n\nmodule.exports = {\n animation: animation,\n background: background,\n border: widthStyleColor,\n borderRadius: borderRadius,\n font: font,\n fourValues: fourValues,\n listStyle: listStyle,\n multiplex: multiplex,\n outline: widthStyleColor,\n transition: transition\n};\n","var VENDOR_PREFIX_PATTERN = /(?:^|\\W)(\\-\\w+\\-)/g;\n\nfunction unique(value) {\n var prefixes = [];\n var match;\n\n while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {\n if (prefixes.indexOf(match[0]) == -1) {\n prefixes.push(match[0]);\n }\n }\n\n return prefixes;\n}\n\nfunction same(value1, value2) {\n return unique(value1).sort().join(',') == unique(value2).sort().join(',');\n}\n\nmodule.exports = {\n unique: unique,\n same: same\n};\n","var sameVendorPrefixes = require('../../vendor-prefixes').same;\n\nfunction understandable(validator, value1, value2, _position, isPaired) {\n if (!sameVendorPrefixes(value1, value2)) {\n return false;\n }\n\n if (isPaired && validator.isVariable(value1) !== validator.isVariable(value2)) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = understandable;\n","var understandable = require('./properties/understandable');\n\nfunction animationIterationCount(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isAnimationIterationCountKeyword(value2) || validator.isPositiveNumber(value2);\n}\n\nfunction animationName(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isAnimationNameKeyword(value2) || validator.isIdentifier(value2);\n}\n\nfunction areSameFunction(validator, value1, value2) {\n if (!validator.isFunction(value1) || !validator.isFunction(value2)) {\n return false;\n }\n\n var function1Name = value1.substring(0, value1.indexOf('('));\n var function2Name = value2.substring(0, value2.indexOf('('));\n\n var function1Value = value1.substring(function1Name.length + 1, value1.length - 1);\n var function2Value = value2.substring(function2Name.length + 1, value2.length - 1);\n\n if (validator.isFunction(function1Value) || validator.isFunction(function2Value)) {\n return function1Name === function2Name && areSameFunction(validator, function1Value, function2Value);\n } else {\n return function1Name === function2Name;\n }\n}\n\nfunction backgroundPosition(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isBackgroundPositionKeyword(value2) || validator.isGlobal(value2)) {\n return true;\n }\n\n return unit(validator, value1, value2);\n}\n\nfunction backgroundSize(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isBackgroundSizeKeyword(value2) || validator.isGlobal(value2)) {\n return true;\n }\n\n return unit(validator, value1, value2);\n}\n\nfunction color(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isColor(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (!validator.colorOpacity && (validator.isRgbColor(value1) || validator.isHslColor(value1))) {\n return false;\n } else if (!validator.colorOpacity && (validator.isRgbColor(value2) || validator.isHslColor(value2))) {\n return false;\n } else if (!validator.colorHexAlpha && (validator.isHexAlphaColor(value1) || validator.isHexAlphaColor(value2))) {\n return false;\n } else if (validator.isColor(value1) && validator.isColor(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction components(overrideCheckers) {\n return function (validator, value1, value2, position) {\n return overrideCheckers[position](validator, value1, value2);\n };\n}\n\nfunction fontFamily(validator, value1, value2) {\n return understandable(validator, value1, value2, 0, true);\n}\n\nfunction image(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isImage(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isImage(value2)) {\n return true;\n } else if (validator.isImage(value1)) {\n return false;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction keyword(propertyName) {\n return function(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isKeyword(propertyName)(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isKeyword(propertyName)(value2);\n };\n}\n\nfunction keywordWithGlobal(propertyName) {\n return function(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isKeyword(propertyName)(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isKeyword(propertyName)(value2) || validator.isGlobal(value2);\n };\n}\n\nfunction propertyName(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isIdentifier(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isIdentifier(value2);\n}\n\nfunction sameFunctionOrValue(validator, value1, value2) {\n return areSameFunction(validator, value1, value2) ?\n true :\n value1 === value2;\n}\n\nfunction textShadow(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isUnit(value2) || validator.isColor(value2) || validator.isGlobal(value2);\n}\n\nfunction time(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isTime(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isTime(value1) && !validator.isTime(value2)) {\n return false;\n } else if (validator.isTime(value2)) {\n return true;\n } else if (validator.isTime(value1)) {\n return false;\n } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction timingFunction(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isTimingFunction(value2) || validator.isGlobal(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isTimingFunction(value2) || validator.isGlobal(value2);\n}\n\nfunction unit(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isUnit(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if (validator.isUnit(value1) && !validator.isUnit(value2)) {\n return false;\n } else if (validator.isUnit(value2)) {\n return true;\n } else if (validator.isUnit(value1)) {\n return false;\n } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction unitOrKeywordWithGlobal(propertyName) {\n var byKeyword = keywordWithGlobal(propertyName);\n\n return function(validator, value1, value2) {\n return unit(validator, value1, value2) || byKeyword(validator, value1, value2);\n };\n}\n\nfunction unitOrNumber(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !(validator.isUnit(value2) || validator.isNumber(value2))) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n } else if ((validator.isUnit(value1) || validator.isNumber(value1)) && !(validator.isUnit(value2) || validator.isNumber(value2))) {\n return false;\n } else if (validator.isUnit(value2) || validator.isNumber(value2)) {\n return true;\n } else if (validator.isUnit(value1) || validator.isNumber(value1)) {\n return false;\n } else if (validator.isFunction(value1) && !validator.isPrefixed(value1) && validator.isFunction(value2) && !validator.isPrefixed(value2)) {\n return true;\n }\n\n return sameFunctionOrValue(validator, value1, value2);\n}\n\nfunction zIndex(validator, value1, value2) {\n if (!understandable(validator, value1, value2, 0, true) && !validator.isZIndex(value2)) {\n return false;\n } else if (validator.isVariable(value1) && validator.isVariable(value2)) {\n return true;\n }\n\n return validator.isZIndex(value2);\n}\n\nmodule.exports = {\n generic: {\n color: color,\n components: components,\n image: image,\n propertyName: propertyName,\n time: time,\n timingFunction: timingFunction,\n unit: unit,\n unitOrNumber: unitOrNumber\n },\n property: {\n animationDirection: keywordWithGlobal('animation-direction'),\n animationFillMode: keyword('animation-fill-mode'),\n animationIterationCount: animationIterationCount,\n animationName: animationName,\n animationPlayState: keywordWithGlobal('animation-play-state'),\n backgroundAttachment: keyword('background-attachment'),\n backgroundClip: keywordWithGlobal('background-clip'),\n backgroundOrigin: keyword('background-origin'),\n backgroundPosition: backgroundPosition,\n backgroundRepeat: keyword('background-repeat'),\n backgroundSize: backgroundSize,\n bottom: unitOrKeywordWithGlobal('bottom'),\n borderCollapse: keyword('border-collapse'),\n borderStyle: keywordWithGlobal('*-style'),\n clear: keywordWithGlobal('clear'),\n cursor: keywordWithGlobal('cursor'),\n display: keywordWithGlobal('display'),\n float: keywordWithGlobal('float'),\n left: unitOrKeywordWithGlobal('left'),\n fontFamily: fontFamily,\n fontStretch: keywordWithGlobal('font-stretch'),\n fontStyle: keywordWithGlobal('font-style'),\n fontVariant: keywordWithGlobal('font-variant'),\n fontWeight: keywordWithGlobal('font-weight'),\n listStyleType: keywordWithGlobal('list-style-type'),\n listStylePosition: keywordWithGlobal('list-style-position'),\n outlineStyle: keywordWithGlobal('*-style'),\n overflow: keywordWithGlobal('overflow'),\n position: keywordWithGlobal('position'),\n right: unitOrKeywordWithGlobal('right'),\n textAlign: keywordWithGlobal('text-align'),\n textDecoration: keywordWithGlobal('text-decoration'),\n textOverflow: keywordWithGlobal('text-overflow'),\n textShadow: textShadow,\n top: unitOrKeywordWithGlobal('top'),\n transform: sameFunctionOrValue,\n verticalAlign: unitOrKeywordWithGlobal('vertical-align'),\n visibility: keywordWithGlobal('visibility'),\n whiteSpace: keywordWithGlobal('white-space'),\n zIndex: zIndex\n }\n};\n","var wrapSingle = require('./wrap-for-optimizing').single;\n\nvar Token = require('../tokenizer/token');\n\nfunction deep(property) {\n var cloned = shallow(property);\n for (var i = property.components.length - 1; i >= 0; i--) {\n var component = shallow(property.components[i]);\n component.value = property.components[i].value.slice(0);\n cloned.components.unshift(component);\n }\n\n cloned.dirty = true;\n cloned.value = property.value.slice(0);\n\n return cloned;\n}\n\nfunction shallow(property) {\n var cloned = wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, property.name]\n ]);\n cloned.important = property.important;\n cloned.hack = property.hack;\n cloned.unused = false;\n return cloned;\n}\n\nmodule.exports = {\n deep: deep,\n shallow: shallow\n};\n","var shallowClone = require('../clone').shallow;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nfunction isInheritOnly(values) {\n for (var i = 0, l = values.length; i < l; i++) {\n var value = values[i][1];\n\n if (value != 'inherit' && value != Marker.COMMA && value != Marker.FORWARD_SLASH)\n return false;\n }\n\n return true;\n}\n\nfunction background(property, configuration, lastInMultiplex) {\n var components = property.components;\n var restored = [];\n var needsOne, needsBoth;\n\n function restoreValue(component) {\n Array.prototype.unshift.apply(restored, component.value);\n }\n\n function isDefaultValue(component) {\n var descriptor = configuration[component.name];\n\n if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {\n return component.value[0][1] == descriptor.defaultValue[0] && (component.value[1] ? component.value[1][1] == descriptor.defaultValue[0] : true);\n } else if (descriptor.doubleValues && descriptor.defaultValue.length != 1) {\n return component.value[0][1] == descriptor.defaultValue[0] && (component.value[1] ? component.value[1][1] : component.value[0][1]) == descriptor.defaultValue[1];\n } else {\n return component.value[0][1] == descriptor.defaultValue;\n }\n }\n\n for (var i = components.length - 1; i >= 0; i--) {\n var component = components[i];\n var isDefault = isDefaultValue(component);\n\n if (component.name == 'background-clip') {\n var originComponent = components[i - 1];\n var isOriginDefault = isDefaultValue(originComponent);\n\n needsOne = component.value[0][1] == originComponent.value[0][1];\n\n needsBoth = !needsOne && (\n (isOriginDefault && !isDefault) ||\n (!isOriginDefault && !isDefault) ||\n (!isOriginDefault && isDefault && component.value[0][1] != originComponent.value[0][1]));\n\n if (needsOne) {\n restoreValue(originComponent);\n } else if (needsBoth) {\n restoreValue(component);\n restoreValue(originComponent);\n }\n\n i--;\n } else if (component.name == 'background-size') {\n var positionComponent = components[i - 1];\n var isPositionDefault = isDefaultValue(positionComponent);\n\n needsOne = !isPositionDefault && isDefault;\n\n needsBoth = !needsOne &&\n (isPositionDefault && !isDefault || !isPositionDefault && !isDefault);\n\n if (needsOne) {\n restoreValue(positionComponent);\n } else if (needsBoth) {\n restoreValue(component);\n restored.unshift([Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]);\n restoreValue(positionComponent);\n } else if (positionComponent.value.length == 1) {\n restoreValue(positionComponent);\n }\n\n i--;\n } else {\n if (isDefault || configuration[component.name].multiplexLastOnly && !lastInMultiplex)\n continue;\n\n restoreValue(component);\n }\n }\n\n if (restored.length === 0 && property.value.length == 1 && property.value[0][1] == '0')\n restored.push(property.value[0]);\n\n if (restored.length === 0)\n restored.push([Token.PROPERTY_VALUE, configuration[property.name].defaultValue]);\n\n if (isInheritOnly(restored))\n return [restored[0]];\n\n return restored;\n}\n\nfunction borderRadius(property, configuration) {\n if (property.multiplex) {\n var horizontal = shallowClone(property);\n var vertical = shallowClone(property);\n\n for (var i = 0; i < 4; i++) {\n var component = property.components[i];\n\n var horizontalComponent = shallowClone(property);\n horizontalComponent.value = [component.value[0]];\n horizontal.components.push(horizontalComponent);\n\n var verticalComponent = shallowClone(property);\n // FIXME: only shorthand compactor (see breakup#borderRadius) knows that border radius\n // longhands have two values, whereas tokenizer does not care about populating 2nd value\n // if it's missing, hence this fallback\n verticalComponent.value = [component.value[1] || component.value[0]];\n vertical.components.push(verticalComponent);\n }\n\n var horizontalValues = fourValues(horizontal, configuration);\n var verticalValues = fourValues(vertical, configuration);\n\n if (horizontalValues.length == verticalValues.length &&\n horizontalValues[0][1] == verticalValues[0][1] &&\n (horizontalValues.length > 1 ? horizontalValues[1][1] == verticalValues[1][1] : true) &&\n (horizontalValues.length > 2 ? horizontalValues[2][1] == verticalValues[2][1] : true) &&\n (horizontalValues.length > 3 ? horizontalValues[3][1] == verticalValues[3][1] : true)) {\n return horizontalValues;\n } else {\n return horizontalValues.concat([[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]).concat(verticalValues);\n }\n } else {\n return fourValues(property, configuration);\n }\n}\n\nfunction font(property, configuration) {\n var components = property.components;\n var restored = [];\n var component;\n var componentIndex = 0;\n var fontFamilyIndex = 0;\n\n if (property.value[0][1].indexOf(Marker.INTERNAL) === 0) {\n property.value[0][1] = property.value[0][1].substring(Marker.INTERNAL.length);\n return property.value;\n }\n\n // first four components are optional\n while (componentIndex < 4) {\n component = components[componentIndex];\n\n if (component.value[0][1] != configuration[component.name].defaultValue) {\n Array.prototype.push.apply(restored, component.value);\n }\n\n componentIndex++;\n }\n\n // then comes font-size\n Array.prototype.push.apply(restored, components[componentIndex].value);\n componentIndex++;\n\n // then may come line-height\n if (components[componentIndex].value[0][1] != configuration[components[componentIndex].name].defaultValue) {\n Array.prototype.push.apply(restored, [[Token.PROPERTY_VALUE, Marker.FORWARD_SLASH]]);\n Array.prototype.push.apply(restored, components[componentIndex].value);\n }\n\n componentIndex++;\n\n // then comes font-family\n while (components[componentIndex].value[fontFamilyIndex]) {\n restored.push(components[componentIndex].value[fontFamilyIndex]);\n\n if (components[componentIndex].value[fontFamilyIndex + 1]) {\n restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n }\n\n fontFamilyIndex++;\n }\n\n if (isInheritOnly(restored)) {\n return [restored[0]];\n }\n\n return restored;\n}\n\nfunction fourValues(property) {\n var components = property.components;\n var value1 = components[0].value[0];\n var value2 = components[1].value[0];\n var value3 = components[2].value[0];\n var value4 = components[3].value[0];\n\n if (value1[1] == value2[1] && value1[1] == value3[1] && value1[1] == value4[1]) {\n return [value1];\n } else if (value1[1] == value3[1] && value2[1] == value4[1]) {\n return [value1, value2];\n } else if (value2[1] == value4[1]) {\n return [value1, value2, value3];\n } else {\n return [value1, value2, value3, value4];\n }\n}\n\nfunction multiplex(restoreWith) {\n return function (property, configuration) {\n if (!property.multiplex)\n return restoreWith(property, configuration, true);\n\n var multiplexSize = 0;\n var restored = [];\n var componentMultiplexSoFar = {};\n var i, l;\n\n // At this point we don't know what's the multiplex size, e.g. how many background layers are there\n for (i = 0, l = property.components[0].value.length; i < l; i++) {\n if (property.components[0].value[i][1] == Marker.COMMA)\n multiplexSize++;\n }\n\n for (i = 0; i <= multiplexSize; i++) {\n var _property = shallowClone(property);\n\n // We split multiplex into parts and restore them one by one\n for (var j = 0, m = property.components.length; j < m; j++) {\n var componentToClone = property.components[j];\n var _component = shallowClone(componentToClone);\n _property.components.push(_component);\n\n // The trick is some properties has more than one value, so we iterate over values looking for\n // a multiplex separator - a comma\n for (var k = componentMultiplexSoFar[_component.name] || 0, n = componentToClone.value.length; k < n; k++) {\n if (componentToClone.value[k][1] == Marker.COMMA) {\n componentMultiplexSoFar[_component.name] = k + 1;\n break;\n }\n\n _component.value.push(componentToClone.value[k]);\n }\n }\n\n // No we can restore shorthand value\n var lastInMultiplex = i == multiplexSize;\n var _restored = restoreWith(_property, configuration, lastInMultiplex);\n Array.prototype.push.apply(restored, _restored);\n\n if (i < multiplexSize)\n restored.push([Token.PROPERTY_VALUE, Marker.COMMA]);\n }\n\n return restored;\n };\n}\n\nfunction withoutDefaults(property, configuration) {\n var components = property.components;\n var restored = [];\n\n for (var i = components.length - 1; i >= 0; i--) {\n var component = components[i];\n var descriptor = configuration[component.name];\n\n if (component.value[0][1] != descriptor.defaultValue || ('keepUnlessDefault' in descriptor) && !isDefault(components, configuration, descriptor.keepUnlessDefault)) {\n restored.unshift(component.value[0]);\n }\n }\n\n if (restored.length === 0)\n restored.push([Token.PROPERTY_VALUE, configuration[property.name].defaultValue]);\n\n if (isInheritOnly(restored))\n return [restored[0]];\n\n return restored;\n}\n\nfunction isDefault(components, configuration, propertyName) {\n var component;\n var i, l;\n\n for (i = 0, l = components.length; i < l; i++) {\n component = components[i];\n\n if (component.name == propertyName && component.value[0][1] == configuration[propertyName].defaultValue) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = {\n background: background,\n borderRadius: borderRadius,\n font: font,\n fourValues: fourValues,\n multiplex: multiplex,\n withoutDefaults: withoutDefaults\n};\n","var override = require('../utils/override');\n\nvar INTEGER_PATTERN = /^\\d+$/;\n\nvar ALL_UNITS = ['*', 'all'];\nvar DEFAULT_PRECISION = 'off'; // all precision changes are disabled\nvar DIRECTIVES_SEPARATOR = ','; // e.g. *=5,px=3\nvar DIRECTIVE_VALUE_SEPARATOR = '='; // e.g. *=5\n\nfunction roundingPrecisionFrom(source) {\n return override(defaults(DEFAULT_PRECISION), buildPrecisionFrom(source));\n}\n\nfunction defaults(value) {\n return {\n 'ch': value,\n 'cm': value,\n 'em': value,\n 'ex': value,\n 'in': value,\n 'mm': value,\n 'pc': value,\n 'pt': value,\n 'px': value,\n 'q': value,\n 'rem': value,\n 'vh': value,\n 'vmax': value,\n 'vmin': value,\n 'vw': value,\n '%': value\n };\n}\n\nfunction buildPrecisionFrom(source) {\n if (source === null || source === undefined) {\n return {};\n }\n\n if (typeof source == 'boolean') {\n return {};\n }\n\n if (typeof source == 'number' && source == -1) {\n return defaults(DEFAULT_PRECISION);\n }\n\n if (typeof source == 'number') {\n return defaults(source);\n }\n\n if (typeof source == 'string' && INTEGER_PATTERN.test(source)) {\n return defaults(parseInt(source));\n }\n\n if (typeof source == 'string' && source == DEFAULT_PRECISION) {\n return defaults(DEFAULT_PRECISION);\n }\n\n if (typeof source == 'object') {\n return source;\n }\n\n return source\n .split(DIRECTIVES_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var directiveParts = directive.split(DIRECTIVE_VALUE_SEPARATOR);\n var name = directiveParts[0];\n var value = parseInt(directiveParts[1]);\n\n if (isNaN(value) || value == -1) {\n value = DEFAULT_PRECISION;\n }\n\n if (ALL_UNITS.indexOf(name) > -1) {\n accumulator = override(accumulator, defaults(value));\n } else {\n accumulator[name] = value;\n }\n\n return accumulator;\n }, {});\n}\n\nmodule.exports = {\n DEFAULT: DEFAULT_PRECISION,\n roundingPrecisionFrom: roundingPrecisionFrom\n};\n","var roundingPrecisionFrom = require('./rounding-precision').roundingPrecisionFrom;\n\nvar override = require('../utils/override');\n\nvar OptimizationLevel = {\n Zero: '0',\n One: '1',\n Two: '2'\n};\n\nvar DEFAULTS = {};\n\nDEFAULTS[OptimizationLevel.Zero] = {};\nDEFAULTS[OptimizationLevel.One] = {\n cleanupCharsets: true,\n normalizeUrls: true,\n optimizeBackground: true,\n optimizeBorderRadius: true,\n optimizeFilter: true,\n optimizeFontWeight: true,\n optimizeOutline: true,\n removeEmpty: true,\n removeNegativePaddings: true,\n removeQuotes: true,\n removeWhitespace: true,\n replaceMultipleZeros: true,\n replaceTimeUnits: true,\n replaceZeroUnits: true,\n roundingPrecision: roundingPrecisionFrom(undefined),\n selectorsSortingMethod: 'standard',\n specialComments: 'all',\n tidyAtRules: true,\n tidyBlockScopes: true,\n tidySelectors: true\n};\nDEFAULTS[OptimizationLevel.Two] = {\n mergeAdjacentRules: true,\n mergeIntoShorthands: true,\n mergeMedia: true,\n mergeNonAdjacentRules: true,\n mergeSemantically: false,\n overrideProperties: true,\n removeEmpty: true,\n reduceNonAdjacentRules: true,\n removeDuplicateFontRules: true,\n removeDuplicateMediaBlocks: true,\n removeDuplicateRules: true,\n removeUnusedAtRules: false,\n restructureRules: false,\n skipProperties: []\n};\n\nvar ALL_KEYWORD_1 = '*';\nvar ALL_KEYWORD_2 = 'all';\nvar FALSE_KEYWORD_1 = 'false';\nvar FALSE_KEYWORD_2 = 'off';\nvar TRUE_KEYWORD_1 = 'true';\nvar TRUE_KEYWORD_2 = 'on';\n\nvar LIST_VALUE_SEPARATOR = ',';\nvar OPTION_SEPARATOR = ';';\nvar OPTION_VALUE_SEPARATOR = ':';\n\nfunction optimizationLevelFrom(source) {\n var level = override(DEFAULTS, {});\n var Zero = OptimizationLevel.Zero;\n var One = OptimizationLevel.One;\n var Two = OptimizationLevel.Two;\n\n if (undefined === source) {\n delete level[Two];\n return level;\n }\n\n if (typeof source == 'string') {\n source = parseInt(source);\n }\n\n if (typeof source == 'number' && source === parseInt(Two)) {\n return level;\n }\n\n if (typeof source == 'number' && source === parseInt(One)) {\n delete level[Two];\n return level;\n }\n\n if (typeof source == 'number' && source === parseInt(Zero)) {\n delete level[Two];\n delete level[One];\n return level;\n }\n\n if (typeof source == 'object') {\n source = covertValuesToHashes(source);\n }\n\n if (One in source && 'roundingPrecision' in source[One]) {\n source[One].roundingPrecision = roundingPrecisionFrom(source[One].roundingPrecision);\n }\n\n if (Two in source && 'skipProperties' in source[Two] && typeof(source[Two].skipProperties) == 'string') {\n source[Two].skipProperties = source[Two].skipProperties.split(LIST_VALUE_SEPARATOR);\n }\n\n if (Zero in source || One in source || Two in source) {\n level[Zero] = override(level[Zero], source[Zero]);\n }\n\n if (One in source && ALL_KEYWORD_1 in source[One]) {\n level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_1])));\n delete source[One][ALL_KEYWORD_1];\n }\n\n if (One in source && ALL_KEYWORD_2 in source[One]) {\n level[One] = override(level[One], defaults(One, normalizeValue(source[One][ALL_KEYWORD_2])));\n delete source[One][ALL_KEYWORD_2];\n }\n\n if (One in source || Two in source) {\n level[One] = override(level[One], source[One]);\n } else {\n delete level[One];\n }\n\n if (Two in source && ALL_KEYWORD_1 in source[Two]) {\n level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_1])));\n delete source[Two][ALL_KEYWORD_1];\n }\n\n if (Two in source && ALL_KEYWORD_2 in source[Two]) {\n level[Two] = override(level[Two], defaults(Two, normalizeValue(source[Two][ALL_KEYWORD_2])));\n delete source[Two][ALL_KEYWORD_2];\n }\n\n if (Two in source) {\n level[Two] = override(level[Two], source[Two]);\n } else {\n delete level[Two];\n }\n\n return level;\n}\n\nfunction defaults(level, value) {\n var options = override(DEFAULTS[level], {});\n var key;\n\n for (key in options) {\n if (typeof options[key] == 'boolean') {\n options[key] = value;\n }\n }\n\n return options;\n}\n\nfunction normalizeValue(value) {\n switch (value) {\n case FALSE_KEYWORD_1:\n case FALSE_KEYWORD_2:\n return false;\n case TRUE_KEYWORD_1:\n case TRUE_KEYWORD_2:\n return true;\n default:\n return value;\n }\n}\n\nfunction covertValuesToHashes(source) {\n var clonedSource = override(source, {});\n var level;\n var i;\n\n for (i = 0; i <= 2; i++) {\n level = '' + i;\n\n if (level in clonedSource && (clonedSource[level] === undefined || clonedSource[level] === false)) {\n delete clonedSource[level];\n }\n\n if (level in clonedSource && clonedSource[level] === true) {\n clonedSource[level] = {};\n }\n\n if (level in clonedSource && typeof clonedSource[level] == 'string') {\n clonedSource[level] = covertToHash(clonedSource[level], level);\n }\n }\n\n return clonedSource;\n}\n\nfunction covertToHash(asString, level) {\n return asString\n .split(OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(OPTION_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n var normalizedValue = normalizeValue(value);\n\n if (ALL_KEYWORD_1 == name || ALL_KEYWORD_2 == name) {\n accumulator = override(accumulator, defaults(level, normalizedValue));\n } else {\n accumulator[name] = normalizedValue;\n }\n\n return accumulator;\n }, {});\n}\n\nmodule.exports = {\n OptimizationLevel: OptimizationLevel,\n optimizationLevelFrom: optimizationLevelFrom,\n};\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar plugin = {\n level1: {\n property: function background(_rule, property, options) {\n var values = property.value;\n\n if (!options.level[OptimizationLevel.One].optimizeBackground) {\n return;\n }\n\n if (values.length == 1 && values[0][1] == 'none') {\n values[0][1] = '0 0';\n }\n\n if (values.length == 1 && values[0][1] == 'transparent') {\n values[0][1] = '0 0';\n }\n }\n }\n};\n\nmodule.exports = plugin;\n","var plugin = {\n level1: {\n property: function boxShadow(_rule, property) {\n var values = property.value;\n\n // remove multiple zeros\n if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {\n property.value.splice(2);\n property.dirty = true;\n }\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar plugin = {\n level1: {\n property: function borderRadius(_rule, property, options) {\n var values = property.value;\n\n if (!options.level[OptimizationLevel.One].optimizeBorderRadius) {\n return;\n }\n\n if (values.length == 3 && values[1][1] == '/' && values[0][1] == values[2][1]) {\n property.value.splice(1);\n property.dirty = true;\n } else if (values.length == 5 && values[2][1] == '/' && values[0][1] == values[3][1] && values[1][1] == values[4][1]) {\n property.value.splice(2);\n property.dirty = true;\n } else if (values.length == 7 && values[3][1] == '/' && values[0][1] == values[4][1] && values[1][1] == values[5][1] && values[2][1] == values[6][1]) {\n property.value.splice(3);\n property.dirty = true;\n } else if (values.length == 9 && values[4][1] == '/' && values[0][1] == values[5][1] && values[1][1] == values[6][1] && values[2][1] == values[7][1] && values[3][1] == values[8][1]) {\n property.value.splice(4);\n property.dirty = true;\n }\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar ALPHA_OR_CHROMA_FILTER_PATTERN = /progid:DXImageTransform\\.Microsoft\\.(Alpha|Chroma)(\\W)/;\nvar NO_SPACE_AFTER_COMMA_PATTERN = /,(\\S)/g;\nvar WHITESPACE_AROUND_EQUALS_PATTERN = / ?= ?/g;\n\nvar plugin = {\n level1: {\n property: function filter(_rule, property, options) {\n if (!options.compatibility.properties.ieFilters) {\n return;\n }\n\n if (!options.level[OptimizationLevel.One].optimizeFilter) {\n return;\n }\n\n if (property.value.length == 1) {\n property.value[0][1] = property.value[0][1].replace(ALPHA_OR_CHROMA_FILTER_PATTERN, function (match, filter, suffix) {\n return filter.toLowerCase() + suffix;\n });\n }\n\n property.value[0][1] = property.value[0][1]\n .replace(NO_SPACE_AFTER_COMMA_PATTERN, ', $1')\n .replace(WHITESPACE_AROUND_EQUALS_PATTERN, '=');\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar plugin = {\n level1: {\n property: function fontWeight(_rule, property, options) {\n var value = property.value[0][1];\n\n if (!options.level[OptimizationLevel.One].optimizeFontWeight) {\n return;\n }\n\n if (value == 'normal') {\n value = '400';\n } else if (value == 'bold') {\n value = '700';\n }\n\n property.value[0][1] = value;\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar plugin = {\n level1: {\n property: function margin(_rule, property, options) {\n var values = property.value;\n\n if (!options.level[OptimizationLevel.One].replaceMultipleZeros) {\n return;\n }\n\n // remove multiple zeros\n if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {\n property.value.splice(1);\n property.dirty = true;\n }\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar plugin = {\n level1: {\n property: function outline(_rule, property, options) {\n var values = property.value;\n\n if (!options.level[OptimizationLevel.One].optimizeOutline) {\n return;\n }\n\n if (values.length == 1 && values[0][1] == 'none') {\n values[0][1] = '0';\n }\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nfunction isNegative(value) {\n return value && value[1][0] == '-' && parseFloat(value[1]) < 0;\n}\n\nvar plugin = {\n level1: {\n property: function padding(_rule, property, options) {\n var values = property.value;\n\n // remove multiple zeros\n if (values.length == 4 && values[0][1] === '0' && values[1][1] === '0' && values[2][1] === '0' && values[3][1] === '0') {\n property.value.splice(1);\n property.dirty = true;\n }\n\n // remove negative paddings\n if (options.level[OptimizationLevel.One].removeNegativePaddings && (isNegative(property.value[0]) || isNegative(property.value[1]) || isNegative(property.value[2]) || isNegative(property.value[3]))) {\n property.unused = true;\n }\n }\n }\n};\n\nmodule.exports = plugin;\n","module.exports = {\n background: require('./property-optimizers/background').level1.property,\n boxShadow: require('./property-optimizers/box-shadow').level1.property,\n borderRadius: require('./property-optimizers/border-radius').level1.property,\n filter: require('./property-optimizers/filter').level1.property,\n fontWeight: require('./property-optimizers/font-weight').level1.property,\n margin: require('./property-optimizers/margin').level1.property,\n outline: require('./property-optimizers/outline').level1.property,\n padding: require('./property-optimizers/padding').level1.property\n};\n","var COLORS = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#0ff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000',\n blanchedalmond: '#ffebcd',\n blue: '#00f',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#0ff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#f0f',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#0f0',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#f00',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#fff',\n whitesmoke: '#f5f5f5',\n yellow: '#ff0',\n yellowgreen: '#9acd32'\n};\n\nvar toHex = {};\nvar toName = {};\n\nfor (var name in COLORS) {\n var hex = COLORS[name];\n\n if (name.length < hex.length) {\n toName[hex] = name;\n } else {\n toHex[name] = hex;\n }\n}\n\nvar toHexPattern = new RegExp('(^| |,|\\\\))(' + Object.keys(toHex).join('|') + ')( |,|\\\\)|$)', 'ig');\nvar toNamePattern = new RegExp('(' + Object.keys(toName).join('|') + ')([^a-f0-9]|$)', 'ig');\n\nfunction hexConverter(match, prefix, colorValue, suffix) {\n return prefix + toHex[colorValue.toLowerCase()] + suffix;\n}\n\nfunction nameConverter(match, colorValue, suffix) {\n return toName[colorValue.toLowerCase()] + suffix;\n}\n\nfunction shortenHex(value) {\n var hasHex = value.indexOf('#') > -1;\n var shortened = value.replace(toHexPattern, hexConverter);\n\n if (shortened != value) {\n shortened = shortened.replace(toHexPattern, hexConverter);\n }\n\n return hasHex ?\n shortened.replace(toNamePattern, nameConverter) :\n shortened;\n}\n\nmodule.exports = shortenHex;\n","// HSL to RGB converter. Both methods adapted from:\n// http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript\n\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n // normalize hue orientation b/w 0 and 360 degrees\n h = h % 360;\n if (h < 0)\n h += 360;\n h = ~~h / 360;\n\n if (s < 0)\n s = 0;\n else if (s > 100)\n s = 100;\n s = ~~s / 100;\n\n if (l < 0)\n l = 0;\n else if (l > 100)\n l = 100;\n l = ~~l / 100;\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ?\n l * (1 + s) :\n l + s - l * s;\n var p = 2 * l - q;\n r = hueToRgb(p, q, h + 1/3);\n g = hueToRgb(p, q, h);\n b = hueToRgb(p, q, h - 1/3);\n }\n\n return [~~(r * 255), ~~(g * 255), ~~(b * 255)];\n}\n\nfunction hueToRgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1/6) return p + (q - p) * 6 * t;\n if (t < 1/2) return q;\n if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n}\n\nfunction shortenHsl(hue, saturation, lightness) {\n var asRgb = hslToRgb(hue, saturation, lightness);\n var redAsHex = asRgb[0].toString(16);\n var greenAsHex = asRgb[1].toString(16);\n var blueAsHex = asRgb[2].toString(16);\n\n return '#' +\n ((redAsHex.length == 1 ? '0' : '') + redAsHex) +\n ((greenAsHex.length == 1 ? '0' : '') + greenAsHex) +\n ((blueAsHex.length == 1 ? '0' : '') + blueAsHex);\n}\n\nmodule.exports = shortenHsl;\n","function shortenRgb(red, green, blue) {\n var normalizedRed = Math.max(0, Math.min(parseInt(red), 255));\n var normalizedGreen = Math.max(0, Math.min(parseInt(green), 255));\n var normalizedBlue = Math.max(0, Math.min(parseInt(blue), 255));\n\n // Credit: Asen http://jsbin.com/UPUmaGOc/2/edit?js,console\n return '#' + ('00000' + (normalizedRed << 16 | normalizedGreen << 8 | normalizedBlue).toString(16)).slice(-6);\n}\n\nmodule.exports = shortenRgb;\n","var Marker = require('../tokenizer/marker');\n\nfunction is(value, separator, isSeparatorRegex) {\n return isSeparatorRegex ?\n separator.test(value) :\n value === separator;\n}\n\nfunction split(value, separator) {\n var openLevel = Marker.OPEN_ROUND_BRACKET;\n var closeLevel = Marker.CLOSE_ROUND_BRACKET;\n var level = 0;\n var cursor = 0;\n var lastStart = 0;\n var lastValue;\n var lastCharacter;\n var len = value.length;\n var parts = [];\n var isSeparatorRegex = typeof(separator) == 'object' && 'exec' in separator;\n\n if (!isSeparatorRegex && value.indexOf(separator) == -1) {\n return [value];\n }\n\n if (value.indexOf(openLevel) == -1) {\n return value.split(separator);\n }\n\n while (cursor < len) {\n if (value[cursor] == openLevel) {\n level++;\n } else if (value[cursor] == closeLevel) {\n level--;\n }\n\n if (level === 0 && cursor > 0 && cursor + 1 < len && is(value[cursor], separator, isSeparatorRegex)) {\n parts.push(value.substring(lastStart, cursor));\n\n if (isSeparatorRegex && separator.exec(value[cursor]).length > 1) {\n parts.push(value[cursor]);\n }\n\n lastStart = cursor + 1;\n }\n\n cursor++;\n }\n\n if (lastStart < cursor + 1) {\n lastValue = value.substring(lastStart);\n lastCharacter = lastValue[lastValue.length - 1];\n if (is(lastCharacter, separator, isSeparatorRegex)) {\n lastValue = lastValue.substring(0, lastValue.length - 1);\n }\n\n parts.push(lastValue);\n }\n\n return parts;\n}\n\nmodule.exports = split;\n","var shortenHex = require('./color/shorten-hex');\nvar shortenHsl = require('./color/shorten-hsl');\nvar shortenRgb = require('./color/shorten-rgb');\n\nvar split = require('../../../utils/split');\n\nvar ANY_COLOR_FUNCTION_PATTERN = /(rgb|rgba|hsl|hsla)\\(([^\\(\\)]+)\\)/gi;\nvar COLOR_PREFIX_PATTERN = /#|rgb|hsl/gi;\nvar HEX_LONG_PATTERN = /(^|[^='\"])#([0-9a-f]{6})/gi;\nvar HEX_SHORT_PATTERN = /(^|[^='\"])#([0-9a-f]{3})/gi;\nvar HEX_VALUE_PATTERN = /[0-9a-f]/i;\nvar HSL_PATTERN = /hsl\\((-?\\d+),(-?\\d+)%?,(-?\\d+)%?\\)/gi;\nvar RGBA_HSLA_PATTERN = /(rgb|hsl)a?\\((\\-?\\d+),(\\-?\\d+\\%?),(\\-?\\d+\\%?),(0*[1-9]+[0-9]*(\\.?\\d*)?)\\)/gi;\nvar RGB_PATTERN = /rgb\\((\\-?\\d+),(\\-?\\d+),(\\-?\\d+)\\)/gi;\nvar TRANSPARENT_FUNCTION_PATTERN = /(?:rgba|hsla)\\(0,0%?,0%?,0\\)/g;\n\nvar plugin = {\n level1: {\n value: function color(name, value, options) {\n if (!options.compatibility.properties.colors) {\n return value;\n }\n\n if (!value.match(COLOR_PREFIX_PATTERN)) {\n return shortenHex(value);\n }\n\n value = value\n .replace(RGBA_HSLA_PATTERN, function (match, colorFn, p1, p2, p3, alpha) {\n return (parseInt(alpha, 10) >= 1 ? colorFn + '(' + [p1,p2,p3].join(',') + ')' : match);\n })\n .replace(RGB_PATTERN, function (match, red, green, blue) {\n return shortenRgb(red, green, blue);\n })\n .replace(HSL_PATTERN, function (match, hue, saturation, lightness) {\n return shortenHsl(hue, saturation, lightness);\n })\n .replace(HEX_LONG_PATTERN, function (match, prefix, color, at, inputValue) {\n var suffix = inputValue[at + match.length];\n\n if (suffix && HEX_VALUE_PATTERN.test(suffix)) {\n return match;\n } else if (color[0] == color[1] && color[2] == color[3] && color[4] == color[5]) {\n return (prefix + '#' + color[0] + color[2] + color[4]).toLowerCase();\n } else {\n return (prefix + '#' + color).toLowerCase();\n }\n })\n .replace(HEX_SHORT_PATTERN, function (match, prefix, color) {\n return prefix + '#' + color.toLowerCase();\n })\n .replace(ANY_COLOR_FUNCTION_PATTERN, function (match, colorFunction, colorDef) {\n var tokens = colorDef.split(',');\n var colorFnLowercase = colorFunction && colorFunction.toLowerCase();\n var applies = (colorFnLowercase == 'hsl' && tokens.length == 3) ||\n (colorFnLowercase == 'hsla' && tokens.length == 4) ||\n (colorFnLowercase == 'rgb' && tokens.length === 3 && colorDef.indexOf('%') > 0) ||\n (colorFnLowercase == 'rgba' && tokens.length == 4 && colorDef.indexOf('%') > 0);\n\n if (!applies) {\n return match;\n }\n\n if (tokens[1].indexOf('%') == -1) {\n tokens[1] += '%';\n }\n\n if (tokens[2].indexOf('%') == -1) {\n tokens[2] += '%';\n }\n\n return colorFunction + '(' + tokens.join(',') + ')';\n });\n\n if (options.compatibility.colors.opacity && name.indexOf('background') == -1) {\n value = value.replace(TRANSPARENT_FUNCTION_PATTERN, function (match) {\n if (split(value, ',').pop().indexOf('gradient(') > -1) {\n return match;\n }\n\n return 'transparent';\n });\n }\n\n return shortenHex(value);\n }\n }\n};\n\nmodule.exports = plugin;\n","var ZERO_DEG_PATTERN = /\\(0deg\\)/g;\n\nvar plugin = {\n level1: {\n value: function degrees(_name, value, options) {\n if (!options.compatibility.properties.zeroUnits) {\n return value;\n }\n\n if (value.indexOf('0deg') == -1) {\n return value;\n }\n\n return value.replace(ZERO_DEG_PATTERN, '(0)');\n }\n }\n};\n\nmodule.exports = plugin;\n","var URL_PREFIX_PATTERN = /^url\\(/i;\n\nfunction startsAsUrl(value) {\n return URL_PREFIX_PATTERN.test(value);\n}\n\nmodule.exports = startsAsUrl;\n","var startsAsUrl = require('./starts-as-url');\n\nvar OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar DOT_ZERO_PATTERN = /(^|\\D)\\.0+(\\D|$)/g;\nvar FRACTION_PATTERN = /\\.([1-9]*)0+(\\D|$)/g;\nvar LEADING_ZERO_FRACTION_PATTERN = /(^|\\D)0\\.(\\d)/g;\nvar MINUS_ZERO_FRACTION_PATTERN = /([^\\w\\d\\-]|^)\\-0([^\\.]|$)/g;\nvar ZERO_PREFIXED_UNIT_PATTERN = /(^|\\s)0+([1-9])/g;\n\nvar plugin = {\n level1: {\n value: function fraction(name, value, options) {\n if (!options.level[OptimizationLevel.One].replaceZeroUnits) {\n return value;\n }\n\n if (startsAsUrl(value)) {\n return value;\n }\n\n if (value.indexOf('0') == -1) {\n return value;\n }\n\n if (value.indexOf('-') > -1) {\n value = value\n .replace(MINUS_ZERO_FRACTION_PATTERN, '$10$2')\n .replace(MINUS_ZERO_FRACTION_PATTERN, '$10$2');\n }\n\n return value\n .replace(ZERO_PREFIXED_UNIT_PATTERN, '$1$2')\n .replace(DOT_ZERO_PATTERN, '$10$2')\n .replace(FRACTION_PATTERN, function (match, nonZeroPart, suffix) {\n return (nonZeroPart.length > 0 ? '.' : '') + nonZeroPart + suffix;\n })\n .replace(LEADING_ZERO_FRACTION_PATTERN, '$1.$2');\n }\n }\n};\n\nmodule.exports = plugin;\n","var plugin = {\n level1: {\n value: function precision(_name, value, options) {\n if (!options.precision.enabled || value.indexOf('.') === -1) {\n return value;\n }\n\n return value\n .replace(options.precision.decimalPointMatcher, '$1$2$3')\n .replace(options.precision.zeroMatcher, function (match, integerPart, fractionPart, unit) {\n var multiplier = options.precision.units[unit].multiplier;\n var parsedInteger = parseInt(integerPart);\n var integer = isNaN(parsedInteger) ? 0 : parsedInteger;\n var fraction = parseFloat(fractionPart);\n\n return Math.round((integer + fraction) * multiplier) / multiplier + unit;\n });\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar LOCAL_PREFIX_PATTERN = /^local\\(/i;\nvar QUOTED_PATTERN = /^('.*'|\".*\")$/;\nvar QUOTED_BUT_SAFE_PATTERN = /^['\"][a-zA-Z][a-zA-Z\\d\\-_]+['\"]$/;\n\nvar plugin = {\n level1: {\n value: function textQuotes(_name, value, options) {\n if (!options.level[OptimizationLevel.One].removeQuotes) {\n return value;\n }\n\n if (!QUOTED_PATTERN.test(value) && !LOCAL_PREFIX_PATTERN.test(value)) {\n return value;\n }\n\n return QUOTED_BUT_SAFE_PATTERN.test(value) ?\n value.substring(1, value.length - 1) :\n value;\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar TIME_VALUE = /^(\\-?[\\d\\.]+)(m?s)$/;\n\nvar plugin = {\n level1: {\n value: function time(name, value, options) {\n if (!options.level[OptimizationLevel.One].replaceTimeUnits) {\n return value;\n }\n\n if (!TIME_VALUE.test(value)) {\n return value;\n }\n\n return value.replace(TIME_VALUE, function (match, val, unit) {\n var newValue;\n\n if (unit == 'ms') {\n newValue = parseInt(val) / 1000 + 's';\n } else if (unit == 's') {\n newValue = parseFloat(val) * 1000 + 'ms';\n }\n\n return newValue.length < match.length ? newValue : match;\n });\n }\n }\n};\n\nmodule.exports = plugin;\n","var WHOLE_PIXEL_VALUE = /(?:^|\\s|\\()(-?\\d+)px/;\n\nvar plugin = {\n level1: {\n value: function unit(_name, value, options) {\n if (!WHOLE_PIXEL_VALUE.test(value)) {\n return value;\n }\n\n return value.replace(WHOLE_PIXEL_VALUE, function (match, val) {\n var newValue;\n var intVal = parseInt(val);\n\n if (intVal === 0) {\n return match;\n }\n\n if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.pt && intVal * 3 % 4 === 0) {\n newValue = intVal * 3 / 4 + 'pt';\n }\n\n if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.pc && intVal % 16 === 0) {\n newValue = intVal / 16 + 'pc';\n }\n\n if (options.compatibility.properties.shorterLengthUnits && options.compatibility.units.in && intVal % 96 === 0) {\n newValue = intVal / 96 + 'in';\n }\n\n if (newValue) {\n newValue = match.substring(0, match.indexOf(val)) + newValue;\n }\n\n return newValue && newValue.length < match.length ? newValue : match;\n });\n }\n }\n};\n\nmodule.exports = plugin;\n","var startsAsUrl = require('./starts-as-url');\n\nvar OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar URL_PREFIX_PATTERN = /^url\\(/i;\n\nvar plugin = {\n level1: {\n value: function urlPrefix(_name, value, options) {\n if (!options.level[OptimizationLevel.One].normalizeUrls) {\n return value;\n }\n\n if (!startsAsUrl(value)) {\n return value;\n }\n\n return value.replace(URL_PREFIX_PATTERN, 'url(');\n }\n }\n};\n\nmodule.exports = plugin;\n","var QUOTED_URL_PATTERN = /^url\\(['\"].+['\"]\\)$/;\nvar QUOTED_URL_WITH_WHITESPACE_PATTERN = /^url\\(['\"].*[\\*\\s\\(\\)'\"].*['\"]\\)$/;\nvar QUOTES_PATTERN = /[\"']/g;\nvar URL_DATA_PATTERN = /^url\\(['\"]data:[^;]+;charset/;\n\nvar plugin = {\n level1: {\n value: function urlQuotes(_name, value, options) {\n if (options.compatibility.properties.urlQuotes) {\n return value;\n }\n\n return QUOTED_URL_PATTERN.test(value) && !QUOTED_URL_WITH_WHITESPACE_PATTERN.test(value) && !URL_DATA_PATTERN.test(value) ?\n value.replace(QUOTES_PATTERN, '') :\n value;\n }\n }\n};\n\nmodule.exports = plugin;\n","var startsAsUrl = require('./starts-as-url');\n\nvar WHITESPACE_PATTERN = /\\\\?\\n|\\\\?\\r\\n/g;\nvar WHITESPACE_PREFIX_PATTERN = /(\\()\\s+/g;\nvar WHITESPACE_SUFFIX_PATTERN = /\\s+(\\))/g;\n\nvar plugin = {\n level1: {\n value: function urlWhitespace(_name, value) {\n if (!startsAsUrl(value)) {\n return value;\n }\n\n return value\n .replace(WHITESPACE_PATTERN, '')\n .replace(WHITESPACE_PREFIX_PATTERN, '$1')\n .replace(WHITESPACE_SUFFIX_PATTERN, '$1');\n }\n }\n};\n\nmodule.exports = plugin;\n","var OptimizationLevel = require('../../../options/optimization-level').OptimizationLevel;\n\nvar Marker = require('../../../tokenizer/marker');\n\nvar CALC_DIVISION_WHITESPACE_PATTERN = /\\) ?\\/ ?/g;\nvar COMMA_AND_SPACE_PATTERN = /, /g;\nvar MULTI_WHITESPACE_PATTERN = /\\s+/g;\nvar FUNCTION_CLOSING_BRACE_WHITESPACE_PATTERN = /\\s+(;?\\))/g;\nvar FUNCTION_OPENING_BRACE_WHITESPACE_PATTERN = /(\\(;?)\\s+/g;\n\nvar plugin = {\n level1: {\n value: function whitespace(name, value, options) {\n if (!options.level[OptimizationLevel.One].removeWhitespace) {\n return value;\n }\n\n if (value.indexOf(' ') == -1 || value.indexOf('expression') === 0) {\n return value;\n }\n\n if (value.indexOf(Marker.SINGLE_QUOTE) > -1 || value.indexOf(Marker.DOUBLE_QUOTE) > -1) {\n return value;\n }\n\n value = value.replace(MULTI_WHITESPACE_PATTERN, ' ');\n\n if (value.indexOf('calc') > -1) {\n value = value.replace(CALC_DIVISION_WHITESPACE_PATTERN, ')/ ');\n }\n\n return value\n .replace(FUNCTION_OPENING_BRACE_WHITESPACE_PATTERN, '$1')\n .replace(FUNCTION_CLOSING_BRACE_WHITESPACE_PATTERN, '$1')\n .replace(COMMA_AND_SPACE_PATTERN, ',');\n }\n }\n};\n\nmodule.exports = plugin;\n","var split = require('../../../utils/split');\n\nvar ANY_FUNCTION_PATTERN = /^(\\-(?:moz|ms|o|webkit)\\-[a-z\\-]+|[a-z\\-]+)\\((.+)\\)$/;\nvar SKIP_FUNCTION_PATTERN = /^(?:\\-moz\\-calc|\\-webkit\\-calc|calc|rgb|hsl|rgba|hsla|min|max|clamp|expression)\\(/;\nvar TOKEN_SEPARATOR_PATTERN = /([\\s,\\/])/;\n\nfunction removeRecursively(value, options) {\n var functionTokens;\n var tokens;\n\n if (SKIP_FUNCTION_PATTERN.test(value)) {\n return value;\n }\n\n functionTokens = ANY_FUNCTION_PATTERN.exec(value);\n\n if (!functionTokens) {\n return removeZeros(value, options);\n }\n\n tokens = split(functionTokens[2], TOKEN_SEPARATOR_PATTERN)\n .map(function (token) { return removeRecursively(token, options); });\n\n return functionTokens[1] + '(' + tokens.join('') + ')';\n}\n\nfunction removeZeros(value, options) {\n return value\n .replace(options.unitsRegexp, '$1' + '0' + '$2')\n .replace(options.unitsRegexp, '$1' + '0' + '$2');\n}\n\nvar plugin = {\n level1: {\n value: function zero(name, value, options) {\n if (!options.compatibility.properties.zeroUnits) {\n return value;\n }\n\n if (value.indexOf('%') > 0 && (name == 'height' || name == 'max-height' || name == 'width' || name == 'max-width')) {\n return value;\n }\n\n return removeRecursively(value, options);\n }\n }\n};\n\nmodule.exports = plugin;\n","module.exports = {\n color: require('./value-optimizers/color').level1.value,\n degrees: require('./value-optimizers/degrees').level1.value,\n fraction: require('./value-optimizers/fraction').level1.value,\n precision: require('./value-optimizers/precision').level1.value,\n textQuotes: require('./value-optimizers/text-quotes').level1.value,\n time: require('./value-optimizers/time').level1.value,\n unit: require('./value-optimizers/unit').level1.value,\n urlPrefix: require('./value-optimizers/url-prefix').level1.value,\n urlQuotes: require('./value-optimizers/url-quotes').level1.value,\n urlWhiteSpace: require('./value-optimizers/url-whitespace').level1.value,\n whiteSpace: require('./value-optimizers/whitespace').level1.value,\n zero: require('./value-optimizers/zero').level1.value\n};\n","// Contains the interpretation of CSS properties, as used by the property optimizer\n\nvar breakUp = require('./configuration/break-up');\nvar canOverride = require('./configuration/can-override');\nvar restore = require('./configuration/restore');\n\nvar propertyOptimizers = require('./level-1/property-optimizers');\nvar valueOptimizers = require('./level-1/value-optimizers');\n\nvar override = require('../utils/override');\n\n// Properties to process\n// Extend this object in order to add support for more properties in the optimizer.\n//\n// Each key in this object represents a CSS property and should be an object.\n// Such an object contains properties that describe how the represented CSS property should be handled.\n// Possible options:\n//\n// * components: array (Only specify for shorthand properties.)\n// Contains the names of the granular properties this shorthand compacts.\n//\n// * canOverride: function\n// Returns whether two tokens of this property can be merged with each other.\n// This property has no meaning for shorthands.\n//\n// * defaultValue: string\n// Specifies the default value of the property according to the CSS standard.\n// For shorthand, this is used when every component is set to its default value, therefore it should be the shortest possible default value of all the components.\n//\n// * shortestValue: string\n// Specifies the shortest possible value the property can possibly have.\n// (Falls back to defaultValue if unspecified.)\n//\n// * breakUp: function (Only specify for shorthand properties.)\n// Breaks the shorthand up to its components.\n//\n// * restore: function (Only specify for shorthand properties.)\n// Puts the shorthand together from its components.\n//\nvar configuration = {\n 'animation': {\n canOverride: canOverride.generic.components([\n canOverride.generic.time,\n canOverride.generic.timingFunction,\n canOverride.generic.time,\n canOverride.property.animationIterationCount,\n canOverride.property.animationDirection,\n canOverride.property.animationFillMode,\n canOverride.property.animationPlayState,\n canOverride.property.animationName\n ]),\n components: [\n 'animation-duration',\n 'animation-timing-function',\n 'animation-delay',\n 'animation-iteration-count',\n 'animation-direction',\n 'animation-fill-mode',\n 'animation-play-state',\n 'animation-name'\n ],\n breakUp: breakUp.multiplex(breakUp.animation),\n defaultValue: 'none',\n restore: restore.multiplex(restore.withoutDefaults),\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.textQuotes,\n valueOptimizers.time,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-delay': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'animation'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n valueOptimizers: [\n valueOptimizers.time,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-direction': {\n canOverride: canOverride.property.animationDirection,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'normal',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-duration': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'animation'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n keepUnlessDefault: 'animation-delay',\n valueOptimizers: [\n valueOptimizers.time,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-fill-mode': {\n canOverride: canOverride.property.animationFillMode,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'none',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-iteration-count': {\n canOverride: canOverride.property.animationIterationCount,\n componentOf: [\n 'animation'\n ],\n defaultValue: '1',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-name': {\n canOverride: canOverride.property.animationName,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'none',\n intoMultiplexMode: 'real',\n valueOptimizers: [\n valueOptimizers.textQuotes\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-play-state': {\n canOverride: canOverride.property.animationPlayState,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'running',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'animation-timing-function': {\n canOverride: canOverride.generic.timingFunction,\n componentOf: [\n 'animation'\n ],\n defaultValue: 'ease',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-o-',\n '-webkit-'\n ]\n },\n 'background': {\n canOverride: canOverride.generic.components([\n canOverride.generic.image,\n canOverride.property.backgroundPosition,\n canOverride.property.backgroundSize,\n canOverride.property.backgroundRepeat,\n canOverride.property.backgroundAttachment,\n canOverride.property.backgroundOrigin,\n canOverride.property.backgroundClip,\n canOverride.generic.color\n ]),\n components: [\n 'background-image',\n 'background-position',\n 'background-size',\n 'background-repeat',\n 'background-attachment',\n 'background-origin',\n 'background-clip',\n 'background-color'\n ],\n breakUp: breakUp.multiplex(breakUp.background),\n defaultValue: '0 0',\n propertyOptimizer: propertyOptimizers.background,\n restore: restore.multiplex(restore.background),\n shortestValue: '0',\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.urlWhiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.zero,\n valueOptimizers.color,\n valueOptimizers.urlPrefix,\n valueOptimizers.urlQuotes\n ]\n },\n 'background-attachment': {\n canOverride: canOverride.property.backgroundAttachment,\n componentOf: [\n 'background'\n ],\n defaultValue: 'scroll',\n intoMultiplexMode: 'real'\n },\n 'background-clip': {\n canOverride: canOverride.property.backgroundClip,\n componentOf: [\n 'background'\n ],\n defaultValue: 'border-box',\n intoMultiplexMode: 'real',\n shortestValue: 'border-box'\n },\n 'background-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'background'\n ],\n defaultValue: 'transparent',\n intoMultiplexMode: 'real', // otherwise real color will turn into default since color appears in last multiplex only\n multiplexLastOnly: true,\n nonMergeableValue: 'none',\n shortestValue: 'red',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'background-image': {\n canOverride: canOverride.generic.image,\n componentOf: [\n 'background'\n ],\n defaultValue: 'none',\n intoMultiplexMode: 'default',\n valueOptimizers: [\n valueOptimizers.urlWhiteSpace,\n valueOptimizers.urlPrefix,\n valueOptimizers.urlQuotes,\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero,\n valueOptimizers.color\n ]\n },\n 'background-origin': {\n canOverride: canOverride.property.backgroundOrigin,\n componentOf: [\n 'background'\n ],\n defaultValue: 'padding-box',\n intoMultiplexMode: 'real',\n shortestValue: 'border-box'\n },\n 'background-position': {\n canOverride: canOverride.property.backgroundPosition,\n componentOf: [\n 'background'\n ],\n defaultValue: ['0', '0'],\n doubleValues: true,\n intoMultiplexMode: 'real',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'background-repeat': {\n canOverride: canOverride.property.backgroundRepeat,\n componentOf: [\n 'background'\n ],\n defaultValue: ['repeat'],\n doubleValues: true,\n intoMultiplexMode: 'real'\n },\n 'background-size': {\n canOverride: canOverride.property.backgroundSize,\n componentOf: [\n 'background'\n ],\n defaultValue: ['auto'],\n doubleValues: true,\n intoMultiplexMode: 'real',\n shortestValue: '0 0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'bottom': {\n canOverride: canOverride.property.bottom,\n defaultValue: 'auto',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'border': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-width',\n 'border-style',\n 'border-color'\n ],\n defaultValue: 'none',\n overridesShorthands: [\n 'border-bottom',\n 'border-left',\n 'border-right',\n 'border-top'\n ],\n restore: restore.withoutDefaults,\n shorthand: true,\n shorthandComponents: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.zero,\n valueOptimizers.color\n ]\n },\n 'border-bottom': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-bottom-width',\n 'border-bottom-style',\n 'border-bottom-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.zero,\n valueOptimizers.color\n ]\n },\n 'border-bottom-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-bottom',\n 'border-color'\n ],\n defaultValue: 'none',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'border-bottom-left-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.borderRadius,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-bottom-right-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.borderRadius,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-bottom-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-bottom',\n 'border-style'\n ],\n defaultValue: 'none'\n },\n 'border-bottom-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-bottom',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-top-width',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'border-collapse': {\n canOverride: canOverride.property.borderCollapse,\n defaultValue: 'separate'\n },\n 'border-color': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.color,\n canOverride.generic.color,\n canOverride.generic.color,\n canOverride.generic.color\n ]),\n componentOf: [\n 'border'\n ],\n components: [\n 'border-top-color',\n 'border-right-color',\n 'border-bottom-color',\n 'border-left-color'\n ],\n defaultValue: 'none',\n restore: restore.fourValues,\n shortestValue: 'red',\n shorthand: true,\n singleTypeComponents: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'border-left': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-left-width',\n 'border-left-style',\n 'border-left-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.zero,\n valueOptimizers.color\n ]\n },\n 'border-left-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-color',\n 'border-left'\n ],\n defaultValue: 'none',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'border-left-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-left',\n 'border-style'\n ],\n defaultValue: 'none'\n },\n 'border-left-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-left',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-right-width',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'border-radius': {\n breakUp: breakUp.borderRadius,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n components: [\n 'border-top-left-radius',\n 'border-top-right-radius',\n 'border-bottom-right-radius',\n 'border-bottom-left-radius'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.borderRadius,\n restore: restore.borderRadius,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-right': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-right-width',\n 'border-right-style',\n 'border-right-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'border-right-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-color',\n 'border-right'\n ],\n defaultValue: 'none',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'border-right-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-right',\n 'border-style'\n ],\n defaultValue: 'none'\n },\n 'border-right-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-right',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-left-width',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'border-style': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.property.borderStyle,\n canOverride.property.borderStyle,\n canOverride.property.borderStyle,\n canOverride.property.borderStyle\n ]),\n componentOf: [\n 'border'\n ],\n components: [\n 'border-top-style',\n 'border-right-style',\n 'border-bottom-style',\n 'border-left-style'\n ],\n defaultValue: 'none',\n restore: restore.fourValues,\n shorthand: true,\n singleTypeComponents: true\n },\n 'border-top': {\n breakUp: breakUp.border,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.property.borderStyle,\n canOverride.generic.color\n ]),\n components: [\n 'border-top-width',\n 'border-top-style',\n 'border-top-color'\n ],\n defaultValue: 'none',\n restore: restore.withoutDefaults,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.zero,\n valueOptimizers.color,\n valueOptimizers.unit\n ]\n },\n 'border-top-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'border-color',\n 'border-top'\n ],\n defaultValue: 'none',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'border-top-left-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.borderRadius,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-top-right-radius': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-radius'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.borderRadius,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-o-'\n ]\n },\n 'border-top-style': {\n canOverride: canOverride.property.borderStyle,\n componentOf: [\n 'border-style',\n 'border-top'\n ],\n defaultValue: 'none'\n },\n 'border-top-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'border-top',\n 'border-width'\n ],\n defaultValue: 'medium',\n oppositeTo: 'border-bottom-width',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'border-width': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n componentOf: [\n 'border'\n ],\n components: [\n 'border-top-width',\n 'border-right-width',\n 'border-bottom-width',\n 'border-left-width'\n ],\n defaultValue: 'medium',\n restore: restore.fourValues,\n shortestValue: '0',\n shorthand: true,\n singleTypeComponents: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'box-shadow': {\n propertyOptimizer: propertyOptimizers.boxShadow,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero,\n valueOptimizers.color\n ],\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'clear': {\n canOverride: canOverride.property.clear,\n defaultValue: 'none'\n },\n 'clip': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'color': {\n canOverride: canOverride.generic.color,\n defaultValue: 'transparent',\n shortestValue: 'red',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'column-gap': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'cursor': {\n canOverride: canOverride.property.cursor,\n defaultValue: 'auto'\n },\n 'display': {\n canOverride: canOverride.property.display,\n },\n 'filter': {\n propertyOptimizer: propertyOptimizers.filter,\n valueOptimizers: [\n valueOptimizers.fraction\n ]\n },\n 'float': {\n canOverride: canOverride.property.float,\n defaultValue: 'none'\n },\n 'font': {\n breakUp: breakUp.font,\n canOverride: canOverride.generic.components([\n canOverride.property.fontStyle,\n canOverride.property.fontVariant,\n canOverride.property.fontWeight,\n canOverride.property.fontStretch,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.property.fontFamily\n ]),\n components: [\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'font-stretch',\n 'font-size',\n 'line-height',\n 'font-family'\n ],\n restore: restore.font,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.textQuotes\n ]\n },\n 'font-family': {\n canOverride: canOverride.property.fontFamily,\n defaultValue: 'user|agent|specific',\n valueOptimizers: [\n valueOptimizers.textQuotes\n ]\n },\n 'font-size': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'medium',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.fraction\n ]\n },\n 'font-stretch': {\n canOverride: canOverride.property.fontStretch,\n defaultValue: 'normal'\n },\n 'font-style': {\n canOverride: canOverride.property.fontStyle,\n defaultValue: 'normal'\n },\n 'font-variant': {\n canOverride: canOverride.property.fontVariant,\n defaultValue: 'normal'\n },\n 'font-weight': {\n canOverride: canOverride.property.fontWeight,\n defaultValue: 'normal',\n propertyOptimizer: propertyOptimizers.fontWeight,\n shortestValue: '400'\n },\n 'gap': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'height': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'auto',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'left': {\n canOverride: canOverride.property.left,\n defaultValue: 'auto',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'letter-spacing': {\n valueOptimizers: [\n valueOptimizers.fraction,\n valueOptimizers.zero\n ]\n },\n 'line-height': {\n canOverride: canOverride.generic.unitOrNumber,\n defaultValue: 'normal',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.fraction,\n valueOptimizers.zero\n ]\n },\n 'list-style': {\n canOverride: canOverride.generic.components([\n canOverride.property.listStyleType,\n canOverride.property.listStylePosition,\n canOverride.property.listStyleImage\n ]),\n components: [\n 'list-style-type',\n 'list-style-position',\n 'list-style-image'\n ],\n breakUp: breakUp.listStyle,\n restore: restore.withoutDefaults,\n defaultValue: 'outside', // can't use 'disc' because that'd override default 'decimal' for <ol>\n shortestValue: 'none',\n shorthand: true\n },\n 'list-style-image' : {\n canOverride: canOverride.generic.image,\n componentOf: [\n 'list-style'\n ],\n defaultValue: 'none'\n },\n 'list-style-position' : {\n canOverride: canOverride.property.listStylePosition,\n componentOf: [\n 'list-style'\n ],\n defaultValue: 'outside',\n shortestValue: 'inside'\n },\n 'list-style-type' : {\n canOverride: canOverride.property.listStyleType,\n componentOf: [\n 'list-style'\n ],\n // NOTE: we can't tell the real default value here, it's 'disc' for <ul> and 'decimal' for <ol>\n // this is a hack, but it doesn't matter because this value will be either overridden or\n // it will disappear at the final step anyway\n defaultValue: 'decimal|disc',\n shortestValue: 'none'\n },\n 'margin': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n components: [\n 'margin-top',\n 'margin-right',\n 'margin-bottom',\n 'margin-left'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.margin,\n restore: restore.fourValues,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'margin-bottom': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-top',\n propertyOptimizer: propertyOptimizers.margin,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'margin-inline-end': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'margin-inline-start': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'margin-left': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-right',\n propertyOptimizer: propertyOptimizers.margin,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'margin-right': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-left',\n propertyOptimizer: propertyOptimizers.margin,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'margin-top': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'margin'\n ],\n defaultValue: '0',\n oppositeTo: 'margin-bottom',\n propertyOptimizer: propertyOptimizers.margin,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'max-height': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'none',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'max-width': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'none',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'min-height': {\n canOverride: canOverride.generic.unit,\n defaultValue: '0',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'min-width': {\n canOverride: canOverride.generic.unit,\n defaultValue: '0',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'opacity': {\n valueOptimizers: [\n valueOptimizers.fraction,\n valueOptimizers.precision\n ]\n },\n 'outline': {\n canOverride: canOverride.generic.components([\n canOverride.generic.color,\n canOverride.property.outlineStyle,\n canOverride.generic.unit\n ]),\n components: [\n 'outline-color',\n 'outline-style',\n 'outline-width'\n ],\n breakUp: breakUp.outline,\n restore: restore.withoutDefaults,\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.outline,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'outline-color': {\n canOverride: canOverride.generic.color,\n componentOf: [\n 'outline'\n ],\n defaultValue: 'invert',\n shortestValue: 'red',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.color\n ]\n },\n 'outline-style': {\n canOverride: canOverride.property.outlineStyle,\n componentOf: [\n 'outline'\n ],\n defaultValue: 'none'\n },\n 'outline-width': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'outline'\n ],\n defaultValue: 'medium',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'overflow': {\n canOverride: canOverride.property.overflow,\n defaultValue: 'visible'\n },\n 'overflow-x': {\n canOverride: canOverride.property.overflow,\n defaultValue: 'visible'\n },\n 'overflow-y': {\n canOverride: canOverride.property.overflow,\n defaultValue: 'visible'\n },\n 'padding': {\n breakUp: breakUp.fourValues,\n canOverride: canOverride.generic.components([\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit,\n canOverride.generic.unit\n ]),\n components: [\n 'padding-top',\n 'padding-right',\n 'padding-bottom',\n 'padding-left'\n ],\n defaultValue: '0',\n propertyOptimizer: propertyOptimizers.padding,\n restore: restore.fourValues,\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'padding-bottom': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-top',\n propertyOptimizer: propertyOptimizers.padding,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'padding-left': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-right',\n propertyOptimizer: propertyOptimizers.padding,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'padding-right': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-left',\n propertyOptimizer: propertyOptimizers.padding,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'padding-top': {\n canOverride: canOverride.generic.unit,\n componentOf: [\n 'padding'\n ],\n defaultValue: '0',\n oppositeTo: 'padding-bottom',\n propertyOptimizer: propertyOptimizers.padding,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'position': {\n canOverride: canOverride.property.position,\n defaultValue: 'static'\n },\n 'right': {\n canOverride: canOverride.property.right,\n defaultValue: 'auto',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'row-gap': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'src': {\n valueOptimizers: [\n valueOptimizers.urlWhiteSpace,\n valueOptimizers.urlPrefix,\n valueOptimizers.urlQuotes\n ]\n },\n 'stroke-width': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'text-align': {\n canOverride: canOverride.property.textAlign,\n // NOTE: we can't tell the real default value here, as it depends on default text direction\n // this is a hack, but it doesn't matter because this value will be either overridden or\n // it will disappear anyway\n defaultValue: 'left|right'\n },\n 'text-decoration': {\n canOverride: canOverride.property.textDecoration,\n defaultValue: 'none'\n },\n 'text-indent': {\n canOverride: canOverride.property.textOverflow,\n defaultValue: 'none',\n valueOptimizers: [\n valueOptimizers.fraction,\n valueOptimizers.zero\n ]\n },\n 'text-overflow': {\n canOverride: canOverride.property.textOverflow,\n defaultValue: 'none'\n },\n 'text-shadow': {\n canOverride: canOverride.property.textShadow,\n defaultValue: 'none',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.zero,\n valueOptimizers.color\n ]\n },\n 'top': {\n canOverride: canOverride.property.top,\n defaultValue: 'auto',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'transform': {\n canOverride: canOverride.property.transform,\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.degrees,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ],\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition': {\n breakUp: breakUp.multiplex(breakUp.transition),\n canOverride: canOverride.generic.components([\n canOverride.property.transitionProperty,\n canOverride.generic.time,\n canOverride.generic.timingFunction,\n canOverride.generic.time\n ]),\n components: [\n 'transition-property',\n 'transition-duration',\n 'transition-timing-function',\n 'transition-delay'\n ],\n defaultValue: 'none',\n restore: restore.multiplex(restore.withoutDefaults),\n shorthand: true,\n valueOptimizers: [\n valueOptimizers.time,\n valueOptimizers.fraction\n ],\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-delay': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'transition'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n valueOptimizers: [\n valueOptimizers.time\n ],\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-duration': {\n canOverride: canOverride.generic.time,\n componentOf: [\n 'transition'\n ],\n defaultValue: '0s',\n intoMultiplexMode: 'real',\n keepUnlessDefault: 'transition-delay',\n valueOptimizers: [\n valueOptimizers.time,\n valueOptimizers.fraction\n ],\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-property': {\n canOverride: canOverride.generic.propertyName,\n componentOf: [\n 'transition'\n ],\n defaultValue: 'all',\n intoMultiplexMode: 'placeholder',\n placeholderValue: '_', // it's a short value that won't match any property and still be a valid `transition-property`\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'transition-timing-function': {\n canOverride: canOverride.generic.timingFunction,\n componentOf: [\n 'transition'\n ],\n defaultValue: 'ease',\n intoMultiplexMode: 'real',\n vendorPrefixes: [\n '-moz-',\n '-ms-',\n '-o-',\n '-webkit-'\n ]\n },\n 'vertical-align': {\n canOverride: canOverride.property.verticalAlign,\n defaultValue: 'baseline',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'visibility': {\n canOverride: canOverride.property.visibility,\n defaultValue: 'visible'\n },\n '-webkit-tap-highlight-color': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.color\n ]\n },\n '-webkit-margin-end': {\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'white-space': {\n canOverride: canOverride.property.whiteSpace,\n defaultValue: 'normal'\n },\n 'width': {\n canOverride: canOverride.generic.unit,\n defaultValue: 'auto',\n shortestValue: '0',\n valueOptimizers: [\n valueOptimizers.whiteSpace,\n valueOptimizers.fraction,\n valueOptimizers.precision,\n valueOptimizers.unit,\n valueOptimizers.zero\n ]\n },\n 'z-index': {\n canOverride: canOverride.property.zIndex,\n defaultValue: 'auto'\n }\n};\n\n// generate vendor-prefixed configuration\nvar vendorPrefixedConfiguration = {};\n\nfunction cloneDescriptor(propertyName, prefix) {\n var clonedDescriptor = override(configuration[propertyName], {});\n\n if ('componentOf' in clonedDescriptor) {\n clonedDescriptor.componentOf = clonedDescriptor.componentOf.map(function (shorthandName) {\n return prefix + shorthandName;\n });\n }\n\n if ('components' in clonedDescriptor) {\n clonedDescriptor.components = clonedDescriptor.components.map(function (longhandName) {\n return prefix + longhandName;\n });\n }\n\n if ('keepUnlessDefault' in clonedDescriptor) {\n clonedDescriptor.keepUnlessDefault = prefix + clonedDescriptor.keepUnlessDefault;\n }\n\n return clonedDescriptor;\n}\n\nvar vendorPrefixedConfiguration = {};\n\nfor (var propertyName in configuration) {\n var descriptor = configuration[propertyName];\n\n if (!('vendorPrefixes' in descriptor)) {\n continue;\n }\n\n for (var i = 0; i < descriptor.vendorPrefixes.length; i++) {\n var prefix = descriptor.vendorPrefixes[i];\n var clonedDescriptor = cloneDescriptor(propertyName, prefix);\n delete clonedDescriptor.vendorPrefixes;\n\n vendorPrefixedConfiguration[prefix + propertyName] = clonedDescriptor;\n }\n\n delete descriptor.vendorPrefixes;\n}\n\nmodule.exports = override(configuration, vendorPrefixedConfiguration);\n","var emptyCharacter = '';\n\nvar Breaks = require('../options/format').Breaks;\nvar Spaces = require('../options/format').Spaces;\n\nvar Marker = require('../tokenizer/marker');\nvar Token = require('../tokenizer/token');\n\nfunction supportsAfterClosingBrace(token) {\n return token[1][1] == 'background' || token[1][1] == 'transform' || token[1][1] == 'src';\n}\n\nfunction afterClosingBrace(token, valueIndex) {\n return token[valueIndex][1][token[valueIndex][1].length - 1] == Marker.CLOSE_ROUND_BRACKET;\n}\n\nfunction afterComma(token, valueIndex) {\n return token[valueIndex][1] == Marker.COMMA;\n}\n\nfunction afterSlash(token, valueIndex) {\n return token[valueIndex][1] == Marker.FORWARD_SLASH;\n}\n\nfunction beforeComma(token, valueIndex) {\n return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.COMMA;\n}\n\nfunction beforeSlash(token, valueIndex) {\n return token[valueIndex + 1] && token[valueIndex + 1][1] == Marker.FORWARD_SLASH;\n}\n\nfunction inFilter(token) {\n return token[1][1] == 'filter' || token[1][1] == '-ms-filter';\n}\n\nfunction disallowsSpace(context, token, valueIndex) {\n return !context.spaceAfterClosingBrace && supportsAfterClosingBrace(token) && afterClosingBrace(token, valueIndex) ||\n beforeSlash(token, valueIndex) ||\n afterSlash(token, valueIndex) ||\n beforeComma(token, valueIndex) ||\n afterComma(token, valueIndex);\n}\n\nfunction rules(context, tokens) {\n var store = context.store;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n store(context, tokens[i]);\n\n if (i < l - 1) {\n store(context, comma(context));\n }\n }\n}\n\nfunction body(context, tokens) {\n var lastPropertyAt = lastPropertyIndex(tokens);\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n property(context, tokens, i, lastPropertyAt);\n }\n}\n\nfunction lastPropertyIndex(tokens) {\n var index = tokens.length - 1;\n\n for (; index >= 0; index--) {\n if (tokens[index][0] != Token.COMMENT) {\n break;\n }\n }\n\n return index;\n}\n\nfunction property(context, tokens, position, lastPropertyAt) {\n var store = context.store;\n var token = tokens[position];\n\n var propertyValue = token[2];\n var isPropertyBlock = propertyValue && propertyValue[0] === Token.PROPERTY_BLOCK;\n\n var needsSemicolon;\n if ( context.format ) {\n if ( context.format.semicolonAfterLastProperty || isPropertyBlock ) {\n needsSemicolon = true;\n } else if ( position < lastPropertyAt ) {\n needsSemicolon = true;\n } else {\n needsSemicolon = false;\n }\n } else {\n needsSemicolon = position < lastPropertyAt || isPropertyBlock;\n }\n\n var isLast = position === lastPropertyAt;\n\n switch (token[0]) {\n case Token.AT_RULE:\n store(context, token);\n store(context, semicolon(context, Breaks.AfterProperty, false));\n break;\n case Token.AT_RULE_BLOCK:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterRuleBegins, true));\n body(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));\n break;\n case Token.COMMENT:\n store(context, token);\n store(context, breakFor(context, Breaks.AfterComment) + context.indentWith);\n break;\n case Token.PROPERTY:\n store(context, token[1]);\n store(context, colon(context));\n if (propertyValue) {\n value(context, token);\n }\n store(context, needsSemicolon ? semicolon(context, Breaks.AfterProperty, isLast) : emptyCharacter);\n break;\n case Token.RAW:\n store(context, token);\n }\n}\n\nfunction value(context, token) {\n var store = context.store;\n var j, m;\n\n if (token[2][0] == Token.PROPERTY_BLOCK) {\n store(context, openBrace(context, Breaks.AfterBlockBegins, false));\n body(context, token[2][1]);\n store(context, closeBrace(context, Breaks.AfterBlockEnds, false, true));\n } else {\n for (j = 2, m = token.length; j < m; j++) {\n store(context, token[j]);\n\n if (j < m - 1 && (inFilter(token) || !disallowsSpace(context, token, j))) {\n store(context, Marker.SPACE);\n }\n }\n }\n}\n\nfunction breakFor(context, where) {\n return context.format ? context.format.breaks[where] : emptyCharacter;\n}\n\nfunction allowsSpace(context, where) {\n return context.format && context.format.spaces[where];\n}\n\nfunction openBrace(context, where, needsPrefixSpace) {\n if (context.format) {\n context.indentBy += context.format.indentBy;\n context.indentWith = context.format.indentWith.repeat(context.indentBy);\n return (needsPrefixSpace && allowsSpace(context, Spaces.BeforeBlockBegins) ? Marker.SPACE : emptyCharacter) +\n Marker.OPEN_CURLY_BRACKET +\n breakFor(context, where) +\n context.indentWith;\n } else {\n return Marker.OPEN_CURLY_BRACKET;\n }\n}\n\nfunction closeBrace(context, where, beforeBlockEnd, isLast) {\n if (context.format) {\n context.indentBy -= context.format.indentBy;\n context.indentWith = context.format.indentWith.repeat(context.indentBy);\n return (beforeBlockEnd ? breakFor(context, Breaks.BeforeBlockEnds) : breakFor(context, Breaks.AfterProperty)) +\n context.indentWith +\n Marker.CLOSE_CURLY_BRACKET +\n (isLast ? emptyCharacter : breakFor(context, where) + context.indentWith);\n } else {\n return Marker.CLOSE_CURLY_BRACKET;\n }\n}\n\nfunction colon(context) {\n return context.format ?\n Marker.COLON + (allowsSpace(context, Spaces.BeforeValue) ? Marker.SPACE : emptyCharacter) :\n Marker.COLON;\n}\n\nfunction semicolon(context, where, isLast) {\n return context.format ?\n Marker.SEMICOLON + (isLast ? emptyCharacter : (breakFor(context, where) + context.indentWith)) :\n Marker.SEMICOLON;\n}\n\nfunction comma(context) {\n return context.format ?\n Marker.COMMA + breakFor(context, Breaks.BetweenSelectors) + context.indentWith :\n Marker.COMMA;\n}\n\nfunction all(context, tokens) {\n var store = context.store;\n var token;\n var isLast;\n var i, l;\n\n for (i = 0, l = tokens.length; i < l; i++) {\n token = tokens[i];\n isLast = i == l - 1;\n\n switch (token[0]) {\n case Token.AT_RULE:\n store(context, token);\n store(context, semicolon(context, Breaks.AfterAtRule, isLast));\n break;\n case Token.AT_RULE_BLOCK:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterRuleBegins, true));\n body(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));\n break;\n case Token.NESTED_BLOCK:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterBlockBegins, true));\n all(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterBlockEnds, true, isLast));\n break;\n case Token.COMMENT:\n store(context, token);\n store(context, breakFor(context, Breaks.AfterComment) + context.indentWith);\n break;\n case Token.RAW:\n store(context, token);\n break;\n case Token.RULE:\n rules(context, token[1]);\n store(context, openBrace(context, Breaks.AfterRuleBegins, true));\n body(context, token[2]);\n store(context, closeBrace(context, Breaks.AfterRuleEnds, false, isLast));\n break;\n }\n }\n}\n\nmodule.exports = {\n all: all,\n body: body,\n property: property,\n rules: rules,\n value: value\n};\n","var helpers = require('./helpers');\n\nfunction store(serializeContext, token) {\n serializeContext.output.push(typeof token == 'string' ? token : token[1]);\n}\n\nfunction context() {\n var newContext = {\n output: [],\n store: store\n };\n\n return newContext;\n}\n\nfunction all(tokens) {\n var oneTimeContext = context();\n helpers.all(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nfunction body(tokens) {\n var oneTimeContext = context();\n helpers.body(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nfunction property(tokens, position) {\n var oneTimeContext = context();\n helpers.property(oneTimeContext, tokens, position, true);\n return oneTimeContext.output.join('');\n}\n\nfunction rules(tokens) {\n var oneTimeContext = context();\n helpers.rules(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nfunction value(tokens) {\n var oneTimeContext = context();\n helpers.value(oneTimeContext, tokens);\n return oneTimeContext.output.join('');\n}\n\nmodule.exports = {\n all: all,\n body: body,\n property: property,\n rules: rules,\n value: value\n};\n","var sortSelectors = require('./sort-selectors');\nvar tidyRules = require('./tidy-rules');\nvar tidyBlock = require('./tidy-block');\nvar tidyAtRule = require('./tidy-at-rule');\n\nvar Hack = require('../hack');\nvar removeUnused = require('../remove-unused');\nvar restoreFromOptimizing = require('../restore-from-optimizing');\nvar wrapForOptimizing = require('../wrap-for-optimizing').all;\n\nvar configuration = require('../configuration');\nvar optimizers = require('./value-optimizers');\n\nvar OptimizationLevel = require('../../options/optimization-level').OptimizationLevel;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nvar formatPosition = require('../../utils/format-position');\n\nvar serializeRules = require('../../writer/one-time').rules;\n\nvar CHARSET_TOKEN = '@charset';\nvar CHARSET_REGEXP = new RegExp('^' + CHARSET_TOKEN, 'i');\n\nvar DEFAULT_ROUNDING_PRECISION = require('../../options/rounding-precision').DEFAULT;\n\nvar PROPERTY_NAME_PATTERN = /^(?:\\-chrome\\-|\\-[\\w\\-]+\\w|\\w[\\w\\-]+\\w|\\w{1,}|\\-\\-\\S+)$/;\nvar IMPORT_PREFIX_PATTERN = /^@import/i;\nvar URL_PREFIX_PATTERN = /^url\\(/i;\nvar VARIABLE_NAME_PATTERN = /^--\\S+$/;\n\nfunction startsAsUrl(value) {\n return URL_PREFIX_PATTERN.test(value);\n}\n\nfunction isImport(token) {\n return IMPORT_PREFIX_PATTERN.test(token[1]);\n}\n\nfunction isLegacyFilter(property) {\n var value;\n\n if (property.name == 'filter' || property.name == '-ms-filter') {\n value = property.value[0][1];\n\n return value.indexOf('progid') > -1 ||\n value.indexOf('alpha') === 0 ||\n value.indexOf('chroma') === 0;\n } else {\n return false;\n }\n}\n\nfunction noop() {}\n\nfunction optimizeBody(rule, properties, context) {\n var options = context.options;\n var valueOptimizers;\n var property, name, type, value;\n var propertyToken;\n var propertyOptimizer;\n var serializedRule = serializeRules(rule);\n var _properties = wrapForOptimizing(properties);\n var pluginValueOptimizers = context.options.plugins.level1Value;\n var pluginPropertyOptimizers = context.options.plugins.level1Property;\n var i, l;\n\n propertyLoop:\n for (i = 0, l = _properties.length; i < l; i++) {\n var j, k, m, n;\n\n property = _properties[i];\n name = property.name;\n propertyOptimizer = configuration[name] && configuration[name].propertyOptimizer || noop;\n valueOptimizers = configuration[name] && configuration[name].valueOptimizers || [optimizers.whiteSpace];\n\n if (!PROPERTY_NAME_PATTERN.test(name)) {\n propertyToken = property.all[property.position];\n context.warnings.push('Invalid property name \\'' + name + '\\' at ' + formatPosition(propertyToken[1][2][0]) + '. Ignoring.');\n property.unused = true;\n continue;\n }\n\n if (property.value.length === 0) {\n propertyToken = property.all[property.position];\n context.warnings.push('Empty property \\'' + name + '\\' at ' + formatPosition(propertyToken[1][2][0]) + '. Ignoring.');\n property.unused = true;\n continue;\n }\n\n if (property.hack && (\n (property.hack[0] == Hack.ASTERISK || property.hack[0] == Hack.UNDERSCORE) && !options.compatibility.properties.iePrefixHack ||\n property.hack[0] == Hack.BACKSLASH && !options.compatibility.properties.ieSuffixHack ||\n property.hack[0] == Hack.BANG && !options.compatibility.properties.ieBangHack)) {\n property.unused = true;\n continue;\n }\n\n if (!options.compatibility.properties.ieFilters && isLegacyFilter(property)) {\n property.unused = true;\n continue;\n }\n\n if (property.block) {\n optimizeBody(rule, property.value[0][1], context);\n continue;\n }\n\n if (VARIABLE_NAME_PATTERN.test(name)) {\n continue;\n }\n\n valuesLoop:\n for (j = 0, m = property.value.length; j < m; j++) {\n type = property.value[j][0];\n value = property.value[j][1];\n\n if (type == Token.PROPERTY_BLOCK) {\n property.unused = true;\n context.warnings.push('Invalid value token at ' + formatPosition(value[0][1][2][0]) + '. Ignoring.');\n break;\n }\n\n if (startsAsUrl(value) && !context.validator.isUrl(value)) {\n property.unused = true;\n context.warnings.push('Broken URL \\'' + value + '\\' at ' + formatPosition(property.value[j][2][0]) + '. Ignoring.');\n break;\n }\n\n for (k = 0, n = valueOptimizers.length; k < n; k++) {\n value = valueOptimizers[k](name, value, options);\n }\n\n for (k = 0, n = pluginValueOptimizers.length; k < n; k++) {\n value = pluginValueOptimizers[k](name, value, options);\n }\n\n property.value[j][1] = value;\n }\n\n propertyOptimizer(serializedRule, property, options);\n\n for (j = 0, m = pluginPropertyOptimizers.length; j < m; j++) {\n pluginPropertyOptimizers[j](serializedRule, property, options);\n }\n }\n\n restoreFromOptimizing(_properties);\n removeUnused(_properties);\n removeComments(properties, options);\n}\n\nfunction removeComments(tokens, options) {\n var token;\n var i;\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n if (token[0] != Token.COMMENT) {\n continue;\n }\n\n optimizeComment(token, options);\n\n if (token[1].length === 0) {\n tokens.splice(i, 1);\n i--;\n }\n }\n}\n\nfunction optimizeComment(token, options) {\n if (token[1][2] == Marker.EXCLAMATION && (options.level[OptimizationLevel.One].specialComments == 'all' || options.commentsKept < options.level[OptimizationLevel.One].specialComments)) {\n options.commentsKept++;\n return;\n }\n\n token[1] = [];\n}\n\nfunction cleanupCharsets(tokens) {\n var hasCharset = false;\n\n for (var i = 0, l = tokens.length; i < l; i++) {\n var token = tokens[i];\n\n if (token[0] != Token.AT_RULE)\n continue;\n\n if (!CHARSET_REGEXP.test(token[1]))\n continue;\n\n if (hasCharset || token[1].indexOf(CHARSET_TOKEN) == -1) {\n tokens.splice(i, 1);\n i--;\n l--;\n } else {\n hasCharset = true;\n tokens.splice(i, 1);\n tokens.unshift([Token.AT_RULE, token[1].replace(CHARSET_REGEXP, CHARSET_TOKEN)]);\n