diff options
Diffstat (limited to 'node_modules/autoprefixer')
141 files changed, 54772 insertions, 0 deletions
diff --git a/node_modules/autoprefixer/CHANGELOG.md b/node_modules/autoprefixer/CHANGELOG.md new file mode 100644 index 0000000..93ce0a5 --- /dev/null +++ b/node_modules/autoprefixer/CHANGELOG.md @@ -0,0 +1,935 @@ +# Change Log +This project adheres to [Semantic Versioning](http://semver.org/). + +## 9.6.4 +* Now the real fix for `'startsWith' of undefined` error. + +## 9.6.3 +* Fix `Cannot read property 'startsWith' of undefined` error. + +## 9.6.2 +* Fix false `Replace fill to stretch` warning. + +## 9.6.1 +* Fix `-webkit-line-clamp` truncating multi-line text support. + +## 9.6 “Nunc id vides, nunc ne vides” +* Show warning about Browserslist config on `browser` option. +* Add warning-less `overrideBrowserslist` option. +* Add `text-orientation` support. +* Add `min-resolution: 2x` alias support. +* Add `.github/CONTRIBUTING.md` (by Juan Martin Marco). + +## 9.5.1 +* Fix `backdrop-filter` for Edge (by Oleh Aloshkin). +* Fix `min-resolution` media query support in Firefox < 16. + +## 9.5 “Draco dormiens nunquam titillandus” +* Add `mask-composite` support (by Semen Levenson). + +## 9.4.10 +* Add warning for named Grid rows. + +## 9.4.9 +* Fix `grid-template` and `@media` case (by Bogdan Dolin). + +## 9.4.8 +* Fix `calc()` support in Grid gap. + +## 9.4.7 +* Fix infinite loop on mismatched parens. + +## 9.4.6 +* Fix warning text (by Albert Juhé Lluveras). + +## 9.4.5 +* Fix `text-decoration-skip-ink` support. + +## 9.4.4 +* Use `direction` value for `-ms-writing-mode` (by Denys Kniazevych). +* Fix warning text (by @zzzzBov). + +## 9.4.3 +* Add warning to force `flex-start` instead of `start` (by Antoine du Hamel). +* Fix docs (by Christian Oliff). + +## 9.4.2 +* Fix Grid autoplacement warning. + +## 9.4.1 +* Fix unnecessary Flexbox prefixes in Grid elements. + +## 9.4 “Advance Australia” +* Add Grid autoplacement for `-ms-` (by Bogdan Dolin). +* Improve docs and warnings (by Daniel Tonon). +* Remove some unnecessary warnings for Grid (by Andrey Alexandrov). + +## 9.3.1 +* Fix Grid prefixes with `repeat()` value (by Bogdan Dolin). + +## 9.3 “Labor omnia vincit” +* Add `place-self` support (by Bogdan Dolin). +* Fix Grid row/column span inheritance bug (by Bogdan Dolin). + +## 9.2.1 +* Fix broken AST. + +## 9.2 “Onyi est glavnaya krepost” +* Add `/* autoprefixer grid: on */` control comment (by Andrey Alexandrov). +* Add duplicate `grid-area` support (by Bogdan Dolin). +* Fix `grid-gap` support for rules with different specifity (by Bogdan Dolin). +* Disable Grid in `@supports` at-rule with non-supported Grid features. +* Improve Grid warnings (by Daniel Tonon). +* Improve docs (by Joshua Hall, Mat Gadd, Roy Revelt, and Ivan). + +## 9.1.5 +* Remove `@babel/register` from dependencies. + +## 9.1.4 +* Use Babel 7. + +## 9.1.3 +* Sort properties in `autoprefixer --info` alphabetically. +* Fix old Firefox gradient prefix. + +## 9.1.2 +* Fix `autoprefixer --info` in new Node.js. + +## 9.1.1 +* Retain `grid-gap` through `@media` (by Bogdan Dolin). +* Fix `grid-template` and `@media` (by Bogdan Dolin). +* Fix Grid areas searching error (by Bogdan Dolin). +* Fix `span X` Grid prefix (by Bogdan Dolin). +* Fix docs (by Eduard Kyvenko). + +## 9.1 “Equality before the law” +* Add `background-clip: text` support. +* Fix adding Grid span for IE (by Bogdan Dolin). + +## 9.0.2 +* Show warning on Grid area names conflict (by Bogdan Dolin). +* Fix documentation (by Sven Wagner). + +## 9.0.1 +* Fix nested at-rules in Grid prefixes (by Ivan Malov). + +## 9.0 “A Mari Usque Ad Mare” +* Remove Node.js 9 and Node.js 4 support. +* Remove IE and “dead” browsers from Babel. +* Use PostCSS 7.0. +* Use Browserslist 4.0. + +## 8.6.5 +* Do not show Grid warnings if IE was not selected. + +## 8.6.4 +* Fix `stretch` prefix in Chrome >= 46. + +## 8.6.3 +* Add warnings for unsupported Grid features. +* Add warnings about wrong Grid properties. +* Add note about `grid` option for grid properties in `autoprefixer --info`. + +## 8.6.2 +* Fix error during adding Grid prefixes in `@media` (by Evgeny Petukhov). + +## 8.6.1 +* Fix `grid-template` with media queries (by Evgeny Petukhov). + +## 8.6 “Follow Reason” +* Add `gap` support (by Evgeny Petukhov). +* Add two values support for `grid-gap` and `gap` (by Evgeny Petukhov). +* Add `ignoreUnknownVersions` option for Browserslist. + +## 8.5.2 +* Fix `grid-template` support wit auto row sizes (by Yury Timofeev). + +## 8.5.1 +* Remove unnecessary warning on `-webkit-fill-available`. + +## 8.5 “Muito Nobre e Sempre Leal” +* Add `grid-gap` support (by Evgeny Petukhov). +* Fix radial gradients direction fix. +* Fix docs (by Phani Kandula and Huáng Jùnliàng). + +## 8.4.1 +* Fix working in old PostCSS versions (by Diablohu). + +## 8.4 “Non in aves, sed in angues” +* Add `/* autoprefixer: ignore next */` control comment (by Pavel Vostrikov). + +## 8.3 “Benigno Numine” +* Add `@media` support to `grid-template` (by Evgeny Petukhov). +* Fix `radial-gradient` direction warning (by Gustavo Real). + +## 8.2 “Ad Astra per Aspera” +* Add `color-adjust` (by Sergey Lysenko, Stanislav Botev, and Yuriy Alekseyev). + +## 8.1 “Rex, Familia et Ultio” +* Add `overscroll-behavior` support. +* Add `grid-template` shortcut support (by Evgeny Petukhov). +* Add better `grid-column-end` and `grid-row-end` support (by Evgeny Petukhov). +* Fix Grid properties support in `@supports`. + +## 8.0 “Excelsior” +* Use Browserslist 3.0. +* Rename `autoprefixer-info` CLI tool to `autoprefixer --info`. +* Remove `break-*` to `page-break-*` conversion for Firefox. + +## 7.2.6 +* Fix `-ms-` prefix for grid cells with same `grid-area` (by Evgeny Petukhov). + +## 7.2.5 +* Fix multiple prefixes in declaration value. + +## 7.2.4 +* Fix IE 10 support. + +## 7.2.3 +* Fix `grid-template-areas` in `@media` (by Evgeny Petukhov). + +## 7.2.2 +* Fix `_autoprefixerDisabled is undefined` issue. + +## 7.2.1 +* Fix IE and other old JS runtimes support. + +## 7.2 “Ordem e Progresso” +* Add `grid-template-areas` support (by Evgeny Petukhov). +* Add `grid-template` support (by Evgeny Petukhov). +* Add `grid-area` support (by Alexey Komarov). +* Add `autoprefixer-info` CLI tool. +* Add wrong `radial-gradient` properties warning. +* Use current working dir on missed `from` in `info()` (by Phil Dokas). +* Fix `grid-row` and `grid-column` support (by Alexey Komarov). +* Do not prefix `reverse` animation direction. +* Improve test coverage (by Dmitry Semigradsky). + +## 7.1.6 +* Add warning for using `browserslist` option instead of `browsers`. +* Add warning for multiple control comments in the same scope. +* Fix `Invalid array length` error during indent changes. + +## 7.1.5 +* Fix `::placeholder` prefix for Edge. +* Fix `inherit`/`initial`/`unset` values for `flex-direction`. +* Fix RegExp usage in gradients (by Yet Another Minion). + +## 7.1.4 +* Fix `radial-gradient` direction conversion. +* Fix `image-set` in `cursor`. + +## 7.1.3 +* Add warning for old `radial-gradient` direction syntax. + +## 7.1.2 +* Fix `text-decoration` shortcut support. + +## 7.1.1 +* Remove non-`-webkit-` intrinsic prefixes in Grid Layout (by 一丝). + +## 7.1 “Universitas litterarum” +* Add `unicode-bidi` support. +* Add `-webkit-appearance` support for Edge. +* Add `from` option to `info()`. +* Fix intrinsic widths prefixes in Grid Layout. + +## 7.0.1 +* Fix Autoprefixer for old JS runtimes. + +## 7.0 “Coelestem adspicit lucem” +* Remove node.js 0.12 support. +* Use PostCSS 6.0. +* Use Browserslist 2. +* Use `caniuse-lite` instead of `caniuse-db` (by Ben Briggs). +* Use `^` for Browserslist dependencies, instead of `~`. +* Rewrite project from CoffeeScript to Babel (by Dmitry Semigradsky). +* Disable Grid Layout prefixes for IE by default. +* Fix `-ms-grid-column-align`. +* Move tests to Jest. + +## 6.7.7 +* Fix `order` for non-digit values. + +## 6.7.6 +* Fix `font-kerning` (by Chi Vinh Le). + +## 6.7.5 +* Fix `text-decoration-skip` in iOS (by Chi Vinh Le). +* Fix `clip-path` (by Chi Vinh Le). + +## 6.7.4 +* Improve `browsers` option perfomance. +* Update CoffeeScript compiler. + +## 6.7.3 +* Fix compatibility with “Intrinsic & Extrinsic Sizing” spec update. + +## 6.7.2 +* Do not prefix grid/flexbox in `@supports` on `grid: false`/`flexbox: false`. + +## 6.7.1 +* Update Browserslist with `last n version` fix. + +## 6.7 “Krungthep doot thep saang” +* Add Electron support in browsers list (by Kilian Valkhof). +* Add `flex-flow` partial support for Flexbox 2009 specification. +* Fix browsers `0` version issue in some Can I Use data. + +## 6.6.1 +* Add metadata to use Autoprefixer in JSS tests (by Chi Vinh Le). + +## 6.6 “Kaiyuan” +* Add `browserslist` key in `package.json` support. +* Add support for separated environments in browserslist config. +* Add `browserslist-stats.json` file support to load custom usage statistics. + +## 6.5.4 +* Fix unitless 0 basis in IE10/IE11 shorthand flex (by Google). + +## 6.5.3 +* Add error for popular mistake with `browser` option instead of `browsers`. + +## 6.5.2 +* Clean prefixes data (by Reinaldo Schiehll). + +## 6.5.1 +* Fix selectors with `:--` prefix support. + +## 6.5 “Einigkeit und Recht und Freiheit” +* Add `defaults` keyword to browsers requirements. +* Fix CSS Grid Layout support. +* Fix `align-self` cleaning. + +## 6.4.1 +* Fix node cloning after some PostCSS plugins. + +## 6.4 “Hic et ubique terrarum” +* Add `:any-link` selector support. +* Add `text-decoration-skip` support. +* Add `transition: duration property` support. +* Fix `-webkit-` prefix for `backface-visibility`. +* Fix `rad` unit support in gradients (by 刘祺). +* Fix `transition` support in Opera 12. +* Removed Safari TP Grid prefixes support. + +## 6.3.7 +* Fix rare `Cannot read property 'constructor' of null` issue. + +## 6.3.6 +* Add Safari TP prefix support for Grid Layout. + +## 6.3.5 +* Fix duplicate prefixes for `-ms-interpolation-mode`. + +## 6.3.4 +* Show users coverage for selected browsers in `info()`. + +## 6.3.3 +* Fix transition warning. + +## 6.3.2 +* Fix jspm support (by Sean Anderson). + +## 6.3.1 +* Fix compatibility with Flexibility polyfill. + +## 6.3 “Pro rege et lege” +* Add Grid Layout support. +* Add `text-spacing` support. +* Add `> 10% in my stats` browsers query with custom usage statistics. +* Add options to disable `@supports`, Flexbox or Grid support. +* Fix compatibility with other PostCSS plugins. + +## 6.2.3 +* Fix error on broken transition with double comma. + +## 6.2.2 +* Fix issues in broken transitions. + +## 6.2.1 +* Fix AST error in transition warning (by @jvdanilo). + +## 6.2 “Fluctuat nec mergitur” +* Use `fill` instead of `fill-available` according spec changes (by 一丝). +* Add `fill` support for logical dimension properties (by 一丝). +* Add `text-emphasis` support (by 一丝). +* Add prefixes to `@supports` only for compatible browsers. +* Add `rad`, `grad` and `turn` units support to linear gradients. +* Add some `deg` directions support for old WebKit linear gradients. +* Fix `@supports` parenthesis (by @heady). +* Add warning when prefixes could not be generated + for complicated `transition-property` values. +* Add warning for outdated `fill-available` value. +* Add warning for wrong `text-emphasis-position` value. +* Add “time capsule” warning for prefix-less future. +* Normalizes all warning messages. + +## 6.1.2 +* Fix gradient hack on some parameters (by Alexey Efremov). + +## 6.1.1 +* Fix `cursor: grab` and `cursor: grabbing` support. + +## 6.1 “Bil-shaʿb wa lil-shaʿb” +* Change `transition` support to output more robust CSS. +* Add `:read-only` support. +* Add support for `appearance` with any values. +* Add CSS-in-JS support via `postcss-js`. +* Add loud `/*! autoprefixer: off */` control comments support. +* Convert `rotateZ` to `rotate` for `-ms-transform`. +* Use `postcss-value-parser` to carefully work with gradients. +* Remove `-ms-transform-style` and `-o-transform-style` that never existed. + +## 6.0.3 +* Fix old gradient direction warning. + +## 6.0.2 +* Remove unnecessary `-khtml-` prefix too. + +## 6.0.1 +* Fix `cross-fade()` support (by 一丝). + +## 6.0 “Eureka” +* CLI was removed from `autoprefixer` package to `autoprefixer-cli`. +* `autoprefixer-core` and `autoprefixer` packages was merged back. +* Remove `autoprefixer(opt).process(css)`, use `autoprefixer.process(css, opt)`. +* Remove `safe` option. Use separated Safe parser from PostCSS. +* Remove Opera 12.1 from default query. +* Use PostCSS 5.0 API. +* Add custom syntaxes support. +* Add `image-set` support (by 一丝). +* Add `mask-border` support (by 一丝). +* Add `filter()` function support (by Vincent De Oliveira). +* Add `backdrop-filter` support (by Vincent De Oliveira). +* Add `element()` support (by Vincent De Oliveira). +* Add CSS Regions support. +* Add Scroll Snap Points support. +* Add `writing-mode` support. +* Add `::backdrop` support. +* Add `cross-fade()` support. +* Add other `break-` properties support. +* Add Microsoft Edge support (by Andrey Polischuk). +* Add `not` keyword and exclude browsers by query. +* Add version ranges `IE 6-9` (by Ben Briggs). +* Fix `filter` in `transition` support on Safari. +* Fix `url()` parsing. +* Fix `pixelated` cleaning. +* Always show old gradient direction warning. + +## 5.2.1 +* Fix parent-less node issue on some cases (by Josh Gillies). + +## 5.2 “Dont tread on me” +* Add `appearance` support. +* Warn users on old gradient direction or flexbox syntax. +* Add `add: false` option to disable new prefixes adding. +* Make Autoprefixer 30% faster. +* Use PostCSS 4.1 plugin API. +* Add prefixes for `pixelated` instead of `crisp-edges` in `image-rendering`. +* Do not add `::placeholder` prefixes for `:placeholder-shown`. +* Fix `text-decoration` prefixes. +* `autoprefixer.process()` was deprecated. Use PostCSS API. + +## 5.1.11 +* Update `num2fraction` to fix resolution media query (by 一丝). + +## 5.1.10 +* Do not generate `-webkit-image-rendering`. + +## 5.1.9 +* Fix DynJS compatibility (by Nick Howes). + +## 5.1.8 +* Fix gradients in `mask` and `mask-image` properties. +* Fix old webkit prefix on some unsupported gradients. + +## 5.1.7 +* Fix placeholder selector (by Vincent De Oliveira). + +## 5.1.6 +* Use official `::placeholder-shown` selector (by Vincent De Oliveira). + +## 5.1.5 +* Add transition support for CSS Masks properties. + +## 5.1.4 +* Use `-webkit-` prefix for Opera Mobile 24. + +## 5.1.3 +* Add IE support for `image-rendering: crisp-edges`. + +## 5.1.2 +* Add never existed `@-ms-keyframes` to common mistake. + +## 5.1.1 +* Safer value split in `flex` hack. + +## 5.1 “Jianyuan” +* Add support for resolution media query (by 一丝). +* Higher accuracy while removing prefixes in values. +* Add support for logical properties (by 一丝). +* Add `@viewport` support. +* Add `text-overflow` support (by 一丝). +* Add `text-emphasis` support (by 一丝). +* Add `image-rendering: crisp-edges` support. +* Add `text-align-last` support. +* Return `autoprefixer.defaults` as alias to current `browserslist.defaults`. +* Save code style while adding prefixes to `@keyframes` and `@viewport`. +* Do not remove `-webkit-background-clip` with non-spec `text` value. +* Fix `-webkit-filter` in `transition`. +* Better support for browser versions joined on Can I Use + like `ios_saf 7.0-7.1` (by Vincent De Oliveira). +* Fix compatibility with `postcss-import` (by Jason Kuhrt). +* Fix Flexbox prefixes for BlackBerry and UC Browser. +* Fix gradient prefixes for old Chrome. + +## 5.0 “Pravda vítězí” +* Use PostCSS 4.0. +* Use Browserslist to parse browsers queries. +* Use global `browserslist` config. +* Add `> 5% in US` query to select browsers by usage in some country. +* Add `object-fit` and `object-position` properties support. +* Add CSS Shape properties support. +* Fix UC Browser name in debug info. +* Remove `autoprefixer.defaults` and use defaults from Browserslist. + +## 4.0.2 +* Remove `o-border-radius`, which is common mistake in legacy CSS. + +## 4.0.1 +* Fix `@supports` support with brackets in values (by Vincent De Oliveira). + +## 4.0 “Indivisibiliter ac Inseparabiliter” +* Become 2.5 times fatser by new PostCSS 3.0 parser. +* Do not remove outdated prefixes by `remove: false` option. +* `map.inline` and `map.sourcesContent` options are now `true` by default. +* Add `box-decoration-break` support. +* Do not add old `-webkit-` prefix for gradients with `px` units. +* Use previous source map to show origin source of CSS syntax error. +* Use `from` option from previous source map `file` field. +* Set `to` value to `from` if `to` option is missing. +* Trim Unicode BOM on source maps parsing. +* Parse at-rules without spaces like `@import"file"`. +* Better previous `sourceMappingURL` annotation comment cleaning. +* Do not remove previous `sourceMappingURL` comment on `map.annotation: false`. + +## 3.1.2 +* Update Firefox ESR version from 24 to 31. + +## 3.1.1 +* Use Flexbox 2009 spec for Android stock browser < 4.4. + +## 3.1 “Satyameva Jayate” +* Do not remove comments from prefixed values (by Eitan Rousso). +* Allow Safari 6.1 to use final Flexbox spec (by John Kreitlow). +* Fix `filter` value in `transition` in Webkits. +* Show greetings if your browsers don’t require any prefixes. +* Add `<=` and `<` browsers requirement (by Andreas Lind). + +## 3.0.1 +* Fix `autoprefixer.postcss` in callbacks. + +## 3.0 “Liberté, Égalité, Fraternité” +* Project was split to autoprefixer (with CLI) and autoprefixer-core. +* `autoprefixer()` now receives only `options` object with `browsers` key. +* GNU format for syntax error messages from PostCSS 2.2. + +## 2.2 “Mobilis in mobili” +* Allow to disable Autoprefixer for some rule by control comment. +* Use PostCSS 2.1 with Safe Mode option and broken source line + in CSS syntax error messages. + +## 2.1.1 +* Fix `-webkit-background-size` hack for `contain` and `cover` values. +* Don’t add `-webkit-` prefix to `filter` with SVG (by Vincent De Oliveira). + +## 2.1 “Eleftheria i thanatos” +* Add support for `clip-path` and `mask` properties. +* Return `-webkit-` prefix to `filter` with SVG URI. + +## 2.0.2 +* Add readable names for new browsers from 2.0 release. +* Don’t add `-webkit-` prefix to `filter` with SVG URI. +* Don’t add `-o-` prefix 3D transforms. + +## 2.0.1 +* Save declaration style, when clone declaration to prefix. + +## 2.0 “Hongik Ingan” +* Based on PostCSS 1.0. + See [options changes](https://github.com/postcss/postcss/releases/tag/1.0.0). +* Restore visual cascade after declaration removing. +* Enable visual cascade by default. +* Prefix declareation in `@supports` at-rule conditions. +* Add all browsers from Can I Use: `ie_mob`, `and_chr`, `and_ff`, + `op_mob` and `op_mini`. +* Allow to use latest Autoprefixer from GitHub by npm. +* Add `--no-cascade`, `--annotation` and `--sources-content` options to binary. + +## 1.3.1 +* Fix gradient hack, when `background` property contains color. + +## 1.3 “Tenka Fubu” +* Add `text-size-adjust` support. +* Add `background-size` to support Android 2. + +## 1.2 “Meiji” +* Use Can I Use data from official `caniuse-db` npm package. +* Remove package data update from binary. +* Use increment value instead of current date in minor versions. + +## 1.1 “Nutrisco et extingo” +* Add source map annotation comment support. +* Add inline source map support. +* Autodetect previous source map. +* Fix source maps support on Windows. +* Fix source maps support in subdirectory. +* Prefix selector even if it is already prefixed by developer. +* Add option `cascade` to create nice visual cascade of prefixes. +* Fix flexbox support for IE 10 (by Roland Warmerdam). +* Better `break-inside` support. +* Fix prefixing, when two same properties are near. + +### 20140222 +* Add `touch-action` support. + +### 20140226 +* Chrome 33 is moved to released versions. +* Add Chrome 36 data. + +### 20140302 +* Add `text-decoration-*` properties support. +* Update browsers usage statistics. +* Use new PostCSS version. + +### 20140319 +* Check already prefixed properties after current declaration. +* Normalize spaces before already prefixed check. +* Firefox 28 is moved to released versions. +* Add Firefox 31 data. +* Add some Blackberry data. + +### 20140327 +* Don’t use `-ms-transform` in `@keyframes`, because IE 9 doesn’t support + animations. +* Update BlackBerry 10 data. + +### 20140403 +* Update browsers usage statistics. +* Opera 20 is moved to released versions. +* Add Opera 22 data. + +### 20140410 +* Chrome 34 is moved to released versions. +* Add Chrome 37 data. +* Fix Chrome 36 data. + +### 20140429 +* Fix `display: inline-flex` support by 2009 spec. +* Fix old WebKit gradient converter (by Sergey Belov). +* Fix CSS 3 cursors data (by Nick Schonning). + +### 20140430 +* Separate 2D and 3D transform prefixes to clean unnecessary `-ms-` prefixes. +* Firefox 29 is moved to released versions. +* Add Firefox 32 data. + +### 20140510 +* Do not add `-ms-` prefix for `transform` with 3D functions. +* Update browsers global usage statistics. + +### 20140512 +* Remove unnecessary `-moz-` prefix for `wavy` in `text-decoration`. +* Update Safari data for font properties. + +### 20140521 +* Chrome 36 is moved to released versions. +* Add Chrome 38 data. + +### 20140523 +* Opera 21 is moved to released versions. +* Add Opera 23 data. + +### 20140605 +* Allow to parse gradients without space between color and position. +* Add iOS 8, Safari 8 and Android 4.4.3 data. +* Update browsers usage statistics. + +## 1.0 “Plus ultra” +* Source map support. +* Save origin indents and code formatting. +* Change CSS parser to PostCSS. +* Preserve vendor-prefixed properties put right after unprefixed ones. +* Rename `compile()` to `process()` and return result object, + instead of CSS string. +* Rename `inspect()` to `info()`. +* Add in binary `-d` option to specify output directory. +* Binary now will not concat output files. +* Allow to select last versions for specified browser. +* Add full browser names aliases: `firefox`, `explorer` and `blackberry`. +* Ignore case in browser names. +* Change license to MIT. +* Add prefixes inside custom at-rules. +* Add only necessary prefixes to selector inside prefixed at-rule. +* Safer backgrounds list parser in gradient hack. +* Prefix `@keyframes` inside `@media`. +* Don’t prefix values for CSS3 PIE properties. +* Binary now shows file name in syntax error. +* Use browserify to build standalone version. + +### 20131225 +* Fix deprecated API convertor. +* Add `::placeholder` support for Firefix >= 18. +* Fix vendor prefixes order. + +### 20140103 +* Add `-webkit-` prefix for `sticky` position. +* Update browsers popularity statistics. + +### 20140109 +* Add selectors and at-rules sections to debug info. +* Fix outdated prefixes cleaning. + +### 20140110 +* Add `Firefox ESR` browser requirement. +* Opera 18 is moved to released versions. +* Add Opera 20 data. + +### 20140117 +* Chrome 32 is moved to released versions. +* Add Opera 34 data. + +### 20140130 +* Fix flexbox properties names in transitions. +* Add Chrome 35 and Firefox 29 data. + +### 20140203 +* Android 4.4 stock browser and Opera 19 are moved to released versions. +* Add Opera 21 data. +* Update browsers usage statistics. + +### 20140213 +* Add case insensitive to IE’s filter hack (by Dominik Schilling). +* Improve selector prefixing in some rare cases (by Simon Lydell). +* Firefox 27 is moved to released versions. +* Add Firefox 30 data. + +## 0.8 “Unbowed, Unbent, Unbroken” +* Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1" + instead of just "last 2 browsers"). +* Keep vendor prefixes without unprefixed version (like vendor-specific hacks). +* Convert gradients to old WebKit syntax (actual for Android 2.3). +* Better support for several syntaxes with one prefix (like Flexbox and + gradients in WebKit). +* Add intrinsic and extrinsic sizing values support. +* Remove never existed prefixes from common mistakes (like -ms-transition). +* Add Opera 17 data. +* Fix selector prefixes order. +* Fix browser versions order in inspect. + +### 20130903 +* Fix old WebKit gradients convertor on rgba() colors. +* Allow to write old direction syntax in gradients. + +### 20130906 +* Fix direction syntax in radial gradients. +* Don’t prefix IE filter with modern syntax. + +### 20130911 +* Fix parsing property name with spaces. + +### 20130919 +* Fix processing custom framework prefixes (by Johannes J. Schmidt). +* Concat outputs if several files compiled to one output. +* Decrease standalone build size by removing unnecessary Binary class. +* iOS 7 is moved to released versions. +* Clean up binary code (by Simon Lydell). + +### 20130923 +* Firefox 24 is moved to released versions. + +### 20131001 +* Add support for grab, grabbing, zoom-in and zoom-out cursor values. + +### 20131006 +* Chrome 30 is moved to released versions. + +### 20131007 +* Don’t add another prefixes in rule with prefixed selector. + +### 20131009 +* Opera 17 is moved to released versions. + +### 20131015 +* Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov). + +### 20131017 +* Fix @host at-rule parsing. + +### 20131020 +* IE 11 and Andrid 4.3 is moved to released versions. +* Add Opera 18 data. +* Add @namespace support. +* Sort browser versions in data file. + +### 20131029 +* Add Safari 6.1 data. +* Add fx alias for Firefox. + +### 20131104 +* Update Android future version to 4.4. +* Google Chrome 32 added to future versions list. +* Firefox 25 now is actual version, 27 and 28 added to future versions. +* Browsers statistics are updated. + +### 20131205 +* Google Chrome 33 added to future releases list. +* Google Chrome 31 moved to current releases list. + +### 20131209 +* Use old webkit gradients for old iOS and Safari (by Chad von Nau). +* Fix direction conversion for old webkit gradients (by Chad von Nau). +* Update browsers popularity statistics. + +### 20131213 +* Firefox ESR in default browsers was changed to 24 version. +* Firefox 26 was moved to current releases list. +* Firefox 28 was added to future releases list. + +## 0.7 “We Do Not Sow” +* Add vendor prefixes to selectors. +* Add ::selection and ::placeholder selectors support. +* Allow to load support data from Can I Use pull requests. +* Remove deprecated API. + +### 20130806 +* Add hyphens support. + +### 20130807 +* Add tab-size support. +* Add :fullscreen support. + +### 20130808 +* Allow to select browser versions by > and >= operator. +* Fix flex properties in transition. + +### 20130810 +* Add Firefox 25 data. + +### 20130824 +* Add Chrome 31 and 30 data. +* Fix CSS comments parsing (by vladkens). + +## 0.6 “As High As Honor” +* New faster API, which cache preprocessed data. Old API is deprecated. +* A lot of perfomance improvements. +* Add Opera 15 -webkit- prefix support. +* Update Chrome 29 and Safari 7 prefixes data. +* Add minor browsers in popularity select. +* Better syntax error messages. + +### 20130721 +* Add Chrome 30 data. + +### 20130728 +* Don’t remove non-standard -webkit-background-clip: text. +* Don’t remove IE hack on CSS parse. + +### 20130729 +* Add Opera 16 data. +* Fix “Invalid range in character class” error on Firefox. + +### 20130730 +* Fix correct clone comments inside keyframes (by Alexey Plutalov). +* Fix angle recalculation in gradients (by Roman Komarov). + +### 20130731 +* Add border-image support. + +## 0.5 “Ours is the Fury” +* Rewrite Autoprefixer to be more flexible. +* Use css, instead of Rework, to fix CSS parsing errors faster. +* Fix a lot of CSS parsing errors. + +### 20130616 +* More useful message for CSS parsing errors. +* Remove old WebKit gradient syntax. +* Fix parsing error on comment with braces. + +### 20130617 +* Remove old Mozilla border-radius. +* Don’t prefix old IE filter. +* Remove old background-clip, background-size and background-origin prefixes. +* Speed up regexps in values. +* Allow to hack property declarations. + +### 20130625 +* Convert flexbox properties to 2009 and 2012 specifications. +* Improve messages on syntax errors. + +### 20130626 +* Add Firefox 24 data. +* Add prefixes for font-feature-settings. + +### 20130629 +* Fix convert flex properties to old box-flex. + +## 0.4 “Winter Is Coming” +* Remove outdated prefixes. +* Add border-radius and box-shadow properties to database. +* Change degrees in webkit gradients. + +### 20130515 +* Add old syntax in gradient direction. +* Add old syntax for display: flex. +* Update browser global usage statistics. + +### 20130521 +* Add Firefox 23 data. + +### 20130524 +* Add Chrome 29 data. + +### 20130528 +* Fix compatibilty with Rework from git master. +* Add minor browsers to data, which can be selected only directly. + +### 20130530 +* Add Opera 15 and iOS 6.1 data. +* Fix iOS versions in properties and values data. + +### 20130603 +* Use latest Rework 0.15 with a lot of CSS parsing fixes. +* Update browsers usage statistics. + +## 0.3 “Growing Strong” +* Rename `autoprefixer.filter()` to `autoprefixer.rework()`. +* Use own filters instead of Rework’s `prefix` and `prefixValue`. +* Smarter value prefixer without false match “order” in “border”. +* 40% faster. +* Don’t add unnecessary properties instead of Rework’s `prefixValue`. +* Don’t change properties order. +* Sort properties and values in inspect output. +* Add main to component config (by Jonathan Ong). +* Fix documentation (by Sergey Leschina and Mark Vasilkov). + +### 20130424 +* Fix value override in prefixer. + +### 20130427 +* Prefix several same values in one property. +* Fix Windows support in binary. +* Improve print errors in binary. + +### 20130502 +* Don’t add -webkit- prefix to IE filter. +* Don’t duplicate prefixes on second run. + +## 0.2 “Hear Me Roar!” +* Update parse libraries. +* Use component package manager to build standalone script. +* Add inspect to standalone script. + +## 0.1 “Fire and Blood” +* Initial release. diff --git a/node_modules/autoprefixer/LICENSE b/node_modules/autoprefixer/LICENSE new file mode 100644 index 0000000..da057b4 --- /dev/null +++ b/node_modules/autoprefixer/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2013 Andrey Sitnik <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/autoprefixer/README.md b/node_modules/autoprefixer/README.md new file mode 100644 index 0000000..e06de99 --- /dev/null +++ b/node_modules/autoprefixer/README.md @@ -0,0 +1,1029 @@ +# Autoprefixer [![Cult Of Martians][cult-img]][cult] + +<img align="right" width="94" height="71" + src="http://postcss.github.io/autoprefixer/logo.svg" + title="Autoprefixer logo by Anton Lovchikov"> + +[PostCSS] plugin to parse CSS and add vendor prefixes to CSS rules using values +from [Can I Use]. It is [recommended] by Google and used in Twitter and Alibaba. + +Write your CSS rules without vendor prefixes (in fact, forget about them +entirely): + +```css +::placeholder { + color: gray; +} + +.image { + background-image: url([email protected]); +} +@media (min-resolution: 2dppx) { + .image { + background-image: url([email protected]); + } +} +``` + +Autoprefixer will use the data based on current browser popularity and property +support to apply prefixes for you. You can try the [interactive demo] +of Autoprefixer. + +```css +::-webkit-input-placeholder { + color: gray; +} +::-moz-placeholder { + color: gray; +} +:-ms-input-placeholder { + color: gray; +} +::-ms-input-placeholder { + color: gray; +} +::placeholder { + color: gray; +} + +.image { + background-image: url([email protected]); +} +@media (-webkit-min-device-pixel-ratio: 2), + (-o-min-device-pixel-ratio: 2/1), + (min-resolution: 2dppx) { + .image { + background-image: url([email protected]); + } +} +``` + +Twitter account for news and releases: [@autoprefixer]. + +<a href="https://evilmartians.com/?utm_source=autoprefixer"> +<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"> +</a> + +[interactive demo]: https://autoprefixer.github.io/ +[@autoprefixer]: https://twitter.com/autoprefixer +[recommended]: https://developers.google.com/web/tools/setup/setup-buildtools#dont_trip_up_with_vendor_prefixes +[Can I Use]: https://caniuse.com/ +[cult-img]: http://cultofmartians.com/assets/badges/badge.svg +[PostCSS]: https://github.com/postcss/postcss +[cult]: http://cultofmartians.com/tasks/autoprefixer-grid.html + + +## Contents + +- [Browsers](#browsers) +- [FAQ](#faq) + - [Does Autoprefixer polyfill Grid Layout for IE?](#does-autoprefixer-polyfill-grid-layout-for-ie) + - [Does it add polyfills?](#does-it-add-polyfills) + - [Why doesn’t Autoprefixer add prefixes to `border-radius`?](#why-doesnt-autoprefixer-add-prefixes-to-border-radius) + - [Why does Autoprefixer use unprefixed properties in `@-webkit-keyframes`?](#why-does-autoprefixer-use-unprefixed-properties-in--webkit-keyframes) + - [How to work with legacy `-webkit-` only code?](#how-to-work-with-legacy--webkit--only-code) + - [Does Autoprefixer add `-epub-` prefix?](#does-autoprefixer-add--epub--prefix) + - [Why doesn’t Autoprefixer transform generic font-family `system-ui`?](#why-doesnt-autoprefixer-transform-generic-font-family-system-ui) +- [Usage](#usage) + - [Gulp](#gulp) + - [Webpack](#webpack) + - [CSS-in-JS](#css-in-js) + - [CLI](#cli) + - [Other Build Tools](#other-build-tools) + - [JavaScript](#javascript) + - [Text Editors and IDE](#text-editors-and-ide) +- [Warnings](#warnings) +- [Disabling](#disabling) +- [Options](#options) +- [Grid Autoplacement support in IE](#grid-autoplacement-support-in-ie) +- [Debug](#debug) + +## Browsers + +Autoprefixer uses [Browserslist], so you can specify the browsers +you want to target in your project with queries like `> 5%` +(see [Best Practices]). + +The best way to provide browsers is a `.browserslistrc` file in your project +root, or by adding a `browserslist` key to your `package.json`. + +We recommend the use of these options over passing options to Autoprefixer so +that the config can be shared with other tools such as [babel-preset-env] and +[Stylelint]. + +See [Browserslist docs] for queries, browser names, config format, and defaults. + +[Browserslist docs]: https://github.com/ai/browserslist#queries +[babel-preset-env]: https://github.com/babel/babel/tree/master/packages/babel-preset-env +[Best Practices]: https://github.com/browserslist/browserslist#best-practices +[Browserslist]: https://github.com/ai/browserslist +[Stylelint]: https://stylelint.io/ + + +## FAQ + +### Does Autoprefixer polyfill Grid Layout for IE? + +Autoprefixer can be used to translate modern CSS Grid syntax into IE 10 +and IE 11 syntax, but this polyfill will not work in 100% of cases. +This is why it is disabled by default. + +First, you need to enable Grid prefixes by using either the `grid: "autoplace"` +option or the `/* autoprefixer grid: autoplace */` control comment. + +Second, you need to test every fix with Grid in IE. It is not an enable and +forget feature, but it is still very useful. +Financial Times and Yandex use it in production. + +Third, there is only very limited auto placement support. Read the +[Grid Autoplacement support in IE](#grid-autoplacement-support-in-ie) section +for more details. + +Fourth, if you are not using the autoplacement feature, the best way +to use Autoprefixer is by using `grid-template` or `grid-template-areas`. + +```css +.page { + display: grid; + grid-gap: 33px; + grid-template: + "head head head" 1fr + "nav main main" minmax(100px, 1fr) + "nav foot foot" 2fr / + 1fr 100px 1fr; +} +.page__head { + grid-area: head; +} +.page__nav { + grid-area: nav; +} +.page__main { + grid-area: main; +} +.page__footer { + grid-area: foot; +} +``` + +See also: + +* [The guide about Grids in IE and Autoprefixer]. +* [`postcss-gap-properties`] to use new `gap` property + instead of old `grid-gap`. +* [`postcss-grid-kiss`] has alternate “everything in one property” syntax, + which makes using Autoprefixer’s Grid translations safer. + +[The guide about Grids in IE and Autoprefixer]: https://css-tricks.com/css-grid-in-ie-css-grid-and-the-new-autoprefixer/ +[`postcss-gap-properties`]: https://github.com/jonathantneal/postcss-gap-properties +[`postcss-grid-kiss`]: https://github.com/sylvainpolletvillard/postcss-grid-kiss + + +### Does it add polyfills? + +No. Autoprefixer only adds prefixes. + +Most new CSS features will require client side JavaScript to handle a new +behavior correctly. + +Depending on what you consider to be a “polyfill”, you can take a look at some +other tools and libraries. If you are just looking for syntax sugar, +you might take a look at: + +- [postcss-preset-env] is a plugins preset with polyfills and Autoprefixer + to write future CSS today. +- [Oldie], a PostCSS plugin that handles some IE hacks (opacity, rgba, etc). +- [postcss-flexbugs-fixes], a PostCSS plugin to fix flexbox issues. + +[postcss-flexbugs-fixes]: https://github.com/luisrudge/postcss-flexbugs-fixes +[postcss-preset-env]: https://github.com/jonathantneal/postcss-preset-env +[Oldie]: https://github.com/jonathantneal/oldie + + +### Why doesn’t Autoprefixer add prefixes to `border-radius`? + +Developers are often surprised by how few prefixes are required today. +If Autoprefixer doesn’t add prefixes to your CSS, check if they’re still +required on [Can I Use]. + +[Can I Use]: https://caniuse.com/ + + +### Why does Autoprefixer use unprefixed properties in `@-webkit-keyframes`? + +Browser teams can remove some prefixes before others, so we try to use all +combinations of prefixed/unprefixed values. + + +### How to work with legacy `-webkit-` only code? + +Autoprefixer needs unprefixed property to add prefixes. So if you only +wrote `-webkit-gradient` without W3C’s `gradient`, +Autoprefixer will not add other prefixes. + +But [PostCSS] has plugins to convert CSS to unprefixed state. +Use [postcss-unprefix] before Autoprefixer. + +[postcss-unprefix]: https://github.com/gucong3000/postcss-unprefix + + +### Does Autoprefixer add `-epub-` prefix? + +No, Autoprefixer works only with browsers prefixes from Can I Use. +But you can use [postcss-epub] for prefixing ePub3 properties. + +[postcss-epub]: https://github.com/Rycochet/postcss-epub + + +### Why doesn’t Autoprefixer transform generic font-family `system-ui`? + +`system-ui` is technically not a prefix and the transformation is not +future-proof. You can use [postcss-font-family-system-ui] to transform +`system-ui` to a practical font-family list. + +[postcss-font-family-system-ui]: https://github.com/JLHwung/postcss-font-family-system-ui + + +## Usage + +### Gulp + +In Gulp you can use [gulp-postcss] with `autoprefixer` npm package. + +```js +gulp.task('autoprefixer', () => { + const autoprefixer = require('autoprefixer') + const sourcemaps = require('gulp-sourcemaps') + const postcss = require('gulp-postcss') + + return gulp.src('./src/*.css') + .pipe(sourcemaps.init()) + .pipe(postcss([ autoprefixer() ])) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('./dest')) +}) +``` + +With `gulp-postcss` you also can combine Autoprefixer +with [other PostCSS plugins]. + +[gulp-postcss]: https://github.com/postcss/gulp-postcss +[other PostCSS plugins]: https://github.com/postcss/postcss#plugins + + +### Webpack + +In [webpack] you can use [postcss-loader] with `autoprefixer` +and [other PostCSS plugins]. + +```js +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + use: ["style-loader", "css-loader", "postcss-loader"] + } + ] + } +} +``` + +And create a `postcss.config.js` with: + +```js +module.exports = { + plugins: [ + require('autoprefixer') + ] +} +``` + +[other PostCSS plugins]: https://github.com/postcss/postcss#plugins +[postcss-loader]: https://github.com/postcss/postcss-loader +[webpack]: https://webpack.js.org/ + + +### CSS-in-JS + +The best way to use PostCSS with CSS-in-JS is [`astroturf`]. +Add it’s loader to your `webpack.config.js`: + +```js +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + use: ['style-loader', 'postcss-loader'], + }, + { + test: /\.jsx?$/, + use: ['babel-loader', 'astroturf/loader'], + } + ] + } +} +``` + +Then create `postcss.config.js`: + +```js +module.exports = { + plugins: [ + require('autoprefixer') + ] +} +``` + +[`astroturf`]: https://github.com/4Catalyzer/astroturf + + +### CLI + +You can use the [postcss-cli] to run Autoprefixer from CLI: + +```sh +npm install postcss-cli autoprefixer +npx postcss *.css --use autoprefixer -d build/ +``` + +See `postcss -h` for help. + +[postcss-cli]: https://github.com/postcss/postcss-cli + + +### Other Build Tools + +* **Grunt:** [grunt-postcss] +* **Ruby on Rails**: [autoprefixer-rails] +* **Neutrino**: [neutrino-middleware-postcss] +* **Jekyll**: add `autoprefixer-rails` and `jekyll-assets` to `Gemfile` +* **Brunch**: [postcss-brunch] +* **Broccoli**: [broccoli-postcss] +* **Middleman**: [middleman-autoprefixer] +* **Mincer**: add `autoprefixer` npm package and enable it: + `environment.enable('autoprefixer')` + +[neutrino-middleware-postcss]: https://www.npmjs.com/package/neutrino-middleware-postcss +[middleman-autoprefixer]: https://github.com/middleman/middleman-autoprefixer +[autoprefixer-rails]: https://github.com/ai/autoprefixer-rails +[broccoli-postcss]: https://github.com/jeffjewiss/broccoli-postcss +[postcss-brunch]: https://github.com/iamvdo/postcss-brunch +[grunt-postcss]: https://github.com/nDmitry/grunt-postcss + + +#### Preprocessors + +* **Less**: [less-plugin-autoprefix] +* **Stylus**: [autoprefixer-stylus] +* **Compass**: [autoprefixer-rails#compass] + +[less-plugin-autoprefix]: https://github.com/less/less-plugin-autoprefix +[autoprefixer-stylus]: https://github.com/jenius/autoprefixer-stylus +[autoprefixer-rails#compass]: https://github.com/ai/autoprefixer-rails#compass + + +#### GUI Tools + +* [CodeKit](https://codekitapp.com/help/autoprefixer/) +* [Prepros](https://prepros.io) + + +### JavaScript + +You can use Autoprefixer with [PostCSS] in your Node.js application +or if you want to develop an Autoprefixer plugin for a new environment. + +```js +const autoprefixer = require('autoprefixer') +const postcss = require('postcss') + +postcss([ autoprefixer ]).process(css).then(result => { + result.warnings().forEach(warn => { + console.warn(warn.toString()) + }) + console.log(result.css) +}) +``` + +There is also a [standalone build] for the browser or for a non-Node.js runtime. + +You can use [html-autoprefixer] to process HTML with inlined CSS. + +[html-autoprefixer]: https://github.com/RebelMail/html-autoprefixer +[standalone build]: https://raw.github.com/ai/autoprefixer-rails/master/vendor/autoprefixer.js +[PostCSS]: https://github.com/postcss/postcss + + +### Text Editors and IDE + +Autoprefixer should be used in assets build tools. Text editor plugins are not +a good solution, because prefixes decrease code readability and you will need +to change values in all prefixed properties. + +I recommend you to learn how to use build tools like [Parcel]. +They work much better and will open you a whole new world of useful plugins +and automation. + +If you can’t move to a build tool, you can use text editor plugins: + +* [Sublime Text](https://github.com/sindresorhus/sublime-autoprefixer) +* [Brackets](https://github.com/mikaeljorhult/brackets-autoprefixer) +* [Atom Editor](https://github.com/sindresorhus/atom-autoprefixer) +* [Visual Studio](https://github.com/madskristensen/WebCompiler) + ([how to](https://stackoverflow.com/a/54908636/2440)) + +[Parcel]: https://parceljs.org/ + + +## Warnings + +Autoprefixer uses the [PostCSS warning API] to warn about really important +problems in your CSS: + +* Old direction syntax in gradients. +* Old unprefixed `display: box` instead of `display: flex` + by latest specification version. + +You can get warnings from `result.warnings()`: + +```js +result.warnings().forEach(warn => { + console.warn(warn.toString()) +}) +``` + +Every Autoprefixer runner should display these warnings. + +[PostCSS warning API]: https://github.com/postcss/postcss/blob/master/docs/api.md#warning-class + + +## Disabling + +### Prefixes + +Autoprefixer was designed to have no interface – it just works. +If you need some browser specific hack just write a prefixed property +after the unprefixed one. + +```css +a { + transform: scale(0.5); + -moz-transform: scale(0.6); +} +``` + +If some prefixes were generated incorrectly, please create an [issue on GitHub]. + +[issue on GitHub]: https://github.com/postcss/autoprefixer/issues + + +### Features + +You can use these plugin options to control some of Autoprefixer’s features. + +* `grid: "autoplace"` will enable `-ms-` prefixes for Grid Layout including some + [limited autoplacement support](#grid-autoplacement-support-in-ie). +* `supports: false` will disable `@supports` parameters prefixing. +* `flexbox: false` will disable flexbox properties prefixing. + Or `flexbox: "no-2009"` will add prefixes only for final and IE + versions of specification. +* `remove: false` will disable cleaning outdated prefixes. + +You should set them inside the plugin like so: + +```js +autoprefixer({ grid: 'autoplace' }) +``` + + +### Control Comments + +If you do not need Autoprefixer in some part of your CSS, +you can use control comments to disable Autoprefixer. + +```css +.a { + transition: 1s; /* will be prefixed */ +} + +.b { + /* autoprefixer: off */ + transition: 1s; /* will not be prefixed */ +} + +.c { + /* autoprefixer: ignore next */ + transition: 1s; /* will not be prefixed */ + mask: url(image.png); /* will be prefixed */ +} +``` + +There are three types of control comments: + +* `/* autoprefixer: (on|off) */`: enable/disable all Autoprefixer translations for the + whole block both *before* and *after* the comment. +* `/* autoprefixer: ignore next */`: disable Autoprefixer only for the next property + or next rule selector or at-rule parameters (but not rule/at‑rule body). +* `/* autoprefixer grid: (autoplace|no-autoplace|off) */`: control how Autoprefixer handles + grid translations for the whole block: + * `autoplace`: enable grid translations with autoplacement support. + * `no-autoplace`: enable grid translations with autoplacement + support *disabled* (alias for deprecated value `on`). + * `off`: disable all grid translations. + +You can also use comments recursively: + +```css +/* autoprefixer: off */ +@supports (transition: all) { + /* autoprefixer: on */ + a { + /* autoprefixer: off */ + } +} +``` + +Note that comments that disable the whole block should not be featured in the same +block twice: + +```css +/* How not to use block level control comments */ + +.do-not-do-this { + /* autoprefixer: off */ + transition: 1s; + /* autoprefixer: on */ + transform: rotate(20deg); +} +``` + + +## Options + +Function `autoprefixer(options)` returns a new PostCSS plugin. +See [PostCSS API] for plugin usage documentation. + +```js +autoprefixer({ cascade: false }) +``` + +Available options are: + +* `env` (string): environment for Browserslist. +* `cascade` (boolean): should Autoprefixer use Visual Cascade, + if CSS is uncompressed. Default: `true` +* `add` (boolean): should Autoprefixer add prefixes. Default is `true`. +* `remove` (boolean): should Autoprefixer [remove outdated] prefixes. + Default is `true`. +* `supports` (boolean): should Autoprefixer add prefixes for `@supports` + parameters. Default is `true`. +* `flexbox` (boolean|string): should Autoprefixer add prefixes for flexbox + properties. With `"no-2009"` value Autoprefixer will add prefixes only + for final and IE 10 versions of specification. Default is `true`. +* `grid` (false|"autoplace"|"no-autoplace"): should Autoprefixer + add IE 10-11 prefixes for Grid Layout properties? + * `false` (default): prevent Autoprefixer from outputting + CSS Grid translations. + * `"autoplace"`: enable Autoprefixer grid translations + and *include* autoplacement support. You can also use + `/* autoprefixer grid: autoplace */` in your CSS. + * `"no-autoplace"`: enable Autoprefixer grid translations + but *exclude* autoplacement support. You can also use + `/* autoprefixer grid: no-autoplace */` in your CSS. + (alias for the deprecated `true` value) +* `stats` (object): custom [usage statistics] for `> 10% in my stats` + browsers query. +* `overrideBrowserslist` (array): list of queries for target browsers. + Try to not use it. The best practice is to use `.browserslistrc` config + or `browserslist` key in `package.json` to share target browsers + with Babel, ESLint and Stylelint. See [Browserslist docs] + for available queries and default value. +* `ignoreUnknownVersions` (boolean): do not raise error on unknown browser + version in Browserslist config. Default is `false`. + +Plugin object has `info()` method for debugging purpose. + +You can use PostCSS processor to process several CSS files +to increase performance. + +[usage statistics]: https://github.com/ai/browserslist#custom-usage-data +[PostCSS API]: http://api.postcss.org + +## Grid Autoplacement support in IE + +If the `grid` option is set to `"autoplace"`, limited autoplacement support is added to Autoprefixers grid translations. You can also use the `/* autoprefixer grid: autoplace */` control comment to enable autoplacement + +Autoprefixer will only autoplace grid cells if both `grid-template-rows` and `grid-template-columns` has been set. If `grid-template` or `grid-template-areas` has been set, Autoprefixer will use area based cell placement instead. + +Autoprefixer supports autoplacement by using `nth-child` CSS selectors. It creates [number of columns] x [number of rows] `nth-child` selectors. For this reason Autoplacement is only supported within the explicit grid. + +```css +/* Input CSS */ + +/* autoprefixer grid: autoplace */ + +.autoplacement-example { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: auto auto; + grid-gap: 20px; +} +``` + +```css +/* Output CSS */ + +/* autoprefixer grid: autoplace */ + +.autoplacement-example { + display: -ms-grid; + display: grid; + -ms-grid-columns: 1fr 20px 1fr; + grid-template-columns: 1fr 1fr; + -ms-grid-rows: auto 20px auto; + grid-template-rows: auto auto; + grid-gap: 20px; +} + +.autoplacement-example > *:nth-child(1) { + -ms-grid-row: 1; + -ms-grid-column: 1; +} + +.autoplacement-example > *:nth-child(2) { + -ms-grid-row: 1; + -ms-grid-column: 3; +} + +.autoplacement-example > *:nth-child(3) { + -ms-grid-row: 3; + -ms-grid-column: 1; +} + +.autoplacement-example > *:nth-child(4) { + -ms-grid-row: 3; + -ms-grid-column: 3; +} +``` + +### Beware of enabling autoplacement in old projects + +Be careful about enabling autoplacement in any already established projects that have +previously not used Autoprefixer's grid autoplacement feature before. + +If this was your html: + +```html +<div class="grid"> + <div class="grid-cell"></div> +</div> +``` + +The following CSS will not work as expected with the autoplacement feature enabled: + +```css +/* Unsafe CSS when Autoplacement is enabled */ + +.grid-cell { + grid-column: 2; + grid-row: 2; +} + +.grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); +} +``` + +Swapping the rules around will not fix the issue either: + +```css +/* Also unsafe to use this CSS */ + +.grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); +} + +.grid-cell { + grid-column: 2; + grid-row: 2; +} +``` + +One way to deal with this issue is to disable autoplacement in the +grid-declaration rule: + +```css +/* Disable autoplacement to fix the issue */ + +.grid { + /* autoprefixer grid: no-autoplace */ + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); +} + +.grid-cell { + grid-column: 2; + grid-row: 2; +} +``` + +The absolute best way to integrate autoplacement into already existing projects though is +to leave autoplacement turned off by default and then use a control comment to enable it +when needed. This method is far less likely to cause something on the site to break. + +```css +/* Disable autoplacement by default in old projects */ +/* autoprefixer grid: no-autoplace */ + +/* Old code will function the same way it always has */ +.old-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); +} +.old-grid-cell { + grid-column: 2; + grid-row: 2; +} + +/* Enable autoplacement when you want to use it in new code */ +.new-autoplace-friendly-grid { + /* autoprefixer grid: autoplace */ + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, auto); +} +``` + +Note that the `grid: "no-autoplace"` setting and the +`/* autoprefixer grid: no-autoplace */` control comment share identical functionality +to the `grid: true` setting and the `/* autoprefixer grid: on */` control comment. +There is no need to refactor old code to use `no-autoplace` in place of the old +`true` and `on` statements. + +### Autoplacement limitations + +#### Both columns and rows must be defined + +Autoplacement only works inside the explicit grid. The columns and rows need to be defined +so that Autoprefixer knows how many `nth-child` selectors to generate. + +```css +.not-allowed { + display: grid; + grid-template-columns: repeat(3, 1fr); +} + +.is-allowed { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(10, auto); +} +``` + +#### Repeat auto-fit and auto-fill are not supported + +The `repeat(auto-fit, ...)` and `repeat(auto-fill, ...)` grid functionality relies on +knowledge from the browser about screen dimensions and the number of available grid +items for it to work properly. Autoprefixer does not have access to this information +so unfortunately this little snippet will _never_ be IE friendly. + +```css +.grid { + /* This will never be IE friendly */ + grid-template-columns: repeat(auto-fit, min-max(200px, 1fr)) +} +``` + +#### No manual cell placement or column/row spans allowed inside an autoplacement grid + +Elements must not be manually placed or given column/row spans inside +an autoplacement grid. Only the most basic of autoplacement grids are supported. +Grid cells can still be placed manually outside the the explicit grid though. +Support for manually placing individual grid cells inside an explicit +autoplacement grid is planned for a future release. + +```css +.autoplacement-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, auto); +} + +/* Grid cells placed inside the explicit grid + will break the layout in IE */ +.not-permitted-grid-cell { + grid-column: 1; + grid-row: 1; +} + +/* Grid cells placed outside the + explicit grid will work in IE */ +.permitted-grid-cell { + grid-column: 1 / span 2; + grid-row: 4; +} +``` + +If manual cell placement is required, we recommend using `grid-template` or +`grid-template-areas` instead: + +```css +.page { + display: grid; + grid-gap: 30px; + grid-template: + "head head" + "nav main" minmax(100px, 1fr) + "foot foot" / + 200px 1fr; +} +.page__head { + grid-area: head; +} +.page__nav { + grid-area: nav; +} +.page__main { + grid-area: main; +} +.page__footer { + grid-area: foot; +} +``` + +#### Do not create `::before` and `::after` pseudo elements + +Let's say you have this HTML: + +```html +<div class="grid"> + <div class="grid-cell"></div> +</div> +``` + +And you write this CSS: + +```css +.grid { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: auto; +} + +.grid::before { + content: 'before'; +} + +.grid::after { + content: 'after'; +} +``` + +This will be the output: + +```css +.grid { + display: -ms-grid; + display: grid; + -ms-grid-columns: 1fr 1fr; + grid-template-columns: 1fr 1fr; + -ms-grid-rows: auto; + grid-template-rows: auto; +} + +.grid > *:nth-child(1) { + -ms-grid-row: 1; + -ms-grid-column: 1; +} + + +.grid > *:nth-child(2) { + -ms-grid-row: 1; + -ms-grid-column: 2; +} + +.grid::before { + content: 'before'; +} + +.grid::after { + content: 'after'; +} +``` + +IE will place `.grid-cell`, `::before` and `::after` in row 1 column 1. +Modern browsers on the other hand will place `::before` in row 1 column 1, +`.grid-cell` in row 1 column 2, and `::after` in row 2 column 1. + +See this [Code Pen](https://codepen.io/daniel-tonon/pen/gBymVw) to see a visualization +of the issue. View the Code Pen in both a modern browser and IE to see the difference. + +Note that you can still create `::before` and `::after` elements as long as you manually +place them outside the explicit grid. + +#### When changing the `grid gap` value, columns and rows must be re-declared + +If you wish to change the size of a `grid-gap`, you will need to redeclare the grid columns and rows. + +```css +.grid { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: auto; + grid-gap: 50px; +} + +/* This will *NOT* work in IE */ +@media (max-width: 600px) { + .grid { + grid-gap: 20px; + } +} + +/* This will *NOT* work in IE */ +.grid.small-gap { + grid-gap: 20px; +} +``` + +```css +.grid { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: auto; + grid-gap: 50px; +} + +/* This *WILL* work in IE */ +@media (max-width: 600px) { + .grid { + grid-template-columns: 1fr 1fr; + grid-template-rows: auto; + grid-gap: 20px; + } +} + +/* This *WILL* work in IE */ +.grid.small-gap { + grid-template-columns: 1fr 1fr; + grid-template-rows: auto; + grid-gap: 20px; +} +``` + +## Debug + +Run `npx autoprefixer --info` in your project directory to check +which browsers are selected and which properties will be prefixed: + +``` +$ npx autoprefixer --info +Browsers: + Edge: 16 + +These browsers account for 0.26% of all users globally + +At-Rules: + @viewport: ms + +Selectors: + ::placeholder: ms + +Properties: + appearance: webkit + flow-from: ms + flow-into: ms + hyphens: ms + overscroll-behavior: ms + region-fragment: ms + scroll-snap-coordinate: ms + scroll-snap-destination: ms + scroll-snap-points-x: ms + scroll-snap-points-y: ms + scroll-snap-type: ms + text-size-adjust: ms + text-spacing: ms + user-select: ms +``` + +JS API is also available: + +```js +console.log(autoprefixer().info()) +``` + + +## Security Contact + +To report a security vulnerability, please use the [Tidelift security contact]. +Tidelift will coordinate the fix and disclosure. + +[Tidelift security contact]: https://tidelift.com/security diff --git a/node_modules/autoprefixer/bin/autoprefixer b/node_modules/autoprefixer/bin/autoprefixer new file mode 100755 index 0000000..33e5864 --- /dev/null +++ b/node_modules/autoprefixer/bin/autoprefixer @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +let mode = process.argv[2] +if (mode === '--info') { + process.stdout.write( + require('../')().info() + '\n') +} else if (mode === '--version') { + process.stdout.write( + 'autoprefixer ' + require('../package.json').version + '\n') +} else { + process.stdout.write( + 'autoprefix\n' + + '\n' + + 'Options:\n' + + ' --info Show target browsers and used prefixes\n' + + ' --version Show version number\n' + + ' --help Show help\n' + + '\n' + + 'Usage:\n' + + ' autoprefixer --info\n' + ) +} diff --git a/node_modules/autoprefixer/data/prefixes.js b/node_modules/autoprefixer/data/prefixes.js new file mode 100644 index 0000000..a95b86d --- /dev/null +++ b/node_modules/autoprefixer/data/prefixes.js @@ -0,0 +1,712 @@ +"use strict"; + +var unpack = require('caniuse-lite').feature; + +function browsersSort(a, b) { + a = a.split(' '); + b = b.split(' '); + + if (a[0] > b[0]) { + return 1; + } else if (a[0] < b[0]) { + return -1; + } else { + return Math.sign(parseFloat(a[1]) - parseFloat(b[1])); + } +} // Convert Can I Use data + + +function f(data, opts, callback) { + data = unpack(data); + + if (!callback) { + var _ref = [opts, {}]; + callback = _ref[0]; + opts = _ref[1]; + } + + var match = opts.match || /\sx($|\s)/; + var need = []; + + for (var browser in data.stats) { + var versions = data.stats[browser]; + + for (var version in versions) { + var support = versions[version]; + + if (support.match(match)) { + need.push(browser + ' ' + version); + } + } + } + + callback(need.sort(browsersSort)); +} // Add data for all properties + + +var result = {}; + +function prefix(names, data) { + for (var _iterator = names, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var name = _ref2; + result[name] = Object.assign({}, data); + } +} + +function add(names, data) { + for (var _iterator2 = names, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var name = _ref3; + result[name].browsers = result[name].browsers.concat(data.browsers).sort(browsersSort); + } +} + +module.exports = result; // Border Radius + +f(require('caniuse-lite/data/features/border-radius'), function (browsers) { + return prefix(['border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'], { + mistakes: ['-khtml-', '-ms-', '-o-'], + feature: 'border-radius', + browsers: browsers + }); +}); // Box Shadow + +f(require('caniuse-lite/data/features/css-boxshadow'), function (browsers) { + return prefix(['box-shadow'], { + mistakes: ['-khtml-'], + feature: 'css-boxshadow', + browsers: browsers + }); +}); // Animation + +f(require('caniuse-lite/data/features/css-animation'), function (browsers) { + return prefix(['animation', 'animation-name', 'animation-duration', 'animation-delay', 'animation-direction', 'animation-fill-mode', 'animation-iteration-count', 'animation-play-state', 'animation-timing-function', '@keyframes'], { + mistakes: ['-khtml-', '-ms-'], + feature: 'css-animation', + browsers: browsers + }); +}); // Transition + +f(require('caniuse-lite/data/features/css-transitions'), function (browsers) { + return prefix(['transition', 'transition-property', 'transition-duration', 'transition-delay', 'transition-timing-function'], { + mistakes: ['-khtml-', '-ms-'], + browsers: browsers, + feature: 'css-transitions' + }); +}); // Transform 2D + +f(require('caniuse-lite/data/features/transforms2d'), function (browsers) { + return prefix(['transform', 'transform-origin'], { + feature: 'transforms2d', + browsers: browsers + }); +}); // Transform 3D + +var transforms3d = require('caniuse-lite/data/features/transforms3d'); + +f(transforms3d, function (browsers) { + prefix(['perspective', 'perspective-origin'], { + feature: 'transforms3d', + browsers: browsers + }); + return prefix(['transform-style'], { + mistakes: ['-ms-', '-o-'], + browsers: browsers, + feature: 'transforms3d' + }); +}); +f(transforms3d, { + match: /y\sx|y\s#2/ +}, function (browsers) { + return prefix(['backface-visibility'], { + mistakes: ['-ms-', '-o-'], + feature: 'transforms3d', + browsers: browsers + }); +}); // Gradients + +var gradients = require('caniuse-lite/data/features/css-gradients'); + +f(gradients, { + match: /y\sx/ +}, function (browsers) { + return prefix(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], { + props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], + mistakes: ['-ms-'], + feature: 'css-gradients', + browsers: browsers + }); +}); +f(gradients, { + match: /a\sx/ +}, function (browsers) { + browsers = browsers.map(function (i) { + if (/firefox|op/.test(i)) { + return i; + } else { + return i + " old"; + } + }); + return add(['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'], { + feature: 'css-gradients', + browsers: browsers + }); +}); // Box sizing + +f(require('caniuse-lite/data/features/css3-boxsizing'), function (browsers) { + return prefix(['box-sizing'], { + feature: 'css3-boxsizing', + browsers: browsers + }); +}); // Filter Effects + +f(require('caniuse-lite/data/features/css-filters'), function (browsers) { + return prefix(['filter'], { + feature: 'css-filters', + browsers: browsers + }); +}); // filter() function + +f(require('caniuse-lite/data/features/css-filter-function'), function (browsers) { + return prefix(['filter-function'], { + props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], + feature: 'css-filter-function', + browsers: browsers + }); +}); // Backdrop-filter + +var backdrop = require('caniuse-lite/data/features/css-backdrop-filter'); + +f(backdrop, { + match: /y\sx|y\s#2/ +}, function (browsers) { + return prefix(['backdrop-filter'], { + feature: 'css-backdrop-filter', + browsers: browsers + }); +}); // element() function + +f(require('caniuse-lite/data/features/css-element-function'), function (browsers) { + return prefix(['element'], { + props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], + feature: 'css-element-function', + browsers: browsers + }); +}); // Multicolumns + +f(require('caniuse-lite/data/features/multicolumn'), function (browsers) { + prefix(['columns', 'column-width', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-count', 'column-rule-style', 'column-span', 'column-fill'], { + feature: 'multicolumn', + browsers: browsers + }); + var noff = browsers.filter(function (i) { + return !/firefox/.test(i); + }); + prefix(['break-before', 'break-after', 'break-inside'], { + feature: 'multicolumn', + browsers: noff + }); +}); // User select + +f(require('caniuse-lite/data/features/user-select-none'), function (browsers) { + return prefix(['user-select'], { + mistakes: ['-khtml-'], + feature: 'user-select-none', + browsers: browsers + }); +}); // Flexible Box Layout + +var flexbox = require('caniuse-lite/data/features/flexbox'); + +f(flexbox, { + match: /a\sx/ +}, function (browsers) { + browsers = browsers.map(function (i) { + if (/ie|firefox/.test(i)) { + return i; + } else { + return i + " 2009"; + } + }); + prefix(['display-flex', 'inline-flex'], { + props: ['display'], + feature: 'flexbox', + browsers: browsers + }); + prefix(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], { + feature: 'flexbox', + browsers: browsers + }); + prefix(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], { + feature: 'flexbox', + browsers: browsers + }); +}); +f(flexbox, { + match: /y\sx/ +}, function (browsers) { + add(['display-flex', 'inline-flex'], { + feature: 'flexbox', + browsers: browsers + }); + add(['flex', 'flex-grow', 'flex-shrink', 'flex-basis'], { + feature: 'flexbox', + browsers: browsers + }); + add(['flex-direction', 'flex-wrap', 'flex-flow', 'justify-content', 'order', 'align-items', 'align-self', 'align-content'], { + feature: 'flexbox', + browsers: browsers + }); +}); // calc() unit + +f(require('caniuse-lite/data/features/calc'), function (browsers) { + return prefix(['calc'], { + props: ['*'], + feature: 'calc', + browsers: browsers + }); +}); // Background options + +f(require('caniuse-lite/data/features/background-img-opts'), function (browsers) { + return prefix(['background-origin', 'background-size'], { + feature: 'background-img-opts', + browsers: browsers + }); +}); // background-clip: text + +f(require('caniuse-lite/data/features/background-clip-text'), function (browsers) { + return prefix(['background-clip'], { + feature: 'background-clip-text', + browsers: browsers + }); +}); // Font feature settings + +f(require('caniuse-lite/data/features/font-feature'), function (browsers) { + return prefix(['font-feature-settings', 'font-variant-ligatures', 'font-language-override'], { + feature: 'font-feature', + browsers: browsers + }); +}); // CSS font-kerning property + +f(require('caniuse-lite/data/features/font-kerning'), function (browsers) { + return prefix(['font-kerning'], { + feature: 'font-kerning', + browsers: browsers + }); +}); // Border image + +f(require('caniuse-lite/data/features/border-image'), function (browsers) { + return prefix(['border-image'], { + feature: 'border-image', + browsers: browsers + }); +}); // Selection selector + +f(require('caniuse-lite/data/features/css-selection'), function (browsers) { + return prefix(['::selection'], { + selector: true, + feature: 'css-selection', + browsers: browsers + }); +}); // Placeholder selector + +f(require('caniuse-lite/data/features/css-placeholder'), function (browsers) { + prefix(['::placeholder'], { + selector: true, + feature: 'css-placeholder', + browsers: browsers.concat(['ie 10 old', 'ie 11 old', 'firefox 18 old']) + }); +}); // Hyphenation + +f(require('caniuse-lite/data/features/css-hyphens'), function (browsers) { + return prefix(['hyphens'], { + feature: 'css-hyphens', + browsers: browsers + }); +}); // Fullscreen selector + +var fullscreen = require('caniuse-lite/data/features/fullscreen'); + +f(fullscreen, function (browsers) { + return prefix([':fullscreen'], { + selector: true, + feature: 'fullscreen', + browsers: browsers + }); +}); +f(fullscreen, { + match: /x(\s#2|$)/ +}, function (browsers) { + return prefix(['::backdrop'], { + selector: true, + feature: 'fullscreen', + browsers: browsers + }); +}); // Tab size + +f(require('caniuse-lite/data/features/css3-tabsize'), function (browsers) { + return prefix(['tab-size'], { + feature: 'css3-tabsize', + browsers: browsers + }); +}); // Intrinsic & extrinsic sizing + +var intrinsic = require('caniuse-lite/data/features/intrinsic-width'); + +f(intrinsic, function (browsers) { + return prefix(['max-content', 'min-content', 'fit-content'], { + props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'], + feature: 'intrinsic-width', + browsers: browsers + }); +}); +f(intrinsic, { + match: /x|\s#4/ +}, function (browsers) { + return prefix(['fill', 'fill-available', 'stretch'], { + props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'], + feature: 'intrinsic-width', + browsers: browsers + }); +}); // Zoom cursors + +f(require('caniuse-lite/data/features/css3-cursors-newer'), function (browsers) { + return prefix(['zoom-in', 'zoom-out'], { + props: ['cursor'], + feature: 'css3-cursors-newer', + browsers: browsers + }); +}); // Grab cursors + +f(require('caniuse-lite/data/features/css3-cursors-grab'), function (browsers) { + return prefix(['grab', 'grabbing'], { + props: ['cursor'], + feature: 'css3-cursors-grab', + browsers: browsers + }); +}); // Sticky position + +f(require('caniuse-lite/data/features/css-sticky'), function (browsers) { + return prefix(['sticky'], { + props: ['position'], + feature: 'css-sticky', + browsers: browsers + }); +}); // Pointer Events + +f(require('caniuse-lite/data/features/pointer'), function (browsers) { + return prefix(['touch-action'], { + feature: 'pointer', + browsers: browsers + }); +}); // Text decoration + +var decoration = require('caniuse-lite/data/features/text-decoration'); + +f(decoration, function (browsers) { + return prefix(['text-decoration-style', 'text-decoration-color', 'text-decoration-line', 'text-decoration'], { + feature: 'text-decoration', + browsers: browsers + }); +}); +f(decoration, { + match: /x.*#[235]/ +}, function (browsers) { + return prefix(['text-decoration-skip', 'text-decoration-skip-ink'], { + feature: 'text-decoration', + browsers: browsers + }); +}); // Text Size Adjust + +f(require('caniuse-lite/data/features/text-size-adjust'), function (browsers) { + return prefix(['text-size-adjust'], { + feature: 'text-size-adjust', + browsers: browsers + }); +}); // CSS Masks + +f(require('caniuse-lite/data/features/css-masks'), function (browsers) { + prefix(['mask-clip', 'mask-composite', 'mask-image', 'mask-origin', 'mask-repeat', 'mask-border-repeat', 'mask-border-source'], { + feature: 'css-masks', + browsers: browsers + }); + prefix(['mask', 'mask-position', 'mask-size', 'mask-border', 'mask-border-outset', 'mask-border-width', 'mask-border-slice'], { + feature: 'css-masks', + browsers: browsers + }); +}); // CSS clip-path property + +f(require('caniuse-lite/data/features/css-clip-path'), function (browsers) { + return prefix(['clip-path'], { + feature: 'css-clip-path', + browsers: browsers + }); +}); // Fragmented Borders and Backgrounds + +f(require('caniuse-lite/data/features/css-boxdecorationbreak'), function (browsers) { + return prefix(['box-decoration-break'], { + feature: 'css-boxdecorationbreak', + browsers: browsers + }); +}); // CSS3 object-fit/object-position + +f(require('caniuse-lite/data/features/object-fit'), function (browsers) { + return prefix(['object-fit', 'object-position'], { + feature: 'object-fit', + browsers: browsers + }); +}); // CSS Shapes + +f(require('caniuse-lite/data/features/css-shapes'), function (browsers) { + return prefix(['shape-margin', 'shape-outside', 'shape-image-threshold'], { + feature: 'css-shapes', + browsers: browsers + }); +}); // CSS3 text-overflow + +f(require('caniuse-lite/data/features/text-overflow'), function (browsers) { + return prefix(['text-overflow'], { + feature: 'text-overflow', + browsers: browsers + }); +}); // Viewport at-rule + +f(require('caniuse-lite/data/features/css-deviceadaptation'), function (browsers) { + return prefix(['@viewport'], { + feature: 'css-deviceadaptation', + browsers: browsers + }); +}); // Resolution Media Queries + +var resolut = require('caniuse-lite/data/features/css-media-resolution'); + +f(resolut, { + match: /( x($| )|a #2)/ +}, function (browsers) { + return prefix(['@resolution'], { + feature: 'css-media-resolution', + browsers: browsers + }); +}); // CSS text-align-last + +f(require('caniuse-lite/data/features/css-text-align-last'), function (browsers) { + return prefix(['text-align-last'], { + feature: 'css-text-align-last', + browsers: browsers + }); +}); // Crisp Edges Image Rendering Algorithm + +var crispedges = require('caniuse-lite/data/features/css-crisp-edges'); + +f(crispedges, { + match: /y x|a x #1/ +}, function (browsers) { + return prefix(['pixelated'], { + props: ['image-rendering'], + feature: 'css-crisp-edges', + browsers: browsers + }); +}); +f(crispedges, { + match: /a x #2/ +}, function (browsers) { + return prefix(['image-rendering'], { + feature: 'css-crisp-edges', + browsers: browsers + }); +}); // Logical Properties + +var logicalProps = require('caniuse-lite/data/features/css-logical-props'); + +f(logicalProps, function (browsers) { + return prefix(['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end'], { + feature: 'css-logical-props', + browsers: browsers + }); +}); +f(logicalProps, { + match: /x\s#2/ +}, function (browsers) { + return prefix(['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end'], { + feature: 'css-logical-props', + browsers: browsers + }); +}); // CSS appearance + +var appearance = require('caniuse-lite/data/features/css-appearance'); + +f(appearance, { + match: /#2|x/ +}, function (browsers) { + return prefix(['appearance'], { + feature: 'css-appearance', + browsers: browsers + }); +}); // CSS Scroll snap points + +f(require('caniuse-lite/data/features/css-snappoints'), function (browsers) { + return prefix(['scroll-snap-type', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scroll-snap-points-x', 'scroll-snap-points-y'], { + feature: 'css-snappoints', + browsers: browsers + }); +}); // CSS Regions + +f(require('caniuse-lite/data/features/css-regions'), function (browsers) { + return prefix(['flow-into', 'flow-from', 'region-fragment'], { + feature: 'css-regions', + browsers: browsers + }); +}); // CSS image-set + +f(require('caniuse-lite/data/features/css-image-set'), function (browsers) { + return prefix(['image-set'], { + props: ['background', 'background-image', 'border-image', 'cursor', 'mask', 'mask-image', 'list-style', 'list-style-image', 'content'], + feature: 'css-image-set', + browsers: browsers + }); +}); // Writing Mode + +var writingMode = require('caniuse-lite/data/features/css-writing-mode'); + +f(writingMode, { + match: /a|x/ +}, function (browsers) { + return prefix(['writing-mode'], { + feature: 'css-writing-mode', + browsers: browsers + }); +}); // Cross-Fade Function + +f(require('caniuse-lite/data/features/css-cross-fade'), function (browsers) { + return prefix(['cross-fade'], { + props: ['background', 'background-image', 'border-image', 'mask', 'list-style', 'list-style-image', 'content', 'mask-image'], + feature: 'css-cross-fade', + browsers: browsers + }); +}); // Read Only selector + +f(require('caniuse-lite/data/features/css-read-only-write'), function (browsers) { + return prefix([':read-only', ':read-write'], { + selector: true, + feature: 'css-read-only-write', + browsers: browsers + }); +}); // Text Emphasize + +f(require('caniuse-lite/data/features/text-emphasis'), function (browsers) { + return prefix(['text-emphasis', 'text-emphasis-position', 'text-emphasis-style', 'text-emphasis-color'], { + feature: 'text-emphasis', + browsers: browsers + }); +}); // CSS Grid Layout + +var grid = require('caniuse-lite/data/features/css-grid'); + +f(grid, function (browsers) { + prefix(['display-grid', 'inline-grid'], { + props: ['display'], + feature: 'css-grid', + browsers: browsers + }); + prefix(['grid-template-columns', 'grid-template-rows', 'grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-row', 'grid-column', 'grid-area', 'grid-template', 'grid-template-areas', 'place-self'], { + feature: 'css-grid', + browsers: browsers + }); +}); +f(grid, { + match: /a x/ +}, function (browsers) { + return prefix(['grid-column-align', 'grid-row-align'], { + feature: 'css-grid', + browsers: browsers + }); +}); // CSS text-spacing + +f(require('caniuse-lite/data/features/css-text-spacing'), function (browsers) { + return prefix(['text-spacing'], { + feature: 'css-text-spacing', + browsers: browsers + }); +}); // :any-link selector + +f(require('caniuse-lite/data/features/css-any-link'), function (browsers) { + return prefix([':any-link'], { + selector: true, + feature: 'css-any-link', + browsers: browsers + }); +}); // unicode-bidi + +var bidi = require('caniuse-lite/data/features/css-unicode-bidi'); + +f(bidi, function (browsers) { + return prefix(['isolate'], { + props: ['unicode-bidi'], + feature: 'css-unicode-bidi', + browsers: browsers + }); +}); +f(bidi, { + match: /y x|a x #2/ +}, function (browsers) { + return prefix(['plaintext'], { + props: ['unicode-bidi'], + feature: 'css-unicode-bidi', + browsers: browsers + }); +}); +f(bidi, { + match: /y x/ +}, function (browsers) { + return prefix(['isolate-override'], { + props: ['unicode-bidi'], + feature: 'css-unicode-bidi', + browsers: browsers + }); +}); // overscroll-behavior selector + +var over = require('caniuse-lite/data/features/css-overscroll-behavior'); + +f(over, { + match: /a #1/ +}, function (browsers) { + return prefix(['overscroll-behavior'], { + feature: 'css-overscroll-behavior', + browsers: browsers + }); +}); // color-adjust + +f(require('caniuse-lite/data/features/css-color-adjust'), function (browsers) { + return prefix(['color-adjust'], { + feature: 'css-color-adjust', + browsers: browsers + }); +}); // text-orientation + +f(require('caniuse-lite/data/features/css-text-orientation'), function (browsers) { + return prefix(['text-orientation'], { + feature: 'css-text-orientation', + browsers: browsers + }); +});
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/at-rule.js b/node_modules/autoprefixer/lib/at-rule.js new file mode 100644 index 0000000..3abf80b --- /dev/null +++ b/node_modules/autoprefixer/lib/at-rule.js @@ -0,0 +1,69 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +var Prefixer = require('./prefixer'); + +var AtRule = +/*#__PURE__*/ +function (_Prefixer) { + _inheritsLoose(AtRule, _Prefixer); + + function AtRule() { + return _Prefixer.apply(this, arguments) || this; + } + + var _proto = AtRule.prototype; + + /** + * Clone and add prefixes for at-rule + */ + _proto.add = function add(rule, prefix) { + var prefixed = prefix + rule.name; + var already = rule.parent.some(function (i) { + return i.name === prefixed && i.params === rule.params; + }); + + if (already) { + return undefined; + } + + var cloned = this.clone(rule, { + name: prefixed + }); + return rule.parent.insertBefore(rule, cloned); + } + /** + * Clone node with prefixes + */ + ; + + _proto.process = function process(node) { + var parent = this.parentPrefix(node); + + for (var _iterator = this.prefixes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prefix = _ref; + + if (!parent || parent === prefix) { + this.add(node, prefix); + } + } + }; + + return AtRule; +}(Prefixer); + +module.exports = AtRule;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/autoprefixer.js b/node_modules/autoprefixer/lib/autoprefixer.js new file mode 100644 index 0000000..ce70740 --- /dev/null +++ b/node_modules/autoprefixer/lib/autoprefixer.js @@ -0,0 +1,157 @@ +"use strict"; + +var browserslist = require('browserslist'); + +var postcss = require('postcss'); + +var agents = require('caniuse-lite').agents; + +var chalk = require('chalk'); + +var Browsers = require('./browsers'); + +var Prefixes = require('./prefixes'); + +var data = require('../data/prefixes'); + +var info = require('./info'); + +var WARNING = '\n' + ' Replace Autoprefixer `browsers` option to Browserslist config.\n' + ' Use `browserslist` key in `package.json` or `.browserslistrc` file.\n' + '\n' + ' Using `browsers` option cause some error. Browserslist config \n' + ' can be used for Babel, Autoprefixer, postcss-normalize and other tools.\n' + '\n' + ' If you really need to use option, rename it to `overrideBrowserslist`.\n' + '\n' + ' Learn more at:\n' + ' https://github.com/browserslist/browserslist#readme\n' + ' https://twitter.com/browserslist\n' + '\n'; + +function isPlainObject(obj) { + return Object.prototype.toString.apply(obj) === '[object Object]'; +} + +var cache = {}; + +function timeCapsule(result, prefixes) { + if (prefixes.browsers.selected.length === 0) { + return; + } + + if (prefixes.add.selectors.length > 0) { + return; + } + + if (Object.keys(prefixes.add).length > 2) { + return; + } + /* istanbul ignore next */ + + + result.warn('Greetings, time traveller. ' + 'We are in the golden age of prefix-less CSS, ' + 'where Autoprefixer is no longer needed for your stylesheet.'); +} + +module.exports = postcss.plugin('autoprefixer', function () { + for (var _len = arguments.length, reqs = new Array(_len), _key = 0; _key < _len; _key++) { + reqs[_key] = arguments[_key]; + } + + var options; + + if (reqs.length === 1 && isPlainObject(reqs[0])) { + options = reqs[0]; + reqs = undefined; + } else if (reqs.length === 0 || reqs.length === 1 && !reqs[0]) { + reqs = undefined; + } else if (reqs.length <= 2 && (Array.isArray(reqs[0]) || !reqs[0])) { + options = reqs[1]; + reqs = reqs[0]; + } else if (typeof reqs[reqs.length - 1] === 'object') { + options = reqs.pop(); + } + + if (!options) { + options = {}; + } + + if (options.browser) { + throw new Error('Change `browser` option to `overrideBrowserslist` in Autoprefixer'); + } else if (options.browserslist) { + throw new Error('Change `browserslist` option to `overrideBrowserslist` in Autoprefixer'); + } + + if (options.overrideBrowserslist) { + reqs = options.overrideBrowserslist; + } else if (options.browsers) { + if (typeof console !== 'undefined' && console.warn) { + if (chalk && chalk.red) { + console.warn(chalk.red(WARNING.replace(/`[^`]+`/g, function (i) { + return chalk.yellow(i.slice(1, -1)); + }))); + } else { + console.warn(WARNING); + } + } + + reqs = options.browsers; + } + + if (typeof options.grid === 'undefined') { + options.grid = false; + } + + var brwlstOpts = { + ignoreUnknownVersions: options.ignoreUnknownVersions, + stats: options.stats + }; + + function loadPrefixes(opts) { + var d = module.exports.data; + var browsers = new Browsers(d.browsers, reqs, opts, brwlstOpts); + var key = browsers.selected.join(', ') + JSON.stringify(options); + + if (!cache[key]) { + cache[key] = new Prefixes(d.prefixes, browsers, options); + } + + return cache[key]; + } + + function plugin(css, result) { + var prefixes = loadPrefixes({ + from: css.source && css.source.input.file, + env: options.env + }); + timeCapsule(result, prefixes); + + if (options.remove !== false) { + prefixes.processor.remove(css, result); + } + + if (options.add !== false) { + prefixes.processor.add(css, result); + } + } + + plugin.options = options; + plugin.browsers = reqs; + + plugin.info = function (opts) { + opts = opts || {}; + opts.from = opts.from || process.cwd(); + return info(loadPrefixes(opts)); + }; + + return plugin; +}); +/** + * Autoprefixer data + */ + +module.exports.data = { + browsers: agents, + prefixes: data +}; +/** + * Autoprefixer default browsers + */ + +module.exports.defaults = browserslist.defaults; +/** + * Inspect with default Autoprefixer + */ + +module.exports.info = function () { + return module.exports().info(); +};
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/brackets.js b/node_modules/autoprefixer/lib/brackets.js new file mode 100644 index 0000000..c548609 --- /dev/null +++ b/node_modules/autoprefixer/lib/brackets.js @@ -0,0 +1,80 @@ +"use strict"; + +function last(array) { + return array[array.length - 1]; +} + +var brackets = { + /** + * Parse string to nodes tree + */ + parse: function parse(str) { + var current = ['']; + var stack = [current]; + + for (var _iterator = str, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var sym = _ref; + + if (sym === '(') { + current = ['']; + last(stack).push(current); + stack.push(current); + continue; + } + + if (sym === ')') { + stack.pop(); + current = last(stack); + current.push(''); + continue; + } + + current[current.length - 1] += sym; + } + + return stack[0]; + }, + + /** + * Generate output string by nodes tree + */ + stringify: function stringify(ast) { + var result = ''; + + for (var _iterator2 = ast, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var i = _ref2; + + if (typeof i === 'object') { + result += "(" + brackets.stringify(i) + ")"; + continue; + } + + result += i; + } + + return result; + } +}; +module.exports = brackets;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/browsers.js b/node_modules/autoprefixer/lib/browsers.js new file mode 100644 index 0000000..f2166f1 --- /dev/null +++ b/node_modules/autoprefixer/lib/browsers.js @@ -0,0 +1,99 @@ +"use strict"; + +var browserslist = require('browserslist'); + +var agents = require('caniuse-lite').agents; + +var utils = require('./utils'); + +var Browsers = +/*#__PURE__*/ +function () { + /** + * Return all prefixes for default browser data + */ + Browsers.prefixes = function prefixes() { + if (this.prefixesCache) { + return this.prefixesCache; + } + + this.prefixesCache = []; + + for (var name in agents) { + this.prefixesCache.push("-" + agents[name].prefix + "-"); + } + + this.prefixesCache = utils.uniq(this.prefixesCache).sort(function (a, b) { + return b.length - a.length; + }); + return this.prefixesCache; + } + /** + * Check is value contain any possible prefix + */ + ; + + Browsers.withPrefix = function withPrefix(value) { + if (!this.prefixesRegexp) { + this.prefixesRegexp = new RegExp(this.prefixes().join('|')); + } + + return this.prefixesRegexp.test(value); + }; + + function Browsers(data, requirements, options, browserslistOpts) { + this.data = data; + this.options = options || {}; + this.browserslistOpts = browserslistOpts || {}; + this.selected = this.parse(requirements); + } + /** + * Return browsers selected by requirements + */ + + + var _proto = Browsers.prototype; + + _proto.parse = function parse(requirements) { + var opts = {}; + + for (var i in this.browserslistOpts) { + opts[i] = this.browserslistOpts[i]; + } + + opts.path = this.options.from; + opts.env = this.options.env; + return browserslist(requirements, opts); + } + /** + * Return prefix for selected browser + */ + ; + + _proto.prefix = function prefix(browser) { + var _browser$split = browser.split(' '), + name = _browser$split[0], + version = _browser$split[1]; + + var data = this.data[name]; + var prefix = data.prefix_exceptions && data.prefix_exceptions[version]; + + if (!prefix) { + prefix = data.prefix; + } + + return "-" + prefix + "-"; + } + /** + * Is browser is selected by requirements + */ + ; + + _proto.isSelected = function isSelected(browser) { + return this.selected.includes(browser); + }; + + return Browsers; +}(); + +module.exports = Browsers;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/declaration.js b/node_modules/autoprefixer/lib/declaration.js new file mode 100644 index 0000000..3674d2c --- /dev/null +++ b/node_modules/autoprefixer/lib/declaration.js @@ -0,0 +1,261 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +var Prefixer = require('./prefixer'); + +var Browsers = require('./browsers'); + +var utils = require('./utils'); + +var Declaration = +/*#__PURE__*/ +function (_Prefixer) { + _inheritsLoose(Declaration, _Prefixer); + + function Declaration() { + return _Prefixer.apply(this, arguments) || this; + } + + var _proto = Declaration.prototype; + + /** + * Always true, because we already get prefixer by property name + */ + _proto.check = function check() + /* decl */ + { + return true; + } + /** + * Return prefixed version of property + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + prop; + } + /** + * Return unprefixed version of property + */ + ; + + _proto.normalize = function normalize(prop) { + return prop; + } + /** + * Check `value`, that it contain other prefixes, rather than `prefix` + */ + ; + + _proto.otherPrefixes = function otherPrefixes(value, prefix) { + for (var _iterator = Browsers.prefixes(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var other = _ref; + + if (other === prefix) { + continue; + } + + if (value.includes(other)) { + return true; + } + } + + return false; + } + /** + * Set prefix to declaration + */ + ; + + _proto.set = function set(decl, prefix) { + decl.prop = this.prefixed(decl.prop, prefix); + return decl; + } + /** + * Should we use visual cascade for prefixes + */ + ; + + _proto.needCascade = function needCascade(decl) { + if (!decl._autoprefixerCascade) { + decl._autoprefixerCascade = this.all.options.cascade !== false && decl.raw('before').includes('\n'); + } + + return decl._autoprefixerCascade; + } + /** + * Return maximum length of possible prefixed property + */ + ; + + _proto.maxPrefixed = function maxPrefixed(prefixes, decl) { + if (decl._autoprefixerMax) { + return decl._autoprefixerMax; + } + + var max = 0; + + for (var _iterator2 = prefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var prefix = _ref2; + prefix = utils.removeNote(prefix); + + if (prefix.length > max) { + max = prefix.length; + } + } + + decl._autoprefixerMax = max; + return decl._autoprefixerMax; + } + /** + * Calculate indentation to create visual cascade + */ + ; + + _proto.calcBefore = function calcBefore(prefixes, decl, prefix) { + if (prefix === void 0) { + prefix = ''; + } + + var max = this.maxPrefixed(prefixes, decl); + var diff = max - utils.removeNote(prefix).length; + var before = decl.raw('before'); + + if (diff > 0) { + before += Array(diff).fill(' ').join(''); + } + + return before; + } + /** + * Remove visual cascade + */ + ; + + _proto.restoreBefore = function restoreBefore(decl) { + var lines = decl.raw('before').split('\n'); + var min = lines[lines.length - 1]; + this.all.group(decl).up(function (prefixed) { + var array = prefixed.raw('before').split('\n'); + var last = array[array.length - 1]; + + if (last.length < min.length) { + min = last; + } + }); + lines[lines.length - 1] = min; + decl.raws.before = lines.join('\n'); + } + /** + * Clone and insert new declaration + */ + ; + + _proto.insert = function insert(decl, prefix, prefixes) { + var cloned = this.set(this.clone(decl), prefix); + if (!cloned) return undefined; + var already = decl.parent.some(function (i) { + return i.prop === cloned.prop && i.value === cloned.value; + }); + + if (already) { + return undefined; + } + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + return decl.parent.insertBefore(decl, cloned); + } + /** + * Did this declaration has this prefix above + */ + ; + + _proto.isAlready = function isAlready(decl, prefixed) { + var already = this.all.group(decl).up(function (i) { + return i.prop === prefixed; + }); + + if (!already) { + already = this.all.group(decl).down(function (i) { + return i.prop === prefixed; + }); + } + + return already; + } + /** + * Clone and add prefixes for declaration + */ + ; + + _proto.add = function add(decl, prefix, prefixes, result) { + var prefixed = this.prefixed(decl.prop, prefix); + + if (this.isAlready(decl, prefixed) || this.otherPrefixes(decl.value, prefix)) { + return undefined; + } + + return this.insert(decl, prefix, prefixes, result); + } + /** + * Add spaces for visual cascade + */ + ; + + _proto.process = function process(decl, result) { + if (!this.needCascade(decl)) { + _Prefixer.prototype.process.call(this, decl, result); + + return; + } + + var prefixes = _Prefixer.prototype.process.call(this, decl, result); + + if (!prefixes || !prefixes.length) { + return; + } + + this.restoreBefore(decl); + decl.raws.before = this.calcBefore(prefixes, decl); + } + /** + * Return list of prefixed properties to clean old prefixes + */ + ; + + _proto.old = function old(prop, prefix) { + return [this.prefixed(prop, prefix)]; + }; + + return Declaration; +}(Prefixer); + +module.exports = Declaration;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/align-content.js b/node_modules/autoprefixer/lib/hacks/align-content.js new file mode 100644 index 0000000..2796f56 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/align-content.js @@ -0,0 +1,81 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var AlignContent = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(AlignContent, _Declaration); + + function AlignContent() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = AlignContent.prototype; + + /** + * Change property name for 2012 spec + */ + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2012) { + return prefix + 'flex-line-pack'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize() { + return 'align-content'; + } + /** + * Change value for 2012 spec and ignore prefix for 2009 + */ + ; + + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec === 2012) { + decl.value = AlignContent.oldValues[decl.value] || decl.value; + return _Declaration.prototype.set.call(this, decl, prefix); + } + + if (spec === 'final') { + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return undefined; + }; + + return AlignContent; +}(Declaration); + +_defineProperty(AlignContent, "names", ['align-content', 'flex-line-pack']); + +_defineProperty(AlignContent, "oldValues", { + 'flex-end': 'end', + 'flex-start': 'start', + 'space-between': 'justify', + 'space-around': 'distribute' +}); + +module.exports = AlignContent;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/align-items.js b/node_modules/autoprefixer/lib/hacks/align-items.js new file mode 100644 index 0000000..a9ed9ba --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/align-items.js @@ -0,0 +1,78 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var AlignItems = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(AlignItems, _Declaration); + + function AlignItems() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = AlignItems.prototype; + + /** + * Change property name for 2009 and 2012 specs + */ + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2009) { + return prefix + 'box-align'; + } + + if (spec === 2012) { + return prefix + 'flex-align'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize() { + return 'align-items'; + } + /** + * Change value for 2009 and 2012 specs + */ + ; + + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec === 2009 || spec === 2012) { + decl.value = AlignItems.oldValues[decl.value] || decl.value; + } + + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return AlignItems; +}(Declaration); + +_defineProperty(AlignItems, "names", ['align-items', 'flex-align', 'box-align']); + +_defineProperty(AlignItems, "oldValues", { + 'flex-end': 'end', + 'flex-start': 'start' +}); + +module.exports = AlignItems;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/align-self.js b/node_modules/autoprefixer/lib/hacks/align-self.js new file mode 100644 index 0000000..9a2b5f6 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/align-self.js @@ -0,0 +1,86 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var AlignSelf = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(AlignSelf, _Declaration); + + function AlignSelf() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = AlignSelf.prototype; + + _proto.check = function check(decl) { + return decl.parent && decl.parent.every(function (i) { + return !/^grid-/.test(i.prop); + }); + } + /** + * Change property name for 2012 specs + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2012) { + return prefix + 'flex-item-align'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize() { + return 'align-self'; + } + /** + * Change value for 2012 spec and ignore prefix for 2009 + */ + ; + + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec === 2012) { + decl.value = AlignSelf.oldValues[decl.value] || decl.value; + return _Declaration.prototype.set.call(this, decl, prefix); + } + + if (spec === 'final') { + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return undefined; + }; + + return AlignSelf; +}(Declaration); + +_defineProperty(AlignSelf, "names", ['align-self', 'flex-item-align']); + +_defineProperty(AlignSelf, "oldValues", { + 'flex-end': 'end', + 'flex-start': 'start' +}); + +module.exports = AlignSelf;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/animation.js b/node_modules/autoprefixer/lib/hacks/animation.js new file mode 100644 index 0000000..55a03d9 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/animation.js @@ -0,0 +1,37 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var Animation = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(Animation, _Declaration); + + function Animation() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = Animation.prototype; + + /** + * Don’t add prefixes for modern values. + */ + _proto.check = function check(decl) { + return !decl.value.split(/\s+/).some(function (i) { + var lower = i.toLowerCase(); + return lower === 'reverse' || lower === 'alternate-reverse'; + }); + }; + + return Animation; +}(Declaration); + +_defineProperty(Animation, "names", ['animation', 'animation-direction']); + +module.exports = Animation;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/appearance.js b/node_modules/autoprefixer/lib/hacks/appearance.js new file mode 100644 index 0000000..29424d9 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/appearance.js @@ -0,0 +1,41 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var utils = require('../utils'); + +var Appearance = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(Appearance, _Declaration); + + function Appearance(name, prefixes, all) { + var _this; + + _this = _Declaration.call(this, name, prefixes, all) || this; + + if (_this.prefixes) { + _this.prefixes = utils.uniq(_this.prefixes.map(function (i) { + if (i === '-ms-') { + return '-webkit-'; + } + + return i; + })); + } + + return _this; + } + + return Appearance; +}(Declaration); + +_defineProperty(Appearance, "names", ['appearance']); + +module.exports = Appearance;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/backdrop-filter.js b/node_modules/autoprefixer/lib/hacks/backdrop-filter.js new file mode 100644 index 0000000..5b97e82 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/backdrop-filter.js @@ -0,0 +1,37 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var utils = require('../utils'); + +var BackdropFilter = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BackdropFilter, _Declaration); + + function BackdropFilter(name, prefixes, all) { + var _this; + + _this = _Declaration.call(this, name, prefixes, all) || this; + + if (_this.prefixes) { + _this.prefixes = utils.uniq(_this.prefixes.map(function (i) { + return i === '-ms-' ? '-webkit-' : i; + })); + } + + return _this; + } + + return BackdropFilter; +}(Declaration); + +_defineProperty(BackdropFilter, "names", ['backdrop-filter']); + +module.exports = BackdropFilter;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/background-clip.js b/node_modules/autoprefixer/lib/hacks/background-clip.js new file mode 100644 index 0000000..58fcbb6 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/background-clip.js @@ -0,0 +1,43 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var utils = require('../utils'); + +var BackgroundClip = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BackgroundClip, _Declaration); + + function BackgroundClip(name, prefixes, all) { + var _this; + + _this = _Declaration.call(this, name, prefixes, all) || this; + + if (_this.prefixes) { + _this.prefixes = utils.uniq(_this.prefixes.map(function (i) { + return i === '-ms-' ? '-webkit-' : i; + })); + } + + return _this; + } + + var _proto = BackgroundClip.prototype; + + _proto.check = function check(decl) { + return decl.value.toLowerCase() === 'text'; + }; + + return BackgroundClip; +}(Declaration); + +_defineProperty(BackgroundClip, "names", ['background-clip']); + +module.exports = BackgroundClip;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/background-size.js b/node_modules/autoprefixer/lib/hacks/background-size.js new file mode 100644 index 0000000..2b9a035 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/background-size.js @@ -0,0 +1,40 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var BackgroundSize = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BackgroundSize, _Declaration); + + function BackgroundSize() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = BackgroundSize.prototype; + + /** + * Duplication parameter for -webkit- browsers + */ + _proto.set = function set(decl, prefix) { + var value = decl.value.toLowerCase(); + + if (prefix === '-webkit-' && value.indexOf(' ') === -1 && value !== 'contain' && value !== 'cover') { + decl.value = decl.value + ' ' + decl.value; + } + + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return BackgroundSize; +}(Declaration); + +_defineProperty(BackgroundSize, "names", ['background-size']); + +module.exports = BackgroundSize;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/block-logical.js b/node_modules/autoprefixer/lib/hacks/block-logical.js new file mode 100644 index 0000000..e89ab81 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/block-logical.js @@ -0,0 +1,50 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var BlockLogical = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BlockLogical, _Declaration); + + function BlockLogical() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = BlockLogical.prototype; + + /** + * Use old syntax for -moz- and -webkit- + */ + _proto.prefixed = function prefixed(prop, prefix) { + if (prop.indexOf('-start') !== -1) { + return prefix + prop.replace('-block-start', '-before'); + } + + return prefix + prop.replace('-block-end', '-after'); + } + /** + * Return property name by spec + */ + ; + + _proto.normalize = function normalize(prop) { + if (prop.indexOf('-before') !== -1) { + return prop.replace('-before', '-block-start'); + } + + return prop.replace('-after', '-block-end'); + }; + + return BlockLogical; +}(Declaration); + +_defineProperty(BlockLogical, "names", ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after']); + +module.exports = BlockLogical;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/border-image.js b/node_modules/autoprefixer/lib/hacks/border-image.js new file mode 100644 index 0000000..aebd64a --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/border-image.js @@ -0,0 +1,35 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var BorderImage = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BorderImage, _Declaration); + + function BorderImage() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = BorderImage.prototype; + + /** + * Remove fill parameter for prefixed declarations + */ + _proto.set = function set(decl, prefix) { + decl.value = decl.value.replace(/\s+fill(\s)/, '$1'); + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return BorderImage; +}(Declaration); + +_defineProperty(BorderImage, "names", ['border-image']); + +module.exports = BorderImage;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/border-radius.js b/node_modules/autoprefixer/lib/hacks/border-radius.js new file mode 100644 index 0000000..3bd42fc --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/border-radius.js @@ -0,0 +1,64 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var BorderRadius = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BorderRadius, _Declaration); + + function BorderRadius() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = BorderRadius.prototype; + + /** + * Change syntax, when add Mozilla prefix + */ + _proto.prefixed = function prefixed(prop, prefix) { + if (prefix === '-moz-') { + return prefix + (BorderRadius.toMozilla[prop] || prop); + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return unprefixed version of property + */ + ; + + _proto.normalize = function normalize(prop) { + return BorderRadius.toNormal[prop] || prop; + }; + + return BorderRadius; +}(Declaration); + +_defineProperty(BorderRadius, "names", ['border-radius']); + +_defineProperty(BorderRadius, "toMozilla", {}); + +_defineProperty(BorderRadius, "toNormal", {}); + +for (var _i = 0, _arr = ['top', 'bottom']; _i < _arr.length; _i++) { + var ver = _arr[_i]; + + for (var _i2 = 0, _arr2 = ['left', 'right']; _i2 < _arr2.length; _i2++) { + var hor = _arr2[_i2]; + var normal = "border-" + ver + "-" + hor + "-radius"; + var mozilla = "border-radius-" + ver + hor; + BorderRadius.names.push(normal); + BorderRadius.names.push(mozilla); + BorderRadius.toMozilla[normal] = mozilla; + BorderRadius.toNormal[mozilla] = normal; + } +} + +module.exports = BorderRadius;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/break-props.js b/node_modules/autoprefixer/lib/hacks/break-props.js new file mode 100644 index 0000000..7433035 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/break-props.js @@ -0,0 +1,78 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var BreakProps = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(BreakProps, _Declaration); + + function BreakProps() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = BreakProps.prototype; + + /** + * Change name for -webkit- and -moz- prefix + */ + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + "column-" + prop; + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize(prop) { + if (prop.indexOf('inside') !== -1) { + return 'break-inside'; + } + + if (prop.indexOf('before') !== -1) { + return 'break-before'; + } + + return 'break-after'; + } + /** + * Change prefixed value for avoid-column and avoid-page + */ + ; + + _proto.set = function set(decl, prefix) { + if (decl.prop === 'break-inside' && decl.value === 'avoid-column' || decl.value === 'avoid-page') { + decl.value = 'avoid'; + } + + return _Declaration.prototype.set.call(this, decl, prefix); + } + /** + * Don’t prefix some values + */ + ; + + _proto.insert = function insert(decl, prefix, prefixes) { + if (decl.prop !== 'break-inside') { + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + } + + if (/region/i.test(decl.value) || /page/i.test(decl.value)) { + return undefined; + } + + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + }; + + return BreakProps; +}(Declaration); + +_defineProperty(BreakProps, "names", ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after']); + +module.exports = BreakProps;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/color-adjust.js b/node_modules/autoprefixer/lib/hacks/color-adjust.js new file mode 100644 index 0000000..70f332d --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/color-adjust.js @@ -0,0 +1,42 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var ColorAdjust = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(ColorAdjust, _Declaration); + + function ColorAdjust() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = ColorAdjust.prototype; + + /** + * Change property name for WebKit-based browsers + */ + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + 'print-color-adjust'; + } + /** + * Return property name by spec + */ + ; + + _proto.normalize = function normalize() { + return 'color-adjust'; + }; + + return ColorAdjust; +}(Declaration); + +_defineProperty(ColorAdjust, "names", ['color-adjust', 'print-color-adjust']); + +module.exports = ColorAdjust;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/cross-fade.js b/node_modules/autoprefixer/lib/hacks/cross-fade.js new file mode 100644 index 0000000..b1f0b6e --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/cross-fade.js @@ -0,0 +1,56 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var list = require('postcss').list; + +var Value = require('../value'); + +var CrossFade = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(CrossFade, _Value); + + function CrossFade() { + return _Value.apply(this, arguments) || this; + } + + var _proto = CrossFade.prototype; + + _proto.replace = function replace(string, prefix) { + var _this = this; + + return list.space(string).map(function (value) { + if (value.slice(0, +_this.name.length + 1) !== _this.name + '(') { + return value; + } + + var close = value.lastIndexOf(')'); + var after = value.slice(close + 1); + var args = value.slice(_this.name.length + 1, close); + + if (prefix === '-webkit-') { + var match = args.match(/\d*.?\d+%?/); + + if (match) { + args = args.slice(match[0].length).trim(); + args += ", " + match[0]; + } else { + args += ', 0.5'; + } + } + + return prefix + _this.name + '(' + args + ')' + after; + }).join(' '); + }; + + return CrossFade; +}(Value); + +_defineProperty(CrossFade, "names", ['cross-fade']); + +module.exports = CrossFade;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/display-flex.js b/node_modules/autoprefixer/lib/hacks/display-flex.js new file mode 100644 index 0000000..1da30b3 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/display-flex.js @@ -0,0 +1,96 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var OldValue = require('../old-value'); + +var Value = require('../value'); + +var DisplayFlex = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(DisplayFlex, _Value); + + function DisplayFlex(name, prefixes) { + var _this; + + _this = _Value.call(this, name, prefixes) || this; + + if (name === 'display-flex') { + _this.name = 'flex'; + } + + return _this; + } + /** + * Faster check for flex value + */ + + + var _proto = DisplayFlex.prototype; + + _proto.check = function check(decl) { + return decl.prop === 'display' && decl.value === this.name; + } + /** + * Return value by spec + */ + ; + + _proto.prefixed = function prefixed(prefix) { + var spec, value; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2009) { + if (this.name === 'flex') { + value = 'box'; + } else { + value = 'inline-box'; + } + } else if (spec === 2012) { + if (this.name === 'flex') { + value = 'flexbox'; + } else { + value = 'inline-flexbox'; + } + } else if (spec === 'final') { + value = this.name; + } + + return prefix + value; + } + /** + * Add prefix to value depend on flebox spec version + */ + ; + + _proto.replace = function replace(string, prefix) { + return this.prefixed(prefix); + } + /** + * Change value for old specs + */ + ; + + _proto.old = function old(prefix) { + var prefixed = this.prefixed(prefix); + if (!prefixed) return undefined; + return new OldValue(this.name, prefixed); + }; + + return DisplayFlex; +}(Value); + +_defineProperty(DisplayFlex, "names", ['display-flex', 'inline-flex']); + +module.exports = DisplayFlex;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/display-grid.js b/node_modules/autoprefixer/lib/hacks/display-grid.js new file mode 100644 index 0000000..bc63bf8 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/display-grid.js @@ -0,0 +1,43 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Value = require('../value'); + +var DisplayGrid = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(DisplayGrid, _Value); + + function DisplayGrid(name, prefixes) { + var _this; + + _this = _Value.call(this, name, prefixes) || this; + + if (name === 'display-grid') { + _this.name = 'grid'; + } + + return _this; + } + /** + * Faster check for flex value + */ + + + var _proto = DisplayGrid.prototype; + + _proto.check = function check(decl) { + return decl.prop === 'display' && decl.value === this.name; + }; + + return DisplayGrid; +}(Value); + +_defineProperty(DisplayGrid, "names", ['display-grid', 'inline-grid']); + +module.exports = DisplayGrid;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/filter-value.js b/node_modules/autoprefixer/lib/hacks/filter-value.js new file mode 100644 index 0000000..c4c6416 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/filter-value.js @@ -0,0 +1,33 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Value = require('../value'); + +var FilterValue = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(FilterValue, _Value); + + function FilterValue(name, prefixes) { + var _this; + + _this = _Value.call(this, name, prefixes) || this; + + if (name === 'filter-function') { + _this.name = 'filter'; + } + + return _this; + } + + return FilterValue; +}(Value); + +_defineProperty(FilterValue, "names", ['filter', 'filter-function']); + +module.exports = FilterValue;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/filter.js b/node_modules/autoprefixer/lib/hacks/filter.js new file mode 100644 index 0000000..9d44404 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/filter.js @@ -0,0 +1,35 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var Filter = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(Filter, _Declaration); + + function Filter() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = Filter.prototype; + + /** + * Check is it Internet Explorer filter + */ + _proto.check = function check(decl) { + var v = decl.value; + return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1; + }; + + return Filter; +}(Declaration); + +_defineProperty(Filter, "names", ['filter']); + +module.exports = Filter;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-basis.js b/node_modules/autoprefixer/lib/hacks/flex-basis.js new file mode 100644 index 0000000..351d61d --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-basis.js @@ -0,0 +1,74 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var FlexBasis = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(FlexBasis, _Declaration); + + function FlexBasis() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = FlexBasis.prototype; + + /** + * Return property name by final spec + */ + _proto.normalize = function normalize() { + return 'flex-basis'; + } + /** + * Return flex property for 2012 spec + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2012) { + return prefix + 'flex-preferred-size'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Ignore 2009 spec and use flex property for 2012 + */ + ; + + _proto.set = function set(decl, prefix) { + var spec; + + var _flexSpec2 = flexSpec(prefix); + + spec = _flexSpec2[0]; + prefix = _flexSpec2[1]; + + if (spec === 2012 || spec === 'final') { + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return undefined; + }; + + return FlexBasis; +}(Declaration); + +_defineProperty(FlexBasis, "names", ['flex-basis', 'flex-preferred-size']); + +module.exports = FlexBasis;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-direction.js b/node_modules/autoprefixer/lib/hacks/flex-direction.js new file mode 100644 index 0000000..bac62af --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-direction.js @@ -0,0 +1,110 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var FlexDirection = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(FlexDirection, _Declaration); + + function FlexDirection() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = FlexDirection.prototype; + + /** + * Return property name by final spec + */ + _proto.normalize = function normalize() { + return 'flex-direction'; + } + /** + * Use two properties for 2009 spec + */ + ; + + _proto.insert = function insert(decl, prefix, prefixes) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec !== 2009) { + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + } + + var already = decl.parent.some(function (i) { + return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'; + }); + + if (already) { + return undefined; + } + + var v = decl.value; + var orient, dir; + + if (v === 'inherit' || v === 'initial' || v === 'unset') { + orient = v; + dir = v; + } else { + orient = v.indexOf('row') !== -1 ? 'horizontal' : 'vertical'; + dir = v.indexOf('reverse') !== -1 ? 'reverse' : 'normal'; + } + + var cloned = this.clone(decl); + cloned.prop = prefix + 'box-orient'; + cloned.value = orient; + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + decl.parent.insertBefore(decl, cloned); + cloned = this.clone(decl); + cloned.prop = prefix + 'box-direction'; + cloned.value = dir; + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + return decl.parent.insertBefore(decl, cloned); + } + /** + * Clean two properties for 2009 spec + */ + ; + + _proto.old = function old(prop, prefix) { + var spec; + + var _flexSpec2 = flexSpec(prefix); + + spec = _flexSpec2[0]; + prefix = _flexSpec2[1]; + + if (spec === 2009) { + return [prefix + 'box-orient', prefix + 'box-direction']; + } else { + return _Declaration.prototype.old.call(this, prop, prefix); + } + }; + + return FlexDirection; +}(Declaration); + +_defineProperty(FlexDirection, "names", ['flex-direction', 'box-direction', 'box-orient']); + +module.exports = FlexDirection;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-flow.js b/node_modules/autoprefixer/lib/hacks/flex-flow.js new file mode 100644 index 0000000..23eba4d --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-flow.js @@ -0,0 +1,83 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var FlexFlow = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(FlexFlow, _Declaration); + + function FlexFlow() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = FlexFlow.prototype; + + /** + * Use two properties for 2009 spec + */ + _proto.insert = function insert(decl, prefix, prefixes) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec !== 2009) { + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + } + + var values = decl.value.split(/\s+/).filter(function (i) { + return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse'; + }); + + if (values.length === 0) { + return undefined; + } + + var already = decl.parent.some(function (i) { + return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction'; + }); + + if (already) { + return undefined; + } + + var value = values[0]; + var orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical'; + var dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal'; + var cloned = this.clone(decl); + cloned.prop = prefix + 'box-orient'; + cloned.value = orient; + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + decl.parent.insertBefore(decl, cloned); + cloned = this.clone(decl); + cloned.prop = prefix + 'box-direction'; + cloned.value = dir; + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + return decl.parent.insertBefore(decl, cloned); + }; + + return FlexFlow; +}(Declaration); + +_defineProperty(FlexFlow, "names", ['flex-flow', 'box-direction', 'box-orient']); + +module.exports = FlexFlow;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-grow.js b/node_modules/autoprefixer/lib/hacks/flex-grow.js new file mode 100644 index 0000000..09278a2 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-grow.js @@ -0,0 +1,59 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var Flex = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(Flex, _Declaration); + + function Flex() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = Flex.prototype; + + /** + * Return property name by final spec + */ + _proto.normalize = function normalize() { + return 'flex'; + } + /** + * Return flex property for 2009 and 2012 specs + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2009) { + return prefix + 'box-flex'; + } + + if (spec === 2012) { + return prefix + 'flex-positive'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + }; + + return Flex; +}(Declaration); + +_defineProperty(Flex, "names", ['flex-grow', 'flex-positive']); + +module.exports = Flex;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-shrink.js b/node_modules/autoprefixer/lib/hacks/flex-shrink.js new file mode 100644 index 0000000..cab835c --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-shrink.js @@ -0,0 +1,74 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var FlexShrink = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(FlexShrink, _Declaration); + + function FlexShrink() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = FlexShrink.prototype; + + /** + * Return property name by final spec + */ + _proto.normalize = function normalize() { + return 'flex-shrink'; + } + /** + * Return flex property for 2012 spec + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2012) { + return prefix + 'flex-negative'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Ignore 2009 spec and use flex property for 2012 + */ + ; + + _proto.set = function set(decl, prefix) { + var spec; + + var _flexSpec2 = flexSpec(prefix); + + spec = _flexSpec2[0]; + prefix = _flexSpec2[1]; + + if (spec === 2012 || spec === 'final') { + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return undefined; + }; + + return FlexShrink; +}(Declaration); + +_defineProperty(FlexShrink, "names", ['flex-shrink', 'flex-negative']); + +module.exports = FlexShrink;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-spec.js b/node_modules/autoprefixer/lib/hacks/flex-spec.js new file mode 100644 index 0000000..d73027a --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-spec.js @@ -0,0 +1,22 @@ +"use strict"; + +/** + * Return flexbox spec versions by prefix + */ +module.exports = function (prefix) { + var spec; + + if (prefix === '-webkit- 2009' || prefix === '-moz-') { + spec = 2009; + } else if (prefix === '-ms-') { + spec = 2012; + } else if (prefix === '-webkit-') { + spec = 'final'; + } + + if (prefix === '-webkit- 2009') { + prefix = '-webkit-'; + } + + return [spec, prefix]; +};
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex-wrap.js b/node_modules/autoprefixer/lib/hacks/flex-wrap.js new file mode 100644 index 0000000..841eb62 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex-wrap.js @@ -0,0 +1,42 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var FlexWrap = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(FlexWrap, _Declaration); + + function FlexWrap() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = FlexWrap.prototype; + + /** + * Don't add prefix for 2009 spec + */ + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec !== 2009) { + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return undefined; + }; + + return FlexWrap; +}(Declaration); + +_defineProperty(FlexWrap, "names", ['flex-wrap']); + +module.exports = FlexWrap;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/flex.js b/node_modules/autoprefixer/lib/hacks/flex.js new file mode 100644 index 0000000..44c9e1e --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/flex.js @@ -0,0 +1,87 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var list = require('postcss').list; + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var Flex = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(Flex, _Declaration); + + function Flex() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = Flex.prototype; + + /** + * Change property name for 2009 spec + */ + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2009) { + return prefix + 'box-flex'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize() { + return 'flex'; + } + /** + * Spec 2009 supports only first argument + * Spec 2012 disallows unitless basis + */ + ; + + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec === 2009) { + decl.value = list.space(decl.value)[0]; + decl.value = Flex.oldValues[decl.value] || decl.value; + return _Declaration.prototype.set.call(this, decl, prefix); + } + + if (spec === 2012) { + var components = list.space(decl.value); + + if (components.length === 3 && components[2] === '0') { + decl.value = components.slice(0, 2).concat('0px').join(' '); + } + } + + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return Flex; +}(Declaration); + +_defineProperty(Flex, "names", ['flex', 'box-flex']); + +_defineProperty(Flex, "oldValues", { + auto: '1', + none: '0' +}); + +module.exports = Flex;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/fullscreen.js b/node_modules/autoprefixer/lib/hacks/fullscreen.js new file mode 100644 index 0000000..fae1849 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/fullscreen.js @@ -0,0 +1,42 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Selector = require('../selector'); + +var Fullscreen = +/*#__PURE__*/ +function (_Selector) { + _inheritsLoose(Fullscreen, _Selector); + + function Fullscreen() { + return _Selector.apply(this, arguments) || this; + } + + var _proto = Fullscreen.prototype; + + /** + * Return different selectors depend on prefix + */ + _proto.prefixed = function prefixed(prefix) { + if (prefix === '-webkit-') { + return ':-webkit-full-screen'; + } + + if (prefix === '-moz-') { + return ':-moz-full-screen'; + } + + return ":" + prefix + "fullscreen"; + }; + + return Fullscreen; +}(Selector); + +_defineProperty(Fullscreen, "names", [':fullscreen']); + +module.exports = Fullscreen;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/gradient.js b/node_modules/autoprefixer/lib/hacks/gradient.js new file mode 100644 index 0000000..c1cc747 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/gradient.js @@ -0,0 +1,581 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var parser = require('postcss-value-parser'); + +var range = require('normalize-range'); + +var OldValue = require('../old-value'); + +var Value = require('../value'); + +var utils = require('../utils'); + +var IS_DIRECTION = /top|left|right|bottom/gi; + +var Gradient = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(Gradient, _Value); + + function Gradient() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _Value.call.apply(_Value, [this].concat(args)) || this; + + _defineProperty(_assertThisInitialized(_this), "directions", { + top: 'bottom', + left: 'right', + bottom: 'top', + right: 'left' + }); + + _defineProperty(_assertThisInitialized(_this), "oldDirections", { + 'top': 'left bottom, left top', + 'left': 'right top, left top', + 'bottom': 'left top, left bottom', + 'right': 'left top, right top', + 'top right': 'left bottom, right top', + 'top left': 'right bottom, left top', + 'right top': 'left bottom, right top', + 'right bottom': 'left top, right bottom', + 'bottom right': 'left top, right bottom', + 'bottom left': 'right top, left bottom', + 'left top': 'right bottom, left top', + 'left bottom': 'right top, left bottom' + }); + + return _this; + } + + var _proto = Gradient.prototype; + + /** + * Change degrees for webkit prefix + */ + _proto.replace = function replace(string, prefix) { + var ast = parser(string); + + for (var _iterator = ast.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + + if (node.type === 'function' && node.value === this.name) { + node.nodes = this.newDirection(node.nodes); + node.nodes = this.normalize(node.nodes); + + if (prefix === '-webkit- old') { + var changes = this.oldWebkit(node); + + if (!changes) { + return false; + } + } else { + node.nodes = this.convertDirection(node.nodes); + node.value = prefix + node.value; + } + } + } + + return ast.toString(); + } + /** + * Replace first token + */ + ; + + _proto.replaceFirst = function replaceFirst(params) { + for (var _len2 = arguments.length, words = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + words[_key2 - 1] = arguments[_key2]; + } + + var prefix = words.map(function (i) { + if (i === ' ') { + return { + type: 'space', + value: i + }; + } + + return { + type: 'word', + value: i + }; + }); + return prefix.concat(params.slice(1)); + } + /** + * Convert angle unit to deg + */ + ; + + _proto.normalizeUnit = function normalizeUnit(str, full) { + var num = parseFloat(str); + var deg = num / full * 360; + return deg + "deg"; + } + /** + * Normalize angle + */ + ; + + _proto.normalize = function normalize(nodes) { + if (!nodes[0]) return nodes; + + if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) { + nodes[0].value = this.normalizeUnit(nodes[0].value, 400); + } else if (/-?\d+(.\d+)?rad/.test(nodes[0].value)) { + nodes[0].value = this.normalizeUnit(nodes[0].value, 2 * Math.PI); + } else if (/-?\d+(.\d+)?turn/.test(nodes[0].value)) { + nodes[0].value = this.normalizeUnit(nodes[0].value, 1); + } else if (nodes[0].value.indexOf('deg') !== -1) { + var num = parseFloat(nodes[0].value); + num = range.wrap(0, 360, num); + nodes[0].value = num + "deg"; + } + + if (nodes[0].value === '0deg') { + nodes = this.replaceFirst(nodes, 'to', ' ', 'top'); + } else if (nodes[0].value === '90deg') { + nodes = this.replaceFirst(nodes, 'to', ' ', 'right'); + } else if (nodes[0].value === '180deg') { + nodes = this.replaceFirst(nodes, 'to', ' ', 'bottom'); + } else if (nodes[0].value === '270deg') { + nodes = this.replaceFirst(nodes, 'to', ' ', 'left'); + } + + return nodes; + } + /** + * Replace old direction to new + */ + ; + + _proto.newDirection = function newDirection(params) { + if (params[0].value === 'to') { + return params; + } + + IS_DIRECTION.lastIndex = 0; // reset search index of global regexp + + if (!IS_DIRECTION.test(params[0].value)) { + return params; + } + + params.unshift({ + type: 'word', + value: 'to' + }, { + type: 'space', + value: ' ' + }); + + for (var i = 2; i < params.length; i++) { + if (params[i].type === 'div') { + break; + } + + if (params[i].type === 'word') { + params[i].value = this.revertDirection(params[i].value); + } + } + + return params; + } + /** + * Look for at word + */ + ; + + _proto.isRadial = function isRadial(params) { + var state = 'before'; + + for (var _iterator2 = params, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var param = _ref2; + + if (state === 'before' && param.type === 'space') { + state = 'at'; + } else if (state === 'at' && param.value === 'at') { + state = 'after'; + } else if (state === 'after' && param.type === 'space') { + return true; + } else if (param.type === 'div') { + break; + } else { + state = 'before'; + } + } + + return false; + } + /** + * Change new direction to old + */ + ; + + _proto.convertDirection = function convertDirection(params) { + if (params.length > 0) { + if (params[0].value === 'to') { + this.fixDirection(params); + } else if (params[0].value.indexOf('deg') !== -1) { + this.fixAngle(params); + } else if (this.isRadial(params)) { + this.fixRadial(params); + } + } + + return params; + } + /** + * Replace `to top left` to `bottom right` + */ + ; + + _proto.fixDirection = function fixDirection(params) { + params.splice(0, 2); + + for (var _iterator3 = params, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var param = _ref3; + + if (param.type === 'div') { + break; + } + + if (param.type === 'word') { + param.value = this.revertDirection(param.value); + } + } + } + /** + * Add 90 degrees + */ + ; + + _proto.fixAngle = function fixAngle(params) { + var first = params[0].value; + first = parseFloat(first); + first = Math.abs(450 - first) % 360; + first = this.roundFloat(first, 3); + params[0].value = first + "deg"; + } + /** + * Fix radial direction syntax + */ + ; + + _proto.fixRadial = function fixRadial(params) { + var first = []; + var second = []; + var a, b, c, i, next; + + for (i = 0; i < params.length - 2; i++) { + a = params[i]; + b = params[i + 1]; + c = params[i + 2]; + + if (a.type === 'space' && b.value === 'at' && c.type === 'space') { + next = i + 3; + break; + } else { + first.push(a); + } + } + + var div; + + for (i = next; i < params.length; i++) { + if (params[i].type === 'div') { + div = params[i]; + break; + } else { + second.push(params[i]); + } + } + + params.splice.apply(params, [0, i].concat(second, [div], first)); + }; + + _proto.revertDirection = function revertDirection(word) { + return this.directions[word.toLowerCase()] || word; + } + /** + * Round float and save digits under dot + */ + ; + + _proto.roundFloat = function roundFloat(_float, digits) { + return parseFloat(_float.toFixed(digits)); + } + /** + * Convert to old webkit syntax + */ + ; + + _proto.oldWebkit = function oldWebkit(node) { + var nodes = node.nodes; + var string = parser.stringify(node.nodes); + + if (this.name !== 'linear-gradient') { + return false; + } + + if (nodes[0] && nodes[0].value.indexOf('deg') !== -1) { + return false; + } + + if (string.indexOf('px') !== -1 || string.indexOf('-corner') !== -1 || string.indexOf('-side') !== -1) { + return false; + } + + var params = [[]]; + + for (var _iterator4 = nodes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var i = _ref4; + params[params.length - 1].push(i); + + if (i.type === 'div' && i.value === ',') { + params.push([]); + } + } + + this.oldDirection(params); + this.colorStops(params); + node.nodes = []; + + for (var _i5 = 0, _params = params; _i5 < _params.length; _i5++) { + var param = _params[_i5]; + node.nodes = node.nodes.concat(param); + } + + node.nodes.unshift({ + type: 'word', + value: 'linear' + }, this.cloneDiv(node.nodes)); + node.value = '-webkit-gradient'; + return true; + } + /** + * Change direction syntax to old webkit + */ + ; + + _proto.oldDirection = function oldDirection(params) { + var div = this.cloneDiv(params[0]); + + if (params[0][0].value !== 'to') { + return params.unshift([{ + type: 'word', + value: this.oldDirections.bottom + }, div]); + } else { + var words = []; + + for (var _iterator5 = params[0].slice(2), _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i6 >= _iterator5.length) break; + _ref5 = _iterator5[_i6++]; + } else { + _i6 = _iterator5.next(); + if (_i6.done) break; + _ref5 = _i6.value; + } + + var node = _ref5; + + if (node.type === 'word') { + words.push(node.value.toLowerCase()); + } + } + + words = words.join(' '); + var old = this.oldDirections[words] || words; + params[0] = [{ + type: 'word', + value: old + }, div]; + return params[0]; + } + } + /** + * Get div token from exists parameters + */ + ; + + _proto.cloneDiv = function cloneDiv(params) { + for (var _iterator6 = params, _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i7 >= _iterator6.length) break; + _ref6 = _iterator6[_i7++]; + } else { + _i7 = _iterator6.next(); + if (_i7.done) break; + _ref6 = _i7.value; + } + + var i = _ref6; + + if (i.type === 'div' && i.value === ',') { + return i; + } + } + + return { + type: 'div', + value: ',', + after: ' ' + }; + } + /** + * Change colors syntax to old webkit + */ + ; + + _proto.colorStops = function colorStops(params) { + var result = []; + + for (var i = 0; i < params.length; i++) { + var pos = void 0; + var param = params[i]; + var item = void 0; + + if (i === 0) { + continue; + } + + var color = parser.stringify(param[0]); + + if (param[1] && param[1].type === 'word') { + pos = param[1].value; + } else if (param[2] && param[2].type === 'word') { + pos = param[2].value; + } + + var stop = void 0; + + if (i === 1 && (!pos || pos === '0%')) { + stop = "from(" + color + ")"; + } else if (i === params.length - 1 && (!pos || pos === '100%')) { + stop = "to(" + color + ")"; + } else if (pos) { + stop = "color-stop(" + pos + ", " + color + ")"; + } else { + stop = "color-stop(" + color + ")"; + } + + var div = param[param.length - 1]; + params[i] = [{ + type: 'word', + value: stop + }]; + + if (div.type === 'div' && div.value === ',') { + item = params[i].push(div); + } + + result.push(item); + } + + return result; + } + /** + * Remove old WebKit gradient too + */ + ; + + _proto.old = function old(prefix) { + if (prefix === '-webkit-') { + var type = this.name === 'linear-gradient' ? 'linear' : 'radial'; + var string = '-gradient'; + var regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false); + return new OldValue(this.name, prefix + this.name, string, regexp); + } else { + return _Value.prototype.old.call(this, prefix); + } + } + /** + * Do not add non-webkit prefixes for list-style and object + */ + ; + + _proto.add = function add(decl, prefix) { + var p = decl.prop; + + if (p.indexOf('mask') !== -1) { + if (prefix === '-webkit-' || prefix === '-webkit- old') { + return _Value.prototype.add.call(this, decl, prefix); + } + } else if (p === 'list-style' || p === 'list-style-image' || p === 'content') { + if (prefix === '-webkit-' || prefix === '-webkit- old') { + return _Value.prototype.add.call(this, decl, prefix); + } + } else { + return _Value.prototype.add.call(this, decl, prefix); + } + + return undefined; + }; + + return Gradient; +}(Value); + +_defineProperty(Gradient, "names", ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient']); + +module.exports = Gradient;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-area.js b/node_modules/autoprefixer/lib/hacks/grid-area.js new file mode 100644 index 0000000..8c1b39c --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-area.js @@ -0,0 +1,54 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var utils = require('./grid-utils'); + +var GridArea = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridArea, _Declaration); + + function GridArea() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridArea.prototype; + + /** + * Translate grid-area to separate -ms- prefixed properties + */ + _proto.insert = function insert(decl, prefix, prefixes, result) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + var values = utils.parse(decl); + + var _utils$translate = utils.translate(values, 0, 2), + rowStart = _utils$translate[0], + rowSpan = _utils$translate[1]; + + var _utils$translate2 = utils.translate(values, 1, 3), + columnStart = _utils$translate2[0], + columnSpan = _utils$translate2[1]; + + [['grid-row', rowStart], ['grid-row-span', rowSpan], ['grid-column', columnStart], ['grid-column-span', columnSpan]].forEach(function (_ref) { + var prop = _ref[0], + value = _ref[1]; + utils.insertDecl(decl, prop, value); + }); + utils.warnTemplateSelectorNotFound(decl, result); + utils.warnIfGridRowColumnExists(decl, result); + return undefined; + }; + + return GridArea; +}(Declaration); + +_defineProperty(GridArea, "names", ['grid-area']); + +module.exports = GridArea;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-column-align.js b/node_modules/autoprefixer/lib/hacks/grid-column-align.js new file mode 100644 index 0000000..c69efb5 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-column-align.js @@ -0,0 +1,50 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var GridColumnAlign = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridColumnAlign, _Declaration); + + function GridColumnAlign() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridColumnAlign.prototype; + + /** + * Do not prefix flexbox values + */ + _proto.check = function check(decl) { + return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline'; + } + /** + * Change property name for IE + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + 'grid-column-align'; + } + /** + * Change IE property back + */ + ; + + _proto.normalize = function normalize() { + return 'justify-self'; + }; + + return GridColumnAlign; +}(Declaration); + +_defineProperty(GridColumnAlign, "names", ['grid-column-align']); + +module.exports = GridColumnAlign;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-end.js b/node_modules/autoprefixer/lib/hacks/grid-end.js new file mode 100644 index 0000000..d13c7b8 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-end.js @@ -0,0 +1,64 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var GridEnd = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridEnd, _Declaration); + + function GridEnd() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridEnd.prototype; + + /** + * Change repeating syntax for IE + */ + _proto.insert = function insert(decl, prefix, prefixes, result) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + var clonedDecl = this.clone(decl); + var startProp = decl.prop.replace(/end$/, 'start'); + var spanProp = prefix + decl.prop.replace(/end$/, 'span'); + + if (decl.parent.some(function (i) { + return i.prop === spanProp; + })) { + return undefined; + } + + clonedDecl.prop = spanProp; + + if (decl.value.includes('span')) { + clonedDecl.value = decl.value.replace(/span\s/i, ''); + } else { + var startDecl; + decl.parent.walkDecls(startProp, function (d) { + startDecl = d; + }); + + if (startDecl) { + var value = Number(decl.value) - Number(startDecl.value) + ''; + clonedDecl.value = value; + } else { + decl.warn(result, "Can not prefix " + decl.prop + " (" + startProp + " is not found)"); + } + } + + decl.cloneBefore(clonedDecl); + return undefined; + }; + + return GridEnd; +}(Declaration); + +_defineProperty(GridEnd, "names", ['grid-row-end', 'grid-column-end']); + +module.exports = GridEnd;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-row-align.js b/node_modules/autoprefixer/lib/hacks/grid-row-align.js new file mode 100644 index 0000000..5d0e4dc --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-row-align.js @@ -0,0 +1,50 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var GridRowAlign = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridRowAlign, _Declaration); + + function GridRowAlign() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridRowAlign.prototype; + + /** + * Do not prefix flexbox values + */ + _proto.check = function check(decl) { + return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline'; + } + /** + * Change property name for IE + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + 'grid-row-align'; + } + /** + * Change IE property back + */ + ; + + _proto.normalize = function normalize() { + return 'align-self'; + }; + + return GridRowAlign; +}(Declaration); + +_defineProperty(GridRowAlign, "names", ['grid-row-align']); + +module.exports = GridRowAlign;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-row-column.js b/node_modules/autoprefixer/lib/hacks/grid-row-column.js new file mode 100644 index 0000000..256f9d1 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-row-column.js @@ -0,0 +1,54 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var utils = require('./grid-utils'); + +var GridRowColumn = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridRowColumn, _Declaration); + + function GridRowColumn() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridRowColumn.prototype; + + /** + * Translate grid-row / grid-column to separate -ms- prefixed properties + */ + _proto.insert = function insert(decl, prefix, prefixes) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + var values = utils.parse(decl); + + var _utils$translate = utils.translate(values, 0, 1), + start = _utils$translate[0], + span = _utils$translate[1]; + + var hasStartValueSpan = values[0] && values[0].includes('span'); + + if (hasStartValueSpan) { + span = values[0].join('').replace(/\D/g, ''); + } + + [[decl.prop, start], [decl.prop + "-span", span]].forEach(function (_ref) { + var prop = _ref[0], + value = _ref[1]; + utils.insertDecl(decl, prop, value); + }); + return undefined; + }; + + return GridRowColumn; +}(Declaration); + +_defineProperty(GridRowColumn, "names", ['grid-row', 'grid-column']); + +module.exports = GridRowColumn;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js b/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js new file mode 100644 index 0000000..edd1ee6 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-rows-columns.js @@ -0,0 +1,149 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var _require = require('./grid-utils'), + prefixTrackProp = _require.prefixTrackProp, + prefixTrackValue = _require.prefixTrackValue, + autoplaceGridItems = _require.autoplaceGridItems, + getGridGap = _require.getGridGap, + inheritGridGap = _require.inheritGridGap; + +var Processor = require('../processor'); + +var GridRowsColumns = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridRowsColumns, _Declaration); + + function GridRowsColumns() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridRowsColumns.prototype; + + /** + * Change property name for IE + */ + _proto.prefixed = function prefixed(prop, prefix) { + if (prefix === '-ms-') { + return prefixTrackProp({ + prop: prop, + prefix: prefix + }); + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Change IE property back + */ + ; + + _proto.normalize = function normalize(prop) { + return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1'); + }; + + _proto.insert = function insert(decl, prefix, prefixes, result) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + var parent = decl.parent, + prop = decl.prop, + value = decl.value; + var isRowProp = prop.includes('rows'); + var isColumnProp = prop.includes('columns'); + var hasGridTemplate = parent.some(function (i) { + return i.prop === 'grid-template' || i.prop === 'grid-template-areas'; + }); + /** + * Not to prefix rows declaration if grid-template(-areas) is present + */ + + if (hasGridTemplate && isRowProp) { + return false; + } + + var processor = new Processor({}); + var status = processor.gridStatus(parent, result); + var gap = getGridGap(decl); + gap = inheritGridGap(decl, gap) || gap; + var gapValue = isRowProp ? gap.row : gap.column; + + if ((status === 'no-autoplace' || status === true) && !hasGridTemplate) { + gapValue = null; + } + + var prefixValue = prefixTrackValue({ + value: value, + gap: gapValue + }); + /** + * Insert prefixes + */ + + decl.cloneBefore({ + prop: prefixTrackProp({ + prop: prop, + prefix: prefix + }), + value: prefixValue + }); + var autoflow = parent.nodes.find(function (i) { + return i.prop === 'grid-auto-flow'; + }); + var autoflowValue = 'row'; + + if (autoflow && !processor.disabled(autoflow, result)) { + autoflowValue = autoflow.value.trim(); + } + + if (status === 'autoplace') { + /** + * Show warning if grid-template-rows decl is not found + */ + var rowDecl = parent.nodes.find(function (i) { + return i.prop === 'grid-template-rows'; + }); + + if (!rowDecl && hasGridTemplate) { + return undefined; + } else if (!rowDecl && !hasGridTemplate) { + decl.warn(result, "Autoplacement does not work without grid-template-rows property"); + return undefined; + } + /** + * Show warning if grid-template-columns decl is not found + */ + + + var columnDecl = parent.nodes.find(function (i) { + return i.prop === 'grid-template-columns'; + }); + + if (!columnDecl && !hasGridTemplate) { + decl.warn(result, "Autoplacement does not work without grid-template-columns property"); + } + /** + * Autoplace grid items + */ + + + if (isColumnProp && !hasGridTemplate) { + autoplaceGridItems(decl, result, gap, autoflowValue); + } + } + + return undefined; + }; + + return GridRowsColumns; +}(Declaration); + +_defineProperty(GridRowsColumns, "names", ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns']); + +module.exports = GridRowsColumns;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-start.js b/node_modules/autoprefixer/lib/hacks/grid-start.js new file mode 100644 index 0000000..dfbc68b --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-start.js @@ -0,0 +1,57 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var GridStart = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridStart, _Declaration); + + function GridStart() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridStart.prototype; + + /** + * Do not add prefix for unsupported value in IE + */ + _proto.check = function check(decl) { + var value = decl.value; + return value.indexOf('/') === -1 || value.indexOf('span') !== -1; + } + /** + * Return a final spec property + */ + ; + + _proto.normalize = function normalize(prop) { + return prop.replace('-start', ''); + } + /** + * Change property name for IE + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + var result = _Declaration.prototype.prefixed.call(this, prop, prefix); + + if (prefix === '-ms-') { + result = result.replace('-start', ''); + } + + return result; + }; + + return GridStart; +}(Declaration); + +_defineProperty(GridStart, "names", ['grid-row-start', 'grid-column-start']); + +module.exports = GridStart;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-template-areas.js b/node_modules/autoprefixer/lib/hacks/grid-template-areas.js new file mode 100644 index 0000000..9da1685 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-template-areas.js @@ -0,0 +1,103 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var _require = require('./grid-utils'), + parseGridAreas = _require.parseGridAreas, + warnMissedAreas = _require.warnMissedAreas, + prefixTrackProp = _require.prefixTrackProp, + prefixTrackValue = _require.prefixTrackValue, + getGridGap = _require.getGridGap, + warnGridGap = _require.warnGridGap, + inheritGridGap = _require.inheritGridGap; + +function getGridRows(tpl) { + return tpl.trim().slice(1, -1).split(/['"]\s*['"]?/g); +} + +var GridTemplateAreas = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridTemplateAreas, _Declaration); + + function GridTemplateAreas() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridTemplateAreas.prototype; + + /** + * Translate grid-template-areas to separate -ms- prefixed properties + */ + _proto.insert = function insert(decl, prefix, prefixes, result) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + var hasColumns = false; + var hasRows = false; + var parent = decl.parent; + var gap = getGridGap(decl); + gap = inheritGridGap(decl, gap) || gap; // remove already prefixed rows + // to prevent doubling prefixes + + parent.walkDecls(/-ms-grid-rows/, function (i) { + return i.remove(); + }); // add empty tracks to rows + + parent.walkDecls(/grid-template-(rows|columns)/, function (trackDecl) { + if (trackDecl.prop === 'grid-template-rows') { + hasRows = true; + var prop = trackDecl.prop, + value = trackDecl.value; + trackDecl.cloneBefore({ + prop: prefixTrackProp({ + prop: prop, + prefix: prefix + }), + value: prefixTrackValue({ + value: value, + gap: gap.row + }) + }); + } else { + hasColumns = true; + } + }); + var gridRows = getGridRows(decl.value); + + if (hasColumns && !hasRows && gap.row && gridRows.length > 1) { + decl.cloneBefore({ + prop: '-ms-grid-rows', + value: prefixTrackValue({ + value: "repeat(" + gridRows.length + ", auto)", + gap: gap.row + }), + raws: {} + }); + } // warnings + + + warnGridGap({ + gap: gap, + hasColumns: hasColumns, + decl: decl, + result: result + }); + var areas = parseGridAreas({ + rows: gridRows, + gap: gap + }); + warnMissedAreas(areas, decl, result); + return decl; + }; + + return GridTemplateAreas; +}(Declaration); + +_defineProperty(GridTemplateAreas, "names", ['grid-template-areas']); + +module.exports = GridTemplateAreas;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-template.js b/node_modules/autoprefixer/lib/hacks/grid-template.js new file mode 100644 index 0000000..88ce36b --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-template.js @@ -0,0 +1,92 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var _require = require('./grid-utils'), + parseTemplate = _require.parseTemplate, + warnMissedAreas = _require.warnMissedAreas, + getGridGap = _require.getGridGap, + warnGridGap = _require.warnGridGap, + inheritGridGap = _require.inheritGridGap; + +var GridTemplate = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(GridTemplate, _Declaration); + + function GridTemplate() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = GridTemplate.prototype; + + /** + * Translate grid-template to separate -ms- prefixed properties + */ + _proto.insert = function insert(decl, prefix, prefixes, result) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + + if (decl.parent.some(function (i) { + return i.prop === '-ms-grid-rows'; + })) { + return undefined; + } + + var gap = getGridGap(decl); + /** + * we must insert inherited gap values in some cases: + * if we are inside media query && if we have no grid-gap value + */ + + var inheritedGap = inheritGridGap(decl, gap); + + var _parseTemplate = parseTemplate({ + decl: decl, + gap: inheritedGap || gap + }), + rows = _parseTemplate.rows, + columns = _parseTemplate.columns, + areas = _parseTemplate.areas; + + var hasAreas = Object.keys(areas).length > 0; + var hasRows = Boolean(rows); + var hasColumns = Boolean(columns); + warnGridGap({ + gap: gap, + hasColumns: hasColumns, + decl: decl, + result: result + }); + warnMissedAreas(areas, decl, result); + + if (hasRows && hasColumns || hasAreas) { + decl.cloneBefore({ + prop: '-ms-grid-rows', + value: rows, + raws: {} + }); + } + + if (hasColumns) { + decl.cloneBefore({ + prop: '-ms-grid-columns', + value: columns, + raws: {} + }); + } + + return decl; + }; + + return GridTemplate; +}(Declaration); + +_defineProperty(GridTemplate, "names", ['grid-template']); + +module.exports = GridTemplate;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/grid-utils.js b/node_modules/autoprefixer/lib/hacks/grid-utils.js new file mode 100644 index 0000000..06f868c --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/grid-utils.js @@ -0,0 +1,1150 @@ +"use strict"; + +var parser = require('postcss-value-parser'); + +var list = require('postcss').list; + +var uniq = require('../utils').uniq; + +var escapeRegexp = require('../utils').escapeRegexp; + +var splitSelector = require('../utils').splitSelector; + +function convert(value) { + if (value && value.length === 2 && value[0] === 'span' && parseInt(value[1], 10) > 0) { + return [false, parseInt(value[1], 10)]; + } + + if (value && value.length === 1 && parseInt(value[0], 10) > 0) { + return [parseInt(value[0], 10), false]; + } + + return [false, false]; +} + +function translate(values, startIndex, endIndex) { + var startValue = values[startIndex]; + var endValue = values[endIndex]; + + if (!startValue) { + return [false, false]; + } + + var _convert = convert(startValue), + start = _convert[0], + spanStart = _convert[1]; + + var _convert2 = convert(endValue), + end = _convert2[0], + spanEnd = _convert2[1]; + + if (start && !endValue) { + return [start, false]; + } + + if (spanStart && end) { + return [end - spanStart, spanStart]; + } + + if (start && spanEnd) { + return [start, spanEnd]; + } + + if (start && end) { + return [start, end - start]; + } + + return [false, false]; +} + +function parse(decl) { + var node = parser(decl.value); + var values = []; + var current = 0; + values[current] = []; + + for (var _iterator = node.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + + if (i.type === 'div') { + current += 1; + values[current] = []; + } else if (i.type === 'word') { + values[current].push(i.value); + } + } + + return values; +} + +function insertDecl(decl, prop, value) { + if (value && !decl.parent.some(function (i) { + return i.prop === "-ms-" + prop; + })) { + decl.cloneBefore({ + prop: "-ms-" + prop, + value: value.toString() + }); + } +} // Track transforms + + +function prefixTrackProp(_ref2) { + var prop = _ref2.prop, + prefix = _ref2.prefix; + return prefix + prop.replace('template-', ''); +} + +function transformRepeat(_ref3, _ref4) { + var nodes = _ref3.nodes; + var gap = _ref4.gap; + + var _nodes$reduce = nodes.reduce(function (result, node) { + if (node.type === 'div' && node.value === ',') { + result.key = 'size'; + } else { + result[result.key].push(parser.stringify(node)); + } + + return result; + }, { + key: 'count', + size: [], + count: [] + }), + count = _nodes$reduce.count, + size = _nodes$reduce.size; // insert gap values + + + if (gap) { + var _ret = function () { + size = size.filter(function (i) { + return i.trim(); + }); + var val = []; + + var _loop = function _loop(i) { + size.forEach(function (item, index) { + if (index > 0 || i > 1) { + val.push(gap); + } + + val.push(item); + }); + }; + + for (var i = 1; i <= count; i++) { + _loop(i); + } + + return { + v: val.join(' ') + }; + }(); + + if (typeof _ret === "object") return _ret.v; + } + + return "(" + size.join('') + ")[" + count.join('') + "]"; +} + +function prefixTrackValue(_ref5) { + var value = _ref5.value, + gap = _ref5.gap; + var result = parser(value).nodes.reduce(function (nodes, node) { + if (node.type === 'function' && node.value === 'repeat') { + return nodes.concat({ + type: 'word', + value: transformRepeat(node, { + gap: gap + }) + }); + } + + if (gap && node.type === 'space') { + return nodes.concat({ + type: 'space', + value: ' ' + }, { + type: 'word', + value: gap + }, node); + } + + return nodes.concat(node); + }, []); + return parser.stringify(result); +} // Parse grid-template-areas + + +var DOTS = /^\.+$/; + +function track(start, end) { + return { + start: start, + end: end, + span: end - start + }; +} + +function getColumns(line) { + return line.trim().split(/\s+/g); +} + +function parseGridAreas(_ref6) { + var rows = _ref6.rows, + gap = _ref6.gap; + return rows.reduce(function (areas, line, rowIndex) { + if (gap.row) rowIndex *= 2; + if (line.trim() === '') return areas; + getColumns(line).forEach(function (area, columnIndex) { + if (DOTS.test(area)) return; + if (gap.column) columnIndex *= 2; + + if (typeof areas[area] === 'undefined') { + areas[area] = { + column: track(columnIndex + 1, columnIndex + 2), + row: track(rowIndex + 1, rowIndex + 2) + }; + } else { + var _areas$area = areas[area], + column = _areas$area.column, + row = _areas$area.row; + column.start = Math.min(column.start, columnIndex + 1); + column.end = Math.max(column.end, columnIndex + 2); + column.span = column.end - column.start; + row.start = Math.min(row.start, rowIndex + 1); + row.end = Math.max(row.end, rowIndex + 2); + row.span = row.end - row.start; + } + }); + return areas; + }, {}); +} // Parse grid-template + + +function testTrack(node) { + return node.type === 'word' && /^\[.+\]$/.test(node.value); +} + +function verifyRowSize(result) { + if (result.areas.length > result.rows.length) { + result.rows.push('auto'); + } + + return result; +} + +function parseTemplate(_ref7) { + var decl = _ref7.decl, + gap = _ref7.gap; + var gridTemplate = parser(decl.value).nodes.reduce(function (result, node) { + var type = node.type, + value = node.value; + if (testTrack(node) || type === 'space') return result; // area + + if (type === 'string') { + result = verifyRowSize(result); + result.areas.push(value); + } // values and function + + + if (type === 'word' || type === 'function') { + result[result.key].push(parser.stringify(node)); + } // divider(/) + + + if (type === 'div' && value === '/') { + result.key = 'columns'; + result = verifyRowSize(result); + } + + return result; + }, { + key: 'rows', + columns: [], + rows: [], + areas: [] + }); + return { + areas: parseGridAreas({ + rows: gridTemplate.areas, + gap: gap + }), + columns: prefixTrackValue({ + value: gridTemplate.columns.join(' '), + gap: gap.column + }), + rows: prefixTrackValue({ + value: gridTemplate.rows.join(' '), + gap: gap.row + }) + }; +} // Insert parsed grid areas + +/** + * Get an array of -ms- prefixed props and values + * @param {Object} [area] area object with column and row data + * @param {Boolean} [addRowSpan] should we add grid-column-row value? + * @param {Boolean} [addColumnSpan] should we add grid-column-span value? + * @return {Array<Object>} + */ + + +function getMSDecls(area, addRowSpan, addColumnSpan) { + if (addRowSpan === void 0) { + addRowSpan = false; + } + + if (addColumnSpan === void 0) { + addColumnSpan = false; + } + + return [].concat({ + prop: '-ms-grid-row', + value: String(area.row.start) + }, area.row.span > 1 || addRowSpan ? { + prop: '-ms-grid-row-span', + value: String(area.row.span) + } : [], { + prop: '-ms-grid-column', + value: String(area.column.start) + }, area.column.span > 1 || addColumnSpan ? { + prop: '-ms-grid-column-span', + value: String(area.column.span) + } : []); +} + +function getParentMedia(parent) { + if (parent.type === 'atrule' && parent.name === 'media') { + return parent; + } + + if (!parent.parent) { + return false; + } + + return getParentMedia(parent.parent); +} +/** + * change selectors for rules with duplicate grid-areas. + * @param {Array<Rule>} rules + * @param {Array<String>} templateSelectors + * @return {Array<Rule>} rules with changed selectors + */ + + +function changeDuplicateAreaSelectors(ruleSelectors, templateSelectors) { + ruleSelectors = ruleSelectors.map(function (selector) { + var selectorBySpace = list.space(selector); + var selectorByComma = list.comma(selector); + + if (selectorBySpace.length > selectorByComma.length) { + selector = selectorBySpace.slice(-1).join(''); + } + + return selector; + }); + return ruleSelectors.map(function (ruleSelector) { + var newSelector = templateSelectors.map(function (tplSelector, index) { + var space = index === 0 ? '' : ' '; + return "" + space + tplSelector + " > " + ruleSelector; + }); + return newSelector; + }); +} +/** + * check if selector of rules are equal + * @param {Rule} ruleA + * @param {Rule} ruleB + * @return {Boolean} + */ + + +function selectorsEqual(ruleA, ruleB) { + return ruleA.selectors.some(function (sel) { + return ruleB.selectors.some(function (s) { + return s === sel; + }); + }); +} +/** + * Parse data from all grid-template(-areas) declarations + * @param {Root} css css root + * @return {Object} parsed data + */ + + +function parseGridTemplatesData(css) { + var parsed = []; // we walk through every grid-template(-areas) declaration and store + // data with the same area names inside the item + + css.walkDecls(/grid-template(-areas)?$/, function (d) { + var rule = d.parent; + var media = getParentMedia(rule); + var gap = getGridGap(d); + var inheritedGap = inheritGridGap(d, gap); + + var _parseTemplate = parseTemplate({ + decl: d, + gap: inheritedGap || gap + }), + areas = _parseTemplate.areas; + + var areaNames = Object.keys(areas); // skip node if it doesn't have areas + + if (areaNames.length === 0) { + return true; + } // check parsed array for item that include the same area names + // return index of that item + + + var index = parsed.reduce(function (acc, _ref8, idx) { + var allAreas = _ref8.allAreas; + var hasAreas = allAreas && areaNames.some(function (area) { + return allAreas.includes(area); + }); + return hasAreas ? idx : acc; + }, null); + + if (index !== null) { + // index is found, add the grid-template data to that item + var _parsed$index = parsed[index], + allAreas = _parsed$index.allAreas, + rules = _parsed$index.rules; // check if rule has no duplicate area names + + var hasNoDuplicates = rules.some(function (r) { + return r.hasDuplicates === false && selectorsEqual(r, rule); + }); + var duplicatesFound = false; // check need to gather all duplicate area names + + var duplicateAreaNames = rules.reduce(function (acc, r) { + if (!r.params && selectorsEqual(r, rule)) { + duplicatesFound = true; + return r.duplicateAreaNames; + } + + if (!duplicatesFound) { + areaNames.forEach(function (name) { + if (r.areas[name]) { + acc.push(name); + } + }); + } + + return uniq(acc); + }, []); // update grid-row/column-span values for areas with duplicate + // area names. @see #1084 and #1146 + + rules.forEach(function (r) { + areaNames.forEach(function (name) { + var area = r.areas[name]; + + if (area && area.row.span !== areas[name].row.span) { + areas[name].row.updateSpan = true; + } + + if (area && area.column.span !== areas[name].column.span) { + areas[name].column.updateSpan = true; + } + }); + }); + parsed[index].allAreas = uniq([].concat(allAreas, areaNames)); + parsed[index].rules.push({ + hasDuplicates: !hasNoDuplicates, + params: media.params, + selectors: rule.selectors, + node: rule, + duplicateAreaNames: duplicateAreaNames, + areas: areas + }); + } else { + // index is NOT found, push the new item to the parsed array + parsed.push({ + allAreas: areaNames, + areasCount: 0, + rules: [{ + hasDuplicates: false, + duplicateRules: [], + params: media.params, + selectors: rule.selectors, + node: rule, + duplicateAreaNames: [], + areas: areas + }] + }); + } + + return undefined; + }); + return parsed; +} +/** + * insert prefixed grid-area declarations + * @param {Root} css css root + * @param {Function} isDisabled check if the rule is disabled + * @return {void} + */ + + +function insertAreas(css, isDisabled) { + // parse grid-template declarations + var gridTemplatesData = parseGridTemplatesData(css); // return undefined if no declarations found + + if (gridTemplatesData.length === 0) { + return undefined; + } // we need to store the rules that we will insert later + + + var rulesToInsert = {}; + css.walkDecls('grid-area', function (gridArea) { + var gridAreaRule = gridArea.parent; + var hasPrefixedRow = gridAreaRule.first.prop === '-ms-grid-row'; + var gridAreaMedia = getParentMedia(gridAreaRule); + + if (isDisabled(gridArea)) { + return undefined; + } + + var gridAreaRuleIndex = gridAreaMedia ? css.index(gridAreaMedia) : css.index(gridAreaRule); + var value = gridArea.value; // found the data that matches grid-area identifier + + var data = gridTemplatesData.filter(function (d) { + return d.allAreas.includes(value); + })[0]; + + if (!data) { + return true; + } + + var lastArea = data.allAreas[data.allAreas.length - 1]; + var selectorBySpace = list.space(gridAreaRule.selector); + var selectorByComma = list.comma(gridAreaRule.selector); + var selectorIsComplex = selectorBySpace.length > 1 && selectorBySpace.length > selectorByComma.length; // prevent doubling of prefixes + + if (hasPrefixedRow) { + return false; + } // create the empty object with the key as the last area name + // e.g if we have templates with "a b c" values, "c" will be the last area + + + if (!rulesToInsert[lastArea]) { + rulesToInsert[lastArea] = {}; + } + + var lastRuleIsSet = false; // walk through every grid-template rule data + + for (var _iterator2 = data.rules, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref9; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref9 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref9 = _i2.value; + } + + var rule = _ref9; + var area = rule.areas[value]; + var hasDuplicateName = rule.duplicateAreaNames.includes(value); // if we can't find the area name, update lastRule and continue + + if (!area) { + var lastRuleIndex = css.index(rulesToInsert[lastArea].lastRule); + + if (gridAreaRuleIndex > lastRuleIndex) { + rulesToInsert[lastArea].lastRule = gridAreaMedia || gridAreaRule; + } + + continue; + } // for grid-templates inside media rule we need to create empty + // array to push prefixed grid-area rules later + + + if (rule.params && !rulesToInsert[lastArea][rule.params]) { + rulesToInsert[lastArea][rule.params] = []; + } + + if ((!rule.hasDuplicates || !hasDuplicateName) && !rule.params) { + // grid-template has no duplicates and not inside media rule + getMSDecls(area, false, false).reverse().forEach(function (i) { + return gridAreaRule.prepend(Object.assign(i, { + raws: { + between: gridArea.raws.between + } + })); + }); + rulesToInsert[lastArea].lastRule = gridAreaRule; + lastRuleIsSet = true; + } else if (rule.hasDuplicates && !rule.params && !selectorIsComplex) { + (function () { + // grid-template has duplicates and not inside media rule + var cloned = gridAreaRule.clone(); + cloned.removeAll(); + getMSDecls(area, area.row.updateSpan, area.column.updateSpan).reverse().forEach(function (i) { + return cloned.prepend(Object.assign(i, { + raws: { + between: gridArea.raws.between + } + })); + }); + cloned.selectors = changeDuplicateAreaSelectors(cloned.selectors, rule.selectors); + + if (rulesToInsert[lastArea].lastRule) { + rulesToInsert[lastArea].lastRule.after(cloned); + } + + rulesToInsert[lastArea].lastRule = cloned; + lastRuleIsSet = true; + })(); + } else if (rule.hasDuplicates && !rule.params && selectorIsComplex && gridAreaRule.selector.includes(rule.selectors[0])) { + // grid-template has duplicates and not inside media rule + // and the selector is complex + gridAreaRule.walkDecls(/-ms-grid-(row|column)/, function (d) { + return d.remove(); + }); + getMSDecls(area, area.row.updateSpan, area.column.updateSpan).reverse().forEach(function (i) { + return gridAreaRule.prepend(Object.assign(i, { + raws: { + between: gridArea.raws.between + } + })); + }); + } else if (rule.params) { + (function () { + // grid-template is inside media rule + // if we're inside media rule, we need to store prefixed rules + // inside rulesToInsert object to be able to preserve the order of media + // rules and merge them easily + var cloned = gridAreaRule.clone(); + cloned.removeAll(); + getMSDecls(area, area.row.updateSpan, area.column.updateSpan).reverse().forEach(function (i) { + return cloned.prepend(Object.assign(i, { + raws: { + between: gridArea.raws.between + } + })); + }); + + if (rule.hasDuplicates && hasDuplicateName) { + cloned.selectors = changeDuplicateAreaSelectors(cloned.selectors, rule.selectors); + } + + cloned.raws = rule.node.raws; + + if (css.index(rule.node.parent) > gridAreaRuleIndex) { + // append the prefixed rules right inside media rule + // with grid-template + rule.node.parent.append(cloned); + } else { + // store the rule to insert later + rulesToInsert[lastArea][rule.params].push(cloned); + } // set new rule as last rule ONLY if we didn't set lastRule for + // this grid-area before + + + if (!lastRuleIsSet) { + rulesToInsert[lastArea].lastRule = gridAreaMedia || gridAreaRule; + } + })(); + } + } + + return undefined; + }); // append stored rules inside the media rules + + Object.keys(rulesToInsert).forEach(function (area) { + var data = rulesToInsert[area]; + var lastRule = data.lastRule; + Object.keys(data).reverse().filter(function (p) { + return p !== 'lastRule'; + }).forEach(function (params) { + if (data[params].length > 0 && lastRule) { + lastRule.after({ + name: 'media', + params: params + }); + lastRule.next().append(data[params]); + } + }); + }); + return undefined; +} +/** + * Warn user if grid area identifiers are not found + * @param {Object} areas + * @param {Declaration} decl + * @param {Result} result + * @return {void} + */ + + +function warnMissedAreas(areas, decl, result) { + var missed = Object.keys(areas); + decl.root().walkDecls('grid-area', function (gridArea) { + missed = missed.filter(function (e) { + return e !== gridArea.value; + }); + }); + + if (missed.length > 0) { + decl.warn(result, 'Can not find grid areas: ' + missed.join(', ')); + } + + return undefined; +} +/** + * compare selectors with grid-area rule and grid-template rule + * show warning if grid-template selector is not found + * (this function used for grid-area rule) + * @param {Declaration} decl + * @param {Result} result + * @return {void} + */ + + +function warnTemplateSelectorNotFound(decl, result) { + var rule = decl.parent; + var root = decl.root(); + var duplicatesFound = false; // slice selector array. Remove the last part (for comparison) + + var slicedSelectorArr = list.space(rule.selector).filter(function (str) { + return str !== '>'; + }).slice(0, -1); // we need to compare only if selector is complex. + // e.g '.grid-cell' is simple, but '.parent > .grid-cell' is complex + + if (slicedSelectorArr.length > 0) { + var gridTemplateFound = false; + var foundAreaSelector = null; + root.walkDecls(/grid-template(-areas)?$/, function (d) { + var parent = d.parent; + var templateSelectors = parent.selectors; + + var _parseTemplate2 = parseTemplate({ + decl: d, + gap: getGridGap(d) + }), + areas = _parseTemplate2.areas; + + var hasArea = areas[decl.value]; // find the the matching selectors + + for (var _iterator3 = templateSelectors, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref10; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref10 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref10 = _i3.value; + } + + var tplSelector = _ref10; + + if (gridTemplateFound) { + break; + } + + var tplSelectorArr = list.space(tplSelector).filter(function (str) { + return str !== '>'; + }); + gridTemplateFound = tplSelectorArr.every(function (item, idx) { + return item === slicedSelectorArr[idx]; + }); + } + + if (gridTemplateFound || !hasArea) { + return true; + } + + if (!foundAreaSelector) { + foundAreaSelector = parent.selector; + } // if we found the duplicate area with different selector + + + if (foundAreaSelector && foundAreaSelector !== parent.selector) { + duplicatesFound = true; + } + + return undefined; + }); // warn user if we didn't find template + + if (!gridTemplateFound && duplicatesFound) { + decl.warn(result, "Autoprefixer cannot find a grid-template " + ("containing the duplicate grid-area \"" + decl.value + "\" ") + ("with full selector matching: " + slicedSelectorArr.join(' '))); + } + } +} +/** + * warn user if both grid-area and grid-(row|column) + * declarations are present in the same rule + * @param {Declaration} decl + * @param {Result} result + * @return {void} + */ + + +function warnIfGridRowColumnExists(decl, result) { + var rule = decl.parent; + var decls = []; + rule.walkDecls(/^grid-(row|column)/, function (d) { + if (!/-end$/.test(d.prop) && !/^span/.test(d.value)) { + decls.push(d); + } + }); + + if (decls.length > 0) { + decls.forEach(function (d) { + d.warn(result, "You already have a grid-area declaration present in the rule. " + ("You should use either grid-area or " + d.prop + ", not both")); + }); + } + + return undefined; +} // Gap utils + + +function getGridGap(decl) { + var gap = {}; // try to find gap + + var testGap = /^(grid-)?((row|column)-)?gap$/; + decl.parent.walkDecls(testGap, function (_ref11) { + var prop = _ref11.prop, + value = _ref11.value; + + if (/^(grid-)?gap$/.test(prop)) { + var _parser$nodes = parser(value).nodes, + row = _parser$nodes[0], + column = _parser$nodes[2]; + gap.row = row && parser.stringify(row); + gap.column = column ? parser.stringify(column) : gap.row; + } + + if (/^(grid-)?row-gap$/.test(prop)) gap.row = value; + if (/^(grid-)?column-gap$/.test(prop)) gap.column = value; + }); + return gap; +} +/** + * parse media parameters (for example 'min-width: 500px') + * @param {String} params parameter to parse + * @return {} + */ + + +function parseMediaParams(params) { + if (!params) { + return false; + } + + var parsed = parser(params); + var prop; + var value; + parsed.walk(function (node) { + if (node.type === 'word' && /min|max/g.test(node.value)) { + prop = node.value; + } else if (node.value.includes('px')) { + value = parseInt(node.value.replace(/\D/g, '')); + } + }); + return [prop, value]; +} +/** + * Compare the selectors and decide if we + * need to inherit gap from compared selector or not. + * @type {String} selA + * @type {String} selB + * @return {Boolean} + */ + + +function shouldInheritGap(selA, selB) { + var result; // get arrays of selector split in 3-deep array + + var splitSelectorArrA = splitSelector(selA); + var splitSelectorArrB = splitSelector(selB); + + if (splitSelectorArrA[0].length < splitSelectorArrB[0].length) { + // abort if selectorA has lower descendant specificity then selectorB + // (e.g '.grid' and '.hello .world .grid') + return false; + } else if (splitSelectorArrA[0].length > splitSelectorArrB[0].length) { + // if selectorA has higher descendant specificity then selectorB + // (e.g '.foo .bar .grid' and '.grid') + var idx = splitSelectorArrA[0].reduce(function (res, _ref12, index) { + var item = _ref12[0]; + var firstSelectorPart = splitSelectorArrB[0][0][0]; + + if (item === firstSelectorPart) { + return index; + } + + return false; + }, false); + + if (idx) { + result = splitSelectorArrB[0].every(function (arr, index) { + return arr.every(function (part, innerIndex) { + return (// because selectorA has more space elements, we need to slice + // selectorA array by 'idx' number to compare them + splitSelectorArrA[0].slice(idx)[index][innerIndex] === part + ); + }); + }); + } + } else { + // if selectorA has the same descendant specificity as selectorB + // this condition covers cases such as: '.grid.foo.bar' and '.grid' + result = splitSelectorArrB.some(function (byCommaArr) { + return byCommaArr.every(function (bySpaceArr, index) { + return bySpaceArr.every(function (part, innerIndex) { + return splitSelectorArrA[0][index][innerIndex] === part; + }); + }); + }); + } + + return result; +} +/** + * inherit grid gap values from the closest rule above + * with the same selector + * @param {Declaration} decl + * @param {Object} gap gap values + * @return {Object | Boolean} return gap values or false (if not found) + */ + + +function inheritGridGap(decl, gap) { + var rule = decl.parent; + var mediaRule = getParentMedia(rule); + var root = rule.root(); // get an array of selector split in 3-deep array + + var splitSelectorArr = splitSelector(rule.selector); // abort if the rule already has gaps + + if (Object.keys(gap).length > 0) { + return false; + } // e.g ['min-width'] + + + var _parseMediaParams = parseMediaParams(mediaRule.params), + prop = _parseMediaParams[0]; + + var lastBySpace = splitSelectorArr[0]; // get escaped value from the selector + // if we have '.grid-2.foo.bar' selector, will be '\.grid\-2' + + var escaped = escapeRegexp(lastBySpace[lastBySpace.length - 1][0]); + var regexp = new RegExp("(" + escaped + "$)|(" + escaped + "[,.])"); // find the closest rule with the same selector + + var closestRuleGap; + root.walkRules(regexp, function (r) { + var gridGap; // abort if are checking the same rule + + if (rule.toString() === r.toString()) { + return false; + } // find grid-gap values + + + r.walkDecls('grid-gap', function (d) { + return gridGap = getGridGap(d); + }); // skip rule without gaps + + if (!gridGap || Object.keys(gridGap).length === 0) { + return true; + } // skip rules that should not be inherited from + + + if (!shouldInheritGap(rule.selector, r.selector)) { + return true; + } + + var media = getParentMedia(r); + + if (media) { + // if we are inside media, we need to check that media props match + // e.g ('min-width' === 'min-width') + var propToCompare = parseMediaParams(media.params)[0]; + + if (propToCompare === prop) { + closestRuleGap = gridGap; + return true; + } + } else { + closestRuleGap = gridGap; + return true; + } + + return undefined; + }); // if we find the closest gap object + + if (closestRuleGap && Object.keys(closestRuleGap).length > 0) { + return closestRuleGap; + } + + return false; +} + +function warnGridGap(_ref13) { + var gap = _ref13.gap, + hasColumns = _ref13.hasColumns, + decl = _ref13.decl, + result = _ref13.result; + var hasBothGaps = gap.row && gap.column; + + if (!hasColumns && (hasBothGaps || gap.column && !gap.row)) { + delete gap.column; + decl.warn(result, 'Can not implement grid-gap without grid-template-columns'); + } +} +/** + * normalize the grid-template-rows/columns values + * @param {String} str grid-template-rows/columns value + * @return {Array} normalized array with values + * @example + * let normalized = normalizeRowColumn('1fr repeat(2, 20px 50px) 1fr') + * normalized // <= ['1fr', '20px', '50px', '20px', '50px', '1fr'] + */ + + +function normalizeRowColumn(str) { + var normalized = parser(str).nodes.reduce(function (result, node) { + if (node.type === 'function' && node.value === 'repeat') { + var key = 'count'; + + var _node$nodes$reduce = node.nodes.reduce(function (acc, n) { + if (n.type === 'word' && key === 'count') { + acc[0] = Math.abs(parseInt(n.value)); + return acc; + } + + if (n.type === 'div' && n.value === ',') { + key = 'value'; + return acc; + } + + if (key === 'value') { + acc[1] += parser.stringify(n); + } + + return acc; + }, [0, '']), + count = _node$nodes$reduce[0], + value = _node$nodes$reduce[1]; + + if (count) { + for (var i = 0; i < count; i++) { + result.push(value); + } + } + + return result; + } + + if (node.type === 'space') { + return result; + } + + return result.concat(parser.stringify(node)); + }, []); + return normalized; +} +/** + * Autoplace grid items + * @param {Declaration} decl + * @param {Result} result + * @param {Object} gap gap values + * @param {String} autoflowValue grid-auto-flow value + * @return {void} + * @see https://github.com/postcss/autoprefixer/issues/1148 + */ + + +function autoplaceGridItems(decl, result, gap, autoflowValue) { + if (autoflowValue === void 0) { + autoflowValue = 'row'; + } + + var parent = decl.parent; + var rowDecl = parent.nodes.find(function (i) { + return i.prop === 'grid-template-rows'; + }); + var rows = normalizeRowColumn(rowDecl.value); + var columns = normalizeRowColumn(decl.value); // Build array of area names with dummy values. If we have 3 columns and + // 2 rows, filledRows will be equal to ['1 2 3', '4 5 6'] + + var filledRows = rows.map(function (_, rowIndex) { + return Array.from({ + length: columns.length + }, function (v, k) { + return k + rowIndex * columns.length + 1; + }).join(' '); + }); + var areas = parseGridAreas({ + rows: filledRows, + gap: gap + }); + var keys = Object.keys(areas); + var items = keys.map(function (i) { + return areas[i]; + }); // Change the order of cells if grid-auto-flow value is 'column' + + if (autoflowValue.includes('column')) { + items = items.sort(function (a, b) { + return a.column.start - b.column.start; + }); + } // Insert new rules + + + items.reverse().forEach(function (item, index) { + var column = item.column, + row = item.row; + var nodeSelector = parent.selectors.map(function (sel) { + return sel + (" > *:nth-child(" + (keys.length - index) + ")"); + }).join(', '); // create new rule + + var node = parent.clone().removeAll(); // change rule selector + + node.selector = nodeSelector; // insert prefixed row/column values + + node.append({ + prop: '-ms-grid-row', + value: row.start + }); + node.append({ + prop: '-ms-grid-column', + value: column.start + }); // insert rule + + parent.after(node); + }); + return undefined; +} + +module.exports = { + parse: parse, + translate: translate, + parseTemplate: parseTemplate, + parseGridAreas: parseGridAreas, + warnMissedAreas: warnMissedAreas, + insertAreas: insertAreas, + insertDecl: insertDecl, + prefixTrackProp: prefixTrackProp, + prefixTrackValue: prefixTrackValue, + getGridGap: getGridGap, + warnGridGap: warnGridGap, + warnTemplateSelectorNotFound: warnTemplateSelectorNotFound, + warnIfGridRowColumnExists: warnIfGridRowColumnExists, + inheritGridGap: inheritGridGap, + autoplaceGridItems: autoplaceGridItems +};
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/image-rendering.js b/node_modules/autoprefixer/lib/hacks/image-rendering.js new file mode 100644 index 0000000..d6de83c --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/image-rendering.js @@ -0,0 +1,73 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var ImageRendering = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(ImageRendering, _Declaration); + + function ImageRendering() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = ImageRendering.prototype; + + /** + * Add hack only for crisp-edges + */ + _proto.check = function check(decl) { + return decl.value === 'pixelated'; + } + /** + * Change property name for IE + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + if (prefix === '-ms-') { + return '-ms-interpolation-mode'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Change property and value for IE + */ + ; + + _proto.set = function set(decl, prefix) { + if (prefix !== '-ms-') return _Declaration.prototype.set.call(this, decl, prefix); + decl.prop = '-ms-interpolation-mode'; + decl.value = 'nearest-neighbor'; + return decl; + } + /** + * Return property name by spec + */ + ; + + _proto.normalize = function normalize() { + return 'image-rendering'; + } + /** + * Warn on old value + */ + ; + + _proto.process = function process(node, result) { + return _Declaration.prototype.process.call(this, node, result); + }; + + return ImageRendering; +}(Declaration); + +_defineProperty(ImageRendering, "names", ['image-rendering', 'interpolation-mode']); + +module.exports = ImageRendering;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/image-set.js b/node_modules/autoprefixer/lib/hacks/image-set.js new file mode 100644 index 0000000..2263aaf --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/image-set.js @@ -0,0 +1,40 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Value = require('../value'); + +var ImageSet = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(ImageSet, _Value); + + function ImageSet() { + return _Value.apply(this, arguments) || this; + } + + var _proto = ImageSet.prototype; + + /** + * Use non-standard name for WebKit and Firefox + */ + _proto.replace = function replace(string, prefix) { + var fixed = _Value.prototype.replace.call(this, string, prefix); + + if (prefix === '-webkit-') { + fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2'); + } + + return fixed; + }; + + return ImageSet; +}(Value); + +_defineProperty(ImageSet, "names", ['image-set']); + +module.exports = ImageSet;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/inline-logical.js b/node_modules/autoprefixer/lib/hacks/inline-logical.js new file mode 100644 index 0000000..819f14a --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/inline-logical.js @@ -0,0 +1,42 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var InlineLogical = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(InlineLogical, _Declaration); + + function InlineLogical() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = InlineLogical.prototype; + + /** + * Use old syntax for -moz- and -webkit- + */ + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + prop.replace('-inline', ''); + } + /** + * Return property name by spec + */ + ; + + _proto.normalize = function normalize(prop) { + return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2'); + }; + + return InlineLogical; +}(Declaration); + +_defineProperty(InlineLogical, "names", ['border-inline-start', 'border-inline-end', 'margin-inline-start', 'margin-inline-end', 'padding-inline-start', 'padding-inline-end', 'border-start', 'border-end', 'margin-start', 'margin-end', 'padding-start', 'padding-end']); + +module.exports = InlineLogical;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/intrinsic.js b/node_modules/autoprefixer/lib/hacks/intrinsic.js new file mode 100644 index 0000000..59367c0 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/intrinsic.js @@ -0,0 +1,76 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var OldValue = require('../old-value'); + +var Value = require('../value'); + +function _regexp(name) { + return new RegExp("(^|[\\s,(])(" + name + "($|[\\s),]))", 'gi'); +} + +var Intrinsic = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(Intrinsic, _Value); + + function Intrinsic() { + return _Value.apply(this, arguments) || this; + } + + var _proto = Intrinsic.prototype; + + _proto.regexp = function regexp() { + if (!this.regexpCache) this.regexpCache = _regexp(this.name); + return this.regexpCache; + }; + + _proto.isStretch = function isStretch() { + return this.name === 'stretch' || this.name === 'fill' || this.name === 'fill-available'; + }; + + _proto.replace = function replace(string, prefix) { + if (prefix === '-moz-' && this.isStretch()) { + return string.replace(this.regexp(), '$1-moz-available$3'); + } + + if (prefix === '-webkit-' && this.isStretch()) { + return string.replace(this.regexp(), '$1-webkit-fill-available$3'); + } + + return _Value.prototype.replace.call(this, string, prefix); + }; + + _proto.old = function old(prefix) { + var prefixed = prefix + this.name; + + if (this.isStretch()) { + if (prefix === '-moz-') { + prefixed = '-moz-available'; + } else if (prefix === '-webkit-') { + prefixed = '-webkit-fill-available'; + } + } + + return new OldValue(this.name, prefixed, prefixed, _regexp(prefixed)); + }; + + _proto.add = function add(decl, prefix) { + if (decl.prop.indexOf('grid') !== -1 && prefix !== '-webkit-') { + return undefined; + } + + return _Value.prototype.add.call(this, decl, prefix); + }; + + return Intrinsic; +}(Value); + +_defineProperty(Intrinsic, "names", ['max-content', 'min-content', 'fit-content', 'fill', 'fill-available', 'stretch']); + +module.exports = Intrinsic;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/justify-content.js b/node_modules/autoprefixer/lib/hacks/justify-content.js new file mode 100644 index 0000000..7e7bb95 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/justify-content.js @@ -0,0 +1,87 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var JustifyContent = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(JustifyContent, _Declaration); + + function JustifyContent() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = JustifyContent.prototype; + + /** + * Change property name for 2009 and 2012 specs + */ + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2009) { + return prefix + 'box-pack'; + } + + if (spec === 2012) { + return prefix + 'flex-pack'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize() { + return 'justify-content'; + } + /** + * Change value for 2009 and 2012 specs + */ + ; + + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec === 2009 || spec === 2012) { + var value = JustifyContent.oldValues[decl.value] || decl.value; + decl.value = value; + + if (spec !== 2009 || value !== 'distribute') { + return _Declaration.prototype.set.call(this, decl, prefix); + } + } else if (spec === 'final') { + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return undefined; + }; + + return JustifyContent; +}(Declaration); + +_defineProperty(JustifyContent, "names", ['justify-content', 'flex-pack', 'box-pack']); + +_defineProperty(JustifyContent, "oldValues", { + 'flex-end': 'end', + 'flex-start': 'start', + 'space-between': 'justify', + 'space-around': 'distribute' +}); + +module.exports = JustifyContent;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/mask-border.js b/node_modules/autoprefixer/lib/hacks/mask-border.js new file mode 100644 index 0000000..751615a --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/mask-border.js @@ -0,0 +1,48 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var MaskBorder = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(MaskBorder, _Declaration); + + function MaskBorder() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = MaskBorder.prototype; + + /** + * Return property name by final spec + */ + _proto.normalize = function normalize() { + return this.name.replace('box-image', 'border'); + } + /** + * Return flex property for 2012 spec + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + var result = _Declaration.prototype.prefixed.call(this, prop, prefix); + + if (prefix === '-webkit-') { + result = result.replace('border', 'box-image'); + } + + return result; + }; + + return MaskBorder; +}(Declaration); + +_defineProperty(MaskBorder, "names", ['mask-border', 'mask-border-source', 'mask-border-slice', 'mask-border-width', 'mask-border-outset', 'mask-border-repeat', 'mask-box-image', 'mask-box-image-source', 'mask-box-image-slice', 'mask-box-image-width', 'mask-box-image-outset', 'mask-box-image-repeat']); + +module.exports = MaskBorder;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/mask-composite.js b/node_modules/autoprefixer/lib/hacks/mask-composite.js new file mode 100644 index 0000000..f68fe00 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/mask-composite.js @@ -0,0 +1,106 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var MaskComposite = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(MaskComposite, _Declaration); + + function MaskComposite() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = MaskComposite.prototype; + + /** + * Prefix mask-composite for webkit + */ + _proto.insert = function insert(decl, prefix, prefixes) { + var isCompositeProp = decl.prop === 'mask-composite'; + var compositeValues; + + if (isCompositeProp) { + compositeValues = decl.value.split(','); + } else { + compositeValues = decl.value.match(MaskComposite.regexp) || []; + } + + compositeValues = compositeValues.map(function (el) { + return el.trim(); + }).filter(function (el) { + return el; + }); + var hasCompositeValues = compositeValues.length; + var compositeDecl; + + if (hasCompositeValues) { + compositeDecl = this.clone(decl); + compositeDecl.value = compositeValues.map(function (value) { + return MaskComposite.oldValues[value] || value; + }).join(', '); + + if (compositeValues.includes('intersect')) { + compositeDecl.value += ', xor'; + } + + compositeDecl.prop = prefix + 'mask-composite'; + } + + if (isCompositeProp) { + if (!hasCompositeValues) { + return undefined; + } + + if (this.needCascade(decl)) { + compositeDecl.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + return decl.parent.insertBefore(decl, compositeDecl); + } + + var cloned = this.clone(decl); + cloned.prop = prefix + cloned.prop; + + if (hasCompositeValues) { + cloned.value = cloned.value.replace(MaskComposite.regexp, ''); + } + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + decl.parent.insertBefore(decl, cloned); + + if (!hasCompositeValues) { + return decl; + } + + if (this.needCascade(decl)) { + compositeDecl.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + return decl.parent.insertBefore(decl, compositeDecl); + }; + + return MaskComposite; +}(Declaration); + +_defineProperty(MaskComposite, "names", ['mask', 'mask-composite']); + +_defineProperty(MaskComposite, "oldValues", { + add: 'source-over', + substract: 'source-out', + intersect: 'source-in', + exclude: 'xor' +}); + +_defineProperty(MaskComposite, "regexp", new RegExp("\\s+(" + Object.keys(MaskComposite.oldValues).join('|') + ")\\b(?!\\))\\s*(?=[,])", 'ig')); + +module.exports = MaskComposite;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/order.js b/node_modules/autoprefixer/lib/hacks/order.js new file mode 100644 index 0000000..1226a41 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/order.js @@ -0,0 +1,74 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var flexSpec = require('./flex-spec'); + +var Declaration = require('../declaration'); + +var Order = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(Order, _Declaration); + + function Order() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = Order.prototype; + + /** + * Change property name for 2009 and 2012 specs + */ + _proto.prefixed = function prefixed(prop, prefix) { + var spec; + + var _flexSpec = flexSpec(prefix); + + spec = _flexSpec[0]; + prefix = _flexSpec[1]; + + if (spec === 2009) { + return prefix + 'box-ordinal-group'; + } + + if (spec === 2012) { + return prefix + 'flex-order'; + } + + return _Declaration.prototype.prefixed.call(this, prop, prefix); + } + /** + * Return property name by final spec + */ + ; + + _proto.normalize = function normalize() { + return 'order'; + } + /** + * Fix value for 2009 spec + */ + ; + + _proto.set = function set(decl, prefix) { + var spec = flexSpec(prefix)[0]; + + if (spec === 2009 && /\d/.test(decl.value)) { + decl.value = (parseInt(decl.value) + 1).toString(); + return _Declaration.prototype.set.call(this, decl, prefix); + } + + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return Order; +}(Declaration); + +_defineProperty(Order, "names", ['order', 'flex-order', 'box-ordinal-group']); + +module.exports = Order;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/overscroll-behavior.js b/node_modules/autoprefixer/lib/hacks/overscroll-behavior.js new file mode 100644 index 0000000..be58e9e --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/overscroll-behavior.js @@ -0,0 +1,56 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var OverscrollBehavior = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(OverscrollBehavior, _Declaration); + + function OverscrollBehavior() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = OverscrollBehavior.prototype; + + /** + * Change property name for IE + */ + _proto.prefixed = function prefixed(prop, prefix) { + return prefix + 'scroll-chaining'; + } + /** + * Return property name by spec + */ + ; + + _proto.normalize = function normalize() { + return 'overscroll-behavior'; + } + /** + * Change value for IE + */ + ; + + _proto.set = function set(decl, prefix) { + if (decl.value === 'auto') { + decl.value = 'chained'; + } else if (decl.value === 'none' || decl.value === 'contain') { + decl.value = 'none'; + } + + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return OverscrollBehavior; +}(Declaration); + +_defineProperty(OverscrollBehavior, "names", ['overscroll-behavior', 'scroll-chaining']); + +module.exports = OverscrollBehavior;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/pixelated.js b/node_modules/autoprefixer/lib/hacks/pixelated.js new file mode 100644 index 0000000..3e0b906 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/pixelated.js @@ -0,0 +1,60 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var OldValue = require('../old-value'); + +var Value = require('../value'); + +var Pixelated = +/*#__PURE__*/ +function (_Value) { + _inheritsLoose(Pixelated, _Value); + + function Pixelated() { + return _Value.apply(this, arguments) || this; + } + + var _proto = Pixelated.prototype; + + /** + * Use non-standard name for WebKit and Firefox + */ + _proto.replace = function replace(string, prefix) { + if (prefix === '-webkit-') { + return string.replace(this.regexp(), '$1-webkit-optimize-contrast'); + } + + if (prefix === '-moz-') { + return string.replace(this.regexp(), '$1-moz-crisp-edges'); + } + + return _Value.prototype.replace.call(this, string, prefix); + } + /** + * Different name for WebKit and Firefox + */ + ; + + _proto.old = function old(prefix) { + if (prefix === '-webkit-') { + return new OldValue(this.name, '-webkit-optimize-contrast'); + } + + if (prefix === '-moz-') { + return new OldValue(this.name, '-moz-crisp-edges'); + } + + return _Value.prototype.old.call(this, prefix); + }; + + return Pixelated; +}(Value); + +_defineProperty(Pixelated, "names", ['pixelated']); + +module.exports = Pixelated;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/place-self.js b/node_modules/autoprefixer/lib/hacks/place-self.js new file mode 100644 index 0000000..dc517ad --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/place-self.js @@ -0,0 +1,57 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var utils = require('./grid-utils'); + +var PlaceSelf = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(PlaceSelf, _Declaration); + + function PlaceSelf() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = PlaceSelf.prototype; + + /** + * Translate place-self to separate -ms- prefixed properties + */ + _proto.insert = function insert(decl, prefix, prefixes) { + if (prefix !== '-ms-') return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); // prevent doubling of prefixes + + if (decl.parent.some(function (i) { + return i.prop === '-ms-grid-row-align'; + })) { + return undefined; + } + + var _utils$parse = utils.parse(decl), + _utils$parse$ = _utils$parse[0], + first = _utils$parse$[0], + second = _utils$parse$[1]; + + if (second) { + utils.insertDecl(decl, 'grid-row-align', first); + utils.insertDecl(decl, 'grid-column-align', second); + } else { + utils.insertDecl(decl, 'grid-row-align', first); + utils.insertDecl(decl, 'grid-column-align', first); + } + + return undefined; + }; + + return PlaceSelf; +}(Declaration); + +_defineProperty(PlaceSelf, "names", ['place-self']); + +module.exports = PlaceSelf;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/placeholder.js b/node_modules/autoprefixer/lib/hacks/placeholder.js new file mode 100644 index 0000000..d84026f --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/placeholder.js @@ -0,0 +1,58 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Selector = require('../selector'); + +var Placeholder = +/*#__PURE__*/ +function (_Selector) { + _inheritsLoose(Placeholder, _Selector); + + function Placeholder() { + return _Selector.apply(this, arguments) || this; + } + + var _proto = Placeholder.prototype; + + /** + * Add old mozilla to possible prefixes + */ + _proto.possible = function possible() { + return _Selector.prototype.possible.call(this).concat(['-moz- old', '-ms- old']); + } + /** + * Return different selectors depend on prefix + */ + ; + + _proto.prefixed = function prefixed(prefix) { + if (prefix === '-webkit-') { + return '::-webkit-input-placeholder'; + } + + if (prefix === '-ms-') { + return '::-ms-input-placeholder'; + } + + if (prefix === '-ms- old') { + return ':-ms-input-placeholder'; + } + + if (prefix === '-moz- old') { + return ':-moz-placeholder'; + } + + return "::" + prefix + "placeholder"; + }; + + return Placeholder; +}(Selector); + +_defineProperty(Placeholder, "names", ['::placeholder']); + +module.exports = Placeholder;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/text-decoration-skip-ink.js b/node_modules/autoprefixer/lib/hacks/text-decoration-skip-ink.js new file mode 100644 index 0000000..7c3e630 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/text-decoration-skip-ink.js @@ -0,0 +1,40 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var TextDecorationSkipInk = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(TextDecorationSkipInk, _Declaration); + + function TextDecorationSkipInk() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = TextDecorationSkipInk.prototype; + + /** + * Change prefix for ink value + */ + _proto.set = function set(decl, prefix) { + if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') { + decl.prop = prefix + 'text-decoration-skip'; + decl.value = 'ink'; + return decl; + } else { + return _Declaration.prototype.set.call(this, decl, prefix); + } + }; + + return TextDecorationSkipInk; +}(Declaration); + +_defineProperty(TextDecorationSkipInk, "names", ['text-decoration-skip-ink', 'text-decoration-skip']); + +module.exports = TextDecorationSkipInk;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/text-decoration.js b/node_modules/autoprefixer/lib/hacks/text-decoration.js new file mode 100644 index 0000000..40e0056 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/text-decoration.js @@ -0,0 +1,38 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var BASIC = ['none', 'underline', 'overline', 'line-through', 'blink', 'inherit', 'initial', 'unset']; + +var TextDecoration = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(TextDecoration, _Declaration); + + function TextDecoration() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = TextDecoration.prototype; + + /** + * Do not add prefixes for basic values. + */ + _proto.check = function check(decl) { + return decl.value.split(/\s+/).some(function (i) { + return BASIC.indexOf(i) === -1; + }); + }; + + return TextDecoration; +}(Declaration); + +_defineProperty(TextDecoration, "names", ['text-decoration']); + +module.exports = TextDecoration;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js b/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js new file mode 100644 index 0000000..eef1218 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/text-emphasis-position.js @@ -0,0 +1,35 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var TextEmphasisPosition = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(TextEmphasisPosition, _Declaration); + + function TextEmphasisPosition() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = TextEmphasisPosition.prototype; + + _proto.set = function set(decl, prefix) { + if (prefix === '-webkit-') { + decl.value = decl.value.replace(/\s*(right|left)\s*/i, ''); + } + + return _Declaration.prototype.set.call(this, decl, prefix); + }; + + return TextEmphasisPosition; +}(Declaration); + +_defineProperty(TextEmphasisPosition, "names", ['text-emphasis-position']); + +module.exports = TextEmphasisPosition;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/transform-decl.js b/node_modules/autoprefixer/lib/hacks/transform-decl.js new file mode 100644 index 0000000..94c5a85 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/transform-decl.js @@ -0,0 +1,112 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var TransformDecl = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(TransformDecl, _Declaration); + + function TransformDecl() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = TransformDecl.prototype; + + /** + * Recursively check all parents for @keyframes + */ + _proto.keyframeParents = function keyframeParents(decl) { + var parent = decl.parent; + + while (parent) { + if (parent.type === 'atrule' && parent.name === 'keyframes') { + return true; + } + + var _parent = parent; + parent = _parent.parent; + } + + return false; + } + /** + * Is transform contain 3D commands + */ + ; + + _proto.contain3d = function contain3d(decl) { + if (decl.prop === 'transform-origin') { + return false; + } + + for (var _iterator = TransformDecl.functions3d, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var func = _ref; + + if (decl.value.indexOf(func + "(") !== -1) { + return true; + } + } + + return false; + } + /** + * Replace rotateZ to rotate for IE 9 + */ + ; + + _proto.set = function set(decl, prefix) { + decl = _Declaration.prototype.set.call(this, decl, prefix); + + if (prefix === '-ms-') { + decl.value = decl.value.replace(/rotateZ/gi, 'rotate'); + } + + return decl; + } + /** + * Don't add prefix for IE in keyframes + */ + ; + + _proto.insert = function insert(decl, prefix, prefixes) { + if (prefix === '-ms-') { + if (!this.contain3d(decl) && !this.keyframeParents(decl)) { + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + } + } else if (prefix === '-o-') { + if (!this.contain3d(decl)) { + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + } + } else { + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + } + + return undefined; + }; + + return TransformDecl; +}(Declaration); + +_defineProperty(TransformDecl, "names", ['transform', 'transform-origin']); + +_defineProperty(TransformDecl, "functions3d", ['matrix3d', 'translate3d', 'translateZ', 'scale3d', 'scaleZ', 'rotate3d', 'rotateX', 'rotateY', 'perspective']); + +module.exports = TransformDecl;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/hacks/writing-mode.js b/node_modules/autoprefixer/lib/hacks/writing-mode.js new file mode 100644 index 0000000..71bfc05 --- /dev/null +++ b/node_modules/autoprefixer/lib/hacks/writing-mode.js @@ -0,0 +1,61 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var Declaration = require('../declaration'); + +var WritingMode = +/*#__PURE__*/ +function (_Declaration) { + _inheritsLoose(WritingMode, _Declaration); + + function WritingMode() { + return _Declaration.apply(this, arguments) || this; + } + + var _proto = WritingMode.prototype; + + _proto.insert = function insert(decl, prefix, prefixes) { + if (prefix === '-ms-') { + var cloned = this.set(this.clone(decl), prefix); + + if (this.needCascade(decl)) { + cloned.raws.before = this.calcBefore(prefixes, decl, prefix); + } + + var direction = 'ltr'; + decl.parent.nodes.forEach(function (i) { + if (i.prop === 'direction') { + if (i.value === 'rtl' || i.value === 'ltr') direction = i.value; + } + }); + cloned.value = WritingMode.msValues[direction][decl.value] || decl.value; + return decl.parent.insertBefore(decl, cloned); + } + + return _Declaration.prototype.insert.call(this, decl, prefix, prefixes); + }; + + return WritingMode; +}(Declaration); + +_defineProperty(WritingMode, "names", ['writing-mode']); + +_defineProperty(WritingMode, "msValues", { + ltr: { + 'horizontal-tb': 'lr-tb', + 'vertical-rl': 'tb-rl', + 'vertical-lr': 'tb-lr' + }, + rtl: { + 'horizontal-tb': 'rl-tb', + 'vertical-rl': 'bt-rl', + 'vertical-lr': 'bt-lr' + } +}); + +module.exports = WritingMode;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/info.js b/node_modules/autoprefixer/lib/info.js new file mode 100644 index 0000000..a036b20 --- /dev/null +++ b/node_modules/autoprefixer/lib/info.js @@ -0,0 +1,176 @@ +"use strict"; + +var browserslist = require('browserslist'); + +function capitalize(str) { + return str.slice(0, 1).toUpperCase() + str.slice(1); +} + +var NAMES = { + ie: 'IE', + ie_mob: 'IE Mobile', + ios_saf: 'iOS', + op_mini: 'Opera Mini', + op_mob: 'Opera Mobile', + and_chr: 'Chrome for Android', + and_ff: 'Firefox for Android', + and_uc: 'UC for Android' +}; + +function prefix(name, prefixes, note) { + var out = " " + name; + if (note) out += ' *'; + out += ': '; + out += prefixes.map(function (i) { + return i.replace(/^-(.*)-$/g, '$1'); + }).join(', '); + out += '\n'; + return out; +} + +module.exports = function (prefixes) { + if (prefixes.browsers.selected.length === 0) { + return 'No browsers selected'; + } + + var versions = {}; + + for (var _iterator = prefixes.browsers.selected, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _browser = _ref; + + var parts = _browser.split(' '); + + var _name2 = parts[0]; + var version = parts[1]; + _name2 = NAMES[_name2] || capitalize(_name2); + + if (versions[_name2]) { + versions[_name2].push(version); + } else { + versions[_name2] = [version]; + } + } + + var out = 'Browsers:\n'; + + for (var browser in versions) { + var list = versions[browser]; + list = list.sort(function (a, b) { + return parseFloat(b) - parseFloat(a); + }); + out += " " + browser + ": " + list.join(', ') + "\n"; + } + + var coverage = browserslist.coverage(prefixes.browsers.selected); + var round = Math.round(coverage * 100) / 100.0; + out += "\nThese browsers account for " + round + "% of all users globally\n"; + var atrules = []; + + for (var name in prefixes.add) { + var data = prefixes.add[name]; + + if (name[0] === '@' && data.prefixes) { + atrules.push(prefix(name, data.prefixes)); + } + } + + if (atrules.length > 0) { + out += "\nAt-Rules:\n" + atrules.sort().join(''); + } + + var selectors = []; + + for (var _iterator2 = prefixes.add.selectors, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var selector = _ref2; + + if (selector.prefixes) { + selectors.push(prefix(selector.name, selector.prefixes)); + } + } + + if (selectors.length > 0) { + out += "\nSelectors:\n" + selectors.sort().join(''); + } + + var values = []; + var props = []; + var hadGrid = false; + + for (var _name in prefixes.add) { + var _data = prefixes.add[_name]; + + if (_name[0] !== '@' && _data.prefixes) { + var grid = _name.indexOf('grid-') === 0; + if (grid) hadGrid = true; + props.push(prefix(_name, _data.prefixes, grid)); + } + + if (!Array.isArray(_data.values)) { + continue; + } + + for (var _iterator3 = _data.values, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var value = _ref3; + + var _grid = value.name.includes('grid'); + + if (_grid) hadGrid = true; + var string = prefix(value.name, value.prefixes, _grid); + + if (!values.includes(string)) { + values.push(string); + } + } + } + + if (props.length > 0) { + out += "\nProperties:\n" + props.sort().join(''); + } + + if (values.length > 0) { + out += "\nValues:\n" + values.sort().join(''); + } + + if (hadGrid) { + out += '\n* - Prefixes will be added only on grid: true option.\n'; + } + + if (!atrules.length && !selectors.length && !props.length && !values.length) { + out += '\nAwesome! Your browsers don\'t require any vendor prefixes.' + '\nNow you can remove Autoprefixer from build steps.'; + } + + return out; +};
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/old-selector.js b/node_modules/autoprefixer/lib/old-selector.js new file mode 100644 index 0000000..ba0913e --- /dev/null +++ b/node_modules/autoprefixer/lib/old-selector.js @@ -0,0 +1,95 @@ +"use strict"; + +var OldSelector = +/*#__PURE__*/ +function () { + function OldSelector(selector, prefix) { + this.prefix = prefix; + this.prefixed = selector.prefixed(this.prefix); + this.regexp = selector.regexp(this.prefix); + this.prefixeds = selector.possible().map(function (x) { + return [selector.prefixed(x), selector.regexp(x)]; + }); + this.unprefixed = selector.name; + this.nameRegexp = selector.regexp(); + } + /** + * Is rule a hack without unprefixed version bottom + */ + + + var _proto = OldSelector.prototype; + + _proto.isHack = function isHack(rule) { + var index = rule.parent.index(rule) + 1; + var rules = rule.parent.nodes; + + while (index < rules.length) { + var before = rules[index].selector; + + if (!before) { + return true; + } + + if (before.includes(this.unprefixed) && before.match(this.nameRegexp)) { + return false; + } + + var some = false; + + for (var _iterator = this.prefixeds, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _ref2 = _ref, + string = _ref2[0], + regexp = _ref2[1]; + + if (before.includes(string) && before.match(regexp)) { + some = true; + break; + } + } + + if (!some) { + return true; + } + + index += 1; + } + + return true; + } + /** + * Does rule contain an unnecessary prefixed selector + */ + ; + + _proto.check = function check(rule) { + if (!rule.selector.includes(this.prefixed)) { + return false; + } + + if (!rule.selector.match(this.regexp)) { + return false; + } + + if (this.isHack(rule)) { + return false; + } + + return true; + }; + + return OldSelector; +}(); + +module.exports = OldSelector;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/old-value.js b/node_modules/autoprefixer/lib/old-value.js new file mode 100644 index 0000000..0a18e1e --- /dev/null +++ b/node_modules/autoprefixer/lib/old-value.js @@ -0,0 +1,32 @@ +"use strict"; + +var utils = require('./utils'); + +var OldValue = +/*#__PURE__*/ +function () { + function OldValue(unprefixed, prefixed, string, regexp) { + this.unprefixed = unprefixed; + this.prefixed = prefixed; + this.string = string || prefixed; + this.regexp = regexp || utils.regexp(prefixed); + } + /** + * Check, that value contain old value + */ + + + var _proto = OldValue.prototype; + + _proto.check = function check(value) { + if (value.includes(this.string)) { + return !!value.match(this.regexp); + } + + return false; + }; + + return OldValue; +}(); + +module.exports = OldValue;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/prefixer.js b/node_modules/autoprefixer/lib/prefixer.js new file mode 100644 index 0000000..63acf09 --- /dev/null +++ b/node_modules/autoprefixer/lib/prefixer.js @@ -0,0 +1,174 @@ +"use strict"; + +var vendor = require('postcss').vendor; + +var Browsers = require('./browsers'); + +var utils = require('./utils'); +/** + * Recursively clone objects + */ + + +function _clone(obj, parent) { + var cloned = new obj.constructor(); + + for (var _i = 0, _Object$keys = Object.keys(obj || {}); _i < _Object$keys.length; _i++) { + var i = _Object$keys[_i]; + var value = obj[i]; + + if (i === 'parent' && typeof value === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (i === 'source' || i === null) { + cloned[i] = value; + } else if (Array.isArray(value)) { + cloned[i] = value.map(function (x) { + return _clone(x, cloned); + }); + } else if (i !== '_autoprefixerPrefix' && i !== '_autoprefixerValues') { + if (typeof value === 'object' && value !== null) { + value = _clone(value, cloned); + } + + cloned[i] = value; + } + } + + return cloned; +} + +var Prefixer = +/*#__PURE__*/ +function () { + /** + * Add hack to selected names + */ + Prefixer.hack = function hack(klass) { + var _this = this; + + if (!this.hacks) { + this.hacks = {}; + } + + return klass.names.map(function (name) { + _this.hacks[name] = klass; + return _this.hacks[name]; + }); + } + /** + * Load hacks for some names + */ + ; + + Prefixer.load = function load(name, prefixes, all) { + var Klass = this.hacks && this.hacks[name]; + + if (Klass) { + return new Klass(name, prefixes, all); + } else { + return new this(name, prefixes, all); + } + } + /** + * Clone node and clean autprefixer custom caches + */ + ; + + Prefixer.clone = function clone(node, overrides) { + var cloned = _clone(node); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + }; + + function Prefixer(name, prefixes, all) { + this.prefixes = prefixes; + this.name = name; + this.all = all; + } + /** + * Find prefix in node parents + */ + + + var _proto = Prefixer.prototype; + + _proto.parentPrefix = function parentPrefix(node) { + var prefix; + + if (typeof node._autoprefixerPrefix !== 'undefined') { + prefix = node._autoprefixerPrefix; + } else if (node.type === 'decl' && node.prop[0] === '-') { + prefix = vendor.prefix(node.prop); + } else if (node.type === 'root') { + prefix = false; + } else if (node.type === 'rule' && node.selector.includes(':-') && /:(-\w+-)/.test(node.selector)) { + prefix = node.selector.match(/:(-\w+-)/)[1]; + } else if (node.type === 'atrule' && node.name[0] === '-') { + prefix = vendor.prefix(node.name); + } else { + prefix = this.parentPrefix(node.parent); + } + + if (!Browsers.prefixes().includes(prefix)) { + prefix = false; + } + + node._autoprefixerPrefix = prefix; + return node._autoprefixerPrefix; + } + /** + * Clone node with prefixes + */ + ; + + _proto.process = function process(node, result) { + if (!this.check(node)) { + return undefined; + } + + var parent = this.parentPrefix(node); + var prefixes = this.prefixes.filter(function (prefix) { + return !parent || parent === utils.removeNote(prefix); + }); + var added = []; + + for (var _iterator = prefixes, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i2 >= _iterator.length) break; + _ref = _iterator[_i2++]; + } else { + _i2 = _iterator.next(); + if (_i2.done) break; + _ref = _i2.value; + } + + var prefix = _ref; + + if (this.add(node, prefix, added.concat([prefix]), result)) { + added.push(prefix); + } + } + + return added; + } + /** + * Shortcut for Prefixer.clone + */ + ; + + _proto.clone = function clone(node, overrides) { + return Prefixer.clone(node, overrides); + }; + + return Prefixer; +}(); + +module.exports = Prefixer;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/prefixes.js b/node_modules/autoprefixer/lib/prefixes.js new file mode 100644 index 0000000..ab696ae --- /dev/null +++ b/node_modules/autoprefixer/lib/prefixes.js @@ -0,0 +1,542 @@ +"use strict"; + +var vendor = require('postcss').vendor; + +var Declaration = require('./declaration'); + +var Resolution = require('./resolution'); + +var Transition = require('./transition'); + +var Processor = require('./processor'); + +var Supports = require('./supports'); + +var Browsers = require('./browsers'); + +var Selector = require('./selector'); + +var AtRule = require('./at-rule'); + +var Value = require('./value'); + +var utils = require('./utils'); + +Selector.hack(require('./hacks/fullscreen')); +Selector.hack(require('./hacks/placeholder')); +Declaration.hack(require('./hacks/flex')); +Declaration.hack(require('./hacks/order')); +Declaration.hack(require('./hacks/filter')); +Declaration.hack(require('./hacks/grid-end')); +Declaration.hack(require('./hacks/animation')); +Declaration.hack(require('./hacks/flex-flow')); +Declaration.hack(require('./hacks/flex-grow')); +Declaration.hack(require('./hacks/flex-wrap')); +Declaration.hack(require('./hacks/grid-area')); +Declaration.hack(require('./hacks/place-self')); +Declaration.hack(require('./hacks/grid-start')); +Declaration.hack(require('./hacks/align-self')); +Declaration.hack(require('./hacks/appearance')); +Declaration.hack(require('./hacks/flex-basis')); +Declaration.hack(require('./hacks/mask-border')); +Declaration.hack(require('./hacks/mask-composite')); +Declaration.hack(require('./hacks/align-items')); +Declaration.hack(require('./hacks/flex-shrink')); +Declaration.hack(require('./hacks/break-props')); +Declaration.hack(require('./hacks/color-adjust')); +Declaration.hack(require('./hacks/writing-mode')); +Declaration.hack(require('./hacks/border-image')); +Declaration.hack(require('./hacks/align-content')); +Declaration.hack(require('./hacks/border-radius')); +Declaration.hack(require('./hacks/block-logical')); +Declaration.hack(require('./hacks/grid-template')); +Declaration.hack(require('./hacks/inline-logical')); +Declaration.hack(require('./hacks/grid-row-align')); +Declaration.hack(require('./hacks/transform-decl')); +Declaration.hack(require('./hacks/flex-direction')); +Declaration.hack(require('./hacks/image-rendering')); +Declaration.hack(require('./hacks/backdrop-filter')); +Declaration.hack(require('./hacks/background-clip')); +Declaration.hack(require('./hacks/text-decoration')); +Declaration.hack(require('./hacks/justify-content')); +Declaration.hack(require('./hacks/background-size')); +Declaration.hack(require('./hacks/grid-row-column')); +Declaration.hack(require('./hacks/grid-rows-columns')); +Declaration.hack(require('./hacks/grid-column-align')); +Declaration.hack(require('./hacks/overscroll-behavior')); +Declaration.hack(require('./hacks/grid-template-areas')); +Declaration.hack(require('./hacks/text-emphasis-position')); +Declaration.hack(require('./hacks/text-decoration-skip-ink')); +Value.hack(require('./hacks/gradient')); +Value.hack(require('./hacks/intrinsic')); +Value.hack(require('./hacks/pixelated')); +Value.hack(require('./hacks/image-set')); +Value.hack(require('./hacks/cross-fade')); +Value.hack(require('./hacks/display-flex')); +Value.hack(require('./hacks/display-grid')); +Value.hack(require('./hacks/filter-value')); +var declsCache = {}; + +var Prefixes = +/*#__PURE__*/ +function () { + function Prefixes(data, browsers, options) { + if (options === void 0) { + options = {}; + } + + this.data = data; + this.browsers = browsers; + this.options = options; + + var _this$preprocess = this.preprocess(this.select(this.data)); + + this.add = _this$preprocess[0]; + this.remove = _this$preprocess[1]; + this.transition = new Transition(this); + this.processor = new Processor(this); + } + /** + * Return clone instance to remove all prefixes + */ + + + var _proto = Prefixes.prototype; + + _proto.cleaner = function cleaner() { + if (this.cleanerCache) { + return this.cleanerCache; + } + + if (this.browsers.selected.length) { + var empty = new Browsers(this.browsers.data, []); + this.cleanerCache = new Prefixes(this.data, empty, this.options); + } else { + return this; + } + + return this.cleanerCache; + } + /** + * Select prefixes from data, which is necessary for selected browsers + */ + ; + + _proto.select = function select(list) { + var _this = this; + + var selected = { + add: {}, + remove: {} + }; + + var _loop = function _loop(name) { + var data = list[name]; + var add = data.browsers.map(function (i) { + var params = i.split(' '); + return { + browser: params[0] + " " + params[1], + note: params[2] + }; + }); + var notes = add.filter(function (i) { + return i.note; + }).map(function (i) { + return _this.browsers.prefix(i.browser) + " " + i.note; + }); + notes = utils.uniq(notes); + add = add.filter(function (i) { + return _this.browsers.isSelected(i.browser); + }).map(function (i) { + var prefix = _this.browsers.prefix(i.browser); + + if (i.note) { + return prefix + " " + i.note; + } else { + return prefix; + } + }); + add = _this.sort(utils.uniq(add)); + + if (_this.options.flexbox === 'no-2009') { + add = add.filter(function (i) { + return !i.includes('2009'); + }); + } + + var all = data.browsers.map(function (i) { + return _this.browsers.prefix(i); + }); + + if (data.mistakes) { + all = all.concat(data.mistakes); + } + + all = all.concat(notes); + all = utils.uniq(all); + + if (add.length) { + selected.add[name] = add; + + if (add.length < all.length) { + selected.remove[name] = all.filter(function (i) { + return !add.includes(i); + }); + } + } else { + selected.remove[name] = all; + } + }; + + for (var name in list) { + _loop(name); + } + + return selected; + } + /** + * Sort vendor prefixes + */ + ; + + _proto.sort = function sort(prefixes) { + return prefixes.sort(function (a, b) { + var aLength = utils.removeNote(a).length; + var bLength = utils.removeNote(b).length; + + if (aLength === bLength) { + return b.length - a.length; + } else { + return bLength - aLength; + } + }); + } + /** + * Cache prefixes data to fast CSS processing + */ + ; + + _proto.preprocess = function preprocess(selected) { + var add = { + 'selectors': [], + '@supports': new Supports(Prefixes, this) + }; + + for (var name in selected.add) { + var prefixes = selected.add[name]; + + if (name === '@keyframes' || name === '@viewport') { + add[name] = new AtRule(name, prefixes, this); + } else if (name === '@resolution') { + add[name] = new Resolution(name, prefixes, this); + } else if (this.data[name].selector) { + add.selectors.push(Selector.load(name, prefixes, this)); + } else { + var props = this.data[name].props; + + if (props) { + var value = Value.load(name, prefixes, this); + + for (var _iterator = props, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prop = _ref; + + if (!add[prop]) { + add[prop] = { + values: [] + }; + } + + add[prop].values.push(value); + } + } else { + var values = add[name] && add[name].values || []; + add[name] = Declaration.load(name, prefixes, this); + add[name].values = values; + } + } + } + + var remove = { + selectors: [] + }; + + for (var _name in selected.remove) { + var _prefixes = selected.remove[_name]; + + if (this.data[_name].selector) { + var selector = Selector.load(_name, _prefixes); + + for (var _iterator2 = _prefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var prefix = _ref2; + remove.selectors.push(selector.old(prefix)); + } + } else if (_name === '@keyframes' || _name === '@viewport') { + for (var _iterator3 = _prefixes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var _prefix = _ref3; + + var prefixed = "@" + _prefix + _name.slice(1); + + remove[prefixed] = { + remove: true + }; + } + } else if (_name === '@resolution') { + remove[_name] = new Resolution(_name, _prefixes, this); + } else { + var _props = this.data[_name].props; + + if (_props) { + var _value = Value.load(_name, [], this); + + for (var _iterator4 = _prefixes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var _prefix2 = _ref4; + + var old = _value.old(_prefix2); + + if (old) { + for (var _iterator5 = _props, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var _prop = _ref5; + + if (!remove[_prop]) { + remove[_prop] = {}; + } + + if (!remove[_prop].values) { + remove[_prop].values = []; + } + + remove[_prop].values.push(old); + } + } + } + } else { + for (var _iterator6 = _prefixes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var p = _ref6; + var olds = this.decl(_name).old(_name, p); + + if (_name === 'align-self') { + var a = add[_name] && add[_name].prefixes; + + if (a) { + if (p === '-webkit- 2009' && a.includes('-webkit-')) { + continue; + } else if (p === '-webkit-' && a.includes('-webkit- 2009')) { + continue; + } + } + } + + for (var _iterator7 = olds, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var _prefixed = _ref7; + + if (!remove[_prefixed]) { + remove[_prefixed] = {}; + } + + remove[_prefixed].remove = true; + } + } + } + } + } + + return [add, remove]; + } + /** + * Declaration loader with caching + */ + ; + + _proto.decl = function decl(prop) { + var decl = declsCache[prop]; + + if (decl) { + return decl; + } else { + declsCache[prop] = Declaration.load(prop); + return declsCache[prop]; + } + } + /** + * Return unprefixed version of property + */ + ; + + _proto.unprefixed = function unprefixed(prop) { + var value = this.normalize(vendor.unprefixed(prop)); + + if (value === 'flex-direction') { + value = 'flex-flow'; + } + + return value; + } + /** + * Normalize prefix for remover + */ + ; + + _proto.normalize = function normalize(prop) { + return this.decl(prop).normalize(prop); + } + /** + * Return prefixed version of property + */ + ; + + _proto.prefixed = function prefixed(prop, prefix) { + prop = vendor.unprefixed(prop); + return this.decl(prop).prefixed(prop, prefix); + } + /** + * Return values, which must be prefixed in selected property + */ + ; + + _proto.values = function values(type, prop) { + var data = this[type]; + var global = data['*'] && data['*'].values; + var values = data[prop] && data[prop].values; + + if (global && values) { + return utils.uniq(global.concat(values)); + } else { + return global || values || []; + } + } + /** + * Group declaration by unprefixed property to check them + */ + ; + + _proto.group = function group(decl) { + var _this2 = this; + + var rule = decl.parent; + var index = rule.index(decl); + var length = rule.nodes.length; + var unprefixed = this.unprefixed(decl.prop); + + var checker = function checker(step, callback) { + index += step; + + while (index >= 0 && index < length) { + var other = rule.nodes[index]; + + if (other.type === 'decl') { + if (step === -1 && other.prop === unprefixed) { + if (!Browsers.withPrefix(other.value)) { + break; + } + } + + if (_this2.unprefixed(other.prop) !== unprefixed) { + break; + } else if (callback(other) === true) { + return true; + } + + if (step === +1 && other.prop === unprefixed) { + if (!Browsers.withPrefix(other.value)) { + break; + } + } + } + + index += step; + } + + return false; + }; + + return { + up: function up(callback) { + return checker(-1, callback); + }, + down: function down(callback) { + return checker(+1, callback); + } + }; + }; + + return Prefixes; +}(); + +module.exports = Prefixes;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/processor.js b/node_modules/autoprefixer/lib/processor.js new file mode 100644 index 0000000..22c1076 --- /dev/null +++ b/node_modules/autoprefixer/lib/processor.js @@ -0,0 +1,754 @@ +"use strict"; + +var parser = require('postcss-value-parser'); + +var Value = require('./value'); + +var insertAreas = require('./hacks/grid-utils').insertAreas; + +var OLD_LINEAR = /(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i; +var OLD_RADIAL = /(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i; +var IGNORE_NEXT = /(!\s*)?autoprefixer:\s*ignore\s+next/i; +var GRID_REGEX = /(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i; +var SIZES = ['width', 'height', 'min-width', 'max-width', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size']; + +function hasGridTemplate(decl) { + return decl.parent.some(function (i) { + return i.prop === 'grid-template' || i.prop === 'grid-template-areas'; + }); +} + +function hasRowsAndColumns(decl) { + var hasRows = decl.parent.some(function (i) { + return i.prop === 'grid-template-rows'; + }); + var hasColumns = decl.parent.some(function (i) { + return i.prop === 'grid-template-columns'; + }); + return hasRows && hasColumns; +} + +var Processor = +/*#__PURE__*/ +function () { + function Processor(prefixes) { + this.prefixes = prefixes; + } + /** + * Add necessary prefixes + */ + + + var _proto = Processor.prototype; + + _proto.add = function add(css, result) { + var _this = this; + + // At-rules + var resolution = this.prefixes.add['@resolution']; + var keyframes = this.prefixes.add['@keyframes']; + var viewport = this.prefixes.add['@viewport']; + var supports = this.prefixes.add['@supports']; + css.walkAtRules(function (rule) { + if (rule.name === 'keyframes') { + if (!_this.disabled(rule, result)) { + return keyframes && keyframes.process(rule); + } + } else if (rule.name === 'viewport') { + if (!_this.disabled(rule, result)) { + return viewport && viewport.process(rule); + } + } else if (rule.name === 'supports') { + if (_this.prefixes.options.supports !== false && !_this.disabled(rule, result)) { + return supports.process(rule); + } + } else if (rule.name === 'media' && rule.params.includes('-resolution')) { + if (!_this.disabled(rule, result)) { + return resolution && resolution.process(rule); + } + } + + return undefined; + }); // Selectors + + css.walkRules(function (rule) { + if (_this.disabled(rule, result)) return undefined; + return _this.prefixes.add.selectors.map(function (selector) { + return selector.process(rule, result); + }); + }); + + function insideGrid(decl) { + return decl.parent.nodes.some(function (node) { + if (node.type !== 'decl') return false; + var displayGrid = node.prop === 'display' && /(inline-)?grid/.test(node.value); + var gridTemplate = node.prop.startsWith('grid-template'); + var gridGap = /^grid-([A-z]+-)?gap/.test(node.prop); + return displayGrid || gridTemplate || gridGap; + }); + } + + function insideFlex(decl) { + return decl.parent.some(function (node) { + return node.prop === 'display' && /(inline-)?flex/.test(node.value); + }); + } + + var gridPrefixes = this.gridStatus(css, result) && this.prefixes.add['grid-area'] && this.prefixes.add['grid-area'].prefixes; + css.walkDecls(function (decl) { + if (_this.disabledDecl(decl, result)) return undefined; + var parent = decl.parent; + var prop = decl.prop; + var value = decl.value; + + if (prop === 'grid-row-span') { + result.warn('grid-row-span is not part of final Grid Layout. Use grid-row.', { + node: decl + }); + return undefined; + } else if (prop === 'grid-column-span') { + result.warn('grid-column-span is not part of final Grid Layout. Use grid-column.', { + node: decl + }); + return undefined; + } else if (prop === 'display' && value === 'box') { + result.warn('You should write display: flex by final spec ' + 'instead of display: box', { + node: decl + }); + return undefined; + } else if (prop === 'text-emphasis-position') { + if (value === 'under' || value === 'over') { + result.warn('You should use 2 values for text-emphasis-position ' + 'For example, `under left` instead of just `under`.', { + node: decl + }); + } + } else if (/^(align|justify|place)-(items|content)$/.test(prop) && insideFlex(decl)) { + if (value === 'start' || value === 'end') { + result.warn(value + " value has mixed support, consider using " + ("flex-" + value + " instead"), { + node: decl + }); + } + } else if (prop === 'text-decoration-skip' && value === 'ink') { + result.warn('Replace text-decoration-skip: ink to ' + 'text-decoration-skip-ink: auto, because spec had been changed', { + node: decl + }); + } else { + if (gridPrefixes) { + if (/^(align|justify|place)-items$/.test(prop) && insideGrid(decl)) { + var fixed = prop.replace('-items', '-self'); + result.warn("IE does not support " + prop + " on grid containers. " + ("Try using " + fixed + " on child elements instead: ") + (decl.parent.selector + " > * { " + fixed + ": " + decl.value + " }"), { + node: decl + }); + } else if (/^(align|justify|place)-content$/.test(prop) && insideGrid(decl)) { + result.warn("IE does not support " + decl.prop + " on grid containers", { + node: decl + }); + } else if (prop === 'display' && decl.value === 'contents') { + result.warn('Please do not use display: contents; ' + 'if you have grid setting enabled', { + node: decl + }); + return undefined; + } else if (decl.prop === 'grid-gap') { + var status = _this.gridStatus(decl, result); + + if (status === 'autoplace' && !hasRowsAndColumns(decl) && !hasGridTemplate(decl)) { + result.warn('grid-gap only works if grid-template(-areas) is being ' + 'used or both rows and columns have been declared ' + 'and cells have not been manually ' + 'placed inside the explicit grid', { + node: decl + }); + } else if ((status === true || status === 'no-autoplace') && !hasGridTemplate(decl)) { + result.warn('grid-gap only works if grid-template(-areas) is being used', { + node: decl + }); + } + } else if (prop === 'grid-auto-columns') { + result.warn('grid-auto-columns is not supported by IE', { + node: decl + }); + return undefined; + } else if (prop === 'grid-auto-rows') { + result.warn('grid-auto-rows is not supported by IE', { + node: decl + }); + return undefined; + } else if (prop === 'grid-auto-flow') { + var hasRows = parent.some(function (i) { + return i.prop === 'grid-template-rows'; + }); + var hasCols = parent.some(function (i) { + return i.prop === 'grid-template-columns'; + }); + + if (hasGridTemplate(decl)) { + result.warn('grid-auto-flow is not supported by IE', { + node: decl + }); + } else if (value.includes('dense')) { + result.warn('grid-auto-flow: dense is not supported by IE', { + node: decl + }); + } else if (!hasRows && !hasCols) { + result.warn('grid-auto-flow works only if grid-template-rows and ' + 'grid-template-columns are present in the same rule', { + node: decl + }); + } + + return undefined; + } else if (value.includes('auto-fit')) { + result.warn('auto-fit value is not supported by IE', { + node: decl, + word: 'auto-fit' + }); + return undefined; + } else if (value.includes('auto-fill')) { + result.warn('auto-fill value is not supported by IE', { + node: decl, + word: 'auto-fill' + }); + return undefined; + } else if (prop.startsWith('grid-template') && value.includes('[')) { + result.warn('Autoprefixer currently does not support line names. ' + 'Try using grid-template-areas instead.', { + node: decl, + word: '[' + }); + } + } + + if (value.includes('radial-gradient')) { + if (OLD_RADIAL.test(decl.value)) { + result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `closest-side at 0 0` ' + 'instead of `0 0, closest-side`.', { + node: decl + }); + } else { + var ast = parser(value); + + for (var _iterator = ast.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + + if (i.type === 'function' && i.value === 'radial-gradient') { + for (var _iterator2 = i.nodes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var word = _ref2; + + if (word.type === 'word') { + if (word.value === 'cover') { + result.warn('Gradient has outdated direction syntax. ' + 'Replace `cover` to `farthest-corner`.', { + node: decl + }); + } else if (word.value === 'contain') { + result.warn('Gradient has outdated direction syntax. ' + 'Replace `contain` to `closest-side`.', { + node: decl + }); + } + } + } + } + } + } + } + + if (value.includes('linear-gradient')) { + if (OLD_LINEAR.test(value)) { + result.warn('Gradient has outdated direction syntax. ' + 'New syntax is like `to left` instead of `right`.', { + node: decl + }); + } + } + } + + if (SIZES.includes(decl.prop)) { + if (!decl.value.includes('-fill-available')) { + if (decl.value.includes('fill-available')) { + result.warn('Replace fill-available to stretch, ' + 'because spec had been changed', { + node: decl + }); + } else if (decl.value.includes('fill')) { + var _ast = parser(value); + + if (_ast.nodes.some(function (i) { + return i.type === 'word' && i.value === 'fill'; + })) { + result.warn('Replace fill to stretch, because spec had been changed', { + node: decl + }); + } + } + } + } + + var prefixer; + + if (decl.prop === 'transition' || decl.prop === 'transition-property') { + // Transition + return _this.prefixes.transition.add(decl, result); + } else if (decl.prop === 'align-self') { + // align-self flexbox or grid + var display = _this.displayType(decl); + + if (display !== 'grid' && _this.prefixes.options.flexbox !== false) { + prefixer = _this.prefixes.add['align-self']; + + if (prefixer && prefixer.prefixes) { + prefixer.process(decl); + } + } + + if (display !== 'flex' && _this.gridStatus(decl, result) !== false) { + prefixer = _this.prefixes.add['grid-row-align']; + + if (prefixer && prefixer.prefixes) { + return prefixer.process(decl, result); + } + } + } else if (decl.prop === 'justify-self') { + // justify-self flexbox or grid + var _display = _this.displayType(decl); + + if (_display !== 'flex' && _this.gridStatus(decl, result) !== false) { + prefixer = _this.prefixes.add['grid-column-align']; + + if (prefixer && prefixer.prefixes) { + return prefixer.process(decl, result); + } + } + } else if (decl.prop === 'place-self') { + prefixer = _this.prefixes.add['place-self']; + + if (prefixer && prefixer.prefixes && _this.gridStatus(decl, result) !== false) { + return prefixer.process(decl, result); + } + } else { + // Properties + prefixer = _this.prefixes.add[decl.prop]; + + if (prefixer && prefixer.prefixes) { + return prefixer.process(decl, result); + } + } + + return undefined; + }); // Insert grid-area prefixes. We need to be able to store the different + // rules as a data and hack API is not enough for this + + if (this.gridStatus(css, result)) { + insertAreas(css, this.disabled); + } // Values + + + return css.walkDecls(function (decl) { + if (_this.disabledValue(decl, result)) return; + + var unprefixed = _this.prefixes.unprefixed(decl.prop); + + for (var _iterator3 = _this.prefixes.values('add', unprefixed), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var value = _ref3; + value.process(decl, result); + } + + Value.save(_this.prefixes, decl); + }); + } + /** + * Remove unnecessary pefixes + */ + ; + + _proto.remove = function remove(css, result) { + var _this2 = this; + + // At-rules + var resolution = this.prefixes.remove['@resolution']; + css.walkAtRules(function (rule, i) { + if (_this2.prefixes.remove["@" + rule.name]) { + if (!_this2.disabled(rule, result)) { + rule.parent.removeChild(i); + } + } else if (rule.name === 'media' && rule.params.includes('-resolution') && resolution) { + resolution.clean(rule); + } + }); // Selectors + + var _loop = function _loop() { + if (_isArray4) { + if (_i4 >= _iterator4.length) return "break"; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) return "break"; + _ref4 = _i4.value; + } + + var checker = _ref4; + css.walkRules(function (rule, i) { + if (checker.check(rule)) { + if (!_this2.disabled(rule, result)) { + rule.parent.removeChild(i); + } + } + }); + }; + + for (var _iterator4 = this.prefixes.remove.selectors, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + var _ret = _loop(); + + if (_ret === "break") break; + } + + return css.walkDecls(function (decl, i) { + if (_this2.disabled(decl, result)) return; + var rule = decl.parent; + + var unprefixed = _this2.prefixes.unprefixed(decl.prop); // Transition + + + if (decl.prop === 'transition' || decl.prop === 'transition-property') { + _this2.prefixes.transition.remove(decl); + } // Properties + + + if (_this2.prefixes.remove[decl.prop] && _this2.prefixes.remove[decl.prop].remove) { + var notHack = _this2.prefixes.group(decl).down(function (other) { + return _this2.prefixes.normalize(other.prop) === unprefixed; + }); + + if (unprefixed === 'flex-flow') { + notHack = true; + } + + if (decl.prop === '-webkit-box-orient') { + var hacks = { + 'flex-direction': true, + 'flex-flow': true + }; + if (!decl.parent.some(function (j) { + return hacks[j.prop]; + })) return; + } + + if (notHack && !_this2.withHackValue(decl)) { + if (decl.raw('before').includes('\n')) { + _this2.reduceSpaces(decl); + } + + rule.removeChild(i); + return; + } + } // Values + + + for (var _iterator5 = _this2.prefixes.values('remove', unprefixed), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var checker = _ref5; + + if (!checker.check(decl.value)) { + continue; + } + + unprefixed = checker.unprefixed; + + var _notHack = _this2.prefixes.group(decl).down(function (other) { + return other.value.includes(unprefixed); + }); + + if (_notHack) { + rule.removeChild(i); + return; + } + } + }); + } + /** + * Some rare old values, which is not in standard + */ + ; + + _proto.withHackValue = function withHackValue(decl) { + return decl.prop === '-webkit-background-clip' && decl.value === 'text'; + } + /** + * Check for grid/flexbox options. + */ + ; + + _proto.disabledValue = function disabledValue(node, result) { + if (this.gridStatus(node, result) === false && node.type === 'decl') { + if (node.prop === 'display' && node.value.includes('grid')) { + return true; + } + } + + if (this.prefixes.options.flexbox === false && node.type === 'decl') { + if (node.prop === 'display' && node.value.includes('flex')) { + return true; + } + } + + return this.disabled(node, result); + } + /** + * Check for grid/flexbox options. + */ + ; + + _proto.disabledDecl = function disabledDecl(node, result) { + if (this.gridStatus(node, result) === false && node.type === 'decl') { + if (node.prop.includes('grid') || node.prop === 'justify-items') { + return true; + } + } + + if (this.prefixes.options.flexbox === false && node.type === 'decl') { + var other = ['order', 'justify-content', 'align-items', 'align-content']; + + if (node.prop.includes('flex') || other.includes(node.prop)) { + return true; + } + } + + return this.disabled(node, result); + } + /** + * Check for control comment and global options + */ + ; + + _proto.disabled = function disabled(node, result) { + if (!node) return false; + + if (node._autoprefixerDisabled !== undefined) { + return node._autoprefixerDisabled; + } + + if (node.parent) { + var p = node.prev(); + + if (p && p.type === 'comment' && IGNORE_NEXT.test(p.text)) { + node._autoprefixerDisabled = true; + node._autoprefixerSelfDisabled = true; + return true; + } + } + + var value = null; + + if (node.nodes) { + var status; + node.each(function (i) { + if (i.type !== 'comment') return; + + if (/(!\s*)?autoprefixer:\s*(off|on)/i.test(i.text)) { + if (typeof status !== 'undefined') { + result.warn('Second Autoprefixer control comment ' + 'was ignored. Autoprefixer applies control ' + 'comment to whole block, not to next rules.', { + node: i + }); + } else { + status = /on/i.test(i.text); + } + } + }); + + if (status !== undefined) { + value = !status; + } + } + + if (!node.nodes || value === null) { + if (node.parent) { + var isParentDisabled = this.disabled(node.parent, result); + + if (node.parent._autoprefixerSelfDisabled === true) { + value = false; + } else { + value = isParentDisabled; + } + } else { + value = false; + } + } + + node._autoprefixerDisabled = value; + return value; + } + /** + * Normalize spaces in cascade declaration group + */ + ; + + _proto.reduceSpaces = function reduceSpaces(decl) { + var stop = false; + this.prefixes.group(decl).up(function () { + stop = true; + return true; + }); + + if (stop) { + return; + } + + var parts = decl.raw('before').split('\n'); + var prevMin = parts[parts.length - 1].length; + var diff = false; + this.prefixes.group(decl).down(function (other) { + parts = other.raw('before').split('\n'); + var last = parts.length - 1; + + if (parts[last].length > prevMin) { + if (diff === false) { + diff = parts[last].length - prevMin; + } + + parts[last] = parts[last].slice(0, -diff); + other.raws.before = parts.join('\n'); + } + }); + } + /** + * Is it flebox or grid rule + */ + ; + + _proto.displayType = function displayType(decl) { + for (var _iterator6 = decl.parent.nodes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var i = _ref6; + + if (i.prop !== 'display') { + continue; + } + + if (i.value.includes('flex')) { + return 'flex'; + } + + if (i.value.includes('grid')) { + return 'grid'; + } + } + + return false; + } + /** + * Set grid option via control comment + */ + ; + + _proto.gridStatus = function gridStatus(node, result) { + if (!node) return false; + + if (node._autoprefixerGridStatus !== undefined) { + return node._autoprefixerGridStatus; + } + + var value = null; + + if (node.nodes) { + var status; + node.each(function (i) { + if (i.type !== 'comment') return; + + if (GRID_REGEX.test(i.text)) { + var hasAutoplace = /:\s*autoplace/i.test(i.text); + var noAutoplace = /no-autoplace/i.test(i.text); + + if (typeof status !== 'undefined') { + result.warn('Second Autoprefixer grid control comment was ' + 'ignored. Autoprefixer applies control comments to the whole ' + 'block, not to the next rules.', { + node: i + }); + } else if (hasAutoplace) { + status = 'autoplace'; + } else if (noAutoplace) { + status = true; + } else { + status = /on/i.test(i.text); + } + } + }); + + if (status !== undefined) { + value = status; + } + } + + if (node.type === 'atrule' && node.name === 'supports') { + var params = node.params; + + if (params.includes('grid') && params.includes('auto')) { + value = false; + } + } + + if (!node.nodes || value === null) { + if (node.parent) { + var isParentGrid = this.gridStatus(node.parent, result); + + if (node.parent._autoprefixerSelfDisabled === true) { + value = false; + } else { + value = isParentGrid; + } + } else { + value = this.prefixes.options.grid; + } + } + + node._autoprefixerGridStatus = value; + return value; + }; + + return Processor; +}(); + +module.exports = Processor;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/resolution.js b/node_modules/autoprefixer/lib/resolution.js new file mode 100644 index 0000000..4092e4e --- /dev/null +++ b/node_modules/autoprefixer/lib/resolution.js @@ -0,0 +1,156 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +var n2f = require('num2fraction'); + +var Prefixer = require('./prefixer'); + +var utils = require('./utils'); + +var REGEXP = /(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpi|x)/gi; +var SPLIT = /(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpi|x)/i; + +var Resolution = +/*#__PURE__*/ +function (_Prefixer) { + _inheritsLoose(Resolution, _Prefixer); + + function Resolution() { + return _Prefixer.apply(this, arguments) || this; + } + + var _proto = Resolution.prototype; + + /** + * Return prefixed query name + */ + _proto.prefixName = function prefixName(prefix, name) { + if (prefix === '-moz-') { + return name + '--moz-device-pixel-ratio'; + } else { + return prefix + name + '-device-pixel-ratio'; + } + } + /** + * Return prefixed query + */ + ; + + _proto.prefixQuery = function prefixQuery(prefix, name, colon, value, units) { + if (units === 'dpi') { + value = Number(value / 96); + } + + if (prefix === '-o-') { + value = n2f(value); + } + + return this.prefixName(prefix, name) + colon + value; + } + /** + * Remove prefixed queries + */ + ; + + _proto.clean = function clean(rule) { + var _this = this; + + if (!this.bad) { + this.bad = []; + + for (var _iterator = this.prefixes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prefix = _ref; + this.bad.push(this.prefixName(prefix, 'min')); + this.bad.push(this.prefixName(prefix, 'max')); + } + } + + rule.params = utils.editList(rule.params, function (queries) { + return queries.filter(function (query) { + return _this.bad.every(function (i) { + return !query.includes(i); + }); + }); + }); + } + /** + * Add prefixed queries + */ + ; + + _proto.process = function process(rule) { + var _this2 = this; + + var parent = this.parentPrefix(rule); + var prefixes = parent ? [parent] : this.prefixes; + rule.params = utils.editList(rule.params, function (origin, prefixed) { + for (var _iterator2 = origin, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var query = _ref2; + + if (!query.includes('min-resolution') && !query.includes('max-resolution')) { + prefixed.push(query); + continue; + } + + var _loop = function _loop() { + if (_isArray3) { + if (_i3 >= _iterator3.length) return "break"; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) return "break"; + _ref3 = _i3.value; + } + + var prefix = _ref3; + var processed = query.replace(REGEXP, function (str) { + var parts = str.match(SPLIT); + return _this2.prefixQuery(prefix, parts[1], parts[2], parts[3], parts[4]); + }); + prefixed.push(processed); + }; + + for (var _iterator3 = prefixes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + var _ret = _loop(); + + if (_ret === "break") break; + } + + prefixed.push(query); + } + + return utils.uniq(prefixed); + }); + }; + + return Resolution; +}(Prefixer); + +module.exports = Resolution;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/selector.js b/node_modules/autoprefixer/lib/selector.js new file mode 100644 index 0000000..3770afb --- /dev/null +++ b/node_modules/autoprefixer/lib/selector.js @@ -0,0 +1,178 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +var OldSelector = require('./old-selector'); + +var Prefixer = require('./prefixer'); + +var Browsers = require('./browsers'); + +var utils = require('./utils'); + +var Selector = +/*#__PURE__*/ +function (_Prefixer) { + _inheritsLoose(Selector, _Prefixer); + + function Selector(name, prefixes, all) { + var _this; + + _this = _Prefixer.call(this, name, prefixes, all) || this; + _this.regexpCache = {}; + return _this; + } + /** + * Is rule selectors need to be prefixed + */ + + + var _proto = Selector.prototype; + + _proto.check = function check(rule) { + if (rule.selector.includes(this.name)) { + return !!rule.selector.match(this.regexp()); + } + + return false; + } + /** + * Return prefixed version of selector + */ + ; + + _proto.prefixed = function prefixed(prefix) { + return this.name.replace(/^([^\w]*)/, "$1" + prefix); + } + /** + * Lazy loadRegExp for name + */ + ; + + _proto.regexp = function regexp(prefix) { + if (this.regexpCache[prefix]) { + return this.regexpCache[prefix]; + } + + var name = prefix ? this.prefixed(prefix) : this.name; + this.regexpCache[prefix] = new RegExp("(^|[^:\"'=])" + utils.escapeRegexp(name), 'gi'); + return this.regexpCache[prefix]; + } + /** + * All possible prefixes + */ + ; + + _proto.possible = function possible() { + return Browsers.prefixes(); + } + /** + * Return all possible selector prefixes + */ + ; + + _proto.prefixeds = function prefixeds(rule) { + if (rule._autoprefixerPrefixeds) { + return rule._autoprefixerPrefixeds; + } + + var prefixeds = {}; + + for (var _iterator = this.possible(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prefix = _ref; + prefixeds[prefix] = this.replace(rule.selector, prefix); + } + + rule._autoprefixerPrefixeds = prefixeds; + return rule._autoprefixerPrefixeds; + } + /** + * Is rule already prefixed before + */ + ; + + _proto.already = function already(rule, prefixeds, prefix) { + var index = rule.parent.index(rule) - 1; + + while (index >= 0) { + var before = rule.parent.nodes[index]; + + if (before.type !== 'rule') { + return false; + } + + var some = false; + + for (var key in prefixeds) { + var prefixed = prefixeds[key]; + + if (before.selector === prefixed) { + if (prefix === key) { + return true; + } else { + some = true; + break; + } + } + } + + if (!some) { + return false; + } + + index -= 1; + } + + return false; + } + /** + * Replace selectors by prefixed one + */ + ; + + _proto.replace = function replace(selector, prefix) { + return selector.replace(this.regexp(), "$1" + this.prefixed(prefix)); + } + /** + * Clone and add prefixes for at-rule + */ + ; + + _proto.add = function add(rule, prefix) { + var prefixeds = this.prefixeds(rule); + + if (this.already(rule, prefixeds, prefix)) { + return; + } + + var cloned = this.clone(rule, { + selector: prefixeds[prefix] + }); + rule.parent.insertBefore(rule, cloned); + } + /** + * Return function to fast find prefixed selector + */ + ; + + _proto.old = function old(prefix) { + return new OldSelector(this, prefix); + }; + + return Selector; +}(Prefixer); + +module.exports = Selector;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/supports.js b/node_modules/autoprefixer/lib/supports.js new file mode 100644 index 0000000..431caa0 --- /dev/null +++ b/node_modules/autoprefixer/lib/supports.js @@ -0,0 +1,386 @@ +"use strict"; + +var postcss = require('postcss'); + +var data = require('caniuse-lite').feature(require('caniuse-lite/data/features/css-featurequeries.js')); + +var Browsers = require('./browsers'); + +var brackets = require('./brackets'); + +var Value = require('./value'); + +var utils = require('./utils'); + +var supported = []; + +for (var browser in data.stats) { + var versions = data.stats[browser]; + + for (var version in versions) { + var support = versions[version]; + + if (/y/.test(support)) { + supported.push(browser + ' ' + version); + } + } +} + +var Supports = +/*#__PURE__*/ +function () { + function Supports(Prefixes, all) { + this.Prefixes = Prefixes; + this.all = all; + } + /** + * Return prefixer only with @supports supported browsers + */ + + + var _proto = Supports.prototype; + + _proto.prefixer = function prefixer() { + if (this.prefixerCache) { + return this.prefixerCache; + } + + var filtered = this.all.browsers.selected.filter(function (i) { + return supported.includes(i); + }); + var browsers = new Browsers(this.all.browsers.data, filtered, this.all.options); + this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options); + return this.prefixerCache; + } + /** + * Parse string into declaration property and value + */ + ; + + _proto.parse = function parse(str) { + var parts = str.split(':'); + var prop = parts[0]; + var value = parts[1]; + if (!value) value = ''; + return [prop.trim(), value.trim()]; + } + /** + * Create virtual rule to process it by prefixer + */ + ; + + _proto.virtual = function virtual(str) { + var _this$parse = this.parse(str), + prop = _this$parse[0], + value = _this$parse[1]; + + var rule = postcss.parse('a{}').first; + rule.append({ + prop: prop, + value: value, + raws: { + before: '' + } + }); + return rule; + } + /** + * Return array of Declaration with all necessary prefixes + */ + ; + + _proto.prefixed = function prefixed(str) { + var rule = this.virtual(str); + + if (this.disabled(rule.first)) { + return rule.nodes; + } + + var result = { + warn: function warn() { + return null; + } + }; + var prefixer = this.prefixer().add[rule.first.prop]; + prefixer && prefixer.process && prefixer.process(rule.first, result); + + for (var _iterator = rule.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var decl = _ref; + + for (var _iterator2 = this.prefixer().values('add', rule.first.prop), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var value = _ref2; + value.process(decl); + } + + Value.save(this.all, decl); + } + + return rule.nodes; + } + /** + * Return true if brackets node is "not" word + */ + ; + + _proto.isNot = function isNot(node) { + return typeof node === 'string' && /not\s*/i.test(node); + } + /** + * Return true if brackets node is "or" word + */ + ; + + _proto.isOr = function isOr(node) { + return typeof node === 'string' && /\s*or\s*/i.test(node); + } + /** + * Return true if brackets node is (prop: value) + */ + ; + + _proto.isProp = function isProp(node) { + return typeof node === 'object' && node.length === 1 && typeof node[0] === 'string'; + } + /** + * Return true if prefixed property has no unprefixed + */ + ; + + _proto.isHack = function isHack(all, unprefixed) { + var check = new RegExp("(\\(|\\s)" + utils.escapeRegexp(unprefixed) + ":"); + return !check.test(all); + } + /** + * Return true if we need to remove node + */ + ; + + _proto.toRemove = function toRemove(str, all) { + var _this$parse2 = this.parse(str), + prop = _this$parse2[0], + value = _this$parse2[1]; + + var unprefixed = this.all.unprefixed(prop); + var cleaner = this.all.cleaner(); + + if (cleaner.remove[prop] && cleaner.remove[prop].remove && !this.isHack(all, unprefixed)) { + return true; + } + + for (var _iterator3 = cleaner.values('remove', unprefixed), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var checker = _ref3; + + if (checker.check(value)) { + return true; + } + } + + return false; + } + /** + * Remove all unnecessary prefixes + */ + ; + + _proto.remove = function remove(nodes, all) { + var i = 0; + + while (i < nodes.length) { + if (!this.isNot(nodes[i - 1]) && this.isProp(nodes[i]) && this.isOr(nodes[i + 1])) { + if (this.toRemove(nodes[i][0], all)) { + nodes.splice(i, 2); + continue; + } + + i += 2; + continue; + } + + if (typeof nodes[i] === 'object') { + nodes[i] = this.remove(nodes[i], all); + } + + i += 1; + } + + return nodes; + } + /** + * Clean brackets with one child + */ + ; + + _proto.cleanBrackets = function cleanBrackets(nodes) { + var _this = this; + + return nodes.map(function (i) { + if (typeof i !== 'object') { + return i; + } + + if (i.length === 1 && typeof i[0] === 'object') { + return _this.cleanBrackets(i[0]); + } + + return _this.cleanBrackets(i); + }); + } + /** + * Add " or " between properties and convert it to brackets format + */ + ; + + _proto.convert = function convert(progress) { + var result = ['']; + + for (var _iterator4 = progress, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var i = _ref4; + result.push([i.prop + ": " + i.value]); + result.push(' or '); + } + + result[result.length - 1] = ''; + return result; + } + /** + * Compress value functions into a string nodes + */ + ; + + _proto.normalize = function normalize(nodes) { + var _this2 = this; + + if (typeof nodes !== 'object') { + return nodes; + } + + nodes = nodes.filter(function (i) { + return i !== ''; + }); + + if (typeof nodes[0] === 'string' && nodes[0].includes(':')) { + return [brackets.stringify(nodes)]; + } + + return nodes.map(function (i) { + return _this2.normalize(i); + }); + } + /** + * Add prefixes + */ + ; + + _proto.add = function add(nodes, all) { + var _this3 = this; + + return nodes.map(function (i) { + if (_this3.isProp(i)) { + var prefixed = _this3.prefixed(i[0]); + + if (prefixed.length > 1) { + return _this3.convert(prefixed); + } + + return i; + } + + if (typeof i === 'object') { + return _this3.add(i, all); + } + + return i; + }); + } + /** + * Add prefixed declaration + */ + ; + + _proto.process = function process(rule) { + var ast = brackets.parse(rule.params); + ast = this.normalize(ast); + ast = this.remove(ast, rule.params); + ast = this.add(ast, rule.params); + ast = this.cleanBrackets(ast); + rule.params = brackets.stringify(ast); + } + /** + * Check global options + */ + ; + + _proto.disabled = function disabled(node) { + if (!this.all.options.grid) { + if (node.prop === 'display' && node.value.includes('grid')) { + return true; + } + + if (node.prop.includes('grid') || node.prop === 'justify-items') { + return true; + } + } + + if (this.all.options.flexbox === false) { + if (node.prop === 'display' && node.value.includes('flex')) { + return true; + } + + var other = ['order', 'justify-content', 'align-items', 'align-content']; + + if (node.prop.includes('flex') || other.includes(node.prop)) { + return true; + } + } + + return false; + }; + + return Supports; +}(); + +module.exports = Supports;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/transition.js b/node_modules/autoprefixer/lib/transition.js new file mode 100644 index 0000000..8e9ce02 --- /dev/null +++ b/node_modules/autoprefixer/lib/transition.js @@ -0,0 +1,481 @@ +"use strict"; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +var parser = require('postcss-value-parser'); + +var vendor = require('postcss').vendor; + +var list = require('postcss').list; + +var Transition = +/*#__PURE__*/ +function () { + function Transition(prefixes) { + _defineProperty(this, "props", ['transition', 'transition-property']); + + this.prefixes = prefixes; + } + /** + * Process transition and add prefixes for all necessary properties + */ + + + var _proto = Transition.prototype; + + _proto.add = function add(decl, result) { + var _this = this; + + var prefix, prop; + var add = this.prefixes.add[decl.prop]; + var declPrefixes = add && add.prefixes || []; + var params = this.parse(decl.value); + var names = params.map(function (i) { + return _this.findProp(i); + }); + var added = []; + + if (names.some(function (i) { + return i[0] === '-'; + })) { + return; + } + + for (var _iterator = params, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var param = _ref; + prop = this.findProp(param); + if (prop[0] === '-') continue; + var prefixer = this.prefixes.add[prop]; + if (!prefixer || !prefixer.prefixes) continue; + + for (var _iterator3 = prefixer.prefixes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + prefix = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + prefix = _i3.value; + } + + var prefixed = this.prefixes.prefixed(prop, prefix); + + if (prefixed !== '-ms-transform' && !names.includes(prefixed)) { + if (!this.disabled(prop, prefix)) { + added.push(this.clone(prop, prefixed, param)); + } + } + } + } + + params = params.concat(added); + var value = this.stringify(params); + var webkitClean = this.stringify(this.cleanFromUnprefixed(params, '-webkit-')); + + if (declPrefixes.includes('-webkit-')) { + this.cloneBefore(decl, "-webkit-" + decl.prop, webkitClean); + } + + this.cloneBefore(decl, decl.prop, webkitClean); + + if (declPrefixes.includes('-o-')) { + var operaClean = this.stringify(this.cleanFromUnprefixed(params, '-o-')); + this.cloneBefore(decl, "-o-" + decl.prop, operaClean); + } + + for (var _iterator2 = declPrefixes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + prefix = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + prefix = _i2.value; + } + + if (prefix !== '-webkit-' && prefix !== '-o-') { + var prefixValue = this.stringify(this.cleanOtherPrefixes(params, prefix)); + this.cloneBefore(decl, prefix + decl.prop, prefixValue); + } + } + + if (value !== decl.value && !this.already(decl, decl.prop, value)) { + this.checkForWarning(result, decl); + decl.cloneBefore(); + decl.value = value; + } + } + /** + * Find property name + */ + ; + + _proto.findProp = function findProp(param) { + var prop = param[0].value; + + if (/^\d/.test(prop)) { + for (var _iterator4 = param.entries(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref2; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref2 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref2 = _i4.value; + } + + var _ref3 = _ref2, + i = _ref3[0], + token = _ref3[1]; + + if (i !== 0 && token.type === 'word') { + return token.value; + } + } + } + + return prop; + } + /** + * Does we already have this declaration + */ + ; + + _proto.already = function already(decl, prop, value) { + return decl.parent.some(function (i) { + return i.prop === prop && i.value === value; + }); + } + /** + * Add declaration if it is not exist + */ + ; + + _proto.cloneBefore = function cloneBefore(decl, prop, value) { + if (!this.already(decl, prop, value)) { + decl.cloneBefore({ + prop: prop, + value: value + }); + } + } + /** + * Show transition-property warning + */ + ; + + _proto.checkForWarning = function checkForWarning(result, decl) { + if (decl.prop !== 'transition-property') { + return; + } + + decl.parent.each(function (i) { + if (i.type !== 'decl') { + return undefined; + } + + if (i.prop.indexOf('transition-') !== 0) { + return undefined; + } + + if (i.prop === 'transition-property') { + return undefined; + } + + if (list.comma(i.value).length > 1) { + decl.warn(result, 'Replace transition-property to transition, ' + 'because Autoprefixer could not support ' + 'any cases of transition-property ' + 'and other transition-*'); + } + + return false; + }); + } + /** + * Process transition and remove all unnecessary properties + */ + ; + + _proto.remove = function remove(decl) { + var _this2 = this; + + var params = this.parse(decl.value); + params = params.filter(function (i) { + var prop = _this2.prefixes.remove[_this2.findProp(i)]; + + return !prop || !prop.remove; + }); + var value = this.stringify(params); + + if (decl.value === value) { + return; + } + + if (params.length === 0) { + decl.remove(); + return; + } + + var _double = decl.parent.some(function (i) { + return i.prop === decl.prop && i.value === value; + }); + + var smaller = decl.parent.some(function (i) { + return i !== decl && i.prop === decl.prop && i.value.length > value.length; + }); + + if (_double || smaller) { + decl.remove(); + return; + } + + decl.value = value; + } + /** + * Parse properties list to array + */ + ; + + _proto.parse = function parse(value) { + var ast = parser(value); + var result = []; + var param = []; + + for (var _iterator5 = ast.nodes, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref4; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref4 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref4 = _i5.value; + } + + var node = _ref4; + param.push(node); + + if (node.type === 'div' && node.value === ',') { + result.push(param); + param = []; + } + } + + result.push(param); + return result.filter(function (i) { + return i.length > 0; + }); + } + /** + * Return properties string from array + */ + ; + + _proto.stringify = function stringify(params) { + if (params.length === 0) { + return ''; + } + + var nodes = []; + + for (var _iterator6 = params, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref5; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref5 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref5 = _i6.value; + } + + var param = _ref5; + + if (param[param.length - 1].type !== 'div') { + param.push(this.div(params)); + } + + nodes = nodes.concat(param); + } + + if (nodes[0].type === 'div') { + nodes = nodes.slice(1); + } + + if (nodes[nodes.length - 1].type === 'div') { + nodes = nodes.slice(0, +-2 + 1 || undefined); + } + + return parser.stringify({ + nodes: nodes + }); + } + /** + * Return new param array with different name + */ + ; + + _proto.clone = function clone(origin, name, param) { + var result = []; + var changed = false; + + for (var _iterator7 = param, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref6; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref6 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref6 = _i7.value; + } + + var i = _ref6; + + if (!changed && i.type === 'word' && i.value === origin) { + result.push({ + type: 'word', + value: name + }); + changed = true; + } else { + result.push(i); + } + } + + return result; + } + /** + * Find or create separator + */ + ; + + _proto.div = function div(params) { + for (var _iterator8 = params, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref7; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref7 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref7 = _i8.value; + } + + var param = _ref7; + + for (var _iterator9 = param, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref8; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref8 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref8 = _i9.value; + } + + var node = _ref8; + + if (node.type === 'div' && node.value === ',') { + return node; + } + } + } + + return { + type: 'div', + value: ',', + after: ' ' + }; + }; + + _proto.cleanOtherPrefixes = function cleanOtherPrefixes(params, prefix) { + var _this3 = this; + + return params.filter(function (param) { + var current = vendor.prefix(_this3.findProp(param)); + return current === '' || current === prefix; + }); + } + /** + * Remove all non-webkit prefixes and unprefixed params if we have prefixed + */ + ; + + _proto.cleanFromUnprefixed = function cleanFromUnprefixed(params, prefix) { + var _this4 = this; + + var remove = params.map(function (i) { + return _this4.findProp(i); + }).filter(function (i) { + return i.slice(0, prefix.length) === prefix; + }).map(function (i) { + return _this4.prefixes.unprefixed(i); + }); + var result = []; + + for (var _iterator10 = params, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) { + var _ref9; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref9 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref9 = _i10.value; + } + + var param = _ref9; + var prop = this.findProp(param); + var p = vendor.prefix(prop); + + if (!remove.includes(prop) && (p === prefix || p === '')) { + result.push(param); + } + } + + return result; + } + /** + * Check property for disabled by option + */ + ; + + _proto.disabled = function disabled(prop, prefix) { + var other = ['order', 'justify-content', 'align-self', 'align-content']; + + if (prop.includes('flex') || other.includes(prop)) { + if (this.prefixes.options.flexbox === false) { + return true; + } + + if (this.prefixes.options.flexbox === 'no-2009') { + return prefix.includes('2009'); + } + } + + return undefined; + }; + + return Transition; +}(); + +module.exports = Transition;
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/utils.js b/node_modules/autoprefixer/lib/utils.js new file mode 100644 index 0000000..081da6d --- /dev/null +++ b/node_modules/autoprefixer/lib/utils.js @@ -0,0 +1,108 @@ +"use strict"; + +var list = require('postcss').list; + +module.exports = { + /** + * Throw special error, to tell beniary, + * that this error is from Autoprefixer. + */ + error: function error(text) { + var err = new Error(text); + err.autoprefixer = true; + throw err; + }, + + /** + * Return array, that doesn’t contain duplicates. + */ + uniq: function uniq(array) { + var filtered = []; + + for (var _iterator = array, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + + if (!filtered.includes(i)) { + filtered.push(i); + } + } + + return filtered; + }, + + /** + * Return "-webkit-" on "-webkit- old" + */ + removeNote: function removeNote(string) { + if (!string.includes(' ')) { + return string; + } + + return string.split(' ')[0]; + }, + + /** + * Escape RegExp symbols + */ + escapeRegexp: function escapeRegexp(string) { + return string.replace(/[.?*+^$[\]\\(){}|-]/g, '\\$&'); + }, + + /** + * Return regexp to check, that CSS string contain word + */ + regexp: function regexp(word, escape) { + if (escape === void 0) { + escape = true; + } + + if (escape) { + word = this.escapeRegexp(word); + } + + return new RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", 'gi'); + }, + + /** + * Change comma list + */ + editList: function editList(value, callback) { + var origin = list.comma(value); + var changed = callback(origin, []); + + if (origin === changed) { + return value; + } + + var join = value.match(/,\s*/); + join = join ? join[0] : ', '; + return changed.join(join); + }, + + /** + * Split the selector into parts. + * It returns 3 level deep array because selectors can be comma + * separated (1), space separated (2), and combined (3) + * @param {String} selector selector string + * @return {Array<Array<Array>>} 3 level deep array of split selector + * @see utils.test.js for examples + */ + splitSelector: function splitSelector(selector) { + return list.comma(selector).map(function (i) { + return list.space(i).map(function (k) { + return k.split(/(?=\.|#)/g); + }); + }); + } +};
\ No newline at end of file diff --git a/node_modules/autoprefixer/lib/value.js b/node_modules/autoprefixer/lib/value.js new file mode 100644 index 0000000..1139a6b --- /dev/null +++ b/node_modules/autoprefixer/lib/value.js @@ -0,0 +1,166 @@ +"use strict"; + +function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); } + +var vendor = require('postcss').vendor; + +var Prefixer = require('./prefixer'); + +var OldValue = require('./old-value'); + +var utils = require('./utils'); + +var Value = +/*#__PURE__*/ +function (_Prefixer) { + _inheritsLoose(Value, _Prefixer); + + function Value() { + return _Prefixer.apply(this, arguments) || this; + } + + /** + * Clone decl for each prefixed values + */ + Value.save = function save(prefixes, decl) { + var _this = this; + + var prop = decl.prop; + var result = []; + + var _loop = function _loop(prefix) { + var value = decl._autoprefixerValues[prefix]; + + if (value === decl.value) { + return "continue"; + } + + var item = void 0; + var propPrefix = vendor.prefix(prop); + + if (propPrefix === '-pie-') { + return "continue"; + } + + if (propPrefix === prefix) { + item = decl.value = value; + result.push(item); + return "continue"; + } + + var prefixed = prefixes.prefixed(prop, prefix); + var rule = decl.parent; + + if (!rule.every(function (i) { + return i.prop !== prefixed; + })) { + result.push(item); + return "continue"; + } + + var trimmed = value.replace(/\s+/, ' '); + var already = rule.some(function (i) { + return i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed; + }); + + if (already) { + result.push(item); + return "continue"; + } + + var cloned = _this.clone(decl, { + value: value + }); + + item = decl.parent.insertBefore(decl, cloned); + result.push(item); + }; + + for (var prefix in decl._autoprefixerValues) { + var _ret = _loop(prefix); + + if (_ret === "continue") continue; + } + + return result; + } + /** + * Is declaration need to be prefixed + */ + ; + + var _proto = Value.prototype; + + _proto.check = function check(decl) { + var value = decl.value; + + if (!value.includes(this.name)) { + return false; + } + + return !!value.match(this.regexp()); + } + /** + * Lazy regexp loading + */ + ; + + _proto.regexp = function regexp() { + return this.regexpCache || (this.regexpCache = utils.regexp(this.name)); + } + /** + * Add prefix to values in string + */ + ; + + _proto.replace = function replace(string, prefix) { + return string.replace(this.regexp(), "$1" + prefix + "$2"); + } + /** + * Get value with comments if it was not changed + */ + ; + + _proto.value = function value(decl) { + if (decl.raws.value && decl.raws.value.value === decl.value) { + return decl.raws.value.raw; + } else { + return decl.value; + } + } + /** + * Save values with next prefixed token + */ + ; + + _proto.add = function add(decl, prefix) { + if (!decl._autoprefixerValues) { + decl._autoprefixerValues = {}; + } + + var value = decl._autoprefixerValues[prefix] || this.value(decl); + var before; + + do { + before = value; + value = this.replace(value, prefix); + if (value === false) return; + } while (value !== before); + + decl._autoprefixerValues[prefix] = value; + } + /** + * Return function to fast find prefixed value + */ + ; + + _proto.old = function old(prefix) { + return new OldValue(this.name, prefix + this.name); + }; + + return Value; +}(Prefixer); + +module.exports = Value;
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/postcss/CHANGELOG.md b/node_modules/autoprefixer/node_modules/postcss/CHANGELOG.md new file mode 100644 index 0000000..f9589f8 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/CHANGELOG.md @@ -0,0 +1,617 @@ +# Change Log +This project adheres to [Semantic Versioning](http://semver.org/). + +## 7.0.18 +* Fix TypeScript type definitions (by Jan Buschtöns). + +## 7.0.17 +* Fix TypeScript type definitions (by Bob Matcuk and Jan Buschtöns). + +## 7.0.16 +* Revert Custom Properties fix until PostCSS 8.0. + +## 7.0.15 +* Fix Custom Properties support (by Ivan Solovev). + +## 7.0.14 +* Fix tokenizer for `postcss-less` (by Matt Lyons). + +## 7.0.13 +* Fix parsing regression in 7.0.12 for comments between property and value. + +## 7.0.12 +* Fix parsing broken CSS with two words in declaration property. + +## 7.0.11 +* Fix source maps on declaration semicolon (by Niklas Mischkulnig). + +## 7.0.10 +* Fix source maps (by Niklas Mischkulnig). + +## 7.0.9 +* Increase stringifing performance for non-raws AST. + +## 7.0.8 +* Fix TypeScript definitions (by Ankur Oberoi). +* Use `support-colors` 6.0. + +## 7.0.7 +* Extend `Error` in `CssSyntaxError`. + +## 7.0.6 +* Fix parsing files with BOM (by Veniamin Krol). + +## 7.0.5 +* Reduce npm package size (by Gilad Peleg). + +## 7.0.4 +* Fix safe parser regression. + +## 7.0.3 +* Fix tokenizer extendability (by Andrew Powell). +* Reduce npm package size. + +## 7.0.2 +* Fix warning text (by Rui Pedro M Lima). + +## 7.0.1 +* Fix JSDoc (by Steven Lambert). + +## 7.0 “President Amy” +* Remove Node.js 9 and Node.js 4 support. +* Remove IE and “dead” browsers support for client-side Babel transpiling. +* Add CSS position on error happened inside `walk()` (by Nikhil Gaba). +* Add `LazyResult#finally` (by Igor Kamyshev). +* Add warning on calling PostCSS without plugins and syntax options. +* Reduce client-side size. + +## 6.0.23 +* Fix parsing nested at-rules without semicolon, params, and spaces. +* Fix docs (by Kevin Schiffer and Pat Cavit). + +## 6.0.22 +* Fix `Node#prev` and `Node#next` on missed parent. + +## 6.0.21 +* Rename Chinese docs to fix `yarnpkg.com` issue. + +## 6.0.20 +* Better error message on `null` as input CSS. + +## 6.0.19 +* Fix TypeScript definitions for source maps (by Oleh Kuchuk). +* Fix `source` field in TypeScript definitions (by Sylvain Pollet-Villard). + +## 6.0.18 +* Use primitive object in TypeScript definitions (by Sylvain Pollet-Villard). + +## 6.0.17 +* Fix parsing comment in selector between word tokens (by Oleh Kuchuk). + +## 6.0.16 +* Fix warning text (by Michael Keller). + +## 6.0.15 +* Add warning about missed `from` option on `process().then()` call. +* Add IE 10 support. + +## 6.0.14 +* Fix TypeScript definitions (by Jed Mao). + +## 6.0.13 +* Fix TypeScript definitions for case of multiple PostCSS versions + in `node_modules` (by Chris Eppstein). +* Use `source-map` 0.6. + +## 6.0.12 +* Don’t copy `*` hack to declaration indent. + +## 6.0.11 +* Add upper case `!IMPORTANT` support. + +## 6.0.10 +* Reduce PostCSS size in webpack bundle. + +## 6.0.9 +* Improve error message for plugin with old PostCSS (by Igor Adamenko). + +## 6.0.8 +* Fix Node.js 4.2.2 support. + +## 6.0.7 +* Fix base64 decoding for old Node.js and browser. + +## 6.0.6 +* Fix `end` position in at-rule without semicolon (by Oleh Kuchuk). + +## 6.0.5 +* Move Babel config from `package.json` for `node_modules` compiling cases. + +## 6.0.4 +* Fix parsing `;;` after rules. +* Use Chalk 2.0. + +## 6.0.3 +* Fix escape sequences parsing (by Oleh Kuchuk). +* Added ability to force disable colors with an environment variable. +* Improved color detection of some terminal apps. + +## 6.0.2 +* Keep `raws.before` on moving `Root` children to new `Root`. + +## 6.0.1 +* Fix parser extensibility to use it in Safe Parser. + +## 6.0 “Marquis Orias” +* Remove node.js 0.12 support. +* Remove deprecated method from PostCSS 4. +* Insert methods remove child from previous parent, instead of closing. +* Insert methods and cloning doesn’t clean `raws` anymore. +* Methods `moveTo`, `moveAfter`, `moveBefore` were deprecated. +* Options was changed in `Plugin#process(css, processOptions, pluginOptions)`. +* Add stream parser to reduce memory usage (by Oleh Kuchuk). +* Add `before()`/`after()` shortcuts for `node.parent.insertBefore(node, x)`. +* Add `Rule#raws.ownSemicolon` for semicolon after templates for `@apply`. +* Use `babel-preset-env` to compile npm package. +* Remove `js-base64` from dependencies (by Roman Dvornov). +* Fix error message on single `:` in CSS. +* Move tests to Jest. +* Clean up test (by Gabriel Kalani). + +## 5.2.18 +* Fix TypeScript definitions for case of multiple PostCSS versions + in `node_modules` (by Chris Eppstein). + +## 5.2.17 +* Add `postcss-sass` suggestion to syntax error on `.sass` input. + +## 5.2.16 +* Better error on wrong argument in node constructor. + +## 5.2.15 +* Fix TypeScript definitions (by bumbleblym). + +## 5.2.14 +* Fix browser bundle building in webpack (by janschoenherr). + +## 5.2.13 +* Do not add comment to important raws. +* Fix JSDoc (by Dmitry Semigradsky). + +## 5.2.12 +* Fix typo in deprecation message (by Garet McKinley). + +## 5.2.11 +* Fix TypeScript definitions (by Jed Mao). + +## 5.2.10 +* Fix TypeScript definitions (by Jed Mao). + +## 5.2.9 +* Update TypeScript definitions (by Jed Mao). + +## 5.2.8 +* Fix error message (by Ben Briggs). + +## 5.2.7 +* Better error message on syntax object in plugins list. + +## 5.2.6 +* Fix `postcss.vendor` for values with spaces (by 刘祺). + +## 5.2.5 +* Better error message on unclosed string (by Ben Briggs). + +## 5.2.4 +* Improve terminal CSS syntax highlight (by Simon Lydell). + +## 5.2.3 +* Better color highlight in syntax error code frame. +* Fix color highlight support in old systems. + +## 5.2.2 +* Update `Processor#version`. + +## 5.2.1 +* Fix source map path for CSS without `from` option (by Michele Locati). + +## 5.2 “Duke Vapula” +* Add syntax highlight to code frame in syntax error (by Andrey Popp). +* Use Babel code frame style and size in syntax error. +* Add `[` and `]` tokens to parse `[attr=;] {}` correctly. +* Add `ignoreErrors` options to tokenizer (by Andrey Popp). +* Fix error position on tab indent (by Simon Lydell). + +## 5.1.2 +* Suggests SCSS/Less parsers on parse errors depends on file extension. + +## 5.1.1 +* Fix TypeScript definitions (by Efremov Alexey). + +## 5.1 “King and President Zagan” +* Add URI in source map support (by Mark Finger). +* Add `map.from` option (by Mark Finger). +* Add `<no source>` mappings for nodes without source (by Bogdan Chadkin). +* Add function value support to `map.prev` option (by Chris Montoro). +* Add declaration value type check in shortcut creating (by 刘祺). +* `Result#warn` now returns new created warning. +* Don’t call plugin creator in `postcss.plugin` call. +* Add source maps to PostCSS ES5 build. +* Add JSDoc to PostCSS classes. +* Clean npm package from unnecessary docs. + +## 5.0.21 +* Fix support with input source mao with `utf8` encoding name. + +## 5.0.20 +* Fix between raw value parsing (by David Clark). +* Update TypeScript definitions (by Jed Mao). +* Clean fake node.source after `append(string)`. + +## 5.0.19 +* Fix indent-based syntaxes support. + +## 5.0.18 +* Parse new lines according W3C CSS syntax specification. + +## 5.0.17 +* Fix options argument in `Node#warn` (by Ben Briggs). +* Fix TypeScript definitions (by Jed Mao). + +## 5.0.16 +* Fix CSS syntax error position on unclosed quotes. + +## 5.0.15 +* Fix `Node#clone()` on `null` value somewhere in node. + +## 5.0.14 +* Allow to use PostCSS in webpack bundle without JSON loader. + +## 5.0.13 +* Fix `index` and `word` options in `Warning#toString` (by Bogdan Chadkin). +* Fix input source content loading in errors. +* Fix map options on using `LazyResult` as input CSS. +* 100% test coverage. +* Use Babel 6. + +## 5.0.12 +* Allow passing a previous map with no mappings (by Andreas Lind). + +## 5.0.11 +* Increase plugins performance by 1.5 times. + +## 5.0.10 +* Fix warning from nodes without source. + +## 5.0.9 +* Fix source map type detection (by @asan). + +## 5.0.8 +* Fixed a missed step in `5.0.7` that caused the module to be published as + ES6 code. + +## 5.0.7 +* PostCSS now requires that node 0.12 is installed via the engines property + in package.json (by Howard Zuo). + +## 5.0.6 +* Fix parsing nested at-rule without semicolon (by Matt Drake). +* Trim `Declaration#value` (by Bogdan Chadkin). + +## 5.0.5 +* Fix multi-tokens property parsing (by Matt Drake). + +## 5.0.4 +* Fix start position in `Root#source`. +* Fix source map annotation, when CSS uses `\r\n` (by Mohammad Younes). + +## 5.0.3 +* Fix `url()` parsing. +* Fix using `selectors` in `Rule` constructor. +* Add start source to `Root` node. + +## 5.0.2 +* Fix `remove(index)` to be compatible with 4.x plugin. + +## 5.0.1 +* Fix PostCSS 4.x plugins compatibility. +* Fix type definition loading (by Jed Mao). + +## 5.0 “President Valac” +* Remove `safe` option. Move Safe Parser to separate project. +* `Node#toString` does not include `before` for root nodes. +* Remove plugin returning `Root` API. +* Remove Promise polyfill for node.js 0.10. +* Deprecate `eachInside`, `eachDecl`, `eachRule`, `eachAtRule` and `eachComment` + in favor of `walk`, `walkDecls`, `walkRules`, `walkAtRules` and `walkComments` + (by Jed Mao). +* Deprecate `Container#remove` and `Node#removeSelf` + in favor of `Container#removeChild` and `Node#remove` (by Ben Briggs). +* Deprecate `Node#replace` in favor of `replaceWith` (by Ben Briggs). +* Deprecate raw properties in favor of `Node#raws` object. +* Deprecate `Node#style` in favor of `raw`. +* Deprecate `CssSyntaxError#generated` in favor of `input`. +* Deprecate `Node#cleanStyles` in favor of `cleanRaws`. +* Deprecate `Root#prevMap` in favor of `Root.source.input.map`. +* Add `syntax`, `parser` and `stringifier` options for Custom Syntaxes. +* Add stringifier option to `Node#toString`. +* Add `Result#content` alias for non-CSS syntaxes. +* Add `plugin.process(css)` shortcut to every plugin function (by Ben Briggs). +* Add multiple nodes support to insert methods (by Jonathan Neal). +* Add `Node#warn` shortcut (by Ben Briggs). +* Add `word` and `index` options to errors and warnings (by David Clark). +* Add `line`, `column` properties to `Warning`. +* Use `supports-color` library to detect color support in error output. +* Add type definitions for TypeScript plugin developers (by Jed Mao). +* `Rule#selectors` setter detects separators. +* Add `postcss.stringify` method. +* Throw descriptive errors for incorrectly formatted plugins. +* Add docs to npm release. +* Fix `url()` parsing. +* Fix Windows support (by Jed Mao). + +## 4.1.16 +* Fix errors without stack trace. + +## 4.1.15 +* Allow asynchronous plugins to change processor plugins list (by Ben Briggs). + +## 4.1.14 +* Fix for plugins packs defined by `postcss.plugin`. + +## 4.1.13 +* Fix input inlined source maps with UTF-8 encoding. + +## 4.1.12 +* Update Promise polyfill. + +## 4.1.11 +* Fix error message on wrong plugin format. + +## 4.1.10 +* Fix Promise behavior on sync plugin errors. +* Automatically fill `plugin` field in `CssSyntaxError`. +* Fix warning message (by Ben Briggs). + +## 4.1.9 +* Speed up `node.clone()`. + +## 4.1.8 +* Accepts `Processor` instance in `postcss()` constructor too. + +## 4.1.7 +* Speed up `postcss.list` (by Bogdan Chadkin). + +## 4.1.6 +* Fix Promise behavior on parsing error. + +## 4.1.5 +* Parse at-words in declaration values. + +## 4.1.4 +* Fix Promise polyfill dependency (by Anton Yakushev and Matija Marohnić). + +## 4.1.3 +* Add Promise polyfill for node.js 0.10 and IE. + +## 4.1.2 +* List helpers can be accessed independently `var space = postcss.list.space`. + +## 4.1.1 +* Show deprecated message only once. + +## 4.1 “Marquis Andras” +* Asynchronous plugin support. +* Add warnings from plugins and `Result#messages`. +* Add `postcss.plugin()` to create plugins with a standard API. +* Insert nodes by CSS string. +* Show version warning message on error from an outdated plugin. +* Send `Result` instance to plugins as the second argument. +* Add `CssSyntaxError#plugin`. +* Add `CssSyntaxError#showSourceCode()`. +* Add `postcss.list` and `postcss.vendor` aliases. +* Add `Processor#version`. +* Parse wrong closing bracket. +* Parse `!important` statement with spaces and comments inside (by Ben Briggs). +* Throw an error on declaration without `prop` or `value` (by Philip Peterson). +* Fix source map mappings position. +* Add indexed source map support. +* Always set `error.generated`. +* Clean all source map annotation comments. + +## 4.0.6 +* Remove `babel` from released package dependencies (by Andres Suarez). + +## 4.0.5 +* Fix error message on double colon in declaration. + +## 4.0.4 +* Fix indent detection in some rare cases. + +## 4.0.3 +* Faster API with 6to5 Loose mode. +* Fix indexed source maps support. + +## 4.0.2 +* Do not copy IE hacks to code style. + +## 4.0.1 +* Add `source.input` to `Root` too. + +## 4.0 “Duke Flauros” +* Rename `Container#childs` to `nodes`. +* Rename `PostCSS#processors` to `plugins`. +* Add `Node#replaceValues()` method. +* Add `Node#moveTo()`, `moveBefore()` and `moveAfter()` methods. +* Add `Node#cloneBefore()` and `cloneAfter()` shortcuts. +* Add `Node#next()`, `prev()` and `root()` shortcuts. +* Add `Node#replaceWith()` method. +* Add `Node#error()` method. +* Add `Container#removeAll()` method. +* Add filter argument to `eachDecl()` and `eachAtRule()`. +* Add `Node#source.input` and move `source.file` or `source.id` to `input`. +* Change code indent, when node was moved. +* Better fix code style on `Rule`, `AtRule` and `Comment` nodes changes. +* Allow to create rules and at-rules by hash shortcut in append methods. +* Add class name to CSS syntax error output. + +## 3.0.7 +* Fix IE filter parsing with multiple commands. +* Safer way to consume PostCSS object as plugin (by Maxime Thirouin). + +## 3.0.6 +* Fix missing semicolon when comment comes after last declaration. +* Fix Safe Mode declaration parsing on unclosed blocks. + +## 3.0.5 +* Fix parser to support difficult cases with backslash escape and brackets. +* Add `CssSyntaxError#stack` (by Maxime Thirouin). + +## 3.0.4 +* Fix Safe Mode on unknown word before declaration. + +## 3.0.3 +* Increase tokenizer speed (by Roman Dvornov). + +## 3.0.2 +* Fix empty comment parsing. +* Fix `Root#normalize` in some inserts. + +## 3.0.1 +* Fix Rhino JS runtime support. +* Typo in deprecated warning (by Maxime Thirouin). + +## 3.0 “Marquis Andrealphus” +* New parser, which become the fastest ever CSS parser written in JavaScript. +* Parser can now parse declarations and rules in one parent (like in `@page`) + and nested declarations for plugins like `postcss-nested`. +* Child nodes array is now in `childs` property, instead of `decls` and `rules`. +* `map.inline` and `map.sourcesContent` options are now `true` by default. +* Fix iterators (`each`, `insertAfter`) on children array changes. +* Use previous source map to show origin source of CSS syntax error. +* Use 6to5 ES6 compiler, instead of ES6 Transpiler. +* Use code style for manually added rules from existing rules. +* Use `from` option from previous source map `file` field. +* Set `to` value to `from` if `to` option is missing. +* Use better node source name when missing `from` option. +* Show a syntax error when `;` is missed between declarations. +* Allow to pass `PostCSS` instance or list of plugins to `use()` method. +* Allow to pass `Result` instance to `process()` method. +* Trim Unicode BOM on source maps parsing. +* Parse at-rules without spaces like `@import"file"`. +* Better previous `sourceMappingURL` annotation comment cleaning. +* Do not remove previous `sourceMappingURL` comment on `map.annotation: false`. +* Parse nameless at-rules in Safe Mode. +* Fix source map generation for nodes without source. +* Fix next child `before` if `Root` first child got removed. + +## 2.2.6 +* Fix map generation for nodes without source (by Josiah Savary). + +## 2.2.5 +* Fix source map with BOM marker support (by Mohammad Younes). +* Fix source map paths (by Mohammad Younes). + +## 2.2.4 +* Fix `prepend()` on empty `Root`. + +## 2.2.3 +* Allow to use object shortcut in `use()` with functions like `autoprefixer`. + +## 2.2.2 +* Add shortcut to set processors in `use()` via object with `.postcss` property. + +## 2.2.1 +* Send `opts` from `Processor#process(css, opts)` to processors. + +## 2.2 “Marquis Cimeies” +* Use GNU style syntax error messages. +* Add `Node#replace` method. +* Add `CssSyntaxError#reason` property. + +## 2.1.2 +* Fix UTF-8 support in inline source map. +* Fix source map `sourcesContent` if there is no `from` and `to` options. + +## 2.1.1 +* Allow to miss `to` and `from` options for inline source maps. +* Add `Node#source.id` if file name is unknown. +* Better detect splitter between rules in CSS concatenation tools. +* Automatically clone node in insert methods. + +## 2.1 “King Amdusias” +* Change Traceur ES6 compiler to ES6 Transpiler. +* Show broken CSS line in syntax error. + +## 2.0 “King Belial” +* Project was rewritten from CoffeeScript to ES6. +* Add Safe Mode to works with live input or with hacks from legacy code. +* More safer parser to pass all hacks from Browserhacks.com. +* Use real properties instead of magic getter/setter for raw properties. + +## 1.0 “Marquis Decarabia” +* Save previous source map for each node to support CSS concatenation + with multiple previous maps. +* Add `map.sourcesContent` option to add origin content to `sourcesContent` + inside map. +* Allow to set different place of output map in annotation comment. +* Allow to use arrays and `Root` in `Container#append` and same methods. +* Add `Root#prevMap` with information about previous map. +* Allow to use latest PostCSS from GitHub by npm. +* `Result` now is lazy and it will generate output CSS only if you use `css` + or `map` property. +* Use separated `map.prev` option to set previous map. +* Rename `inlineMap` option to `map.inline`. +* Rename `mapAnnotation` option to `map.annotation`. +* `Result#map` now return `SourceMapGenerator` object, instead of string. +* Run previous map autodetect only if input CSS contains annotation comment. +* Add `map: 'inline'` shortcut for `map: { inline: true }` option. +* `Node#source.file` now will contains absolute path. +* Clean `Declaration#between` style on node clone. + +## 0.3.5 +* Allow to use `Root` or `Result` as first argument in `process()`. +* Save parsed AST to `Result#root`. + +## 0.3.4 +* Better space symbol detect to read UTF-8 BOM correctly. + +## 0.3.3 +* Remove source map hacks by using new Mozilla’s `source-map` (by Simon Lydell). + +## 0.3.2 +* Add URI encoding support for inline source maps. + +## 0.3.1 +* Fix relative paths from previous source map. +* Safer space split in `Rule#selectors` (by Simon Lydell). + +## 0.3 “Prince Seere” +* Add `Comment` node for comments between declarations or rules. +* Add source map annotation comment to output CSS. +* Allow to inline source map to annotation comment by data:uri. +* Fix source maps on Windows. +* Fix source maps for subdirectory (by Dmitry Nikitenko and Simon Lydell). +* Autodetect previous source map. +* Add `first` and `last` shortcuts to container nodes. +* Parse `!important` to separated property in `Declaration`. +* Allow to break iteration by returning `false`. +* Copy code style to new nodes. +* Add `eachInside` method to recursively iterate all nodes. +* Add `selectors` shortcut to get selectors array. +* Add `toResult` method to `Rule` to simplify work with several input files. +* Clean declaration’s `value`, rule’s `selector` and at-rule’s `params` + by storing spaces in `between` property. + +## 0.2 “Duke Dantalion” +* Add source map support. +* Add shortcuts to create nodes. +* Method `process()` now returns object with `css` and `map` keys. +* Origin CSS file option was renamed from `file` to `from`. +* Rename `Node#remove()` method to `removeSelf()` to fix name conflict. +* Node source was moved to `source` property with origin file + and node end position. +* You can set own CSS generate function. + +## 0.1 “Count Andromalius” +* Initial release. diff --git a/node_modules/autoprefixer/node_modules/postcss/LICENSE b/node_modules/autoprefixer/node_modules/postcss/LICENSE new file mode 100644 index 0000000..da057b4 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2013 Andrey Sitnik <[email protected]> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/autoprefixer/node_modules/postcss/README.md b/node_modules/autoprefixer/node_modules/postcss/README.md new file mode 100644 index 0000000..229ba37 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/README.md @@ -0,0 +1,459 @@ +# PostCSS [![Gitter][chat-img]][chat] + +<img align="right" width="95" height="95" + alt="Philosopher’s stone, logo of PostCSS" + src="http://postcss.github.io/postcss/logo.svg"> + +[chat-img]: https://img.shields.io/badge/Gitter-Join_the_PostCSS_chat-brightgreen.svg +[chat]: https://gitter.im/postcss/postcss + +PostCSS is a tool for transforming styles with JS plugins. +These plugins can lint your CSS, support variables and mixins, +transpile future CSS syntax, inline images, and more. + +PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba, +and JetBrains. The [Autoprefixer] PostCSS plugin is one of the most popular +CSS processors. + +PostCSS takes a CSS file and provides an API to analyze and modify its rules +(by transforming them into an [Abstract Syntax Tree]). +This API can then be used by [plugins] to do a lot of useful things, +e.g. to find errors automatically insert vendor prefixes. + +**Support / Discussion:** [Gitter](https://gitter.im/postcss/postcss)<br> +**Twitter account:** [@postcss](https://twitter.com/postcss)<br> +**VK.com page:** [postcss](https://vk.com/postcss)<br> +**中文翻译**: [`README-cn.md`](./README-cn.md) + +For PostCSS commercial support (consulting, improving the front-end culture +of your company, PostCSS plugins), contact [Evil Martians] +at <[email protected]>. + +[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree +[Evil Martians]: https://evilmartians.com/?utm_source=postcss +[Autoprefixer]: https://github.com/postcss/autoprefixer +[plugins]: https://github.com/postcss/postcss#plugins + +<a href="https://evilmartians.com/?utm_source=postcss"> + <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" + alt="Sponsored by Evil Martians" width="236" height="54"> +</a> + +## Plugins + +Currently, PostCSS has more than 200 plugins. You can find all of the plugins +in the [plugins list] or in the [searchable catalog]. Below is a list +of our favorite plugins — the best demonstrations of what can be built +on top of PostCSS. + +If you have any new ideas, [PostCSS plugin development] is really easy. + +[searchable catalog]: http://postcss.parts +[plugins list]: https://github.com/postcss/postcss/blob/master/docs/plugins.md + +### Solve Global CSS Problem + +* [`postcss-use`] allows you to explicitly set PostCSS plugins within CSS + and execute them only for the current file. +* [`postcss-modules`] and [`react-css-modules`] automatically isolate + selectors within components. +* [`postcss-autoreset`] is an alternative to using a global reset + that is better for isolatable components. +* [`postcss-initial`] adds `all: initial` support, which resets + all inherited styles. +* [`cq-prolyfill`] adds container query support, allowing styles that respond + to the width of the parent. + +### Use Future CSS, Today + +* [`autoprefixer`] adds vendor prefixes, using data from Can I Use. +* [`postcss-preset-env`] allows you to use future CSS features today. + +### Better CSS Readability + +* [`precss`] contains plugins for Sass-like features, like variables, nesting, + and mixins. +* [`postcss-sorting`] sorts the content of rules and at-rules. +* [`postcss-utilities`] includes the most commonly used shortcuts and helpers. +* [`short`] adds and extends numerous shorthand properties. + +### Images and Fonts + +* [`postcss-assets`] inserts image dimensions and inlines files. +* [`postcss-sprites`] generates image sprites. +* [`font-magician`] generates all the `@font-face` rules needed in CSS. +* [`postcss-inline-svg`] allows you to inline SVG and customize its styles. +* [`postcss-write-svg`] allows you to write simple SVG directly in your CSS. + +### Linters + +* [`stylelint`] is a modular stylesheet linter. +* [`stylefmt`] is a tool that automatically formats CSS + according `stylelint` rules. +* [`doiuse`] lints CSS for browser support, using data from Can I Use. +* [`colorguard`] helps you maintain a consistent color palette. + +### Other + +* [`postcss-rtl`] combines both-directional (left-to-right and right-to-left) styles in one CSS file. +* [`cssnano`] is a modular CSS minifier. +* [`lost`] is a feature-rich `calc()` grid system. +* [`rtlcss`] mirrors styles for right-to-left locales. + +[PostCSS plugin development]: https://github.com/postcss/postcss/blob/master/docs/writing-a-plugin.md +[`postcss-inline-svg`]: https://github.com/TrySound/postcss-inline-svg +[`postcss-preset-env`]: https://github.com/jonathantneal/postcss-preset-env +[`react-css-modules`]: https://github.com/gajus/react-css-modules +[`postcss-autoreset`]: https://github.com/maximkoretskiy/postcss-autoreset +[`postcss-write-svg`]: https://github.com/jonathantneal/postcss-write-svg +[`postcss-utilities`]: https://github.com/ismamz/postcss-utilities +[`postcss-initial`]: https://github.com/maximkoretskiy/postcss-initial +[`postcss-sprites`]: https://github.com/2createStudio/postcss-sprites +[`postcss-modules`]: https://github.com/outpunk/postcss-modules +[`postcss-sorting`]: https://github.com/hudochenkov/postcss-sorting +[`postcss-assets`]: https://github.com/assetsjs/postcss-assets +[`font-magician`]: https://github.com/jonathantneal/postcss-font-magician +[`autoprefixer`]: https://github.com/postcss/autoprefixer +[`cq-prolyfill`]: https://github.com/ausi/cq-prolyfill +[`postcss-rtl`]: https://github.com/vkalinichev/postcss-rtl +[`postcss-use`]: https://github.com/postcss/postcss-use +[`css-modules`]: https://github.com/css-modules/css-modules +[`colorguard`]: https://github.com/SlexAxton/css-colorguard +[`stylelint`]: https://github.com/stylelint/stylelint +[`stylefmt`]: https://github.com/morishitter/stylefmt +[`cssnano`]: http://cssnano.co +[`precss`]: https://github.com/jonathantneal/precss +[`doiuse`]: https://github.com/anandthakker/doiuse +[`rtlcss`]: https://github.com/MohammadYounes/rtlcss +[`short`]: https://github.com/jonathantneal/postcss-short +[`lost`]: https://github.com/peterramsing/lost + +## Syntaxes + +PostCSS can transform styles in any syntax, not just CSS. +If there is not yet support for your favorite syntax, +you can write a parser and/or stringifier to extend PostCSS. + +* [`sugarss`] is a indent-based syntax like Sass or Stylus. +* [`postcss-syntax`] switch syntax automatically by file extensions. +* [`postcss-html`] parsing styles in `<style>` tags of HTML-like files. +* [`postcss-markdown`] parsing styles in code blocks of Markdown files. +* [`postcss-jsx`] parsing CSS in template / object literals of source files. +* [`postcss-styled`] parsing CSS in template literals of source files. +* [`postcss-scss`] allows you to work with SCSS + *(but does not compile SCSS to CSS)*. +* [`postcss-sass`] allows you to work with Sass + *(but does not compile Sass to CSS)*. +* [`postcss-less`] allows you to work with Less + *(but does not compile LESS to CSS)*. +* [`postcss-less-engine`] allows you to work with Less + *(and DOES compile LESS to CSS using true Less.js evaluation)*. +* [`postcss-js`] allows you to write styles in JS or transform + React Inline Styles, Radium or JSS. +* [`postcss-safe-parser`] finds and fixes CSS syntax errors. +* [`midas`] converts a CSS string to highlighted HTML. + +[`postcss-less-engine`]: https://github.com/Crunch/postcss-less +[`postcss-safe-parser`]: https://github.com/postcss/postcss-safe-parser +[`postcss-syntax`]: https://github.com/gucong3000/postcss-syntax +[`postcss-html`]: https://github.com/gucong3000/postcss-html +[`postcss-markdown`]: https://github.com/gucong3000/postcss-markdown +[`postcss-jsx`]: https://github.com/gucong3000/postcss-jsx +[`postcss-styled`]: https://github.com/gucong3000/postcss-styled +[`postcss-scss`]: https://github.com/postcss/postcss-scss +[`postcss-sass`]: https://github.com/AleshaOleg/postcss-sass +[`postcss-less`]: https://github.com/webschik/postcss-less +[`postcss-js`]: https://github.com/postcss/postcss-js +[`sugarss`]: https://github.com/postcss/sugarss +[`midas`]: https://github.com/ben-eb/midas + +## Articles + +* [Some things you may think about PostCSS… and you might be wrong](http://julian.io/some-things-you-may-think-about-postcss-and-you-might-be-wrong) +* [What PostCSS Really Is; What It Really Does](http://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss) +* [PostCSS Guides](http://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889) + +More articles and videos you can find on [awesome-postcss](https://github.com/jjaderg/awesome-postcss) list. + +## Books + +* [Mastering PostCSS for Web Design](https://www.packtpub.com/web-development/mastering-postcss-web-design) by Alex Libby, Packt. (June 2016) + +## Usage + +You can start using PostCSS in just two steps: + +1. Find and add PostCSS extensions for your build tool. +2. [Select plugins] and add them to your PostCSS process. + +[Select plugins]: http://postcss.parts + +### CSS-in-JS + +The best way to use PostCSS with CSS-in-JS is [`astroturf`]. +Add its loader to your `webpack.config.js`: + +```js +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + use: ['style-loader', 'postcss-loader'], + }, + { + test: /\.jsx?$/, + use: ['babel-loader', 'astroturf/loader'], + } + ] + } +} +``` + +Then create `postcss.config.js`: + +```js +module.exports = { + plugins: [ + require('autoprefixer'), + require('postcss-nested') + ] +} +``` + +[`astroturf`]: https://github.com/4Catalyzer/astroturf + +### Parcel + +[Parcel] has built-in PostCSS support. It already uses Autoprefixer +and cssnano. If you want to change plugins, create `postcss.config.js` +in project’s root: + +```js +module.exports = { + plugins: [ + require('autoprefixer'), + require('postcss-nested') + ] +} +``` + +Parcel will even automatically install these plugins for you. + +> Please, be aware of [the several issues in Version 1](https://github.com/parcel-bundler/parcel/labels/CSS%20Preprocessing). Notice, [Version 2](https://github.com/parcel-bundler/parcel/projects/5) may resolve the issues via [issue #2157](https://github.com/parcel-bundler/parcel/issues/2157). + +[Parcel]: https://parceljs.org + +### Webpack + +Use [`postcss-loader`] in `webpack.config.js`: + +```js +module.exports = { + module: { + rules: [ + { + test: /\.css$/, + exclude: /node_modules/, + use: [ + { + loader: 'style-loader', + }, + { + loader: 'css-loader', + options: { + importLoaders: 1, + } + }, + { + loader: 'postcss-loader' + } + ] + } + ] + } +} +``` + +Then create `postcss.config.js`: + +```js +module.exports = { + plugins: [ + require('precss'), + require('autoprefixer') + ] +} +``` + +[`postcss-loader`]: https://github.com/postcss/postcss-loader + +### Gulp + +Use [`gulp-postcss`] and [`gulp-sourcemaps`]. + +```js +gulp.task('css', () => { + const postcss = require('gulp-postcss') + const sourcemaps = require('gulp-sourcemaps') + + return gulp.src('src/**/*.css') + .pipe( sourcemaps.init() ) + .pipe( postcss([ require('precss'), require('autoprefixer') ]) ) + .pipe( sourcemaps.write('.') ) + .pipe( gulp.dest('build/') ) +}) +``` + +[`gulp-sourcemaps`]: https://github.com/floridoo/gulp-sourcemaps +[`gulp-postcss`]: https://github.com/postcss/gulp-postcss + +### npm run / CLI + +To use PostCSS from your command-line interface or with npm scripts +there is [`postcss-cli`]. + +```sh +postcss --use autoprefixer -c options.json -o main.css css/*.css +``` + +[`postcss-cli`]: https://github.com/postcss/postcss-cli + +### Browser + +If you want to compile CSS string in browser (for instance, in live edit +tools like CodePen), just use [Browserify] or [webpack]. They will pack +PostCSS and plugins files into a single file. + +To apply PostCSS plugins to React Inline Styles, JSS, Radium +and other [CSS-in-JS], you can use [`postcss-js`] and transforms style objects. + +```js +var postcss = require('postcss-js') +var prefixer = postcss.sync([ require('autoprefixer') ]) + +prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-ms-flexbox', 'flex'] } +``` + +[`postcss-js`]: https://github.com/postcss/postcss-js +[Browserify]: http://browserify.org/ +[CSS-in-JS]: https://github.com/MicheleBertoli/css-in-js +[webpack]: https://webpack.github.io/ + +### Runners + +* **Grunt**: [`grunt-postcss`](https://github.com/nDmitry/grunt-postcss) +* **HTML**: [`posthtml-postcss`](https://github.com/posthtml/posthtml-postcss) +* **Stylus**: [`poststylus`](https://github.com/seaneking/poststylus) +* **Rollup**: [`rollup-plugin-postcss`](https://github.com/egoist/rollup-plugin-postcss) +* **Brunch**: [`postcss-brunch`](https://github.com/brunch/postcss-brunch) +* **Broccoli**: [`broccoli-postcss`](https://github.com/jeffjewiss/broccoli-postcss) +* **Meteor**: [`postcss`](https://atmospherejs.com/juliancwirko/postcss) +* **ENB**: [`enb-postcss`](https://github.com/awinogradov/enb-postcss) +* **Taskr**: [`taskr-postcss`](https://github.com/lukeed/taskr/tree/master/packages/postcss) +* **Start**: [`start-postcss`](https://github.com/start-runner/postcss) +* **Connect/Express**: [`postcss-middleware`](https://github.com/jedmao/postcss-middleware) + +### JS API + +For other environments, you can use the JS API: + +```js +const autoprefixer = require('autoprefixer') +const postcss = require('postcss') +const precss = require('precss') +const fs = require('fs') + +fs.readFile('src/app.css', (err, css) => { + postcss([precss, autoprefixer]) + .process(css, { from: 'src/app.css', to: 'dest/app.css' }) + .then(result => { + fs.writeFile('dest/app.css', result.css, () => true) + if ( result.map ) { + fs.writeFile('dest/app.css.map', result.map, () => true) + } + }) +}) +``` + +Read the [PostCSS API documentation] for more details about the JS API. + +All PostCSS runners should pass [PostCSS Runner Guidelines]. + +[PostCSS Runner Guidelines]: https://github.com/postcss/postcss/blob/master/docs/guidelines/runner.md +[PostCSS API documentation]: http://api.postcss.org/postcss.html + +### Options + +Most PostCSS runners accept two parameters: + +* An array of plugins. +* An object of options. + +Common options: + +* `syntax`: an object providing a syntax parser and a stringifier. +* `parser`: a special syntax parser (for example, [SCSS]). +* `stringifier`: a special syntax output generator (for example, [Midas]). +* `map`: [source map options]. +* `from`: the input file name (most runners set it automatically). +* `to`: the output file name (most runners set it automatically). + +[source map options]: https://github.com/postcss/postcss/blob/master/docs/source-maps.md +[Midas]: https://github.com/ben-eb/midas +[SCSS]: https://github.com/postcss/postcss-scss + +### Treat Warnings as Errors + +In some situations it might be helpful to fail the build on any warning +from PostCSS or one of its plugins. This guarantees that no warnings +go unnoticed, and helps to avoid bugs. While there is no option to enable +treating warnings as errors, it can easily be done +by adding `postcss-fail-on-warn` plugin in the end of PostCSS plugins: + +```js +module.exports = { + plugins: [ + require('autoprefixer'), + require('postcss-fail-on-warn') + ] +} +``` + + +## Editors & IDE Integration + +### Atom + +* [`language-postcss`] adds PostCSS and [SugarSS] highlight. +* [`source-preview-postcss`] previews your output CSS in a separate, live pane. + +[SugarSS]: https://github.com/postcss/sugarss + +### Sublime Text + +* [`Syntax-highlighting-for-PostCSS`] adds PostCSS highlight. + +[`Syntax-highlighting-for-PostCSS`]: https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS +[`source-preview-postcss`]: https://atom.io/packages/source-preview-postcss +[`language-postcss`]: https://atom.io/packages/language-postcss + +### Vim + +* [`postcss.vim`] adds PostCSS highlight. + +[`postcss.vim`]: https://github.com/stephenway/postcss.vim + +### WebStorm + +WebStorm 2016.3 [has] built-in PostCSS support. + +[has]: https://blog.jetbrains.com/webstorm/2016/08/webstorm-2016-3-early-access-preview/ + + +## Security Contact + +To report a security vulnerability, please use the [Tidelift security contact]. +Tidelift will coordinate the fix and disclosure. + +[Tidelift security contact]: https://tidelift.com/security diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/api/assets/scripts.min.js b/node_modules/autoprefixer/node_modules/postcss/docs/api/assets/scripts.min.js new file mode 100644 index 0000000..d22a9d5 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/api/assets/scripts.min.js @@ -0,0 +1,8 @@ +parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"SyYu":[function(require,module,exports) { +var define; +var A;!function(e,t){"use strict";"function"==typeof A&&A.amd?A([],t):"object"==typeof module&&module.exports?module.exports=t():(e.AnchorJS=t(),e.anchors=new e.AnchorJS)}(this,function(){"use strict";return function(A){function e(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function t(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],e(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var i,n,o,s,a,r,c,h,l,u,d,p,w=[];if(e(this.options),"touch"===(d=this.options.visible)&&(d=this.isTouchDevice()?"always":"hover"),A||(A="h2, h3, h4, h5, h6"),0===(i=t(A)).length)return this;for(function(){if(null===document.head.querySelector("style.anchorjs")){var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"], style'))?document.head.appendChild(e):document.head.insertBefore(e,A),e.sheet.insertRule(" .anchorjs-link { opacity: 0; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }",e.sheet.cssRules.length),e.sheet.insertRule(" *:hover > .anchorjs-link, .anchorjs-link:focus { opacity: 1; }",e.sheet.cssRules.length),e.sheet.insertRule(" [data-anchorjs-icon]::after { content: attr(data-anchorjs-icon); }",e.sheet.cssRules.length),e.sheet.insertRule(' @font-face { font-family: "anchorjs-icons"; src: url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype"); }',e.sheet.cssRules.length)}}(),n=document.querySelectorAll("[id]"),o=[].map.call(n,function(A){return A.id}),a=0;a<i.length;a++)if(this.hasAnchorJSLink(i[a]))w.push(a);else{if(i[a].hasAttribute("id"))s=i[a].getAttribute("id");else if(i[a].hasAttribute("data-anchor-id"))s=i[a].getAttribute("data-anchor-id");else{l=h=this.urlify(i[a].textContent),c=0;do{void 0!==r&&(l=h+"-"+c),r=o.indexOf(l),c+=1}while(-1!==r);r=void 0,o.push(l),i[a].setAttribute("id",l),s=l}s.replace(/-/g," "),(u=document.createElement("a")).className="anchorjs-link "+this.options.class,u.setAttribute("aria-label",this.options.ariaLabel),u.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(u.title=this.options.titleText),p=document.querySelector("base")?window.location.pathname+window.location.search:"",p=this.options.base||p,u.href=p+"#"+s,"always"===d&&(u.style.opacity="1"),""===this.options.icon&&(u.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(u.style.lineHeight="inherit")),"left"===this.options.placement?(u.style.position="absolute",u.style.marginLeft="-1em",u.style.paddingRight="0.5em",i[a].insertBefore(u,i[a].firstChild)):(u.style.paddingLeft="0.375em",i[a].appendChild(u))}for(a=0;a<w.length;a++)i.splice(w[a]-a,1);return this.elements=this.elements.concat(i),this},this.remove=function(A){for(var e,i,n=t(A),o=0;o<n.length;o++)(i=n[o].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(n[o]))&&this.elements.splice(e,1),n[o].removeChild(i));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||e(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&(" "+A.firstChild.className+" ").indexOf(" anchorjs-link ")>-1,t=A.lastChild&&(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ")>-1;return e||t||!1}}}); +},{}],"S+Fx":[function(require,module,exports) { +var e=require("anchor-js"),t=new e;t.options.placement="left",t.add("h3");var n=document.getElementById("toc").getElementsByTagName("a");document.getElementById("filter-input").addEventListener("keyup",function(e){var t,s,i;if(13===e.keyCode)for(t=0;t<n.length;t++)if(!(s=n[t]).classList.contains("display-none"))return location.replace(s.firstChild.href),e.preventDefault();var a=function(){return!0},o=this.value.toLowerCase();for(o.match(/^\s*$/)||(a=function(e){var t=e.firstChild.innerHTML||e.textContent;return t&&-1!==t.toLowerCase().indexOf(o)}),t=0;t<n.length;t++)s=n[t],i=Array.from(s.getElementsByTagName("a")),a(s)||i.some(a)?s.classList.remove("display-none"):s.classList.add("display-none")});for(var s=document.getElementsByClassName("toggle-sibling"),i=0;i<s.length;i++)s[i].addEventListener("click",a);function a(){var e=this.nextElementSibling,t=this.getElementsByClassName("icon")[0],n="display-none";e.classList.contains(n)?(e.classList.remove(n),t.innerHTML="▾"):(e.classList.add(n),t.innerHTML="▸")}function o(e){if(e){var t=document.getElementById(e);t&&0===t.offsetHeight&&t.parentNode.parentNode.classList.contains("display-none")&&t.parentNode.parentNode.classList.remove("display-none")}}function r(e){if(e&&!history.state){var t=document.getElementById(e);t&&t.scrollIntoView()}}function l(){o(location.hash.substring(1)),r(location.hash.substring(1))}window.addEventListener("hashchange",l),l();for(var d=document.getElementsByClassName("pre-open"),c=0;c<d.length;c++)d[c].addEventListener("mousedown",u,!1);function u(){o(this.hash.substring(1))}function m(){history.replaceState({},document.title)}function f(e){e&&history.replaceState(e.state,document.title)}window.addEventListener("load",function(){setTimeout(function(){f(),m()},1)}),window.addEventListener("popstate",f); +},{"anchor-js":"SyYu"}],"249i":[function(require,module,exports) { +require("./site"); +},{"./site":"S+Fx"}]},{},["249i"], null)
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/api/assets/styles.min.css b/node_modules/autoprefixer/node_modules/postcss/docs/api/assets/styles.min.css new file mode 100644 index 0000000..9258853 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/api/assets/styles.min.css @@ -0,0 +1 @@ +body,button{margin:0}button,input,select,textarea{font-family:inherit;font-size:100%}img{max-width:100%}svg{max-height:100%}fieldset,input,select,textarea{font-size:1rem;margin-top:0;margin-bottom:.5rem}input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{box-sizing:border-box;height:2.25rem;padding:.5rem;vertical-align:middle;-webkit-appearance:none}select{box-sizing:border-box;line-height:1.75;padding:.5rem}select:not([multiple]){height:2.25rem;vertical-align:middle}textarea{box-sizing:border-box;line-height:1.75;padding:.5rem}.fieldset-reset{padding:0;margin-left:0;margin-right:0;border:0}.fieldset-reset legend{padding:0}.button,button{font-size:inherit;font-weight:700;text-decoration:none;cursor:pointer;display:inline-block;box-sizing:border-box;line-height:1.125rem;padding:.4rem .6rem;margin:0;height:auto;border:1px solid transparent;vertical-align:middle;-webkit-appearance:none}::-moz-focus-inner{border:0;padding:0}.button:hover{text-decoration:none}table{border-collapse:separate;border-spacing:0;max-width:100%;width:100%}th{text-align:left;font-weight:700}td,th{padding:.25rem 1rem;line-height:inherit}th{vertical-align:bottom}td{vertical-align:top}body{line-height:1.5;font-size:100%}body,h1,h2,h3,h4,h5,h6{font-family:Helvetica Neue,Helvetica,sans-serif}h1,h2,h3,h4,h5,h6{font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}dl,ol,p,ul{font-size:1rem;margin-top:0;margin-bottom:1rem}ol,ul{padding-left:2rem}code,pre,samp{font-family:Consolas,Source Code Pro,monospace;font-size:inherit}pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll;padding:1rem;background-color:rgba(0,0,0,.03125)}blockquote,hr{margin-top:2rem;margin-bottom:2rem}blockquote{margin-left:0;padding-left:1rem;padding-right:1rem}blockquote,blockquote p{font-size:1.25rem;font-style:italic}.h1,h1{font-size:2rem}.h2,h2{font-size:1.5rem}.h3,h3{font-size:1.25rem}.h4,h4{font-size:1rem}.h5,h5{font-size:.875rem}.h6,h6{font-size:.75rem}.list-reset{list-style:none;padding-left:0}.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-auto{overflow:auto}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.left{float:left}.right{float:right}.fit{max-width:100%}.half-width{width:50%}.full-width{width:100%}.bold{font-weight:700}.regular{font-weight:400}.italic{font-style:italic}.caps{text-transform:uppercase;letter-spacing:.2em}.left-align{text-align:left}.center{text-align:center}.right-align{text-align:right}.justify{text-align:justify}.nowrap{white-space:nowrap}.m0{margin:0}.mt0{margin-top:0}.mr0{margin-right:0}.mb0{margin-bottom:0}.ml0{margin-left:0}.m1{margin:.5rem}.mt1{margin-top:.5rem}.mr1{margin-right:.5rem}.mb1{margin-bottom:.5rem}.ml1{margin-left:.5rem}.m2{margin:1rem}.mt2{margin-top:1rem}.mr2{margin-right:1rem}.mb2{margin-bottom:1rem}.ml2{margin-left:1rem}.m3{margin:2rem}.mt3{margin-top:2rem}.mr3{margin-right:2rem}.mb3{margin-bottom:2rem}.ml3{margin-left:2rem}.m4{margin:4rem}.mt4{margin-top:4rem}.mr4{margin-right:4rem}.mb4{margin-bottom:4rem}.ml4{margin-left:4rem}.mxn1{margin-left:-.5rem;margin-right:-.5rem}.mxn2{margin-left:-1rem;margin-right:-1rem}.mxn3{margin-left:-2rem;margin-right:-2rem}.mxn4{margin-left:-4rem;margin-right:-4rem}.mx-auto{margin-left:auto;margin-right:auto}.p1{padding:.5rem}.py1{padding-top:.5rem;padding-bottom:.5rem}.px1{padding-left:.5rem;padding-right:.5rem}.p2{padding:1rem}.py2{padding-top:1rem;padding-bottom:1rem}.px2{padding-left:1rem;padding-right:1rem}.p3{padding:2rem}.py3{padding-top:2rem;padding-bottom:2rem}.px3{padding-left:2rem;padding-right:2rem}.p4{padding:4rem}.py4{padding-top:4rem;padding-bottom:4rem}.px4{padding-left:4rem;padding-right:4rem}.lg-show,.md-show,.sm-show{display:none!important}@media (min-width:40em){.sm-show{display:block!important}}@media (min-width:52em){.md-show{display:block!important}}@media (min-width:64em){.lg-show{display:block!important}}@media (min-width:40em){.sm-hide{display:none!important}}@media (min-width:52em){.md-hide{display:none!important}}@media (min-width:64em){.lg-hide{display:none!important}}.display-none{display:none!important}.hide{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.z1{z-index:1}.z2{z-index:2}.z3{z-index:3}.z4{z-index:4}.absolute-center{top:0;right:0;bottom:0;left:0;margin:auto;display:table}.button-small{padding:.25rem .5rem}.button-big{padding:1rem 1.25rem}.button-narrow{padding-left:.5rem;padding-right:.5rem}.container{max-width:64em;margin-left:auto;margin-right:auto}.col{float:left}.col,.col-right{box-sizing:border-box}.col-right{float:right}.col-1{width:8.33333%}.col-2{width:16.66667%}.col-3{width:25%}.col-4{width:33.33333%}.col-5{width:41.66667%}.col-6{width:50%}.col-7{width:58.33333%}.col-8{width:66.66667%}.col-9{width:75%}.col-10{width:83.33333%}.col-11{width:91.66667%}.col-12{width:100%}@media (min-width:40em){.sm-col{float:left;box-sizing:border-box}.sm-col-right{float:right;box-sizing:border-box}.sm-col-1{width:8.33333%}.sm-col-2{width:16.66667%}.sm-col-3{width:25%}.sm-col-4{width:33.33333%}.sm-col-5{width:41.66667%}.sm-col-6{width:50%}.sm-col-7{width:58.33333%}.sm-col-8{width:66.66667%}.sm-col-9{width:75%}.sm-col-10{width:83.33333%}.sm-col-11{width:91.66667%}.sm-col-12{width:100%}}@media (min-width:52em){.md-col{float:left;box-sizing:border-box}.md-col-right{float:right;box-sizing:border-box}.md-col-1{width:8.33333%}.md-col-2{width:16.66667%}.md-col-3{width:25%}.md-col-4{width:33.33333%}.md-col-5{width:41.66667%}.md-col-6{width:50%}.md-col-7{width:58.33333%}.md-col-8{width:66.66667%}.md-col-9{width:75%}.md-col-10{width:83.33333%}.md-col-11{width:91.66667%}.md-col-12{width:100%}}@media (min-width:64em){.lg-col{float:left;box-sizing:border-box}.lg-col-right{float:right;box-sizing:border-box}.lg-col-1{width:8.33333%}.lg-col-2{width:16.66667%}.lg-col-3{width:25%}.lg-col-4{width:33.33333%}.lg-col-5{width:41.66667%}.lg-col-6{width:50%}.lg-col-7{width:58.33333%}.lg-col-8{width:66.66667%}.lg-col-9{width:75%}.lg-col-10{width:83.33333%}.lg-col-11{width:91.66667%}.lg-col-12{width:100%}}.flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flex-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.flex-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.flex-baseline{-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline}.flex-stretch{-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;align-items:stretch}.flex-start{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flex-end{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}.flex-first{-webkit-box-ordinal-group:0;-webkit-order:-1;-ms-flex-order:-1;order:-1}.flex-last{-webkit-box-ordinal-group:1025;-webkit-order:1024;-ms-flex-order:1024;order:1024}.flex-auto{-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto}.flex-grow{-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto}.flex-none{-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}.flex>div{box-sizing:border-box}@media (min-width:40em){.sm-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.sm-flex>div{box-sizing:border-box}}@media (min-width:52em){.md-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.md-flex>div{box-sizing:border-box}}@media (min-width:64em){.lg-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.lg-flex>div{box-sizing:border-box}}body{color:#222;background-color:#fff}a{color:#0074d9;text-decoration:none}a:hover{text-decoration:underline}hr{border:0;border-bottom:1px solid rgba(0,0,0,.125)}.button{color:#fff;background-color:#0074d9;border-radius:3px}.button:hover{box-shadow:inset 0 0 0 20rem rgba(0,0,0,.0625)}.button:focus{outline:none;border-color:rgba(0,0,0,.125);box-shadow:0 0 2px 1px rgba(0,0,0,.25)}.button.is-active,.button:active{box-shadow:inset 0 0 0 20rem rgba(0,0,0,.125),inset 0 3px 4px 0 rgba(0,0,0,.25),0 0 1px rgba(0,0,0,.125)}.button.is-disabled,.button:disabled{opacity:.5}.field-light{background-color:#fff;-webkit-transition:box-shadow .2s ease;transition:box-shadow .2s ease;border:1px solid rgba(0,0,0,.125);border-radius:3px}.field-light:focus{outline:none;border-color:#0074d9;box-shadow:0 0 2px rgba(0,116,217,.5)}.field-light:disabled{color:#aaa}.field-light:disabled,.field-light:read-only:not(select){background-color:rgba(0,0,0,.125)}.field-light:invalid{border-color:#ff4136}.field-light.is-success{border-color:#2ecc40}.field-light.is-warning{border-color:#ffdc00}.field-light.is-error{border-color:#ff4136}.checkbox-light,.radio-light{-webkit-transition:box-shadow .2s ease;transition:box-shadow .2s ease}.radio-light{border-radius:50%}.checkbox-light:focus,.radio-light:focus{outline:none;box-shadow:0 0 2px rgba(0,116,217,.5)}.field-dark{color:#fff;background-color:rgba(0,0,0,.25);border:1px solid rgba(0,0,0,.0625);border-radius:3px}.field-dark::-webkit-input-placeholder{color:hsla(0,0%,100%,.75)}.field-dark::-moz-placeholder{color:hsla(0,0%,100%,.75)}.field-dark:-ms-input-placeholder{color:hsla(0,0%,100%,.75)}.field-dark::placeholder{color:hsla(0,0%,100%,.75)}.field-dark:focus{outline:0;border:1px solid hsla(0,0%,100%,.5)}.field-dark:read-only:not(select){background-color:hsla(0,0%,100%,.25)}.field-dark:invalid{border-color:#ff4136}.field-dark.is-success{border-color:#2ecc40}.field-dark.is-warning{border-color:#ffdc00}.field-dark.is-error{border-color:#ff4136}input[type=range]{vertical-align:middle;background-color:transparent}.range-light{color:inherit;-webkit-appearance:none;padding-top:.5rem;padding-bottom:.5rem}.range-light::-webkit-slider-thumb{-webkit-appearance:none;position:relative;width:.5rem;height:1.25rem;border-radius:3px;background-color:currentcolor;cursor:pointer;margin-top:-.5rem}.range-light::-webkit-slider-thumb:before{content:"";display:block;position:absolute;top:-.5rem;left:-.875rem;width:2.25rem;height:2.25rem;opacity:0}.range-light::-moz-range-thumb{width:.5rem;height:1.25rem;border-radius:3px;border-color:transparent;border-width:0;background-color:currentcolor;cursor:pointer}.range-light::-webkit-slider-runnable-track{height:.25rem;cursor:pointer;border-radius:3px;background-color:rgba(0,0,0,.25)}.range-light::-moz-range-track{height:.25rem;cursor:pointer;border-radius:3px;background-color:rgba(0,0,0,.25)}.range-light:focus{outline:none}.range-light:focus::-webkit-slider-thumb{outline:none;border:0;box-shadow:0 0 1px 2px currentcolor}.range-light:focus::-moz-range-thumb{outline:none;border:0;box-shadow:0 0 1px 2px currentcolor}.progress{display:block;width:100%;height:.5625rem;margin:.5rem 0;background-color:rgba(0,0,0,.125);border:0;border-radius:10000px;overflow:hidden;-webkit-appearance:none;cursor:pointer}.progress::-webkit-progress-bar{-webkit-appearance:none;background-color:rgba(0,0,0,.125)}.progress::-webkit-progress-value{-webkit-appearance:none;background-color:currentColor}.progress::-moz-progress-bar{background-color:currentColor}.table-light td,.table-light th{border-bottom:1px solid rgba(0,0,0,.125)}.table-light tr:last-child td{border-bottom:0}.button-outline{position:relative;z-index:2;color:inherit;background-color:transparent;border-radius:3px;border:1px solid;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-transition-property:box-shadow,background-color;transition-property:box-shadow,background-color}.button-outline:before{content:"";width:100%;height:100%;display:block;position:absolute;z-index:-1;top:-1px;left:-1px;border:1px solid transparent;background-color:currentcolor;border-radius:3px;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-transition-property:opacity;transition-property:opacity;opacity:0}.button-outline:hover{box-shadow:none}.button-outline:hover:before{opacity:.125}.button-outline:focus{outline:none;border:1px solid;box-shadow:0 0 3px 1px}.button-outline.is-active,.button-outline:active{box-shadow:inset 0 1px 5px 0,0 0 1px}.button-outline.is-disabled,.button-outline:disabled{opacity:.5}.button-transparent{position:relative;z-index:2;color:inherit;background-color:transparent;border-radius:0;border:1px solid transparent}.button-transparent:before{content:"";width:100%;height:100%;display:block;position:absolute;z-index:-1;top:-1px;left:-1px;border:1px solid transparent;background-color:currentcolor;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;-webkit-transition-property:opacity;transition-property:opacity;opacity:0}.button-transparent:hover{box-shadow:none}.button-transparent:hover:before{opacity:.0625;opacity:.09375}.button-transparent:focus{outline:none;border-color:transparent;box-shadow:0 0 3px}.button-transparent.is-active:before,.button-transparent:active:before{opacity:.0625}.button-transparent.is-disabled,.button-transparent:disabled{opacity:.5}.bg-cover{background-size:cover}.bg-contain{background-size:contain}.bg-center{background-position:50%}.bg-top{background-position:top}.bg-right{background-position:100%}.bg-bottom{background-position:bottom}.bg-left{background-position:0}.border{border:1px solid rgba(0,0,0,.125)}.border-top{border-top:1px solid rgba(0,0,0,.125)}.border-right{border-right:1px solid rgba(0,0,0,.125)}.border-bottom{border-bottom:1px solid rgba(0,0,0,.125)}.border-left{border-left:1px solid rgba(0,0,0,.125)}.rounded{border-radius:3px}.circle{border-radius:50%}.rounded-top{border-radius:3px 3px 0 0}.rounded-right{border-radius:0 3px 3px 0}.rounded-bottom{border-radius:0 0 3px 3px}.rounded-left{border-radius:3px 0 0 3px}.not-rounded{border-radius:0}.black,.dark-gray{color:#222}.gray,.mid-gray{color:#aaa}.light-gray,.silver{color:#ddd}.white{color:#fff}.aqua{color:#7fdbff}.blue{color:#0074d9}.navy{color:#001f3f}.teal{color:#39cccc}.green{color:#2ecc40}.olive{color:#3d9970}.lime{color:#01ff70}.yellow{color:#ffdc00}.orange{color:#ff851b}.red{color:#ff4136}.fuchsia{color:#f012be}.purple{color:#b10dc9}.maroon{color:#85144b}.bg-black,.bg-dark-gray{background-color:#222}.bg-gray,.bg-mid-gray{background-color:#aaa}.bg-light-gray,.bg-silver{background-color:#ddd}.bg-white{background-color:#fff}.bg-aqua{background-color:#7fdbff}.bg-blue{background-color:#0074d9}.bg-navy{background-color:#001f3f}.bg-teal{background-color:#39cccc}.bg-green{background-color:#2ecc40}.bg-olive{background-color:#3d9970}.bg-lime{background-color:#01ff70}.bg-yellow{background-color:#ffdc00}.bg-orange{background-color:#ff851b}.bg-red{background-color:#ff4136}.bg-fuchsia{background-color:#f012be}.bg-purple{background-color:#b10dc9}.bg-maroon{background-color:#85144b}.bg-darken-0{background-color:rgba(0,0,0,.03125)}.bg-darken-1{background-color:rgba(0,0,0,.0625)}.bg-darken-2{background-color:rgba(0,0,0,.125)}.bg-darken-3{background-color:rgba(0,0,0,.25)}.bg-darken-4{background-color:rgba(0,0,0,.5)}.border-aqua{border-color:#7fdbff}.border-blue{border-color:#0074d9}.border-navy{border-color:#001f3f}.border-teal{border-color:#39cccc}.border-green{border-color:#2ecc40}.border-olive{border-color:#3d9970}.border-lime{border-color:#01ff70}.border-yellow{border-color:#ffdc00}.border-orange{border-color:#ff851b}.border-red{border-color:#ff4136}.border-fuchsia{border-color:#f012be}.border-purple{border-color:#b10dc9}.border-maroon{border-color:#85144b}.border-black{border-color:#222}.border-gray{border-color:#aaa}.border-silver{border-color:#ddd}.border-white{border-color:#fff}.border-darken-1{border-color:rgba(0,0,0,.0625)}.border-darken-2{border-color:rgba(0,0,0,.125)}.border-darken-3{border-color:rgba(0,0,0,.25)}.border-darken-4{border-color:rgba(0,0,0,.5)}.muted{opacity:.5}.hljs{color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment,.hljs-javadoc{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#1184ce}.hljs-dartdoc,.hljs-hexcolor,.hljs-number,.hljs-phpdoc,.hljs-string,.hljs-tag .hljs-value,.ruby .hljs-constant,.tex .hljs-formula{color:#ed225d}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rules .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}.hljs{display:block;overflow-x:auto;padding:.5em;background:#232323;color:#e6e1dc}.hljs-comment,.hljs-quote{color:#bc9458;font-style:italic}.hljs-keyword,.hljs-selector-tag{color:#c26230}.hljs-number,.hljs-regexp,.hljs-string,.hljs-template-variable,.hljs-variable{color:#a5c261}.hljs-subst{color:#519f50}.hljs-name,.hljs-tag{color:#e8bf6a}.hljs-type{color:#da4939}.hljs-attr,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-link,.hljs-symbol{color:#6d9cbe}.hljs-params{color:#d0d0ff}.hljs-attribute{color:#cda869}.hljs-meta{color:#9b859d}.hljs-section,.hljs-title{color:#ffc66d}.hljs-addition{background-color:#144212}.hljs-addition,.hljs-deletion{color:#e6e1dc;display:inline-block;width:100%}.hljs-deletion{background-color:#600}.hljs-selector-class{color:#9b703f}.hljs-selector-id{color:#8b98ab}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.documentation{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;overflow-x:hidden}.documentation a{color:#298ee6}.documentation a.black{color:#052e52}.container-small{max-width:58rem;margin-left:auto;margin-right:auto}.font-smaller{font-size:80%}.dark a.quiet{color:#fff}.dark a{color:#d2d2d2}.fade{opacity:.5}.button-indent{padding:.25rem 1.5rem;font-size:90%}.section-indent{border-left:2px solid #eee}.force-inline *{display:inline}section:target{background:#fafafa}.documentation-sidebar a:active{background:#298ee6;color:#fff}.documentation h1,.documentation h2,.documentation h3,.documentation h4,.documentation h5,.documentation h6{font-family:inherit;font-weight:700}p{font-family:inherit;line-height:1.7rem;color:#464646}.documentation code,.documentation pre,.documentation samp{font-family:Consolas,Inconsolata,Source Code Pro,monospace}pre{border-radius:3px;word-break:break-word;white-space:pre-wrap;display:block}h4{font-size:.8rem}.quiet{color:#7d7d7d}.small{font-size:.9rem}td{word-break:break-word}th.small{font-size:.8rem}.strong{font-weight:700}li{margin-top:10px}.keyline-all{border:1px solid #7d7d7d}.keyline-light{border:1px solid #e0e0e0}.fill-light{background:#efefef}li>code,p>code,td>code>a{font-weight:700}.documentation pre{padding:1rem;background:#052e52;color:#e6e1dc;font-size:.9rem}.bg-midnight{background:#052e52}.dark-link a,.dark-link code{color:#052e52}table p,table td{font-size:.9rem;line-height:1.3rem}.documentation td,.documentation th,.input{padding:.5rem}.input{font-family:inherit;display:block;width:100%;height:2rem;margin-bottom:1rem;border:1px solid #ccc;font-size:.875rem;border-radius:3px;box-sizing:border-box}
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/api/index.html b/node_modules/autoprefixer/node_modules/postcss/docs/api/index.html new file mode 100644 index 0000000..8dfeb47 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/api/index.html @@ -0,0 +1,22531 @@ +<!doctype html> +<html> +<head> + <meta charset='utf-8' /> + <title>postcss 7.0.17 | Documentation</title> + <meta name='description' content='Tool for transforming styles with JS plugins'> + <meta name='viewport' content='width=device-width,initial-scale=1'> + <link href='assets/styles.min.css' rel='stylesheet' /> +</head> + +<body class='documentation'> +<div class='px2'> + <div class='clearfix md-flex lg-flex flex-stretch mxn2'> + <div class='documentation-sidebar relative top-0 bottom-0 right-0 px2 py2 col-3 md-show'> + <div class='font-smaller fixed col-3 top-0 bottom-0 left-0 overflow-auto fill-light dark-link'> + <div class='px2'> + <h3 class='mb0 no-anchor'><code>postcss</code></h3> + <div class='mb1'><code>7.0.17</code></div> + <input placeholder='Filter' id='filter-input' class='col12 block input' type='text' /> + <div id="toc"> + + + + <a + href='#classes' + class="blockmt1 quiet rounded bold block h4 mt2 "> + <code>CLASSES</code> + + </a> + + + + + + <a + href='#atrule' + class="regular block toggle-sibling"> + <code>AtRule</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#atruleappend' + class='button-indent regular block'> + <code>#append</code> + </a> + + <a + href='#atruleeach' + class='button-indent regular block'> + <code>#each</code> + </a> + + <a + href='#atruleevery' + class='button-indent regular block'> + <code>#every</code> + </a> + + <a + href='#atrulefirst' + class='button-indent regular block'> + <code>#first</code> + </a> + + <a + href='#atruleindex' + class='button-indent regular block'> + <code>#index</code> + </a> + + <a + href='#atruleinsertafter' + class='button-indent regular block'> + <code>#insertAfter</code> + </a> + + <a + href='#atruleinsertbefore' + class='button-indent regular block'> + <code>#insertBefore</code> + </a> + + <a + href='#atrulelast' + class='button-indent regular block'> + <code>#last</code> + </a> + + <a + href='#atruleprepend' + class='button-indent regular block'> + <code>#prepend</code> + </a> + + <a + href='#atruleremoveall' + class='button-indent regular block'> + <code>#removeAll</code> + </a> + + <a + href='#atruleremovechild' + class='button-indent regular block'> + <code>#removeChild</code> + </a> + + <a + href='#atrulereplacevalues' + class='button-indent regular block'> + <code>#replaceValues</code> + </a> + + <a + href='#atrulesome' + class='button-indent regular block'> + <code>#some</code> + </a> + + <a + href='#atrulewalk' + class='button-indent regular block'> + <code>#walk</code> + </a> + + <a + href='#atrulewalkatrules' + class='button-indent regular block'> + <code>#walkAtRules</code> + </a> + + <a + href='#atrulewalkcomments' + class='button-indent regular block'> + <code>#walkComments</code> + </a> + + <a + href='#atrulewalkdecls' + class='button-indent regular block'> + <code>#walkDecls</code> + </a> + + <a + href='#atrulewalkrules' + class='button-indent regular block'> + <code>#walkRules</code> + </a> + + + + + </div> + + + + + <a + href='#comment' + class="regular block toggle-sibling"> + <code>Comment</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#commentafter' + class='button-indent regular block'> + <code>#after</code> + </a> + + <a + href='#commentbefore' + class='button-indent regular block'> + <code>#before</code> + </a> + + <a + href='#commentcleanraws' + class='button-indent regular block'> + <code>#cleanRaws</code> + </a> + + <a + href='#commentclone' + class='button-indent regular block'> + <code>#clone</code> + </a> + + <a + href='#commentcloneafter' + class='button-indent regular block'> + <code>#cloneAfter</code> + </a> + + <a + href='#commentclonebefore' + class='button-indent regular block'> + <code>#cloneBefore</code> + </a> + + <a + href='#commenterror' + class='button-indent regular block'> + <code>#error</code> + </a> + + <a + href='#commentnext' + class='button-indent regular block'> + <code>#next</code> + </a> + + <a + href='#commentprev' + class='button-indent regular block'> + <code>#prev</code> + </a> + + <a + href='#commentraw' + class='button-indent regular block'> + <code>#raw</code> + </a> + + <a + href='#commentremove' + class='button-indent regular block'> + <code>#remove</code> + </a> + + <a + href='#commentreplacewith' + class='button-indent regular block'> + <code>#replaceWith</code> + </a> + + <a + href='#commentroot' + class='button-indent regular block'> + <code>#root</code> + </a> + + <a + href='#commenttostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + <a + href='#commentwarn' + class='button-indent regular block'> + <code>#warn</code> + </a> + + + + + </div> + + + + + <a + href='#container' + class="regular block toggle-sibling"> + <code>Container</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#containerafter' + class='button-indent regular block'> + <code>#after</code> + </a> + + <a + href='#containerappend' + class='button-indent regular block'> + <code>#append</code> + </a> + + <a + href='#containerbefore' + class='button-indent regular block'> + <code>#before</code> + </a> + + <a + href='#containercleanraws' + class='button-indent regular block'> + <code>#cleanRaws</code> + </a> + + <a + href='#containerclone' + class='button-indent regular block'> + <code>#clone</code> + </a> + + <a + href='#containercloneafter' + class='button-indent regular block'> + <code>#cloneAfter</code> + </a> + + <a + href='#containerclonebefore' + class='button-indent regular block'> + <code>#cloneBefore</code> + </a> + + <a + href='#containereach' + class='button-indent regular block'> + <code>#each</code> + </a> + + <a + href='#containererror' + class='button-indent regular block'> + <code>#error</code> + </a> + + <a + href='#containerevery' + class='button-indent regular block'> + <code>#every</code> + </a> + + <a + href='#containerfirst' + class='button-indent regular block'> + <code>#first</code> + </a> + + <a + href='#containerindex' + class='button-indent regular block'> + <code>#index</code> + </a> + + <a + href='#containerinsertafter' + class='button-indent regular block'> + <code>#insertAfter</code> + </a> + + <a + href='#containerinsertbefore' + class='button-indent regular block'> + <code>#insertBefore</code> + </a> + + <a + href='#containerlast' + class='button-indent regular block'> + <code>#last</code> + </a> + + <a + href='#containernext' + class='button-indent regular block'> + <code>#next</code> + </a> + + <a + href='#containerprepend' + class='button-indent regular block'> + <code>#prepend</code> + </a> + + <a + href='#containerprev' + class='button-indent regular block'> + <code>#prev</code> + </a> + + <a + href='#containerraw' + class='button-indent regular block'> + <code>#raw</code> + </a> + + <a + href='#containerremove' + class='button-indent regular block'> + <code>#remove</code> + </a> + + <a + href='#containerremoveall' + class='button-indent regular block'> + <code>#removeAll</code> + </a> + + <a + href='#containerremovechild' + class='button-indent regular block'> + <code>#removeChild</code> + </a> + + <a + href='#containerreplacevalues' + class='button-indent regular block'> + <code>#replaceValues</code> + </a> + + <a + href='#containerreplacewith' + class='button-indent regular block'> + <code>#replaceWith</code> + </a> + + <a + href='#containerroot' + class='button-indent regular block'> + <code>#root</code> + </a> + + <a + href='#containersome' + class='button-indent regular block'> + <code>#some</code> + </a> + + <a + href='#containertostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + <a + href='#containerwalk' + class='button-indent regular block'> + <code>#walk</code> + </a> + + <a + href='#containerwalkatrules' + class='button-indent regular block'> + <code>#walkAtRules</code> + </a> + + <a + href='#containerwalkcomments' + class='button-indent regular block'> + <code>#walkComments</code> + </a> + + <a + href='#containerwalkdecls' + class='button-indent regular block'> + <code>#walkDecls</code> + </a> + + <a + href='#containerwalkrules' + class='button-indent regular block'> + <code>#walkRules</code> + </a> + + <a + href='#containerwarn' + class='button-indent regular block'> + <code>#warn</code> + </a> + + + + + </div> + + + + + <a + href='#csssyntaxerror' + class="regular block toggle-sibling"> + <code>CssSyntaxError</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#csssyntaxerrorname' + class='button-indent regular block'> + <code>#name</code> + </a> + + <a + href='#csssyntaxerrorreason' + class='button-indent regular block'> + <code>#reason</code> + </a> + + <a + href='#csssyntaxerrorfile' + class='button-indent regular block'> + <code>#file</code> + </a> + + <a + href='#csssyntaxerrorsource' + class='button-indent regular block'> + <code>#source</code> + </a> + + <a + href='#csssyntaxerrorplugin' + class='button-indent regular block'> + <code>#plugin</code> + </a> + + <a + href='#csssyntaxerrorline' + class='button-indent regular block'> + <code>#line</code> + </a> + + <a + href='#csssyntaxerrorcolumn' + class='button-indent regular block'> + <code>#column</code> + </a> + + <a + href='#csssyntaxerrormessage' + class='button-indent regular block'> + <code>#message</code> + </a> + + <a + href='#csssyntaxerrorshowsourcecode' + class='button-indent regular block'> + <code>#showSourceCode</code> + </a> + + <a + href='#csssyntaxerrortostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + + + + </div> + + + + + <a + href='#declaration' + class="regular block toggle-sibling"> + <code>Declaration</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#declarationafter' + class='button-indent regular block'> + <code>#after</code> + </a> + + <a + href='#declarationbefore' + class='button-indent regular block'> + <code>#before</code> + </a> + + <a + href='#declarationcleanraws' + class='button-indent regular block'> + <code>#cleanRaws</code> + </a> + + <a + href='#declarationclone' + class='button-indent regular block'> + <code>#clone</code> + </a> + + <a + href='#declarationcloneafter' + class='button-indent regular block'> + <code>#cloneAfter</code> + </a> + + <a + href='#declarationclonebefore' + class='button-indent regular block'> + <code>#cloneBefore</code> + </a> + + <a + href='#declarationerror' + class='button-indent regular block'> + <code>#error</code> + </a> + + <a + href='#declarationnext' + class='button-indent regular block'> + <code>#next</code> + </a> + + <a + href='#declarationprev' + class='button-indent regular block'> + <code>#prev</code> + </a> + + <a + href='#declarationraw' + class='button-indent regular block'> + <code>#raw</code> + </a> + + <a + href='#declarationremove' + class='button-indent regular block'> + <code>#remove</code> + </a> + + <a + href='#declarationreplacewith' + class='button-indent regular block'> + <code>#replaceWith</code> + </a> + + <a + href='#declarationroot' + class='button-indent regular block'> + <code>#root</code> + </a> + + <a + href='#declarationtostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + <a + href='#declarationwarn' + class='button-indent regular block'> + <code>#warn</code> + </a> + + + + + </div> + + + + + <a + href='#input' + class="regular block toggle-sibling"> + <code>Input</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#inputcss' + class='button-indent regular block'> + <code>#css</code> + </a> + + <a + href='#inputfile' + class='button-indent regular block'> + <code>#file</code> + </a> + + <a + href='#inputmap' + class='button-indent regular block'> + <code>#map</code> + </a> + + <a + href='#inputid' + class='button-indent regular block'> + <code>#id</code> + </a> + + <a + href='#inputorigin' + class='button-indent regular block'> + <code>#origin</code> + </a> + + <a + href='#inputfrom' + class='button-indent regular block'> + <code>#from</code> + </a> + + + + + </div> + + + + + <a + href='#lazyresult' + class="regular block toggle-sibling"> + <code>LazyResult</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#lazyresultprocessor' + class='button-indent regular block'> + <code>#processor</code> + </a> + + <a + href='#lazyresultopts' + class='button-indent regular block'> + <code>#opts</code> + </a> + + <a + href='#lazyresultcss' + class='button-indent regular block'> + <code>#css</code> + </a> + + <a + href='#lazyresultcontent' + class='button-indent regular block'> + <code>#content</code> + </a> + + <a + href='#lazyresultmap' + class='button-indent regular block'> + <code>#map</code> + </a> + + <a + href='#lazyresultroot' + class='button-indent regular block'> + <code>#root</code> + </a> + + <a + href='#lazyresultmessages' + class='button-indent regular block'> + <code>#messages</code> + </a> + + <a + href='#lazyresultwarnings' + class='button-indent regular block'> + <code>#warnings</code> + </a> + + <a + href='#lazyresulttostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + <a + href='#lazyresultthen' + class='button-indent regular block'> + <code>#then</code> + </a> + + <a + href='#lazyresultcatch' + class='button-indent regular block'> + <code>#catch</code> + </a> + + <a + href='#lazyresultfinally' + class='button-indent regular block'> + <code>#finally</code> + </a> + + + + + </div> + + + + + <a + href='#node' + class="regular block toggle-sibling"> + <code>Node</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#nodeerror' + class='button-indent regular block'> + <code>#error</code> + </a> + + <a + href='#nodewarn' + class='button-indent regular block'> + <code>#warn</code> + </a> + + <a + href='#noderemove' + class='button-indent regular block'> + <code>#remove</code> + </a> + + <a + href='#nodetostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + <a + href='#nodeclone' + class='button-indent regular block'> + <code>#clone</code> + </a> + + <a + href='#nodeclonebefore' + class='button-indent regular block'> + <code>#cloneBefore</code> + </a> + + <a + href='#nodecloneafter' + class='button-indent regular block'> + <code>#cloneAfter</code> + </a> + + <a + href='#nodereplacewith' + class='button-indent regular block'> + <code>#replaceWith</code> + </a> + + <a + href='#nodenext' + class='button-indent regular block'> + <code>#next</code> + </a> + + <a + href='#nodeprev' + class='button-indent regular block'> + <code>#prev</code> + </a> + + <a + href='#nodebefore' + class='button-indent regular block'> + <code>#before</code> + </a> + + <a + href='#nodeafter' + class='button-indent regular block'> + <code>#after</code> + </a> + + <a + href='#noderaw' + class='button-indent regular block'> + <code>#raw</code> + </a> + + <a + href='#noderoot' + class='button-indent regular block'> + <code>#root</code> + </a> + + <a + href='#nodecleanraws' + class='button-indent regular block'> + <code>#cleanRaws</code> + </a> + + + + + </div> + + + + + <a + href='#previousmap' + class="regular block toggle-sibling"> + <code>PreviousMap</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#previousmapinline' + class='button-indent regular block'> + <code>#inline</code> + </a> + + <a + href='#previousmapconsumer' + class='button-indent regular block'> + <code>#consumer</code> + </a> + + <a + href='#previousmapwithcontent' + class='button-indent regular block'> + <code>#withContent</code> + </a> + + + + + </div> + + + + + <a + href='#processor' + class="regular block toggle-sibling"> + <code>Processor</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#processorversion' + class='button-indent regular block'> + <code>#version</code> + </a> + + <a + href='#processorplugins' + class='button-indent regular block'> + <code>#plugins</code> + </a> + + <a + href='#processoruse' + class='button-indent regular block'> + <code>#use</code> + </a> + + <a + href='#processorprocess' + class='button-indent regular block'> + <code>#process</code> + </a> + + + + + </div> + + + + + <a + href='#result' + class="regular block toggle-sibling"> + <code>Result</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#resultprocessor' + class='button-indent regular block'> + <code>#processor</code> + </a> + + <a + href='#resultmessages' + class='button-indent regular block'> + <code>#messages</code> + </a> + + <a + href='#resultroot' + class='button-indent regular block'> + <code>#root</code> + </a> + + <a + href='#resultopts' + class='button-indent regular block'> + <code>#opts</code> + </a> + + <a + href='#resultcss' + class='button-indent regular block'> + <code>#css</code> + </a> + + <a + href='#resultmap' + class='button-indent regular block'> + <code>#map</code> + </a> + + <a + href='#resulttostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + <a + href='#resultwarn' + class='button-indent regular block'> + <code>#warn</code> + </a> + + <a + href='#resultwarnings' + class='button-indent regular block'> + <code>#warnings</code> + </a> + + <a + href='#resultcontent' + class='button-indent regular block'> + <code>#content</code> + </a> + + + + + </div> + + + + + <a + href='#root' + class="regular block toggle-sibling"> + <code>Root</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#rootappend' + class='button-indent regular block'> + <code>#append</code> + </a> + + <a + href='#rooteach' + class='button-indent regular block'> + <code>#each</code> + </a> + + <a + href='#rootevery' + class='button-indent regular block'> + <code>#every</code> + </a> + + <a + href='#rootfirst' + class='button-indent regular block'> + <code>#first</code> + </a> + + <a + href='#rootindex' + class='button-indent regular block'> + <code>#index</code> + </a> + + <a + href='#rootinsertafter' + class='button-indent regular block'> + <code>#insertAfter</code> + </a> + + <a + href='#rootinsertbefore' + class='button-indent regular block'> + <code>#insertBefore</code> + </a> + + <a + href='#rootlast' + class='button-indent regular block'> + <code>#last</code> + </a> + + <a + href='#rootprepend' + class='button-indent regular block'> + <code>#prepend</code> + </a> + + <a + href='#rootremoveall' + class='button-indent regular block'> + <code>#removeAll</code> + </a> + + <a + href='#rootremovechild' + class='button-indent regular block'> + <code>#removeChild</code> + </a> + + <a + href='#rootreplacevalues' + class='button-indent regular block'> + <code>#replaceValues</code> + </a> + + <a + href='#rootwalk' + class='button-indent regular block'> + <code>#walk</code> + </a> + + <a + href='#rootwalkatrules' + class='button-indent regular block'> + <code>#walkAtRules</code> + </a> + + <a + href='#rootwalkcomments' + class='button-indent regular block'> + <code>#walkComments</code> + </a> + + <a + href='#rootwalkrules' + class='button-indent regular block'> + <code>#walkRules</code> + </a> + + <a + href='#rooton' + class='button-indent regular block'> + <code>#on</code> + </a> + + <a + href='#rootsome' + class='button-indent regular block'> + <code>#some</code> + </a> + + <a + href='#roottoresult' + class='button-indent regular block'> + <code>#toResult</code> + </a> + + <a + href='#rootwalkdecls' + class='button-indent regular block'> + <code>#walkDecls</code> + </a> + + + + + </div> + + + + + <a + href='#rule' + class="regular block toggle-sibling"> + <code>Rule</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#ruleappend' + class='button-indent regular block'> + <code>#append</code> + </a> + + <a + href='#ruleeach' + class='button-indent regular block'> + <code>#each</code> + </a> + + <a + href='#ruleevery' + class='button-indent regular block'> + <code>#every</code> + </a> + + <a + href='#rulefirst' + class='button-indent regular block'> + <code>#first</code> + </a> + + <a + href='#ruleindex' + class='button-indent regular block'> + <code>#index</code> + </a> + + <a + href='#ruleinsertafter' + class='button-indent regular block'> + <code>#insertAfter</code> + </a> + + <a + href='#ruleinsertbefore' + class='button-indent regular block'> + <code>#insertBefore</code> + </a> + + <a + href='#rulelast' + class='button-indent regular block'> + <code>#last</code> + </a> + + <a + href='#ruleprepend' + class='button-indent regular block'> + <code>#prepend</code> + </a> + + <a + href='#ruleremoveall' + class='button-indent regular block'> + <code>#removeAll</code> + </a> + + <a + href='#ruleremovechild' + class='button-indent regular block'> + <code>#removeChild</code> + </a> + + <a + href='#rulereplacevalues' + class='button-indent regular block'> + <code>#replaceValues</code> + </a> + + <a + href='#ruleselectors' + class='button-indent regular block'> + <code>#selectors</code> + </a> + + <a + href='#rulesome' + class='button-indent regular block'> + <code>#some</code> + </a> + + <a + href='#rulewalk' + class='button-indent regular block'> + <code>#walk</code> + </a> + + <a + href='#rulewalkatrules' + class='button-indent regular block'> + <code>#walkAtRules</code> + </a> + + <a + href='#rulewalkcomments' + class='button-indent regular block'> + <code>#walkComments</code> + </a> + + <a + href='#rulewalkdecls' + class='button-indent regular block'> + <code>#walkDecls</code> + </a> + + <a + href='#rulewalkrules' + class='button-indent regular block'> + <code>#walkRules</code> + </a> + + + + + </div> + + + + + <a + href='#warning' + class="regular block toggle-sibling"> + <code>Warning</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + + <a + href='#warningtype' + class='button-indent regular block'> + <code>#type</code> + </a> + + <a + href='#warningtext' + class='button-indent regular block'> + <code>#text</code> + </a> + + <a + href='#warningline' + class='button-indent regular block'> + <code>#line</code> + </a> + + <a + href='#warningcolumn' + class='button-indent regular block'> + <code>#column</code> + </a> + + <a + href='#warningtostring' + class='button-indent regular block'> + <code>#toString</code> + </a> + + + + + </div> + + + + + <a + href='#namespaces' + class="blockmt1 quiet rounded bold block h4 mt2 "> + <code>NAMESPACES</code> + + </a> + + + + + + <a + href='#list' + class="regular block toggle-sibling"> + <code>list</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + <a + href='#listspace' + class='button-indent px1 quiet regular rounded block'> + <code>.space</code> + </a> + + <a + href='#listcomma' + class='button-indent px1 quiet regular rounded block'> + <code>.comma</code> + </a> + + + + + + </div> + + + + + <a + href='#postcss' + class="regular block toggle-sibling"> + <code>postcss</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + <a + href='#postcssplugin' + class='button-indent px1 quiet regular rounded block'> + <code>.plugin</code> + </a> + + <a + href='#postcssstringify' + class='button-indent px1 quiet regular rounded block'> + <code>.stringify</code> + </a> + + <a + href='#postcssparse' + class='button-indent px1 quiet regular rounded block'> + <code>.parse</code> + </a> + + <a + href='#postcssvendor' + class='button-indent px1 quiet regular rounded block'> + <code>.vendor</code> + </a> + + <a + href='#postcsslist' + class='button-indent px1 quiet regular rounded block'> + <code>.list</code> + </a> + + <a + href='#postcsscomment' + class='button-indent px1 quiet regular rounded block'> + <code>.comment</code> + </a> + + <a + href='#postcssatrule' + class='button-indent px1 quiet regular rounded block'> + <code>.atRule</code> + </a> + + <a + href='#postcssdecl' + class='button-indent px1 quiet regular rounded block'> + <code>.decl</code> + </a> + + <a + href='#postcssrule' + class='button-indent px1 quiet regular rounded block'> + <code>.rule</code> + </a> + + <a + href='#postcssroot' + class='button-indent px1 quiet regular rounded block'> + <code>.root</code> + </a> + + + + + + </div> + + + + + <a + href='#vendor' + class="regular block toggle-sibling"> + <code>vendor</code> + <span class='icon'>▾</span> + </a> + + + <div class='toggle-target'> + + + <a + href='#vendorprefix' + class='button-indent px1 quiet regular rounded block'> + <code>.prefix</code> + </a> + + <a + href='#vendorunprefixed' + class='button-indent px1 quiet regular rounded block'> + <code>.unprefixed</code> + </a> + + + + + + </div> + + + + + <a + href='#global' + class="blockmt1 quiet rounded bold block h4 mt2 "> + <code>GLOBAL</code> + + </a> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + </div> + <div class='mt1 h6 quiet'> + <a href='https://documentation.js.org/reading-documentation.html'>Need help reading this?</a> + </div> + </div> + + </div> + </div> + <div class='sm-col-12 md-col-9 lg-col-9 flex flex-column'> + <div class='flex-auto full-width'> + + + <div class='hide'> + <section class='py2 clearfix'> + + <h2 id='classes' class='mt0'> + CLASSES + </h2> + + + + + + </section> +</div> + + + + <section id='atrule'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="#container">Container</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/at-rule.js#L23-L94'> + <span>lib/at-rule.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrule'> + <code> + AtRule + <span class='gray'>(defaults)</span> + </code> + </a> + </h3> + + <p>Represents an at-rule.</p> +<p>If it’s followed in the CSS by a {} block, this node will have +a nodes property representing its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'@charset "UTF-8"; @media print {}'</span>) + +<span class="hljs-keyword">const</span> charset = root.first +charset.type <span class="hljs-comment">//=> 'atrule'</span> +charset.nodes <span class="hljs-comment">//=> undefined</span> + +<span class="hljs-keyword">const</span> media = root.last +media.nodes <span class="hljs-comment">//=> []</span></code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='atruleappend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L370-L379'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleappend'> + <code> + append + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the end of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.append(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='atruleeach'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L76-L102'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleeach'> + <code> + each + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Iterates through the container’s immediate children, +calling <code>callback</code> for each child.</p> +<p>Returning <code>false</code> in the callback will break iteration.</p> +<p>This method only iterates through the container’s immediate children. +If you need to recursively iterate through all the container’s descendant +nodes, use <a href="#containerwalk">Container#walk</a>.</p> +<p>Unlike the for <code>{}</code>-cycle or <code>Array#forEach</code> this iterator is safe +if you are mutating the array of child nodes during iteration. +PostCSS will adjust the current index to match the mutations.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { color: black; z-index: 1 }'</span>) +<span class="hljs-keyword">const</span> rule = root.first + +<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> decl <span class="hljs-keyword">of</span> rule.nodes) { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Cycle will be infinite, because cloneBefore moves the current node</span> + <span class="hljs-comment">// to the next index</span> +} + +rule.each(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Will be executed only for color and z-index</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='atruleevery'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L587-L589'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleevery'> + <code> + every + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> +for all of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is every child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> noPrefixes = rule.every(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] !== <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulefirst'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L631-L634'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulefirst'> + <code> + first + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s first child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.first === rules.nodes[<span class="hljs-number">0</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='atruleindex'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L616-L621'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleindex'> + <code> + index + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Returns a <code>child</code>’s index within the <a href="Container#nodes">Container#nodes</a> array.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Child of the current container. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> + : + <span class='force-inline'>Child index. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.index( rule.nodes[<span class="hljs-number">2</span>] ) <span class="hljs-comment">//=> 2</span></code></pre> + + + + + + + + + + +</section> + + + <section id='atruleinsertafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L462-L479'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleinsertafter'> + <code> + insertAfter + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node after old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='atruleinsertbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L434-L452'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleinsertbefore'> + <code> + insertBefore + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node before old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.insertBefore(decl, decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }))</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulelast'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L644-L647'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulelast'> + <code> + last + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s last child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.last === rule.nodes[rule.nodes.length - <span class="hljs-number">1</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='atruleprepend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L401-L414'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleprepend'> + <code> + prepend + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the start of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.prepend(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='atruleremoveall'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L523-L530'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleremoveall'> + <code> + removeAll + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes all children from the container +and cleans their parent properties.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.removeAll() +rule.nodes.length <span class="hljs-comment">//=> 0</span></code></pre> + + + + + + + + + + +</section> + + + <section id='atruleremovechild'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L495-L511'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atruleremovechild'> + <code> + removeChild + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Removes node from the container and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.nodes.length <span class="hljs-comment">//=> 5</span> +rule.removeChild(decl) +rule.nodes.length <span class="hljs-comment">//=> 4</span> +decl.parent <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='atrulereplacevalues'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L558-L574'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulereplacevalues'> + <code> + replaceValues + <span class='gray'>(pattern, opts, callback)</span> + </code> + </a> + </h3> + + <p>Passes all declaration values within the container that match pattern +through callback, replacing those values with the returned result +of callback.</p> +<p>This method is useful if you are using a custom unit or function +and need to iterate through all values.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>pattern</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>) + + </td> + <td class='col-6'>Replace pattern. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + + </td> + <td class='col-6'>Options to speed up the search. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.props</td> + <td class="col-2 quiet"> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>>) + + </td> + <td class='col-8'>An array of property names. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.fast</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>String that’s used to narrow down +values and speed up the regexp search. +</td> +</tr> + + + + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>) + + </td> + <td class='col-6'>String to replace pattern or callback +that returns a new value. The callback +will receive the same arguments +as those passed to a function parameter +of +<code>String#replace</code> +. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.replaceValues(<span class="hljs-regexp">/\d+rem/</span>, { <span class="hljs-attr">fast</span>: <span class="hljs-string">'rem'</span> }, string => { + <span class="hljs-keyword">return</span> <span class="hljs-number">15</span> * <span class="hljs-built_in">parseInt</span>(string) + <span class="hljs-string">'px'</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulesome'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L602-L604'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulesome'> + <code> + some + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> for (at least) one +of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is some child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> hasPrefix = rule.some(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] === <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulewalk'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L123-L137'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulewalk'> + <code> + walk + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each node.</p> +<p>Like container.each(), this method is safe to use +if you are mutating arrays during iteration.</p> +<p>If you only need to iterate through the container’s immediate children, +use <a href="#containereach">Container#each</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walk(<span class="hljs-function"><span class="hljs-params">node</span> =></span> { + <span class="hljs-comment">// Traverses all descendant nodes.</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulewalkatrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L303-L324'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulewalkatrules'> + <code> + walkAtRules + <span class='gray'>(name?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each at-rule node.</p> +<p>If you pass a filter, iteration will only happen over at-rules +that have matching names.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>name</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter at-rules by name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkAtRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + <span class="hljs-keyword">if</span> (isOld(rule.name)) rule.remove() +}) + +<span class="hljs-keyword">let</span> first = <span class="hljs-literal">false</span> +root.walkAtRules(<span class="hljs-string">'charset'</span>, rule => { + <span class="hljs-keyword">if</span> (!first) { + first = <span class="hljs-literal">true</span> + } <span class="hljs-keyword">else</span> { + rule.remove() + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulewalkcomments'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L342-L348'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulewalkcomments'> + <code> + walkComments + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each comment node.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkComments(<span class="hljs-function"><span class="hljs-params">comment</span> =></span> { + comment.remove() +})</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulewalkdecls'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L203-L224'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulewalkdecls'> + <code> + walkDecls + <span class='gray'>(prop?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each declaration node.</p> +<p>If you pass a filter, iteration will only happen over declarations +with matching properties.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter declarations by property name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkDecls(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + checkPropertySupport(decl.prop) +}) + +root.walkDecls(<span class="hljs-string">'border-radius'</span>, decl => { + decl.remove() +}) + +root.walkDecls(<span class="hljs-regexp">/^background/</span>, decl => { + decl.value = takeFirstColorFromGradient(decl.value) +})</code></pre> + + + + + + + + + + +</section> + + + <section id='atrulewalkrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L249-L271'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#atrulewalkrules'> + <code> + walkRules + <span class='gray'>(selector?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each rule node.</p> +<p>If you pass a filter, iteration will only happen over rules +with matching selectors.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>selector</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter rules by selector. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> selectors = [] +root.walkRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + selectors.push(rule.selector) +}) +<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Your CSS uses <span class="hljs-subst">${ selectors.length }</span> selectors`</span>)</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='comment'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="#node">Node</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/comment.js#L13-L37'> + <span>lib/comment.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#comment'> + <code> + Comment + <span class='gray'>(defaults)</span> + </code> + </a> + </h3> + + <p>Represents a comment between declarations or statements (rule and at-rules).</p> +<p>Comments inside selectors, at-rule parameters, or declaration values +will be stored in the <code>raws</code> properties explained above.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='commentafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L312-L315'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentafter'> + <code> + after + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node after current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertAfter(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.after(<span class="hljs-string">'color: black'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='commentbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L295-L298'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentbefore'> + <code> + before + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node before current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertBefore(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.before(<span class="hljs-string">'content: ""'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='commentcleanraws'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L392-L396'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentcleanraws'> + <code> + cleanRaws + <span class='gray'>(keepBetween?)</span> + </code> + </a> + </h3> + + <p>Clear the code style properties for the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>keepBetween</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>? + + </td> + <td class='col-6'>Keep the raws.between symbols. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></code> + : + <span class='force-inline'> +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>node.raws.before <span class="hljs-comment">//=> ' '</span> +node.cleanRaws() +node.raws.before <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='commentclone'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L182-L188'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentclone'> + <code> + clone + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Returns an exact clone of the node.</p> +<p>The resulting cloned node and its (cloned) children will retain +code style properties.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Clone of the node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.raws.before <span class="hljs-comment">//=> "\n "</span> +<span class="hljs-keyword">const</span> cloned = decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop }) +cloned.raws.before <span class="hljs-comment">//=> "\n "</span> +cloned.toString() <span class="hljs-comment">//=> -moz-transform: scale(0)</span></code></pre> + + + + + + + + + + +</section> + + + <section id='commentcloneafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L215-L219'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentcloneafter'> + <code> + cloneAfter + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +after the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='commentclonebefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L201-L205'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentclonebefore'> + <code> + cloneBefore + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +before the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Mew properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop })</code></pre> + + + + + + + + + + +</section> + + + <section id='commenterror'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L88-L94'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commenterror'> + <code> + error + <span class='gray'>(message, opts = {})</span> + </code> + </a> + </h3> + + <p>Returns a <code>CssSyntaxError</code> instance containing the original position +of the node in the source, showing line and column numbers and also +a small excerpt to facilitate debugging.</p> +<p>If present, an input source map will be used to get the original position +of the source, even from a previous compilation step +(e.g., from Sass compilation).</p> +<p>This method produces very useful error messages.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>message</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Error description. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Options. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this error. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#csssyntaxerror">CssSyntaxError</a></code> + : + <span class='force-inline'>Error object to throw it. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (!variables[name]) { + <span class="hljs-keyword">throw</span> decl.error(<span class="hljs-string">'Unknown variable '</span> + name, { <span class="hljs-attr">word</span>: name }) + <span class="hljs-comment">// CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black</span> + <span class="hljs-comment">// color: $black</span> + <span class="hljs-comment">// a</span> + <span class="hljs-comment">// ^</span> + <span class="hljs-comment">// background: white</span> +}</code></pre> + + + + + + + + + + +</section> + + + <section id='commentnext'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L259-L263'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentnext'> + <code> + next + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the next child of the node’s parent. +Returns <code>undefined</code> if the current node is the last child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Next node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (comment.text === <span class="hljs-string">'delete next'</span>) { + <span class="hljs-keyword">const</span> next = comment.next() + <span class="hljs-keyword">if</span> (next) { + next.remove() + } +}</code></pre> + + + + + + + + + + +</section> + + + <section id='commentprev'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L277-L281'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentprev'> + <code> + prev + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the previous child of the node’s parent. +Returns <code>undefined</code> if the current node is the first child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Previous node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> annotation = decl.prev() +<span class="hljs-keyword">if</span> (annotation.type === <span class="hljs-string">'comment'</span>) { + readAnnotation(annotation.text) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='commentraw'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L361-L364'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentraw'> + <code> + raw + <span class='gray'>(prop, defaultType?)</span> + </code> + </a> + </h3> + + <p>Returns a <a href="Node#raws">Node#raws</a> value. If the node is missing +the code style property (because the node was manually built or cloned), +PostCSS will try to autodetect the code style property by looking +at other nodes in the tree.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Name of code style property. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>defaultType</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>Name of default value, it can be missed +if the value is the same as prop. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Code style value. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { background: white }'</span>) +root.nodes[<span class="hljs-number">0</span>].append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raws.before <span class="hljs-comment">//=> undefined</span> +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raw(<span class="hljs-string">'before'</span>) <span class="hljs-comment">//=> ' '</span></code></pre> + + + + + + + + + + +</section> + + + <section id='commentremove'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L138-L144'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentremove'> + <code> + remove + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes the node from its parent and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Node to make calls chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (decl.prop.match(<span class="hljs-regexp">/^-webkit-/</span>)) { + decl.remove() +}</code></pre> + + + + + + + + + + +</section> + + + <section id='commentreplacewith'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L233-L243'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentreplacewith'> + <code> + replaceWith + <span class='gray'>(nodes)</span> + </code> + </a> + </h3> + + <p>Inserts node(s) before the current node and removes the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>nodes</code></td> + <td class='col-3 quiet'> + ...<a href="#node">Node</a> + + </td> + <td class='col-6'>Mode(s) to replace current one. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Current node to methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (atrule.name === <span class="hljs-string">'mixin'</span>) { + atrule.replaceWith(mixinRules[atrule.params]) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='commentroot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L374-L378'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentroot'> + <code> + root + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Finds the Root instance of the node’s tree.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>Root parent. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">0</span>].root() === root</code></pre> + + + + + + + + + + +</section> + + + <section id='commenttostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L157-L164'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commenttostring'> + <code> + toString + <span class='gray'>(stringifier = stringify)</span> + </code> + </a> + </h3> + + <p>Returns a CSS string representing the node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>stringifier</code></td> + <td class='col-3 quiet'> + (<a href="#stringifier">stringifier</a> | <a href="#syntax">syntax</a>)? + + = <code>stringify</code> + </td> + <td class='col-6'>A syntax to use +in string generation. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>CSS string of this node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.rule({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }).toString() <span class="hljs-comment">//=> "a {}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='commentwarn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L121-L125'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#commentwarn'> + <code> + warn + <span class='gray'>(result, text, opts?)</span> + </code> + </a> + </h3> + + <p>This method is provided as a convenience wrapper for <a href="#resultwarn">Result#warn</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>result</code></td> + <td class='col-3 quiet'> + <a href="#result">Result</a> + + </td> + <td class='col-6'>The +<a href="#result">Result</a> + instance +that will receive the warning. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>text</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Warning message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Options +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this warning. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#warning">Warning</a></code> + : + <span class='force-inline'>Created warning object. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> plugin = postcss.plugin(<span class="hljs-string">'postcss-deprecated'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + root.walkDecls(<span class="hljs-string">'bad'</span>, decl => { + decl.warn(result, <span class="hljs-string">'Deprecated property bad'</span>) + }) + } +})</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='container'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="#node">Node</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L36-L708'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#container'> + <code> + Container + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The <a href="#root">Root</a>, <a href="#atrule">AtRule</a>, and <a href="#rule">Rule</a> container nodes +inherit some common methods to help work with their children.</p> +<p>Note that all containers can store any content. If you write a rule inside +a rule, PostCSS will parse it.</p> + + + + + + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='containerafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L312-L315'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerafter'> + <code> + after + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node after current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertAfter(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.after(<span class="hljs-string">'color: black'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containerappend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L370-L379'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerappend'> + <code> + append + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the end of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.append(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containerbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L295-L298'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerbefore'> + <code> + before + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node before current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertBefore(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.before(<span class="hljs-string">'content: ""'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containercleanraws'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L392-L396'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containercleanraws'> + <code> + cleanRaws + <span class='gray'>(keepBetween?)</span> + </code> + </a> + </h3> + + <p>Clear the code style properties for the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>keepBetween</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>? + + </td> + <td class='col-6'>Keep the raws.between symbols. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></code> + : + <span class='force-inline'> +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>node.raws.before <span class="hljs-comment">//=> ' '</span> +node.cleanRaws() +node.raws.before <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containerclone'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L182-L188'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerclone'> + <code> + clone + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Returns an exact clone of the node.</p> +<p>The resulting cloned node and its (cloned) children will retain +code style properties.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Clone of the node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.raws.before <span class="hljs-comment">//=> "\n "</span> +<span class="hljs-keyword">const</span> cloned = decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop }) +cloned.raws.before <span class="hljs-comment">//=> "\n "</span> +cloned.toString() <span class="hljs-comment">//=> -moz-transform: scale(0)</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containercloneafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L215-L219'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containercloneafter'> + <code> + cloneAfter + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +after the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='containerclonebefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L201-L205'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerclonebefore'> + <code> + cloneBefore + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +before the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Mew properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop })</code></pre> + + + + + + + + + + +</section> + + + <section id='containereach'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L76-L102'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containereach'> + <code> + each + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Iterates through the container’s immediate children, +calling <code>callback</code> for each child.</p> +<p>Returning <code>false</code> in the callback will break iteration.</p> +<p>This method only iterates through the container’s immediate children. +If you need to recursively iterate through all the container’s descendant +nodes, use <a href="#containerwalk">Container#walk</a>.</p> +<p>Unlike the for <code>{}</code>-cycle or <code>Array#forEach</code> this iterator is safe +if you are mutating the array of child nodes during iteration. +PostCSS will adjust the current index to match the mutations.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { color: black; z-index: 1 }'</span>) +<span class="hljs-keyword">const</span> rule = root.first + +<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> decl <span class="hljs-keyword">of</span> rule.nodes) { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Cycle will be infinite, because cloneBefore moves the current node</span> + <span class="hljs-comment">// to the next index</span> +} + +rule.each(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Will be executed only for color and z-index</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='containererror'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L88-L94'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containererror'> + <code> + error + <span class='gray'>(message, opts = {})</span> + </code> + </a> + </h3> + + <p>Returns a <code>CssSyntaxError</code> instance containing the original position +of the node in the source, showing line and column numbers and also +a small excerpt to facilitate debugging.</p> +<p>If present, an input source map will be used to get the original position +of the source, even from a previous compilation step +(e.g., from Sass compilation).</p> +<p>This method produces very useful error messages.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>message</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Error description. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Options. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this error. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#csssyntaxerror">CssSyntaxError</a></code> + : + <span class='force-inline'>Error object to throw it. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (!variables[name]) { + <span class="hljs-keyword">throw</span> decl.error(<span class="hljs-string">'Unknown variable '</span> + name, { <span class="hljs-attr">word</span>: name }) + <span class="hljs-comment">// CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black</span> + <span class="hljs-comment">// color: $black</span> + <span class="hljs-comment">// a</span> + <span class="hljs-comment">// ^</span> + <span class="hljs-comment">// background: white</span> +}</code></pre> + + + + + + + + + + +</section> + + + <section id='containerevery'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L587-L589'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerevery'> + <code> + every + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> +for all of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is every child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> noPrefixes = rule.every(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] !== <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containerfirst'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L631-L634'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerfirst'> + <code> + first + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s first child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.first === rules.nodes[<span class="hljs-number">0</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='containerindex'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L616-L621'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerindex'> + <code> + index + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Returns a <code>child</code>’s index within the <a href="Container#nodes">Container#nodes</a> array.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Child of the current container. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> + : + <span class='force-inline'>Child index. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.index( rule.nodes[<span class="hljs-number">2</span>] ) <span class="hljs-comment">//=> 2</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containerinsertafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L462-L479'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerinsertafter'> + <code> + insertAfter + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node after old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='containerinsertbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L434-L452'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerinsertbefore'> + <code> + insertBefore + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node before old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.insertBefore(decl, decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }))</code></pre> + + + + + + + + + + +</section> + + + <section id='containerlast'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L644-L647'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerlast'> + <code> + last + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s last child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.last === rule.nodes[rule.nodes.length - <span class="hljs-number">1</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='containernext'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L259-L263'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containernext'> + <code> + next + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the next child of the node’s parent. +Returns <code>undefined</code> if the current node is the last child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Next node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (comment.text === <span class="hljs-string">'delete next'</span>) { + <span class="hljs-keyword">const</span> next = comment.next() + <span class="hljs-keyword">if</span> (next) { + next.remove() + } +}</code></pre> + + + + + + + + + + +</section> + + + <section id='containerprepend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L401-L414'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerprepend'> + <code> + prepend + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the start of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.prepend(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containerprev'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L277-L281'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerprev'> + <code> + prev + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the previous child of the node’s parent. +Returns <code>undefined</code> if the current node is the first child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Previous node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> annotation = decl.prev() +<span class="hljs-keyword">if</span> (annotation.type === <span class="hljs-string">'comment'</span>) { + readAnnotation(annotation.text) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='containerraw'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L361-L364'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerraw'> + <code> + raw + <span class='gray'>(prop, defaultType?)</span> + </code> + </a> + </h3> + + <p>Returns a <a href="Node#raws">Node#raws</a> value. If the node is missing +the code style property (because the node was manually built or cloned), +PostCSS will try to autodetect the code style property by looking +at other nodes in the tree.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Name of code style property. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>defaultType</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>Name of default value, it can be missed +if the value is the same as prop. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Code style value. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { background: white }'</span>) +root.nodes[<span class="hljs-number">0</span>].append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raws.before <span class="hljs-comment">//=> undefined</span> +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raw(<span class="hljs-string">'before'</span>) <span class="hljs-comment">//=> ' '</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containerremove'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L138-L144'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerremove'> + <code> + remove + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes the node from its parent and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Node to make calls chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (decl.prop.match(<span class="hljs-regexp">/^-webkit-/</span>)) { + decl.remove() +}</code></pre> + + + + + + + + + + +</section> + + + <section id='containerremoveall'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L523-L530'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerremoveall'> + <code> + removeAll + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes all children from the container +and cleans their parent properties.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.removeAll() +rule.nodes.length <span class="hljs-comment">//=> 0</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containerremovechild'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L495-L511'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerremovechild'> + <code> + removeChild + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Removes node from the container and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.nodes.length <span class="hljs-comment">//=> 5</span> +rule.removeChild(decl) +rule.nodes.length <span class="hljs-comment">//=> 4</span> +decl.parent <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containerreplacevalues'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L558-L574'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerreplacevalues'> + <code> + replaceValues + <span class='gray'>(pattern, opts, callback)</span> + </code> + </a> + </h3> + + <p>Passes all declaration values within the container that match pattern +through callback, replacing those values with the returned result +of callback.</p> +<p>This method is useful if you are using a custom unit or function +and need to iterate through all values.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>pattern</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>) + + </td> + <td class='col-6'>Replace pattern. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + + </td> + <td class='col-6'>Options to speed up the search. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.props</td> + <td class="col-2 quiet"> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>>) + + </td> + <td class='col-8'>An array of property names. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.fast</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>String that’s used to narrow down +values and speed up the regexp search. +</td> +</tr> + + + + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>) + + </td> + <td class='col-6'>String to replace pattern or callback +that returns a new value. The callback +will receive the same arguments +as those passed to a function parameter +of +<code>String#replace</code> +. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.replaceValues(<span class="hljs-regexp">/\d+rem/</span>, { <span class="hljs-attr">fast</span>: <span class="hljs-string">'rem'</span> }, string => { + <span class="hljs-keyword">return</span> <span class="hljs-number">15</span> * <span class="hljs-built_in">parseInt</span>(string) + <span class="hljs-string">'px'</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='containerreplacewith'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L233-L243'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerreplacewith'> + <code> + replaceWith + <span class='gray'>(nodes)</span> + </code> + </a> + </h3> + + <p>Inserts node(s) before the current node and removes the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>nodes</code></td> + <td class='col-3 quiet'> + ...<a href="#node">Node</a> + + </td> + <td class='col-6'>Mode(s) to replace current one. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Current node to methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (atrule.name === <span class="hljs-string">'mixin'</span>) { + atrule.replaceWith(mixinRules[atrule.params]) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='containerroot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L374-L378'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerroot'> + <code> + root + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Finds the Root instance of the node’s tree.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>Root parent. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">0</span>].root() === root</code></pre> + + + + + + + + + + +</section> + + + <section id='containersome'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L602-L604'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containersome'> + <code> + some + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> for (at least) one +of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is some child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> hasPrefix = rule.some(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] === <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containertostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L157-L164'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containertostring'> + <code> + toString + <span class='gray'>(stringifier = stringify)</span> + </code> + </a> + </h3> + + <p>Returns a CSS string representing the node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>stringifier</code></td> + <td class='col-3 quiet'> + (<a href="#stringifier">stringifier</a> | <a href="#syntax">syntax</a>)? + + = <code>stringify</code> + </td> + <td class='col-6'>A syntax to use +in string generation. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>CSS string of this node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.rule({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }).toString() <span class="hljs-comment">//=> "a {}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='containerwalk'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L123-L137'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerwalk'> + <code> + walk + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each node.</p> +<p>Like container.each(), this method is safe to use +if you are mutating arrays during iteration.</p> +<p>If you only need to iterate through the container’s immediate children, +use <a href="#containereach">Container#each</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walk(<span class="hljs-function"><span class="hljs-params">node</span> =></span> { + <span class="hljs-comment">// Traverses all descendant nodes.</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='containerwalkatrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L303-L324'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerwalkatrules'> + <code> + walkAtRules + <span class='gray'>(name?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each at-rule node.</p> +<p>If you pass a filter, iteration will only happen over at-rules +that have matching names.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>name</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter at-rules by name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkAtRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + <span class="hljs-keyword">if</span> (isOld(rule.name)) rule.remove() +}) + +<span class="hljs-keyword">let</span> first = <span class="hljs-literal">false</span> +root.walkAtRules(<span class="hljs-string">'charset'</span>, rule => { + <span class="hljs-keyword">if</span> (!first) { + first = <span class="hljs-literal">true</span> + } <span class="hljs-keyword">else</span> { + rule.remove() + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='containerwalkcomments'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L342-L348'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerwalkcomments'> + <code> + walkComments + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each comment node.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkComments(<span class="hljs-function"><span class="hljs-params">comment</span> =></span> { + comment.remove() +})</code></pre> + + + + + + + + + + +</section> + + + <section id='containerwalkdecls'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L203-L224'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerwalkdecls'> + <code> + walkDecls + <span class='gray'>(prop?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each declaration node.</p> +<p>If you pass a filter, iteration will only happen over declarations +with matching properties.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter declarations by property name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkDecls(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + checkPropertySupport(decl.prop) +}) + +root.walkDecls(<span class="hljs-string">'border-radius'</span>, decl => { + decl.remove() +}) + +root.walkDecls(<span class="hljs-regexp">/^background/</span>, decl => { + decl.value = takeFirstColorFromGradient(decl.value) +})</code></pre> + + + + + + + + + + +</section> + + + <section id='containerwalkrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L249-L271'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerwalkrules'> + <code> + walkRules + <span class='gray'>(selector?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each rule node.</p> +<p>If you pass a filter, iteration will only happen over rules +with matching selectors.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>selector</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter rules by selector. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> selectors = [] +root.walkRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + selectors.push(rule.selector) +}) +<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Your CSS uses <span class="hljs-subst">${ selectors.length }</span> selectors`</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='containerwarn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L121-L125'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#containerwarn'> + <code> + warn + <span class='gray'>(result, text, opts?)</span> + </code> + </a> + </h3> + + <p>This method is provided as a convenience wrapper for <a href="#resultwarn">Result#warn</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>result</code></td> + <td class='col-3 quiet'> + <a href="#result">Result</a> + + </td> + <td class='col-6'>The +<a href="#result">Result</a> + instance +that will receive the warning. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>text</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Warning message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Options +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this warning. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#warning">Warning</a></code> + : + <span class='force-inline'>Created warning object. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> plugin = postcss.plugin(<span class="hljs-string">'postcss-deprecated'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + root.walkDecls(<span class="hljs-string">'bad'</span>, decl => { + decl.warn(result, <span class="hljs-string">'Deprecated property bad'</span>) + }) + } +})</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='csssyntaxerror'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L33-L243'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerror'> + <code> + CssSyntaxError + <span class='gray'>(message, line?, column?, source?, file?, plugin?)</span> + </code> + </a> + </h3> + + <p>The CSS parser throws this error for broken CSS.</p> +<p>Custom parsers can throw this error for broken custom syntax using +the <a href="#nodeerror">Node#error</a> method.</p> +<p>PostCSS will use the input source map to detect the original error location. +If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, +PostCSS will show the original position in the Sass file.</p> +<p>If you need the position in the PostCSS input +(e.g., to debug the previous compiler), use <code>error.input.file</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>message</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Error message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>line</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>? + + </td> + <td class='col-6'>Source line of the error. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>column</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>? + + </td> + <td class='col-6'>Source column of the error. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>source</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>Source code of the broken file. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>file</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>Absolute path to the broken file. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>plugin</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>PostCSS plugin name, if error came from plugin. +</td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-comment">// Catching and checking syntax error</span> +<span class="hljs-keyword">try</span> { + postcss.parse(<span class="hljs-string">'a{'</span>) +} <span class="hljs-keyword">catch</span> (error) { + <span class="hljs-keyword">if</span> (error.name === <span class="hljs-string">'CssSyntaxError'</span>) { + error <span class="hljs-comment">//=> CssSyntaxError</span> + } +}</code></pre> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-comment">// Raising error from plugin</span> +<span class="hljs-keyword">throw</span> node.error(<span class="hljs-string">'Unknown variable'</span>, { <span class="hljs-attr">plugin</span>: <span class="hljs-string">'postcss-vars'</span> })</code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='csssyntaxerrorname'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L58-L58'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorname'> + <code> + name + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Always equal to <code>'CssSyntaxError'</code>. You should always check error type +by <code>error.name === 'CssSyntaxError'</code> +instead of <code>error instanceof CssSyntaxError</code>, +because npm could have several PostCSS versions.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (error.name === <span class="hljs-string">'CssSyntaxError'</span>) { + error <span class="hljs-comment">//=> CssSyntaxError</span> +}</code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorreason'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L67-L67'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorreason'> + <code> + reason + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Error message.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.message <span class="hljs-comment">//=> 'Unclosed block'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorfile'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L79-L79'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorfile'> + <code> + file + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Absolute path to the broken file.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.file <span class="hljs-comment">//=> 'a.sass'</span> +error.input.file <span class="hljs-comment">//=> 'a.css'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorsource'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L91-L91'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorsource'> + <code> + source + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Source code of the broken file.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.source <span class="hljs-comment">//=> 'a { b {} }'</span> +error.input.column <span class="hljs-comment">//=> 'a b { }'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorplugin'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L102-L102'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorplugin'> + <code> + plugin + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Plugin name, if error came from plugin.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.plugin <span class="hljs-comment">//=> 'postcss-vars'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorline'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L114-L114'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorline'> + <code> + line + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Source line of the error.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.line <span class="hljs-comment">//=> 2</span> +error.input.line <span class="hljs-comment">//=> 4</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorcolumn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L124-L124'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorcolumn'> + <code> + column + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Source column of the error.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.column <span class="hljs-comment">//=> 1</span> +error.input.column <span class="hljs-comment">//=> 4</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrormessage'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L144-L144'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrormessage'> + <code> + message + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Full error text in the GNU error format +with plugin, file, line and column.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.message <span class="hljs-comment">//=> 'a.css:1:1: Unclosed block'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrorshowsourcecode'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L173-L211'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrorshowsourcecode'> + <code> + showSourceCode + <span class='gray'>(color?)</span> + </code> + </a> + </h3> + + <p>Returns a few lines of CSS source that caused the error.</p> +<p>If the CSS has an input source map without <code>sourceContent</code>, +this method will return an empty string.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>color</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>? + + </td> + <td class='col-6'>Whether arrow will be colored red by terminal +color codes. By default, PostCSS will detect +color support by +<code>process.stdout.isTTY</code> + +and +<code>process.env.NODE_DISABLE_COLORS</code> +. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Few lines of CSS source that caused the error. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.showSourceCode() <span class="hljs-comment">//=> " 4 | }</span> + <span class="hljs-comment">// 5 | a {</span> + <span class="hljs-comment">// > 6 | bad</span> + <span class="hljs-comment">// | ^</span> + <span class="hljs-comment">// 7 | }</span> + <span class="hljs-comment">// 8 | b {"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='csssyntaxerrortostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/css-syntax-error.js#L223-L229'> + <span>lib/css-syntax-error.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#csssyntaxerrortostring'> + <code> + toString + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns error position, message and source code of the broken part.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Error position, message and source code. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>error.toString() <span class="hljs-comment">//=> "CssSyntaxError: app.css:1:1: Unclosed block</span> + <span class="hljs-comment">// > 1 | a {</span> + <span class="hljs-comment">// | ^"</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='declaration'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="#node">Node</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/declaration.js#L16-L80'> + <span>lib/declaration.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declaration'> + <code> + Declaration + <span class='gray'>(defaults)</span> + </code> + </a> + </h3> + + <p>Represents a CSS declaration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { color: black }'</span>) +<span class="hljs-keyword">const</span> decl = root.first.first +decl.type <span class="hljs-comment">//=> 'decl'</span> +decl.toString() <span class="hljs-comment">//=> ' color: black'</span></code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='declarationafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L312-L315'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationafter'> + <code> + after + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node after current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertAfter(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.after(<span class="hljs-string">'color: black'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L295-L298'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationbefore'> + <code> + before + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node before current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertBefore(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.before(<span class="hljs-string">'content: ""'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationcleanraws'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L392-L396'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationcleanraws'> + <code> + cleanRaws + <span class='gray'>(keepBetween?)</span> + </code> + </a> + </h3> + + <p>Clear the code style properties for the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>keepBetween</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>? + + </td> + <td class='col-6'>Keep the raws.between symbols. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></code> + : + <span class='force-inline'> +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>node.raws.before <span class="hljs-comment">//=> ' '</span> +node.cleanRaws() +node.raws.before <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='declarationclone'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L182-L188'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationclone'> + <code> + clone + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Returns an exact clone of the node.</p> +<p>The resulting cloned node and its (cloned) children will retain +code style properties.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Clone of the node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.raws.before <span class="hljs-comment">//=> "\n "</span> +<span class="hljs-keyword">const</span> cloned = decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop }) +cloned.raws.before <span class="hljs-comment">//=> "\n "</span> +cloned.toString() <span class="hljs-comment">//=> -moz-transform: scale(0)</span></code></pre> + + + + + + + + + + +</section> + + + <section id='declarationcloneafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L215-L219'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationcloneafter'> + <code> + cloneAfter + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +after the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='declarationclonebefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L201-L205'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationclonebefore'> + <code> + cloneBefore + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +before the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Mew properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop })</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationerror'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L88-L94'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationerror'> + <code> + error + <span class='gray'>(message, opts = {})</span> + </code> + </a> + </h3> + + <p>Returns a <code>CssSyntaxError</code> instance containing the original position +of the node in the source, showing line and column numbers and also +a small excerpt to facilitate debugging.</p> +<p>If present, an input source map will be used to get the original position +of the source, even from a previous compilation step +(e.g., from Sass compilation).</p> +<p>This method produces very useful error messages.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>message</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Error description. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Options. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this error. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#csssyntaxerror">CssSyntaxError</a></code> + : + <span class='force-inline'>Error object to throw it. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (!variables[name]) { + <span class="hljs-keyword">throw</span> decl.error(<span class="hljs-string">'Unknown variable '</span> + name, { <span class="hljs-attr">word</span>: name }) + <span class="hljs-comment">// CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black</span> + <span class="hljs-comment">// color: $black</span> + <span class="hljs-comment">// a</span> + <span class="hljs-comment">// ^</span> + <span class="hljs-comment">// background: white</span> +}</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationnext'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L259-L263'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationnext'> + <code> + next + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the next child of the node’s parent. +Returns <code>undefined</code> if the current node is the last child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Next node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (comment.text === <span class="hljs-string">'delete next'</span>) { + <span class="hljs-keyword">const</span> next = comment.next() + <span class="hljs-keyword">if</span> (next) { + next.remove() + } +}</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationprev'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L277-L281'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationprev'> + <code> + prev + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the previous child of the node’s parent. +Returns <code>undefined</code> if the current node is the first child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Previous node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> annotation = decl.prev() +<span class="hljs-keyword">if</span> (annotation.type === <span class="hljs-string">'comment'</span>) { + readAnnotation(annotation.text) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationraw'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L361-L364'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationraw'> + <code> + raw + <span class='gray'>(prop, defaultType?)</span> + </code> + </a> + </h3> + + <p>Returns a <a href="Node#raws">Node#raws</a> value. If the node is missing +the code style property (because the node was manually built or cloned), +PostCSS will try to autodetect the code style property by looking +at other nodes in the tree.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Name of code style property. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>defaultType</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>Name of default value, it can be missed +if the value is the same as prop. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Code style value. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { background: white }'</span>) +root.nodes[<span class="hljs-number">0</span>].append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raws.before <span class="hljs-comment">//=> undefined</span> +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raw(<span class="hljs-string">'before'</span>) <span class="hljs-comment">//=> ' '</span></code></pre> + + + + + + + + + + +</section> + + + <section id='declarationremove'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L138-L144'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationremove'> + <code> + remove + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes the node from its parent and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Node to make calls chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (decl.prop.match(<span class="hljs-regexp">/^-webkit-/</span>)) { + decl.remove() +}</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationreplacewith'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L233-L243'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationreplacewith'> + <code> + replaceWith + <span class='gray'>(nodes)</span> + </code> + </a> + </h3> + + <p>Inserts node(s) before the current node and removes the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>nodes</code></td> + <td class='col-3 quiet'> + ...<a href="#node">Node</a> + + </td> + <td class='col-6'>Mode(s) to replace current one. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Current node to methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (atrule.name === <span class="hljs-string">'mixin'</span>) { + atrule.replaceWith(mixinRules[atrule.params]) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationroot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L374-L378'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationroot'> + <code> + root + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Finds the Root instance of the node’s tree.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>Root parent. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">0</span>].root() === root</code></pre> + + + + + + + + + + +</section> + + + <section id='declarationtostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L157-L164'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationtostring'> + <code> + toString + <span class='gray'>(stringifier = stringify)</span> + </code> + </a> + </h3> + + <p>Returns a CSS string representing the node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>stringifier</code></td> + <td class='col-3 quiet'> + (<a href="#stringifier">stringifier</a> | <a href="#syntax">syntax</a>)? + + = <code>stringify</code> + </td> + <td class='col-6'>A syntax to use +in string generation. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>CSS string of this node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.rule({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }).toString() <span class="hljs-comment">//=> "a {}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='declarationwarn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L121-L125'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#declarationwarn'> + <code> + warn + <span class='gray'>(result, text, opts?)</span> + </code> + </a> + </h3> + + <p>This method is provided as a convenience wrapper for <a href="#resultwarn">Result#warn</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>result</code></td> + <td class='col-3 quiet'> + <a href="#result">Result</a> + + </td> + <td class='col-6'>The +<a href="#result">Result</a> + instance +that will receive the warning. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>text</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Warning message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Options +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this warning. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#warning">Warning</a></code> + : + <span class='force-inline'>Created warning object. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> plugin = postcss.plugin(<span class="hljs-string">'postcss-deprecated'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + root.walkDecls(<span class="hljs-string">'bad'</span>, decl => { + decl.warn(result, <span class="hljs-string">'Deprecated property bad'</span>) + }) + } +})</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='input'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L15-L169'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#input'> + <code> + Input + <span class='gray'>(css, opts = {})</span> + </code> + </a> + </h3> + + <p>Represents the source CSS.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>css</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Input CSS source. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'><a href="#processorprocess">Processor#process</a> + options. +</td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(css, { <span class="hljs-attr">from</span>: file }) +<span class="hljs-keyword">const</span> input = root.source.input</code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='inputcss'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L34-L34'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#inputcss'> + <code> + css + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Input CSS source</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> input = postcss.parse(<span class="hljs-string">'a{}'</span>, { <span class="hljs-attr">from</span>: file }).input +input.css <span class="hljs-comment">//=> "a{}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='inputfile'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L55-L55'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#inputfile'> + <code> + file + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The absolute path to the CSS source file defined +with the <code>from</code> option.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(css, { <span class="hljs-attr">from</span>: <span class="hljs-string">'a.css'</span> }) +root.source.input.file <span class="hljs-comment">//=> '/home/ai/a.css'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='inputmap'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L72-L72'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#inputmap'> + <code> + map + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The input source map passed from a compilation step before PostCSS +(for example, from Sass compiler).</p> + + + <p> + Type: + <a href="#previousmap">PreviousMap</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.source.input.map.consumer().sources <span class="hljs-comment">//=> ['a.sass']</span></code></pre> + + + + + + + + + + +</section> + + + <section id='inputid'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L90-L90'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#inputid'> + <code> + id + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The unique ID of the CSS source. It will be created if <code>from</code> option +is not provided (because PostCSS does not know the file path).</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(css) +root.source.input.file <span class="hljs-comment">//=> undefined</span> +root.source.input.id <span class="hljs-comment">//=> "<input css 1>"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='inputorigin'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L127-L144'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#inputorigin'> + <code> + origin + <span class='gray'>(line, column)</span> + </code> + </a> + </h3> + + <p>Reads the input source map and returns a symbol position +in the input source (e.g., in a Sass file that was compiled +to CSS before being passed to PostCSS).</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>line</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-6'>Line in input CSS. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>column</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-6'>Column in input CSS. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#fileposition">filePosition</a></code> + : + <span class='force-inline'>Position in input source. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.source.input.origin(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>) <span class="hljs-comment">//=> { file: 'a.css', line: 3, column: 1 }</span></code></pre> + + + + + + + + + + +</section> + + + <section id='inputfrom'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L166-L168'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#inputfrom'> + <code> + from + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The CSS source identifier. Contains <a href="#inputfile">Input#file</a> if the user +set the <code>from</code> option, or <a href="#inputid">Input#id</a> if they did not.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(css, { <span class="hljs-attr">from</span>: <span class="hljs-string">'a.css'</span> }) +root.source.input.from <span class="hljs-comment">//=> "/home/ai/a.css"</span> + +<span class="hljs-keyword">const</span> root = postcss.parse(css) +root.source.input.from <span class="hljs-comment">//=> "<input css 1>"</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='lazyresult'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L26-L417'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresult'> + <code> + LazyResult + <span class='gray'>(processor, css, opts)</span> + </code> + </a> + </h3> + + <p>A Promise proxy for the result of PostCSS transformations.</p> +<p>A <code>LazyResult</code> instance is returned by <a href="#processorprocess">Processor#process</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>processor</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + <tr> + <td class='col-3 strong'><code>css</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> lazy = postcss([autoprefixer]).process(css)</code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='lazyresultprocessor'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L63-L65'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultprocessor'> + <code> + processor + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns a <a href="#processor">Processor</a> instance, which will be used +for CSS transformations.</p> + + + <p> + Type: + <a href="#processor">Processor</a> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultopts'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L72-L74'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultopts'> + <code> + opts + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Options from the <a href="#processorprocess">Processor#process</a> call.</p> + + + <p> + Type: + <a href="#processoptions">processOptions</a> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultcss'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L88-L90'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultcss'> + <code> + css + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous plugins, converts <code>Root</code> +to a CSS string and returns <a href="#resultcss">Result#css</a>.</p> +<p>This property will only work with synchronous plugins. +If the processor contains any asynchronous plugins +it will throw an error. This is why this method is only +for debug purpose, you should always use <a href="#lazyresultthen">LazyResult#then</a>.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultcontent'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L104-L106'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultcontent'> + <code> + content + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>An alias for the <code>css</code> property. Use it with syntaxes +that generate non-CSS output.</p> +<p>This property will only work with synchronous plugins. +If the processor contains any asynchronous plugins +it will throw an error. This is why this method is only +for debug purpose, you should always use <a href="#lazyresultthen">LazyResult#then</a>.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultmap'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L120-L122'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultmap'> + <code> + map + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous plugins +and returns <a href="#resultmap">Result#map</a>.</p> +<p>This property will only work with synchronous plugins. +If the processor contains any asynchronous plugins +it will throw an error. This is why this method is only +for debug purpose, you should always use <a href="#lazyresultthen">LazyResult#then</a>.</p> + + + <p> + Type: + SourceMapGenerator + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultroot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L137-L139'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultroot'> + <code> + root + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous plugins +and returns <a href="#resultroot">Result#root</a>.</p> +<p>This property will only work with synchronous plugins. If the processor +contains any asynchronous plugins it will throw an error.</p> +<p>This is why this method is only for debug purpose, +you should always use <a href="#lazyresultthen">LazyResult#then</a>.</p> + + + <p> + Type: + <a href="#root">Root</a> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultmessages'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L154-L156'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultmessages'> + <code> + messages + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous plugins +and returns <a href="#resultmessages">Result#messages</a>.</p> +<p>This property will only work with synchronous plugins. If the processor +contains any asynchronous plugins it will throw an error.</p> +<p>This is why this method is only for debug purpose, +you should always use <a href="#lazyresultthen">LazyResult#then</a>.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#message">Message</a>> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresultwarnings'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L164-L166'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultwarnings'> + <code> + warnings + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous plugins +and calls <a href="Result#warnings()">Result#warnings()</a>.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#warning">Warning</a>></code> + : + <span class='force-inline'>Warnings from plugins. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='lazyresulttostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L176-L178'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresulttostring'> + <code> + toString + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Alias for the <a href="#lazyresultcss">LazyResult#css</a> property.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Output CSS. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>lazy + <span class="hljs-string">''</span> === lazy.css</code></pre> + + + + + + + + + + +</section> + + + <section id='lazyresultthen'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L198-L209'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultthen'> + <code> + then + <span class='gray'>(onFulfilled, onRejected)</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous and asynchronous plugins +and calls <code>onFulfilled</code> with a Result instance. If a plugin throws +an error, the <code>onRejected</code> callback will be executed.</p> +<p>It implements standard Promise API.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>onFulfilled</code></td> + <td class='col-3 quiet'> + <a href="#onfulfilled">onFulfilled</a> + + </td> + <td class='col-6'>Callback will be executed +when all plugins will finish work. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>onRejected</code></td> + <td class='col-3 quiet'> + <a href="#onrejected">onRejected</a> + + </td> + <td class='col-6'>Callback will be executed on any error. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code> + : + <span class='force-inline'>Promise API to make queue. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss([autoprefixer]).process(css, { <span class="hljs-attr">from</span>: cssPath }).then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> { + <span class="hljs-built_in">console</span>.log(result.css) +})</code></pre> + + + + + + + + + + +</section> + + + <section id='lazyresultcatch'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L228-L230'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultcatch'> + <code> + catch + <span class='gray'>(onRejected)</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous and asynchronous plugins +and calls onRejected for each error thrown in any plugin.</p> +<p>It implements standard Promise API.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>onRejected</code></td> + <td class='col-3 quiet'> + <a href="#onrejected">onRejected</a> + + </td> + <td class='col-6'>Callback will be executed on any error. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code> + : + <span class='force-inline'>Promise API to make queue. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss([autoprefixer]).process(css).then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> { + <span class="hljs-built_in">console</span>.log(result.css) +}).catch(<span class="hljs-function"><span class="hljs-params">error</span> =></span> { + <span class="hljs-built_in">console</span>.error(error) +})</code></pre> + + + + + + + + + + +</section> + + + <section id='lazyresultfinally'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L248-L250'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#lazyresultfinally'> + <code> + finally + <span class='gray'>(onFinally)</span> + </code> + </a> + </h3> + + <p>Processes input CSS through synchronous and asynchronous plugins +and calls onFinally on any error or when all plugins will finish work.</p> +<p>It implements standard Promise API.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>onFinally</code></td> + <td class='col-3 quiet'> + onFinally + + </td> + <td class='col-6'>Callback will be executed on any error or +when all plugins will finish work. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code> + : + <span class='force-inline'>Promise API to make queue. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss([autoprefixer]).process(css).finally(<span class="hljs-function"><span class="hljs-params">()</span> =></span> { + <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'processing ended'</span>) +})</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='node'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L34-L514'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#node'> + <code> + Node + <span class='gray'>(defaults = {})</span> + </code> + </a> + </h3> + + <p>All node classes inherit the following common methods.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Value for node properties. +</td> + </tr> + + + </table> + + + + + + + + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='nodeerror'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L88-L94'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodeerror'> + <code> + error + <span class='gray'>(message, opts = {})</span> + </code> + </a> + </h3> + + <p>Returns a <code>CssSyntaxError</code> instance containing the original position +of the node in the source, showing line and column numbers and also +a small excerpt to facilitate debugging.</p> +<p>If present, an input source map will be used to get the original position +of the source, even from a previous compilation step +(e.g., from Sass compilation).</p> +<p>This method produces very useful error messages.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>message</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Error description. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Options. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this error. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the error. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#csssyntaxerror">CssSyntaxError</a></code> + : + <span class='force-inline'>Error object to throw it. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (!variables[name]) { + <span class="hljs-keyword">throw</span> decl.error(<span class="hljs-string">'Unknown variable '</span> + name, { <span class="hljs-attr">word</span>: name }) + <span class="hljs-comment">// CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black</span> + <span class="hljs-comment">// color: $black</span> + <span class="hljs-comment">// a</span> + <span class="hljs-comment">// ^</span> + <span class="hljs-comment">// background: white</span> +}</code></pre> + + + + + + + + + + +</section> + + + <section id='nodewarn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L121-L125'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodewarn'> + <code> + warn + <span class='gray'>(result, text, opts?)</span> + </code> + </a> + </h3> + + <p>This method is provided as a convenience wrapper for <a href="#resultwarn">Result#warn</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>result</code></td> + <td class='col-3 quiet'> + <a href="#result">Result</a> + + </td> + <td class='col-6'>The +<a href="#result">Result</a> + instance +that will receive the warning. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>text</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Warning message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Options +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Plugin name that created this warning. +PostCSS will set it automatically. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>A word inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>An index inside a node’s string that should +be highlighted as the source of the warning. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#warning">Warning</a></code> + : + <span class='force-inline'>Created warning object. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> plugin = postcss.plugin(<span class="hljs-string">'postcss-deprecated'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + root.walkDecls(<span class="hljs-string">'bad'</span>, decl => { + decl.warn(result, <span class="hljs-string">'Deprecated property bad'</span>) + }) + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='noderemove'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L138-L144'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#noderemove'> + <code> + remove + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes the node from its parent and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Node to make calls chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (decl.prop.match(<span class="hljs-regexp">/^-webkit-/</span>)) { + decl.remove() +}</code></pre> + + + + + + + + + + +</section> + + + <section id='nodetostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L157-L164'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodetostring'> + <code> + toString + <span class='gray'>(stringifier = stringify)</span> + </code> + </a> + </h3> + + <p>Returns a CSS string representing the node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>stringifier</code></td> + <td class='col-3 quiet'> + (<a href="#stringifier">stringifier</a> | <a href="#syntax">syntax</a>)? + + = <code>stringify</code> + </td> + <td class='col-6'>A syntax to use +in string generation. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>CSS string of this node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.rule({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }).toString() <span class="hljs-comment">//=> "a {}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='nodeclone'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L182-L188'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodeclone'> + <code> + clone + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Returns an exact clone of the node.</p> +<p>The resulting cloned node and its (cloned) children will retain +code style properties.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Clone of the node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.raws.before <span class="hljs-comment">//=> "\n "</span> +<span class="hljs-keyword">const</span> cloned = decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop }) +cloned.raws.before <span class="hljs-comment">//=> "\n "</span> +cloned.toString() <span class="hljs-comment">//=> -moz-transform: scale(0)</span></code></pre> + + + + + + + + + + +</section> + + + <section id='nodeclonebefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L201-L205'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodeclonebefore'> + <code> + cloneBefore + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +before the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Mew properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-moz-'</span> + decl.prop })</code></pre> + + + + + + + + + + +</section> + + + <section id='nodecloneafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L215-L219'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodecloneafter'> + <code> + cloneAfter + <span class='gray'>(overrides = {})</span> + </code> + </a> + </h3> + + <p>Shortcut to clone the node and insert the resulting cloned node +after the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>overrides</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>New properties to override in the clone. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>New node. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='nodereplacewith'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L233-L243'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodereplacewith'> + <code> + replaceWith + <span class='gray'>(nodes)</span> + </code> + </a> + </h3> + + <p>Inserts node(s) before the current node and removes the current node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>nodes</code></td> + <td class='col-3 quiet'> + ...<a href="#node">Node</a> + + </td> + <td class='col-6'>Mode(s) to replace current one. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>Current node to methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (atrule.name === <span class="hljs-string">'mixin'</span>) { + atrule.replaceWith(mixinRules[atrule.params]) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='nodenext'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L259-L263'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodenext'> + <code> + next + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the next child of the node’s parent. +Returns <code>undefined</code> if the current node is the last child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Next node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (comment.text === <span class="hljs-string">'delete next'</span>) { + <span class="hljs-keyword">const</span> next = comment.next() + <span class="hljs-keyword">if</span> (next) { + next.remove() + } +}</code></pre> + + + + + + + + + + +</section> + + + <section id='nodeprev'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L277-L281'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodeprev'> + <code> + prev + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns the previous child of the node’s parent. +Returns <code>undefined</code> if the current node is the first child.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Previous node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> annotation = decl.prev() +<span class="hljs-keyword">if</span> (annotation.type === <span class="hljs-string">'comment'</span>) { + readAnnotation(annotation.text) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='nodebefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L295-L298'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodebefore'> + <code> + before + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node before current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertBefore(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.before(<span class="hljs-string">'content: ""'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='nodeafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L312-L315'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodeafter'> + <code> + after + <span class='gray'>(add)</span> + </code> + </a> + </h3> + + <p>Insert new node after current node to current node’s parent.</p> +<p>Just alias for <code>node.parent.insertAfter(node, add)</code>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>decl.after(<span class="hljs-string">'color: black'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='noderaw'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L361-L364'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#noderaw'> + <code> + raw + <span class='gray'>(prop, defaultType?)</span> + </code> + </a> + </h3> + + <p>Returns a <a href="Node#raws">Node#raws</a> value. If the node is missing +the code style property (because the node was manually built or cloned), +PostCSS will try to autodetect the code style property by looking +at other nodes in the tree.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Name of code style property. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>defaultType</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>Name of default value, it can be missed +if the value is the same as prop. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Code style value. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { background: white }'</span>) +root.nodes[<span class="hljs-number">0</span>].append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raws.before <span class="hljs-comment">//=> undefined</span> +root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">1</span>].raw(<span class="hljs-string">'before'</span>) <span class="hljs-comment">//=> ' '</span></code></pre> + + + + + + + + + + +</section> + + + <section id='noderoot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L374-L378'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#noderoot'> + <code> + root + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Finds the Root instance of the node’s tree.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>Root parent. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.nodes[<span class="hljs-number">0</span>].nodes[<span class="hljs-number">0</span>].root() === root</code></pre> + + + + + + + + + + +</section> + + + <section id='nodecleanraws'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L392-L396'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#nodecleanraws'> + <code> + cleanRaws + <span class='gray'>(keepBetween?)</span> + </code> + </a> + </h3> + + <p>Clear the code style properties for the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>keepBetween</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>? + + </td> + <td class='col-6'>Keep the raws.between symbols. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></code> + : + <span class='force-inline'> +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>node.raws.before <span class="hljs-comment">//=> ' '</span> +node.cleanRaws() +node.raws.before <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='previousmap'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/previous-map.js#L24-L140'> + <span>lib/previous-map.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#previousmap'> + <code> + PreviousMap + <span class='gray'>(css, opts?)</span> + </code> + </a> + </h3> + + <p>Source map information from input CSS. +For example, source map after Sass compiler.</p> +<p>This class will automatically find source map in input CSS or in file system +near input file (according <code>from</code> option).</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>css</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Input CSS source. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="#processoptions">processOptions</a>? + + </td> + <td class='col-6'><a href="#processorprocess">Processor#process</a> + options. +</td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(css, { <span class="hljs-attr">from</span>: <span class="hljs-string">'a.sass.css'</span> }) +root.input.map <span class="hljs-comment">//=> PreviousMap</span></code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='previousmapinline'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/previous-map.js#L36-L36'> + <span>lib/previous-map.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#previousmapinline'> + <code> + inline + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Was source map inlined by data-uri to input CSS.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a> + </p> + + + + + + + + + + + + + + + + + + + + + + + + + + +</section> + + + <section id='previousmapconsumer'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/previous-map.js#L52-L57'> + <span>lib/previous-map.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#previousmapconsumer'> + <code> + consumer + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Create a instance of <code>SourceMapGenerator</code> class +from the <code>source-map</code> library to work with source map information.</p> +<p>It is lazy method, so it will create object only on first call +and then it will use cache.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>SourceMapGenerator</code> + : + <span class='force-inline'>Object with source map information. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='previousmapwithcontent'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/previous-map.js#L64-L67'> + <span>lib/previous-map.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#previousmapwithcontent'> + <code> + withContent + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Does source map contains <code>sourcesContent</code> with input source text.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is +<code>sourcesContent</code> + present. +</span> + + + + + + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='processor'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L12-L135'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#processor'> + <code> + Processor + <span class='gray'>(plugins)</span> + </code> + </a> + </h3> + + <p>Contains plugins to process CSS. Create one <code>Processor</code> instance, +initialize its plugins, and then use that instance on numerous CSS files.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>plugins</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><(<a href="#plugin">Plugin</a> | <a href="#pluginfunction">pluginFunction</a>)> | <a href="#processor">Processor</a>) + + = <code>[]</code> + </td> + <td class='col-6'>PostCSS plugins. +See +<a href="#processoruse">Processor#use</a> + for plugin format. +</td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> processor = postcss([autoprefixer, precss]) +processor.process(css1).then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> <span class="hljs-built_in">console</span>.log(result.css)) +processor.process(css2).then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> <span class="hljs-built_in">console</span>.log(result.css))</code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='processorversion'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L28-L28'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#processorversion'> + <code> + version + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Current PostCSS version.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (result.processor.version.split(<span class="hljs-string">'.'</span>)[<span class="hljs-number">0</span>] !== <span class="hljs-string">'6'</span>) { + <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'This plugin works only with PostCSS 6'</span>) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='processorplugins'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L38-L38'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#processorplugins'> + <code> + plugins + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Plugins added to this processor.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#pluginfunction">pluginFunction</a>> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> processor = postcss([autoprefixer, precss]) +processor.plugins.length <span class="hljs-comment">//=> 2</span></code></pre> + + + + + + + + + + +</section> + + + <section id='processoruse'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L70-L73'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#processoruse'> + <code> + use + <span class='gray'>(plugin)</span> + </code> + </a> + </h3> + + <p>Adds a plugin to be used as a CSS processor.</p> +<p>PostCSS plugin can be in 4 formats:</p> +<ul> +<li>A plugin created by <a href="#postcssplugin">postcss.plugin</a> method.</li> +<li>A function. PostCSS will pass the function a @{link Root} +as the first argument and current <a href="#result">Result</a> instance +as the second.</li> +<li>An object with a <code>postcss</code> method. PostCSS will use that method +as described in #2.</li> +<li>Another <a href="#processor">Processor</a> instance. PostCSS will copy plugins +from that instance into this one.</li> +</ul> +<p>Plugins can also be added by passing them as arguments when creating +a <code>postcss</code> instance (see [<code>postcss(plugins)</code>]).</p> +<p>Asynchronous plugins should return a <code>Promise</code> instance.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>plugin</code></td> + <td class='col-3 quiet'> + (<a href="#plugin">Plugin</a> | <a href="#pluginfunction">pluginFunction</a> | <a href="#processor">Processor</a>) + + </td> + <td class='col-6'>PostCSS plugin +or +<a href="#processor">Processor</a> + +with plugins. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>Processes</code> + : + <span class='force-inline'>Current processor to make methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> processor = postcss() + .use(autoprefixer) + .use(precss)</code></pre> + + + + + + + + + + +</section> + + + <section id='processorprocess'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L97-L110'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#processorprocess'> + <code> + process + <span class='gray'>(css, opts = {})</span> + </code> + </a> + </h3> + + <p>Parses source CSS and returns a <a href="#lazyresult">LazyResult</a> Promise proxy. +Because some plugins can be asynchronous it doesn’t make +any transformations. Transformations will be applied +in the <a href="#lazyresult">LazyResult</a> methods.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>css</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="#tostring">toString</a> | <a href="#result">Result</a>) + + </td> + <td class='col-6'>String with input CSS or any object +with a +<code>toString()</code> + method, +like a Buffer. Optionally, send +a +<a href="#result">Result</a> + instance +and the processor will take +the +<a href="#root">Root</a> + from it. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="#processoptions">processOptions</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Options. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#lazyresult">LazyResult</a></code> + : + <span class='force-inline'>Promise proxy. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>processor.process(css, { <span class="hljs-attr">from</span>: <span class="hljs-string">'a.css'</span>, <span class="hljs-attr">to</span>: <span class="hljs-string">'a.out.css'</span> }) + .then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> { + <span class="hljs-built_in">console</span>.log(result.css) + })</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='result'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L17-L170'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#result'> + <code> + Result + <span class='gray'>(processor, root, opts)</span> + </code> + </a> + </h3> + + <p>Provides the result of the PostCSS transformations.</p> +<p>A Result instance is returned by <a href="#lazyresultthen">LazyResult#then</a> +or <a href="#roottoresult">Root#toResult</a> methods.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>processor</code></td> + <td class='col-3 quiet'> + <a href="#processor">Processor</a> + + </td> + <td class='col-6'>Processor used for this transformation. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>root</code></td> + <td class='col-3 quiet'> + <a href="#root">Root</a> + + </td> + <td class='col-6'>Root node after all transformations. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="#processoptions">processOptions</a> + + </td> + <td class='col-6'>Options from the +<a href="#processorprocess">Processor#process</a> + +or +<a href="#roottoresult">Root#toResult</a> +. +</td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss([autoprefixer]).process(css).then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> { + <span class="hljs-built_in">console</span>.log(result.css) +})</code></pre> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> result2 = postcss.parse(css).toResult()</code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='resultprocessor'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L37-L37'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultprocessor'> + <code> + processor + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The Processor instance used for this transformation.</p> + + + <p> + Type: + <a href="#processor">Processor</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> plugin <span class="hljs-keyword">of</span> result.processor.plugins) { + <span class="hljs-keyword">if</span> (plugin.postcssPlugin === <span class="hljs-string">'postcss-bad'</span>) { + <span class="hljs-keyword">throw</span> <span class="hljs-string">'postcss-good is incompatible with postcss-bad'</span> + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='resultmessages'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L56-L56'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultmessages'> + <code> + messages + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Contains messages from plugins (e.g., warnings or custom messages). +Each message should have type and plugin properties.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#message">Message</a>> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.plugin(<span class="hljs-string">'postcss-min-browser'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + <span class="hljs-keyword">const</span> browsers = detectMinBrowsersByCanIUse(root) + result.messages.push({ + <span class="hljs-attr">type</span>: <span class="hljs-string">'min-browser'</span>, + <span class="hljs-attr">plugin</span>: <span class="hljs-string">'postcss-min-browser'</span>, + browsers + }) + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='resultroot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L65-L65'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultroot'> + <code> + root + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Root node after all transformations.</p> + + + <p> + Type: + <a href="#root">Root</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.toResult().root === root</code></pre> + + + + + + + + + + +</section> + + + <section id='resultopts'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L75-L75'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultopts'> + <code> + opts + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Options from the <a href="#processorprocess">Processor#process</a> or <a href="#roottoresult">Root#toResult</a> call +that produced this Result instance.</p> + + + <p> + Type: + <a href="#processoptions">processOptions</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.toResult(opts).opts === opts</code></pre> + + + + + + + + + + +</section> + + + <section id='resultcss'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L84-L84'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultcss'> + <code> + css + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>A CSS string representing of <a href="#resultroot">Result#root</a>.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.parse(<span class="hljs-string">'a{}'</span>).toResult().css <span class="hljs-comment">//=> "a{}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='resultmap'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L99-L99'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultmap'> + <code> + map + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>An instance of <code>SourceMapGenerator</code> class from the <code>source-map</code> library, +representing changes to the <a href="#resultroot">Result#root</a> instance.</p> + + + <p> + Type: + SourceMapGenerator + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>result.map.toJSON() <span class="hljs-comment">//=> { version: 3, file: 'a.css', … }</span></code></pre> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (result.map) { + fs.writeFileSync(result.opts.to + <span class="hljs-string">'.map'</span>, result.map.toString()) +}</code></pre> + + + + + + + + + + +</section> + + + <section id='resulttostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L110-L112'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resulttostring'> + <code> + toString + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns for @{link Result#css} content.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>String representing of +<a href="#resultroot">Result#root</a> +. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>result + <span class="hljs-string">''</span> === result.css</code></pre> + + + + + + + + + + +</section> + + + <section id='resultwarn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L130-L141'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultwarn'> + <code> + warn + <span class='gray'>(text, opts = {})</span> + </code> + </a> + </h3> + + <p>Creates an instance of <a href="#warning">Warning</a> and adds it +to <a href="#resultmessages">Result#messages</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>text</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Warning message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Warning options. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.node</td> + <td class="col-2 quiet"> + <a href="#node">Node</a> + + </td> + <td class='col-8'>CSS node that caused the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.word</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Word in CSS source that caused the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.index</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>Index in CSS node string that caused +the warning. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.plugin</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>Name of the plugin that created +this warning. +<a href="#resultwarn">Result#warn</a> + fills +this property automatically. +</td> +</tr> + + + + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#warning">Warning</a></code> + : + <span class='force-inline'>Created warning. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='resultwarnings'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L154-L156'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultwarnings'> + <code> + warnings + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns warnings from plugins. Filters <a href="#warning">Warning</a> instances +from <a href="#resultmessages">Result#messages</a>.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#warning">Warning</a>></code> + : + <span class='force-inline'>Warnings from plugins. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>result.warnings().forEach(<span class="hljs-function"><span class="hljs-params">warn</span> =></span> { + <span class="hljs-built_in">console</span>.warn(warn.toString()) +})</code></pre> + + + + + + + + + + +</section> + + + <section id='resultcontent'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L167-L169'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#resultcontent'> + <code> + content + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>An alias for the <a href="#resultcss">Result#css</a> property. +Use it with syntaxes that generate non-CSS output.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>result.css === result.content</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='root'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="#container">Container</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/root.js#L76-L181'> + <span>lib/root.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#root'> + <code> + Root + <span class='gray'>(defaults)</span> + </code> + </a> + </h3> + + <p>Represents a CSS file and contains all its parsed nodes.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a{color:black} b{z-index:2}'</span>) +root.type <span class="hljs-comment">//=> 'root'</span> +root.nodes.length <span class="hljs-comment">//=> 2</span></code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='rootappend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L370-L379'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootappend'> + <code> + append + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the end of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.append(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='rooteach'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L76-L102'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rooteach'> + <code> + each + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Iterates through the container’s immediate children, +calling <code>callback</code> for each child.</p> +<p>Returning <code>false</code> in the callback will break iteration.</p> +<p>This method only iterates through the container’s immediate children. +If you need to recursively iterate through all the container’s descendant +nodes, use <a href="#containerwalk">Container#walk</a>.</p> +<p>Unlike the for <code>{}</code>-cycle or <code>Array#forEach</code> this iterator is safe +if you are mutating the array of child nodes during iteration. +PostCSS will adjust the current index to match the mutations.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { color: black; z-index: 1 }'</span>) +<span class="hljs-keyword">const</span> rule = root.first + +<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> decl <span class="hljs-keyword">of</span> rule.nodes) { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Cycle will be infinite, because cloneBefore moves the current node</span> + <span class="hljs-comment">// to the next index</span> +} + +rule.each(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Will be executed only for color and z-index</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rootevery'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L587-L589'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootevery'> + <code> + every + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> +for all of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is every child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> noPrefixes = rule.every(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] !== <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='rootfirst'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L631-L634'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootfirst'> + <code> + first + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s first child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.first === rules.nodes[<span class="hljs-number">0</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='rootindex'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L616-L621'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootindex'> + <code> + index + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Returns a <code>child</code>’s index within the <a href="Container#nodes">Container#nodes</a> array.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Child of the current container. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> + : + <span class='force-inline'>Child index. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.index( rule.nodes[<span class="hljs-number">2</span>] ) <span class="hljs-comment">//=> 2</span></code></pre> + + + + + + + + + + +</section> + + + <section id='rootinsertafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L462-L479'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootinsertafter'> + <code> + insertAfter + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node after old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='rootinsertbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L434-L452'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootinsertbefore'> + <code> + insertBefore + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node before old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.insertBefore(decl, decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }))</code></pre> + + + + + + + + + + +</section> + + + <section id='rootlast'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L644-L647'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootlast'> + <code> + last + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s last child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.last === rule.nodes[rule.nodes.length - <span class="hljs-number">1</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='rootprepend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L401-L414'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootprepend'> + <code> + prepend + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the start of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.prepend(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='rootremoveall'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L523-L530'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootremoveall'> + <code> + removeAll + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes all children from the container +and cleans their parent properties.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.removeAll() +rule.nodes.length <span class="hljs-comment">//=> 0</span></code></pre> + + + + + + + + + + +</section> + + + <section id='rootremovechild'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L495-L511'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootremovechild'> + <code> + removeChild + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Removes node from the container and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.nodes.length <span class="hljs-comment">//=> 5</span> +rule.removeChild(decl) +rule.nodes.length <span class="hljs-comment">//=> 4</span> +decl.parent <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='rootreplacevalues'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L558-L574'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootreplacevalues'> + <code> + replaceValues + <span class='gray'>(pattern, opts, callback)</span> + </code> + </a> + </h3> + + <p>Passes all declaration values within the container that match pattern +through callback, replacing those values with the returned result +of callback.</p> +<p>This method is useful if you are using a custom unit or function +and need to iterate through all values.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>pattern</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>) + + </td> + <td class='col-6'>Replace pattern. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + + </td> + <td class='col-6'>Options to speed up the search. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.props</td> + <td class="col-2 quiet"> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>>) + + </td> + <td class='col-8'>An array of property names. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.fast</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>String that’s used to narrow down +values and speed up the regexp search. +</td> +</tr> + + + + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>) + + </td> + <td class='col-6'>String to replace pattern or callback +that returns a new value. The callback +will receive the same arguments +as those passed to a function parameter +of +<code>String#replace</code> +. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.replaceValues(<span class="hljs-regexp">/\d+rem/</span>, { <span class="hljs-attr">fast</span>: <span class="hljs-string">'rem'</span> }, string => { + <span class="hljs-keyword">return</span> <span class="hljs-number">15</span> * <span class="hljs-built_in">parseInt</span>(string) + <span class="hljs-string">'px'</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rootwalk'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L123-L137'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootwalk'> + <code> + walk + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each node.</p> +<p>Like container.each(), this method is safe to use +if you are mutating arrays during iteration.</p> +<p>If you only need to iterate through the container’s immediate children, +use <a href="#containereach">Container#each</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walk(<span class="hljs-function"><span class="hljs-params">node</span> =></span> { + <span class="hljs-comment">// Traverses all descendant nodes.</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rootwalkatrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L303-L324'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootwalkatrules'> + <code> + walkAtRules + <span class='gray'>(name?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each at-rule node.</p> +<p>If you pass a filter, iteration will only happen over at-rules +that have matching names.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>name</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter at-rules by name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkAtRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + <span class="hljs-keyword">if</span> (isOld(rule.name)) rule.remove() +}) + +<span class="hljs-keyword">let</span> first = <span class="hljs-literal">false</span> +root.walkAtRules(<span class="hljs-string">'charset'</span>, rule => { + <span class="hljs-keyword">if</span> (!first) { + first = <span class="hljs-literal">true</span> + } <span class="hljs-keyword">else</span> { + rule.remove() + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rootwalkcomments'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L342-L348'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootwalkcomments'> + <code> + walkComments + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each comment node.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkComments(<span class="hljs-function"><span class="hljs-params">comment</span> =></span> { + comment.remove() +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rootwalkrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L249-L271'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootwalkrules'> + <code> + walkRules + <span class='gray'>(selector?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each rule node.</p> +<p>If you pass a filter, iteration will only happen over rules +with matching selectors.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>selector</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter rules by selector. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> selectors = [] +root.walkRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + selectors.push(rule.selector) +}) +<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Your CSS uses <span class="hljs-subst">${ selectors.length }</span> selectors`</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='rooton'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/root.js#L160-L164'> + <span>lib/root.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rooton'> + <code> + on + <span class='gray'>(type?, callback?)</span> + </code> + </a> + </h3> + + <p>The method registrations the plugins in postcss to their bypass with +algorithm visitor. The plugin must subscribes to the type of the node. +It can be "atrule", "rule", "decl", "comment". Example: "atrule" is +"@media", "@keyframes"; "rule" is selector (class, id, tag); "decl" is +property (color, border, etc.); "comment" is comment. The plugin will +call on the type of the node to which it is subscribed. The plugin can +be subscribed at the enter to node or at the exit from node. The plugin get +node and index.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>type</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>? + + </td> + <td class='col-6'>The type of the node ("atrule", "rule", +"decl", "comment"). +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a>? + + </td> + <td class='col-6'>Function receives node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a></code> + : + <span class='force-inline'> +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>css.on(<span class="hljs-string">"decl"</span>, (node, index) => {}) +<span class="hljs-comment">// is shorthand for</span> +css.on(<span class="hljs-string">"decl.enter"</span>, (node, index) => {}) + +css.on(<span class="hljs-string">"decl.exit"</span>, (node, index) => {})</code></pre> + + + + + + + + + + +</section> + + + <section id='rootsome'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L602-L604'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootsome'> + <code> + some + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> for (at least) one +of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is some child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> hasPrefix = rule.some(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] === <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='roottoresult'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/root.js#L129-L135'> + <span>lib/root.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#roottoresult'> + <code> + toResult + <span class='gray'>(opts = {})</span> + </code> + </a> + </h3> + + <p>Returns a <a href="#result">Result</a> instance representing the root’s CSS.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="#processoptions">processOptions</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Options with only +<code>to</code> + and +<code>map</code> + keys. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#result">Result</a></code> + : + <span class='force-inline'>Result with current root’s CSS. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root1 = postcss.parse(css1, { <span class="hljs-attr">from</span>: <span class="hljs-string">'a.css'</span> }) +<span class="hljs-keyword">const</span> root2 = postcss.parse(css2, { <span class="hljs-attr">from</span>: <span class="hljs-string">'b.css'</span> }) +root1.append(root2) +<span class="hljs-keyword">const</span> result = root1.toResult({ <span class="hljs-attr">to</span>: <span class="hljs-string">'all.css'</span>, <span class="hljs-attr">map</span>: <span class="hljs-literal">true</span> })</code></pre> + + + + + + + + + + +</section> + + + <section id='rootwalkdecls'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L203-L224'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rootwalkdecls'> + <code> + walkDecls + <span class='gray'>(prop?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each declaration node.</p> +<p>If you pass a filter, iteration will only happen over declarations +with matching properties.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter declarations by property name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkDecls(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + checkPropertySupport(decl.prop) +}) + +root.walkDecls(<span class="hljs-string">'border-radius'</span>, decl => { + decl.remove() +}) + +root.walkDecls(<span class="hljs-regexp">/^background/</span>, decl => { + decl.value = takeFirstColorFromGradient(decl.value) +})</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='rule'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + <span class='font-smaller'> + Extends + + <a href="#container">Container</a> + + </span> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/rule.js#L17-L90'> + <span>lib/rule.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rule'> + <code> + Rule + <span class='gray'>(defaults)</span> + </code> + </a> + </h3> + + <p>Represents a CSS rule: a selector followed by a declaration block.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + any + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a{}'</span>) +<span class="hljs-keyword">const</span> rule = root.first +rule.type <span class="hljs-comment">//=> 'rule'</span> +rule.toString() <span class="hljs-comment">//=> 'a{}'</span></code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='ruleappend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L370-L379'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleappend'> + <code> + append + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the end of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.append(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='ruleeach'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L76-L102'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleeach'> + <code> + each + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Iterates through the container’s immediate children, +calling <code>callback</code> for each child.</p> +<p>Returning <code>false</code> in the callback will break iteration.</p> +<p>This method only iterates through the container’s immediate children. +If you need to recursively iterate through all the container’s descendant +nodes, use <a href="#containerwalk">Container#walk</a>.</p> +<p>Unlike the for <code>{}</code>-cycle or <code>Array#forEach</code> this iterator is safe +if you are mutating the array of child nodes during iteration. +PostCSS will adjust the current index to match the mutations.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a { color: black; z-index: 1 }'</span>) +<span class="hljs-keyword">const</span> rule = root.first + +<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> decl <span class="hljs-keyword">of</span> rule.nodes) { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Cycle will be infinite, because cloneBefore moves the current node</span> + <span class="hljs-comment">// to the next index</span> +} + +rule.each(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + decl.cloneBefore({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }) + <span class="hljs-comment">// Will be executed only for color and z-index</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='ruleevery'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L587-L589'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleevery'> + <code> + every + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> +for all of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is every child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> noPrefixes = rule.every(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] !== <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='rulefirst'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L631-L634'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulefirst'> + <code> + first + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s first child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.first === rules.nodes[<span class="hljs-number">0</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='ruleindex'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L616-L621'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleindex'> + <code> + index + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Returns a <code>child</code>’s index within the <a href="Container#nodes">Container#nodes</a> array.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Child of the current container. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code> + : + <span class='force-inline'>Child index. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.index( rule.nodes[<span class="hljs-number">2</span>] ) <span class="hljs-comment">//=> 2</span></code></pre> + + + + + + + + + + +</section> + + + <section id='ruleinsertafter'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L462-L479'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleinsertafter'> + <code> + insertAfter + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node after old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='ruleinsertbefore'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L434-L452'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleinsertbefore'> + <code> + insertBefore + <span class='gray'>(exist, add)</span> + </code> + </a> + </h3> + + <p>Insert new node before old node within the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>exist</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>add</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.insertBefore(decl, decl.clone({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'-webkit-'</span> + decl.prop }))</code></pre> + + + + + + + + + + +</section> + + + <section id='rulelast'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L644-L647'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulelast'> + <code> + last + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The container’s last child.</p> + + + <p> + Type: + <a href="#node">Node</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.last === rule.nodes[rule.nodes.length - <span class="hljs-number">1</span>]</code></pre> + + + + + + + + + + +</section> + + + <section id='ruleprepend'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L401-L414'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleprepend'> + <code> + prepend + <span class='gray'>(children)</span> + </code> + </a> + </h3> + + <p>Inserts new nodes to the start of the container.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>children</code></td> + <td class='col-3 quiet'> + ...(<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>>) + + </td> + <td class='col-6'>New nodes. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> decl1 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) +<span class="hljs-keyword">const</span> decl2 = postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'background-color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'white'</span> }) +rule.prepend(decl1, decl2) + +root.append({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span>, <span class="hljs-attr">params</span>: <span class="hljs-string">'"UTF-8"'</span> }) <span class="hljs-comment">// at-rule</span> +root.append({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }) <span class="hljs-comment">// rule</span> +rule.append({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'black'</span> }) <span class="hljs-comment">// declaration</span> +rule.append({ <span class="hljs-attr">text</span>: <span class="hljs-string">'Comment'</span> }) <span class="hljs-comment">// comment</span> + +root.append(<span class="hljs-string">'a {}'</span>) +root.first.append(<span class="hljs-string">'color: black; z-index: 1'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='ruleremoveall'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L523-L530'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleremoveall'> + <code> + removeAll + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Removes all children from the container +and cleans their parent properties.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.removeAll() +rule.nodes.length <span class="hljs-comment">//=> 0</span></code></pre> + + + + + + + + + + +</section> + + + <section id='ruleremovechild'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L495-L511'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleremovechild'> + <code> + removeChild + <span class='gray'>(child)</span> + </code> + </a> + </h3> + + <p>Removes node from the container and cleans the parent properties +from the node and its children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>child</code></td> + <td class='col-3 quiet'> + (<a href="#node">Node</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>) + + </td> + <td class='col-6'>Child or child’s index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>rule.nodes.length <span class="hljs-comment">//=> 5</span> +rule.removeChild(decl) +rule.nodes.length <span class="hljs-comment">//=> 4</span> +decl.parent <span class="hljs-comment">//=> undefined</span></code></pre> + + + + + + + + + + +</section> + + + <section id='rulereplacevalues'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L558-L574'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulereplacevalues'> + <code> + replaceValues + <span class='gray'>(pattern, opts, callback)</span> + </code> + </a> + </h3> + + <p>Passes all declaration values within the container that match pattern +through callback, replacing those values with the returned result +of callback.</p> +<p>This method is useful if you are using a custom unit or function +and need to iterate through all values.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>pattern</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>) + + </td> + <td class='col-6'>Replace pattern. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + + </td> + <td class='col-6'>Options to speed up the search. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>opts.props</td> + <td class="col-2 quiet"> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>>) + + </td> + <td class='col-8'>An array of property names. +</td> +</tr> + + + + <tr> + <td class='col-2 strong'>opts.fast</td> + <td class="col-2 quiet"> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>String that’s used to narrow down +values and speed up the regexp search. +</td> +</tr> + + + + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>) + + </td> + <td class='col-6'>String to replace pattern or callback +that returns a new value. The callback +will receive the same arguments +as those passed to a function parameter +of +<code>String#replace</code> +. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#node">Node</a></code> + : + <span class='force-inline'>This node for methods chain. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.replaceValues(<span class="hljs-regexp">/\d+rem/</span>, { <span class="hljs-attr">fast</span>: <span class="hljs-string">'rem'</span> }, string => { + <span class="hljs-keyword">return</span> <span class="hljs-number">15</span> * <span class="hljs-built_in">parseInt</span>(string) + <span class="hljs-string">'px'</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='ruleselectors'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/rule.js#L41-L43'> + <span>lib/rule.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#ruleselectors'> + <code> + selectors + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>An array containing the rule’s individual selectors. +Groups of selectors are split at commas.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> root = postcss.parse(<span class="hljs-string">'a, b { }'</span>) +<span class="hljs-keyword">const</span> rule = root.first + +rule.selector <span class="hljs-comment">//=> 'a, b'</span> +rule.selectors <span class="hljs-comment">//=> ['a', 'b']</span> + +rule.selectors = [<span class="hljs-string">'a'</span>, <span class="hljs-string">'strong'</span>] +rule.selector <span class="hljs-comment">//=> 'a, strong'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='rulesome'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L602-L604'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulesome'> + <code> + some + <span class='gray'>(condition)</span> + </code> + </a> + </h3> + + <p>Returns <code>true</code> if callback returns <code>true</code> for (at least) one +of the container’s children.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>condition</code></td> + <td class='col-3 quiet'> + <a href="#childcondition">childCondition</a> + + </td> + <td class='col-6'>Iterator returns true or false. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'>Is some child pass condition. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> hasPrefix = rule.some(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.prop[<span class="hljs-number">0</span>] === <span class="hljs-string">'-'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='rulewalk'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L123-L137'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulewalk'> + <code> + walk + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each node.</p> +<p>Like container.each(), this method is safe to use +if you are mutating arrays during iteration.</p> +<p>If you only need to iterate through the container’s immediate children, +use <a href="#containereach">Container#each</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walk(<span class="hljs-function"><span class="hljs-params">node</span> =></span> { + <span class="hljs-comment">// Traverses all descendant nodes.</span> +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rulewalkatrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L303-L324'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulewalkatrules'> + <code> + walkAtRules + <span class='gray'>(name?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each at-rule node.</p> +<p>If you pass a filter, iteration will only happen over at-rules +that have matching names.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>name</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter at-rules by name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkAtRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + <span class="hljs-keyword">if</span> (isOld(rule.name)) rule.remove() +}) + +<span class="hljs-keyword">let</span> first = <span class="hljs-literal">false</span> +root.walkAtRules(<span class="hljs-string">'charset'</span>, rule => { + <span class="hljs-keyword">if</span> (!first) { + first = <span class="hljs-literal">true</span> + } <span class="hljs-keyword">else</span> { + rule.remove() + } +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rulewalkcomments'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L342-L348'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulewalkcomments'> + <code> + walkComments + <span class='gray'>(callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each comment node.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkComments(<span class="hljs-function"><span class="hljs-params">comment</span> =></span> { + comment.remove() +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rulewalkdecls'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L203-L224'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulewalkdecls'> + <code> + walkDecls + <span class='gray'>(prop?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each declaration node.</p> +<p>If you pass a filter, iteration will only happen over declarations +with matching properties.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter declarations by property name. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>root.walkDecls(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + checkPropertySupport(decl.prop) +}) + +root.walkDecls(<span class="hljs-string">'border-radius'</span>, decl => { + decl.remove() +}) + +root.walkDecls(<span class="hljs-regexp">/^background/</span>, decl => { + decl.value = takeFirstColorFromGradient(decl.value) +})</code></pre> + + + + + + + + + + +</section> + + + <section id='rulewalkrules'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L249-L271'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#rulewalkrules'> + <code> + walkRules + <span class='gray'>(selector?, callback)</span> + </code> + </a> + </h3> + + <p>Traverses the container’s descendant nodes, calling callback +for each rule node.</p> +<p>If you pass a filter, iteration will only happen over rules +with matching selectors.</p> +<p>Like <a href="#containereach">Container#each</a>, this method is safe +to use if you are mutating arrays during iteration.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>selector</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp">RegExp</a>)? + + </td> + <td class='col-6'>String or regular expression +to filter rules by selector. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>callback</code></td> + <td class='col-3 quiet'> + <a href="#childiterator">childIterator</a> + + </td> + <td class='col-6'>Iterator receives each node and index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>returns +<code>false</code> + if iteration was broke. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> selectors = [] +root.walkRules(<span class="hljs-function"><span class="hljs-params">rule</span> =></span> { + selectors.push(rule.selector) +}) +<span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Your CSS uses <span class="hljs-subst">${ selectors.length }</span> selectors`</span>)</code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <section id='warning'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/warning.js#L9-L107'> + <span>lib/warning.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#warning'> + <code> + Warning + <span class='gray'>(text, opts = {})</span> + </code> + </a> + </h3> + + <p>Represents a plugin’s warning. It can be created using <a href="#nodewarn">Node#warn</a>.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>text</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Warning message. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>? + + = <code>{}</code> + </td> + <td class='col-6'>Warning options. +</td> + </tr> + + + </table> + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">if</span> (decl.important) { + decl.warn(result, <span class="hljs-string">'Avoid !important'</span>, { <span class="hljs-attr">word</span>: <span class="hljs-string">'!important'</span> }) +}</code></pre> + + + + + + + <h4 class='caps quiet mb2 mt3'>Instance Members</h4> + <div class="section-indent"> + + <section id='warningtype'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/warning.js#L31-L31'> + <span>lib/warning.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#warningtype'> + <code> + type + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Type to filter warnings from <a href="#resultmessages">Result#messages</a>. +Always equal to <code>"warning"</code>.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> nonWarning = result.messages.filter(<span class="hljs-function"><span class="hljs-params">i</span> =></span> i.type !== <span class="hljs-string">'warning'</span>)</code></pre> + + + + + + + + + + +</section> + + + <section id='warningtext'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/warning.js#L40-L40'> + <span>lib/warning.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#warningtext'> + <code> + text + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>The warning message.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>warning.text <span class="hljs-comment">//=> 'Try to avoid !important'</span></code></pre> + + + + + + + + + + +</section> + + + <section id='warningline'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/warning.js#L51-L51'> + <span>lib/warning.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#warningline'> + <code> + line + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Line in the input file with this warning’s source.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>warning.line <span class="hljs-comment">//=> 5</span></code></pre> + + + + + + + + + + +</section> + + + <section id='warningcolumn'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/warning.js#L60-L60'> + <span>lib/warning.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#warningcolumn'> + <code> + column + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Column in the input file with this warning’s source.</p> + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>warning.column <span class="hljs-comment">//=> 6</span></code></pre> + + + + + + + + + + +</section> + + + <section id='warningtostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/warning.js#L74-L88'> + <span>lib/warning.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#warningtostring'> + <code> + toString + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Returns a warning position and message.</p> + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>Warning position and message. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>warning.toString() <span class="hljs-comment">//=> 'postcss-lint:a.css:10:14: Avoid !important'</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + +</section> + + + + + <div class='hide'> + <section class='py2 clearfix'> + + <h2 id='namespaces' class='mt0'> + NAMESPACES + </h2> + + + + + + </section> +</div> + + + + <section id='list'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/list.js#L10-L87'> + <span>lib/list.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#list'> + <code> + list + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Contains helpers for safely splitting lists of CSS values, +preserving parentheses and quotes.</p> + + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> list = postcss.list</code></pre> + + + + + <h4 class='caps quiet mb2 mt3'>Static Members</h4> + <div class="section-indent"> + + <section id='listspace'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/list.js#L66-L69'> + <span>lib/list.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#listspace'> + <code> + space + <span class='gray'>(string)</span> + </code> + </a> + </h3> + + <p>Safely splits space-separated values (such as those for <code>background</code>, +<code>border-radius</code>, and other shorthand properties).</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>string</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Space-separated values. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code> + : + <span class='force-inline'>Split values. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.list.space(<span class="hljs-string">'1px calc(10% + 1px)'</span>) <span class="hljs-comment">//=> ['1px', 'calc(10% + 1px)']</span></code></pre> + + + + + + + + + + +</section> + + + <section id='listcomma'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/list.js#L83-L85'> + <span>lib/list.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#listcomma'> + <code> + comma + <span class='gray'>(string)</span> + </code> + </a> + </h3> + + <p>Safely splits comma-separated values (such as those for <code>transition-*</code> +and <code>background</code> properties).</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>string</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Comma-separated values. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>></code> + : + <span class='force-inline'>Split values. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.list.comma(<span class="hljs-string">'black, linear-gradient(white, black)'</span>) +<span class="hljs-comment">//=> ['black', 'linear-gradient(white, black)']</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + + + +</section> + + + + + <section id='postcss'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L30-L35'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcss'> + <code> + postcss + <span class='gray'>(plugins)</span> + </code> + </a> + </h3> + + <p>Create a new <a href="#processor">Processor</a> instance that will apply <code>plugins</code> +as CSS processors.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>plugins</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><(<a href="#plugin">Plugin</a> | <a href="#pluginfunction">pluginFunction</a>)> | <a href="#processor">Processor</a>) + + </td> + <td class='col-6'>PostCSS plugins. +See +<a href="#processoruse">Processor#use</a> + for plugin format. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#processor">Processor</a></code> + : + <span class='force-inline'>Processor to process multiple CSS. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">let</span> postcss = <span class="hljs-built_in">require</span>(<span class="hljs-string">'postcss'</span>) + +postcss(plugins).process(css, { <span class="hljs-keyword">from</span>, to }).then(<span class="hljs-function"><span class="hljs-params">result</span> =></span> { + <span class="hljs-built_in">console</span>.log(result.css) +})</code></pre> + + + + + <h4 class='caps quiet mb2 mt3'>Static Members</h4> + <div class="section-indent"> + + <section id='postcssplugin'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L109-L130'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssplugin'> + <code> + plugin + <span class='gray'>(name, initializer)</span> + </code> + </a> + </h3> + + <p>Creates a PostCSS plugin with a standard API.</p> +<p>The newly-wrapped function will provide both the name and PostCSS +version of the plugin.</p> +<pre class='hljs'><span class="hljs-keyword">const</span> processor = postcss([replace]) +processor.plugins[<span class="hljs-number">0</span>].postcssPlugin <span class="hljs-comment">//=> 'postcss-replace'</span> +processor.plugins[<span class="hljs-number">0</span>].postcssVersion <span class="hljs-comment">//=> '6.0.0'</span></pre> +<p>The plugin function receives 2 arguments: <a href="#root">Root</a> +and <a href="#result">Result</a> instance. The function should mutate the provided +<code>Root</code> node. Alternatively, you can create a new <code>Root</code> node +and override the <code>result.root</code> property.</p> +<pre class='hljs'><span class="hljs-keyword">const</span> cleaner = postcss.plugin(<span class="hljs-string">'postcss-cleaner'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + result.root = postcss.root() + } +})</pre> +<p>As a convenience, plugins also expose a <code>process</code> method so that you can use +them as standalone tools.</p> +<pre class='hljs'>cleaner.process(css, processOpts, pluginOpts) +<span class="hljs-comment">// This is equivalent to:</span> +postcss([ cleaner(pluginOpts) ]).process(css, processOpts)</pre> +<p>Asynchronous plugins should return a <code>Promise</code> instance.</p> +<pre class='hljs'>postcss.plugin(<span class="hljs-string">'postcss-import'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Promise</span>( <span class="hljs-function">(<span class="hljs-params">resolve, reject</span>) =></span> { + fs.readFile(<span class="hljs-string">'base.css'</span>, (base) => { + root.prepend(base) + resolve() + }) + }) + } +})</pre> +<p>Add warnings using the <a href="#nodewarn">Node#warn</a> method. +Send data to other plugins using the <a href="#resultmessages">Result#messages</a> array.</p> +<pre class='hljs'>postcss.plugin(<span class="hljs-string">'postcss-caniuse-test'</span>, () => { + <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">root, result</span>) =></span> { + root.walkDecls(<span class="hljs-function"><span class="hljs-params">decl</span> =></span> { + <span class="hljs-keyword">if</span> (!caniuse.support(decl.prop)) { + decl.warn(result, <span class="hljs-string">'Some browsers do not support '</span> + decl.prop) + } + }) + } +})</pre> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>name</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>PostCSS plugin name. Same as in +<code>name</code> + +property in +<code>package.json</code> +. It will be saved +in +<code>plugin.postcssPlugin</code> + property. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>initializer</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> + + </td> + <td class='col-6'>Will receive plugin options +and should return +<a href="#pluginfunction">pluginFunction</a> +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#plugin">Plugin</a></code> + : + <span class='force-inline'>PostCSS plugin. +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='postcssstringify'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L143-L143'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssstringify'> + <code> + stringify + <span class='gray'>(node, builder)</span> + </code> + </a> + </h3> + + <p>Default function to convert a node tree into a CSS string.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>node</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Start node for stringifing. Usually +<a href="#root">Root</a> +. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>builder</code></td> + <td class='col-3 quiet'> + <a href="#builder">builder</a> + + </td> + <td class='col-6'>Function to concatenate CSS from node’s parts +or generate string and source map. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>void</code> + : + <span class='force-inline'> +</span> + + + + + + + + + + + + + + + +</section> + + + <section id='postcssparse'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L163-L163'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssparse'> + <code> + parse + <span class='gray'>(css, opts?)</span> + </code> + </a> + </h3> + + <p>Parses source css and returns a new <a href="#root">Root</a> node, +which contains the source CSS nodes.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>css</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="#tostring">toString</a>) + + </td> + <td class='col-6'>String with input CSS or any object +with toString() method, like a Buffer +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="#processoptions">processOptions</a>? + + </td> + <td class='col-6'>Options with only +<code>from</code> + and +<code>map</code> + keys. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>PostCSS AST. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-comment">// Simple CSS concatenation with source map support</span> +<span class="hljs-keyword">const</span> root1 = postcss.parse(css1, { <span class="hljs-attr">from</span>: file1 }) +<span class="hljs-keyword">const</span> root2 = postcss.parse(css2, { <span class="hljs-attr">from</span>: file2 }) +root1.append(root2).toResult().css</code></pre> + + + + + + + + + + +</section> + + + <section id='postcssvendor'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L173-L173'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssvendor'> + <code> + vendor + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Contains the <a href="#vendor">vendor</a> module.</p> + + + <p> + Type: + <a href="#vendor">vendor</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.vendor.unprefixed(<span class="hljs-string">'-moz-tab'</span>) <span class="hljs-comment">//=> ['tab']</span></code></pre> + + + + + + + + + + +</section> + + + <section id='postcsslist'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L183-L183'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcsslist'> + <code> + list + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Contains the <a href="#list">list</a> module.</p> + + + <p> + Type: + <a href="#list">list</a> + </p> + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.list.space(<span class="hljs-string">'5px calc(10% + 5px)'</span>) <span class="hljs-comment">//=> ['5px', 'calc(10% + 5px)']</span></code></pre> + + + + + + + + + + +</section> + + + <section id='postcsscomment'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L195-L195'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcsscomment'> + <code> + comment + <span class='gray'>(defaults?)</span> + </code> + </a> + </h3> + + <p>Creates a new <a href="#comment">Comment</a> node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Properties for the new node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#comment">Comment</a></code> + : + <span class='force-inline'>New comment node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.comment({ <span class="hljs-attr">text</span>: <span class="hljs-string">'test'</span> })</code></pre> + + + + + + + + + + +</section> + + + <section id='postcssatrule'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L207-L207'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssatrule'> + <code> + atRule + <span class='gray'>(defaults?)</span> + </code> + </a> + </h3> + + <p>Creates a new <a href="#atrule">AtRule</a> node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Properties for the new node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#atrule">AtRule</a></code> + : + <span class='force-inline'>new at-rule node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.atRule({ <span class="hljs-attr">name</span>: <span class="hljs-string">'charset'</span> }).toString() <span class="hljs-comment">//=> "@charset"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='postcssdecl'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L219-L219'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssdecl'> + <code> + decl + <span class='gray'>(defaults?)</span> + </code> + </a> + </h3> + + <p>Creates a new <a href="#declaration">Declaration</a> node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Properties for the new node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#declaration">Declaration</a></code> + : + <span class='force-inline'>new declaration node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.decl({ <span class="hljs-attr">prop</span>: <span class="hljs-string">'color'</span>, <span class="hljs-attr">value</span>: <span class="hljs-string">'red'</span> }).toString() <span class="hljs-comment">//=> "color: red"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='postcssrule'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L231-L231'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssrule'> + <code> + rule + <span class='gray'>(defaults?)</span> + </code> + </a> + </h3> + + <p>Creates a new <a href="#rule">Rule</a> node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Properties for the new node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#rule">Rule</a></code> + : + <span class='force-inline'>new rule node +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.rule({ <span class="hljs-attr">selector</span>: <span class="hljs-string">'a'</span> }).toString() <span class="hljs-comment">//=> "a {\n}"</span></code></pre> + + + + + + + + + + +</section> + + + <section id='postcssroot'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/postcss.js#L243-L243'> + <span>lib/postcss.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#postcssroot'> + <code> + root + <span class='gray'>(defaults?)</span> + </code> + </a> + </h3> + + <p>Creates a new <a href="#root">Root</a> node.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>defaults</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>? + + </td> + <td class='col-6'>Properties for the new node. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>new root node. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.root({ <span class="hljs-attr">after</span>: <span class="hljs-string">'\n'</span> }).toString() <span class="hljs-comment">//=> "\n"</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + + + +</section> + + + + + <section id='vendor'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/vendor.js#L9-L45'> + <span>lib/vendor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#vendor'> + <code> + vendor + <span class='gray'>()</span> + </code> + </a> + </h3> + + <p>Contains helpers for working with vendor prefixes.</p> + + + + + + + + + + + + + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code><span class="hljs-keyword">const</span> vendor = postcss.vendor</code></pre> + + + + + <h4 class='caps quiet mb2 mt3'>Static Members</h4> + <div class="section-indent"> + + <section id='vendorprefix'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/vendor.js#L22-L29'> + <span>lib/vendor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#vendorprefix'> + <code> + prefix + <span class='gray'>(prop)</span> + </code> + </a> + </h3> + + <p>Returns the vendor prefix extracted from an input string.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>String with or without vendor prefix. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>vendor prefix or empty string +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.vendor.prefix(<span class="hljs-string">'-moz-tab-size'</span>) <span class="hljs-comment">//=> '-moz-'</span> +postcss.vendor.prefix(<span class="hljs-string">'tab-size'</span>) <span class="hljs-comment">//=> ''</span></code></pre> + + + + + + + + + + +</section> + + + <section id='vendorunprefixed'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/vendor.js#L41-L43'> + <span>lib/vendor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#vendorunprefixed'> + <code> + unprefixed + <span class='gray'>(prop)</span> + </code> + </a> + </h3> + + <p>Returns the input string stripped of its vendor prefix.</p> + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>prop</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>String with or without vendor prefix. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code> + : + <span class='force-inline'>String name without vendor prefixes. +</span> + + + + + + + + <h4 class='caps quiet mb1 mt3'>Examples</h4> + + + <pre class='p1 overflow-auto round fill-light'><code>postcss.vendor.unprefixed(<span class="hljs-string">'-moz-tab-size'</span>) <span class="hljs-comment">//=> 'tab-size'</span></code></pre> + + + + + + + + + + +</section> + + +</div> + + + + + + + + +</section> + + + + + <div class='hide'> + <section class='py2 clearfix'> + + <h2 id='global' class='mt0'> + GLOBAL + </h2> + + + + + + </section> +</div> + + + + <section id='message'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/result.js#L174-L178'> + <span>lib/result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#message'> + <code> + Message + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>type</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>: Message type. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>plugin</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>: Source PostCSS plugin name. +</td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='plugin'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L183-L186'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#plugin'> + <code> + Plugin + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>postcss</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> + + </td> + <td class='col-8'>: PostCSS plugin function. +</td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='builder'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L139-L144'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#builder'> + <code> + builder + <span class='gray'>(part, node, type?)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>part</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-6'>Part of generated CSS connected to this node. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>node</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>AST node. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>type</code></td> + <td class='col-3 quiet'> + (<code>"start"</code> | <code>"end"</code>)? + + </td> + <td class='col-6'>Node’s part type. +</td> + </tr> + + + </table> + + + + + + + + + + + + + + + + + +</section> + + + + + <section id='childcondition'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L712-L718'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#childcondition'> + <code> + childCondition + <span class='gray'>(node, index, nodes)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>node</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Container child. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>index</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-6'>Child index. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>nodes</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a><<a href="#node">Node</a>> + + </td> + <td class='col-6'>All container children. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code> + : + <span class='force-inline'> +</span> + + + + + + + + + + + + + + + +</section> + + + + + <section id='childiterator'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/container.js#L720-L725'> + <span>lib/container.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#childiterator'> + <code> + childIterator + <span class='gray'>(node, index)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>node</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Container child. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>index</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-6'>Child index. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>(<code>false</code> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined">undefined</a>)</code> + : + <span class='force-inline'>Returning +<code>false</code> + will break iteration. +</span> + + + + + + + + + + + + + + + +</section> + + + + + <section id='fileposition'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/input.js#L173-L178'> + <span>lib/input.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#fileposition'> + <code> + filePosition + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>file</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>: Path to file. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>line</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>: Source line in file. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>column</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>: Source column in file. +</td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='onfulfilled'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L421-L424'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#onfulfilled'> + <code> + onFulfilled + <span class='gray'>(result)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>result</code></td> + <td class='col-3 quiet'> + <a href="#result">Result</a> + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + + + + + + + + +</section> + + + + + <section id='onrejected'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/lazy-result.js#L426-L429'> + <span>lib/lazy-result.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#onrejected'> + <code> + onRejected + <span class='gray'>(error)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>error</code></td> + <td class='col-3 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a> + + </td> + <td class='col-6'></td> + </tr> + + + </table> + + + + + + + + + + + + + + + + + +</section> + + + + + <section id='parser'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L146-L154'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#parser'> + <code> + parser + <span class='gray'>(css, opts?)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>css</code></td> + <td class='col-3 quiet'> + (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> | <a href="#tostring">toString</a>) + + </td> + <td class='col-6'>String with input CSS or any object +with toString() method, like a Buffer. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>opts</code></td> + <td class='col-3 quiet'> + <a href="#processoptions">processOptions</a>? + + </td> + <td class='col-6'>Options with only +<code>from</code> + and +<code>map</code> + keys. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code><a href="#root">Root</a></code> + : + <span class='force-inline'>PostCSS AST +</span> + + + + + + + + + + + + + + + +</section> + + + + + <section id='pluginfunction'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L177-L181'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#pluginfunction'> + <code> + pluginFunction + <span class='gray'>(root, result)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>root</code></td> + <td class='col-3 quiet'> + <a href="#root">Root</a> + + </td> + <td class='col-6'>Parsed input CSS. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>result</code></td> + <td class='col-3 quiet'> + <a href="#result">Result</a> + + </td> + <td class='col-6'>Result to set warnings or check other plugins. +</td> + </tr> + + + </table> + + + + + + + + + + + + + + + + + +</section> + + + + + <section id='position'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L518-L522'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#position'> + <code> + position + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>line</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>: Source line in file. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>column</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> + + </td> + <td class='col-8'>: Source column in file. +</td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='processoptions'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L188-L219'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#processoptions'> + <code> + processOptions + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>from</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>: The path of the CSS source file. +You should always set +<code>from</code> +, +because it is used in source map +generation and syntax error messages. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>to</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a> + + </td> + <td class='col-8'>: The path where you’ll put the output +CSS file. You should always set +<code>to</code> + +to generate correct source maps. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>parser</td> + <td class='col-2 quiet'> + <a href="#parser">parser</a> + + </td> + <td class='col-8'>: Function to generate AST by string. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>stringifier</td> + <td class='col-2 quiet'> + <a href="#stringifier">stringifier</a> + + </td> + <td class='col-8'>: Class to generate string by AST. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>syntax</td> + <td class='col-2 quiet'> + <a href="#syntax">syntax</a> + + </td> + <td class='col-8'>: Object with +<code>parse</code> + and +<code>stringify</code> +. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>map</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + + </td> + <td class='col-8'>: Source map options. +</td> + </tr> + + + <tr> + <td class='col-2 strong'>map</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + + </td> + <td class='col-8'>: Source map options. +</td> + </tr> + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='source'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/node.js#L524-L529'> + <span>lib/node.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#source'> + <code> + source + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>input</td> + <td class='col-2 quiet'> + <a href="#input">Input</a> + + </td> + <td class='col-8'>: <a href="#input">Input</a> + with input file +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>start</td> + <td class='col-2 quiet'> + <a href="#position">position</a> + + </td> + <td class='col-8'>: The starting position of the node’s source. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>end</td> + <td class='col-2 quiet'> + <a href="#position">position</a> + + </td> + <td class='col-8'>: The ending position of the node’s source. +</td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='stringifier'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L156-L164'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#stringifier'> + <code> + stringifier + <span class='gray'>(node, builder)</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">Function</a> + </p> + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-3 small caps quiet'>parameter</th> + <th class='col-3 small caps quiet'>type</th> + <th class='col-6 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-3 strong'><code>node</code></td> + <td class='col-3 quiet'> + <a href="#node">Node</a> + + </td> + <td class='col-6'>Start node for stringifing. Usually +<a href="#root">Root</a> +. +</td> + </tr> + + + <tr> + <td class='col-3 strong'><code>builder</code></td> + <td class='col-3 quiet'> + <a href="#builder">builder</a> + + </td> + <td class='col-6'>Function to concatenate CSS from node’s parts +or generate string and source map. +</td> + </tr> + + + </table> + + + + + + + <h4 class='caps quiet mb1 mt3'>Returns</h4> + <code>void</code> + : + <span class='force-inline'> +</span> + + + + + + + + + + + + + + + +</section> + + + + + <section id='syntax'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L166-L170'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#syntax'> + <code> + syntax + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>parse</td> + <td class='col-2 quiet'> + <a href="#parser">parser</a> + + </td> + <td class='col-8'>: Function to generate AST by string. +</td> + </tr> + + + + <tr> + <td class='col-2 strong'>stringify</td> + <td class='col-2 quiet'> + <a href="#stringifier">stringifier</a> + + </td> + <td class='col-8'>: Function to generate string by AST. +</td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + + <section id='tostring'class='mt2 mb2 px3 py1 keyline-top'> + + <div class='right py2'> + + + <span class="px2"></span> + <a class='fr fill-darken0 round round pad1x quiet h5' href='https://[email protected]/:postcss/postcss/blob/ca2aebad42a24508d6de0a2a6a760fd18c5b8648/lib/processor.js#L172-L175'> + <span>lib/processor.js</span> + </a> + + </div> + + <h3 class='regular'> + <a class='black' href='#tostring'> + <code> + toString + <span class='gray'>()</span> + </code> + </a> + </h3> + + + + <p> + Type: + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a> + </p> + + + + + + + + + + + + + <table class='table-light mt3 rounded keyline-all keyline-light overflow-hidden bg-cloudy-light'> + <thead class='fill-light'> + <th class='col-2 small caps quiet'>property</th> + <th class='col-2 small caps quiet'>type</th> + <th class='col-8 small caps quiet'>description</th> + </thead> + + <tr> + <td class='col-2 strong'>toString</td> + <td class='col-2 quiet'> + <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function">function</a> + + </td> + <td class='col-8'></td> + </tr> + + + + </table> + + + + + + + + + + + + + + + +</section> + + + + </div> + </div> + </div> +</div> +<script src='assets/scripts.min.js'></script> +</body> +</html> diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/architecture.md b/node_modules/autoprefixer/node_modules/postcss/docs/architecture.md new file mode 100644 index 0000000..266cd39 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/architecture.md @@ -0,0 +1,156 @@ +## PostCSS Architecture + +General overview of the PostCSS architecture. +It can be useful for everyone who wishes to contribute to the core or develop a better understanding of the tool. + +**Table of Contents** + +- [Overview](#overview) +- [Workflow](#workflow) +- [Core Structures](#core-structures) + * [Tokenizer](#tokenizer--libtokenizees6-) + * [Parser](#parser--libparsees6-libparseres6-) + * [Processor](#processor--libprocessores6-) + * [Stringifier](#stringifier--libstringifyes6-libstringifieres6-) +- [API](#api-reference) + +### Overview + +> This section describes ideas lying behind PostCSS + +Before diving deeper into the development of PostCSS let's briefly describe what is PostCSS and what is not. + +**PostCSS** + +- *is **NOT** a style preprocessor like `Sass` or `Less`.* + + It does not define a custom syntax and semantics, it's not actually a language. + PostCSS works with CSS and can be easily integrated with the tools described above. That being said any valid CSS can be processed by PostCSS. + +- *is a tool for CSS syntax transformations* + + It allows you to define custom CSS like syntax that could be understandable and transformed by plugins. That being said PostCSS is not strictly about CSS spec but about syntax definition manner of CSS. In such a way you can define custom syntax constructs like at-rule, that could be very helpful for tools build around PostCSS. PostCSS plays the role of a framework for building outstanding tools for CSS manipulations. + +- *is a big player in CSS ecosystem* + + A Large amount of lovely tools like `Autoprefixer`, `Stylelint`, `CSSnano` were built on PostCSS ecosystem. There is a big chance that you already use it implicitly, just check your `node_modules` :smiley: + +### Workflow + +This is a high-level overview of the whole PostCSS workflow + +<img width="300" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/PostCSS_scheme.svg/512px-PostCSS_scheme.svg.png" alt="workflow"> + +As you can see from the diagram above, PostCSS architecture is pretty straightforward but some parts of it could be misunderstood. + +You can see a part called *Parser*, this construct will be described in details later on, just for now think about it as a structure that can understand your CSS like syntax and create an object representation of it. + +That being said, there are few ways to write a parser. + + - *Write a single file with string to AST transformation* + + This method is quite popular, for example, the [Rework analyzer](https://github.com/reworkcss/css/blob/master/lib/parse/index.js) was written in this style. But with a large code base, the code becomes hard to read and pretty slow. + + - *Split it into lexical analysis/parsing steps (source string → tokens → AST)* + + This is the way of how we do it in PostCSS and also the most popular one. + A lot of parsers like [`@babel/parser` (parser behind Babel)](https://github.com/babel/babel/tree/master/packages/babel-parser), [`CSSTree`](https://github.com/csstree/csstree) were written in such way. + The main reasons to separate tokenization from parsing steps are performance and abstracting complexity. + +Let think about why the second way is better for our needs. + +First of all, because string to tokens step takes more time than parsing step. We operate on large source string and process it char by char, this is why it is very inefficient operation in terms of performance and we should perform it only once. + +But from other side tokens to AST transformation is logically more complex so with such separation we could write very fast tokenizer (but from this comes sometimes hard to read code) and easy to read (but slow) parser. + +Summing it up splitting into two steps improve performance and code readability. + +So now let's look more closely on structures that play the main role in PostCSS workflow. + +### Core Structures + + - #### Tokenizer ( [lib/tokenize.es6](https://github.com/postcss/postcss/blob/master/lib/tokenize.es6) ) + + Tokenizer (aka Lexer) plays important role in syntax analysis. + + It accepts CSS string and returns a list of tokens. + + Token is a simple structure that describes some part of syntax like `at-rule`, `comment` or `word`. It can also contain positional information for more descriptive errors. + + For example, if we consider following CSS + + ```css + .className { color: #FFF; } + ``` + + corresponding tokens from PostCSS will be + ```js + [ + ["word", ".className", 1, 1, 1, 10] + ["space", " "] + ["{", "{", 1, 12] + ["space", " "] + ["word", "color", 1, 14, 1, 18] + [":", ":", 1, 19] + ["space", " "] + ["word", "#FFF" , 1, 21, 1, 23] + [";", ";", 1, 24] + ["space", " "] + ["}", "}", 1, 26] + ] + ``` + + As you can see from the example above a single token represented as a list and also `space` token doesn't have positional information. + + Let's look more closely on single token like `word`. As it was said each token represented as a list and follow such pattern. + + ```js + const token = [ + // represents token type + 'word', + + // represents matched word + '.className', + + // This two numbers represent start position of token. + // It is optional value as we saw in the example above, + // tokens like `space` don't have such information. + + // Here the first number is line number and the second one is corresponding column. + 1, 1, + + // Next two numbers also optional and represent end position for multichar tokens like this one. Numbers follow same rule as was described above + 1, 10 + ] + ``` + There are many patterns how tokenization could be done, PostCSS motto is performance and simplicity. Tokenization is a complex computing operation and takes a large amount of syntax analysis time ( ~90% ), that why PostCSS' Tokenizer looks dirty but it was optimized for speed. Any high-level constructs like classes could dramatically slow down tokenizer. + + PostCSS' Tokenizer uses some sort of streaming/chaining API where you expose [`nextToken()`](https://github.com/postcss/postcss/blob/master/lib/tokenize.es6#L48-L308) method to Parser. In this manner, we provide a clean interface for Parser and reduce memory usage by storing only a few tokens and not the whole list of tokens. + +- #### Parser ( [lib/parse.es6](https://github.com/postcss/postcss/blob/master/lib/parse.es6), [lib/parser.es6](https://github.com/postcss/postcss/blob/master/lib/parser.es6) ) + + Parser is the main structure responsible for [syntax analysis](https://en.wikipedia.org/wiki/Parsing) of incoming CSS. Parser produces a structure called [Abstract Syntax Tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) that could then be transformed by plugins later on. + + Parser works in common with Tokenizer and operates over tokens, not source string, as it would be a very inefficient operation. + + It uses mostly `nextToken` and `back` methods provided by Tokenizer for obtaining single or multiple tokens and then construct part of AST called `Node`. + + There are multiple Node types that PostCSS could produce but all of them inherit from base Node [class](https://github.com/postcss/postcss/blob/master/lib/node.es6#L34). + +- #### Processor ( [lib/processor.es6](https://github.com/postcss/postcss/blob/master/lib/processor.es6) ) + + Processor is a very plain structure that initializes plugins and runs syntax transformations. Plugin is just a function registered with [postcss.plugin](https://github.com/postcss/postcss/blob/master/lib/postcss.es6#L109) call. + + It exposes only a few public API methods. Description of them could be found on [api.postcss.org/Processor](http://api.postcss.org/Processor.html) + +- #### Stringifier ( [lib/stringify.es6](https://github.com/postcss/postcss/blob/master/lib/stringify.es6), [lib/stringifier.es6](https://github.com/postcss/postcss/blob/master/lib/stringifier.es6) ) + + Stringifier is a base class that translates modified AST to pure CSS string. Stringifier traverses AST starting from provided Node and generates a raw string representation of it calling corresponding methods. + + The most essential method is [`Stringifier.stringify`](https://github.com/postcss/postcss/blob/master/lib/stringifier.es6#L25-L27) + that accepts initial Node and semicolon indicator. + You can learn more by checking [stringifier.es6](https://github.com/postcss/postcss/blob/master/lib/stringifier.es6) + +### API Reference + +More descriptive API documentation could be found [here](http://api.postcss.org/) diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/plugin.md b/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/plugin.md new file mode 100644 index 0000000..52fdcf3 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/plugin.md @@ -0,0 +1,195 @@ +# PostCSS Plugin Guidelines + +A PostCSS plugin is a function that receives and, usually, +transforms a CSS AST from the PostCSS parser. + +The rules below are *mandatory* for all PostCSS plugins. + +See also [ClojureWerkz’s recommendations] for open source projects. + +[ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/ + +## 1. API + +### 1.1 Clear name with `postcss-` prefix + +The plugin’s purpose should be clear just by reading its name. +If you wrote a transpiler for CSS 4 Custom Media, `postcss-custom-media` +would be a good name. If you wrote a plugin to support mixins, +`postcss-mixins` would be a good name. + +The prefix `postcss-` shows that the plugin is part of the PostCSS ecosystem. + +This rule is not mandatory for plugins that can run as independent tools, +without the user necessarily knowing that it is powered by +PostCSS — for example, [RTLCSS] and [Autoprefixer]. + +[Autoprefixer]: https://github.com/postcss/autoprefixer +[RTLCSS]: https://rtlcss.com/ + +### 1.2. Do one thing, and do it well + +Do not create multitool plugins. Several small, one-purpose plugins bundled into +a plugin pack is usually a better solution. + +For example, [`postcss-preset-env`] contains many small plugins, +one for each W3C specification. And [`cssnano`] contains a separate plugin +for each of its optimization. + +[`postcss-preset-env`]: https://preset-env.cssdb.org/ +[`cssnano`]: https://github.com/ben-eb/cssnano + +### 1.3. Do not use mixins + +Preprocessors libraries like Compass provide an API with mixins. + +PostCSS plugins are different. +A plugin cannot be just a set of mixins for [`postcss-mixins`]. + +To achieve your goal, consider transforming valid CSS +or using custom at-rules and custom properties. + +[`postcss-mixins`]: https://github.com/postcss/postcss-mixins + +### 1.4. Create plugin by `postcss.plugin` + +By wrapping your function in this method, +you are hooking into a common plugin API: + +```js +module.exports = postcss.plugin('plugin-name', opts => { + return (root, result) => { + // Plugin code + } +}) +``` + +## 2. Processing + +### 2.1. Plugin must be tested + +A CI service like [Travis] is also recommended for testing code in +different environments. You should test in (at least) Node.js [active LTS](https://github.com/nodejs/LTS) and current stable version. + +[Travis]: https://travis-ci.org/ + +### 2.2. Use asynchronous methods whenever possible + +For example, use `fs.writeFile` instead of `fs.writeFileSync`: + +```js +postcss.plugin('plugin-sprite', opts => { + return (root, result) => { + + return new Promise((resolve, reject) => { + const sprite = makeSprite() + fs.writeFile(opts.file, sprite, err => { + if (err) return reject(err) + resolve() + }) + }) + + } +}) +``` + +### 2.3. Set `node.source` for new nodes + +Every node must have a relevant `source` so PostCSS can generate +an accurate source map. + +So if you add a new declaration based on some existing declaration, you should +clone the existing declaration in order to save that original `source`. + +```js +if (needPrefix(decl.prop)) { + decl.cloneBefore({ prop: '-webkit-' + decl.prop }) +} +``` + +You can also set `source` directly, copying from some existing node: + +```js +if (decl.prop === 'animation') { + const keyframe = createAnimationByName(decl.value) + keyframes.source = decl.source + decl.root().append(keyframes) +} +``` + +### 2.4. Use only the public PostCSS API + +PostCSS plugins must not rely on undocumented properties or methods, +which may be subject to change in any minor release. The public API +is described in [API docs]. + +[API docs]: http://api.postcss.org/ + +## 3. Errors + +### 3.1. Use `node.error` on CSS relevant errors + +If you have an error because of input CSS (like an unknown name +in a mixin plugin) you should use `node.error` to create an error +that includes source position: + +```js +if (typeof mixins[name] === 'undefined') { + throw decl.error('Unknown mixin ' + name, { plugin: 'postcss-mixins' }) +} +``` + +### 3.2. Use `result.warn` for warnings + +Do not print warnings with `console.log` or `console.warn`, +because some PostCSS runner may not allow console output. + +```js +if (outdated(decl.prop)) { + result.warn(decl.prop + ' is outdated', { node: decl }) +} +``` + +If CSS input is a source of the warning, the plugin must set the `node` option. + +## 4. Documentation + +### 4.1. Document your plugin in English + +PostCSS plugins must have their `README.md` wrote in English. Do not be afraid +of your English skills, as the open source community will fix your errors. + +Of course, you are welcome to write documentation in other languages; +just name them appropriately (e.g. `README.ja.md`). + +### 4.2. Include input and output examples + +The plugin's `README.md` must contain example input and output CSS. +A clear example is the best way to describe how your plugin works. + +The first section of the `README.md` is a good place to put examples. +See [postcss-opacity](https://github.com/iamvdo/postcss-opacity) for an example. + +Of course, this guideline does not apply if your plugin does not +transform the CSS. + +### 4.3. Maintain a changelog + +PostCSS plugins must describe the changes of all their releases +in a separate file, such as `CHANGELOG.md`, `History.md`, or [GitHub Releases]. +Visit [Keep A Changelog] for more information about how to write one of these. + +Of course, you should be using [SemVer]. + +[Keep A Changelog]: http://keepachangelog.com/ +[GitHub Releases]: https://help.github.com/articles/creating-releases/ +[SemVer]: http://semver.org/ + +### 4.4. Include `postcss-plugin` keyword in `package.json` + +PostCSS plugins written for npm must have the `postcss-plugin` keyword +in their `package.json`. This special keyword will be useful for feedback about +the PostCSS ecosystem. + +For packages not published to npm, this is not mandatory, but is recommended +if the package format can contain keywords. diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/runner.md b/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/runner.md new file mode 100644 index 0000000..24de712 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/guidelines/runner.md @@ -0,0 +1,143 @@ +# PostCSS Runner Guidelines + +A PostCSS runner is a tool that processes CSS through a user-defined list +of plugins; for example, [`postcss-cli`] or [`gulp‑postcss`]. +These rules are mandatory for any such runners. + +For single-plugin tools, like [`gulp-autoprefixer`], +these rules are not mandatory but are highly recommended. + +See also [ClojureWerkz’s recommendations] for open source projects. + +[ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/ +[`gulp-autoprefixer`]: https://github.com/sindresorhus/gulp-autoprefixer +[`gulp‑postcss`]: https://github.com/w0rm/gulp-postcss +[`postcss-cli`]: https://github.com/postcss/postcss-cli + +## 1. API + +### 1.1. Accept functions in plugin parameters + +If your runner uses a config file, it must be written in JavaScript, so that +it can support plugins which accept a function, such as [`postcss-assets`]: + +```js +module.exports = [ + require('postcss-assets')({ + cachebuster: function (file) { + return fs.statSync(file).mtime.getTime().toString(16) + } + }) +] +``` + +[`postcss-assets`]: https://github.com/borodean/postcss-assets + +## 2. Processing + +### 2.1. Set `from` and `to` processing options + +To ensure that PostCSS generates source maps and displays better syntax errors, +runners must specify the `from` and `to` options. If your runner does not handle +writing to disk (for example, a gulp transform), you should set both options +to point to the same file: + +```js +processor.process({ from: file.path, to: file.path }) +``` + +### 2.2. Use only the asynchronous API + +PostCSS runners must use only the asynchronous API. +The synchronous API is provided only for debugging, is slower, +and can’t work with asynchronous plugins. + +```js +processor.process(opts).then(result => { + // processing is finished +}); +``` + +### 2.3. Use only the public PostCSS API + +PostCSS runners must not rely on undocumented properties or methods, +which may be subject to change in any minor release. The public API +is described in [API docs]. + +[API docs]: http://api.postcss.org/ + +## 3. Output + +### 3.1. Don’t show JS stack for `CssSyntaxError` + +PostCSS runners must not show a stack trace for CSS syntax errors, +as the runner can be used by developers who are not familiar with JavaScript. +Instead, handle such errors gracefully: + +```js +processor.process(opts).catch(error => { + if (error.name === 'CssSyntaxError') { + process.stderr.write(error.message + error.showSourceCode()) + } else { + throw error + } +}) +``` + +### 3.2. Display `result.warnings()` + +PostCSS runners must output warnings from `result.warnings()`: + +```js +result.warnings().forEach(warn => { + process.stderr.write(warn.toString()) +}) +``` + +See also [postcss-log-warnings] and [postcss-messages] plugins. + +[postcss-log-warnings]: https://github.com/davidtheclark/postcss-log-warnings +[postcss-messages]: https://github.com/postcss/postcss-messages + +### 3.3. Allow the user to write source maps to different files + +PostCSS by default will inline source maps in the generated file; however, +PostCSS runners must provide an option to save the source map in a different +file: + +```js +if (result.map) { + fs.writeFile(opts.to + '.map', result.map.toString()) +} +``` + +## 4. Documentation + +### 4.1. Document your runner in English + +PostCSS runners must have their `README.md` wrote in English. Do not be afraid +of your English skills, as the open source community will fix your errors. + +Of course, you are welcome to write documentation in other languages; +just name them appropriately (e.g. `README.ja.md`). + +### 4.2. Maintain a changelog + +PostCSS runners must describe changes of all releases in a separate file, +such as `ChangeLog.md`, `History.md`, or with [GitHub Releases]. +Visit [Keep A Changelog] for more information on how to write one of these. + +Of course, you should use [SemVer]. + +[Keep A Changelog]: http://keepachangelog.com/ +[GitHub Releases]: https://help.github.com/articles/creating-releases/ +[SemVer]: http://semver.org/ + +### 4.3. `postcss-runner` keyword in `package.json` + +PostCSS runners written for npm must have the `postcss-runner` keyword +in their `package.json`. This special keyword will be useful for feedback about +the PostCSS ecosystem. + +For packages not published to npm, this is not mandatory, but recommended +if the package format is allowed to contain keywords. diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/source-maps.md b/node_modules/autoprefixer/node_modules/postcss/docs/source-maps.md new file mode 100644 index 0000000..ce29755 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/source-maps.md @@ -0,0 +1,74 @@ +# PostCSS and Source Maps + +PostCSS has great [source maps] support. It can read and interpret maps +from previous transformation steps, autodetect the format that you expect, +and output both external and inline maps. + +To ensure that you generate an accurate source map, you must indicate the input +and output CSS file paths — using the options `from` and `to`, respectively. + +To generate a new source map with the default options, simply set `map: true`. +This will generate an inline source map that contains the source content. +If you don’t want the map inlined, you can set `map.inline: false`. + +```js +processor + .process(css, { + from: 'app.sass.css', + to: 'app.css', + map: { inline: false } + }) + .then(result => { + result.map //=> '{ "version":3, + // "file":"app.css", + // "sources":["app.sass"], + // "mappings":"AAAA,KAAI" }' + }) +``` + +If PostCSS finds source maps from a previous transformation, +it will automatically update that source map with the same options. + +## Options + +If you want more control over source map generation, you can define the `map` +option as an object with the following parameters: + +* `inline` boolean: indicates that the source map should be embedded + in the output CSS as a Base64-encoded comment. By default, it is `true`. + But if all previous maps are external, not inline, PostCSS will not embed + the map even if you do not set this option. + + If you have an inline source map, the `result.map` property will be empty, + as the source map will be contained within the text of `result.css`. + +* `prev` string, object, boolean or function: source map content from + a previous processing step (for example, Sass compilation). + PostCSS will try to read the previous source map automatically + (based on comments within the source CSS), but you can use this option + to identify it manually. If desired, you can omit the previous map + with `prev: false`. + +* `sourcesContent` boolean: indicates that PostCSS should set the origin + content (for example, Sass source) of the source map. By default, + it is `true`. But if all previous maps do not contain sources content, + PostCSS will also leave it out even if you do not set this option. + +* `annotation` boolean or string: indicates that PostCSS should add annotation + comments to the CSS. By default, PostCSS will always add a comment with a path + to the source map. PostCSS will not add annotations to CSS files that + do not contain any comments. + + By default, PostCSS presumes that you want to save the source map as + `opts.to + '.map'` and will use this path in the annotation comment. + A different path can be set by providing a string value for `annotation`. + + If you have set `inline: true`, annotation cannot be disabled. + +* `from` string: by default, PostCSS will set the `sources` property of the map + to the value of the `from` option. If you want to override this behaviour, you + can use `map.from` to explicitly set the source map's `sources` property. + Path should be absolute or relative from generated file + (`to` option in `process()` method). + +[source maps]: http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ diff --git a/node_modules/autoprefixer/node_modules/postcss/docs/syntax.md b/node_modules/autoprefixer/node_modules/postcss/docs/syntax.md new file mode 100644 index 0000000..b0e1a60 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/docs/syntax.md @@ -0,0 +1,231 @@ +# How to Write Custom Syntax + +PostCSS can transform styles in any syntax, and is not limited to just CSS. +By writing a custom syntax, you can transform styles in any desired format. + +Writing a custom syntax is much harder than writing a PostCSS plugin, but +it is an awesome adventure. + +There are 3 types of PostCSS syntax packages: + +* **Parser** to parse input string to node’s tree. +* **Stringifier** to generate output string by node’s tree. +* **Syntax** contains both parser and stringifier. + +## Syntax + +A good example of a custom syntax is [SCSS]. Some users may want to transform +SCSS sources with PostCSS plugins, for example if they need to add vendor +prefixes or change the property order. So this syntax should output SCSS from +an SCSS input. + +The syntax API is a very simple plain object, with `parse` & `stringify` +functions: + +```js +module.exports = { + parse: require('./parse'), + stringify: require('./stringify') +} +``` + +[SCSS]: https://github.com/postcss/postcss-scss + +## Parser + +A good example of a parser is [Safe Parser], which parses malformed/broken CSS. +Because there is no point to generate broken output, this package only provides +a parser. + +The parser API is a function which receives a string & returns a [`Root`] node. +The second argument is a function which receives an object with PostCSS options. + +```js +const postcss = require('postcss') + +module.exports = function parse (css, opts) { + const root = postcss.root() + // Add other nodes to root + return root +} +``` + +[Safe Parser]: https://github.com/postcss/postcss-safe-parser +[`Root`]: http://api.postcss.org/Root.html + +### Main Theory + +There are many books about parsers; but do not worry because CSS syntax is +very easy, and so the parser will be much simpler than a programming language +parser. + +The default PostCSS parser contains two steps: + +1. [Tokenizer] which reads input string character by character and builds a + tokens array. For example, it joins space symbols to a `['space', '\n ']` + token, and detects strings to a `['string', '"\"{"']` token. +2. [Parser] which reads the tokens array, creates node instances and + builds a tree. + +[Tokenizer]: https://github.com/postcss/postcss/blob/master/lib/tokenize.es6 +[Parser]: https://github.com/postcss/postcss/blob/master/lib/parser.es6 + +### Performance + +Parsing input is often the most time consuming task in CSS processors. So it +is very important to have a fast parser. + +The main rule of optimization is that there is no performance without a +benchmark. You can look at [PostCSS benchmarks] to build your own. + +Of parsing tasks, the tokenize step will often take the most time, so its +performance should be prioritized. Unfortunately, classes, functions and +high level structures can slow down your tokenizer. Be ready to write dirty +code with repeated statements. This is why it is difficult to extend the +default [PostCSS tokenizer]; copy & paste will be a necessary evil. + +Second optimization is using character codes instead of strings. + +```js +// Slow +string[i] === '{' + +// Fast +const OPEN_CURLY = 123 // `{' +string.charCodeAt(i) === OPEN_CURLY +``` + +Third optimization is “fast jumps”. If you find open quotes, you can find +next closing quote much faster by `indexOf`: + +```js +// Simple jump +next = string.indexOf('"', currentPosition + 1) + +// Jump by RegExp +regexp.lastIndex = currentPosion + 1 +regexp.test(string) +next = regexp.lastIndex +``` + +The parser can be a well written class. There is no need in copy-paste and +hardcore optimization there. You can extend the default [PostCSS parser]. + +[PostCSS benchmarks]: https://github.com/postcss/benchmark +[PostCSS tokenizer]: https://github.com/postcss/postcss/blob/master/lib/tokenize.es6 +[PostCSS parser]: https://github.com/postcss/postcss/blob/master/lib/parser.es6 + +### Node Source + +Every node should have `source` property to generate correct source map. +This property contains `start` and `end` properties with `{ line, column }`, +and `input` property with an [`Input`] instance. + +Your tokenizer should save the original position so that you can propagate +the values to the parser, to ensure that the source map is correctly updated. + +[`Input`]: https://github.com/postcss/postcss/blob/master/lib/input.es6 + +### Raw Values + +A good PostCSS parser should provide all information (including spaces symbols) +to generate byte-to-byte equal output. It is not so difficult, but respectful +for user input and allow integration smoke tests. + +A parser should save all additional symbols to `node.raws` object. +It is an open structure for you, you can add additional keys. +For example, [SCSS parser] saves comment types (`/* */` or `//`) +in `node.raws.inline`. + +The default parser cleans CSS values from comments and spaces. +It saves the original value with comments to `node.raws.value.raw` and uses it, +if the node value was not changed. + +[SCSS parser]: https://github.com/postcss/postcss-scss + +### Tests + +Of course, all parsers in the PostCSS ecosystem must have tests. + +If your parser just extends CSS syntax (like [SCSS] or [Safe Parser]), +you can use the [PostCSS Parser Tests]. It contains unit & integration tests. + +[PostCSS Parser Tests]: https://github.com/postcss/postcss-parser-tests + +## Stringifier + +A style guide generator is a good example of a stringifier. It generates output +HTML which contains CSS components. For this use case, a parser isn't necessary, +so the package should just contain a stringifier. + +The Stringifier API is little bit more complicated, than the parser API. +PostCSS generates a source map, so a stringifier can’t just return a string. +It must link every substring with its source node. + +A Stringifier is a function which receives [`Root`] node and builder callback. +Then it calls builder with every node’s string and node instance. + +```js +module.exports = function stringify (root, builder) { + // Some magic + const string = decl.prop + ':' + decl.value + ';' + builder(string, decl) + // Some science +}; +``` + +### Main Theory + +PostCSS [default stringifier] is just a class with a method for each node type +and many methods to detect raw properties. + +In most cases it will be enough just to extend this class, +like in [SCSS stringifier]. + +[default stringifier]: https://github.com/postcss/postcss/blob/master/lib/stringifier.es6 +[SCSS stringifier]: https://github.com/postcss/postcss-scss/blob/master/lib/scss-stringifier.es6 + +### Builder Function + +A builder function will be passed to `stringify` function as second argument. +For example, the default PostCSS stringifier class saves it +to `this.builder` property. + +Builder receives output substring and source node to append this substring +to the final output. + +Some nodes contain other nodes in the middle. For example, a rule has a `{` +at the beginning, many declarations inside and a closing `}`. + +For these cases, you should pass a third argument to builder function: +`'start'` or `'end'` string: + +```js +this.builder(rule.selector + '{', rule, 'start') +// Stringify declarations inside +this.builder('}', rule, 'end') +``` + +### Raw Values + +A good PostCSS custom syntax saves all symbols and provide byte-to-byte equal +output if there were no changes. + +This is why every node has `node.raws` object to store space symbol, etc. + +Be careful, because sometimes these raw properties will not be present; some +nodes may be built manually, or may lose their indentation when they are moved +to another parent node. + +This is why the default stringifier has a `raw()` method to autodetect raw +properties by other nodes. For example, it will look at other nodes to detect +indent size and them multiply it with the current node depth. + +### Tests + +A stringifier must have tests too. + +You can use unit and integration test cases from [PostCSS Parser Tests]. +Just compare input CSS with CSS after your parser and stringifier. + +[PostCSS Parser Tests]: https://github.com/postcss/postcss-parser-tests diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js b/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js new file mode 100644 index 0000000..619c04a --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/at-rule.js @@ -0,0 +1,129 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _container = _interopRequireDefault(require("./container")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +/** + * Represents an at-rule. + * + * If it’s followed in the CSS by a {} block, this node will have + * a nodes property representing its children. + * + * @extends Container + * + * @example + * const root = postcss.parse('@charset "UTF-8"; @media print {}') + * + * const charset = root.first + * charset.type //=> 'atrule' + * charset.nodes //=> undefined + * + * const media = root.last + * media.nodes //=> [] + */ +var AtRule = +/*#__PURE__*/ +function (_Container) { + _inheritsLoose(AtRule, _Container); + + function AtRule(defaults) { + var _this; + + _this = _Container.call(this, defaults) || this; + _this.type = 'atrule'; + return _this; + } + + var _proto = AtRule.prototype; + + _proto.append = function append() { + var _Container$prototype$; + + if (!this.nodes) this.nodes = []; + + for (var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++) { + children[_key] = arguments[_key]; + } + + return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children)); + }; + + _proto.prepend = function prepend() { + var _Container$prototype$2; + + if (!this.nodes) this.nodes = []; + + for (var _len2 = arguments.length, children = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + children[_key2] = arguments[_key2]; + } + + return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children)); + } + /** + * @memberof AtRule# + * @member {string} name The at-rule’s name immediately follows the `@`. + * + * @example + * const root = postcss.parse('@media print {}') + * media.name //=> 'media' + * const media = root.first + */ + + /** + * @memberof AtRule# + * @member {string} params The at-rule’s parameters, the values + * that follow the at-rule’s name but precede + * any {} block. + * + * @example + * const root = postcss.parse('@media print, screen {}') + * const media = root.first + * media.params //=> 'print, screen' + */ + + /** + * @memberof AtRule# + * @member {object} raws Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * + * PostCSS cleans at-rule parameters from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse(' @media\nprint {\n}') + * root.first.first.raws //=> { before: ' ', + * // between: ' ', + * // afterName: '\n', + * // after: '\n' } + */ + ; + + return AtRule; +}(_container.default); + +var _default = AtRule; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF0LXJ1bGUuZXM2Il0sIm5hbWVzIjpbIkF0UnVsZSIsImRlZmF1bHRzIiwidHlwZSIsImFwcGVuZCIsIm5vZGVzIiwiY2hpbGRyZW4iLCJwcmVwZW5kIiwiQ29udGFpbmVyIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBa0JNQSxNOzs7OztBQUNKLGtCQUFhQyxRQUFiLEVBQXVCO0FBQUE7O0FBQ3JCLGtDQUFNQSxRQUFOO0FBQ0EsVUFBS0MsSUFBTCxHQUFZLFFBQVo7QUFGcUI7QUFHdEI7Ozs7U0FFREMsTSxHQUFBLGtCQUFxQjtBQUFBOztBQUNuQixRQUFJLENBQUMsS0FBS0MsS0FBVixFQUFpQixLQUFLQSxLQUFMLEdBQWEsRUFBYjs7QUFERSxzQ0FBVkMsUUFBVTtBQUFWQSxNQUFBQSxRQUFVO0FBQUE7O0FBRW5CLHlEQUFhRixNQUFiLGtEQUF1QkUsUUFBdkI7QUFDRCxHOztTQUVEQyxPLEdBQUEsbUJBQXNCO0FBQUE7O0FBQ3BCLFFBQUksQ0F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AqICogYGFmdGVyTmFtZWA6IHRoZSBzcGFjZSBiZXR3ZWVuIHRoZSBhdC1ydWxlIG5hbWUgYW5kIGl0cyBwYXJhbWV0ZXJzLlxuICAgKlxuICAgKiBQb3N0Q1NTIGNsZWFucyBhdC1ydWxlIHBhcmFtZXRlcnMgZnJvbSBjb21tZW50cyBhbmQgZXh0cmEgc3BhY2VzLFxuICAgKiBidXQgaXQgc3RvcmVzIG9yaWdpbiBjb250ZW50IGluIHJhd3MgcHJvcGVydGllcy5cbiAgICogQXMgc3VjaCwgaWYgeW91IGRvbuKAmXQgY2hhbmdlIGEgZGVjbGFyYXRpb27igJlzIHZhbHVlLFxuICAgKiBQb3N0Q1NTIHdpbGwgdXNlIHRoZSByYXcgdmFsdWUgd2l0aCBjb21tZW50cy5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJyAgQG1lZGlhXFxucHJpbnQge1xcbn0nKVxuICAgKiByb290LmZpcnN0LmZpcnN0LnJhd3MgLy89PiB7IGJlZm9yZTogJyAgJyxcbiAgICogICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBiZXR3ZWVuOiAnICcsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgYWZ0ZXJOYW1lOiAnXFxuJyxcbiAgICogICAgICAgICAgICAgICAgICAgICAgIC8vICAgICBhZnRlcjogJ1xcbicgfVxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQXRSdWxlXG4iXSwiZmlsZSI6ImF0LXJ1bGUuanMifQ== diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/comment.js b/node_modules/autoprefixer/node_modules/postcss/lib/comment.js new file mode 100644 index 0000000..c9db73e --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/comment.js @@ -0,0 +1,57 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _node = _interopRequireDefault(require("./node")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +/** + * Represents a comment between declarations or statements (rule and at-rules). + * + * Comments inside selectors, at-rule parameters, or declaration values + * will be stored in the `raws` properties explained above. + * + * @extends Node + */ +var Comment = +/*#__PURE__*/ +function (_Node) { + _inheritsLoose(Comment, _Node); + + function Comment(defaults) { + var _this; + + _this = _Node.call(this, defaults) || this; + _this.type = 'comment'; + return _this; + } + /** + * @memberof Comment# + * @member {string} text The comment’s text. + */ + + /** + * @memberof Comment# + * @member {object} raws Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text. + */ + + + return Comment; +}(_node.default); + +var _default = Comment; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJOb2RlIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7SUFRTUEsTzs7Ozs7QUFDSixtQkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUNyQiw2QkFBTUEsUUFBTjtBQUNBLFVBQUtDLElBQUwsR0FBWSxTQUFaO0FBRnFCO0FBR3RCO0FBRUQ7Ozs7O0FBS0E7Ozs7Ozs7Ozs7Ozs7OztFQVhvQkMsYTs7ZUF5QlBILE8iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTm9kZSBmcm9tICcuL25vZGUnXG5cbi8qKlxuICogUmVwcmVzZW50cyBhIGNvbW1lbnQgYmV0d2VlbiBkZWNsYXJhdGlvbnMgb3Igc3RhdGV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zcGFjZSBzeW1ib2xzIGJldHdlZW4gdGhlIGNvbW1lbnTigJlzIHRleHQuXG4gICAqL1xufVxuXG5leHBvcnQgZGVmYXVsdCBDb21tZW50XG4iXSwiZmlsZSI6ImNvbW1lbnQuanMifQ== diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/container.js b/node_modules/autoprefixer/node_modules/postcss/lib/container.js new file mode 100644 index 0000000..b41c891 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/container.js @@ -0,0 +1,869 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _declaration = _interopRequireDefault(require("./declaration")); + +var _comment = _interopRequireDefault(require("./comment")); + +var _node = _interopRequireDefault(require("./node")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +function cleanSource(nodes) { + return nodes.map(function (i) { + if (i.nodes) i.nodes = cleanSource(i.nodes); + delete i.source; + return i; + }); +} +/** + * The {@link Root}, {@link AtRule}, and {@link Rule} container nodes + * inherit some common methods to help work with their children. + * + * Note that all containers can store any content. If you write a rule inside + * a rule, PostCSS will parse it. + * + * @extends Node + * @abstract + */ + + +var Container = +/*#__PURE__*/ +function (_Node) { + _inheritsLoose(Container, _Node); + + function Container() { + return _Node.apply(this, arguments) || this; + } + + var _proto = Container.prototype; + + _proto.push = function push(child) { + child.parent = this; + this.nodes.push(child); + return this; + } + /** + * Iterates through the container’s immediate children, + * calling `callback` for each child. + * + * Returning `false` in the callback will break iteration. + * + * This method only iterates through the container’s immediate children. + * If you need to recursively iterate through all the container’s descendant + * nodes, use {@link Container#walk}. + * + * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe + * if you are mutating the array of child nodes during iteration. + * PostCSS will adjust the current index to match the mutations. + * + * @param {childIterator} callback Iterator receives each node and index. + * + * @return {false|undefined} Returns `false` if iteration was broke. + * + * @example + * const root = postcss.parse('a { color: black; z-index: 1 }') + * const rule = root.first + * + * for (const decl of rule.nodes) { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Cycle will be infinite, because cloneBefore moves the current node + * // to the next index + * } + * + * rule.each(decl => { + * decl.cloneBefore({ prop: '-webkit-' + decl.prop }) + * // Will be executed only for color and z-index + * }) + */ + ; + + _proto.each = function each(callback) { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + this.lastEach += 1; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.nodes) return undefined; + var index, result; + + while (this.indexes[id] < this.nodes.length) { + index = this.indexes[id]; + result = callback(this.nodes[index], index); + if (result === false) break; + this.indexes[id] += 1; + } + + delete this.indexes[id]; + return result; + } + /** + * Traverses the container’s descendant nodes, calling callback + * for each node. + * + * Like container.each(), this method is safe to use + * if you are mutating arrays during iteration. + * + * If you only need to iterate through the container’s immediate children, + * use {@link Container#each}. + * + * @param {childIterator} callback Iterator receives each node and index. + * + * @return {false|undefined} Returns `false` if iteration was broke. + * + * @example + * root.walk(node => { + * // Traverses all descendant nodes. + * }) + */ + ; + + _proto.walk = function walk(callback) { + return this.each(function (child, i) { + var result; + + try { + result = callback(child, i); + } catch (e) { + e.postcssNode = child; + + if (e.stack && child.source && /\n\s{4}at /.test(e.stack)) { + var s = child.source; + e.stack = e.stack.replace(/\n\s{4}at /, "$&" + s.input.from + ":" + s.start.line + ":" + s.start.column + "$&"); + } + + throw e; + } + + if (result !== false && child.walk) { + result = child.walk(callback); + } + + return result; + }); + } + /** + * Traverses the container’s descendant nodes, calling callback + * for each declaration node. + * + * If you pass a filter, iteration will only happen over declarations + * with matching properties. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [prop] String or regular expression + * to filter declarations by property name. + * @param {childIterator} callback Iterator receives each node and index. + * + * @return {false|undefined} Returns `false` if iteration was broke. + * + * @example + * root.walkDecls(decl => { + * checkPropertySupport(decl.prop) + * }) + * + * root.walkDecls('border-radius', decl => { + * decl.remove() + * }) + * + * root.walkDecls(/^background/, decl => { + * decl.value = takeFirstColorFromGradient(decl.value) + * }) + */ + ; + + _proto.walkDecls = function walkDecls(prop, callback) { + if (!callback) { + callback = prop; + return this.walk(function (child, i) { + if (child.type === 'decl') { + return callback(child, i); + } + }); + } + + if (prop instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i); + } + }); + } + + return this.walk(function (child, i) { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i); + } + }); + } + /** + * Traverses the container’s descendant nodes, calling callback + * for each rule node. + * + * If you pass a filter, iteration will only happen over rules + * with matching selectors. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [selector] String or regular expression + * to filter rules by selector. + * @param {childIterator} callback Iterator receives each node and index. + * + * @return {false|undefined} returns `false` if iteration was broke. + * + * @example + * const selectors = [] + * root.walkRules(rule => { + * selectors.push(rule.selector) + * }) + * console.log(`Your CSS uses ${ selectors.length } selectors`) + */ + ; + + _proto.walkRules = function walkRules(selector, callback) { + if (!callback) { + callback = selector; + return this.walk(function (child, i) { + if (child.type === 'rule') { + return callback(child, i); + } + }); + } + + if (selector instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i); + } + }); + } + + return this.walk(function (child, i) { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i); + } + }); + } + /** + * Traverses the container’s descendant nodes, calling callback + * for each at-rule node. + * + * If you pass a filter, iteration will only happen over at-rules + * that have matching names. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {string|RegExp} [name] String or regular expression + * to filter at-rules by name. + * @param {childIterator} callback Iterator receives each node and index. + * + * @return {false|undefined} Returns `false` if iteration was broke. + * + * @example + * root.walkAtRules(rule => { + * if (isOld(rule.name)) rule.remove() + * }) + * + * let first = false + * root.walkAtRules('charset', rule => { + * if (!first) { + * first = true + * } else { + * rule.remove() + * } + * }) + */ + ; + + _proto.walkAtRules = function walkAtRules(name, callback) { + if (!callback) { + callback = name; + return this.walk(function (child, i) { + if (child.type === 'atrule') { + return callback(child, i); + } + }); + } + + if (name instanceof RegExp) { + return this.walk(function (child, i) { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i); + } + }); + } + + return this.walk(function (child, i) { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i); + } + }); + } + /** + * Traverses the container’s descendant nodes, calling callback + * for each comment node. + * + * Like {@link Container#each}, this method is safe + * to use if you are mutating arrays during iteration. + * + * @param {childIterator} callback Iterator receives each node and index. + * + * @return {false|undefined} Returns `false` if iteration was broke. + * + * @example + * root.walkComments(comment => { + * comment.remove() + * }) + */ + ; + + _proto.walkComments = function walkComments(callback) { + return this.walk(function (child, i) { + if (child.type === 'comment') { + return callback(child, i); + } + }); + } + /** + * Inserts new nodes to the end of the container. + * + * @param {...(Node|object|string|Node[])} children New nodes. + * + * @return {Node} This node for methods chain. + * + * @example + * const decl1 = postcss.decl({ prop: 'color', value: 'black' }) + * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' }) + * rule.append(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + */ + ; + + _proto.append = function append() { + for (var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++) { + children[_key] = arguments[_key]; + } + + for (var _i = 0, _children = children; _i < _children.length; _i++) { + var child = _children[_i]; + var nodes = this.normalize(child, this.last); + + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i2 >= _iterator.length) break; + _ref = _iterator[_i2++]; + } else { + _i2 = _iterator.next(); + if (_i2.done) break; + _ref = _i2.value; + } + + var node = _ref; + this.nodes.push(node); + } + } + + return this; + } + /** + * Inserts new nodes to the start of the container. + * + * @param {...(Node|object|string|Node[])} children New nodes. + * + * @return {Node} This node for methods chain. + * + * @example + * const decl1 = postcss.decl({ prop: 'color', value: 'black' }) + * const decl2 = postcss.decl({ prop: 'background-color', value: 'white' }) + * rule.prepend(decl1, decl2) + * + * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule + * root.append({ selector: 'a' }) // rule + * rule.append({ prop: 'color', value: 'black' }) // declaration + * rule.append({ text: 'Comment' }) // comment + * + * root.append('a {}') + * root.first.append('color: black; z-index: 1') + */ + ; + + _proto.prepend = function prepend() { + for (var _len2 = arguments.length, children = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + children[_key2] = arguments[_key2]; + } + + children = children.reverse(); + + for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i3 >= _iterator2.length) break; + _ref2 = _iterator2[_i3++]; + } else { + _i3 = _iterator2.next(); + if (_i3.done) break; + _ref2 = _i3.value; + } + + var child = _ref2; + var nodes = this.normalize(child, this.first, 'prepend').reverse(); + + for (var _iterator3 = nodes, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i4 >= _iterator3.length) break; + _ref3 = _iterator3[_i4++]; + } else { + _i4 = _iterator3.next(); + if (_i4.done) break; + _ref3 = _i4.value; + } + + var node = _ref3; + this.nodes.unshift(node); + } + + for (var id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length; + } + } + + return this; + }; + + _proto.cleanRaws = function cleanRaws(keepBetween) { + _Node.prototype.cleanRaws.call(this, keepBetween); + + if (this.nodes) { + for (var _iterator4 = this.nodes, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) { + var _ref4; + + if (_isArray4) { + if (_i5 >= _iterator4.length) break; + _ref4 = _iterator4[_i5++]; + } else { + _i5 = _iterator4.next(); + if (_i5.done) break; + _ref4 = _i5.value; + } + + var node = _ref4; + node.cleanRaws(keepBetween); + } + } + } + /** + * Insert new node before old node within the container. + * + * @param {Node|number} exist Child or child’s index. + * @param {Node|object|string|Node[]} add New node. + * + * @return {Node} This node for methods chain. + * + * @example + * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop })) + */ + ; + + _proto.insertBefore = function insertBefore(exist, add) { + exist = this.index(exist); + var type = exist === 0 ? 'prepend' : false; + var nodes = this.normalize(add, this.nodes[exist], type).reverse(); + + for (var _iterator5 = nodes, _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) { + var _ref5; + + if (_isArray5) { + if (_i6 >= _iterator5.length) break; + _ref5 = _iterator5[_i6++]; + } else { + _i6 = _iterator5.next(); + if (_i6.done) break; + _ref5 = _i6.value; + } + + var node = _ref5; + this.nodes.splice(exist, 0, node); + } + + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (exist <= index) { + this.indexes[id] = index + nodes.length; + } + } + + return this; + } + /** + * Insert new node after old node within the container. + * + * @param {Node|number} exist Child or child’s index. + * @param {Node|object|string|Node[]} add New node. + * + * @return {Node} This node for methods chain. + */ + ; + + _proto.insertAfter = function insertAfter(exist, add) { + exist = this.index(exist); + var nodes = this.normalize(add, this.nodes[exist]).reverse(); + + for (var _iterator6 = nodes, _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) { + var _ref6; + + if (_isArray6) { + if (_i7 >= _iterator6.length) break; + _ref6 = _iterator6[_i7++]; + } else { + _i7 = _iterator6.next(); + if (_i7.done) break; + _ref6 = _i7.value; + } + + var node = _ref6; + this.nodes.splice(exist + 1, 0, node); + } + + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (exist < index) { + this.indexes[id] = index + nodes.length; + } + } + + return this; + } + /** + * Removes node from the container and cleans the parent properties + * from the node and its children. + * + * @param {Node|number} child Child or child’s index. + * + * @return {Node} This node for methods chain + * + * @example + * rule.nodes.length //=> 5 + * rule.removeChild(decl) + * rule.nodes.length //=> 4 + * decl.parent //=> undefined + */ + ; + + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.nodes[child].parent = undefined; + this.nodes.splice(child, 1); + var index; + + for (var id in this.indexes) { + index = this.indexes[id]; + + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + return this; + } + /** + * Removes all children from the container + * and cleans their parent properties. + * + * @return {Node} This node for methods chain. + * + * @example + * rule.removeAll() + * rule.nodes.length //=> 0 + */ + ; + + _proto.removeAll = function removeAll() { + for (var _iterator7 = this.nodes, _isArray7 = Array.isArray(_iterator7), _i8 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) { + var _ref7; + + if (_isArray7) { + if (_i8 >= _iterator7.length) break; + _ref7 = _iterator7[_i8++]; + } else { + _i8 = _iterator7.next(); + if (_i8.done) break; + _ref7 = _i8.value; + } + + var node = _ref7; + node.parent = undefined; + } + + this.nodes = []; + return this; + } + /** + * Passes all declaration values within the container that match pattern + * through callback, replacing those values with the returned result + * of callback. + * + * This method is useful if you are using a custom unit or function + * and need to iterate through all values. + * + * @param {string|RegExp} pattern Replace pattern. + * @param {object} opts Options to speed up the search. + * @param {string|string[]} opts.props An array of property names. + * @param {string} opts.fast String that’s used to narrow down + * values and speed up the regexp search. + * @param {function|string} callback String to replace pattern or callback + * that returns a new value. The callback + * will receive the same arguments + * as those passed to a function parameter + * of `String#replace`. + * + * @return {Node} This node for methods chain. + * + * @example + * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => { + * return 15 * parseInt(string) + 'px' + * }) + */ + ; + + _proto.replaceValues = function replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts; + opts = {}; + } + + this.walkDecls(function (decl) { + if (opts.props && opts.props.indexOf(decl.prop) === -1) return; + if (opts.fast && decl.value.indexOf(opts.fast) === -1) return; + decl.value = decl.value.replace(pattern, callback); + }); + return this; + } + /** + * Returns `true` if callback returns `true` + * for all of the container’s children. + * + * @param {childCondition} condition Iterator returns true or false. + * + * @return {boolean} Is every child pass condition. + * + * @example + * const noPrefixes = rule.every(i => i.prop[0] !== '-') + */ + ; + + _proto.every = function every(condition) { + return this.nodes.every(condition); + } + /** + * Returns `true` if callback returns `true` for (at least) one + * of the container’s children. + * + * @param {childCondition} condition Iterator returns true or false. + * + * @return {boolean} Is some child pass condition. + * + * @example + * const hasPrefix = rule.some(i => i.prop[0] === '-') + */ + ; + + _proto.some = function some(condition) { + return this.nodes.some(condition); + } + /** + * Returns a `child`’s index within the {@link Container#nodes} array. + * + * @param {Node} child Child of the current container. + * + * @return {number} Child index. + * + * @example + * rule.index( rule.nodes[2] ) //=> 2 + */ + ; + + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + + return this.nodes.indexOf(child); + } + /** + * The container’s first child. + * + * @type {Node} + * + * @example + * rule.first === rules.nodes[0] + */ + ; + + _proto.normalize = function normalize(nodes, sample) { + var _this = this; + + if (typeof nodes === 'string') { + var parse = require('./parse'); + + nodes = cleanSource(parse(nodes).nodes); + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0); + + for (var _iterator8 = nodes, _isArray8 = Array.isArray(_iterator8), _i9 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) { + var _ref8; + + if (_isArray8) { + if (_i9 >= _iterator8.length) break; + _ref8 = _iterator8[_i9++]; + } else { + _i9 = _iterator8.next(); + if (_i9.done) break; + _ref8 = _i9.value; + } + + var i = _ref8; + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type === 'root') { + nodes = nodes.nodes.slice(0); + + for (var _iterator9 = nodes, _isArray9 = Array.isArray(_iterator9), _i10 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) { + var _ref9; + + if (_isArray9) { + if (_i10 >= _iterator9.length) break; + _ref9 = _iterator9[_i10++]; + } else { + _i10 = _iterator9.next(); + if (_i10.done) break; + _ref9 = _i10.value; + } + + var _i11 = _ref9; + if (_i11.parent) _i11.parent.removeChild(_i11, 'ignore'); + } + } else if (nodes.type) { + nodes = [nodes]; + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation'); + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value); + } + + nodes = [new _declaration.default(nodes)]; + } else if (nodes.selector) { + var Rule = require('./rule'); + + nodes = [new Rule(nodes)]; + } else if (nodes.name) { + var AtRule = require('./at-rule'); + + nodes = [new AtRule(nodes)]; + } else if (nodes.text) { + nodes = [new _comment.default(nodes)]; + } else { + throw new Error('Unknown node type in node creation'); + } + + var processed = nodes.map(function (i) { + if (i.parent) i.parent.removeChild(i); + + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/[^\s]/g, ''); + } + } + + i.parent = _this; + return i; + }); + return processed; + } + /** + * @memberof Container# + * @member {Node[]} nodes An array containing the container’s children. + * + * @example + * const root = postcss.parse('a { color: black }') + * root.nodes.length //=> 1 + * root.nodes[0].selector //=> 'a' + * root.nodes[0].nodes[0].prop //=> 'color' + */ + ; + + _createClass(Container, [{ + key: "first", + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[0]; + } + /** + * The container’s last child. + * + * @type {Node} + * + * @example + * rule.last === rule.nodes[rule.nodes.length - 1] + */ + + }, { + key: "last", + get: function get() { + if (!this.nodes) return undefined; + return this.nodes[this.nodes.length - 1]; + } + }]); + + return Container; +}(_node.default); + +var _default = Container; +/** + * @callback childCondition + * @param {Node} node Container child. + * @param {number} index Child index. + * @param {Node[]} nodes All container children. + * @return {boolean} + */ + +/** + * @callback childIterator + * @param {Node} node Container child. + * @param {number} index Child index. + * @return {false|undefined} Returning `false` will break iteration. + */ + +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbnRhaW5lci5lczYiXSwibmFtZXMiOlsiY2xlYW5Tb3VyY2UiLCJub2RlcyIsIm1hcCIsImkiLCJzb3VyY2UiLCJDb250YWluZXIiLCJwdXNoIiwiY2hpbGQiLCJwYXJlbnQiLCJlYWNoIiwiY2FsbGJhY2siLCJsYXN0RWFjaCIsImluZGV4ZXMiLCJpZCIsInVuZGVmaW5lZCIsImluZGV4IiwicmVzdWx0IiwibGVuZ3RoIiwid2FsayIsImUiLCJwb3N0Y3NzTm9kZSIsInN0YWNrIiwidGVzdCIsInMiLCJyZXBsYWNlIiwiaW5wdXQiLCJmcm9tIiwic3RhcnQiLCJsaW5lIiwiY29sdW1uIiwid2Fsa0RlY2xzIiwicHJvcCIsInR5cGUiLCJSZWdFeHAiLCJ3YWxrUnVsZXMiLCJzZWxlY3RvciIsIndhbGtBdFJ1bGVzIiwibmFtZSIsIndhbGtDb21tZW50cyIsImFwcGVuZCIsImNoaWxkcmVuIiwibm9ybWFsaXplIiwibGFzdCIsIm5vZGUiLCJwcmVwZW5kIiwicmV2ZXJzZSIsImZpcnN0IiwidW5zaGlmdCIsImNsZWFuUmF3cyIsImtlZXBCZXR3ZWVuIiwiaW5zZXJ0QmVmb3JlIiwiZXhpc3QiLCJhZGQiLCJzcGxpY2UiLC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sgICBTdHJpbmcgdG8gcmVwbGFjZSBwYXR0ZXJuIG9yIGNhbGxiYWNrXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQgcmV0dXJucyBhIG5ldyB2YWx1ZS4gVGhlIGNhbGxiYWNrXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbGwgcmVjZWl2ZSB0aGUgc2FtZSBhcmd1bWVudHNcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXMgdGhvc2UgcGFzc2VkIHRvIGEgZnVuY3Rpb24gcGFyYW1ldGVyXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mIGBTdHJpbmcjcmVwbGFjZWAuXG4gICAqXG4gICAqIEByZXR1cm4ge05vZGV9IFRoaXMgbm9kZSBmb3IgbWV0aG9kcyBjaGFpbi5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogcm9vdC5yZXBsYWNlVmFsdWVzKC9cXGQrcmVtLywgeyBmYXN0OiAncmVtJyB9LCBzdHJpbmcgPT4ge1xuICAgKiAgIHJldHVybiAxNSAqIHBhcnNlSW50KHN0cmluZykgKyAncHgnXG4gICAqIH0pXG4gICAqL1xuICByZXBsYWNlVmFsdWVzIChwYXR0ZXJuLCBvcHRzLCBjYWxsYmFjaykge1xuICAgIGlmICghY2FsbGJhY2spIHtcbiAgICAgIGNhbGxiYWNrID0gb3B0c1xuICAgICAgb3B0cyA9IHsgfVxuICAgIH1cblxuICAgIHRoaXMud2Fsa0RlY2xzKGRlY2wgPT4ge1xuICAgICAgaWYgKG9wdHMucHJvcHMgJiYgb3B0cy5wcm9wcy5pbmRleE9mKGRlY2wucHJvcCkgPT09IC0xKSByZXR1cm5cbiAgICAgIGlmIChvcHRzLmZhc3QgJiYgZGVjbC52YWx1ZS5pbmRleE9mKG9wdHMuZmFzdCkgPT09IC0xKSByZXR1cm5cblxuICAgICAgZGVjbC52YW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uXG4gIC8qKlxuICAgKiBAbWVtYmVyb2YgQ29udGFpbmVyI1xuICAgKiBAbWVtYmVyIHtOb2RlW119IG5vZGVzIEFuIGFycmF5IGNvbnRhaW5pbmcgdGhlIGNvbnRhaW5lcuKAmXMgY2hpbGRyZW4uXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhIHsgY29sb3I6IGJsYWNrIH0nKVxuICAgKiByb290Lm5vZGVzLmxlbmd0aCAgICAgICAgICAgLy89PiAxXG4gICAqIHJvb3Qubm9kZXNbMF0uc2VsZWN0b3IgICAgICAvLz0+ICdhJ1xuICAgKiByb290Lm5vZGVzWzBdLm5vZGVzWzBdLnByb3AgLy89PiAnY29sb3InXG4gICAqL1xufVxuXG5leHBvcnQgZGVmYXVsdCBDb250YWluZXJcblxuLyoqXG4gKiBAY2FsbGJhY2sgY2hpbGRDb25kaXRpb25cbiAqIEBwYXJhbSB7Tm9kZX0gbm9kZSAgICBDb250YWluZXIgY2hpbGQuXG4gKiBAcGFyYW0ge251bWJlcn0gaW5kZXggQ2hpbGQgaW5kZXguXG4gKiBAcGFyYW0ge05vZGVbXX0gbm9kZXMgQWxsIGNvbnRhaW5lciBjaGlsZHJlbi5cbiAqIEByZXR1cm4ge2Jvb2xlYW59XG4gKi9cblxuLyoqXG4gKiBAY2FsbGJhY2sgY2hpbGRJdGVyYXRvclxuICogQHBhcmFtIHtOb2RlfSBub2RlICAgIENvbnRhaW5lciBjaGlsZC5cbiAqIEBwYXJhbSB7bnVtYmVyfSBpbmRleCBDaGlsZCBpbmRleC5cbiAqIEByZXR1cm4ge2ZhbHNlfHVuZGVmaW5lZH0gUmV0dXJuaW5nIGBmYWxzZWAgd2lsbCBicmVhayBpdGVyYXRpb24uXG4gKi9cbiJdLCJmaWxlIjoiY29udGFpbmVyLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/css-syntax-error.js b/node_modules/autoprefixer/node_modules/postcss/lib/css-syntax-error.js new file mode 100644 index 0000000..833e4ec --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/css-syntax-error.js @@ -0,0 +1,300 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _supportsColor = _interopRequireDefault(require("supports-color")); + +var _chalk = _interopRequireDefault(require("chalk")); + +var _terminalHighlight = _interopRequireDefault(require("./terminal-highlight")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } + +function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } + +function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +/** + * The CSS parser throws this error for broken CSS. + * + * Custom parsers can throw this error for broken custom syntax using + * the {@link Node#error} method. + * + * PostCSS will use the input source map to detect the original error location. + * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. + * + * If you need the position in the PostCSS input + * (e.g., to debug the previous compiler), use `error.input.file`. + * + * @example + * // Catching and checking syntax error + * try { + * postcss.parse('a{') + * } catch (error) { + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + * } + * + * @example + * // Raising error from plugin + * throw node.error('Unknown variable', { plugin: 'postcss-vars' }) + */ +var CssSyntaxError = +/*#__PURE__*/ +function (_Error) { + _inheritsLoose(CssSyntaxError, _Error); + + /** + * @param {string} message Error message. + * @param {number} [line] Source line of the error. + * @param {number} [column] Source column of the error. + * @param {string} [source] Source code of the broken file. + * @param {string} [file] Absolute path to the broken file. + * @param {string} [plugin] PostCSS plugin name, if error came from plugin. + */ + function CssSyntaxError(message, line, column, source, file, plugin) { + var _this; + + _this = _Error.call(this, message) || this; + /** + * Always equal to `'CssSyntaxError'`. You should always check error type + * by `error.name === 'CssSyntaxError'` + * instead of `error instanceof CssSyntaxError`, + * because npm could have several PostCSS versions. + * + * @type {string} + * + * @example + * if (error.name === 'CssSyntaxError') { + * error //=> CssSyntaxError + * } + */ + + _this.name = 'CssSyntaxError'; + /** + * Error message. + * + * @type {string} + * + * @example + * error.message //=> 'Unclosed block' + */ + + _this.reason = message; + + if (file) { + /** + * Absolute path to the broken file. + * + * @type {string} + * + * @example + * error.file //=> 'a.sass' + * error.input.file //=> 'a.css' + */ + _this.file = file; + } + + if (source) { + /** + * Source code of the broken file. + * + * @type {string} + * + * @example + * error.source //=> 'a { b {} }' + * error.input.column //=> 'a b { }' + */ + _this.source = source; + } + + if (plugin) { + /** + * Plugin name, if error came from plugin. + * + * @type {string} + * + * @example + * error.plugin //=> 'postcss-vars' + */ + _this.plugin = plugin; + } + + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + /** + * Source line of the error. + * + * @type {number} + * + * @example + * error.line //=> 2 + * error.input.line //=> 4 + */ + _this.line = line; + /** + * Source column of the error. + * + * @type {number} + * + * @example + * error.column //=> 1 + * error.input.column //=> 4 + */ + + _this.column = column; + } + + _this.setMessage(); + + if (Error.captureStackTrace) { + Error.captureStackTrace(_assertThisInitialized(_this), CssSyntaxError); + } + + return _this; + } + + var _proto = CssSyntaxError.prototype; + + _proto.setMessage = function setMessage() { + /** + * Full error text in the GNU error format + * with plugin, file, line and column. + * + * @type {string} + * + * @example + * error.message //=> 'a.css:1:1: Unclosed block' + */ + this.message = this.plugin ? this.plugin + ': ' : ''; + this.message += this.file ? this.file : '<css input>'; + + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column; + } + + this.message += ': ' + this.reason; + } + /** + * Returns a few lines of CSS source that caused the error. + * + * If the CSS has an input source map without `sourceContent`, + * this method will return an empty string. + * + * @param {boolean} [color] Whether arrow will be colored red by terminal + * color codes. By default, PostCSS will detect + * color support by `process.stdout.isTTY` + * and `process.env.NODE_DISABLE_COLORS`. + * + * @example + * error.showSourceCode() //=> " 4 | } + * // 5 | a { + * // > 6 | bad + * // | ^ + * // 7 | } + * // 8 | b {" + * + * @return {string} Few lines of CSS source that caused the error. + */ + ; + + _proto.showSourceCode = function showSourceCode(color) { + var _this2 = this; + + if (!this.source) return ''; + var css = this.source; + + if (_terminalHighlight.default) { + if (typeof color === 'undefined') color = _supportsColor.default.stdout; + if (color) css = (0, _terminalHighlight.default)(css); + } + + var lines = css.split(/\r?\n/); + var start = Math.max(this.line - 3, 0); + var end = Math.min(this.line + 2, lines.length); + var maxWidth = String(end).length; + + function mark(text) { + if (color && _chalk.default.red) { + return _chalk.default.red.bold(text); + } + + return text; + } + + function aside(text) { + if (color && _chalk.default.gray) { + return _chalk.default.gray(text); + } + + return text; + } + + return lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; + + if (number === _this2.line) { + var spacing = aside(gutter.replace(/\d/g, ' ')) + line.slice(0, _this2.column - 1).replace(/[^\t]/g, ' '); + return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^'); + } + + return ' ' + aside(gutter) + line; + }).join('\n'); + } + /** + * Returns error position, message and source code of the broken part. + * + * @example + * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block + * // > 1 | a { + * // | ^" + * + * @return {string} Error position, message and source code. + */ + ; + + _proto.toString = function toString() { + var code = this.showSourceCode(); + + if (code) { + code = '\n\n' + code + '\n'; + } + + return this.name + ': ' + this.message + code; + } + /** + * @memberof CssSyntaxError# + * @member {Input} input Input object with PostCSS internal information + * about input file. If input has source map + * from previous tool, PostCSS will use origin + * (for example, Sass) source. You can use this + * object to get PostCSS input source. + * + * @example + * error.input.file //=> 'a.css' + * error.file //=> 'a.sass' + */ + ; + + return CssSyntaxError; +}(_wrapNativeSuper(Error)); + +var _default = CssSyntaxError; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1zeW50YXgtZXJyb3IuZXM2Il0sIm5hbWVzIjpbIkNzc1N5bnRheEVycm9yIiwibWVzc2FnZSIsImxpbmUiLCJjb2x1bW4iLCJzb3VyY2UiLCJmaWxlIiwicGx1Z2luIiwibmFtZSIsInJlYXNvbiIsInNldE1lc3NhZ2UiLCJFcnJvciIsImNhcHR1cmVTdGFja1RyYWNlIiwic2hvd1NvdXJjZUNvZGUiLCJjb2xvciIsImNzcyIsInRlcm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ZpbGUgPSBmaWxlXG4gICAgfVxuICAgIGlmIChzb3VyY2UpIHtcbiAgICAgIC8qKlxuICAgICAgICogU291cmNlIGNvZGUgb2YgdGhlIGJyb2tlbiBmaWxlLlxuICAgICAgICpcbiAgICAgICAqIEB0eXBlIHtzdHJpbmd9XG4gICAgICAgKlxuICAgICAgICogQGV4YW1wbGVcbiAgICAgICAqIGVycm9yLnNvdXJjZSAgICAgICAvLz0+ICdhIHsgYiB7fSB9J1xuICAgICAgICogZXJyb3IuaW5wdXQuY29sdW1uIC8vPT4gJ2EgYiB7IH0nXG4gICAgICAgKi9cbiAgICAgIHRoaXMuc291cmNlID0gc291cmNlXG4gICAgfVxuICAgIGlmIChwbHVnaW4pIHtcbiAgICAgIC8qKlxuICAgICAgICogUGx1Z2luIG5hbWUsIGlmIGVycm9yIGNhbWUgZnJvbSBwbHVnaW4uXG4gICAgICAgKlxuICAgICAgICogQHR5cGUge3N0cmluZ31cbiAgICAgICAqXG4gICAgICAgKiBAZXhhbXBsZVxuICAgICAgICogZXJyb3IucGx1Z2luIC8vPT4gJ3Bvc3Rjc3MtdmFycydcbiAgICAgICAqL1xuICAgICAgdGhpcy5wbHVnaW4gPSBwbHVnaW5cbiAgICB9XG4gICAgaWYgKHR5cGVvZiBsaW5lICE9PSAndW5kZWZpbmVkJyAmJiB0eXBlb2YgY29sdW1uICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgLyoqXG4gICAgICAgKiBTb3VyY2UgbGluZSBvZiB0aGUgZXJyb3IuXG4gICAgICAgKlxuICAgICAgICogQHR5cGUge251bWJlcn1cbiAgICAgICAqXG4gICAgICAgKiBAZXhhbXBsZVxuICAgICAgICogZXJyb3IubGluZSAgICAgICAvLz0+IDJcbiAgICAgICAqIGVycm9yLmlucHV0LmxpbmUgLy89PiA0XG4gICAgICAgKi9cbiAgICAgIHRoaXMubGluZSA9IGxpbmVcbiAgICAgIC8qKlxuICAgICAgICogU291cmNlIGNvbHVtbiBvZiB0aGUgZXJyb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gLyoqXG4gICAqIFJldHVybnMgYSBmZXcgbGluZXMgb2YgQ1NTIHNvdXJjZSB0aGF0IGNhdXNlZCB0aGUgZXJyb3IuXG4gICAqXG4gICAqIElmIHRoZSBDU1MgaGFzIGFuIGlucHV0IHNvdXJjZSBtYXAgd2l0aG91dCBgc291cmNlQ29udGVudGAsXG4gICAqIHRoaXMgbWV0aG9kIHdpbGwgcmV0dXJuIGFuIGVtcHR5IHN0cmluZy5cbiAgICpcbiAgICogQHBhcmFtIHtib29sZWFufSBbY29sb3JdIFdoZXRoZXIgYXJyb3cgd2lsbCBiZSBjb2xvcmVkIHJlZCBieSB0ZXJtaW5hbFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgY29kZXMuIEJ5IGRlZmF1bHQsIFBvc3RDU1Mgd2lsbCBkZXRlY3RcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yIHN1cHBvcnQgYnkgYHByb2Nlc3Muc3Rkb3V0LmlzVFRZYFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kIGBwcm9jZXNzLmVudi5OT0RFX0RJU0FCTEVfQ09MT1JTYC5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogZXJyb3Iuc2hvd1NvdXJjZUNvZGUoKSAvLz0+IFwiICA0IHwgfVxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgNSB8IGEge1xuICAgKiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgID4gNiB8ICAgYmFkXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICAgIHwgICBeXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgICA3IHwgfVxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICAgOCB8IGIge1wiXG4gICAqXG4gICAqIEByZXR1cm4ge3N0cmluZ30gRmV3IGxpbmVzIG9mIENTUyBzb3VyY2UgdGhhdCBjYXVzZWQgdGhlIGVycm9yLl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cikuc2xpY2UoLW1heFdpZHRoKSArICcgfCAnXG4gICAgICBpZiAobnVtYmVyID09PSB0aGlzLmxpbmUpIHtcbiAgICAgICAgbGV0IHNwYWNpbmcgPSBhc2lkZShndXR0ZXIucmVwbGFjZSgvXFxkL2csICcgJykpICtcbiAgICAgICAgICBsaW5lLnNsaWNlKDAsIHRoaXMuY29sdW1uIC0gMSkucmVwbGFjZSgvW15cXHRdL2csICcgJylcbiAgICAgICAgcmV0dXJuIG1hcmsoJz4nKSArIGFzaWRlKGd1dHRlcikgKyBsaW5lICsgJ1xcbiAnICsgc3BhY2luZyArIG1hcmsoJ14nKVxuICAgICAgfVxuICAgICAgcmV0dXJuICcgJyArIGFzaWRlKGd1dHRlcikgKyBsaW5lXG4gICAgfSkuam9pbignXFxuJylcbiAgfVxuXG4gIC8qKlxuICAgKiBSZXR1cm5zIGVycm9yIHBvc2l0aW9uLCBtZXNzYWdlIGFuZCBzb3VyY2UgY29kZSBvZiB0aGUgYnJva2VuIHBhcnQuXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIGVycm9yLnRvU3RyaW5nKCkgLy89PiBcIkNzc1N5bnRheEVycm9yOiBhcHAuY3NzOjE6MTogVW5jbG9zZWQgYmxvY2tcbiAgICogICAgICAgICAgICAgICAgICAvLyAgICA+IDEgfCBhIHtcbiAgICogICAgICAgICAgICAgICAgICAvLyAgICAgICAgfCBeXCJcbiAgICpcbiAgICogQHJldHVybiB7c3RyaW5nfSBFcnJvciBwb3NpdGlvbiwgbWVzc2FnZSBhbmQgc291cmNlIGNvZGUuXG4gICAqL1xuICB0b1N0cmluZyAoKSB7XG4gICAgbGV0IGNvZGUgPSB0aGlzLnNob3dTb3VyY2VDb2RlKClcbiAgICBpZiAoY29kZSkge1xuICAgICAgY29kZSA9ICdcXG5cXG4nICsgY29kZSArICdcXG4nXG4gICAgfVxuICAgIHJldHVybiB0aGlzLm5hbWUgKyAnOiAnICsgdGhpcy5tZXNzYWdlICsgY29kZVxuICB9XG5cbiAgLyoqXG4gICAqIEBtZW1iZXJvZiBDc3NTeW50YXhFcnJvciNcbiAgICogQG1lbWJlciB7SW5wdXR9IGlucHV0IElucHV0IG9iamVjdCB3aXRoIFBvc3RDU1MgaW50ZXJuYWwgaW5mb3JtYXRpb25cbiAgICogICAgICAgICAgICAgICAgICAgICAgIGFib3V0IGlucHV0IGZpbGUuIElmIGlucHV0IGhhcyBzb3VyY2UgbWFwXG4gICAqICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHByZXZpb3VzIHRvb2wsIFBvc3RDU1Mgd2lsbCB1c2Ugb3JpZ2luXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAoZm9yIGV4YW1wbGUsIFNhc3MpIHNvdXJjZS4gWW91IGNhbiB1c2UgdGhpc1xuICAgKiAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0IHRvIGdldCBQb3N0Q1NTIGlucHV0IHNvdXJjZS5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogZXJyb3IuaW5wdXQuZmlsZSAvLz0+ICdhLmNzcydcbiAgICogZXJyb3IuZmlsZSAgICAgICAvLz0+ICdhLnNhc3MnXG4gICAqL1xufVxuXG5leHBvcnQgZGVmYXVsdCBDc3NTeW50YXhFcnJvclxuIl0sImZpbGUiOiJjc3Mtc3ludGF4LWVycm9yLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js b/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js new file mode 100644 index 0000000..6faf751 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/declaration.js @@ -0,0 +1,98 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _node = _interopRequireDefault(require("./node")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +/** + * Represents a CSS declaration. + * + * @extends Node + * + * @example + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * decl.type //=> 'decl' + * decl.toString() //=> ' color: black' + */ +var Declaration = +/*#__PURE__*/ +function (_Node) { + _inheritsLoose(Declaration, _Node); + + function Declaration(defaults) { + var _this; + + _this = _Node.call(this, defaults) || this; + _this.type = 'decl'; + return _this; + } + /** + * @memberof Declaration# + * @member {string} prop The declaration’s property name. + * + * @example + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * decl.prop //=> 'color' + */ + + /** + * @memberof Declaration# + * @member {string} value The declaration’s value. + * + * @example + * const root = postcss.parse('a { color: black }') + * const decl = root.first.first + * decl.value //=> 'black' + */ + + /** + * @memberof Declaration# + * @member {boolean} important `true` if the declaration + * has an !important annotation. + * + * @example + * const root = postcss.parse('a { color: black !important; color: red }') + * root.first.first.important //=> true + * root.first.last.important //=> undefined + */ + + /** + * @memberof Declaration# + * @member {object} raws Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `between`: the symbols between the property and value + * for declarations. + * * `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS cleans declaration from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + */ + + + return Declaration; +}(_node.default); + +var _default = Declaration; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uLmVzNiJdLCJuYW1lcyI6WyJEZWNsYXJhdGlvbiIsImRlZmF1bHRzIiwidHlwZSIsIk5vZGUiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7OztBQUVBOzs7Ozs7Ozs7OztJQVdNQSxXOzs7OztBQUN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mV4cG9ydCBkZWZhdWx0IERlY2xhcmF0aW9uXG4iXSwiZmlsZSI6ImRlY2xhcmF0aW9uLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/input.js b/node_modules/autoprefixer/node_modules/postcss/lib/input.js new file mode 100644 index 0000000..5a43956 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/input.js @@ -0,0 +1,216 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _path = _interopRequireDefault(require("path")); + +var _cssSyntaxError = _interopRequireDefault(require("./css-syntax-error")); + +var _previousMap = _interopRequireDefault(require("./previous-map")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var sequence = 0; +/** + * Represents the source CSS. + * + * @example + * const root = postcss.parse(css, { from: file }) + * const input = root.source.input + */ + +var Input = +/*#__PURE__*/ +function () { + /** + * @param {string} css Input CSS source. + * @param {object} [opts] {@link Processor#process} options. + */ + function Input(css, opts) { + if (opts === void 0) { + opts = {}; + } + + if (css === null || typeof css === 'object' && !css.toString) { + throw new Error("PostCSS received " + css + " instead of CSS string"); + } + /** + * Input CSS source + * + * @type {string} + * + * @example + * const input = postcss.parse('a{}', { from: file }).input + * input.css //=> "a{}" + */ + + + this.css = css.toString(); + + if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") { + this.hasBOM = true; + this.css = this.css.slice(1); + } else { + this.hasBOM = false; + } + + if (opts.from) { + if (/^\w+:\/\//.test(opts.from)) { + /** + * The absolute path to the CSS source file defined + * with the `from` option. + * + * @type {string} + * + * @example + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.file //=> '/home/ai/a.css' + */ + this.file = opts.from; + } else { + this.file = _path.default.resolve(opts.from); + } + } + + var map = new _previousMap.default(this.css, opts); + + if (map.text) { + /** + * The input source map passed from a compilation step before PostCSS + * (for example, from Sass compiler). + * + * @type {PreviousMap} + * + * @example + * root.source.input.map.consumer().sources //=> ['a.sass'] + */ + this.map = map; + var file = map.consumer().file; + if (!this.file && file) this.file = this.mapResolve(file); + } + + if (!this.file) { + sequence += 1; + /** + * The unique ID of the CSS source. It will be created if `from` option + * is not provided (because PostCSS does not know the file path). + * + * @type {string} + * + * @example + * const root = postcss.parse(css) + * root.source.input.file //=> undefined + * root.source.input.id //=> "<input css 1>" + */ + + this.id = '<input css ' + sequence + '>'; + } + + if (this.map) this.map.file = this.from; + } + + var _proto = Input.prototype; + + _proto.error = function error(message, line, column, opts) { + if (opts === void 0) { + opts = {}; + } + + var result; + var origin = this.origin(line, column); + + if (origin) { + result = new _cssSyntaxError.default(message, origin.line, origin.column, origin.source, origin.file, opts.plugin); + } else { + result = new _cssSyntaxError.default(message, line, column, this.css, this.file, opts.plugin); + } + + result.input = { + line: line, + column: column, + source: this.css + }; + if (this.file) result.input.file = this.file; + return result; + } + /** + * Reads the input source map and returns a symbol position + * in the input source (e.g., in a Sass file that was compiled + * to CSS before being passed to PostCSS). + * + * @param {number} line Line in input CSS. + * @param {number} column Column in input CSS. + * + * @return {filePosition} Position in input source. + * + * @example + * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 } + */ + ; + + _proto.origin = function origin(line, column) { + if (!this.map) return false; + var consumer = this.map.consumer(); + var from = consumer.originalPositionFor({ + line: line, + column: column + }); + if (!from.source) return false; + var result = { + file: this.mapResolve(from.source), + line: from.line, + column: from.column + }; + var source = consumer.sourceContentFor(from.source); + if (source) result.source = source; + return result; + }; + + _proto.mapResolve = function mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file; + } + + return _path.default.resolve(this.map.consumer().sourceRoot || '.', file); + } + /** + * The CSS source identifier. Contains {@link Input#file} if the user + * set the `from` option, or {@link Input#id} if they did not. + * + * @type {string} + * + * @example + * const root = postcss.parse(css, { from: 'a.css' }) + * root.source.input.from //=> "/home/ai/a.css" + * + * const root = postcss.parse(css) + * root.source.input.from //=> "<input css 1>" + */ + ; + + _createClass(Input, [{ + key: "from", + get: function get() { + return this.file || this.id; + } + }]); + + return Input; +}(); + +var _default = Input; +/** + * @typedef {object} filePosition + * @property {string} file Path to file. + * @property {number} line Source line in file. + * @property {number} column Source column in file. + */ + +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LmVzNiJdLCJuYW1lcyI6WyJzZXF1ZW5jZSIsIklucHV0IiwiY3NzIiwib3B0cyIsInRvU3RyaW5nIiwiRXJyb3IiLCJoYXNCT00iLCJzbGljZSIsImZyb20iLCJ0ZXN0IiwiZmlsZSIsInBhdGgiLCJyZXNvbHZlIiwibWFwIiwiUHJldmlvdXNNYXAiLCJ0ZXh0IiwiY29uc3VtZXIiLCJtYXBSZXNvbHZlIiwiaWQiLCJlcnJvciIsIm1lc3NhZ2UiLCJsaW5lIiwiY29sdW1uIiwicmVzdWx0Iiwib3JpZ2luIiwiQ3NzU3ludGF4RXJyb3IiLCJzb3VyY2UiLCJwbHVnaW4iLCJpbnB1dCIsIm9yaWdpbmFsUG9zaXRpb25Gb3IiLCJzb3VyY2VDb250ZW50Rm9yIiwic291cmNlUm9vdCJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTs7QUFFQTs7QUFDQTs7Ozs7Ozs7QUFFQSxJQUFJQSxRQUFRLEdBQUcsQ0FBZjtBQUVBOzs7Ozs7OztJQU9NQyxLOzs7QUFDSjs7OztBQUlBLGlCQUFhQyxHQUFiLEVBQWtCQyxJQUFsQixFQUE4QjtBQUFBLFFBQVpBLElBQVk7QUFBWkEsTUFBQUEsSUFBWS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ICAvKipcbiAgICAgICAgICogVGhlIGFic29sdXRlIHBhdGggdG8gdGhlIENTUyBzb3VyY2UgZmlsZSBkZWZpbmVkXG4gICAgICAgICAqIHdpdGggdGhlIGBmcm9tYCBvcHRpb24uXG4gICAgICAgICAqXG4gICAgICAgICAqIEB0eXBlIHtzdHJpbmd9XG4gICAgICAgICAqXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKGNzcywgeyBmcm9tOiAnYS5jc3MnIH0pXG4gICAgICAgICAqIHJvb3Quc291cmNlLmlucHV0LmZpbGUgLy89PiAnL2hvbWUvYWkvYS5jc3MnXG4gICAgICAgICAqL1xuICAgICAgICB0aGlzLmZpbGUgPSBvcHRzLmZyb21cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRoaXMuZmlsZSA9IHBhdGgucmVzb2x2ZShvcHRzLmZyb20pXG4gICAgICB9XG4gICAgfVxuXG4gICAgbGV0IG1hcCA9IG5ldyBQcmV2aW91c01hcCh0aGlzLmNzcywgb3B0cylcbiAgICBpZiAobWFwLnRleHQpIHtcbiAgICAgIC8qKlxuICAgICAgICogVGhlIGlucHV0IHNvdXJjZSBtYXAgcGFzc2VkIGZyb20gYSBjb21waWxhdGlvbiBzdGVwIGJlZm9yZSBQb3N0Q1NTXG4gICAgICAgKiAoZm9yIGV4YW1wbGUsIGZyb20gU2FzcyBjb21waWxlcikuXG4gICAgICAgKlxuICAgICAgICogQHR5cGUge1ByZXZpb3VzTWFwfVxuICAgICAgICpcbiAgICAgICAqIEBleGFtcGxlXG4gICAgICAgKiByb290LnNvdXJjZS5pbnB1dC5tYXAuY29uc3VtZXIoKS5zb3VyY2VzIC8vPT4gWydhLnNhc3MnXVxuICAgICAgICovXG4gICAgICB0aGlzLm1hcCA9IG1hcFxuICAgICAgbGV0IGZpbGUgPSBtYXAuY29uc3VtZXIoKS5maWxlXG4gICAgICBpZiAoIXRoaXMuZmlsZSA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ob21lL2FpL2EuY3NzXCJcbiAgICpcbiAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoY3NzKVxuICAgKiByb290LnNvdXJjZS5pbnB1dC5mcm9tIC8vPT4gXCI8aW5wdXQgY3NzIDE+XCJcbiAgICovXG4gIGdldCBmcm9tICgpIHtcbiAgICByZXR1cm4gdGhpcy5maWxlIHx8IHRoaXMuaWRcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBJbnB1dFxuXG4vKipcbiAqIEB0eXBlZGVmICB7b2JqZWN0fSBmaWxlUG9zaXRpb25cbiAqIEBwcm9wZXJ0eSB7c3RyaW5nfSBmaWxlICAgUGF0aCB0byBmaWxlLlxuICogQHByb3BlcnR5IHtudW1iZXJ9IGxpbmUgICBTb3VyY2UgbGluZSBpbiBmaWxlLlxuICogQHByb3BlcnR5IHtudW1iZXJ9IGNvbHVtbiBTb3VyY2UgY29sdW1uIGluIGZpbGUuXG4gKi9cbiJdLCJmaWxlIjoiaW5wdXQuanMifQ== diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/lazy-result.js b/node_modules/autoprefixer/node_modules/postcss/lib/lazy-result.js new file mode 100644 index 0000000..79c31c6 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/lazy-result.js @@ -0,0 +1,444 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _mapGenerator = _interopRequireDefault(require("./map-generator")); + +var _stringify2 = _interopRequireDefault(require("./stringify")); + +var _warnOnce = _interopRequireDefault(require("./warn-once")); + +var _result = _interopRequireDefault(require("./result")); + +var _parse = _interopRequireDefault(require("./parse")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function'; +} +/** + * A Promise proxy for the result of PostCSS transformations. + * + * A `LazyResult` instance is returned by {@link Processor#process}. + * + * @example + * const lazy = postcss([autoprefixer]).process(css) + */ + + +var LazyResult = +/*#__PURE__*/ +function () { + function LazyResult(processor, css, opts) { + this.stringified = false; + this.processed = false; + var root; + + if (typeof css === 'object' && css !== null && css.type === 'root') { + root = css; + } else if (css instanceof LazyResult || css instanceof _result.default) { + root = css.root; + + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {}; + if (!opts.map.inline) opts.map.inline = false; + opts.map.prev = css.map; + } + } else { + var parser = _parse.default; + if (opts.syntax) parser = opts.syntax.parse; + if (opts.parser) parser = opts.parser; + if (parser.parse) parser = parser.parse; + + try { + root = parser(css, opts); + } catch (error) { + this.error = error; + } + } + + this.result = new _result.default(processor, root, opts); + } + /** + * Returns a {@link Processor} instance, which will be used + * for CSS transformations. + * + * @type {Processor} + */ + + + var _proto = LazyResult.prototype; + + /** + * Processes input CSS through synchronous plugins + * and calls {@link Result#warnings()}. + * + * @return {Warning[]} Warnings from plugins. + */ + _proto.warnings = function warnings() { + return this.sync().warnings(); + } + /** + * Alias for the {@link LazyResult#css} property. + * + * @example + * lazy + '' === lazy.css + * + * @return {string} Output CSS. + */ + ; + + _proto.toString = function toString() { + return this.css; + } + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls `onFulfilled` with a Result instance. If a plugin throws + * an error, the `onRejected` callback will be executed. + * + * It implements standard Promise API. + * + * @param {onFulfilled} onFulfilled Callback will be executed + * when all plugins will finish work. + * @param {onRejected} onRejected Callback will be executed on any error. + * + * @return {Promise} Promise API to make queue. + * + * @example + * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => { + * console.log(result.css) + * }) + */ + ; + + _proto.then = function then(onFulfilled, onRejected) { + if (process.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + (0, _warnOnce.default)('Without `from` option PostCSS could generate wrong source map ' + 'and will not find Browserslist config. Set it to CSS file path ' + 'or to `undefined` to prevent this warning.'); + } + } + + return this.async().then(onFulfilled, onRejected); + } + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onRejected for each error thrown in any plugin. + * + * It implements standard Promise API. + * + * @param {onRejected} onRejected Callback will be executed on any error. + * + * @return {Promise} Promise API to make queue. + * + * @example + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }).catch(error => { + * console.error(error) + * }) + */ + ; + + _proto.catch = function _catch(onRejected) { + return this.async().catch(onRejected); + } + /** + * Processes input CSS through synchronous and asynchronous plugins + * and calls onFinally on any error or when all plugins will finish work. + * + * It implements standard Promise API. + * + * @param {onFinally} onFinally Callback will be executed on any error or + * when all plugins will finish work. + * + * @return {Promise} Promise API to make queue. + * + * @example + * postcss([autoprefixer]).process(css).finally(() => { + * console.log('processing ended') + * }) + */ + ; + + _proto.finally = function _finally(onFinally) { + return this.async().then(onFinally, onFinally); + }; + + _proto.handleError = function handleError(error, plugin) { + try { + this.error = error; + + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin; + error.setMessage(); + } else if (plugin.postcssVersion) { + if (process.env.NODE_ENV !== 'production') { + var pluginName = plugin.postcssPlugin; + var pluginVer = plugin.postcssVersion; + var runtimeVer = this.result.processor.version; + var a = pluginVer.split('.'); + var b = runtimeVer.split('.'); + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + console.error('Unknown error from PostCSS plugin. Your current PostCSS ' + 'version is ' + runtimeVer + ', but ' + pluginName + ' uses ' + pluginVer + '. Perhaps this is the source of the error below.'); + } + } + } + } catch (err) { + if (console && console.error) console.error(err); + } + }; + + _proto.asyncTick = function asyncTick(resolve, reject) { + var _this = this; + + if (this.plugin >= this.processor.plugins.length) { + this.processed = true; + return resolve(); + } + + try { + var plugin = this.processor.plugins[this.plugin]; + var promise = this.run(plugin); + this.plugin += 1; + + if (isPromise(promise)) { + promise.then(function () { + _this.asyncTick(resolve, reject); + }).catch(function (error) { + _this.handleError(error, plugin); + + _this.processed = true; + reject(error); + }); + } else { + this.asyncTick(resolve, reject); + } + } catch (error) { + this.processed = true; + reject(error); + } + }; + + _proto.async = function async() { + var _this2 = this; + + if (this.processed) { + return new Promise(function (resolve, reject) { + if (_this2.error) { + reject(_this2.error); + } else { + resolve(_this2.stringify()); + } + }); + } + + if (this.processing) { + return this.processing; + } + + this.processing = new Promise(function (resolve, reject) { + if (_this2.error) return reject(_this2.error); + _this2.plugin = 0; + + _this2.asyncTick(resolve, reject); + }).then(function () { + _this2.processed = true; + return _this2.stringify(); + }); + return this.processing; + }; + + _proto.sync = function sync() { + if (this.processed) return this.result; + this.processed = true; + + if (this.processing) { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + + if (this.error) throw this.error; + + for (var _iterator = this.result.processor.plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var plugin = _ref; + var promise = this.run(plugin); + + if (isPromise(promise)) { + throw new Error('Use process(css).then(cb) to work with async plugins'); + } + } + + return this.result; + }; + + _proto.run = function run(plugin) { + this.result.lastPlugin = plugin; + + try { + return plugin(this.result.root, this.result); + } catch (error) { + this.handleError(error, plugin); + throw error; + } + }; + + _proto.stringify = function stringify() { + if (this.stringified) return this.result; + this.stringified = true; + this.sync(); + var opts = this.result.opts; + var str = _stringify2.default; + if (opts.syntax) str = opts.syntax.stringify; + if (opts.stringifier) str = opts.stringifier; + if (str.stringify) str = str.stringify; + var map = new _mapGenerator.default(str, this.result.root, this.result.opts); + var data = map.generate(); + this.result.css = data[0]; + this.result.map = data[1]; + return this.result; + }; + + _createClass(LazyResult, [{ + key: "processor", + get: function get() { + return this.result.processor; + } + /** + * Options from the {@link Processor#process} call. + * + * @type {processOptions} + */ + + }, { + key: "opts", + get: function get() { + return this.result.opts; + } + /** + * Processes input CSS through synchronous plugins, converts `Root` + * to a CSS string and returns {@link Result#css}. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {string} + * @see Result#css + */ + + }, { + key: "css", + get: function get() { + return this.stringify().css; + } + /** + * An alias for the `css` property. Use it with syntaxes + * that generate non-CSS output. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {string} + * @see Result#content + */ + + }, { + key: "content", + get: function get() { + return this.stringify().content; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#map}. + * + * This property will only work with synchronous plugins. + * If the processor contains any asynchronous plugins + * it will throw an error. This is why this method is only + * for debug purpose, you should always use {@link LazyResult#then}. + * + * @type {SourceMapGenerator} + * @see Result#map + */ + + }, { + key: "map", + get: function get() { + return this.stringify().map; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#root}. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * This is why this method is only for debug purpose, + * you should always use {@link LazyResult#then}. + * + * @type {Root} + * @see Result#root + */ + + }, { + key: "root", + get: function get() { + return this.sync().root; + } + /** + * Processes input CSS through synchronous plugins + * and returns {@link Result#messages}. + * + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. + * + * This is why this method is only for debug purpose, + * you should always use {@link LazyResult#then}. + * + * @type {Message[]} + * @see Result#messages + */ + + }, { + key: "messages", + get: function get() { + return this.sync().messages; + } + }]); + + return LazyResult; +}(); + +var _default = LazyResult; +/** + * @callback onFulfilled + * @param {Result} result + */ + +/** + * @callback onRejected + * @param {Error} error + */ + +exports.default = _default; +module.exports = exports.default; +//# s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sdWdpblxuICAgICAgICAgIGxldCBwbHVnaW5WZXIgPSBwbHVnaW4ucG9zdGNzc1ZlcnNpb25cbiAgICAgICAgICBsZXQgcnVudGltZVZlciA9IHRoaXMucmVzdWx0LnByb2Nlc3Nvci52ZXJzaW9uXG4gICAgICAgICAgbGV0IGEgPSBwbHVnaW5WZXIuc3BsaXQoJy4nKVxuICAgICAgICAgIGxldCBiID0gcnVudGltZVZlci5zcGxpdCgnLicpXG5cbiAgICAgICAgICBpZiAoYVswXSAhPT0gYlswXSB8fCBwYXJzZUludChhWzFdKSA+IHBhcnNlSW50KGJbMV0pKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKFxuICAgICAgICAgICAgICAnVW5rbm93biBlcnJvciBmcm9tIFBvc3RDU1MgcGx1Z2luLiBZb3VyIGN1cnJlbnQgUG9zdENTUyAnICtcbiAgICAgICAgICAgICAgJ3ZlcnNpb24gaXMgJyArIHJ1bnRpbWVWZXIgKyAnLCBidXQgJyArIHBsdWdpbk5hbWUgKyAnIHVzZXMgJyArXG4gICAgICAgICAgICAgIHBsdWdpblZlciArICcuIFBlcmhhcHMgdGhpcyBpcyB0aGUgc291cmNlIG9mIHRoZSBlcnJvciBiZWxvdy4nXG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICBpZiAoY29uc29sZSAmJiBjb25zb2xlLmVycm9yKSBjb25zb2xlLmVycm9yKGVycilcbiAgICB9XG4gIH1cblxuICBhc3luY1RpY2sgKHJlc29sdmUsIHJlamVjdCkge1xuICAgIGlmICh0aGlzLnBsdWdpbiA+PSB0aGlzLnByb2Nlc3Nvci5wbHVnaW5zLmxlbmd0aCkge1xuICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlXG4gICAgICByZXR1cm4gcmVzb2x2ZSgpXG4gICAgfVxuXG4gICAgdHJ5IHtcbiAgICAgIGxldCBwbHVnaW4gPSB0aGlzLnByb2Nlc3Nvci5wbHVnaW5zW3RoaXMucGx1Z2luXVxuICAgICAgbGV0IHByb21pc2UgPSB0aGlzLnJ1bihwbHVnaW4pXG4gICAgICB0aGlzLnBsdWdpbiArPSAxXG5cbiAgICAgIGlmIChpc1Byb21pc2UocHJvbWlzZSkpIHtcbiAgICAgICAgcHJvbWlzZS50aGVuKCgpID0+IHtcbiAgICAgICAgICB0aGlzLmFzeW5jVGljayhyZXNvbHZlLCByZWplY3QpXG4gICAgICAgIH0pLmNhdGNoKGVycm9yID0+IHtcbiAgICAgICAgICB0aGlzLmhhbmRsZUVycm9yKGVycm9yLCBwbHVnaW4pXG4gICAgICAgICAgdGhpcy5wcm9jZXNzZWQgPSB0cnVlXG4gICAgICAgICAgcmVqZWN0KGVycm9yKVxuICAgICAgICB9KVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5hc3luY1RpY2socmVzb2x2ZSwgcmVqZWN0KVxuICAgICAgfVxuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICB0aGlzLnByb2Nlc3NlZCA9IHRydWVcbiAgICAgIHJlamVjdChlcnJvcilcbiAgICB9XG4gIH1cblxuICBhc3luYyAoKSB7XG4gICAgaWYgKHRoaXMucHJvY2Vzc2VkKSB7XG4gICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICBpZiAodGhpcy5lcnJvcikge1xuICAgICAgICAgIHJlamVjdCh0aGlzLmVycm9yKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlc29sdmUodGhpcy5zdHJpbmdpZnkoKSlcbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gICAgaWYgKHRoaXMucHJvY2Vzc2luZykge1xuICAgICAgcmV0dXJuIHRoaXMucHJvY2Vzc2luZ1xuICAgIH1cblxuICAgIHRoaXMucHJvY2Vzc2luZyA9IG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0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vclxuICovXG4iXSwiZmlsZSI6ImxhenktcmVzdWx0LmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/list.js b/node_modules/autoprefixer/node_modules/postcss/lib/list.js new file mode 100644 index 0000000..d2feb76 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/list.js @@ -0,0 +1,93 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +/** + * Contains helpers for safely splitting lists of CSS values, + * preserving parentheses and quotes. + * + * @example + * const list = postcss.list + * + * @namespace list + */ +var list = { + split: function split(string, separators, last) { + var array = []; + var current = ''; + var split = false; + var func = 0; + var quote = false; + var escape = false; + + for (var i = 0; i < string.length; i++) { + var letter = string[i]; + + if (quote) { + if (escape) { + escape = false; + } else if (letter === '\\') { + escape = true; + } else if (letter === quote) { + quote = false; + } + } else if (letter === '"' || letter === '\'') { + quote = letter; + } else if (letter === '(') { + func += 1; + } else if (letter === ')') { + if (func > 0) func -= 1; + } else if (func === 0) { + if (separators.indexOf(letter) !== -1) split = true; + } + + if (split) { + if (current !== '') array.push(current.trim()); + current = ''; + split = false; + } else { + current += letter; + } + } + + if (last || current !== '') array.push(current.trim()); + return array; + }, + + /** + * Safely splits space-separated values (such as those for `background`, + * `border-radius`, and other shorthand properties). + * + * @param {string} string Space-separated values. + * + * @return {string[]} Split values. + * + * @example + * postcss.list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)'] + */ + space: function space(string) { + var spaces = [' ', '\n', '\t']; + return list.split(string, spaces); + }, + + /** + * Safely splits comma-separated values (such as those for `transition-*` + * and `background` properties). + * + * @param {string} string Comma-separated values. + * + * @return {string[]} Split values. + * + * @example + * postcss.list.comma('black, linear-gradient(white, black)') + * //=> ['black', 'linear-gradient(white, black)'] + */ + comma: function comma(string) { + return list.split(string, [','], true); + } +}; +var _default = list; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2V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oibGlzdC5qcyJ9 diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/map-generator.js b/node_modules/autoprefixer/node_modules/postcss/lib/map-generator.js new file mode 100644 index 0000000..22dc1d9 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/map-generator.js @@ -0,0 +1,354 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _sourceMap = _interopRequireDefault(require("source-map")); + +var _path = _interopRequireDefault(require("path")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var MapGenerator = +/*#__PURE__*/ +function () { + function MapGenerator(stringify, root, opts) { + this.stringify = stringify; + this.mapOpts = opts.map || {}; + this.root = root; + this.opts = opts; + } + + var _proto = MapGenerator.prototype; + + _proto.isMap = function isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map; + } + + return this.previous().length > 0; + }; + + _proto.previous = function previous() { + var _this = this; + + if (!this.previousMaps) { + this.previousMaps = []; + this.root.walk(function (node) { + if (node.source && node.source.input.map) { + var map = node.source.input.map; + + if (_this.previousMaps.indexOf(map) === -1) { + _this.previousMaps.push(map); + } + } + }); + } + + return this.previousMaps; + }; + + _proto.isInline = function isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline; + } + + var annotation = this.mapOpts.annotation; + + if (typeof annotation !== 'undefined' && annotation !== true) { + return false; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.inline; + }); + } + + return true; + }; + + _proto.isSourcesContent = function isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.withContent(); + }); + } + + return true; + }; + + _proto.clearAnnotation = function clearAnnotation() { + if (this.mapOpts.annotation === false) return; + var node; + + for (var i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i]; + if (node.type !== 'comment') continue; + + if (node.text.indexOf('# sourceMappingURL=') === 0) { + this.root.removeChild(i); + } + } + }; + + _proto.setSourcesContent = function setSourcesContent() { + var _this2 = this; + + var already = {}; + this.root.walk(function (node) { + if (node.source) { + var from = node.source.input.from; + + if (from && !already[from]) { + already[from] = true; + + var relative = _this2.relative(from); + + _this2.map.setSourceContent(relative, node.source.input.css); + } + } + }); + }; + + _proto.applyPrevMaps = function applyPrevMaps() { + for (var _iterator = this.previous(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var prev = _ref; + var from = this.relative(prev.file); + + var root = prev.root || _path.default.dirname(prev.file); + + var map = void 0; + + if (this.mapOpts.sourcesContent === false) { + map = new _sourceMap.default.SourceMapConsumer(prev.text); + + if (map.sourcesContent) { + map.sourcesContent = map.sourcesContent.map(function () { + return null; + }); + } + } else { + map = prev.consumer(); + } + + this.map.applySourceMap(map, from, this.relative(root)); + } + }; + + _proto.isAnnotation = function isAnnotation() { + if (this.isInline()) { + return true; + } + + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation; + } + + if (this.previous().length) { + return this.previous().some(function (i) { + return i.annotation; + }); + } + + return true; + }; + + _proto.toBase64 = function toBase64(str) { + if (Buffer) { + return Buffer.from(str).toString('base64'); + } + + return window.btoa(unescape(encodeURIComponent(str))); + }; + + _proto.addAnnotation = function addAnnotation() { + var content; + + if (this.isInline()) { + content = 'data:application/json;base64,' + this.toBase64(this.map.toString()); + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation; + } else { + content = this.outputFile() + '.map'; + } + + var eol = '\n'; + if (this.css.indexOf('\r\n') !== -1) eol = '\r\n'; + this.css += eol + '/*# sourceMappingURL=' + content + ' */'; + }; + + _proto.outputFile = function outputFile() { + if (this.opts.to) { + return this.relative(this.opts.to); + } + + if (this.opts.from) { + return this.relative(this.opts.from); + } + + return 'to.css'; + }; + + _proto.generateMap = function generateMap() { + this.generateString(); + if (this.isSourcesContent()) this.setSourcesContent(); + if (this.previous().length > 0) this.applyPrevMaps(); + if (this.isAnnotation()) this.addAnnotation(); + + if (this.isInline()) { + return [this.css]; + } + + return [this.css, this.map]; + }; + + _proto.relative = function relative(file) { + if (file.indexOf('<') === 0) return file; + if (/^\w+:\/\//.test(file)) return file; + var from = this.opts.to ? _path.default.dirname(this.opts.to) : '.'; + + if (typeof this.mapOpts.annotation === 'string') { + from = _path.default.dirname(_path.default.resolve(from, this.mapOpts.annotation)); + } + + file = _path.default.relative(from, file); + + if (_path.default.sep === '\\') { + return file.replace(/\\/g, '/'); + } + + return file; + }; + + _proto.sourcePath = function sourcePath(node) { + if (this.mapOpts.from) { + return this.mapOpts.from; + } + + return this.relative(node.source.input.from); + }; + + _proto.generateString = function generateString() { + var _this3 = this; + + this.css = ''; + this.map = new _sourceMap.default.SourceMapGenerator({ + file: this.outputFile() + }); + var line = 1; + var column = 1; + var lines, last; + this.stringify(this.root, function (str, node, type) { + _this3.css += str; + + if (node && type !== 'end') { + if (node.source && node.source.start) { + _this3.map.addMapping({ + source: _this3.sourcePath(node), + generated: { + line: line, + column: column - 1 + }, + original: { + line: node.source.start.line, + column: node.source.start.column - 1 + } + }); + } else { + _this3.map.addMapping({ + source: '<no source>', + original: { + line: 1, + column: 0 + }, + generated: { + line: line, + column: column - 1 + } + }); + } + } + + lines = str.match(/\n/g); + + if (lines) { + line += lines.length; + last = str.lastIndexOf('\n'); + column = str.length - last; + } else { + column += str.length; + } + + if (node && type !== 'start') { + var p = node.parent || { + raws: {} + }; + + if (node.type !== 'decl' || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + _this3.map.addMapping({ + source: _this3.sourcePath(node), + generated: { + line: line, + column: column - 2 + }, + original: { + line: node.source.end.line, + column: node.source.end.column - 1 + } + }); + } else { + _this3.map.addMapping({ + source: '<no source>', + original: { + line: 1, + column: 0 + }, + generated: { + line: line, + column: column - 1 + } + }); + } + } + } + }); + }; + + _proto.generate = function generate() { + this.clearAnnotation(); + + if (this.isMap()) { + return this.generateMap(); + } + + var result = ''; + this.stringify(this.root, function (i) { + result += i; + }); + return [result]; + }; + + return MapGenerator; +}(); + +var _default = MapGenerator; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1hcC1nZW5lcmF0b3IuZXM2Il0sIm5hbWVzIjpbIk1hcEdlbmVyYXRvciIsInN0cmluZ2lmeSIsInJvb3QiLCJvcHRzIiwibWFwT3B0cyIsIm1hcCIsImlzTWFwIiwicHJldmlvdXMiLCJsZW5ndGgiLCJwcmV2aW91c01hcHMiLCJ3YWxrIiwibm9kZSIsInNvdXJjZSIsImlucHV0IiwiaW5kZXhPZiIsInB1c2giLCJpc0lubGluZSIsImlubGluZSIsImFubm90YXRpb24iLCJzb21lIiwiaSIsImlzU291cmNlc0NvbnRlbnQiLCJzb3VyY2VzQ29udGVudCIsIndpdGhDb250ZW50IiwiY2xlYXJBbm5vdGF0aW9uIiwibm9kZXMiLCJ0eXBlIiwidGV4dCIsInJlbW92ZUNoaWxkIiwic2V0U291cmNlc0NvbnRlbnQiLCJhbHJlYWR5IiwiZnJvbSIsInJlbGF0aXZlIiwic2V0U291cmNlQ29udGVudCIsImNzcyIsImFwcGx5UHJldk1hcHMiLCJwcmV2IiwiZmlsZSIsInBhdGgiLCJkaXJuYW1lIiwibW96aWxsYSIsIlNvdXJjZU1hcENvbnN1bWVyIiwiY29uc3VtZXIiLCJhcHBseVNvdXJjZU1hcCIsImlzQW5ub3RhdGlvbiIsInRvQmFzZTY0Iiwic3RyIiwiQnVmZmVyIiwidG9TdHJpbmciLCJ3aW5kb3ciLCJidG9hIiwidW5lc2NhcGUiLCJlbmNvZGVVUklDb21wb25lbnQiLCJhZGRBbm5vdGF0aW9uIiwiY29udGVudCIsIm91dHB1dEZpbGUiLCJlb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LnJvb3Qubm9kZXNbaV1cbiAgICAgIGlmIChub2RlLnR5cGUgIT09ICdjb21tZW50JykgY29udGludWVcbiAgICAgIGlmIChub2RlLnRleHQuaW5kZXhPZignIyBzb3VyY2VNYXBwaW5nVVJMPScpID09PSAwKSB7XG4gICAgICAgIHRoaXMucm9vdC5yZW1vdmVDaGlsZChpKVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHNldFNvdXJjZXNDb250ZW50ICgpIHtcbiAgICBsZXQgYWxyZWFkeSA9IHsgfVxuICAgIHRoaXMucm9vdC53YWxrKG5vZGUgPT4ge1xuICAgICAgaWYgKG5vZGUuc291cmNlKSB7XG4gICAgICAgIGxldCBmcm9tID0gbm9kZS5zb3VyY2UuaW5wdXQuZnJvbVxuICAgICAgICBpZiAoZnJvbSAmJiAhYWxyZWFkeVtmcm9tXSkge1xuICAgICAgICAgIGFscmVhZHlbZnJvbV0gPSB0cnVlXG4gICAgICAgICAgbGV0IHJlbGF0aXZlID0gdGhpcy5yZWxhdGl2ZShmcm9tKVxuICAgICAgICAgIHRoaXMubWFwLnNldFNvdXJjZUNvbnRlbnQocmVsYXRpdmUsIG5vZGUuc291cmNlLmlucHV0LmNzcylcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pXG4gIH1cblxuICBhcHBseVByZXZNYXBzICgpIHtcbiAgICBmb3IgKGxldCBwcmV2IG9mIHRoaXMucHJldmlvdXMoKSkge1xuICAgICAgbGV0IGZyb20gPSB0aGlzLnJlbGF0aXZlKHByZXYuZmlsZSlcbiAgICAgIGxldCByb290ID0gcHJldi5yb290IHx8IHBhdGguZGlybmFtZShwcmV2LmZpbGUpXG4gICAgICBsZXQgbWFwXG5cbiAgICAgIGlmICh0aGlzLm1hcE9wdHMuc291cmNlc0NvbnRlbnQgPT09IGZhbHNlKSB7XG4gICAgICAgIG1hcCA9IG5ldyBtb3ppbGxhLlNvdXJjZU1hcENvbnN1bWVyKHByZXYudGV4dClcbiAgICAgICAgaWYgKG1hcC5zb3VyY2VzQ29udGVudCkge1xuICAgICAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IG1hcC5zb3VyY2VzQ29udGVudC5tYXAoKCkgPT4gbnVsbClcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgbWFwID0gcHJldi5jb25zdW1lcigpXG4gICAgICB9XG5cbiAgICAgIHRoaXMubWFwLmFwcGx5U291cmNlTWFwKG1hcCwgZnJvbSwgdGhpcy5yZWxhdGl2ZShyb290KSlcbiAgICB9XG4gIH1cblxuICBpc0Fubm90YXRpb24gKCkge1xuICAgIGlmICh0aGlzLmlzSW5saW5lKCkpIHtcbiAgICAgIHJldHVybiB0cnVlXG4gICAgfVxuICAgIGlmICh0eXBlb2YgdGhpcy5tYXBPcHRzLmFubm90YXRpb24gIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICByZXR1cm4gdGhpcy5tYXBPcHRzLmFubm90YXRpb25cbiAgICB9XG4gICAgaWYgKHRoaXMucHJldmlvdXMoKS5sZW5ndGgpIHtcbiAgICAgIHJldHVybiB0aGlzLnByZXZpb3VzKCkuc29tZShpID0+IGkuYW5ub3RhdGlvbilcbiAgICB9XG4gICAgcmV0dXJuIHRydWVcbiAgfVxuXG4gIHRvQmFzZTY0IChzdHIpIHtcbiAgICBpZiAoQnVmZmVyKSB7XG4gICAgICByZXR1cm4gQnVmZmVyLmZyb20oc3RyKS50b1N0cmluZygnYmFzZTY0JylcbiAgICB9XG4gICAgcmV0dXJuIHdpbmRvdy5idG9hKHVuZXNjYXBlKGVuY29kZVVSSUNvbXBvbmVudChzdHIpKSlcbiAgfVxuXG4gIGFkZEFubm90YXRpb24gKCkge1xuICAgIGxldCBjb250ZW50XG5cbiAgICBpZiAodGhpcy5pc0lubGluZSgpKSB7XG4gICAgICBjb250ZW50ID0gJ2RhdGE6YXBwbGljYXRpb24vanNvbjtiYXNlNjQsJyArXG4gICAgICAgICAgICAgICAgdGhpcy50b0Jhc2U2NCh0aGlzLm1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PSBzdHIubGVuZ3RoXG4gICAgICB9XG5cbiAgICAgIGlmIChub2RlICYmIHR5cGUgIT09ICdzdGFydCcpIHtcbiAgICAgICAgbGV0IHAgPSBub2RlLnBhcmVudCB8fCB7IHJhd3M6IHsgfSB9XG4gICAgICAgIGlmIChub2RlLnR5cGUgIT09ICdkZWNsJyB8fCBub2RlICE9PSBwLmxhc3QgfHwgcC5yYXdzLnNlbWljb2xvbikge1xuICAgICAgICAgIGlmIChub2RlLnNvdXJjZSAmJiBub2RlLnNvdXJjZS5lbmQpIHtcbiAgICAgICAgICAgIHRoaXMubWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgICBzb3VyY2U6IHRoaXMuc291cmNlUGF0aChub2RlKSxcbiAgICAgICAgICAgICAgZ2VuZXJhdGVkOiB7IGxpbmUsIGNvbHVtbjogY29sdW1uIC0gMiB9LFxuICAgICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICAgIGxpbmU6IG5vZGUuc291cmNlLmVuZC5saW5lLFxuICAgICAgICAgICAgICAgIGNvbHVtbjogbm9kZS5zb3VyY2UuZW5kLmNvbHVtbiAtIDFcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5tYXAuYWRkTWFwcGluZyh7XG4gICAgICAgICAgICAgIHNvdXJjZTogJzxubyBzb3VyY2U+JyxcbiAgICAgICAgICAgICAgb3JpZ2luYWw6IHsgbGluZTogMSwgY29sdW1uOiAwIH0sXG4gICAgICAgICAgICAgIGdlbmVyYXRlZDogeyBsaW5lLCBjb2x1bW46IGNvbHVtbiAtIDEgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KVxuICB9XG5cbiAgZ2VuZXJhdGUgKCkge1xuICAgIHRoaXMuY2xlYXJBbm5vdGF0aW9uKClcblxuICAgIGlmICh0aGlzLmlzTWFwKCkpIHtcbiAgICAgIHJldHVybiB0aGlzLmdlbmVyYXRlTWFwKClcbiAgICB9XG5cbiAgICBsZXQgcmVzdWx0ID0gJydcbiAgICB0aGlzLnN0cmluZ2lmeSh0aGlzLnJvb3QsIGkgPT4ge1xuICAgICAgcmVzdWx0ICs9IGlcbiAgICB9KVxuICAgIHJldHVybiBbcmVzdWx0XVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IE1hcEdlbmVyYXRvclxuIl0sImZpbGUiOiJtYXAtZ2VuZXJhdG9yLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/node.js b/node_modules/autoprefixer/node_modules/postcss/lib/node.js new file mode 100644 index 0000000..a0e582c --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/node.js @@ -0,0 +1,608 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _cssSyntaxError = _interopRequireDefault(require("./css-syntax-error")); + +var _stringifier = _interopRequireDefault(require("./stringifier")); + +var _stringify = _interopRequireDefault(require("./stringify")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function cloneNode(obj, parent) { + var cloned = new obj.constructor(); + + for (var i in obj) { + if (!obj.hasOwnProperty(i)) continue; + var value = obj[i]; + var type = typeof value; + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + + return cloned; +} +/** + * All node classes inherit the following common methods. + * + * @abstract + */ + + +var Node = +/*#__PURE__*/ +function () { + /** + * @param {object} [defaults] Value for node properties. + */ + function Node(defaults) { + if (defaults === void 0) { + defaults = {}; + } + + this.raws = {}; + + if (process.env.NODE_ENV !== 'production') { + if (typeof defaults !== 'object' && typeof defaults !== 'undefined') { + throw new Error('PostCSS nodes constructor accepts object, not ' + JSON.stringify(defaults)); + } + } + + for (var name in defaults) { + this[name] = defaults[name]; + } + } + /** + * Returns a `CssSyntaxError` instance containing the original position + * of the node in the source, showing line and column numbers and also + * a small excerpt to facilitate debugging. + * + * If present, an input source map will be used to get the original position + * of the source, even from a previous compilation step + * (e.g., from Sass compilation). + * + * This method produces very useful error messages. + * + * @param {string} message Error description. + * @param {object} [opts] Options. + * @param {string} opts.plugin Plugin name that created this error. + * PostCSS will set it automatically. + * @param {string} opts.word A word inside a node’s string that should + * be highlighted as the source of the error. + * @param {number} opts.index An index inside a node’s string that should + * be highlighted as the source of the error. + * + * @return {CssSyntaxError} Error object to throw it. + * + * @example + * if (!variables[name]) { + * throw decl.error('Unknown variable ' + name, { word: name }) + * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black + * // color: $black + * // a + * // ^ + * // background: white + * } + */ + + + var _proto = Node.prototype; + + _proto.error = function error(message, opts) { + if (opts === void 0) { + opts = {}; + } + + if (this.source) { + var pos = this.positionBy(opts); + return this.source.input.error(message, pos.line, pos.column, opts); + } + + return new _cssSyntaxError.default(message); + } + /** + * This method is provided as a convenience wrapper for {@link Result#warn}. + * + * @param {Result} result The {@link Result} instance + * that will receive the warning. + * @param {string} text Warning message. + * @param {object} [opts] Options + * @param {string} opts.plugin Plugin name that created this warning. + * PostCSS will set it automatically. + * @param {string} opts.word A word inside a node’s string that should + * be highlighted as the source of the warning. + * @param {number} opts.index An index inside a node’s string that should + * be highlighted as the source of the warning. + * + * @return {Warning} Created warning object. + * + * @example + * const plugin = postcss.plugin('postcss-deprecated', () => { + * return (root, result) => { + * root.walkDecls('bad', decl => { + * decl.warn(result, 'Deprecated property bad') + * }) + * } + * }) + */ + ; + + _proto.warn = function warn(result, text, opts) { + var data = { + node: this + }; + + for (var i in opts) { + data[i] = opts[i]; + } + + return result.warn(text, data); + } + /** + * Removes the node from its parent and cleans the parent properties + * from the node and its children. + * + * @example + * if (decl.prop.match(/^-webkit-/)) { + * decl.remove() + * } + * + * @return {Node} Node to make calls chain. + */ + ; + + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + + this.parent = undefined; + return this; + } + /** + * Returns a CSS string representing the node. + * + * @param {stringifier|syntax} [stringifier] A syntax to use + * in string generation. + * + * @return {string} CSS string of this node. + * + * @example + * postcss.rule({ selector: 'a' }).toString() //=> "a {}" + */ + ; + + _proto.toString = function toString(stringifier) { + if (stringifier === void 0) { + stringifier = _stringify.default; + } + + if (stringifier.stringify) stringifier = stringifier.stringify; + var result = ''; + stringifier(this, function (i) { + result += i; + }); + return result; + } + /** + * Returns an exact clone of the node. + * + * The resulting cloned node and its (cloned) children will retain + * code style properties. + * + * @param {object} [overrides] New properties to override in the clone. + * + * @example + * decl.raws.before //=> "\n " + * const cloned = decl.clone({ prop: '-moz-' + decl.prop }) + * cloned.raws.before //=> "\n " + * cloned.toString() //=> -moz-transform: scale(0) + * + * @return {Node} Clone of the node. + */ + ; + + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + var cloned = cloneNode(this); + + for (var name in overrides) { + cloned[name] = overrides[name]; + } + + return cloned; + } + /** + * Shortcut to clone the node and insert the resulting cloned node + * before the current node. + * + * @param {object} [overrides] Mew properties to override in the clone. + * + * @example + * decl.cloneBefore({ prop: '-moz-' + decl.prop }) + * + * @return {Node} New node + */ + ; + + _proto.cloneBefore = function cloneBefore(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + var cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned; + } + /** + * Shortcut to clone the node and insert the resulting cloned node + * after the current node. + * + * @param {object} [overrides] New properties to override in the clone. + * + * @return {Node} New node. + */ + ; + + _proto.cloneAfter = function cloneAfter(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + var cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned; + } + /** + * Inserts node(s) before the current node and removes the current node. + * + * @param {...Node} nodes Mode(s) to replace current one. + * + * @example + * if (atrule.name === 'mixin') { + * atrule.replaceWith(mixinRules[atrule.params]) + * } + * + * @return {Node} Current node to methods chain. + */ + ; + + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var _len = arguments.length, nodes = new Array(_len), _key = 0; _key < _len; _key++) { + nodes[_key] = arguments[_key]; + } + + for (var _i = 0, _nodes = nodes; _i < _nodes.length; _i++) { + var node = _nodes[_i]; + this.parent.insertBefore(this, node); + } + + this.remove(); + } + + return this; + } + /** + * Returns the next child of the node’s parent. + * Returns `undefined` if the current node is the last child. + * + * @return {Node|undefined} Next node. + * + * @example + * if (comment.text === 'delete next') { + * const next = comment.next() + * if (next) { + * next.remove() + * } + * } + */ + ; + + _proto.next = function next() { + if (!this.parent) return undefined; + var index = this.parent.index(this); + return this.parent.nodes[index + 1]; + } + /** + * Returns the previous child of the node’s parent. + * Returns `undefined` if the current node is the first child. + * + * @return {Node|undefined} Previous node. + * + * @example + * const annotation = decl.prev() + * if (annotation.type === 'comment') { + * readAnnotation(annotation.text) + * } + */ + ; + + _proto.prev = function prev() { + if (!this.parent) return undefined; + var index = this.parent.index(this); + return this.parent.nodes[index - 1]; + } + /** + * Insert new node before current node to current node’s parent. + * + * Just alias for `node.parent.insertBefore(node, add)`. + * + * @param {Node|object|string|Node[]} add New node. + * + * @return {Node} This node for methods chain. + * + * @example + * decl.before('content: ""') + */ + ; + + _proto.before = function before(add) { + this.parent.insertBefore(this, add); + return this; + } + /** + * Insert new node after current node to current node’s parent. + * + * Just alias for `node.parent.insertAfter(node, add)`. + * + * @param {Node|object|string|Node[]} add New node. + * + * @return {Node} This node for methods chain. + * + * @example + * decl.after('color: black') + */ + ; + + _proto.after = function after(add) { + this.parent.insertAfter(this, add); + return this; + }; + + _proto.toJSON = function toJSON() { + var fixed = {}; + + for (var name in this) { + if (!this.hasOwnProperty(name)) continue; + if (name === 'parent') continue; + var value = this[name]; + + if (value instanceof Array) { + fixed[name] = value.map(function (i) { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(); + } else { + return i; + } + }); + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(); + } else { + fixed[name] = value; + } + } + + return fixed; + } + /** + * Returns a {@link Node#raws} value. If the node is missing + * the code style property (because the node was manually built or cloned), + * PostCSS will try to autodetect the code style property by looking + * at other nodes in the tree. + * + * @param {string} prop Name of code style property. + * @param {string} [defaultType] Name of default value, it can be missed + * if the value is the same as prop. + * + * @example + * const root = postcss.parse('a { background: white }') + * root.nodes[0].append({ prop: 'color', value: 'black' }) + * root.nodes[0].nodes[1].raws.before //=> undefined + * root.nodes[0].nodes[1].raw('before') //=> ' ' + * + * @return {string} Code style value. + */ + ; + + _proto.raw = function raw(prop, defaultType) { + var str = new _stringifier.default(); + return str.raw(this, prop, defaultType); + } + /** + * Finds the Root instance of the node’s tree. + * + * @example + * root.nodes[0].nodes[0].root() === root + * + * @return {Root} Root parent. + */ + ; + + _proto.root = function root() { + var result = this; + + while (result.parent) { + result = result.parent; + } + + return result; + } + /** + * Clear the code style properties for the node and its children. + * + * @param {boolean} [keepBetween] Keep the raws.between symbols. + * + * @return {undefined} + * + * @example + * node.raws.before //=> ' ' + * node.cleanRaws() + * node.raws.before //=> undefined + */ + ; + + _proto.cleanRaws = function cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + }; + + _proto.positionInside = function positionInside(index) { + var string = this.toString(); + var column = this.source.start.column; + var line = this.source.start.line; + + for (var i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + + return { + line: line, + column: column + }; + }; + + _proto.positionBy = function positionBy(opts) { + var pos = this.source.start; + + if (opts.index) { + pos = this.positionInside(opts.index); + } else if (opts.word) { + var index = this.toString().indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index); + } + + return pos; + } + /** + * @memberof Node# + * @member {string} type String representing the node’s type. + * Possible values are `root`, `atrule`, `rule`, + * `decl`, or `comment`. + * + * @example + * postcss.decl({ prop: 'color', value: 'black' }).type //=> 'decl' + */ + + /** + * @memberof Node# + * @member {Container} parent The node’s parent node. + * + * @example + * root.nodes[0].parent === root + */ + + /** + * @memberof Node# + * @member {source} source The input source of the node. + * + * The property is used in source map generation. + * + * If you create a node manually (e.g., with `postcss.decl()`), + * that node will not have a `source` property and will be absent + * from the source map. For this reason, the plugin developer should + * consider cloning nodes to create new ones (in which case the new node’s + * source will reference the original, cloned node) or setting + * the `source` property manually. + * + * ```js + * // Bad + * const prefixed = postcss.decl({ + * prop: '-moz-' + decl.prop, + * value: decl.value + * }) + * + * // Good + * const prefixed = decl.clone({ prop: '-moz-' + decl.prop }) + * ``` + * + * ```js + * if (atrule.name === 'add-link') { + * const rule = postcss.rule({ selector: 'a', source: atrule.source }) + * atrule.parent.insertBefore(atrule, rule) + * } + * ``` + * + * @example + * decl.source.input.from //=> '/home/ai/a.sass' + * decl.source.start //=> { line: 10, column: 2 } + * decl.source.end //=> { line: 10, column: 12 } + */ + + /** + * @memberof Node# + * @member {object} raws Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains true if the last child has + * an (optional) semicolon. + * * `afterName`: the space between the at-rule name and its parameters. + * * `left`: the space symbols between `/*` and the comment’s text. + * * `right`: the space symbols between the comment’s text + * and <code>*/</code>. + * * `important`: the content of the important statement, + * if it is not just `!important`. + * + * PostCSS cleans selectors, declaration values and at-rule parameters + * from comments and extra spaces, but it stores origin content in raws + * properties. As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '\n ', between: ':' } + */ + ; + + return Node; +}(); + +var _default = Node; +/** + * @typedef {object} position + * @property {number} line Source line in file. + * @property {number} column Source column in file. + */ + +/** + * @typedef {object} source + * @property {Input} input {@link Input} with input file + * @property {position} start The starting position of the node’s source. + * @property {position} end The ending position of the node’s source. + */ + +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGUuZXM2Il0sIm5hbWVzIjpbImNsb25lTm9kZSIsIm9iaiIsInBhcmVudCIsImNsb25lZCIsImNvbnN0cnVjdG9yIiwiaSIsImhhc093blByb3BlcnR5IiwidmFsdWUiLCJ0eXBlIiwiQXJyYXkiLCJtYXAiLCJqIiwiTm9kZSIsImRlZmF1bHRzIiwicmF3cyIsInByb2Nlc3MiLCJlbnYiLCJOT0RFX0VOViIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsIm5hbWUiLCJlcnJvciIsIm1lc3NhZ2UiLCJvcHRzIiwic291cmNlIiwicG9zIiwicG9zaXRpb25CeSIsImlucHV0IiwibGluZSIsImNvbHVtbiIsIkNzc1N5bnRheEVycm9yIiwid2FybiIsInJlc3VsdCIsInRleHQiLCJkYXRhIiwibm9kZSIsInJlbW92ZSIsInJlbW92ZUNoaWxkIiwidW5kZWZpbmVkIiwidG9TdHJpbmciLCJzdHJpbmdpZmllciIsImNsb25lIiwib3ZlcnJpZGVzIiwiY2xvbmVCZWZvcmUiLCJpbnNlcnRCZWZvcmUiLCJjbG9uZUFmdGVyIiwiaW5zZXJ0QWZ0ZXIiLCJyZXBsYWNlV2l0aCIsIm5vZGVzIiwibmV4dCIsImluZGV4IiwicHJldiIsImJlZm9yZSIsImFkZCIsImFmdGVyIiwidG9KU09OIiwiZml4ZWQiLCJyYXciLCJwcm9wIiwiZGVmYXVsdFR5cGUiLCJzdHIiLCJTdHJpbmdpZmllciIsInJvb3QiLCJjbGVhblJhd3MiLCJrZWVwQmV0d2VlbiIsImJldHdlZW4iLCJwb3NpdGlvbkluc2lkZSIsInN0cmluZyIsInN0YXJ0Iiwid29yZCIsImluZGV4T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ufSBlbmQgICBUaGUgZW5kaW5nIHBvc2l0aW9uIG9mIHRoZSBub2Rl4oCZcyBzb3VyY2UuXG4gKi9cbiJdLCJmaWxlIjoibm9kZS5qcyJ9 diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/parse.js b/node_modules/autoprefixer/node_modules/postcss/lib/parse.js new file mode 100644 index 0000000..99c417e --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/parse.js @@ -0,0 +1,40 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _parser = _interopRequireDefault(require("./parser")); + +var _input = _interopRequireDefault(require("./input")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(css, opts) { + var input = new _input.default(css, opts); + var parser = new _parser.default(input); + + try { + parser.parse(); + } catch (e) { + if (process.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser'; + } else if (/\.sass/i.test(opts.from)) { + e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser'; + } else if (/\.less$/i.test(opts.from)) { + e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser'; + } + } + } + + throw e; + } + + return parser.root; +} + +var _default = parse; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsImNzcyIsIm9wdHMiLCJpbnB1dCIsIklucHV0IiwicGFyc2VyIiwiUGFyc2VyIiwiZSIsInByb2Nlc3MiLCJlbnYiLCJOT0RFX0VOViIsIm5hbWUiLCJmcm9tIiwidGVzdCIsIm1lc3NhZ2UiLCJyb290Il0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUNBO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gIH0gZWxzZSBpZiAoL1xcLmxlc3MkL2kudGVzdChvcHRzLmZyb20pKSB7XG4gICAgICAgICAgZS5tZXNzYWdlICs9ICdcXG5Zb3UgdHJpZWQgdG8gcGFyc2UgTGVzcyB3aXRoICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAndGhlIHN0YW5kYXJkIENTUyBwYXJzZXI7ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAndHJ5IGFnYWluIHdpdGggdGhlIHBvc3Rjc3MtbGVzcyBwYXJzZXInXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgdGhyb3cgZVxuICB9XG5cbiAgcmV0dXJuIHBhcnNlci5yb290XG59XG5cbmV4cG9ydCBkZWZhdWx0IHBhcnNlXG4iXSwiZmlsZSI6InBhcnNlLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/parser.js b/node_modules/autoprefixer/node_modules/postcss/lib/parser.js new file mode 100644 index 0000000..74bdcf0 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/parser.js @@ -0,0 +1,611 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _declaration = _interopRequireDefault(require("./declaration")); + +var _tokenize = _interopRequireDefault(require("./tokenize")); + +var _comment = _interopRequireDefault(require("./comment")); + +var _atRule = _interopRequireDefault(require("./at-rule")); + +var _root = _interopRequireDefault(require("./root")); + +var _rule = _interopRequireDefault(require("./rule")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Parser = +/*#__PURE__*/ +function () { + function Parser(input) { + this.input = input; + this.root = new _root.default(); + this.current = this.root; + this.spaces = ''; + this.semicolon = false; + this.createTokenizer(); + this.root.source = { + input: input, + start: { + line: 1, + column: 1 + } + }; + } + + var _proto = Parser.prototype; + + _proto.createTokenizer = function createTokenizer() { + this.tokenizer = (0, _tokenize.default)(this.input); + }; + + _proto.parse = function parse() { + var token; + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + + switch (token[0]) { + case 'space': + this.spaces += token[1]; + break; + + case ';': + this.freeSemicolon(token); + break; + + case '}': + this.end(token); + break; + + case 'comment': + this.comment(token); + break; + + case 'at-word': + this.atrule(token); + break; + + case '{': + this.emptyRule(token); + break; + + default: + this.other(token); + break; + } + } + + this.endFile(); + }; + + _proto.comment = function comment(token) { + var node = new _comment.default(); + this.init(node, token[2], token[3]); + node.source.end = { + line: token[4], + column: token[5] + }; + var text = token[1].slice(2, -2); + + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + var match = text.match(/^(\s*)([^]*[^\s])(\s*)$/); + node.text = match[2]; + node.raws.left = match[1]; + node.raws.right = match[3]; + } + }; + + _proto.emptyRule = function emptyRule(token) { + var node = new _rule.default(); + this.init(node, token[2], token[3]); + node.selector = ''; + node.raws.between = ''; + this.current = node; + }; + + _proto.other = function other(start) { + var end = false; + var type = null; + var colon = false; + var bracket = null; + var brackets = []; + var tokens = []; + var token = start; + + while (token) { + type = token[0]; + tokens.push(token); + + if (type === '(' || type === '[') { + if (!bracket) bracket = token; + brackets.push(type === '(' ? ')' : ']'); + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens); + return; + } else { + break; + } + } else if (type === '{') { + this.rule(tokens); + return; + } else if (type === '}') { + this.tokenizer.back(tokens.pop()); + end = true; + break; + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + if (brackets.length === 0) bracket = null; + } + + token = this.tokenizer.nextToken(); + } + + if (this.tokenizer.endOfFile()) end = true; + if (brackets.length > 0) this.unclosedBracket(bracket); + + if (end && colon) { + while (tokens.length) { + token = tokens[tokens.length - 1][0]; + if (token !== 'space' && token !== 'comment') break; + this.tokenizer.back(tokens.pop()); + } + + this.decl(tokens); + } else { + this.unknownWord(tokens); + } + }; + + _proto.rule = function rule(tokens) { + tokens.pop(); + var node = new _rule.default(); + this.init(node, tokens[0][2], tokens[0][3]); + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + }; + + _proto.decl = function decl(tokens) { + var node = new _declaration.default(); + this.init(node); + var last = tokens[tokens.length - 1]; + + if (last[0] === ';') { + this.semicolon = true; + tokens.pop(); + } + + if (last[4]) { + node.source.end = { + line: last[4], + column: last[5] + }; + } else { + node.source.end = { + line: last[2], + column: last[3] + }; + } + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens); + node.raws.before += tokens.shift()[1]; + } + + node.source.start = { + line: tokens[0][2], + column: tokens[0][3] + }; + node.prop = ''; + + while (tokens.length) { + var type = tokens[0][0]; + + if (type === ':' || type === 'space' || type === 'comment') { + break; + } + + node.prop += tokens.shift()[1]; + } + + node.raws.between = ''; + var token; + + while (tokens.length) { + token = tokens.shift(); + + if (token[0] === ':') { + node.raws.between += token[1]; + break; + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]); + } + + node.raws.between += token[1]; + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + + node.raws.between += this.spacesAndCommentsFromStart(tokens); + this.precheckMissedSemicolon(tokens); + + for (var i = tokens.length - 1; i > 0; i--) { + token = tokens[i]; + + if (token[1].toLowerCase() === '!important') { + node.important = true; + var string = this.stringFrom(tokens, i); + string = this.spacesFromEnd(tokens) + string; + if (string !== ' !important') node.raws.important = string; + break; + } else if (token[1].toLowerCase() === 'important') { + var cache = tokens.slice(0); + var str = ''; + + for (var j = i; j > 0; j--) { + var _type = cache[j][0]; + + if (str.trim().indexOf('!') === 0 && _type !== 'space') { + break; + } + + str = cache.pop()[1] + str; + } + + if (str.trim().indexOf('!') === 0) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break; + } + } + + this.raw(node, 'value', tokens); + if (node.value.indexOf(':') !== -1) this.checkMissedSemicolon(tokens); + }; + + _proto.atrule = function atrule(token) { + var node = new _atRule.default(); + node.name = token[1].slice(1); + + if (node.name === '') { + this.unnamedAtrule(node, token); + } + + this.init(node, token[2], token[3]); + var prev; + var shift; + var last = false; + var open = false; + var params = []; + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + + if (token[0] === ';') { + node.source.end = { + line: token[2], + column: token[3] + }; + this.semicolon = true; + break; + } else if (token[0] === '{') { + open = true; + break; + } else if (token[0] === '}') { + if (params.length > 0) { + shift = params.length - 1; + prev = params[shift]; + + while (prev && prev[0] === 'space') { + prev = params[--shift]; + } + + if (prev) { + node.source.end = { + line: prev[4], + column: prev[5] + }; + } + } + + this.end(token); + break; + } else { + params.push(token); + } + + if (this.tokenizer.endOfFile()) { + last = true; + break; + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params); + + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params); + this.raw(node, 'params', params); + + if (last) { + token = params[params.length - 1]; + node.source.end = { + line: token[4], + column: token[5] + }; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.raws.afterName = ''; + node.params = ''; + } + + if (open) { + node.nodes = []; + this.current = node; + } + }; + + _proto.end = function end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + + this.semicolon = false; + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.spaces = ''; + + if (this.current.parent) { + this.current.source.end = { + line: token[2], + column: token[3] + }; + this.current = this.current.parent; + } else { + this.unexpectedClose(token); + } + }; + + _proto.endFile = function endFile() { + if (this.current.parent) this.unclosedBlock(); + + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + }; + + _proto.freeSemicolon = function freeSemicolon(token) { + this.spaces += token[1]; + + if (this.current.nodes) { + var prev = this.current.nodes[this.current.nodes.length - 1]; + + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces; + this.spaces = ''; + } + } + } // Helpers + ; + + _proto.init = function init(node, line, column) { + this.current.push(node); + node.source = { + start: { + line: line, + column: column + }, + input: this.input + }; + node.raws.before = this.spaces; + this.spaces = ''; + if (node.type !== 'comment') this.semicolon = false; + }; + + _proto.raw = function raw(node, prop, tokens) { + var token, type; + var length = tokens.length; + var value = ''; + var clean = true; + var next, prev; + var pattern = /^([.|#])?([\w])+/i; + + for (var i = 0; i < length; i += 1) { + token = tokens[i]; + type = token[0]; + + if (type === 'comment' && node.type === 'rule') { + prev = tokens[i - 1]; + next = tokens[i + 1]; + + if (prev[0] !== 'space' && next[0] !== 'space' && pattern.test(prev[1]) && pattern.test(next[1])) { + value += token[1]; + } else { + clean = false; + } + + continue; + } + + if (type === 'comment' || type === 'space' && i === length - 1) { + clean = false; + } else { + value += token[1]; + } + } + + if (!clean) { + var raw = tokens.reduce(function (all, i) { + return all + i[1]; + }, ''); + node.raws[prop] = { + value: value, + raw: raw + }; + } + + node[prop] = value; + }; + + _proto.spacesAndCommentsFromEnd = function spacesAndCommentsFromEnd(tokens) { + var lastTokenType; + var spaces = ''; + + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break; + spaces = tokens.pop()[1] + spaces; + } + + return spaces; + }; + + _proto.spacesAndCommentsFromStart = function spacesAndCommentsFromStart(tokens) { + var next; + var spaces = ''; + + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break; + spaces += tokens.shift()[1]; + } + + return spaces; + }; + + _proto.spacesFromEnd = function spacesFromEnd(tokens) { + var lastTokenType; + var spaces = ''; + + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space') break; + spaces = tokens.pop()[1] + spaces; + } + + return spaces; + }; + + _proto.stringFrom = function stringFrom(tokens, from) { + var result = ''; + + for (var i = from; i < tokens.length; i++) { + result += tokens[i][1]; + } + + tokens.splice(from, tokens.length - from); + return result; + }; + + _proto.colon = function colon(tokens) { + var brackets = 0; + var token, type, prev; + + for (var i = 0; i < tokens.length; i++) { + token = tokens[i]; + type = token[0]; + + if (type === '(') { + brackets += 1; + } + + if (type === ')') { + brackets -= 1; + } + + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token); + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue; + } else { + return i; + } + } + + prev = token; + } + + return false; + } // Errors + ; + + _proto.unclosedBracket = function unclosedBracket(bracket) { + throw this.input.error('Unclosed bracket', bracket[2], bracket[3]); + }; + + _proto.unknownWord = function unknownWord(tokens) { + throw this.input.error('Unknown word', tokens[0][2], tokens[0][3]); + }; + + _proto.unexpectedClose = function unexpectedClose(token) { + throw this.input.error('Unexpected }', token[2], token[3]); + }; + + _proto.unclosedBlock = function unclosedBlock() { + var pos = this.current.source.start; + throw this.input.error('Unclosed block', pos.line, pos.column); + }; + + _proto.doubleColon = function doubleColon(token) { + throw this.input.error('Double colon', token[2], token[3]); + }; + + _proto.unnamedAtrule = function unnamedAtrule(node, token) { + throw this.input.error('At-rule without name', token[2], token[3]); + }; + + _proto.precheckMissedSemicolon = function precheckMissedSemicolon() + /* tokens */ + {// Hook for Safe Parser + }; + + _proto.checkMissedSemicolon = function checkMissedSemicolon(tokens) { + var colon = this.colon(tokens); + if (colon === false) return; + var founded = 0; + var token; + + for (var j = colon - 1; j >= 0; j--) { + token = tokens[j]; + + if (token[0] !== 'space') { + founded += 1; + if (founded === 2) break; + } + } + + throw this.input.error('Missed semicolon', token[2], token[3]); + }; + + return Parser; +}(); + +exports.default = Parser; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlci5lczYiXSwibmFtZXMiOlsiUGFyc2VyIiwiaW5wdXQiLCJyb290IiwiUm9vdCIsImN1cnJlbnQiLCJzcGFjZXMiLCJzZW1pY29sb24iLCJjcmVhdGVUb2tlbml6ZXIi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ICd9JzpcbiAgICAgICAgICB0aGlzLmVuZCh0b2tlbilcbiAgICAgICAgICBicmVha1xuXG4gICAgICAgIGNhc2UgJ2NvbW1lbnQnOlxuICAgICAgICAgIHRoaXMuY29tbWVudCh0b2tlbilcbiAgICAgICAgICBicmVha1xuXG4gICAgICAgIGNhc2UgJ2F0LXdvcmQnOlxuICAgICAgICAgIHRoaXMuYXRydWxlKHRva2VuKVxuICAgICAgICAgIGJyZWFrXG5cbiAgICAgICAgY2FzZSAneyc6XG4gICAgICAgICAgdGhpcy5lbXB0eVJ1bGUodG9rZW4pXG4gICAgICAgICAgYnJlYWtcblxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHRoaXMub3RoZXIodG9rZW4pXG4gICAgICAgICAgYnJlYWtcbiAgICAgIH1cbiAgICB9XG4gICAgdGhpcy5lbmRGaWxlKClcbiAgfVxuXG4gIGNvbW1lbnQgKHRva2VuKSB7XG4gICAgbGV0IG5vZGUgPSBuZXcgQ29tbWVudCgpXG4gICAgdGhpcy5pbml0KG5vZGUsIHRva2VuWzJdLCB0b2tlblszXSlcbiAgICBub2RlLnNvdXJjZS5lbmQgPSB7IGxpbmU6IHRva2VuWzRdLCBjb2x1bW46IHRva2VuWzVdIH1cblxuICAgIGxldCB0ZXh0ID0gdG9rZW5bMV0uc2xpY2UoMiwgLTIpXG4gICAgaWYgKC9eXFxzKiQvLnRlc3QodGV4dCkpIHtcbiAgICAgIG5vZGUudGV4dCA9ICcnXG4gICAgICBub2RlLnJhd3MubGVmdCA9IHRleHRcbiAgICAgIG5vZGUucmF3cy5yaWdodCA9ICcnXG4gICAgfSBlbHNlIHtcbiAgICAgIGxldCBtYXRjaCA9IHRleHQubWF0Y2goL14oXFxzKikoW15dKlteXFxzXSkoXFxzKikkLylcbiAgICAgIG5vZGUudGV4dCA9IG1hdGNoWzJdXG4gICAgICBub2RlLnJhd3MubGVmdCA9IG1hdGNoWzFdXG4gICAgICBub2RlLnJhd3MucmlnaHQgPSBtYXRjaFszXVxuICAgIH1cbiAgfVxuXG4gIGVtcHR5UnVsZSAodG9rZW4pIHtcbiAgICBsZXQgbm9kZSA9IG5ldyBSdWxlKClcbiAgICB0aGlzLmluaXQobm9kZSwgdG9rZW5bMl0sIHRva2VuWzNdKVxuICAgIG5vZGUuc2VsZWN0b3IgPSAnJ1xuICAgIG5vZGUucmF3cy5iZXR3ZWVuID0gJydcbiAgICB0aGlzLmN1cnJlbnQgPSBub2RlXG4gIH1cblxuICBvdGhlciAoc3RhcnQpIHtcbiAgICBsZXQgZW5kID0gZmFsc2VcbiAgICBsZXQgdHlwZSA9IG51bGxcbiAgICBsZXQgY29sb24gPSBmYWxzZVxuICAgIGxldCBicmFja2V0ID0gbnVsbFxuICAgIGxldCBicmFja2V0cyA9IFtdXG5cbiAgICBsZXQgdG9rZW5zID0gW11cbiAgICBsZXQgdG9rZW4gPSBzdGFydFxuICAgIHdoaWxlICh0b2tlbikge1xuICAgICAgdHlwZSA9IHRva2VuWzBdXG4gICAgICB0b2tlbnMucHVzaCh0b2tlbilcblxuICAgICAgaWYgKHR5cGUgPT09ICcoJyB8fCB0eXBlID09PSAnWycpIHtcbiAgICAgICAgaWYgKCFicmFja2V0KSBicmFja2V0ID0gdG9rZW5cbiAgICAgICAgYnJhY2tldHMucHVzaCh0eXBlID09PSAnKCcgPyAnKScgOiAnXScpXG4gICAgICB9IGVsc2UgaWYgKGJyYWNrZXRzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICBpZiAodHlwZSA9PT0gJzsnKSB7XG4gICAgICAgICAgaWYgKGNvbG9uKSB7XG4gICAgICAgICAgICB0aGlzLmRlY2wodG9rZW5zKVxuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHR5cGUgPT09ICd7Jykge1xuICAgICAgICAgIHRoaXMucnVsZSh0b2tlbnMpXG4gICAgICAgICAgc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gJydcbiAgICB3aGlsZSAodG9rZW5zLmxlbmd0aCkge1xuICAgICAgbGV0IHR5cGUgPSB0b2tlbnNbMF1bMF1cbiAgICAgIGlmICh0eXBlID09PSAnOicgfHwgdHlwZSA9PT0gJ3NwYWNlJyB8fCB0eXBlID09PSAnY29tbWVudCcpIHtcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cbiAgICAgIG5vZGUucHJvcCArPSB0b2tlbnMuc2hpZnQoKVsxXVxuICAgIH1cblxuICAgIG5vZGUucmF3cy5iZXR3ZWVuID0gJydcblxuICAgIGxldCB0b2tlblxuICAgIHdoaWxlICh0b2tlbnMubGVuZ3RoKSB7XG4gICAgICB0b2tlbiA9IHRva2Vucy5zaGlmdCgpXG5cbiAgICAgIGlmICh0b2tlblswXSA9PT0gJzonKSB7XG4gICAgICAgIG5vZGUucmF3cy5iZXR3ZWVuICs9IHRva2VuWzFdXG4gICAgICAgIGJyZWFrXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAodG9rZW5bMF0gPT09ICd3b3JkJyAmJiAvXFx3Ly50ZXN0KHRva2VuWzFdKSkge1xuICAgICAgICAgIHRoaXMudW5rbm93bldvcmQoW3Rva2VuXSlcbiAgICAgICAgfVxuICAgICAgICBub2RlLnJhd3MuYmV0d2VlbiArPSB0b2tlblsxXVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChub2RlLnByb3BbMF0gPT09ICdfJyB8fCBub2RlLnByb3BbMF0gPT09ICcqJykge1xuICAgICAgbm9kZS5yYXdzLmJlZm9yZSArPSBub2RlLnByb3BbMF1cbiAgICAgIG5vZGUucHJvcCA9IG5vZGUucHJvcC5zbGljZSgxKVxuICAgIH1cbiAgICBub2RlLnJhd3MuYmV0d2VlbiArPSB0aGlzLnNwYWNlc0FuZENvbW1lbnRzRnJvbVN0YXJ0KHRva2VucylcbiAgICB0aGlzLnByZWNoZWNrTWlzc2VkU2VtaWNvbG9uKHRva2VucylcblxuICAgIGZvciAobGV0IGkgPSB0b2tlbnMubGVuZ3RoIC0gMTsgaSA+IDA7IGktLSkge1xuICAgICAgdG9rZW4gPSB0b2tlbnNbaV1cbiAgICAgIGlmICh0b2tlblsxXS50b0xvd2VyQ2FzZSgpID09PSAnIWltcG9ydGFudCcpIHtcbiAgICAgICAgbm9kZS5pbXBvcnRhbnQgPSB0cnVlXG4gICAgICAgIGxldCBzdHJpbmcgPSB0aGlzLnN0cmluZ0Zyb20odG9rZW5zLCBpKVxuICAgICAgICBzdHJpbmcgPSB0aGlzLnNwYWNlc0Zyb21FbmQodG9rZW5zKSArIHN0cmluZ1xuICAgICAgICBpZiAoc3RyaW5nICE9PSAnICFpbXBvcnRhbnQnKSBub2RlLnJhd3MuaW1wb3J0YW50ID0gc3RyaW5nXG4gICAgICAgIGJyZWFrXG4gICAgICB9IGVsc2UgaWYgKHRva2VuWzFdLnRvTG93ZXJDYXNlKCkgPT09ICdpbXBvcnRhbnQnKSB7XG4gICAgICAgIGxldCBjYWNoZSA9IHRva2Vucy5zbGljZSgwKVxuICAgICAgICBsZXQgc3RyID0gJydcbiAgICAgICAgZm9yIChsZXQgaiA9IGk7IGogPiAwOyBqLS0pIHtcbiAgICAgICAgICBsZXQgdHlwZSA9IGNhY2hlW2pdWzBdXG4gICAgICAgICAgaWYgKHN0ci50cmltKCkuaW5kZXhPZignIScpID09PSAwICYmIHR5cGUgIT09ICdzcGFjZScpIHtcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIHN0ciA9IGNhY2hlLnBvcCgpWzFdICsgc3RyXG4gICAgICAgIH1cbiAgICAgICAgaWYgKHN0ci50cmltKCkuaW5kZXhPZignIScpID09PSAwKSB7XG4gICAgICAgICAgbm9kZS5pbXBvcnRhbnQgPSB0cnVlXG4gICAgICAgICAgbm9kZS5yYXdzLmltcG9ydGFudCA9IHN0clxuICAgICAgICAgIHRva2VucyA9IGNhY2hlXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHRva2Vu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ICAgICAgc3BhY2VzID0gdG9rZW5zLnBvcCgpWzFdICsgc3BhY2VzXG4gICAgfVxuICAgIHJldHVybiBzcGFjZXNcbiAgfVxuXG4gIHN0cmluZ0Zyb20gKHRva2VucywgZnJvbSkge1xuICAgIGxldCByZXN1bHQgPSAnJ1xuICAgIGZvciAobGV0IGkgPSBmcm9tOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICByZXN1bHQgKz0gdG9rZW5zW2ldWzFdXG4gICAgfVxuICAgIHRva2Vucy5zcGxpY2UoZnJvbSwgdG9rZW5zLmxlbmd0aCAtIGZyb20pXG4gICAgcmV0dXJuIHJlc3VsdFxuICB9XG5cbiAgY29sb24gKHRva2Vucykge1xuICAgIGxldCBicmFja2V0cyA9IDBcbiAgICBsZXQgdG9rZW4sIHR5cGUsIHByZXZcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgdG9rZW4gPSB0b2tlbnNbaV1cbiAgICAgIHR5cGUgPSB0b2tlblswXVxuXG4gICAgICBpZiAodHlwZSA9PT0gJygnKSB7XG4gICAgICAgIGJyYWNrZXRzICs9IDFcbiAgICAgIH1cbiAgICAgIGlmICh0eXBlID09PSAnKScpIHtcbiAgICAgICAgYnJhY2tldHMgLT0gMVxuICAgICAgfVxuICAgICAgaWYgKGJyYWNrZXRzID09PSAwICYmIHR5cGUgPT09ICc6Jykge1xuICAgICAgICBpZiAoIXByZXYpIHtcbiAgICAgICAgICB0aGlzLmRvdWJsZUNvbG9uKHRva2VuKVxuICAgICAgICB9IGVsc2UgaWYgKHByZXZbMF0gPT09ICd3b3JkJyAmJiBwcmV2WzFdID09PSAncHJvZ2lkJykge1xuICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIGlcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBwcmV2ID0gdG9rZW5cbiAgICB9XG4gIC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9uID0gdGhpcy5jb2xvbih0b2tlbnMpXG4gICAgaWYgKGNvbG9uID09PSBmYWxzZSkgcmV0dXJuXG5cbiAgICBsZXQgZm91bmRlZCA9IDBcbiAgICBsZXQgdG9rZW5cbiAgICBmb3IgKGxldCBqID0gY29sb24gLSAxOyBqID49IDA7IGotLSkge1xuICAgICAgdG9rZW4gPSB0b2tlbnNbal1cbiAgICAgIGlmICh0b2tlblswXSAhPT0gJ3NwYWNlJykge1xuICAgICAgICBmb3VuZGVkICs9IDFcbiAgICAgICAgaWYgKGZvdW5kZWQgPT09IDIpIGJyZWFrXG4gICAgICB9XG4gICAgfVxuICAgIHRocm93IHRoaXMuaW5wdXQuZXJyb3IoJ01pc3NlZCBzZW1pY29sb24nLCB0b2tlblsyXSwgdG9rZW5bM10pXG4gIH1cbn1cbiJdLCJmaWxlIjoicGFyc2VyLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/postcss.d.ts b/node_modules/autoprefixer/node_modules/postcss/lib/postcss.d.ts new file mode 100644 index 0000000..5a8d2d9 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/postcss.d.ts @@ -0,0 +1,1277 @@ +import * as mozilla from 'source-map'; + +/** + * @param plugins Can also be included with the Processor#use method. + * @returns A processor that will apply plugins as CSS processors. + */ +declare function postcss(plugins?: postcss.AcceptedPlugin[]): postcss.Processor; +declare function postcss(...plugins: postcss.AcceptedPlugin[]): postcss.Processor; +declare namespace postcss { + type AcceptedPlugin = Plugin<any> | Transformer | { + postcss: TransformCallback | Processor; + } | Processor; + /** + * Creates a PostCSS plugin with a standard API. + * @param name Plugin name. Same as in name property in package.json. It will + * be saved in plugin.postcssPlugin property. + * @param initializer Will receive plugin options and should return functions + * to modify nodes in input CSS. + */ + function plugin<T>(name: string, initializer: PluginInitializer<T>): Plugin<T>; + interface Plugin<T> extends Transformer { + (opts?: T): Transformer; + postcss: Transformer; + process: (css: string | { + toString(): string; + } | Result, opts?: any) => LazyResult; + } + interface Transformer extends TransformCallback { + postcssPlugin?: string; + postcssVersion?: string; + } + interface TransformCallback { + /** + * @returns A Promise that resolves when all work is complete. May return + * synchronously, but that style of plugin is only meant for debugging and + * development. In either case, the resolved or returned value is not used - + * the "result" is the output. + */ + (root: Root, result: Result): Promise<any> | any; + } + interface PluginInitializer<T> { + (pluginOptions?: T): Transformer; + } + /** + * Contains helpers for working with vendor prefixes. + */ + export namespace vendor { + /** + * @returns The vendor prefix extracted from the input string. + */ + function prefix(prop: string): string; + /** + * @returns The input string stripped of its vendor prefix. + */ + function unprefixed(prop: string): string; + } + type ParserInput = string | { toString(): string }; + interface Parser { + (css: ParserInput, opts?: Pick<ProcessOptions, 'map' | 'from'>): Root; + } + interface Builder { + (part: string, node?: Node, type?: 'start' | 'end'): void; + } + interface Stringifier { + (node: Node, builder: Builder): void; + } + /** + * Default function to convert a node tree into a CSS string. + */ + const stringify: Stringifier; + /** + * Parses source CSS. + * @param css The CSS to parse. + * @param options + * @returns {} A new Root node, which contains the source CSS nodes. + */ + const parse: Parser; + /** + * Contains helpers for safely splitting lists of CSS values, preserving + * parentheses and quotes. + */ + export namespace list { + /** + * Safely splits space-separated values (such as those for background, + * border-radius and other shorthand properties). + */ + function space(str: string): string[]; + /** + * Safely splits comma-separated values (such as those for transition-* and + * background properties). + */ + function comma(str: string): string[]; + } + /** + * Creates a new Comment node. + * @param defaults Properties for the new Comment node. + * @returns The new node. + */ + function comment(defaults?: CommentNewProps): Comment; + /** + * Creates a new AtRule node. + * @param defaults Properties for the new AtRule node. + * @returns The new node. + */ + function atRule(defaults?: AtRuleNewProps): AtRule; + /** + * Creates a new Declaration node. + * @param defaults Properties for the new Declaration node. + * @returns The new node. + */ + function decl(defaults?: DeclarationNewProps): Declaration; + /** + * Creates a new Rule node. + * @param defaults Properties for the new Rule node. + * @returns The new node. + */ + function rule(defaults?: RuleNewProps): Rule; + /** + * Creates a new Root node. + * @param defaults Properties for the new Root node. + * @returns The new node. + */ + function root(defaults?: object): Root; + interface SourceMapOptions { + /** + * Indicates that the source map should be embedded in the output CSS as a + * Base64-encoded comment. By default, it is true. But if all previous maps + * are external, not inline, PostCSS will not embed the map even if you do + * not set this option. + * + * If you have an inline source map, the result.map property will be empty, + * as the source map will be contained within the text of result.css. + */ + inline?: boolean; + /** + * Source map content from a previous processing step (e.g., Sass compilation). + * PostCSS will try to read the previous source map automatically (based on comments + * within the source CSS), but you can use this option to identify it manually. + * If desired, you can omit the previous map with prev: false. + */ + prev?: any; + /** + * Indicates that PostCSS should set the origin content (e.g., Sass source) + * of the source map. By default, it is true. But if all previous maps do not + * contain sources content, PostCSS will also leave it out even if you do not set + * this option. + */ + sourcesContent?: boolean; + /** + * Indicates that PostCSS should add annotation comments to the CSS. By default, + * PostCSS will always add a comment with a path to the source map. PostCSS will + * not add annotations to CSS files that do not contain any comments. + * + * By default, PostCSS presumes that you want to save the source map as + * opts.to + '.map' and will use this path in the annotation comment. A different + * path can be set by providing a string value for annotation. + * + * If you have set inline: true, annotation cannot be disabled. + */ + annotation?: string | false; + /** + * Override "from" in map's sources. + */ + from?: string; + } + /** + * A Processor instance contains plugins to process CSS. Create one + * Processor instance, initialize its plugins, and then use that instance + * on numerous CSS files. + */ + interface Processor { + /** + * Adds a plugin to be used as a CSS processor. Plugins can also be + * added by passing them as arguments when creating a postcss instance. + */ + use(plugin: AcceptedPlugin): Processor; + /** + * Parses source CSS. Because some plugins can be asynchronous it doesn't + * make any transformations. Transformations will be applied in LazyResult's + * methods. + * @param css Input CSS or any object with toString() method, like a file + * stream. If a Result instance is passed the processor will take the + * existing Root parser from it. + */ + process(css: ParserInput | Result | LazyResult | Root, options?: ProcessOptions): LazyResult; + /** + * Contains plugins added to this processor. + */ + plugins: Plugin<any>[]; + /** + * Contains the current version of PostCSS (e.g., "4.0.5"). + */ + version: string; + } + interface ProcessOptions { + /** + * The path of the CSS source file. You should always set "from", because it is + * used in source map generation and syntax error messages. + */ + from?: string; + /** + * The path where you'll put the output CSS file. You should always set "to" + * to generate correct source maps. + */ + to?: string; + /** + * Function to generate AST by string. + */ + parser?: Parser; + /** + * Class to generate string by AST. + */ + stringifier?: Stringifier; + /** + * Object with parse and stringify. + */ + syntax?: Syntax; + /** + * Source map options + */ + map?: SourceMapOptions | boolean; + } + interface Syntax { + /** + * Function to generate AST by string. + */ + parse?: Parser; + /** + * Class to generate string by AST. + */ + stringify?: Stringifier; + } + /** + * A promise proxy for the result of PostCSS transformations. + */ + interface LazyResult { + /** + * Processes input CSS through synchronous and asynchronous plugins. + * @param onRejected Called if any plugin throws an error. + */ + then: Promise<Result>["then"]; + /** + * Processes input CSS through synchronous and asynchronous plugins. + * @param onRejected Called if any plugin throws an error. + */ + catch: Promise<Result>["catch"]; + /** + * Alias for css property. + */ + toString(): string; + /** + * Processes input CSS through synchronous plugins and converts Root to + * CSS string. This property will only work with synchronous plugins. If + * the processor contains any asynchronous plugins it will throw an error. + * In this case, you should use LazyResult#then() instead. + * @returns Result#css. + */ + css: string; + /** + * Alias for css property to use when syntaxes generate non-CSS output. + */ + content: string; + /** + * Processes input CSS through synchronous plugins. This property will + * work only with synchronous plugins. If processor contains any + * asynchronous plugins it will throw an error. You should use + * LazyResult#then() instead. + */ + map: ResultMap; + /** + * Processes input CSS through synchronous plugins. This property will work + * only with synchronous plugins. If processor contains any asynchronous + * plugins it will throw an error. You should use LazyResult#then() instead. + */ + root: Root; + /** + * Processes input CSS through synchronous plugins and calls Result#warnings(). + * This property will only work with synchronous plugins. If the processor + * contains any asynchronous plugins it will throw an error. In this case, + * you should use LazyResult#then() instead. + */ + warnings(): Warning[]; + /** + * Processes input CSS through synchronous plugins. This property will work + * only with synchronous plugins. If processor contains any asynchronous + * plugins it will throw an error. You should use LazyResult#then() instead. + */ + messages: ResultMessage[]; + /** + * @returns A processor used for CSS transformations. + */ + processor: Processor; + /** + * @returns Options from the Processor#process(css, opts) call that produced + * this Result instance. + */ + opts: ResultOptions; + } + /** + * Provides the result of the PostCSS transformations. + */ + interface Result { + /** + * Alias for css property. + */ + toString(): string; + /** + * Creates an instance of Warning and adds it to messages. + * @param message Used in the text property of the message object. + * @param options Properties for Message object. + */ + warn(message: string, options?: WarningOptions): void; + /** + * @returns Warnings from plugins, filtered from messages. + */ + warnings(): Warning[]; + /** + * A CSS string representing this Result's Root instance. + */ + css: string; + /** + * Alias for css property to use with syntaxes that generate non-CSS output. + */ + content: string; + /** + * An instance of the SourceMapGenerator class from the source-map library, + * representing changes to the Result's Root instance. + * This property will have a value only if the user does not want an inline + * source map. By default, PostCSS generates inline source maps, written + * directly into the processed CSS. The map property will be empty by default. + * An external source map will be generated — and assigned to map — only if + * the user has set the map.inline option to false, or if PostCSS was passed + * an external input source map. + */ + map: ResultMap; + /** + * Contains the Root node after all transformations. + */ + root?: Root; + /** + * Contains messages from plugins (e.g., warnings or custom messages). + * Add a warning using Result#warn() and get all warnings + * using the Result#warnings() method. + */ + messages: ResultMessage[]; + /** + * The Processor instance used for this transformation. + */ + processor?: Processor; + /** + * Options from the Processor#process(css, opts) or Root#toResult(opts) call + * that produced this Result instance. + */ + opts?: ResultOptions; + } + interface ResultOptions extends ProcessOptions { + /** + * The CSS node that was the source of the warning. + */ + node?: postcss.Node; + /** + * Name of plugin that created this warning. Result#warn() will fill it + * automatically with plugin.postcssPlugin value. + */ + plugin?: string; + } + interface ResultMap { + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * @param mapping + * @returns {} + */ + addMapping(mapping: mozilla.Mapping): void; + /** + * Set the source content for an original source file. + * @param sourceFile The URL of the original source file. + * @param sourceContent The content of the source file. + */ + setSourceContent(sourceFile: string, sourceContent: string): void; + /** + * Applies a SourceMap for a source file to the SourceMap. Each mapping to + * the supplied source file is rewritten using the supplied SourceMap. + * Note: The resolution for the resulting mappings is the minimum of this + * map and the supplied map. + * @param sourceMapConsumer The SourceMap to be applied. + * @param sourceFile The filename of the source file. If omitted, sourceMapConsumer + * file will be used, if it exists. Otherwise an error will be thrown. + * @param sourceMapPath The dirname of the path to the SourceMap to be applied. + * If relative, it is relative to the SourceMap. This parameter is needed when + * the two SourceMaps aren't in the same directory, and the SourceMap to be + * applied contains relative source paths. If so, those relative source paths + * need to be rewritten relative to the SourceMap. + * If omitted, it is assumed that both SourceMaps are in the same directory; + * thus, not needing any rewriting (Supplying '.' has the same effect). + */ + applySourceMap( + sourceMapConsumer: mozilla.SourceMapConsumer, + sourceFile?: string, + sourceMapPath?: string + ): void; + /** + * Renders the source map being generated to JSON. + */ + toJSON: () => mozilla.RawSourceMap; + /** + * Renders the source map being generated to a string. + */ + toString: () => string; + } + interface ResultMessage { + type: string; + plugin: string; + [others: string]: any; + } + /** + * Represents a plugin warning. It can be created using Result#warn(). + */ + interface Warning { + /** + * @returns Error position, message. + */ + toString(): string; + /** + * Contains the warning message. + */ + text: string; + /** + * Contains the name of the plugin that created this warning. When you + * call Result#warn(), it will fill this property automatically. + */ + plugin: string; + /** + * The CSS node that caused the warning. + */ + node: Node; + /** + * The line in the input file with this warning's source. + */ + line: number; + /** + * Column in the input file with this warning's source. + */ + column: number; + } + interface WarningOptions extends ResultOptions { + /** + * A word inside a node's string that should be highlighted as source + * of warning. + */ + word?: string; + /** + * The index inside a node's string that should be highlighted as + * source of warning. + */ + index?: number; + } + /** + * The CSS parser throws this error for broken CSS. + */ + interface CssSyntaxError extends InputOrigin { + name: string; + /** + * @returns Error position, message and source code of broken part. + */ + toString(): string; + /** + * @param color Whether arrow should be colored red by terminal color codes. + * By default, PostCSS will use process.stdout.isTTY and + * process.env.NODE_DISABLE_COLORS. + * @returns A few lines of CSS source that caused the error. If CSS has + * input source map without sourceContent this method will return an empty + * string. + */ + showSourceCode(color?: boolean): string; + /** + * Contains full error text in the GNU error format. + */ + message: string; + /** + * Contains only the error description. + */ + reason: string; + /** + * Contains the PostCSS plugin name if the error didn't come from the + * CSS parser. + */ + plugin?: string; + input?: InputOrigin; + } + interface InputOrigin { + /** + * If parser's from option is set, contains the absolute path to the + * broken file. PostCSS will use the input source map to detect the + * original error location. If you wrote a Sass file, then compiled it + * to CSS and parsed it with PostCSS, PostCSS will show the original + * position in the Sass file. If you need the position in the PostCSS + * input (e.g., to debug the previous compiler), use error.input.file. + */ + file?: string; + /** + * Contains the source line of the error. PostCSS will use the input + * source map to detect the original error location. If you wrote a Sass + * file, then compiled it to CSS and parsed it with PostCSS, PostCSS + * will show the original position in the Sass file. If you need the + * position in the PostCSS input (e.g., to debug the previous + * compiler), use error.input.line. + */ + line?: number; + /** + * Contains the source column of the error. PostCSS will use input + * source map to detect the original error location. If you wrote a + * Sass file, then compiled it to CSS and parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. If you + * need the position in the PostCSS input (e.g., to debug the + * previous compiler), use error.input.column. + */ + column?: number; + /** + * Contains the source code of the broken file. PostCSS will use the + * input source map to detect the original error location. If you wrote + * a Sass file, then compiled it to CSS and parsed it with PostCSS, + * PostCSS will show the original position in the Sass file. If you need + * the position in the PostCSS input (e.g., to debug the previous + * compiler), use error.input.source. + */ + source?: string; + } + export class PreviousMap { + private inline; + annotation: string; + root: string; + private consumerCache; + text: string; + file: string; + constructor(css: any, opts: any); + consumer(): mozilla.SourceMapConsumer; + withContent(): boolean; + startWith(string: string, start: string): boolean; + loadAnnotation(css: string): void; + decodeInline(text: string): string; + loadMap( + file: any, + prev: string | Function | mozilla.SourceMapConsumer | mozilla.SourceMapGenerator | mozilla.RawSourceMap + ): string; + isMap(map: any): boolean; + } + /** + * Represents the source CSS. + */ + interface Input { + /** + * The absolute path to the CSS source file defined with the "from" option. + * Either this property or the "id" property are always defined. + */ + file?: string; + /** + * The unique ID of the CSS source. Used if "from" option is not provided + * (because PostCSS does not know the file path). Either this property + * or the "file" property are always defined. + */ + id?: string; + /** + * The CSS source identifier. Contains input.file if the user set the + * "from" option, or input.id if they did not. + */ + from: string; + /** + * Represents the input source map passed from a compilation step before + * PostCSS (e.g., from the Sass compiler). + */ + map: PreviousMap; + /** + * The flag to indicate whether or not the source code has Unicode BOM. + */ + hasBOM: boolean; + /** + * Reads the input source map. + * @returns A symbol position in the input source (e.g., in a Sass file + * that was compiled to CSS before being passed to PostCSS): + */ + origin(line: number, column: number): InputOrigin; + } + type ChildNode = AtRule | Rule | Declaration | Comment; + type Node = Root | ChildNode; + interface NodeBase { + /** + * Returns the input source of the node. The property is used in source + * map generation. If you create a node manually + * (e.g., with postcss.decl() ), that node will not have a source + * property and will be absent from the source map. For this reason, the + * plugin developer should consider cloning nodes to create new ones + * (in which case the new node's source will reference the original, + * cloned node) or setting the source property manually. + */ + source?: NodeSource; + /** + * Contains information to generate byte-to-byte equal node string as it + * was in origin input. + */ + raws: NodeRaws; + /** + * @returns A CSS string representing the node. + */ + toString(): string; + /** + * This method produces very useful error messages. If present, an input + * source map will be used to get the original position of the source, even + * from a previous compilation step (e.g., from Sass compilation). + * @returns The original position of the node in the source, showing line + * and column numbers and also a small excerpt to facilitate debugging. + */ + error( + /** + * Error description. + */ + message: string, options?: NodeErrorOptions): CssSyntaxError; + /** + * Creates an instance of Warning and adds it to messages. This method is + * provided as a convenience wrapper for Result#warn. + * Note that `opts.node` is automatically passed to Result#warn for you. + * @param result The result that will receive the warning. + * @param text Warning message. It will be used in the `text` property of + * the message object. + * @param opts Properties to assign to the message object. + */ + warn(result: Result, text: string, opts?: WarningOptions): void; + /** + * @returns The next child of the node's parent; or, returns undefined if + * the current node is the last child. + */ + next(): ChildNode | void; + /** + * @returns The previous child of the node's parent; or, returns undefined + * if the current node is the first child. + */ + prev(): ChildNode | void; + /** + * Insert new node before current node to current node’s parent. + * + * Just an alias for `node.parent.insertBefore(node, newNode)`. + * + * @returns this node for method chaining. + * + * @example + * decl.before('content: ""'); + */ + before(newNode: Node | object | string | Node[]): this; + /** + * Insert new node after current node to current node’s parent. + * + * Just an alias for `node.parent.insertAfter(node, newNode)`. + * + * @returns this node for method chaining. + * + * @example + * decl.after('color: black'); + */ + after(newNode: Node | object | string | Node[]): this; + /** + * @returns The Root instance of the node's tree. + */ + root(): Root; + /** + * Removes the node from its parent and cleans the parent property in the + * node and its children. + * @returns This node for chaining. + */ + remove(): this; + /** + * Inserts node(s) before the current node and removes the current node. + * @returns This node for chaining. + */ + replaceWith(...nodes: (Node | object)[]): this; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + /** + * Shortcut to clone the node and insert the resulting cloned node before + * the current node. + * @param overrides New Properties to override in the clone. + * @returns The cloned node. + */ + cloneBefore(overrides?: object): this; + /** + * Shortcut to clone the node and insert the resulting cloned node after + * the current node. + * @param overrides New Properties to override in the clone. + * @returns The cloned node. + */ + cloneAfter(overrides?: object): this; + /** + * @param prop Name or code style property. + * @param defaultType Name of default value. It can be easily missed if the + * value is the same as prop. + * @returns A code style property value. If the node is missing the code + * style property (because the node was manually built or cloned), PostCSS + * will try to autodetect the code style property by looking at other nodes + * in the tree. + */ + raw(prop: string, defaultType?: string): any; + } + interface NodeNewProps { + source?: NodeSource; + raws?: NodeRaws; + } + interface NodeRaws { + /** + * The space symbols before the node. It also stores `*` and `_` + * symbols before the declaration (IE hack). + */ + before?: string; + /** + * The space symbols after the last child of the node to the end of + * the node. + */ + after?: string; + /** + * The symbols between the property and value for declarations, + * selector and "{" for rules, last parameter and "{" for at-rules. + */ + between?: string; + /** + * True if last child has (optional) semicolon. + */ + semicolon?: boolean; + /** + * The space between the at-rule's name and parameters. + */ + afterName?: string; + /** + * The space symbols between "/*" and comment's text. + */ + left?: string; + /** + * The space symbols between comment's text and "*\/". + */ + right?: string; + /** + * The content of important statement, if it is not just "!important". + */ + important?: string; + } + interface NodeSource { + input: Input; + /** + * The starting position of the node's source. + */ + start?: { + column: number; + line: number; + }; + /** + * The ending position of the node's source. + */ + end?: { + column: number; + line: number; + }; + } + interface NodeErrorOptions { + /** + * Plugin name that created this error. PostCSS will set it automatically. + */ + plugin?: string; + /** + * A word inside a node's string, that should be highlighted as source + * of error. + */ + word?: string; + /** + * An index inside a node's string that should be highlighted as source + * of error. + */ + index?: number; + } + interface JsonNode { + /** + * Returns a string representing the node's type. Possible values are + * root, atrule, rule, decl or comment. + */ + type?: string; + /** + * Returns the node's parent node. + */ + parent?: JsonContainer; + /** + * Returns the input source of the node. The property is used in source + * map generation. If you create a node manually (e.g., with + * postcss.decl() ), that node will not have a source property and + * will be absent from the source map. For this reason, the plugin + * developer should consider cloning nodes to create new ones (in which + * case the new node's source will reference the original, cloned node) + * or setting the source property manually. + */ + source?: NodeSource; + /** + * Contains information to generate byte-to-byte equal node string as it + * was in origin input. + */ + raws?: NodeRaws; + } + type Container = Root | AtRule | Rule; + /** + * Containers can store any content. If you write a rule inside a rule, + * PostCSS will parse it. + */ + interface ContainerBase extends NodeBase { + /** + * Contains the container's children. + */ + nodes?: ChildNode[]; + /** + * @returns The container's first child. + */ + first?: ChildNode; + /** + * @returns The container's last child. + */ + last?: ChildNode; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + /** + * @param child Child of the current container. + * @returns The child's index within the container's "nodes" array. + */ + index(child: ChildNode | number): number; + /** + * Determines whether all child nodes satisfy the specified test. + * @param callback A function that accepts up to three arguments. The + * every method calls the callback function for each node until the + * callback returns false, or until the end of the array. + * @returns True if the callback returns true for all of the container's + * children. + */ + every(callback: (node: ChildNode, index: number, nodes: ChildNode[]) => any, thisArg?: any): boolean; + /** + * Determines whether the specified callback returns true for any child node. + * @param callback A function that accepts up to three arguments. The some + * method calls the callback for each node until the callback returns true, + * or until the end of the array. + * @param thisArg An object to which the this keyword can refer in the + * callback function. If thisArg is omitted, undefined is used as the + * this value. + * @returns True if callback returns true for (at least) one of the + * container's children. + */ + some(callback: (node: ChildNode, index: number, nodes: ChildNode[]) => boolean, thisArg?: any): boolean; + /** + * Iterates through the container's immediate children, calling the + * callback function for each child. If you need to recursively iterate + * through all the container's descendant nodes, use container.walk(). + * Unlike the for {} -cycle or Array#forEach() this iterator is safe if + * you are mutating the array of child nodes during iteration. + * @param callback Iterator. Returning false will break iteration. Safe + * if you are mutating the array of child nodes during iteration. PostCSS + * will adjust the current index to match the mutations. + * @returns False if the callback returns false during iteration. + */ + each(callback: (node: ChildNode, index: number) => any): boolean | void; + /** + * Traverses the container's descendant nodes, calling `callback` for each + * node. Like container.each(), this method is safe to use if you are + * mutating arrays during iteration. If you only need to iterate through + * the container's immediate children, use container.each(). + * @param callback Iterator. + */ + walk(callback: (node: ChildNode, index: number) => any): boolean | void; + /** + * Traverses the container's descendant nodes, calling `callback` for each + * declaration. Like container.each(), this method is safe to use if you + * are mutating arrays during iteration. + * @param propFilter Filters declarations by property name. Only those + * declarations whose property matches propFilter will be iterated over. + * @param callback Called for each declaration node within the container. + */ + walkDecls(propFilter: string | RegExp, callback?: (decl: Declaration, index: number) => any): boolean | void; + walkDecls(callback: (decl: Declaration, index: number) => any): boolean | void; + /** + * Traverses the container's descendant nodes, calling `callback` for each + * at-rule. Like container.each(), this method is safe to use if you are + * mutating arrays during iteration. + * @param nameFilter Filters at-rules by name. If provided, iteration + * will only happen over at-rules that have matching names. + * @param callback Iterator called for each at-rule node within the + * container. + */ + walkAtRules(nameFilter: string | RegExp, callback: (atRule: AtRule, index: number) => any): boolean | void; + walkAtRules(callback: (atRule: AtRule, index: number) => any): boolean | void; + /** + * Traverses the container's descendant nodes, calling `callback` for each + * rule. Like container.each(), this method is safe to use if you are + * mutating arrays during iteration. + * @param selectorFilter Filters rules by selector. If provided, + * iteration will only happen over rules that have matching names. + * @param callback Iterator called for each rule node within the + * container. + */ + walkRules(selectorFilter: string | RegExp, callback: (atRule: Rule, index: number) => any): boolean | void; + walkRules(callback: (atRule: Rule, index: number) => any): boolean | void; + walkRules(selectorFilter: any, callback?: (atRule: Rule, index: number) => any): boolean | void; + /** + * Traverses the container's descendant nodes, calling `callback` for each + * comment. Like container.each(), this method is safe to use if you are + * mutating arrays during iteration. + * @param callback Iterator called for each comment node within the container. + */ + walkComments(callback: (comment: Comment, indexed: number) => any): void | boolean; + /** + * Passes all declaration values within the container that match pattern + * through the callback, replacing those values with the returned result of + * callback. This method is useful if you are using a custom unit or + * function and need to iterate through all values. + * @param pattern Pattern that we need to replace. + * @param options Options to speed up the search. + * @param callbackOrReplaceValue String to replace pattern or callback + * that will return a new value. The callback will receive the same + * arguments as those passed to a function parameter of String#replace. + */ + replaceValues(pattern: string | RegExp, options: { + /** + * Property names. The method will only search for values that match + * regexp within declarations of listed properties. + */ + props?: string[]; + /** + * Used to narrow down values and speed up the regexp search. Searching + * every single value with a regexp can be slow. If you pass a fast + * string, PostCSS will first check whether the value contains the fast + * string; and only if it does will PostCSS check that value against + * regexp. For example, instead of just checking for /\d+rem/ on all + * values, set fast: 'rem' to first check whether a value has the rem + * unit, and only if it does perform the regexp check. + */ + fast?: string; + }, callbackOrReplaceValue: string | { + (substring: string, ...args: any[]): string; + }): this; + replaceValues(pattern: string | RegExp, callbackOrReplaceValue: string | { + (substring: string, ...args: any[]): string; + }): this; + /** + * Inserts new nodes to the beginning of the container. + * Because each node class is identifiable by unique properties, use the + * following shortcuts to create nodes in insert methods: + * root.prepend({ name: '@charset', params: '"UTF-8"' }); // at-rule + * root.prepend({ selector: 'a' }); // rule + * rule.prepend({ prop: 'color', value: 'black' }); // declaration + * rule.prepend({ text: 'Comment' }) // comment + * A string containing the CSS of the new element can also be used. This + * approach is slower than the above shortcuts. + * root.prepend('a {}'); + * root.first.prepend('color: black; z-index: 1'); + * @param nodes New nodes. + * @returns This container for chaining. + */ + prepend(...nodes: (Node | object | string)[]): this; + /** + * Inserts new nodes to the end of the container. + * Because each node class is identifiable by unique properties, use the + * following shortcuts to create nodes in insert methods: + * root.append({ name: '@charset', params: '"UTF-8"' }); // at-rule + * root.append({ selector: 'a' }); // rule + * rule.append({ prop: 'color', value: 'black' }); // declaration + * rule.append({ text: 'Comment' }) // comment + * A string containing the CSS of the new element can also be used. This + * approach is slower than the above shortcuts. + * root.append('a {}'); + * root.first.append('color: black; z-index: 1'); + * @param nodes New nodes. + * @returns This container for chaining. + */ + append(...nodes: (Node | object | string)[]): this; + /** + * Insert newNode before oldNode within the container. + * @param oldNode Child or child's index. + * @returns This container for chaining. + */ + insertBefore(oldNode: ChildNode | number, newNode: ChildNode | object | string): this; + /** + * Insert newNode after oldNode within the container. + * @param oldNode Child or child's index. + * @returns This container for chaining. + */ + insertAfter(oldNode: ChildNode | number, newNode: ChildNode | object | string): this; + /** + * Removes the container from its parent and cleans the parent property in the + * container and its children. + * @returns This container for chaining. + */ + remove(): this; + /** + * Removes child from the container and cleans the parent properties + * from the node and its children. + * @param child Child or child's index. + * @returns This container for chaining. + */ + removeChild(child: ChildNode | number): this; + /** + * Removes all children from the container and cleans their parent + * properties. + * @returns This container for chaining. + */ + removeAll(): this; + } + interface ContainerNewProps extends NodeNewProps { + /** + * Contains the container's children. + */ + nodes?: ChildNode[]; + raws?: ContainerRaws; + } + interface ContainerRaws extends NodeRaws { + indent?: string; + } + interface JsonContainer extends JsonNode { + /** + * Contains the container's children. + */ + nodes?: ChildNode[]; + /** + * @returns The container's first child. + */ + first?: ChildNode; + /** + * @returns The container's last child. + */ + last?: ChildNode; + } + /** + * Represents a CSS file and contains all its parsed nodes. + */ + interface Root extends ContainerBase { + type: 'root'; + /** + * Inherited from Container. Should always be undefined for a Root node. + */ + parent: void; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + /** + * @returns A Result instance representing the root's CSS. + */ + toResult(options?: { + /** + * The path where you'll put the output CSS file. You should always + * set "to" to generate correct source maps. + */ + to?: string; + map?: SourceMapOptions; + }): Result; + /** + * Removes child from the root node, and the parent properties of node and + * its children. + * @param child Child or child's index. + * @returns This root node for chaining. + */ + removeChild(child: ChildNode | number): this; + } + interface RootNewProps extends ContainerNewProps { + } + interface JsonRoot extends JsonContainer { + } + /** + * Represents an at-rule. If it's followed in the CSS by a {} block, this + * node will have a nodes property representing its children. + */ + interface AtRule extends ContainerBase { + type: 'atrule'; + /** + * Returns the atrule's parent node. + */ + parent: Container; + /** + * The identifier that immediately follows the @. + */ + name: string; + /** + * These are the values that follow the at-rule's name, but precede any {} + * block. The spec refers to this area as the at-rule's "prelude". + */ + params: string; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + } + interface AtRuleNewProps extends ContainerNewProps { + /** + * The identifier that immediately follows the @. + */ + name?: string; + /** + * These are the values that follow the at-rule's name, but precede any {} + * block. The spec refers to this area as the at-rule's "prelude". + */ + params?: string | number; + raws?: AtRuleRaws; + } + interface AtRuleRaws extends NodeRaws { + params?: string; + } + interface JsonAtRule extends JsonContainer { + /** + * The identifier that immediately follows the @. + */ + name?: string; + /** + * These are the values that follow the at-rule's name, but precede any {} + * block. The spec refers to this area as the at-rule's "prelude". + */ + params?: string; + } + /** + * Represents a CSS rule: a selector followed by a declaration block. + */ + interface Rule extends ContainerBase { + type: 'rule'; + /** + * Returns the rule's parent node. + */ + parent: Container; + /** + * The rule's full selector. If there are multiple comma-separated selectors, + * the entire group will be included. + */ + selector: string; + /** + * An array containing the rule's individual selectors. + * Groups of selectors are split at commas. + */ + selectors: string[]; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + } + interface RuleNewProps extends ContainerNewProps { + /** + * The rule's full selector. If there are multiple comma-separated selectors, + * the entire group will be included. + */ + selector?: string; + /** + * An array containing the rule's individual selectors. Groups of selectors + * are split at commas. + */ + selectors?: string[]; + raws?: RuleRaws; + } + interface RuleRaws extends ContainerRaws { + /** + * The rule's full selector. If there are multiple comma-separated selectors, + * the entire group will be included. + */ + selector?: string; + } + interface JsonRule extends JsonContainer { + /** + * The rule's full selector. If there are multiple comma-separated selectors, + * the entire group will be included. + */ + selector?: string; + /** + * An array containing the rule's individual selectors. + * Groups of selectors are split at commas. + */ + selectors?: string[]; + } + /** + * Represents a CSS declaration. + */ + interface Declaration extends NodeBase { + type: 'decl'; + /** + * Returns the declaration's parent node. + */ + parent: Container; + /** + * The declaration's property name. + */ + prop: string; + /** + * The declaration's value. This value will be cleaned of comments. If the + * source value contained comments, those comments will be available in the + * _value.raws property. If you have not changed the value, the result of + * decl.toString() will include the original raws value (comments and all). + */ + value: string; + /** + * True if the declaration has an !important annotation. + */ + important: boolean; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + } + interface DeclarationNewProps { + /** + * The declaration's property name. + */ + prop?: string; + /** + * The declaration's value. This value will be cleaned of comments. If the + * source value contained comments, those comments will be available in the + * _value.raws property. If you have not changed the value, the result of + * decl.toString() will include the original raws value (comments and all). + */ + value?: string; + raws?: DeclarationRaws; + } + interface DeclarationRaws extends NodeRaws { + /** + * The declaration's value. This value will be cleaned of comments. + * If the source value contained comments, those comments will be + * available in the _value.raws property. If you have not changed the value, the result of + * decl.toString() will include the original raws value (comments and all). + */ + value?: string; + } + interface JsonDeclaration extends JsonNode { + /** + * True if the declaration has an !important annotation. + */ + important?: boolean; + } + /** + * Represents a comment between declarations or statements (rule and at-rules). + * Comments inside selectors, at-rule parameters, or declaration values will + * be stored in the Node#raws properties. + */ + interface Comment extends NodeBase { + type: 'comment'; + /** + * Returns the comment's parent node. + */ + parent: Container; + /** + * The comment's text. + */ + text: string; + /** + * @param overrides New properties to override in the clone. + * @returns A clone of this node. The node and its (cloned) children will + * have a clean parent and code style properties. + */ + clone(overrides?: object): this; + } + interface CommentNewProps { + /** + * The comment's text. + */ + text?: string; + } + interface JsonComment extends JsonNode { + } +} +export = postcss; diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js b/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js new file mode 100644 index 0000000..2e6c5ce --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/postcss.js @@ -0,0 +1,285 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _declaration = _interopRequireDefault(require("./declaration")); + +var _processor = _interopRequireDefault(require("./processor")); + +var _stringify = _interopRequireDefault(require("./stringify")); + +var _comment = _interopRequireDefault(require("./comment")); + +var _atRule = _interopRequireDefault(require("./at-rule")); + +var _vendor = _interopRequireDefault(require("./vendor")); + +var _parse = _interopRequireDefault(require("./parse")); + +var _list = _interopRequireDefault(require("./list")); + +var _rule = _interopRequireDefault(require("./rule")); + +var _root = _interopRequireDefault(require("./root")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Create a new {@link Processor} instance that will apply `plugins` + * as CSS processors. + * + * @param {Array.<Plugin|pluginFunction>|Processor} plugins PostCSS plugins. + * See {@link Processor#use} for plugin format. + * + * @return {Processor} Processor to process multiple CSS. + * + * @example + * import postcss from 'postcss' + * + * postcss(plugins).process(css, { from, to }).then(result => { + * console.log(result.css) + * }) + * + * @namespace postcss + */ +function postcss() { + for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { + plugins[_key] = arguments[_key]; + } + + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0]; + } + + return new _processor.default(plugins); +} +/** + * Creates a PostCSS plugin with a standard API. + * + * The newly-wrapped function will provide both the name and PostCSS + * version of the plugin. + * + * ```js + * const processor = postcss([replace]) + * processor.plugins[0].postcssPlugin //=> 'postcss-replace' + * processor.plugins[0].postcssVersion //=> '6.0.0' + * ``` + * + * The plugin function receives 2 arguments: {@link Root} + * and {@link Result} instance. The function should mutate the provided + * `Root` node. Alternatively, you can create a new `Root` node + * and override the `result.root` property. + * + * ```js + * const cleaner = postcss.plugin('postcss-cleaner', () => { + * return (root, result) => { + * result.root = postcss.root() + * } + * }) + * ``` + * + * As a convenience, plugins also expose a `process` method so that you can use + * them as standalone tools. + * + * ```js + * cleaner.process(css, processOpts, pluginOpts) + * // This is equivalent to: + * postcss([ cleaner(pluginOpts) ]).process(css, processOpts) + * ``` + * + * Asynchronous plugins should return a `Promise` instance. + * + * ```js + * postcss.plugin('postcss-import', () => { + * return (root, result) => { + * return new Promise( (resolve, reject) => { + * fs.readFile('base.css', (base) => { + * root.prepend(base) + * resolve() + * }) + * }) + * } + * }) + * ``` + * + * Add warnings using the {@link Node#warn} method. + * Send data to other plugins using the {@link Result#messages} array. + * + * ```js + * postcss.plugin('postcss-caniuse-test', () => { + * return (root, result) => { + * root.walkDecls(decl => { + * if (!caniuse.support(decl.prop)) { + * decl.warn(result, 'Some browsers do not support ' + decl.prop) + * } + * }) + * } + * }) + * ``` + * + * @param {string} name PostCSS plugin name. Same as in `name` + * property in `package.json`. It will be saved + * in `plugin.postcssPlugin` property. + * @param {function} initializer Will receive plugin options + * and should return {@link pluginFunction} + * + * @return {Plugin} PostCSS plugin. + */ + + +postcss.plugin = function plugin(name, initializer) { + function creator() { + var transformer = initializer.apply(void 0, arguments); + transformer.postcssPlugin = name; + transformer.postcssVersion = new _processor.default().version; + return transformer; + } + + var cache; + Object.defineProperty(creator, 'postcss', { + get: function get() { + if (!cache) cache = creator(); + return cache; + } + }); + + creator.process = function (css, processOpts, pluginOpts) { + return postcss([creator(pluginOpts)]).process(css, processOpts); + }; + + return creator; +}; +/** + * Default function to convert a node tree into a CSS string. + * + * @param {Node} node Start node for stringifing. Usually {@link Root}. + * @param {builder} builder Function to concatenate CSS from node’s parts + * or generate string and source map. + * + * @return {void} + * + * @function + */ + + +postcss.stringify = _stringify.default; +/** + * Parses source css and returns a new {@link Root} node, + * which contains the source CSS nodes. + * + * @param {string|toString} css String with input CSS or any object + * with toString() method, like a Buffer + * @param {processOptions} [opts] Options with only `from` and `map` keys. + * + * @return {Root} PostCSS AST. + * + * @example + * // Simple CSS concatenation with source map support + * const root1 = postcss.parse(css1, { from: file1 }) + * const root2 = postcss.parse(css2, { from: file2 }) + * root1.append(root2).toResult().css + * + * @function + */ + +postcss.parse = _parse.default; +/** + * Contains the {@link vendor} module. + * + * @type {vendor} + * + * @example + * postcss.vendor.unprefixed('-moz-tab') //=> ['tab'] + */ + +postcss.vendor = _vendor.default; +/** + * Contains the {@link list} module. + * + * @member {list} + * + * @example + * postcss.list.space('5px calc(10% + 5px)') //=> ['5px', 'calc(10% + 5px)'] + */ + +postcss.list = _list.default; +/** + * Creates a new {@link Comment} node. + * + * @param {object} [defaults] Properties for the new node. + * + * @return {Comment} New comment node + * + * @example + * postcss.comment({ text: 'test' }) + */ + +postcss.comment = function (defaults) { + return new _comment.default(defaults); +}; +/** + * Creates a new {@link AtRule} node. + * + * @param {object} [defaults] Properties for the new node. + * + * @return {AtRule} new at-rule node + * + * @example + * postcss.atRule({ name: 'charset' }).toString() //=> "@charset" + */ + + +postcss.atRule = function (defaults) { + return new _atRule.default(defaults); +}; +/** + * Creates a new {@link Declaration} node. + * + * @param {object} [defaults] Properties for the new node. + * + * @return {Declaration} new declaration node + * + * @example + * postcss.decl({ prop: 'color', value: 'red' }).toString() //=> "color: red" + */ + + +postcss.decl = function (defaults) { + return new _declaration.default(defaults); +}; +/** + * Creates a new {@link Rule} node. + * + * @param {object} [defaults] Properties for the new node. + * + * @return {Rule} new rule node + * + * @example + * postcss.rule({ selector: 'a' }).toString() //=> "a {\n}" + */ + + +postcss.rule = function (defaults) { + return new _rule.default(defaults); +}; +/** + * Creates a new {@link Root} node. + * + * @param {object} [defaults] Properties for the new node. + * + * @return {Root} new root node. + * + * @example + * postcss.root({ after: '\n' }).toString() //=> "\n" + */ + + +postcss.root = function (defaults) { + return new _root.default(defaults); +}; + +var _default = postcss; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBvc3Rjc3MuZXM2Il0sIm5hbWVzIjpbInBvc3Rjc3MiLCJwbHVnaW5zIiwibGVuZ3RoIiwiQXJyYXkiLCJpc0FycmF5IiwiUHJvY2Vzc29yIiwicGx1Z2luIiwibmFtZSIsImluaXR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vc3Rjc3MuanMifQ== diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/previous-map.js b/node_modules/autoprefixer/node_modules/postcss/lib/previous-map.js new file mode 100644 index 0000000..23cee46 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/previous-map.js @@ -0,0 +1,161 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _sourceMap = _interopRequireDefault(require("source-map")); + +var _path = _interopRequireDefault(require("path")); + +var _fs = _interopRequireDefault(require("fs")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function fromBase64(str) { + if (Buffer) { + return Buffer.from(str, 'base64').toString(); + } else { + return window.atob(str); + } +} +/** + * Source map information from input CSS. + * For example, source map after Sass compiler. + * + * This class will automatically find source map in input CSS or in file system + * near input file (according `from` option). + * + * @example + * const root = postcss.parse(css, { from: 'a.sass.css' }) + * root.input.map //=> PreviousMap + */ + + +var PreviousMap = +/*#__PURE__*/ +function () { + /** + * @param {string} css Input CSS source. + * @param {processOptions} [opts] {@link Processor#process} options. + */ + function PreviousMap(css, opts) { + this.loadAnnotation(css); + /** + * Was source map inlined by data-uri to input CSS. + * + * @type {boolean} + */ + + this.inline = this.startWith(this.annotation, 'data:'); + var prev = opts.map ? opts.map.prev : undefined; + var text = this.loadMap(opts.from, prev); + if (text) this.text = text; + } + /** + * Create a instance of `SourceMapGenerator` class + * from the `source-map` library to work with source map information. + * + * It is lazy method, so it will create object only on first call + * and then it will use cache. + * + * @return {SourceMapGenerator} Object with source map information. + */ + + + var _proto = PreviousMap.prototype; + + _proto.consumer = function consumer() { + if (!this.consumerCache) { + this.consumerCache = new _sourceMap.default.SourceMapConsumer(this.text); + } + + return this.consumerCache; + } + /** + * Does source map contains `sourcesContent` with input source text. + * + * @return {boolean} Is `sourcesContent` present. + */ + ; + + _proto.withContent = function withContent() { + return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); + }; + + _proto.startWith = function startWith(string, start) { + if (!string) return false; + return string.substr(0, start.length) === start; + }; + + _proto.loadAnnotation = function loadAnnotation(css) { + var match = css.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//); + if (match) this.annotation = match[1].trim(); + }; + + _proto.decodeInline = function decodeInline(text) { + var baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; + var baseUri = /^data:application\/json;base64,/; + var uri = 'data:application/json,'; + + if (this.startWith(text, uri)) { + return decodeURIComponent(text.substr(uri.length)); + } + + if (baseCharsetUri.test(text) || baseUri.test(text)) { + return fromBase64(text.substr(RegExp.lastMatch.length)); + } + + var encoding = text.match(/data:application\/json;([^,]+),/)[1]; + throw new Error('Unsupported source map encoding ' + encoding); + }; + + _proto.loadMap = function loadMap(file, prev) { + if (prev === false) return false; + + if (prev) { + if (typeof prev === 'string') { + return prev; + } else if (typeof prev === 'function') { + var prevPath = prev(file); + + if (prevPath && _fs.default.existsSync && _fs.default.existsSync(prevPath)) { + return _fs.default.readFileSync(prevPath, 'utf-8').toString().trim(); + } else { + throw new Error('Unable to load previous source map: ' + prevPath.toString()); + } + } else if (prev instanceof _sourceMap.default.SourceMapConsumer) { + return _sourceMap.default.SourceMapGenerator.fromSourceMap(prev).toString(); + } else if (prev instanceof _sourceMap.default.SourceMapGenerator) { + return prev.toString(); + } else if (this.isMap(prev)) { + return JSON.stringify(prev); + } else { + throw new Error('Unsupported previous source map format: ' + prev.toString()); + } + } else if (this.inline) { + return this.decodeInline(this.annotation); + } else if (this.annotation) { + var map = this.annotation; + if (file) map = _path.default.join(_path.default.dirname(file), map); + this.root = _path.default.dirname(map); + + if (_fs.default.existsSync && _fs.default.existsSync(map)) { + return _fs.default.readFileSync(map, 'utf-8').toString().trim(); + } else { + return false; + } + } + }; + + _proto.isMap = function isMap(map) { + if (typeof map !== 'object') return false; + return typeof map.mappings === 'string' || typeof map._mappings === 'string'; + }; + + return PreviousMap; +}(); + +var _default = PreviousMap; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf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gZnMucmVhZEZpbGVTeW5jKG1hcCwgJ3V0Zi04JykudG9TdHJpbmcoKS50cmltKClcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIGlzTWFwIChtYXApIHtcbiAgICBpZiAodHlwZW9mIG1hcCAhPT0gJ29iamVjdCcpIHJldHVybiBmYWxzZVxuICAgIHJldHVybiB0eXBlb2YgbWFwLm1hcHBpbmdzID09PSAnc3RyaW5nJyB8fCB0eXBlb2YgbWFwLl9tYXBwaW5ncyA9PT0gJ3N0cmluZydcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBQcmV2aW91c01hcFxuIl0sImZpbGUiOiJwcmV2aW91cy1tYXAuanMifQ== diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/processor.js b/node_modules/autoprefixer/node_modules/postcss/lib/processor.js new file mode 100644 index 0000000..8dc8ea5 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/processor.js @@ -0,0 +1,263 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _lazyResult = _interopRequireDefault(require("./lazy-result")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Contains plugins to process CSS. Create one `Processor` instance, + * initialize its plugins, and then use that instance on numerous CSS files. + * + * @example + * const processor = postcss([autoprefixer, precss]) + * processor.process(css1).then(result => console.log(result.css)) + * processor.process(css2).then(result => console.log(result.css)) + */ +var Processor = +/*#__PURE__*/ +function () { + /** + * @param {Array.<Plugin|pluginFunction>|Processor} plugins PostCSS plugins. + * See {@link Processor#use} for plugin format. + */ + function Processor(plugins) { + if (plugins === void 0) { + plugins = []; + } + + /** + * Current PostCSS version. + * + * @type {string} + * + * @example + * if (result.processor.version.split('.')[0] !== '6') { + * throw new Error('This plugin works only with PostCSS 6') + * } + */ + this.version = '7.0.18'; + /** + * Plugins added to this processor. + * + * @type {pluginFunction[]} + * + * @example + * const processor = postcss([autoprefixer, precss]) + * processor.plugins.length //=> 2 + */ + + this.plugins = this.normalize(plugins); + } + /** + * Adds a plugin to be used as a CSS processor. + * + * PostCSS plugin can be in 4 formats: + * * A plugin created by {@link postcss.plugin} method. + * * A function. PostCSS will pass the function a @{link Root} + * as the first argument and current {@link Result} instance + * as the second. + * * An object with a `postcss` method. PostCSS will use that method + * as described in #2. + * * Another {@link Processor} instance. PostCSS will copy plugins + * from that instance into this one. + * + * Plugins can also be added by passing them as arguments when creating + * a `postcss` instance (see [`postcss(plugins)`]). + * + * Asynchronous plugins should return a `Promise` instance. + * + * @param {Plugin|pluginFunction|Processor} plugin PostCSS plugin + * or {@link Processor} + * with plugins. + * + * @example + * const processor = postcss() + * .use(autoprefixer) + * .use(precss) + * + * @return {Processes} Current processor to make methods chain. + */ + + + var _proto = Processor.prototype; + + _proto.use = function use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])); + return this; + } + /** + * Parses source CSS and returns a {@link LazyResult} Promise proxy. + * Because some plugins can be asynchronous it doesn’t make + * any transformations. Transformations will be applied + * in the {@link LazyResult} methods. + * + * @param {string|toString|Result} css String with input CSS or any object + * with a `toString()` method, + * like a Buffer. Optionally, send + * a {@link Result} instance + * and the processor will take + * the {@link Root} from it. + * @param {processOptions} [opts] Options. + * + * @return {LazyResult} Promise proxy. + * + * @example + * processor.process(css, { from: 'a.css', to: 'a.out.css' }) + * .then(result => { + * console.log(result.css) + * }) + */ + ; + + _proto.process = function (_process) { + function process(_x) { + return _process.apply(this, arguments); + } + + process.toString = function () { + return _process.toString(); + }; + + return process; + }(function (css, opts) { + if (opts === void 0) { + opts = {}; + } + + if (this.plugins.length === 0 && opts.parser === opts.stringifier) { + if (process.env.NODE_ENV !== 'production') { + if (typeof console !== 'undefined' && console.warn) { + console.warn('You did not set any plugins, parser, or stringifier. ' + 'Right now, PostCSS does nothing. Pick plugins for your case ' + 'on https://www.postcss.parts/ and use them in postcss.config.js.'); + } + } + } + + return new _lazyResult.default(this, css, opts); + }); + + _proto.normalize = function normalize(plugins) { + var normalized = []; + + for (var _iterator = plugins, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var i = _ref; + if (i.postcss) i = i.postcss; + + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins); + } else if (typeof i === 'function') { + normalized.push(i); + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if (process.env.NODE_ENV !== 'production') { + throw new Error('PostCSS syntaxes cannot be used as plugins. Instead, please use ' + 'one of the syntax/parser/stringifier options as outlined ' + 'in your PostCSS runner documentation.'); + } + } else { + throw new Error(i + ' is not a PostCSS plugin'); + } + } + + return normalized; + }; + + return Processor; +}(); + +var _default = Processor; +/** + * @callback builder + * @param {string} part Part of generated CSS connected to this node. + * @param {Node} node AST node. + * @param {"start"|"end"} [type] Node’s part type. + */ + +/** + * @callback parser + * + * @param {string|toString} css String with input CSS or any object + * with toString() method, like a Buffer. + * @param {processOptions} [opts] Options with only `from` and `map` keys. + * + * @return {Root} PostCSS AST + */ + +/** + * @callback stringifier + * + * @param {Node} node Start node for stringifing. Usually {@link Root}. + * @param {builder} builder Function to concatenate CSS from node’s parts + * or generate string and source map. + * + * @return {void} + */ + +/** + * @typedef {object} syntax + * @property {parser} parse Function to generate AST by string. + * @property {stringifier} stringify Function to generate string by AST. + */ + +/** + * @typedef {object} toString + * @property {function} toString + */ + +/** + * @callback pluginFunction + * @param {Root} root Parsed input CSS. + * @param {Result} result Result to set warnings or check other plugins. + */ + +/** + * @typedef {object} Plugin + * @property {function} postcss PostCSS plugin function. + */ + +/** + * @typedef {object} processOptions + * @property {string} from The path of the CSS source file. + * You should always set `from`, + * because it is used in source map + * generation and syntax error messages. + * @property {string} to The path where you’ll put the output + * CSS file. You should always set `to` + * to generate correct source maps. + * @property {parser} parser Function to generate AST by string. + * @property {stringifier} stringifier Class to generate string by AST. + * @property {syntax} syntax Object with `parse` and `stringify`. + * @property {object} map Source map options. + * @property {boolean} map.inline Does source map should + * be embedded in the output + * CSS as a base64-encoded + * comment. + * @property {string|object|false|function} map.prev Source map content + * from a previous + * processing step + * (for example, Sass). + * PostCSS will try to find + * previous map automatically, + * so you could disable it by + * `false` value. + * @property {boolean} map.sourcesContent Does PostCSS should set + * the origin content to map. + * @property {string|false} map.annotation Does PostCSS should set + * annotation comment to map. + * @property {string} map.from Override `from` in map’s + * sources`. + */ + +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2Nlc3Nvci5lczYiXSwibmFtZXMiOlsiUHJvY2Vzc29yIiwicGx1Z2lucyIsInZlcnNpb24iLCJub3JtYWxpemUiLCJ1c2UiLCJwbHVnaW4iLCJjb25jYXQiLCJwcm9jZXNzIiwiY3NzIiwib3B0cyIsImxlbmd0aCIsInBhcnNlciIsInN0cmluZ2lmaWVyIiwiZW52IiwiTk9ERV9FTlYiLCJjb25zb2xlIiwid2FybiIsIkxhenlSZXN1bHQiLCJub3JtYWxpemVkIiwiaSIsInBvc3Rjc3MiLCJBcnJheSIsImlzQXJyYXkiLCJwdXNoIiwicGFyc2UiLCJzdHJpbmdpZnkiLCJFcnJvciJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTs7OztBQUVBOzs7Ozs7Ozs7SUFTTUEsUzs7O0FBQ0o7Ozs7QUFJQSxxQkFBYUMsT0FBYixFQUEyQjtBQUFBLFFBQWRBLE9BQWM7QUFBZEEsTUFBQUEsT0FBYyxHQUFKLEVBQUk7QUFBQTs7QUFDekI7Ozs7Ozs7Ozs7QUFVQSxTQUFLQyxPQUFMLEdBQWUsUUFBZjtBQUNBOzs7Ozs7Ozs7O0FBU0EsU0FBS0QsT0FBTCxHQUFlL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gICAgcmV0dXJuIHRoaXNcbiAgfVxuXG4gIC8qKlxuICAgKiBQYXJzZXMgc291cmNlIENTUyBhbmQgcmV0dXJucyBhIHtAbGluayBMYXp5UmVzdWx0fSBQcm9taXNlIHByb3h5LlxuICAgKiBCZWNhdXNlIHNvbWUgcGx1Z2lucyBjYW4gYmUgYXN5bmNocm9ub3VzIGl0IGRvZXNu4oCZdCBtYWtlXG4gICAqIGFueSB0cmFuc2Zvcm1hdGlvbnMuIFRyYW5zZm9ybWF0aW9ucyB3aWxsIGJlIGFwcGxpZWRcbiAgICogaW4gdGhlIHtAbGluayBMYXp5UmVzdWx0fSBtZXRob2RzLlxuICAgKlxuICAgKiBAcGFyYW0ge3N0cmluZ3x0b1N0cmluZ3xSZXN1bHR9IGNzcyBTdHJpbmcgd2l0aCBpbnB1dCBDU1Mgb3IgYW55IG9iamVjdFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoIGEgYHRvU3RyaW5nKClgIG1ldGhvZCxcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlrZSBhIEJ1ZmZlci4gT3B0aW9uYWxseSwgc2VuZFxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhIHtAbGluayBSZXN1bHR9IGluc3RhbmNlXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCB0aGUgcHJvY2Vzc29yIHdpbGwgdGFrZVxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUge0BsaW5rIFJvb3R9IGZyb20gaXQuXG4gICAqIEBwYXJhbSB7cHJvY2Vzc09wdGlvbnN9IFtvcHRzXSAgICAgIE9wdGlvbnMuXG4gICAqXG4gICAqIEByZXR1cm4ge0xhenlSZXN1bHR9IFByb21pc2UgcHJveHkuXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIHByb2Nlc3Nvci5wcm9jZXNzKGNzc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gICAgQ1NTIGZpbGUuIFlvdSBzaG91bGQgYWx3YXlzIHNldCBgdG9gXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBnZW5lcmF0ZSBjb3JyZWN0IHNvdXJjZSBtYXBzLlxuICogQHByb3BlcnR5IHtwYXJzZXJ9IHBhcnNlciAgICAgICAgICAgRnVuY3Rpb24gdG8gZ2VuZXJhdGUgQVNUIGJ5IHN0cmluZy5cbiAqIEBwcm9wZXJ0eSB7c3RyaW5naWZpZXJ9IHN0cmluZ2lmaWVyIENsYXNzIHRvIGdlbmVyYXRlIHN0cmluZyBieSBBU1QuXG4gKiBAcHJvcGVydHkge3N5bnRheH0gc3ludGF4ICAgICAgICAgICBPYmplY3Qgd2l0aCBgcGFyc2VgIGFuZCBgc3RyaW5naWZ5YC5cbiAqIEBwcm9wZXJ0eSB7b2JqZWN0fSBtYXAgICAgICAgICAgICAgIFNvdXJjZSBtYXAgb3B0aW9ucy5cbiAqIEBwcm9wZXJ0eSB7Ym9vbGVhbn0gbWFwLmlubGluZSAgICAgICAgICAgICAgICAgICAgRG9lcyBzb3VyY2UgbWFwIHNob3VsZFxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZSBlbWJlZGRlZCBpbiB0aGUgb3V0cHV0XG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENTUyBhcyBhIGJhc2U2NC1lbmNvZGVkXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbW1lbnQuXG4gKiBAcHJvcGVydHkge3N0cmluZ3xvYmplY3R8ZmFsc2V8ZnVuY3Rpb259IG1hcC5wcmV2IFNvdXJjZSBtYXAgY29udGVudFxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIGEgcHJldmlvdXNcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc2luZyBzdGVwXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmb3IgZXhhbXBsZSwgU2FzcykuXG4gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBvc3RDU1Mgd2lsbCB0cnkgdG8gZmluZFxuICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91cyBtYXAgYXV0b21hdGljYWxseSxcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc28geW91IGNvdWxkIGRpc2FibGUgaXQgYnlcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYGZhbHNlYCB2YWx1ZS5cbiAqIEBwcm9wZXJ0eSB7Ym9vbGVhbn0gbWFwLnNvdXJjZXNDb250ZW50ICAgICAgICAgICAgRG9lcyBQb3N0Q1NTIHNob3VsZCBzZXRcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIG9yaWdpbiBjb250ZW50IHRvIG1hcC5cbiAqIEBwcm9wZXJ0eSB7c3RyaW5nfGZhbHNlfSBtYXAuYW5ub3RhdGlvbiAgICAgICAgICAgRG9lcyBQb3N0Q1NTIHNob3VsZCBzZXRcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5ub3RhdGlvbiBjb21tZW50IHRvIG1hcC5cbiAqIEBwcm9wZXJ0eSB7c3RyaW5nfSBtYXAuZnJvbSAgICAgICAgICAgICAgICAgICAgICAgT3ZlcnJpZGUgYGZyb21gIGluIG1hcOKAmXNcbiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlc2AuXG4gKi9cbiJdLCJmaWxlIjoicHJvY2Vzc29yLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/result.js b/node_modules/autoprefixer/node_modules/postcss/lib/result.js new file mode 100644 index 0000000..af3610a --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/result.js @@ -0,0 +1,215 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _warning = _interopRequireDefault(require("./warning")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +/** + * Provides the result of the PostCSS transformations. + * + * A Result instance is returned by {@link LazyResult#then} + * or {@link Root#toResult} methods. + * + * @example + * postcss([autoprefixer]).process(css).then(result => { + * console.log(result.css) + * }) + * + * @example + * const result2 = postcss.parse(css).toResult() + */ +var Result = +/*#__PURE__*/ +function () { + /** + * @param {Processor} processor Processor used for this transformation. + * @param {Root} root Root node after all transformations. + * @param {processOptions} opts Options from the {@link Processor#process} + * or {@link Root#toResult}. + */ + function Result(processor, root, opts) { + /** + * The Processor instance used for this transformation. + * + * @type {Processor} + * + * @example + * for (const plugin of result.processor.plugins) { + * if (plugin.postcssPlugin === 'postcss-bad') { + * throw 'postcss-good is incompatible with postcss-bad' + * } + * }) + */ + this.processor = processor; + /** + * Contains messages from plugins (e.g., warnings or custom messages). + * Each message should have type and plugin properties. + * + * @type {Message[]} + * + * @example + * postcss.plugin('postcss-min-browser', () => { + * return (root, result) => { + * const browsers = detectMinBrowsersByCanIUse(root) + * result.messages.push({ + * type: 'min-browser', + * plugin: 'postcss-min-browser', + * browsers + * }) + * } + * }) + */ + + this.messages = []; + /** + * Root node after all transformations. + * + * @type {Root} + * + * @example + * root.toResult().root === root + */ + + this.root = root; + /** + * Options from the {@link Processor#process} or {@link Root#toResult} call + * that produced this Result instance. + * + * @type {processOptions} + * + * @example + * root.toResult(opts).opts === opts + */ + + this.opts = opts; + /** + * A CSS string representing of {@link Result#root}. + * + * @type {string} + * + * @example + * postcss.parse('a{}').toResult().css //=> "a{}" + */ + + this.css = undefined; + /** + * An instance of `SourceMapGenerator` class from the `source-map` library, + * representing changes to the {@link Result#root} instance. + * + * @type {SourceMapGenerator} + * + * @example + * result.map.toJSON() //=> { version: 3, file: 'a.css', … } + * + * @example + * if (result.map) { + * fs.writeFileSync(result.opts.to + '.map', result.map.toString()) + * } + */ + + this.map = undefined; + } + /** + * Returns for @{link Result#css} content. + * + * @example + * result + '' === result.css + * + * @return {string} String representing of {@link Result#root}. + */ + + + var _proto = Result.prototype; + + _proto.toString = function toString() { + return this.css; + } + /** + * Creates an instance of {@link Warning} and adds it + * to {@link Result#messages}. + * + * @param {string} text Warning message. + * @param {Object} [opts] Warning options. + * @param {Node} opts.node CSS node that caused the warning. + * @param {string} opts.word Word in CSS source that caused the warning. + * @param {number} opts.index Index in CSS node string that caused + * the warning. + * @param {string} opts.plugin Name of the plugin that created + * this warning. {@link Result#warn} fills + * this property automatically. + * + * @return {Warning} Created warning. + */ + ; + + _proto.warn = function warn(text, opts) { + if (opts === void 0) { + opts = {}; + } + + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + + var warning = new _warning.default(text, opts); + this.messages.push(warning); + return warning; + } + /** + * Returns warnings from plugins. Filters {@link Warning} instances + * from {@link Result#messages}. + * + * @example + * result.warnings().forEach(warn => { + * console.warn(warn.toString()) + * }) + * + * @return {Warning[]} Warnings from plugins. + */ + ; + + _proto.warnings = function warnings() { + return this.messages.filter(function (i) { + return i.type === 'warning'; + }); + } + /** + * An alias for the {@link Result#css} property. + * Use it with syntaxes that generate non-CSS output. + * + * @type {string} + * + * @example + * result.css === result.content + */ + ; + + _createClass(Result, [{ + key: "content", + get: function get() { + return this.css; + } + }]); + + return Result; +}(); + +var _default = Result; +/** + * @typedef {object} Message + * @property {string} type Message type. + * @property {string} plugin Source PostCSS plugin name. + */ + +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc3VsdC5lczYiXSwibmFtZXMiOlsiUmVzdWx0IiwicHJvY2Vzc29yIiwicm9vdCIsIm9wdHMiLCJtZXNzYWdlcyIsImNzcyIsInVuZGVmaW5lZCIsIm1hcCIsInRvU3RyaW5nIiwid2FybiIsInRleHQiLCJwbHVnaW4iLCJsYXN0UGx1Z2luIiwicG9zdGNzc1BsdWdpbiIsIndhcm5pbmciLCJXYXJuaW5nIiwicHVzaCIsIndhcm5pbmdzIiwiZmlsdGVyIiwiaSIsInR5cGUiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7Ozs7O0FBRUE7Ozs7Ozs7Ozs7Ozs7O0lBY01BLE07OztBQUNKOzs7Ozs7QUFNQSxrQkFBYUMsU0FBYixFQUF3QkMsSUFBeEIsRUFBOEJDLElBQTlCLEVBQW9DO0FBQ2xDOzs7Ozs7Ozs7Ozs7QUFZQSxTQUFLRixTQUFMLEdBQWlCQSxTQUFqQjtBQUNBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBa0JBLFNBQUtHLFFBQUwsR0FBZ0IsRUFBaEI7QUFDQTs7Ozs7Ozs7O0FBUUEsU0FBS0YsSUFBTCxHQUFZQSxJQUFaO0FBQ0E7Ozs7Ozs7Ozs7QUFTQSxTQUFLQyxJQUFMLEdBQVlBLElBQVo7QUFDQTs7Ozs7Ozs7O0FBUUEsU0FBS0UsR0FBTCxHQUFXQyxTQUFYO0FBQ0E7Ozs7Ozs7Ozs7Ozs7OztBQWNBLFNBQUt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biAgICAgKiByZXN1bHQud2FybmluZ3MoKS5mb3JFYWNoKHdhcm4gPT4ge1xuICAgICAqICAgY29uc29sZS53YXJuKHdhcm4udG9TdHJpbmcoKSlcbiAgICAgKiB9KVxuICAgICAqXG4gICAgICogQHJldHVybiB7V2FybmluZ1tdfSBXYXJuaW5ncyBmcm9tIHBsdWdpbnMuXG4gICAgICovXG4gIHdhcm5pbmdzICgpIHtcbiAgICByZXR1cm4gdGhpcy5tZXNzYWdlcy5maWx0ZXIoaSA9PiBpLnR5cGUgPT09ICd3YXJuaW5nJylcbiAgfVxuXG4gIC8qKlxuICAgKiBBbiBhbGlhcyBmb3IgdGhlIHtAbGluayBSZXN1bHQjY3NzfSBwcm9wZXJ0eS5cbiAgICogVXNlIGl0IHdpdGggc3ludGF4ZXMgdGhhdCBnZW5lcmF0ZSBub24tQ1NTIG91dHB1dC5cbiAgICpcbiAgICogQHR5cGUge3N0cmluZ31cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogcmVzdWx0LmNzcyA9PT0gcmVzdWx0LmNvbnRlbnRcbiAgICovXG4gIGdldCBjb250ZW50ICgpIHtcbiAgICByZXR1cm4gdGhpcy5jc3NcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBSZXN1bHRcblxuLyoqXG4gKiBAdHlwZWRlZiAge29iamVjdH0gTWVzc2FnZVxuICogQHByb3BlcnR5IHtzdHJpbmd9IHR5cGUgICBNZXNzYWdlIHR5cGUuXG4gKiBAcHJvcGVydHkge3N0cmluZ30gcGx1Z2luIFNvdXJjZSBQb3N0Q1NTIHBsdWdpbiBuYW1lLlxuICovXG4iXSwiZmlsZSI6InJlc3VsdC5qcyJ9 diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/root.js b/node_modules/autoprefixer/node_modules/postcss/lib/root.js new file mode 100644 index 0000000..95649b1 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/root.js @@ -0,0 +1,129 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _container = _interopRequireDefault(require("./container")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +/** + * Represents a CSS file and contains all its parsed nodes. + * + * @extends Container + * + * @example + * const root = postcss.parse('a{color:black} b{z-index:2}') + * root.type //=> 'root' + * root.nodes.length //=> 2 + */ +var Root = +/*#__PURE__*/ +function (_Container) { + _inheritsLoose(Root, _Container); + + function Root(defaults) { + var _this; + + _this = _Container.call(this, defaults) || this; + _this.type = 'root'; + if (!_this.nodes) _this.nodes = []; + return _this; + } + + var _proto = Root.prototype; + + _proto.removeChild = function removeChild(child, ignore) { + var index = this.index(child); + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before; + } + + return _Container.prototype.removeChild.call(this, child); + }; + + _proto.normalize = function normalize(child, sample, type) { + var nodes = _Container.prototype.normalize.call(this, child); + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before; + } else { + delete sample.raws.before; + } + } else if (this.first !== sample) { + for (var _iterator = nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var node = _ref; + node.raws.before = sample.raws.before; + } + } + } + + return nodes; + } + /** + * Returns a {@link Result} instance representing the root’s CSS. + * + * @param {processOptions} [opts] Options with only `to` and `map` keys. + * + * @return {Result} Result with current root’s CSS. + * + * @example + * const root1 = postcss.parse(css1, { from: 'a.css' }) + * const root2 = postcss.parse(css2, { from: 'b.css' }) + * root1.append(root2) + * const result = root1.toResult({ to: 'all.css', map: true }) + */ + ; + + _proto.toResult = function toResult(opts) { + if (opts === void 0) { + opts = {}; + } + + var LazyResult = require('./lazy-result'); + + var Processor = require('./processor'); + + var lazy = new LazyResult(new Processor(), this, opts); + return lazy.stringify(); + } + /** + * @memberof Root# + * @member {object} raws Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `after`: the space symbols after the last child to the end of file. + * * `semicolon`: is the last child has an (optional) semicolon. + * + * @example + * postcss.parse('a {}\n').raws //=> { after: '\n' } + * postcss.parse('a {}').raws //=> { after: '' } + */ + ; + + return Root; +}(_container.default); + +var _default = Root; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJvb3QuZXM2Il0sIm5hbWVzIjpbIlJvb3QiLCJkZWZhdWx0cyIsInR5cGUiLCJub2RlcyIsInJlbW92ZUNoaWxkIiwiY2hpbGQiLCJpZ25vcmUiLCJpbmRleCIsImxlbmd0aCIsInJhd3MiLCJiZWZvcmUiLCJub3JtYWxpemUiLCJzYW1wbGUiLCJmaXJzdCIsIm5vZGUiLCJ0b1Jlc3VsdCIsIm9wdHMiLCJMYXp5UmVzdWx0IiwicmVxdWlyZSIsIlByb2Nlc3NvciIsImxhenkiLCJzdHJpbmdpZnkiLCJDb250YWluZXIiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7OztBQUVBOzs7Ozs7Ozs7O0lBVU1BLEk7Ozs7O0FBQ0osZ0JBQWFDLFFBQWIsRUFBdUI7QUFBQTs7QUFDckIsa0NBQU1BLFFBQU47QUFDQSxVQUFLQyxJQUFMLEdBQVksTUFBWjtBQUNBLFFBQUksQ0FBQyxNQUFLQyxLQUFWLEVBQWlCLE1BQUtBLEtBQUwsR0FBYSxFQUFiO0FBSEk7QUFJdEI7Ozs7U0FFREMsVyxHQUFBLHFCQUFhQyxLQUFiLEVBQW9CQyxNQUFwQixFQUE0QjtBQUMxQixRQUFJQyxLQUFLLEdBQUcs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GluIHRoZSBvcmlnaW4gaW5wdXQuXG4gICAqXG4gICAqIEV2ZXJ5IHBhcnNlciBzYXZlcyBpdHMgb3duIHByb3BlcnRpZXMsXG4gICAqIGJ1dCB0aGUgZGVmYXVsdCBDU1MgcGFyc2VyIHVzZXM6XG4gICAqXG4gICAqICogYGFmdGVyYDogdGhlIHNwYWNlIHN5bWJvbHMgYWZ0ZXIgdGhlIGxhc3QgY2hpbGQgdG8gdGhlIGVuZCBvZiBmaWxlLlxuICAgKiAqIGBzZW1pY29sb25gOiBpcyB0aGUgbGFzdCBjaGlsZCBoYXMgYW4gKG9wdGlvbmFsKSBzZW1pY29sb24uXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIHBvc3Rjc3MucGFyc2UoJ2Ege31cXG4nKS5yYXdzIC8vPT4geyBhZnRlcjogJ1xcbicgfVxuICAgKiBwb3N0Y3NzLnBhcnNlKCdhIHt9JykucmF3cyAgIC8vPT4geyBhZnRlcjogJycgfVxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgUm9vdFxuIl0sImZpbGUiOiJyb290LmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/rule.js b/node_modules/autoprefixer/node_modules/postcss/lib/rule.js new file mode 100644 index 0000000..1fc1f85 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/rule.js @@ -0,0 +1,118 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _container = _interopRequireDefault(require("./container")); + +var _list = _interopRequireDefault(require("./list")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +/** + * Represents a CSS rule: a selector followed by a declaration block. + * + * @extends Container + * + * @example + * const root = postcss.parse('a{}') + * const rule = root.first + * rule.type //=> 'rule' + * rule.toString() //=> 'a{}' + */ +var Rule = +/*#__PURE__*/ +function (_Container) { + _inheritsLoose(Rule, _Container); + + function Rule(defaults) { + var _this; + + _this = _Container.call(this, defaults) || this; + _this.type = 'rule'; + if (!_this.nodes) _this.nodes = []; + return _this; + } + /** + * An array containing the rule’s individual selectors. + * Groups of selectors are split at commas. + * + * @type {string[]} + * + * @example + * const root = postcss.parse('a, b { }') + * const rule = root.first + * + * rule.selector //=> 'a, b' + * rule.selectors //=> ['a', 'b'] + * + * rule.selectors = ['a', 'strong'] + * rule.selector //=> 'a, strong' + */ + + + _createClass(Rule, [{ + key: "selectors", + get: function get() { + return _list.default.comma(this.selector); + }, + set: function set(values) { + var match = this.selector ? this.selector.match(/,\s*/) : null; + var sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); + this.selector = values.join(sep); + } + /** + * @memberof Rule# + * @member {string} selector The rule’s full selector represented + * as a string. + * + * @example + * const root = postcss.parse('a, b { }') + * const rule = root.first + * rule.selector //=> 'a, b' + */ + + /** + * @memberof Rule# + * @member {object} raws Information to generate byte-to-byte equal + * node string as it was in the origin input. + * + * Every parser saves its own properties, + * but the default CSS parser uses: + * + * * `before`: the space symbols before the node. It also stores `*` + * and `_` symbols before the declaration (IE hack). + * * `after`: the space symbols after the last child of the node + * to the end of the node. + * * `between`: the symbols between the property and value + * for declarations, selector and `{` for rules, or last parameter + * and `{` for at-rules. + * * `semicolon`: contains `true` if the last child has + * an (optional) semicolon. + * * `ownSemicolon`: contains `true` if there is semicolon after rule. + * + * PostCSS cleans selectors from comments and extra spaces, + * but it stores origin content in raws properties. + * As such, if you don’t change a declaration’s value, + * PostCSS will use the raw value with comments. + * + * @example + * const root = postcss.parse('a {\n color:black\n}') + * root.first.first.raws //=> { before: '', between: ' ', after: '\n' } + */ + + }]); + + return Rule; +}(_container.default); + +var _default = Rule; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGUuZXM2Il0sIm5hbWVzIjpbIlJ1bGUiLCJkZWZhdWx0cyIsInR5cGUiLCJub2RlcyIsImxpc3QiLCJjb21tYSIsInNlbGVjdG9yIiwidmFsdWVzIiwibWF0Y2giLCJzZXAiLCJyYXciLCJqb2luIiwiQ29udGFpbmVyIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUNBOzs7Ozs7Ozs7O0FBRUE7Ozs7Ozs7Ozs7O0lBV01BLEk7Ozs7O0FBQ0osZ0JBQWFDLFFBQWIsRUFBdUI7QUFBQTs7QUFDckIsa0NBQU1BLFFBQU47QUFDQSxVQUFLQyxJQUFMLEdBQVksTUFBWjtBQUNBLFFBQUksQ0FBQyxNQUFLQyxLQUFWLEVBQWlCLE1BQUtBLEtBQUwsR0FBYSxFQUFiO0FBSEk7QUFJdEI7QUFFRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7d0JBZ0JpQjtBQUNmLGFBQU9DLGNBQUtDLEtBQUwsQ0FBVyxLQUFLQyxRQUFoQixDQUFQO0FBQ0QsSztzQkFFY0MsTSxFQUFRO0FBQ3JCLFVBQUlDLEtBQUssR0FBRyxLQUFLRixRQUFMLEdBQWdCLEtBQUtBLFFBQUwsQ0FBY0UsS0FBZCxDQUFvQixNQUFwQixDQUFoQixHQUE4QyxJQUExRDtBQUNBLFVBQUlDLEdBQUcsR0FBR0QsS0FBSyxHQUFHQSxLQUFLLENBQUMsQ0FBRCxDQUFSLEdBQWMsTUFBTSxLQUFLRSxHQUFMLENBQVMsU0FBVCxFQUFvQixZQUFwQixDQUFuQztBQUNBLFdBQUtKLFFBQUwsR0FBZ0JDLE1B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ZWN0b3JzIGZyb20gY29tbWVudHMgYW5kIGV4dHJhIHNwYWNlcyxcbiAgICogYnV0IGl0IHN0b3JlcyBvcmlnaW4gY29udGVudCBpbiByYXdzIHByb3BlcnRpZXMuXG4gICAqIEFzIHN1Y2gsIGlmIHlvdSBkb27igJl0IGNoYW5nZSBhIGRlY2xhcmF0aW9u4oCZcyB2YWx1ZSxcbiAgICogUG9zdENTUyB3aWxsIHVzZSB0aGUgcmF3IHZhbHVlIHdpdGggY29tbWVudHMuXG4gICAqXG4gICAqIEBleGFtcGxlXG4gICAqIGNvbnN0IHJvb3QgPSBwb3N0Y3NzLnBhcnNlKCdhIHtcXG4gIGNvbG9yOmJsYWNrXFxufScpXG4gICAqIHJvb3QuZmlyc3QuZmlyc3QucmF3cyAvLz0+IHsgYmVmb3JlOiAnJywgYmV0d2VlbjogJyAnLCBhZnRlcjogJ1xcbicgfVxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgUnVsZVxuIl0sImZpbGUiOiJydWxlLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/stringifier.js b/node_modules/autoprefixer/node_modules/postcss/lib/stringifier.js new file mode 100644 index 0000000..3ef3435 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/stringifier.js @@ -0,0 +1,364 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; +var DEFAULT_RAW = { + colon: ': ', + indent: ' ', + beforeDecl: '\n', + beforeRule: '\n', + beforeOpen: ' ', + beforeClose: '\n', + beforeComment: '\n', + after: '\n', + emptyBody: '', + commentLeft: ' ', + commentRight: ' ', + semicolon: false +}; + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +} + +var Stringifier = +/*#__PURE__*/ +function () { + function Stringifier(builder) { + this.builder = builder; + } + + var _proto = Stringifier.prototype; + + _proto.stringify = function stringify(node, semicolon) { + this[node.type](node, semicolon); + }; + + _proto.root = function root(node) { + this.body(node); + if (node.raws.after) this.builder(node.raws.after); + }; + + _proto.comment = function comment(node) { + var left = this.raw(node, 'left', 'commentLeft'); + var right = this.raw(node, 'right', 'commentRight'); + this.builder('/*' + left + node.text + right + '*/', node); + }; + + _proto.decl = function decl(node, semicolon) { + var between = this.raw(node, 'between', 'colon'); + var string = node.prop + between + this.rawValue(node, 'value'); + + if (node.important) { + string += node.raws.important || ' !important'; + } + + if (semicolon) string += ';'; + this.builder(string, node); + }; + + _proto.rule = function rule(node) { + this.block(node, this.rawValue(node, 'selector')); + + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end'); + } + }; + + _proto.atrule = function atrule(node, semicolon) { + var name = '@' + node.name; + var params = node.params ? this.rawValue(node, 'params') : ''; + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName; + } else if (params) { + name += ' '; + } + + if (node.nodes) { + this.block(node, name + params); + } else { + var end = (node.raws.between || '') + (semicolon ? ';' : ''); + this.builder(name + params + end, node); + } + }; + + _proto.body = function body(node) { + var last = node.nodes.length - 1; + + while (last > 0) { + if (node.nodes[last].type !== 'comment') break; + last -= 1; + } + + var semicolon = this.raw(node, 'semicolon'); + + for (var i = 0; i < node.nodes.length; i++) { + var child = node.nodes[i]; + var before = this.raw(child, 'before'); + if (before) this.builder(before); + this.stringify(child, last !== i || semicolon); + } + }; + + _proto.block = function block(node, start) { + var between = this.raw(node, 'between', 'beforeOpen'); + this.builder(start + between + '{', node, 'start'); + var after; + + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) this.builder(after); + this.builder('}', node, 'end'); + }; + + _proto.raw = function raw(node, own, detect) { + var value; + if (!detect) detect = own; // Already had + + if (own) { + value = node.raws[own]; + if (typeof value !== 'undefined') return value; + } + + var parent = node.parent; // Hack for first rule in CSS + + if (detect === 'before') { + if (!parent || parent.type === 'root' && parent.first === node) { + return ''; + } + } // Floating child without parent + + + if (!parent) return DEFAULT_RAW[detect]; // Detect style by other nodes + + var root = node.root(); + if (!root.rawCache) root.rawCache = {}; + + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect]; + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect); + } else { + var method = 'raw' + capitalize(detect); + + if (this[method]) { + value = this[method](root, node); + } else { + root.walk(function (i) { + value = i.raws[own]; + if (typeof value !== 'undefined') return false; + }); + } + } + + if (typeof value === 'undefined') value = DEFAULT_RAW[detect]; + root.rawCache[detect] = value; + return value; + }; + + _proto.rawSemicolon = function rawSemicolon(root) { + var value; + root.walk(function (i) { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + _proto.rawEmptyBody = function rawEmptyBody(root) { + var value; + root.walk(function (i) { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + _proto.rawIndent = function rawIndent(root) { + if (root.raws.indent) return root.raws.indent; + var value; + root.walk(function (i) { + var p = i.parent; + + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + var parts = i.raws.before.split('\n'); + value = parts[parts.length - 1]; + value = value.replace(/[^\s]/g, ''); + return false; + } + } + }); + return value; + }; + + _proto.rawBeforeComment = function rawBeforeComment(root, node) { + var value; + root.walkComments(function (i) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + }); + + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl'); + } else if (value) { + value = value.replace(/[^\s]/g, ''); + } + + return value; + }; + + _proto.rawBeforeDecl = function rawBeforeDecl(root, node) { + var value; + root.walkDecls(function (i) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + }); + + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule'); + } else if (value) { + value = value.replace(/[^\s]/g, ''); + } + + return value; + }; + + _proto.rawBeforeRule = function rawBeforeRule(root) { + var value; + root.walk(function (i) { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + } + }); + if (value) value = value.replace(/[^\s]/g, ''); + return value; + }; + + _proto.rawBeforeClose = function rawBeforeClose(root) { + var value; + root.walk(function (i) { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after; + + if (value.indexOf('\n') !== -1) { + value = value.replace(/[^\n]+$/, ''); + } + + return false; + } + } + }); + if (value) value = value.replace(/[^\s]/g, ''); + return value; + }; + + _proto.rawBeforeOpen = function rawBeforeOpen(root) { + var value; + root.walk(function (i) { + if (i.type !== 'decl') { + value = i.raws.between; + if (typeof value !== 'undefined') return false; + } + }); + return value; + }; + + _proto.rawColon = function rawColon(root) { + var value; + root.walkDecls(function (i) { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, ''); + return false; + } + }); + return value; + }; + + _proto.beforeAfter = function beforeAfter(node, detect) { + var value; + + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl'); + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment'); + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule'); + } else { + value = this.raw(node, null, 'beforeClose'); + } + + var buf = node.parent; + var depth = 0; + + while (buf && buf.type !== 'root') { + depth += 1; + buf = buf.parent; + } + + if (value.indexOf('\n') !== -1) { + var indent = this.raw(node, null, 'indent'); + + if (indent.length) { + for (var step = 0; step < depth; step++) { + value += indent; + } + } + } + + return value; + }; + + _proto.rawValue = function rawValue(node, prop) { + var value = node[prop]; + var raw = node.raws[prop]; + + if (raw && raw.value === value) { + return raw.raw; + } + + return value; + }; + + return Stringifier; +}(); + +var _default = Stringifier; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmaWVyLmVzNiJdLCJuYW1lcyI6WyJERUZBVUxUX1JBVyIsImNvbG9uIiwiaW5kZW50IiwiYmVmb3JlRGVjbCIsImJlZm9yZVJ1bGUiLCJiZWZvcmVPcGVuIiwiYmVmb3JlQ2xvc2UiLCJiZWZvcmVDb21tZW50IiwiYWZ0ZXIiLCJlbXB0eUJvZHkiLCJjb21tZW50TGVmdCIsImNvbW1lbnRSaWdodCIsInNlbWljb2xvbiIsImNhcGl0YWxpemUiLCJzdHIiLCJ0b1VwcGVyQ2FzZSIsInNsaWNlIiwiU3RyaW5naWZpZXIiLCJidWlsZGVyIiwic3RyaW5naWZ5Iiwibm9kZSIsInR5cGUiLCJyb290IiwiYm9keSIsInJhd3MiLCJjb21tZW50IiwibGVmdCIsInJhdyIsInJpZ2h0IiwidGV4dCIsImRlY2wiLCJiZXR3ZWVuIiwic3RyaW5nIiwicHJvcCIsInJhd1ZhbHVlIiwiaW1wb3J0YW50IiwicnVsZSIsImJsb2NrIiwib3duU2VtaWNvbG9uIiwiYXRydWxlIiwibmFtZSIsInBhcmFtcyIsImFmdGVyTmFtZSIsIm5vZGVzIiwiZW5kIiwibGFzdCIsImxlbmd0aCIsImkiLCJjaGlsZCIsImJlZm9yZSIsInN0YXJ0Iiwib3duIiwiZGV0ZWN0IiwidmFsdWUiLCJwYXJlbnQiLCJmaXJzdCIsInJhd0NhY2hlIiwiYmVmb3JlQWZ0ZXIiLCJtZXRob2QiLCJ3YWxrIiwicmF3U2VtaWNvbG9uIiwicmF3RW1wdHlCb2R5IiwicmF3SW5kZW50IiwicCIsInBhcnRzIiwic3BsaXQiLCJyZXBsYWNlIiwicmF3QmVmb3JlQ29tbWVudCIsIndhbGtDb21tZW50cyIsImluZGV4T2YiLCJyYXdCZWZvcmVEZWNsIiwid2Fsa0RlY2xz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ICAgaWYgKHR5cGVvZiB2YWx1ZSAhPT0gJ3VuZGVmaW5lZCcpIHJldHVybiBmYWxzZVxuICAgICAgfVxuICAgIH0pXG4gICAgcmV0dXJuIHZhbHVlXG4gIH1cblxuICByYXdJbmRlbnQgKHJvb3QpIHtcbiAgICBpZiAocm9vdC5yYXdzLmluZGVudCkgcmV0dXJuIHJvb3QucmF3cy5pbmRlbnRcbiAgICBsZXQgdmFsdWVcbiAgICByb290LndhbGsoaSA9PiB7XG4gICAgICBsZXQgcCA9IGkucGFyZW50XG4gICAgICBpZiAocCAmJiBwICE9PSByb290ICYmIHAucGFyZW50ICYmIHAucGFyZW50ID09PSByb290KSB7XG4gICAgICAgIGlmICh0eXBlb2YgaS5yYXdzLmJlZm9yZSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICBsZXQgcGFydHMgPSBpLnJhd3MuYmVmb3JlLnNwbGl0KCdcXG4nKVxuICAgICAgICAgIHZhbHVlID0gcGFydHNbcGFydHMubGVuZ3RoIC0gMV1cbiAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoL1teXFxzXS9nLCAnJylcbiAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pXG4gICAgcmV0dXJuIHZhbHVlXG4gIH1cblxuICByYXdCZWZvcmVDb21tZW50IChyb290LCBub2RlKSB7XG4gICAgbGV0IHZhbHVlXG4gICAgcm9vdC53YWxrQ29tbWVudHMoaSA9PiB7XG4gICAgICBpZiAodHlwZW9mIGkucmF3cy5iZWZvcmUgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgIHZhbHVlID0gaS5yYXdzLmJlZm9yZVxuICAgICAgICBpZiAodmFsdWUuaW5kZXhPZignXFxuJykgIT09IC0xKSB7XG4gICAgICAgICAgdmFsdWUgPSB2YWx1ZS5yZXBsYWNlKC9bXlxcbl0rJC8sICcnKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxz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doaWxlIChidWYgJiYgYnVmLnR5cGUgIT09ICdyb290Jykge1xuICAgICAgZGVwdGggKz0gMVxuICAgICAgYnVmID0gYnVmLnBhcmVudFxuICAgIH1cblxuICAgIGlmICh2YWx1ZS5pbmRleE9mKCdcXG4nKSAhPT0gLTEpIHtcbiAgICAgIGxldCBpbmRlbnQgPSB0aGlzLnJhdyhub2RlLCBudWxsLCAnaW5kZW50JylcbiAgICAgIGlmIChpbmRlbnQubGVuZ3RoKSB7XG4gICAgICAgIGZvciAobGV0IHN0ZXAgPSAwOyBzdGVwIDwgZGVwdGg7IHN0ZXArKykgdmFsdWUgKz0gaW5kZW50XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHZhbHVlXG4gIH1cblxuICByYXdWYWx1ZSAobm9kZSwgcHJvcCkge1xuICAgIGxldCB2YWx1ZSA9IG5vZGVbcHJvcF1cbiAgICBsZXQgcmF3ID0gbm9kZS5yYXdzW3Byb3BdXG4gICAgaWYgKHJhdyAmJiByYXcudmFsdWUgPT09IHZhbHVlKSB7XG4gICAgICByZXR1cm4gcmF3LnJhd1xuICAgIH1cblxuICAgIHJldHVybiB2YWx1ZVxuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFN0cmluZ2lmaWVyXG4iXSwiZmlsZSI6InN0cmluZ2lmaWVyLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/stringify.js b/node_modules/autoprefixer/node_modules/postcss/lib/stringify.js new file mode 100644 index 0000000..6629ec3 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/stringify.js @@ -0,0 +1,18 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _stringifier = _interopRequireDefault(require("./stringifier")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringify(node, builder) { + var str = new _stringifier.default(builder); + str.stringify(node); +} + +var _default = stringify; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmeS5lczYiXSwibmFtZXMiOlsic3RyaW5naWZ5Iiwibm9kZSIsImJ1aWxkZXIiLCJzdHIiLCJTdHJpbmdpZmllciJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTs7OztBQUVBLFNBQVNBLFNBQVQsQ0FBb0JDLElBQXBCLEVBQTBCQyxPQUExQixFQUFtQztBQUNqQyxNQUFJQyxHQUFHLEdBQUcsSUFBSUMsb0JBQUosQ0FBZ0JGLE9BQWhCLENBQVY7QUFDQUMsRUFBQUEsR0FBRyxDQUFDSCxTQUFKLENBQWNDLElBQWQ7QUFDRDs7ZUFFY0QsUyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBTdHJpbmdpZmllciBmcm9tICcuL3N0cmluZ2lmaWVyJ1xuXG5mdW5jdGlvbiBzdHJpbmdpZnkgKG5vZGUsIGJ1aWxkZXIpIHtcbiAgbGV0IHN0ciA9IG5ldyBTdHJpbmdpZmllcihidWlsZGVyKVxuICBzdHIuc3RyaW5naWZ5KG5vZGUpXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0cmluZ2lmeVxuIl0sImZpbGUiOiJzdHJpbmdpZnkuanMifQ== diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/terminal-highlight.js b/node_modules/autoprefixer/node_modules/postcss/lib/terminal-highlight.js new file mode 100644 index 0000000..78868ec --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/terminal-highlight.js @@ -0,0 +1,84 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +var _chalk = _interopRequireDefault(require("chalk")); + +var _tokenize = _interopRequireDefault(require("./tokenize")); + +var _input = _interopRequireDefault(require("./input")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var HIGHLIGHT_THEME = { + 'brackets': _chalk.default.cyan, + 'at-word': _chalk.default.cyan, + 'comment': _chalk.default.gray, + 'string': _chalk.default.green, + 'class': _chalk.default.yellow, + 'call': _chalk.default.cyan, + 'hash': _chalk.default.magenta, + '(': _chalk.default.cyan, + ')': _chalk.default.cyan, + '{': _chalk.default.yellow, + '}': _chalk.default.yellow, + '[': _chalk.default.yellow, + ']': _chalk.default.yellow, + ':': _chalk.default.yellow, + ';': _chalk.default.yellow +}; + +function getTokenType(_ref, processor) { + var type = _ref[0], + value = _ref[1]; + + if (type === 'word') { + if (value[0] === '.') { + return 'class'; + } + + if (value[0] === '#') { + return 'hash'; + } + } + + if (!processor.endOfFile()) { + var next = processor.nextToken(); + processor.back(next); + if (next[0] === 'brackets' || next[0] === '(') return 'call'; + } + + return type; +} + +function terminalHighlight(css) { + var processor = (0, _tokenize.default)(new _input.default(css), { + ignoreErrors: true + }); + var result = ''; + + var _loop = function _loop() { + var token = processor.nextToken(); + var color = HIGHLIGHT_THEME[getTokenType(token, processor)]; + + if (color) { + result += token[1].split(/\r?\n/).map(function (i) { + return color(i); + }).join('\n'); + } else { + result += token[1]; + } + }; + + while (!processor.endOfFile()) { + _loop(); + } + + return result; +} + +var _default = terminalHighlight; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlcm1pbmFsLWhpZ2hsaWdodC5lczYiXSwibmFtZXMiOlsiSElHSExJR0hUX1RIRU1FIiwiY2hhbGsiLCJjeWFuIiwiZ3JheSIsImdyZWVuIiwieWVsbG93IiwibWFnZW50YSIsImdldFRva2VuVHlwZSIsInByb2Nlc3NvciIsInR5cGUiLCJ2YWx1ZSIsImVuZE9mRmlsZSIsIm5leHQiLCJuZXh0VG9rZW4iLCJiYWNrIiwidGVybWluYWxIaWdobGlnaHQiLCJjc3MiLCJJbnB1dCIsImlnbm9yZUVycm9ycyIsInJlc3VsdCIsInRva2VuIiwiY29sb3IiLCJzcGxpdCIsIm1hcCIsImkiLCJqb2luIl0sIm1hcHBpbmdzIjoiOzs7OztBQUF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2h0IChjc3MpIHtcbiAgbGV0IHByb2Nlc3NvciA9IHRva2VuaXplcihuZXcgSW5wdXQoY3NzKSwgeyBpZ25vcmVFcnJvcnM6IHRydWUgfSlcbiAgbGV0IHJlc3VsdCA9ICcnXG4gIHdoaWxlICghcHJvY2Vzc29yLmVuZE9mRmlsZSgpKSB7XG4gICAgbGV0IHRva2VuID0gcHJvY2Vzc29yLm5leHRUb2tlbigpXG4gICAgbGV0IGNvbG9yID0gSElHSExJR0hUX1RIRU1FW2dldFRva2VuVHlwZSh0b2tlbiwgcHJvY2Vzc29yKV1cbiAgICBpZiAoY29sb3IpIHtcbiAgICAgIHJlc3VsdCArPSB0b2tlblsxXS5zcGxpdCgvXFxyP1xcbi8pXG4gICAgICAgIC5tYXAoaSA9PiBjb2xvcihpKSlcbiAgICAgICAgLmpvaW4oJ1xcbicpXG4gICAgfSBlbHNlIHtcbiAgICAgIHJlc3VsdCArPSB0b2tlblsxXVxuICAgIH1cbiAgfVxuICByZXR1cm4gcmVzdWx0XG59XG5cbmV4cG9ydCBkZWZhdWx0IHRlcm1pbmFsSGlnaGxpZ2h0XG4iXSwiZmlsZSI6InRlcm1pbmFsLWhpZ2hsaWdodC5qcyJ9 diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/tokenize.js b/node_modules/autoprefixer/node_modules/postcss/lib/tokenize.js new file mode 100644 index 0000000..5b556bf --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/tokenize.js @@ -0,0 +1,295 @@ +"use strict"; + +exports.__esModule = true; +exports.default = tokenizer; +var SINGLE_QUOTE = '\''.charCodeAt(0); +var DOUBLE_QUOTE = '"'.charCodeAt(0); +var BACKSLASH = '\\'.charCodeAt(0); +var SLASH = '/'.charCodeAt(0); +var NEWLINE = '\n'.charCodeAt(0); +var SPACE = ' '.charCodeAt(0); +var FEED = '\f'.charCodeAt(0); +var TAB = '\t'.charCodeAt(0); +var CR = '\r'.charCodeAt(0); +var OPEN_SQUARE = '['.charCodeAt(0); +var CLOSE_SQUARE = ']'.charCodeAt(0); +var OPEN_PARENTHESES = '('.charCodeAt(0); +var CLOSE_PARENTHESES = ')'.charCodeAt(0); +var OPEN_CURLY = '{'.charCodeAt(0); +var CLOSE_CURLY = '}'.charCodeAt(0); +var SEMICOLON = ';'.charCodeAt(0); +var ASTERISK = '*'.charCodeAt(0); +var COLON = ':'.charCodeAt(0); +var AT = '@'.charCodeAt(0); +var RE_AT_END = /[ \n\t\r\f{}()'"\\;/[\]#]/g; +var RE_WORD_END = /[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g; +var RE_BAD_BRACKET = /.[\\/("'\n]/; +var RE_HEX_ESCAPE = /[a-f0-9]/i; + +function tokenizer(input, options) { + if (options === void 0) { + options = {}; + } + + var css = input.css.valueOf(); + var ignore = options.ignoreErrors; + var code, next, quote, lines, last, content, escape; + var nextLine, nextOffset, escaped, escapePos, prev, n, currentToken; + var length = css.length; + var offset = -1; + var line = 1; + var pos = 0; + var buffer = []; + var returned = []; + + function position() { + return pos; + } + + function unclosed(what) { + throw input.error('Unclosed ' + what, line, pos - offset); + } + + function endOfFile() { + return returned.length === 0 && pos >= length; + } + + function nextToken(opts) { + if (returned.length) return returned.pop(); + if (pos >= length) return; + var ignoreUnclosed = opts ? opts.ignoreUnclosed : false; + code = css.charCodeAt(pos); + + if (code === NEWLINE || code === FEED || code === CR && css.charCodeAt(pos + 1) !== NEWLINE) { + offset = pos; + line += 1; + } + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: + next = pos; + + do { + next += 1; + code = css.charCodeAt(next); + + if (code === NEWLINE) { + offset = next; + line += 1; + } + } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED); + + currentToken = ['space', css.slice(pos, next)]; + pos = next - 1; + break; + + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: + var controlChar = String.fromCharCode(code); + currentToken = [controlChar, controlChar, line, pos - offset]; + break; + + case OPEN_PARENTHESES: + prev = buffer.length ? buffer.pop()[1] : ''; + n = css.charCodeAt(pos + 1); + + if (prev === 'url' && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) { + next = pos; + + do { + escaped = false; + next = css.indexOf(')', next + 1); + + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos; + break; + } else { + unclosed('bracket'); + } + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + currentToken = ['brackets', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', line, pos - offset]; + } else { + currentToken = ['brackets', content, line, pos - offset, line, next - offset]; + pos = next; + } + } + + break; + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: + quote = code === SINGLE_QUOTE ? '\'' : '"'; + next = pos; + + do { + escaped = false; + next = css.indexOf(quote, next + 1); + + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1; + break; + } else { + unclosed('string'); + } + } + + escapePos = next; + + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['string', css.slice(pos, next + 1), line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; + break; + + case AT: + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + + currentToken = ['at-word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + break; + + case BACKSLASH: + next = pos; + escape = true; + + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1; + escape = !escape; + } + + code = css.charCodeAt(next + 1); + + if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { + next += 1; + + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1; + } + + if (css.charCodeAt(next + 1) === SPACE) { + next += 1; + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + pos = next; + break; + + default: + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1; + + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length; + } else { + unclosed('comment'); + } + } + + content = css.slice(pos, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + + currentToken = ['comment', content, line, pos - offset, nextLine, next - nextOffset]; + offset = nextOffset; + line = nextLine; + pos = next; + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + + currentToken = ['word', css.slice(pos, next + 1), line, pos - offset, line, next - offset]; + buffer.push(currentToken); + pos = next; + } + + break; + } + + pos++; + return currentToken; + } + + function back(token) { + returned.push(token); + } + + return { + back: back, + nextToken: nextToken, + endOfFile: endOfFile, + position: position + }; +} + +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRva2VuaXplLmVzNiJdLCJuYW1lcyI6WyJTSU5HTEVfUVVPVEUiLCJjaGFyQ29kZUF0IiwiRE9VQkxFX1FVT1RFIiwiQkFDS1NMQVNII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0gcG9zXG4gICAgICBsaW5lICs9IDFcbiAgICB9XG5cbiAgICBzd2l0Y2ggKGNvZGUpIHtcbiAgICAgIGNhc2UgTkVXTElORTpcbiAgICAgIGNhc2UgU1BBQ0U6XG4gICAgICBjYXNlIFRBQjpcbiAgICAgIGNhc2UgQ1I6XG4gICAgICBjYXNlIEZFRUQ6XG4gICAgICAgIG5leHQgPSBwb3NcbiAgICAgICAgZG8ge1xuICAgICAgICAgIG5leHQgKz0gMVxuICAgICAgICAgIGNvZGUgPSBjc3MuY2hhckNvZGVBdChuZXh0KVxuICAgICAgICAgIGlmIChjb2RlID09PSBORVdMSU5FKSB7XG4gICAgICAgICAgICBvZmZzZXQgPSBuZXh0XG4gICAgICAgICAgICBsaW5lICs9IDFcbiAgICAgICAgICB9XG4gICAgICAgIH0gd2hpbGUgKFxuICAgICAgICAgIGNvZGUgPT09IFNQQUNFIHx8XG4gICAgICAgICAgY29kZSA9PT0gTkVXTElORSB8fFxuICAgICAgICAgIGNvZGUgPT09IFRBQiB8fFxuICAgICAgICAgIGNvZGUgPT09IENSIHx8XG4gICAgICAgICAgY29kZSA9PT0gRkVFRFxuICAgICAgICApXG5cbiAgICAgICAgY3VycmVudFRva2VuID0gWydzcGFjZScsIGNzcy5zbGljZShwb3MsIG5leHQpXVxuICAgICAgICBwb3MgPSBuZXh0IC0gMVxuICAgICAgICBicmVha1xuXG4gICAgICBjYXNlIE9QRU5fU1FVQVJFOlxuICAgICAgY2FzZSBDTE9TRV9TUVVBUkU6XG4gICAgICBjYXNlIE9QRU5fQ1VSTFk6XG4gICAgICBjYXNlIENMT1NFX0NVUkxZOlxuICAgICAgY2FzZSBDT0xPTjpcbiAgICAgIGNhc2UgU0VNSUNPTE9OOlxuICAgICAgY2FzZSBDTE9TRV9QQVJFTlRIRVNFUzpcbiAgICAgICAgbGV0IGNvbnRyb2xDaGFyID0gU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlKVxuICAgICAgICBjdXJyZW50VG9rZW4gPSBbY29udHJvbENoYXIsIGNvbnRyb2xDaGFyLCBsaW5lLCBwb3MgLSBvZmZzZXRdXG4gICAgICAgIGJyZWFrXG5cbiAgICAgIGNhc2UgT1BFTl9QQVJFTlRIRVNFUzpcbiAgICAgICAgcHJldiA9IGJ1ZmZlci5sZW5ndGggPyBidWZmZXIucG9wKClbMV0gOiAnJ1xuICAgICAgICBuID0gY3NzLmNoYXJDb2RlQXQocG9zICsgMSlcbiAgICAgICAgaWYgKFxuICAgICAgICAgIHByZXYgPT09ICd1cmwnICYmXG4gICAgICAgICAgbiAhPT0gU0lOR0xFX1FVT1RFICYmIG4gIT09IERPVUJMRV9RVU9URSAmJlxuICAgICAgICAgIG4gIT09IFNQQUNFICYmIG4gIT09IE5FV0xJTkUgJiYgbiAhPT0gVEFCICYmXG4gICAgICAgICAgbiAhPT0gRkVFRCAmJiBuICE9PSBDUlxuICAgICAgICApIHtcbiAgICAgICAgICBuZXh0ID0gcG9zXG4gICAgICAgICAgZG8ge1xuICAgICAgICAgICAgZXNjYXBlZCA9IGZhbHNlXG4gICAgICAgICAgICBuZXh0ID0gY3NzLmluZGV4T2YoJyknLCBuZXh0ICsgMSlcbiAgICAgICAgICAgIGlmIChuZXh0ID09PSAtMSkge1xuICAgICAgICAgICAgICBpZiAoaWdub3JlIHx8IGlnbm9yZVVuY2xvc2VkKSB7XG4gICAgICAgICAgICAgICAgbmV4dCA9IHBvc1xuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdW5jbG9zZWQoJ2JyYWNrZXQnKVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlc2NhcGVQb3MgPSBuZXh0XG4gICAgICAgICAgICB3aGlsZSAoY3NzLmNoYXJDb2RlQXQoZXNjYXBlUG9zIC0gMSkgPT09IEJBQ0tTTEFTSCkge1xuICAgICAgICAgICAgICBlc2NhcGVQb3MgLT0gMVxuICAgICAgICAgICAgICBlc2NhcGVkID0gIWVzY2FwZWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IHdoaWxlIChlc2NhcGVkKVxuXG4gICAgICAgICAgY3VycmVudFRva2VuID0gWydicmFja2V0cycsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICAgIGxpbmUsIHBvcyAtIG9mZnNldCxcbiAgICAgICAgICAgIGxpbmUsIG5leHQgLSBvZmZzZXRcbiAgICAgICAgICBdXG5cbiAgICAgICAgICBwb3MgPSBuZXh0XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV4dCA9IGNzcy5pbmRleE9mKCcpJywgcG9zICsgMSlcbiAgICAgICAgICBjb250ZW50ID0gY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpXG5cbiAgICAgICAgICBpZiAobmV4dCA9PT0gLTEgfHwgUkVfQkFEX0JSQUNLRVQudGVzdChjb250ZW50KSkge1xuICAgICAgICAgICAgY3VycmVudFRva2VuID0gWycoJywgJygnLCBsaW5lLCBwb3MgLSBvZmZzZXRdXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnYnJhY2tldHMnLCBjb250ZW50LFxuICAgICAgICAgICAgICBsaW5lLCBwb3MgLSBvZmZzZXQsXG4gICAgICAgICAgICAgIGxpbmUsIG5leHQgLSBvZmZzZXRcbiAgICAgICAgICAgIF1cbiAgICAgICAgICAgIHBvcyA9IG5leHRcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBicmVha1xuXG4gICAgICBjYXNlIFNJTkdMRV9RVU9URTpcbiAgICAgIGNhc2UgRE9VQkxFX1FVT1RFOlxuICAgICAgICBxdW90ZSA9IGNvZGUgPT09IFNJTkdMRV9RVU9URSA/ICdcXCcnIDogJ1wiJ1xuICAgICAgICBuZXh0ID0gcG9zXG4gICAgICAgIGRvIHtcbiAgICAgICAgICBlc2NhcGVkID0gZmFsc2VcbiAgICAgICAgICBuZXh0ID0gY3NzLmluZGV4T2YocXVvdGUsIG5leHQgKyAxKVxuICAgICAgICAgIGlmIChuZXh0ID09PSAtMSkge1xuICAgICAgICAgICAgaWYgKGlnbm9yZSB8fCBpZ25vcmVVbmNsb3NlZCkge1xuICAgICAgICAgICAgICBuZXh0ID0gcG9zICsgMVxuICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdW5jbG9zZWQoJ3N0cmluZycpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGVzY2FwZVBvcyA9IG5leHRcbiAgICAgICAgICB3aGlsZSAoY3NzLmNoYXJDb2RlQXQoZXNjYXBlUG9zIC0gMSkgPT09IEJBQ0tTTEFTSCkge1xuICAgICAgICAgICAgZXNjYXBlUG9zIC09IDFcbiAgICAgICAgICAgIGVzY2FwZWQgPSAhZXNjYXBlZFxuICAgICAgICAgIH1cbiAgICAgICAgfSB3aGlsZSAoZXNjYXBlZClcblxuICAgICAgICBjb250ZW50ID0gY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpXG4gICAgICAgIGxpbmVzID0gY29udGVudC5zcGxpdCgnXFxuJylcbiAgICAgICAgbGFzdCA9IGxpbmVzLmxlbmd0aCAtIDFcblxuICAgICAgICBpZiAobGFzdCA+IDApIHtcbiAgICAgICAgICBuZXh0TGluZSA9IGxpbmUgKyBsYXN0XG4gICAgICAgICAgbmV4dE9mZnNldCA9IG5leHQgLSBsaW5lc1tsYXN0XS5sZW5ndGhcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBuZXh0TGluZSA9IGxpbmVcbiAgICAgICAgICBuZXh0T2Zmc2V0ID0gb2Zmc2V0XG4gICAgICAgIH1cblxuICAgICAgICBjdXJyZW50VG9rZW4gPSBbJ3N0cmluZycsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICBsaW5lLCBwb3MgLSBvZmZzZXQsXG4gICAgICAgICAgbmV4dExpbmUsIG5leHQgLSBuZXh0T2Zmc2V0XG4gICAgICAgIF1cblxuICAgICAgICBvZmZzZXQgPSBuZXh0T2Zmc2V0XG4gICAgICAgIGxpbmUgPSBuZXh0TGluZVxuICAgICAgICBwb3MgPSBuZXh0XG4gICAgICAgIGJyZWFrXG5cbiAgICAgIGNhc2UgQVQ6XG4gICAgICAgIFJFX0FUX0VORC5sYXN0SW5kZXggPSBwb3MgKyAxXG4gICAgICAgIFJFX0FUX0VORC50ZXN0KGNzcylcbiAgICAgICAgaWYgKFJFX0FUX0VORC5sYXN0SW5kZXggPT09IDApIHtcbiAgICAgICAgICBuZXh0ID0gY3NzLmxlbmd0aCAtIDFcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBuZXh0ID0gUkVfQVRfRU5ELmxhc3RJbmRleCAtIDJcbiAgICAgICAgfVxuXG4gICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnYXQtd29yZCcsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICBsaW5lLCBwb3MgLSBvZmZzZXQsXG4gICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICBdXG5cbiAgICAgICAgcG9zID0gbmV4dFxuICAgICAgICBicmVha1xuXG4gICAgICBjYXNlIEJBQ0tTTEFTSDpcbiAgICAgICAgbmV4dCA9IHBvc1xuICAgICAgICBlc2NhcGUgPSB0cnVlXG4gICAgICAgIHdoaWxlIChjc3MuY2hhckNvZGVBdChuZXh0ICsgMSkgPT09IEJBQ0tTTEFTSCkge1xuICAgICAgICAgIG5leHQgKz0gMVxuICAgICAgICAgIGVzY2FwZSA9ICFlc2NhcGVcbiAgICAgICAgfVxuICAgICAgICBjb2RlID0gY3NzLmNoYXJDb2RlQXQobmV4dCArIDEpXG4gICAgICAgIGlmIChcbiAgICAgICAgICBlc2NhcGUgJiZcbiAgICAgICAgICBjb2RlICE9PSBTTEFTSCAmJlxuICAgICAgICAgIGNvZGUgIT09IFNQQUNFICYmXG4gICAgICAgICAgY29kZSAhPT0gTkVXTElORSAmJlxuICAgICAgICAgIGNvZGUgIT09IFRBQiAmJlxuICAgICAgICAgIGNvZGUgIT09IENSICYmXG4gICAgICAgICAgY29kZSAhPT0gRkVFRFxuICAgICAgICApIHtcbiAgICAgICAgICBuZXh0ICs9IDFcbiAgICAgICAgICBpZiAoUkVfSEVYX0VTQ0FQRS50ZXN0KGNzcy5jaGFyQXQobmV4dCkpKSB7XG4gICAgICAgICAgICB3aGlsZSAoUkVfSEVYX0VTQ0FQRS50ZXN0KGNzcy5jaGFyQXQobmV4dCArIDEpKSkge1xuICAgICAgICAgICAgICBuZXh0ICs9IDFcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjc3MuY2hhckNvZGVBdChuZXh0ICsgMSkgPT09IFNQQUNFKSB7XG4gICAgICAgICAgICAgIG5leHQgKz0gMVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGN1cnJlbnRUb2tlbiA9IFsnd29yZCcsIGNzcy5zbGljZShwb3MsIG5leHQgKyAxKSxcbiAgICAgICAgICBsaW5lLCBwb3MgLSBvZmZzZXQsXG4gICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICBdXG5cbiAgICAgICAgcG9zID0gbmV4dFxuICAgICAgICBicmVha1xuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICBpZiAoY29kZSA9PT0gU0xBU0ggJiYgY3NzLmNoYXJDb2RlQXQocG9zICsgMSkgPT09IEFTVEVSSVNLKSB7XG4gICAgICAgICAgbmV4dCA9IGNzcy5pbmRleE9mKCcqLycsIHBvcyArIDIpICsgMVxuICAgICAgICAgIGlmIChuZXh0ID09PSAwKSB7XG4gICAgICAgICAgICBpZiAoaWdub3JlIHx8IGlnbm9yZVVuY2xvc2VkKSB7XG4gICAgICAgICAgICAgIG5leHQgPSBjc3MubGVuZ3RoXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmNsb3NlZCgnY29tbWVudCcpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGVudCA9IGNzcy5zbGljZShwb3MsIG5leHQgKyAxKVxuICAgICAgICAgIGxpbmVzID0gY29udGVudC5zcGxpdCgnXFxuJylcbiAgICAgICAgICBsYXN0ID0gbGluZXMubGVuZ3RoIC0gMVxuXG4gICAgICAgICAgaWYgKGxhc3QgPiAwKSB7XG4gICAgICAgICAgICBuZXh0TGluZSA9IGxpbmUgKyBsYXN0XG4gICAgICAgICAgICBuZXh0T2Zmc2V0ID0gbmV4dCAtIGxpbmVzW2xhc3RdLmxlbmd0aFxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBuZXh0TGluZSA9IGxpbmVcbiAgICAgICAgICAgIG5leHRPZmZzZXQgPSBvZmZzZXRcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjdXJyZW50VG9rZW4gPSBbJ2NvbW1lbnQnLCBjb250ZW50LFxuICAgICAgICAgICAgbGluZSwgcG9zIC0gb2Zmc2V0LFxuICAgICAgICAgICAgbmV4dExpbmUsIG5leHQgLSBuZXh0T2Zmc2V0XG4gICAgICAgICAgXVxuXG4gICAgICAgICAgb2Zmc2V0ID0gbmV4dE9mZnNldFxuICAgICAgICAgIGxpbmUgPSBuZXh0TGluZVxuICAgICAgICAgIHBvcyA9IG5leHRcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBSRV9XT1JEX0VORC5sYXN0SW5kZXggPSBwb3MgKyAxXG4gICAgICAgICAgUkVfV09SRF9FTkQudGVzdChjc3MpXG4gICAgICAgICAgaWYgKFJFX1dPUkRfRU5ELmxhc3RJbmRleCA9PT0gMCkge1xuICAgICAgICAgICAgbmV4dCA9IGNzcy5sZW5ndGggLSAxXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5leHQgPSBSRV9XT1JEX0VORC5sYXN0SW5kZXggLSAyXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3VycmVudFRva2VuID0gWyd3b3JkJywgY3NzLnNsaWNlKHBvcywgbmV4dCArIDEpLFxuICAgICAgICAgICAgbGluZSwgcG9zIC0gb2Zmc2V0LFxuICAgICAgICAgICAgbGluZSwgbmV4dCAtIG9mZnNldFxuICAgICAgICAgIF1cblxuICAgICAgICAgIGJ1ZmZlci5wdXNoKGN1cnJlbnRUb2tlbilcblxuICAgICAgICAgIHBvcyA9IG5leHRcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrXG4gICAgfVxuXG4gICAgcG9zKytcbiAgICByZXR1cm4gY3VycmVudFRva2VuXG4gIH1cblxuICBmdW5jdGlvbiBiYWNrICh0b2tlbikge1xuICAgIHJldHVybmVkLnB1c2godG9rZW4pXG4gIH1cblxuICByZXR1cm4ge1xuICAgIGJhY2ssXG4gICAgbmV4dFRva2VuLFxuICAgIGVuZE9mRmlsZSxcbiAgICBwb3NpdGlvblxuICB9XG59XG4iXSwiZmlsZSI6InRva2VuaXplLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js b/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js new file mode 100644 index 0000000..8abdeed --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/vendor.js @@ -0,0 +1,53 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +/** + * Contains helpers for working with vendor prefixes. + * + * @example + * const vendor = postcss.vendor + * + * @namespace vendor + */ +var vendor = { + /** + * Returns the vendor prefix extracted from an input string. + * + * @param {string} prop String with or without vendor prefix. + * + * @return {string} vendor prefix or empty string + * + * @example + * postcss.vendor.prefix('-moz-tab-size') //=> '-moz-' + * postcss.vendor.prefix('tab-size') //=> '' + */ + prefix: function prefix(prop) { + var match = prop.match(/^(-\w+-)/); + + if (match) { + return match[0]; + } + + return ''; + }, + + /** + * Returns the input string stripped of its vendor prefix. + * + * @param {string} prop String with or without vendor prefix. + * + * @return {string} String name without vendor prefixes. + * + * @example + * postcss.vendor.unprefixed('-moz-tab-size') //=> 'tab-size' + */ + unprefixed: function unprefixed(prop) { + return prop.replace(/^-\w+-/, ''); + } +}; +var _default = vendor; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInZlbmRvci5lczYiXSwibmFtZXMiOlsidmVuZG9yIiwicHJlZml4IiwicHJvcCIsIm1hdGNoIiwidW5wcmVmaXhlZCIsInJlcGxhY2UiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7Ozs7O0FBUUEsSUFBSUEsTUFBTSxHQUFHO0FBRVg7Ozs7Ozs7Ozs7O0FBV0FDLEVBQUFBLE1BYlcsa0JBYUhDLElBYkcsRUFhRztBQUNaLFFBQUlDLEtBQUssR0FBR0QsSUFBSSxDQUFDQyxLQUFMLENBQVcsVUFBWCxDQUFaOztBQUNBLFFBQUlBLEtBQUosRUFBVztBQUNULGFBQU9BLEtBQUssQ0FBQyxDQUFELENBQVo7QUFDRDs7QUFFRCxXQUFPLEVBQVA7QUFDRCxHQXBCVTs7QUFzQlg7Ozs7Ozs7Ozs7QUFVQUMsRUFBQUEsVUFoQ1csc0JBZ0NDRixJQWhDRCxFQWdDTztBQUNoQixXQUFPQSxJQUFJLENBQUNHLE9BQUwsQ0FBYSxRQUFiLEVBQXVCLEVBQXZCLENBQVA7QUFDRDtBQWxDVSxDQUFiO2VBc0NlTCxNIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb250YWlucyBoZWxwZXJzIGZvciB3b3JraW5nIHdpdGggdmVuZG9yIHByZWZpeGVzLlxuICpcbiAqIEBleGFtcGxlXG4gKiBjb25zdCB2ZW5kb3IgPSBwb3N0Y3NzLnZlbmRvclxuICpcbiAqIEBuYW1lc3BhY2UgdmVuZG9yXG4gKi9cbmxldCB2ZW5kb3IgPSB7XG5cbiAgLyoqXG4gICA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IH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCB2ZW5kb3JcbiJdLCJmaWxlIjoidmVuZG9yLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/warn-once.js b/node_modules/autoprefixer/node_modules/postcss/lib/warn-once.js new file mode 100644 index 0000000..f04c7f2 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/warn-once.js @@ -0,0 +1,17 @@ +"use strict"; + +exports.__esModule = true; +exports.default = warnOnce; +var printed = {}; + +function warnOnce(message) { + if (printed[message]) return; + printed[message] = true; + + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } +} + +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndhcm4tb25jZS5lczYiXSwibmFtZXMiOlsicHJpbnRlZCIsIndhcm5PbmNlIiwibWVzc2FnZSIsImNvbnNvbGUiLCJ3YXJuIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUEsSUFBSUEsT0FBTyxHQUFHLEVBQWQ7O0FBRWUsU0FBU0MsUUFBVCxDQUFtQkMsT0FBbkIsRUFBNEI7QUFDekMsTUFBSUYsT0FBTyxDQUFDRSxPQUFELENBQVgsRUFBc0I7QUFDdEJGLEVBQUFBLE9BQU8sQ0FBQ0UsT0FBRCxDQUFQLEdBQW1CLElBQW5COztBQUVBLE1BQUksT0FBT0MsT0FBUCxLQUFtQixXQUFuQixJQUFrQ0EsT0FBTyxDQUFDQyxJQUE5QyxFQUFvRDtBQUNsREQsSUFBQUEsT0FBTyxDQUFDQyxJQUFSLENBQWFGLE9BQWI7QUFDRDtBQUNGIiwic291cmNlc0NvbnRlbnQiOlsibGV0IHByaW50ZWQgPSB7IH1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gd2Fybk9uY2UgKG1lc3NhZ2UpIHtcbiAgaWYgKHByaW50ZWRbbWVzc2FnZV0pIHJldHVyblxuICBwcmludGVkW21lc3NhZ2VdID0gdHJ1ZVxuXG4gIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgY29uc29sZS53YXJuKSB7XG4gICAgY29uc29sZS53YXJuKG1lc3NhZ2UpXG4gIH1cbn1cbiJdLCJmaWxlIjoid2Fybi1vbmNlLmpzIn0= diff --git a/node_modules/autoprefixer/node_modules/postcss/lib/warning.js b/node_modules/autoprefixer/node_modules/postcss/lib/warning.js new file mode 100644 index 0000000..d59e2e4 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/lib/warning.js @@ -0,0 +1,133 @@ +"use strict"; + +exports.__esModule = true; +exports.default = void 0; + +/** + * Represents a plugin’s warning. It can be created using {@link Node#warn}. + * + * @example + * if (decl.important) { + * decl.warn(result, 'Avoid !important', { word: '!important' }) + * } + */ +var Warning = +/*#__PURE__*/ +function () { + /** + * @param {string} text Warning message. + * @param {Object} [opts] Warning options. + * @param {Node} opts.node CSS node that caused the warning. + * @param {string} opts.word Word in CSS source that caused the warning. + * @param {number} opts.index Index in CSS node string that caused + * the warning. + * @param {string} opts.plugin Name of the plugin that created + * this warning. {@link Result#warn} fills + * this property automatically. + */ + function Warning(text, opts) { + if (opts === void 0) { + opts = {}; + } + + /** + * Type to filter warnings from {@link Result#messages}. + * Always equal to `"warning"`. + * + * @type {string} + * + * @example + * const nonWarning = result.messages.filter(i => i.type !== 'warning') + */ + this.type = 'warning'; + /** + * The warning message. + * + * @type {string} + * + * @example + * warning.text //=> 'Try to avoid !important' + */ + + this.text = text; + + if (opts.node && opts.node.source) { + var pos = opts.node.positionBy(opts); + /** + * Line in the input file with this warning’s source. + * @type {number} + * + * @example + * warning.line //=> 5 + */ + + this.line = pos.line; + /** + * Column in the input file with this warning’s source. + * + * @type {number} + * + * @example + * warning.column //=> 6 + */ + + this.column = pos.column; + } + + for (var opt in opts) { + this[opt] = opts[opt]; + } + } + /** + * Returns a warning position and message. + * + * @example + * warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important' + * + * @return {string} Warning position and message. + */ + + + var _proto = Warning.prototype; + + _proto.toString = function toString() { + if (this.node) { + return this.node.error(this.text, { + plugin: this.plugin, + index: this.index, + word: this.word + }).message; + } + + if (this.plugin) { + return this.plugin + ': ' + this.text; + } + + return this.text; + } + /** + * @memberof Warning# + * @member {string} plugin The name of the plugin that created + * it will fill this property automatically. + * this warning. When you call {@link Node#warn} + * + * @example + * warning.plugin //=> 'postcss-important' + */ + + /** + * @memberof Warning# + * @member {Node} node Contains the CSS node that caused the warning. + * + * @example + * warning.node.toString() //=> 'color: white !important' + */ + ; + + return Warning; +}(); + +var _default = Warning; +exports.default = _default; +module.exports = exports.default; +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndhcm5pbmcuZXM2Il0sIm5hbWVzIjpbIldhcm5pbmciLCJ0ZXh0Iiwib3B0cyIsInR5cGUiLCJub2RlIiwic291cmNlIiwicG9zIiwicG9zaXRpb25CeSIsImxpbmUiLCJjb2x1bW4iLCJvcHQiLCJ0b1N0cmluZyIsImVycm9yIiwicGx1Z2luIiwiaW5kZXgiLCJ3b3JkIiwibWVzc2FnZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTs7Ozs7Ozs7SUFRTUEsTzs7O0FBQ0o7Ozs7Ozs7Ozs7O0FBV0EsbUJBQWFDLElBQWIsRUFBbUJDLElBQW5CLEVBQStCO0FBQUEsUUFBWkEsSUFBWTtBQUFaQSxNQUFBQSxJQUFZLEdBQUwsRUFBSztBQUFBOztBQUM3Qjs7Ozs7Ozs7O0FBU0EsU0FBS0MsSUFBTCxHQUFZLFNBQVo7QUFDQTs7Ozs7Ozs7O0FBUUEsU0FBS0YsSUFBTCxHQUFZQSxJQUFaOztBQUVBLFFBQUlDLElBQUksQ0FBQ0UsSUFBTCxJQUFhRixJQUFJLENBQUNFLElBQUwsQ0FBVUMsTUFBM0IsRUFBbUM7QUFDakMsVUFBSUMsR0FBRyxH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XG4gICAqIEBleGFtcGxlXG4gICAqIHdhcm5pbmcucGx1Z2luIC8vPT4gJ3Bvc3Rjc3MtaW1wb3J0YW50J1xuICAgKi9cblxuICAvKipcbiAgICogQG1lbWJlcm9mIFdhcm5pbmcjXG4gICAqIEBtZW1iZXIge05vZGV9IG5vZGUgQ29udGFpbnMgdGhlIENTUyBub2RlIHRoYXQgY2F1c2VkIHRoZSB3YXJuaW5nLlxuICAgKlxuICAgKiBAZXhhbXBsZVxuICAgKiB3YXJuaW5nLm5vZGUudG9TdHJpbmcoKSAvLz0+ICdjb2xvcjogd2hpdGUgIWltcG9ydGFudCdcbiAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IFdhcm5pbmdcbiJdLCJmaWxlIjoid2FybmluZy5qcyJ9 diff --git a/node_modules/autoprefixer/node_modules/postcss/package.json b/node_modules/autoprefixer/node_modules/postcss/package.json new file mode 100644 index 0000000..87f0592 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/postcss/package.json @@ -0,0 +1,82 @@ +{ + "_from": "postcss@^7.0.18", + "_id": "[email protected]", + "_inBundle": false, + "_integrity": "sha512-/7g1QXXgegpF+9GJj4iN7ChGF40sYuGYJ8WZu8DZWnmhQ/G36hfdk3q9LBJmoK+lZ+yzZ5KYpOoxq7LF1BxE8g==", + "_location": "/autoprefixer/postcss", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "postcss@^7.0.18", + "name": "postcss", + "escapedName": "postcss", + "rawSpec": "^7.0.18", + "saveSpec": null, + "fetchSpec": "^7.0.18" + }, + "_requiredBy": [ + "/autoprefixer" + ], + "_resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.18.tgz", + "_shasum": "4b9cda95ae6c069c67a4d933029eddd4838ac233", + "_spec": "postcss@^7.0.18", + "_where": "/home/dstaesse/git/website/node_modules/autoprefixer", + "author": { + "name": "Andrey Sitnik", + "email": "[email protected]" + }, + "browser": { + "./lib/terminal-highlight": false, + "supports-color": false, + "chalk": false, + "fs": false + }, + "browserslist": [ + "last 2 version", + "not dead", + "not Explorer 11", + "not ExplorerMobile 11", + "node 6" + ], + "bugs": { + "url": "https://github.com/postcss/postcss/issues" + }, + "bundleDependencies": false, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "deprecated": false, + "description": "Tool for transforming styles with JS plugins", + "engines": { + "node": ">=6.0.0" + }, + "homepage": "https://postcss.org/", + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "keywords": [ + "css", + "postcss", + "rework", + "preprocessor", + "parser", + "source map", + "transform", + "manipulation", + "transpiler" + ], + "license": "MIT", + "main": "lib/postcss", + "name": "postcss", + "repository": { + "type": "git", + "url": "git+https://github.com/postcss/postcss.git" + }, + "types": "lib/postcss.d.ts", + "version": "7.0.18" +} diff --git a/node_modules/autoprefixer/node_modules/source-map/CHANGELOG.md b/node_modules/autoprefixer/node_modules/source-map/CHANGELOG.md new file mode 100644 index 0000000..3a8c066 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,301 @@ +# Change Log + +## 0.5.6 + +* Fix for regression when people were using numbers as names in source maps. See + #236. + +## 0.5.5 + +* Fix "regression" of unsupported, implementation behavior that half the world + happens to have come to depend on. See #235. + +* Fix regression involving function hoisting in SpiderMonkey. See #233. + +## 0.5.4 + +* Large performance improvements to source-map serialization. See #228 and #229. + +## 0.5.3 + +* Do not include unnecessary distribution files. See + commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. + +## 0.5.2 + +* Include browser distributions of the library in package.json's `files`. See + issue #212. + +## 0.5.1 + +* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See + ff05274becc9e6e1295ed60f3ea090d31d843379. + +## 0.5.0 + +* Node 0.8 is no longer supported. + +* Use webpack instead of dryice for bundling. + +* Big speedups serializing source maps. See pull request #203. + +* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that + explicitly start with the source root. See issue #199. + +## 0.4.4 + +* Fix an issue where using a `SourceMapGenerator` after having created a + `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See + issue #191. + +* Fix an issue with where `SourceMapGenerator` would mistakenly consider + different mappings as duplicates of each other and avoid generating them. See + issue #192. + +## 0.4.3 + +* A very large number of performance improvements, particularly when parsing + source maps. Collectively about 75% of time shaved off of the source map + parsing benchmark! + +* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy + searching in the presence of a column option. See issue #177. + +* Fix a bug with joining a source and its source root when the source is above + the root. See issue #182. + +* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to + determine when all sources' contents are inlined into the source map. See + issue #190. + +## 0.4.2 + +* Add an `.npmignore` file so that the benchmarks aren't pulled down by + dependent projects. Issue #169. + +* Add an optional `column` argument to + `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines + with no mappings. Issues #172 and #173. + +## 0.4.1 + +* Fix accidentally defining a global variable. #170. + +## 0.4.0 + +* The default direction for fuzzy searching was changed back to its original + direction. See #164. + +* There is now a `bias` option you can supply to `SourceMapConsumer` to control + the fuzzy searching direction. See #167. + +* About an 8% speed up in parsing source maps. See #159. + +* Added a benchmark for parsing and generating source maps. + +## 0.3.0 + +* Change the default direction that searching for positions fuzzes when there is + not an exact match. See #154. + +* Support for environments using json2.js for JSON serialization. See #156. + +## 0.2.0 + +* Support for consuming "indexed" source maps which do not have any remote + sections. See pull request #127. This introduces a minor backwards + incompatibility if you are monkey patching `SourceMapConsumer.prototype` + methods. + +## 0.1.43 + +* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue + #148 for some discussion and issues #150, #151, and #152 for implementations. + +## 0.1.42 + +* Fix an issue where `SourceNode`s from different versions of the source-map + library couldn't be used in conjunction with each other. See issue #142. + +## 0.1.41 + +* Fix a bug with getting the source content of relative sources with a "./" + prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). + +* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the + column span of each mapping. + +* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find + all generated positions associated with a given original source and line. + +## 0.1.40 + +* Performance improvements for parsing source maps in SourceMapConsumer. + +## 0.1.39 + +* Fix a bug where setting a source's contents to null before any source content + had been set before threw a TypeError. See issue #131. + +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. + Issue #116. + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/node_modules/autoprefixer/node_modules/source-map/LICENSE b/node_modules/autoprefixer/node_modules/source-map/LICENSE new file mode 100644 index 0000000..ed1b7cf --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/autoprefixer/node_modules/source-map/README.md b/node_modules/autoprefixer/node_modules/source-map/README.md new file mode 100644 index 0000000..fea4beb --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/README.md @@ -0,0 +1,742 @@ +# Source Map + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) + +This is a library to generate and consume the source map format +[described here][format]. + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit + +## Use with Node + + $ npm install source-map + +## Use on the Web + + <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script> + +-------------------------------------------------------------------------------- + +<!-- `npm run toc` to regenerate the Table of Contents --> + +<!-- START doctoc generated TOC please keep comment here to allow auto update --> +<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + +<!-- END doctoc generated TOC please keep comment here to allow auto update --> + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/autoprefixer/node_modules/source-map/dist/source-map.debug.js b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.debug.js new file mode 100644 index 0000000..aad0620 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.debug.js @@ -0,0 +1,3234 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; +/******/ +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAxNjI0YzcyOTliODg3ZjdiZGY2NCIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtB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cbiAgICAgICAgLy8gbGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkIGluIFNvdXJjZU1hcCBzcGVjIHZlcnNpb24gM1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbExpbmUgLSAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbExpbmUpO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lIC0gMTtcblxuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4pO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuYW1lSWR4ID0gdGhpcy5fbmFtZXMuaW5kZXhPZihtYXBwaW5nLm5hbWUpO1xuICAgICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShuYW1lSWR4IC0gcHJldmlvdXNOYW1lKTtcbiAgICAgICAgICBwcmV2aW91c05hbWUgPSBuYW1lSWR4O1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJlc3VsdCArPSBuZXh0O1xuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH07XG5cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZ2VuZXJhdGVTb3VyY2VzQ29udGVudChhU291cmNlcywgYVNvdXJjZVJvb3QpIHtcbiAgICByZXR1cm4gYVNvdXJjZ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XJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtI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oOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0=
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/source-map/dist/source-map.js b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.js new file mode 100644 index 0000000..b4eb087 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.js @@ -0,0 +1,3233 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["sourceMap"] = factory(); + else + root["sourceMap"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + /* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; + exports.SourceNode = __webpack_require__(10).SourceNode; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var base64VLQ = __webpack_require__(2); + var util = __webpack_require__(4); + var ArraySet = __webpack_require__(5).ArraySet; + var MappingList = __webpack_require__(6).MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + var base64 = __webpack_require__(3); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + + /** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ + exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; + }; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var util = __webpack_require__(4); + var binarySearch = __webpack_require__(8); + var ArraySet = __webpack_require__(5).ArraySet; + var base64VLQ = __webpack_require__(2); + var quickSort = __webpack_require__(9).quickSort; + + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; + }; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } + }); + + /** + * Provide the JIT with a nice shape / hidden class. + */ + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + + /** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + // It turns out that some (most?) JavaScript engines don't self-host + // `Array.prototype.sort`. This makes sense because C++ will likely remain + // faster than JS when doing raw CPU-intensive sorting. However, when using a + // custom comparator function, calling back and forth between the VM's C++ and + // JIT'd JS is rather slow *and* loses JIT type information, resulting in + // worse generated code for the comparator function than would be optimal. In + // fact, when sorting with a comparator, these costs outweigh the benefits of + // sorting in C++. By using our own JS-implemented Quick Sort (below), we get + // a ~3500ms mean speed-up in `bench/bench.html`. + + /** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + + /** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ + function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); + } + + /** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ + function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + + /** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; + var util = __webpack_require__(4); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + + +/***/ }) +/******/ ]) +}); +;
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/source-map/dist/source-map.min.js b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.min.js new file mode 100644 index 0000000..c7c72da --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.min.js @@ -0,0 +1,2 @@ +!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var o=t;null!==n&&(o=i.relative(n,t)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(t);null!=s&&r.setSourceContent(t,s)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f<d;f++){if(n=h[f],e="",n.generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<<s,u=a-1,l=a;n.encode=function(e){var n,r="",o=t(e);do n=o&u,o>>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<<p,p+=s}while(t);r.value=o(g),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){var n=65,r=90,t=97,o=122,i=48,s=57,a=43,u=47,l=26,c=52;return n<=e&&e<=r?e-n:t<=e&&e<=o?e-t+l:i<=e&&e<=s?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(v);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(y))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=f(e.source,n.source);return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:f(e.name,n.name)))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=f(e.source,n.source),0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:f(e.name,n.name)))))}function f(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}function m(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function _(e,n,r){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),r){var a=t(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var u=a.path.lastIndexOf("/");u>=0&&(a.path=a.path.substring(0,u+1))}n=s(o(a),n)}return i(n)}n.getArg=r;var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,y=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||v.test(e)},n.relative=a;var C=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=C?u:l,n.fromSetString=C?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d,n.parseSourceMapInput=m,n.computeSourceURL=_},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o<i;o++)r.add(e[o],n);return r},t.prototype.size=function(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=s?e:o.toSetString(e),t=s?this.has(e):i.call(this._set,r),a=this._array.length;t&&!n||this._array.push(e),t||(s?this._set.set(e,a):this._set[r]=a)},t.prototype.has=function(e){if(s)return this._set.has(e);var n=o.toSetString(e);return i.call(this._set,n)},t.prototype.indexOf=function(e){if(s){var n=this._set.get(e);if(n>=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},t.prototype.toArray=function(){return this._array.slice()},n.ArraySet=t},function(e,n,r){function t(e,n){var r=e.generatedLine,t=n.generatedLine,o=e.generatedColumn,s=n.generatedColumn;return t>r||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e,n){var r=e;return"string"==typeof e&&(r=a.parseSourceMapInput(e)),null!=r.sections?new s(r,n):new o(r,n)}function o(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sources"),i=a.getArg(r,"names",[]),s=a.getArg(r,"sourceRoot",null),u=a.getArg(r,"sourcesContent",null),c=a.getArg(r,"mappings"),g=a.getArg(r,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);s&&(s=a.normalize(s)),o=o.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return a.computeSourceURL(s,e,n)}),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=n,this.file=g}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var o=a.getArg(r,"version"),i=a.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=a.getArg(e,"offset"),o=a.getArg(r,"line"),i=a.getArg(r,"column");if(o<s.line||o===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=r,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new t(a.getArg(e,"map"),n)}})}var a=r(4),u=r(8),l=r(5).ArraySet,c=r(2),g=r(9).quickSort;t.fromSourceMap=function(e,n){return o.fromSourceMap(e,n)},t.prototype._version=3,t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),t.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},t.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.prototype.eachMapping=function(e,n,r){var o,i=n||null,s=r||t.GENERATED_ORDER;switch(s){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return n=a.computeSourceURL(u,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},t.prototype.allGeneratedPositionsFor=function(e){var n=a.getArg(e,"line"),r={source:a.getArg(e,"source"),originalLine:n,originalColumn:a.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var t=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.prototype._findSourceIndex=function(e){var n=e;if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},o.fromSourceMap=function(e,n){var r=Object.create(o.prototype),t=r._names=l.fromArray(e._names.toArray(),!0),s=r._sources=l.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(e){return a.computeSourceURL(r.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),c=r.__generatedMappings=[],p=r.__originalMappings=[],h=0,f=u.length;h<f;h++){var d=u[h],m=new i;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=s.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=t.indexOf(d.name)),p.push(m)),c.push(m)}return g(r.__originalMappings,a.compareByOriginalPositions),r},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,y={},C={},S=[],A=[];v<_;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;s<_&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=y[t])v+=t.length;else{for(o=[];v<s;)c.decode(e,v,C),u=C.value,v=C.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),A.push(r),"number"==typeof r.originalLine&&S.push(r)}g(A,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,g(S,a.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=a.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var t=e;null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t));var o;if(null!=this.sourceRoot&&(o=a.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!o.path||"/"==o.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),s.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=u.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r?r:e.generatedColumn-n.generatedOffset.generatedColumn}),t=this._sections[r];return t?t.consumer.originalPositionFor({line:n.generatedLine-(t.generatedOffset.generatedLine-1),column:n.generatedColumn-(t.generatedOffset.generatedLine===n.generatedLine?t.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r],o=t.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(a.getArg(e,"source"))!==-1){var t=r.consumer.generatedPositionFor(e);if(t){var o={line:t.line+(r.generatedOffset.generatedLine-1),column:t.column+(r.generatedOffset.generatedLine===t.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var t=this._sections[r],o=t.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=t.consumer._sources.at(s.source);u=a.computeSourceURL(t.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var l=null;s.name&&(l=t.consumer._names.at(s.name),this._names.add(l),l=this._names.indexOf(l));var c={source:u,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}g(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),g(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=s},function(e,n){function r(e,t,o,i,s,a){var u=Math.floor((t-e)/2)+e,l=s(o,i[u],!0);return 0===l?u:l>0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t<i.length?t:-1:u:u-e>1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i<s){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;c<s;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=0,c=function(){function e(){return l<u.length?u[l++]:void 0}var n=e(),r=e()||"";return n+r},g=1,p=0,h=null;return n.eachMapping(function(e){if(null!==h){if(!(g<e.generatedLine)){var n=u[l]||"",r=n.substr(0,e.generatedColumn-p);return u[l]=n.substr(e.generatedColumn-p),p=e.generatedColumn,o(h,r),void(h=e)}o(h,c()),g++,p=0}for(;g<e.generatedLine;)a.add(c()),g++;if(p<e.generatedColumn){var n=u[l]||"";a.add(n.substr(0,e.generatedColumn)),u[l]=n.substr(e.generatedColumn),p=e.generatedColumn}h=e},this),l<u.length&&(h&&o(h,c()),a.add(u.splice(l).join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r<t;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;r<t-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;n<r;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?(i===o.source&&s===o.line&&u===o.column&&l===o.name||r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;c<g;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])}); +//# sourceMappingURL=source-map.min.js.map
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/source-map/dist/source-map.min.js.map b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.min.js.map new file mode 100644 index 0000000..d2cc86e --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/dist/source-map.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap 0fd5815da764db5fb9fe","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","sourceRelative","has","add","content","sourceContentFor","setSourceContent","_validateMapping","String","aSourceFile","aSourceContent","Object","create","toSetString","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","next","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","identity","s","isProtoString","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","strcmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","aStr1","aStr2","parseSourceMapInput","str","parse","computeSourceURL","sourceURL","sourceMapURL","parsed","substring","test","supportsNullProto","obj","_array","_set","hasNativeMap","Map","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","get","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","aSourceMapURL","sourceMap","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","_absoluteSources","_sourceMapURL","Mapping","lastOffset","_sections","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","configurable","enumerable","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findSourceIndex","_findMapping","undefined","lastColumn","relativeSource","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","remainingLinesIndex","shiftNextLine","getNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEjDjCN,EAAAe,mBAAAT,EAAA,GAAAS,mBACAf,EAAAgB,kBAAAV,EAAA,GAAAU,kBACAhB,EAAAiB,WAAAX,EAAA,IAAAW,YF6DM,SAAUhB,EAAQD,EAASM,GGhDjC,QAAAS,GAAAG,GACAA,IACAA,MAEAd,K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AGU/B,KAAAzT,EAAAyT,KAAAxP,QAGV1G,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar base64VLQ = __webpack_require__(2);\n\tvar util = __webpack_require__(4);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar MappingList = __webpack_require__(6).MappingList;\n\t\n\t/**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\tfunction SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\t\n\tSourceMapGenerator.prototype._version = 3;\n\t\n\t/**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\tSourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var sourceRelative = sourceFile;\n\t if (sourceRoot !== null) {\n\t sourceRelative = util.relative(sourceRoot, sourceFile);\n\t }\n\t\n\t if (!generator._sources.has(sourceRelative)) {\n\t generator._sources.add(sourceRelative);\n\t }\n\t\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t/**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\tSourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null) {\n\t source = String(source);\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\t\n\t if (name != null) {\n\t name = String(name);\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t/**\n\t * Set the source content for a source file.\n\t */\n\tSourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\tSourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t/**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\tSourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t // When aOriginal is truthy but has empty values for .line and .column,\n\t // it is most likely a programmer error. In this case we throw a very\n\t // specific error message to try to guide them the right way.\n\t // For example: https://github.com/Polymer/polymer-bundler/pull/519\n\t if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n\t throw new Error(\n\t 'original.line and original.column are not numbers -- you probably meant to omit ' +\n\t 'the original mapping entirely and only map the generated position. If so, pass ' +\n\t 'null for the original mapping instead of an object with empty or null values.'\n\t );\n\t }\n\t\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '<dir>/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 === null) {\n\t return 1; // aStr2 !== null\n\t }\n\t\n\t if (aStr2 === null) {\n\t return -1; // aStr1 !== null\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t\n\t/**\n\t * Strip any JSON XSSI avoidance prefix from the string (as documented\n\t * in the source maps specification), and then parse the string as\n\t * JSON.\n\t */\n\tfunction parseSourceMapInput(str) {\n\t return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n\t}\n\texports.parseSourceMapInput = parseSourceMapInput;\n\t\n\t/**\n\t * Compute the URL of a source given the the source root, the source's\n\t * URL, and the source map's URL.\n\t */\n\tfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n\t sourceURL = sourceURL || '';\n\t\n\t if (sourceRoot) {\n\t // This follows what Chrome does.\n\t if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n\t sourceRoot += '/';\n\t }\n\t // The spec says:\n\t // Line 4: An optional source root, useful for relocating source\n\t // files on a server or removing repeated values in the\n\t // “sources” entry. This value is prepended to the individual\n\t // entries in the “source” field.\n\t sourceURL = sourceRoot + sourceURL;\n\t }\n\t\n\t // Historically, SourceMapConsumer did not take the sourceMapURL as\n\t // a parameter. This mode is still somewhat supported, which is why\n\t // this code block is conditional. However, it's preferable to pass\n\t // the source map URL to SourceMapConsumer, so that this function\n\t // can implement the source URL resolution algorithm as outlined in\n\t // the spec. This block is basically the equivalent of:\n\t // new URL(sourceURL, sourceMapURL).toString()\n\t // ... except it avoids using URL, which wasn't available in the\n\t // older releases of node still supported by this library.\n\t //\n\t // The spec says:\n\t // If the sources are not absolute URLs after prepending of the\n\t // “sourceRoot”, the sources are resolved relative to the\n\t // SourceMap (like resolving script src in a html document).\n\t if (sourceMapURL) {\n\t var parsed = urlParse(sourceMapURL);\n\t if (!parsed) {\n\t throw new Error(\"sourceMapURL could not be parsed\");\n\t }\n\t if (parsed.path) {\n\t // Strip the last path component, but keep the \"/\".\n\t var index = parsed.path.lastIndexOf('/');\n\t if (index >= 0) {\n\t parsed.path = parsed.path.substring(0, index + 1);\n\t }\n\t }\n\t sourceURL = join(urlGenerate(parsed), sourceURL);\n\t }\n\t\n\t return normalize(sourceURL);\n\t}\n\texports.computeSourceURL = computeSourceURL;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n\t : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number is 1-based.\n\t * - column: Optional. the column number in the original source.\n\t * The column number is 0-based.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t needle.source = this._findSourceIndex(needle.source);\n\t if (needle.source < 0) {\n\t return [];\n\t }\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The first parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t if (sourceRoot) {\n\t sourceRoot = util.normalize(sourceRoot);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this._absoluteSources = this._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this._sourceMapURL = aSourceMapURL;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Utility function to find the index of a source. Returns -1 if not\n\t * found.\n\t */\n\tBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t if (this._sources.has(relativeSource)) {\n\t return this._sources.indexOf(relativeSource);\n\t }\n\t\n\t // Maybe aSource is an absolute URL as returned by |sources|. In\n\t // this case we can't simply undo the transform.\n\t var i;\n\t for (i = 0; i < this._absoluteSources.length; ++i) {\n\t if (this._absoluteSources[i] == aSource) {\n\t return i;\n\t }\n\t }\n\t\n\t return -1;\n\t};\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @param String aSourceMapURL\n\t * The URL at which the source map can be found (optional)\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t smc._sourceMapURL = aSourceMapURL;\n\t smc._absoluteSources = smc._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._absoluteSources.slice();\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t var index = this._findSourceIndex(aSource);\n\t if (index >= 0) {\n\t return this.sourcesContent[index];\n\t }\n\t\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + relativeSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t source = this._findSourceIndex(source);\n\t if (source < 0) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The first parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based. \n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = null;\n\t if (mapping.name) {\n\t name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t }\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0fd5815da764db5fb9fe","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""}
\ No newline at end of file diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/array-set.js b/node_modules/autoprefixer/node_modules/source-map/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/base64-vlq.js b/node_modules/autoprefixer/node_modules/source-map/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/base64.js b/node_modules/autoprefixer/node_modules/source-map/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/binary-search.js b/node_modules/autoprefixer/node_modules/source-map/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/mapping-list.js b/node_modules/autoprefixer/node_modules/source-map/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/quick-sort.js b/node_modules/autoprefixer/node_modules/source-map/lib/quick-sort.js new file mode 100644 index 0000000..6a7caad --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/quick-sort.js @@ -0,0 +1,114 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/source-map-consumer.js b/node_modules/autoprefixer/node_modules/source-map/lib/source-map-consumer.js new file mode 100644 index 0000000..7b99d1d --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/source-map-consumer.js @@ -0,0 +1,1145 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/source-map-generator.js b/node_modules/autoprefixer/node_modules/source-map/lib/source-map-generator.js new file mode 100644 index 0000000..508bcfb --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/source-map-generator.js @@ -0,0 +1,425 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/source-node.js b/node_modules/autoprefixer/node_modules/source-map/lib/source-node.js new file mode 100644 index 0000000..8bcdbe3 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/autoprefixer/node_modules/source-map/lib/util.js b/node_modules/autoprefixer/node_modules/source-map/lib/util.js new file mode 100644 index 0000000..3ca92e5 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/lib/util.js @@ -0,0 +1,488 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/autoprefixer/node_modules/source-map/package.json b/node_modules/autoprefixer/node_modules/source-map/package.json new file mode 100644 index 0000000..76ab541 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/package.json @@ -0,0 +1,212 @@ +{ + "_from": "source-map@^0.6.1", + "_id": "[email protected]", + "_inBundle": false, + "_integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "_location": "/autoprefixer/source-map", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "source-map@^0.6.1", + "name": "source-map", + "escapedName": "source-map", + "rawSpec": "^0.6.1", + "saveSpec": null, + "fetchSpec": "^0.6.1" + }, + "_requiredBy": [ + "/autoprefixer/postcss" + ], + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "_shasum": "74722af32e9614e9c287a8d0bbde48b5e2f1a263", + "_spec": "source-map@^0.6.1", + "_where": "/home/dstaesse/git/website/node_modules/autoprefixer/node_modules/postcss", + "author": { + "name": "Nick Fitzgerald", + "email": "[email protected]" + }, + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Tobias Koppers", + "email": "[email protected]" + }, + { + "name": "Duncan Beevers", + "email": "[email protected]" + }, + { + "name": "Stephen Crane", + "email": "[email protected]" + }, + { + "name": "Ryan Seddon", + "email": "[email protected]" + }, + { + "name": "Miles Elam", + "email": "[email protected]" + }, + { + "name": "Mihai Bazon", + "email": "[email protected]" + }, + { + "name": "Michael Ficarra", + "email": "[email protected]" + }, + { + "name": "Todd Wolfson", + "email": "[email protected]" + }, + { + "name": "Alexander Solovyov", + "email": "[email protected]" + }, + { + "name": "Felix Gnass", + "email": "[email protected]" + }, + { + "name": "Conrad Irwin", + "email": "[email protected]" + }, + { + "name": "usrbincc", + "email": "[email protected]" + }, + { + "name": "David Glasser", + "email": "[email protected]" + }, + { + "name": "Chase Douglas", + "email": "[email protected]" + }, + { + "name": "Evan Wallace", + "email": "[email protected]" + }, + { + "name": "Heather Arthur", + "email": "[email protected]" + }, + { + "name": "Hugh Kennedy", + "email": "[email protected]" + }, + { + "name": "David Glasser", + "email": "[email protected]" + }, + { + "name": "Simon Lydell", + "email": "[email protected]" + }, + { + "name": "Jmeas Smith", + "email": "[email protected]" + }, + { + "name": "Michael Z Goddard", + "email": "[email protected]" + }, + { + "name": "azu", + "email": "[email protected]" + }, + { + "name": "John Gozde", + "email": "[email protected]" + }, + { + "name": "Adam Kirkton", + "email": "[email protected]" + }, + { + "name": "Chris Montgomery", + "email": "[email protected]" + }, + { + "name": "J. Ryan Stinnett", + "email": "[email protected]" + }, + { + "name": "Jack Herrington", + "email": "[email protected]" + }, + { + "name": "Chris Truter", + "email": "[email protected]" + }, + { + "name": "Daniel Espeset", + "email": "[email protected]" + }, + { + "name": "Jamie Wong", + "email": "[email protected]" + }, + { + "name": "Eddy Bruël", + "email": "[email protected]" + }, + { + "name": "Hawken Rives", + "email": "[email protected]" + }, + { + "name": "Gilad Peleg", + "email": "[email protected]" + }, + { + "name": "djchie", + "email": "[email protected]" + }, + { + "name": "Gary Ye", + "email": "[email protected]" + }, + { + "name": "Nicolas Lalevée", + "email": "[email protected]" + } + ], + "deprecated": false, + "description": "Generates and consumes source maps", + "devDependencies": { + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/", + "dist/source-map.debug.js", + "dist/source-map.js", + "dist/source-map.min.js", + "dist/source-map.min.js.map" + ], + "homepage": "https://github.com/mozilla/source-map", + "license": "BSD-3-Clause", + "main": "./source-map.js", + "name": "source-map", + "repository": { + "type": "git", + "url": "git+ssh://[email protected]/mozilla/source-map.git" + }, + "scripts": { + "build": "webpack --color", + "test": "npm run build && node test/run-tests.js", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "typings": "source-map", + "version": "0.6.1" +} diff --git a/node_modules/autoprefixer/node_modules/source-map/source-map.d.ts b/node_modules/autoprefixer/node_modules/source-map/source-map.d.ts new file mode 100644 index 0000000..8f972b0 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/source-map.d.ts @@ -0,0 +1,98 @@ +export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; +} + +export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} + +export interface Position { + line: number; + column: number; +} + +export interface LineRange extends Position { + lastColumn: number; +} + +export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; +} + +export interface SourceFindPosition extends FindPosition { + source: string; +} + +export interface MappedPosition extends Position { + source: string; + name?: string; +} + +export interface MappingItem { + source: string; + generatedLine: number; + generatedColumn: number; + originalLine: number; + originalColumn: number; + name: string; +} + +export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; +} + +export interface Mapping { + generated: Position; + original: Position; + source: string; + name?: string; +} + +export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; +} + +export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; +} + +export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; +} diff --git a/node_modules/autoprefixer/node_modules/source-map/source-map.js b/node_modules/autoprefixer/node_modules/source-map/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/source-map/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/autoprefixer/node_modules/supports-color/browser.js b/node_modules/autoprefixer/node_modules/supports-color/browser.js new file mode 100644 index 0000000..62afa3a --- /dev/null +++ b/node_modules/autoprefixer/node_modules/supports-color/browser.js @@ -0,0 +1,5 @@ +'use strict'; +module.exports = { + stdout: false, + stderr: false +}; diff --git a/node_modules/autoprefixer/node_modules/supports-color/index.js b/node_modules/autoprefixer/node_modules/supports-color/index.js new file mode 100644 index 0000000..0477d30 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/supports-color/index.js @@ -0,0 +1,138 @@ +'use strict'; +const os = require('os'); +const hasFlag = require('has-flag'); + +const {env} = process; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false') || + hasFlag('color=never')) { + forceColor = 0; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = 1; +} +if ('FORCE_COLOR' in env) { + if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') { + forceColor = 1; + } else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') { + forceColor = 0; + } else { + forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); + } +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === 0) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor === undefined) { + return 0; + } + + const min = forceColor || 0; + + if (env.TERM === 'dumb') { + return min; + } + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; diff --git a/node_modules/autoprefixer/node_modules/supports-color/license b/node_modules/autoprefixer/node_modules/supports-color/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/supports-color/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/autoprefixer/node_modules/supports-color/package.json b/node_modules/autoprefixer/node_modules/supports-color/package.json new file mode 100644 index 0000000..de233d6 --- /dev/null +++ b/node_modules/autoprefixer/node_modules/supports-color/package.json @@ -0,0 +1,85 @@ +{ + "_from": "supports-color@^6.1.0", + "_id": "[email protected]", + "_inBundle": false, + "_integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "_location": "/autoprefixer/supports-color", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "supports-color@^6.1.0", + "name": "supports-color", + "escapedName": "supports-color", + "rawSpec": "^6.1.0", + "saveSpec": null, + "fetchSpec": "^6.1.0" + }, + "_requiredBy": [ + "/autoprefixer/postcss" + ], + "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "_shasum": "0764abc69c63d5ac842dd4867e8d025e880df8f3", + "_spec": "supports-color@^6.1.0", + "_where": "/home/dstaesse/git/website/node_modules/autoprefixer/node_modules/postcss", + "author": { + "name": "Sindre Sorhus", + "email": "[email protected]", + "url": "sindresorhus.com" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "bundleDependencies": false, + "dependencies": { + "has-flag": "^3.0.0" + }, + "deprecated": false, + "description": "Detect whether a terminal supports color", + "devDependencies": { + "ava": "^0.25.0", + "import-fresh": "^2.0.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "browser.js" + ], + "homepage": "https://github.com/chalk/supports-color#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect", + "truecolor", + "16m" + ], + "license": "MIT", + "name": "supports-color", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/supports-color.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "6.1.0" +} diff --git a/node_modules/autoprefixer/node_modules/supports-color/readme.md b/node_modules/autoprefixer/node_modules/supports-color/readme.md new file mode 100644 index 0000000..d4cc58a --- /dev/null +++ b/node_modules/autoprefixer/node_modules/supports-color/readme.md @@ -0,0 +1,85 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + +--- + +<div align="center"> + <b> + <a href="https://tidelift.com/subscription/pkg/npm-supports-color?utm_source=npm-supports-color&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> + </b> + <br> + <sub> + Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. + </sub> +</div> + +--- + + +## Install + +``` +$ npm install supports-color +``` + + +## Usage + +```js +const supportsColor = require('supports-color'); + +if (supportsColor.stdout) { + console.log('Terminal stdout supports color'); +} + +if (supportsColor.stdout.has256) { + console.log('Terminal stdout supports 256 colors'); +} + +if (supportsColor.stderr.has16m) { + console.log('Terminal stderr supports 16 million colors (truecolor)'); +} +``` + + +## API + +Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. + +The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: + +- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) +- `.level = 2` and `.has256 = true`: 256 color support +- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) + + +## Info + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. + +Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. + + +## Security + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## Maintainers + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Josh Junon](https://github.com/qix-) + + +## License + +MIT diff --git a/node_modules/autoprefixer/package.json b/node_modules/autoprefixer/package.json new file mode 100644 index 0000000..9c4e543 --- /dev/null +++ b/node_modules/autoprefixer/package.json @@ -0,0 +1,73 @@ +{ + "_from": "autoprefixer@^9.4.6", + "_id": "[email protected]", + "_inBundle": false, + "_integrity": "sha512-Koz2cJU9dKOxG8P1f8uVaBntOv9lP4yz9ffWvWaicv9gHBPhpQB22nGijwd8gqW9CNT+UdkbQOQNLVI8jN1ZfQ==", + "_location": "/autoprefixer", + "_phantomChildren": { + "chalk": "2.4.2", + "has-flag": "3.0.0" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "autoprefixer@^9.4.6", + "name": "autoprefixer", + "escapedName": "autoprefixer", + "rawSpec": "^9.4.6", + "saveSpec": null, + "fetchSpec": "^9.4.6" + }, + "_requiredBy": [ + "#DEV:/", + "#USER" + ], + "_resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.4.tgz", + "_shasum": "e6453be47af316b2923eaeaed87860f52ad4b7eb", + "_spec": "autoprefixer@^9.4.6", + "_where": "/home/dstaesse/git/website", + "author": { + "name": "Andrey Sitnik", + "email": "[email protected]" + }, + "bin": { + "autoprefixer": "./bin/autoprefixer" + }, + "browser": { + "chalk": false + }, + "bugs": { + "url": "https://github.com/postcss/autoprefixer/issues" + }, + "bundleDependencies": false, + "dependencies": { + "browserslist": "^4.7.0", + "caniuse-lite": "^1.0.30000998", + "chalk": "^2.4.2", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.18", + "postcss-value-parser": "^4.0.2" + }, + "deprecated": false, + "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website", + "engines": { + "node": ">=6.0.0" + }, + "homepage": "https://github.com/postcss/autoprefixer#readme", + "keywords": [ + "autoprefixer", + "css", + "prefix", + "postcss", + "postcss-plugin" + ], + "license": "MIT", + "main": "lib/autoprefixer", + "name": "autoprefixer", + "repository": { + "type": "git", + "url": "git+https://github.com/postcss/autoprefixer.git" + }, + "version": "9.6.4" +} |