vite 6.0.0-alpha.19 → 6.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { K as commonjsGlobal, J as getDefaultExportFromCjs } from './dep-BWEMV5Th.js';
1
+ import { K as commonjsGlobal, J as getDefaultExportFromCjs } from './dep-CpuHsFvF.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -2219,7 +2219,6 @@ var unesc = {exports: {}};
2219
2219
 
2220
2220
  exports.__esModule = true;
2221
2221
  exports["default"] = unesc;
2222
-
2223
2222
  // Many thanks for this post which made this migration much easier.
2224
2223
  // https://mathiasbynens.be/notes/css-escapes
2225
2224
 
@@ -2232,81 +2231,65 @@ var unesc = {exports: {}};
2232
2231
  var lower = str.toLowerCase();
2233
2232
  var hex = '';
2234
2233
  var spaceTerminated = false;
2235
-
2236
2234
  for (var i = 0; i < 6 && lower[i] !== undefined; i++) {
2237
- var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9]
2238
-
2239
- var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
2240
-
2235
+ var code = lower.charCodeAt(i);
2236
+ // check to see if we are dealing with a valid hex char [a-f|0-9]
2237
+ var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
2238
+ // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
2241
2239
  spaceTerminated = code === 32;
2242
-
2243
2240
  if (!valid) {
2244
2241
  break;
2245
2242
  }
2246
-
2247
2243
  hex += lower[i];
2248
2244
  }
2249
-
2250
2245
  if (hex.length === 0) {
2251
2246
  return undefined;
2252
2247
  }
2253
-
2254
2248
  var codePoint = parseInt(hex, 16);
2255
- var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for
2249
+ var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF;
2250
+ // Add special case for
2256
2251
  // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point"
2257
2252
  // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point
2258
-
2259
2253
  if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) {
2260
2254
  return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
2261
2255
  }
2262
-
2263
2256
  return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
2264
2257
  }
2265
-
2266
2258
  var CONTAINS_ESCAPE = /\\/;
2267
-
2268
2259
  function unesc(str) {
2269
2260
  var needToProcess = CONTAINS_ESCAPE.test(str);
2270
-
2271
2261
  if (!needToProcess) {
2272
2262
  return str;
2273
2263
  }
2274
-
2275
2264
  var ret = "";
2276
-
2277
2265
  for (var i = 0; i < str.length; i++) {
2278
2266
  if (str[i] === "\\") {
2279
2267
  var gobbled = gobbleHex(str.slice(i + 1, i + 7));
2280
-
2281
2268
  if (gobbled !== undefined) {
2282
2269
  ret += gobbled[0];
2283
2270
  i += gobbled[1];
2284
2271
  continue;
2285
- } // Retain a pair of \\ if double escaped `\\\\`
2286
- // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
2287
-
2272
+ }
2288
2273
 
2274
+ // Retain a pair of \\ if double escaped `\\\\`
2275
+ // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
2289
2276
  if (str[i + 1] === "\\") {
2290
2277
  ret += "\\";
2291
2278
  i++;
2292
2279
  continue;
2293
- } // if \\ is at the end of the string retain it
2294
- // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
2295
-
2280
+ }
2296
2281
 
2282
+ // if \\ is at the end of the string retain it
2283
+ // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
2297
2284
  if (str.length === i + 1) {
2298
2285
  ret += str[i];
2299
2286
  }
2300
-
2301
2287
  continue;
2302
2288
  }
2303
-
2304
2289
  ret += str[i];
2305
2290
  }
2306
-
2307
2291
  return ret;
2308
2292
  }
2309
-
2310
2293
  module.exports = exports.default;
2311
2294
  } (unesc, unesc.exports));
2312
2295
 
@@ -2318,25 +2301,19 @@ var getProp = {exports: {}};
2318
2301
 
2319
2302
  exports.__esModule = true;
2320
2303
  exports["default"] = getProp;
2321
-
2322
2304
  function getProp(obj) {
2323
2305
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2324
2306
  props[_key - 1] = arguments[_key];
2325
2307
  }
2326
-
2327
2308
  while (props.length > 0) {
2328
2309
  var prop = props.shift();
2329
-
2330
2310
  if (!obj[prop]) {
2331
2311
  return undefined;
2332
2312
  }
2333
-
2334
2313
  obj = obj[prop];
2335
2314
  }
2336
-
2337
2315
  return obj;
2338
2316
  }
2339
-
2340
2317
  module.exports = exports.default;
2341
2318
  } (getProp, getProp.exports));
2342
2319
 
@@ -2348,23 +2325,18 @@ var ensureObject = {exports: {}};
2348
2325
 
2349
2326
  exports.__esModule = true;
2350
2327
  exports["default"] = ensureObject;
2351
-
2352
2328
  function ensureObject(obj) {
2353
2329
  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2354
2330
  props[_key - 1] = arguments[_key];
2355
2331
  }
2356
-
2357
2332
  while (props.length > 0) {
2358
2333
  var prop = props.shift();
2359
-
2360
2334
  if (!obj[prop]) {
2361
2335
  obj[prop] = {};
2362
2336
  }
2363
-
2364
2337
  obj = obj[prop];
2365
2338
  }
2366
2339
  }
2367
-
2368
2340
  module.exports = exports.default;
2369
2341
  } (ensureObject, ensureObject.exports));
2370
2342
 
@@ -2376,80 +2348,57 @@ var stripComments = {exports: {}};
2376
2348
 
2377
2349
  exports.__esModule = true;
2378
2350
  exports["default"] = stripComments;
2379
-
2380
2351
  function stripComments(str) {
2381
2352
  var s = "";
2382
2353
  var commentStart = str.indexOf("/*");
2383
2354
  var lastEnd = 0;
2384
-
2385
2355
  while (commentStart >= 0) {
2386
2356
  s = s + str.slice(lastEnd, commentStart);
2387
2357
  var commentEnd = str.indexOf("*/", commentStart + 2);
2388
-
2389
2358
  if (commentEnd < 0) {
2390
2359
  return s;
2391
2360
  }
2392
-
2393
2361
  lastEnd = commentEnd + 2;
2394
2362
  commentStart = str.indexOf("/*", lastEnd);
2395
2363
  }
2396
-
2397
2364
  s = s + str.slice(lastEnd);
2398
2365
  return s;
2399
2366
  }
2400
-
2401
2367
  module.exports = exports.default;
2402
2368
  } (stripComments, stripComments.exports));
2403
2369
 
2404
2370
  var stripCommentsExports = stripComments.exports;
2405
2371
 
2406
2372
  util.__esModule = true;
2407
- util.stripComments = util.ensureObject = util.getProp = util.unesc = void 0;
2408
-
2373
+ util.unesc = util.stripComments = util.getProp = util.ensureObject = void 0;
2409
2374
  var _unesc = _interopRequireDefault$3(unescExports);
2410
-
2411
2375
  util.unesc = _unesc["default"];
2412
-
2413
2376
  var _getProp = _interopRequireDefault$3(getPropExports);
2414
-
2415
2377
  util.getProp = _getProp["default"];
2416
-
2417
2378
  var _ensureObject = _interopRequireDefault$3(ensureObjectExports);
2418
-
2419
2379
  util.ensureObject = _ensureObject["default"];
2420
-
2421
2380
  var _stripComments = _interopRequireDefault$3(stripCommentsExports);
2422
-
2423
2381
  util.stripComments = _stripComments["default"];
2424
-
2425
2382
  function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
2426
2383
 
2427
2384
  (function (module, exports) {
2428
2385
 
2429
2386
  exports.__esModule = true;
2430
2387
  exports["default"] = void 0;
2431
-
2432
2388
  var _util = util;
2433
-
2434
2389
  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); } }
2435
-
2436
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
2437
-
2390
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2438
2391
  var cloneNode = function cloneNode(obj, parent) {
2439
2392
  if (typeof obj !== 'object' || obj === null) {
2440
2393
  return obj;
2441
2394
  }
2442
-
2443
2395
  var cloned = new obj.constructor();
2444
-
2445
2396
  for (var i in obj) {
2446
2397
  if (!obj.hasOwnProperty(i)) {
2447
2398
  continue;
2448
2399
  }
2449
-
2450
2400
  var value = obj[i];
2451
2401
  var type = typeof value;
2452
-
2453
2402
  if (i === 'parent' && type === 'object') {
2454
2403
  if (parent) {
2455
2404
  cloned[i] = parent;
@@ -2462,66 +2411,52 @@ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : {
2462
2411
  cloned[i] = cloneNode(value, cloned);
2463
2412
  }
2464
2413
  }
2465
-
2466
2414
  return cloned;
2467
2415
  };
2468
-
2469
2416
  var Node = /*#__PURE__*/function () {
2470
2417
  function Node(opts) {
2471
2418
  if (opts === void 0) {
2472
2419
  opts = {};
2473
2420
  }
2474
-
2475
2421
  Object.assign(this, opts);
2476
2422
  this.spaces = this.spaces || {};
2477
2423
  this.spaces.before = this.spaces.before || '';
2478
2424
  this.spaces.after = this.spaces.after || '';
2479
2425
  }
2480
-
2481
2426
  var _proto = Node.prototype;
2482
-
2483
2427
  _proto.remove = function remove() {
2484
2428
  if (this.parent) {
2485
2429
  this.parent.removeChild(this);
2486
2430
  }
2487
-
2488
2431
  this.parent = undefined;
2489
2432
  return this;
2490
2433
  };
2491
-
2492
2434
  _proto.replaceWith = function replaceWith() {
2493
2435
  if (this.parent) {
2494
2436
  for (var index in arguments) {
2495
2437
  this.parent.insertBefore(this, arguments[index]);
2496
2438
  }
2497
-
2498
2439
  this.remove();
2499
2440
  }
2500
-
2501
2441
  return this;
2502
2442
  };
2503
-
2504
2443
  _proto.next = function next() {
2505
2444
  return this.parent.at(this.parent.index(this) + 1);
2506
2445
  };
2507
-
2508
2446
  _proto.prev = function prev() {
2509
2447
  return this.parent.at(this.parent.index(this) - 1);
2510
2448
  };
2511
-
2512
2449
  _proto.clone = function clone(overrides) {
2513
2450
  if (overrides === void 0) {
2514
2451
  overrides = {};
2515
2452
  }
2516
-
2517
2453
  var cloned = cloneNode(this);
2518
-
2519
2454
  for (var name in overrides) {
2520
2455
  cloned[name] = overrides[name];
2521
2456
  }
2522
-
2523
2457
  return cloned;
2524
2458
  }
2459
+
2525
2460
  /**
2526
2461
  * Some non-standard syntax doesn't follow normal escaping rules for css.
2527
2462
  * This allows non standard syntax to be appended to an existing property
@@ -2530,24 +2465,21 @@ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : {
2530
2465
  * @param {string} name the property to set
2531
2466
  * @param {any} value the unescaped value of the property
2532
2467
  * @param {string} valueEscaped optional. the escaped value of the property.
2533
- */
2534
- ;
2535
-
2468
+ */;
2536
2469
  _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
2537
2470
  if (!this.raws) {
2538
2471
  this.raws = {};
2539
2472
  }
2540
-
2541
2473
  var originalValue = this[name];
2542
2474
  var originalEscaped = this.raws[name];
2543
2475
  this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first.
2544
-
2545
2476
  if (originalEscaped || valueEscaped !== value) {
2546
2477
  this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
2547
2478
  } else {
2548
2479
  delete this.raws[name]; // delete any escaped value that was created by the setter.
2549
2480
  }
2550
2481
  }
2482
+
2551
2483
  /**
2552
2484
  * Some non-standard syntax doesn't follow normal escaping rules for css.
2553
2485
  * This allows the escaped value to be specified directly, allowing illegal
@@ -2555,86 +2487,68 @@ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : {
2555
2487
  * @param {string} name the property to set
2556
2488
  * @param {any} value the unescaped value of the property
2557
2489
  * @param {string} valueEscaped the escaped value of the property.
2558
- */
2559
- ;
2560
-
2490
+ */;
2561
2491
  _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
2562
2492
  if (!this.raws) {
2563
2493
  this.raws = {};
2564
2494
  }
2565
-
2566
2495
  this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
2567
-
2568
2496
  this.raws[name] = valueEscaped;
2569
2497
  }
2498
+
2570
2499
  /**
2571
2500
  * When you want a value to passed through to CSS directly. This method
2572
2501
  * deletes the corresponding raw value causing the stringifier to fallback
2573
2502
  * to the unescaped value.
2574
2503
  * @param {string} name the property to set.
2575
2504
  * @param {any} value The value that is both escaped and unescaped.
2576
- */
2577
- ;
2578
-
2505
+ */;
2579
2506
  _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
2580
2507
  this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
2581
-
2582
2508
  if (this.raws) {
2583
2509
  delete this.raws[name];
2584
2510
  }
2585
2511
  }
2512
+
2586
2513
  /**
2587
2514
  *
2588
2515
  * @param {number} line The number (starting with 1)
2589
2516
  * @param {number} column The column number (starting with 1)
2590
- */
2591
- ;
2592
-
2517
+ */;
2593
2518
  _proto.isAtPosition = function isAtPosition(line, column) {
2594
2519
  if (this.source && this.source.start && this.source.end) {
2595
2520
  if (this.source.start.line > line) {
2596
2521
  return false;
2597
2522
  }
2598
-
2599
2523
  if (this.source.end.line < line) {
2600
2524
  return false;
2601
2525
  }
2602
-
2603
2526
  if (this.source.start.line === line && this.source.start.column > column) {
2604
2527
  return false;
2605
2528
  }
2606
-
2607
2529
  if (this.source.end.line === line && this.source.end.column < column) {
2608
2530
  return false;
2609
2531
  }
2610
-
2611
2532
  return true;
2612
2533
  }
2613
-
2614
2534
  return undefined;
2615
2535
  };
2616
-
2617
2536
  _proto.stringifyProperty = function stringifyProperty(name) {
2618
2537
  return this.raws && this.raws[name] || this[name];
2619
2538
  };
2620
-
2621
2539
  _proto.valueToString = function valueToString() {
2622
2540
  return String(this.stringifyProperty("value"));
2623
2541
  };
2624
-
2625
2542
  _proto.toString = function toString() {
2626
2543
  return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join('');
2627
2544
  };
2628
-
2629
2545
  _createClass(Node, [{
2630
2546
  key: "rawSpaceBefore",
2631
2547
  get: function get() {
2632
2548
  var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
2633
-
2634
2549
  if (rawSpace === undefined) {
2635
2550
  rawSpace = this.spaces && this.spaces.before;
2636
2551
  }
2637
-
2638
2552
  return rawSpace || "";
2639
2553
  },
2640
2554
  set: function set(raw) {
@@ -2645,11 +2559,9 @@ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : {
2645
2559
  key: "rawSpaceAfter",
2646
2560
  get: function get() {
2647
2561
  var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
2648
-
2649
2562
  if (rawSpace === undefined) {
2650
2563
  rawSpace = this.spaces.after;
2651
2564
  }
2652
-
2653
2565
  return rawSpace || "";
2654
2566
  },
2655
2567
  set: function set(raw) {
@@ -2657,10 +2569,8 @@ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : {
2657
2569
  this.raws.spaces.after = raw;
2658
2570
  }
2659
2571
  }]);
2660
-
2661
2572
  return Node;
2662
2573
  }();
2663
-
2664
2574
  exports["default"] = Node;
2665
2575
  module.exports = exports.default;
2666
2576
  } (node$1, node$1.exports));
@@ -2670,7 +2580,7 @@ var nodeExports = node$1.exports;
2670
2580
  var types = {};
2671
2581
 
2672
2582
  types.__esModule = true;
2673
- types.UNIVERSAL = types.ATTRIBUTE = types.CLASS = types.COMBINATOR = types.COMMENT = types.ID = types.NESTING = types.PSEUDO = types.ROOT = types.SELECTOR = types.STRING = types.TAG = void 0;
2583
+ types.UNIVERSAL = types.TAG = types.STRING = types.SELECTOR = types.ROOT = types.PSEUDO = types.NESTING = types.ID = types.COMMENT = types.COMBINATOR = types.CLASS = types.ATTRIBUTE = void 0;
2674
2584
  var TAG = 'tag';
2675
2585
  types.TAG = TAG;
2676
2586
  var STRING = 'string';
@@ -2700,145 +2610,105 @@ types.UNIVERSAL = UNIVERSAL;
2700
2610
 
2701
2611
  exports.__esModule = true;
2702
2612
  exports["default"] = void 0;
2703
-
2704
2613
  var _node = _interopRequireDefault(nodeExports);
2705
-
2706
2614
  var types$1 = _interopRequireWildcard(types);
2707
-
2708
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
2709
-
2710
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
2711
-
2615
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
2616
+ function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
2712
2617
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
2713
-
2714
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); }
2715
-
2618
+ function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2716
2619
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2717
-
2718
2620
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2719
-
2720
2621
  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); } }
2721
-
2722
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
2723
-
2622
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
2724
2623
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
2725
-
2726
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2727
-
2624
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
2728
2625
  var Container = /*#__PURE__*/function (_Node) {
2729
2626
  _inheritsLoose(Container, _Node);
2730
-
2731
2627
  function Container(opts) {
2732
2628
  var _this;
2733
-
2734
2629
  _this = _Node.call(this, opts) || this;
2735
-
2736
2630
  if (!_this.nodes) {
2737
2631
  _this.nodes = [];
2738
2632
  }
2739
-
2740
2633
  return _this;
2741
2634
  }
2742
-
2743
2635
  var _proto = Container.prototype;
2744
-
2745
2636
  _proto.append = function append(selector) {
2746
2637
  selector.parent = this;
2747
2638
  this.nodes.push(selector);
2748
2639
  return this;
2749
2640
  };
2750
-
2751
2641
  _proto.prepend = function prepend(selector) {
2752
2642
  selector.parent = this;
2753
2643
  this.nodes.unshift(selector);
2754
2644
  return this;
2755
2645
  };
2756
-
2757
2646
  _proto.at = function at(index) {
2758
2647
  return this.nodes[index];
2759
2648
  };
2760
-
2761
2649
  _proto.index = function index(child) {
2762
2650
  if (typeof child === 'number') {
2763
2651
  return child;
2764
2652
  }
2765
-
2766
2653
  return this.nodes.indexOf(child);
2767
2654
  };
2768
-
2769
2655
  _proto.removeChild = function removeChild(child) {
2770
2656
  child = this.index(child);
2771
2657
  this.at(child).parent = undefined;
2772
2658
  this.nodes.splice(child, 1);
2773
2659
  var index;
2774
-
2775
2660
  for (var id in this.indexes) {
2776
2661
  index = this.indexes[id];
2777
-
2778
2662
  if (index >= child) {
2779
2663
  this.indexes[id] = index - 1;
2780
2664
  }
2781
2665
  }
2782
-
2783
2666
  return this;
2784
2667
  };
2785
-
2786
2668
  _proto.removeAll = function removeAll() {
2787
2669
  for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
2788
2670
  var node = _step.value;
2789
2671
  node.parent = undefined;
2790
2672
  }
2791
-
2792
2673
  this.nodes = [];
2793
2674
  return this;
2794
2675
  };
2795
-
2796
2676
  _proto.empty = function empty() {
2797
2677
  return this.removeAll();
2798
2678
  };
2799
-
2800
2679
  _proto.insertAfter = function insertAfter(oldNode, newNode) {
2801
2680
  newNode.parent = this;
2802
2681
  var oldIndex = this.index(oldNode);
2803
2682
  this.nodes.splice(oldIndex + 1, 0, newNode);
2804
2683
  newNode.parent = this;
2805
2684
  var index;
2806
-
2807
2685
  for (var id in this.indexes) {
2808
2686
  index = this.indexes[id];
2809
-
2810
2687
  if (oldIndex <= index) {
2811
2688
  this.indexes[id] = index + 1;
2812
2689
  }
2813
2690
  }
2814
-
2815
2691
  return this;
2816
2692
  };
2817
-
2818
2693
  _proto.insertBefore = function insertBefore(oldNode, newNode) {
2819
2694
  newNode.parent = this;
2820
2695
  var oldIndex = this.index(oldNode);
2821
2696
  this.nodes.splice(oldIndex, 0, newNode);
2822
2697
  newNode.parent = this;
2823
2698
  var index;
2824
-
2825
2699
  for (var id in this.indexes) {
2826
2700
  index = this.indexes[id];
2827
-
2828
2701
  if (index <= oldIndex) {
2829
2702
  this.indexes[id] = index + 1;
2830
2703
  }
2831
2704
  }
2832
-
2833
2705
  return this;
2834
2706
  };
2835
-
2836
2707
  _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
2837
2708
  var found = undefined;
2838
2709
  this.each(function (node) {
2839
2710
  if (node.atPosition) {
2840
2711
  var foundChild = node.atPosition(line, col);
2841
-
2842
2712
  if (foundChild) {
2843
2713
  found = foundChild;
2844
2714
  return false;
@@ -2850,6 +2720,7 @@ types.UNIVERSAL = UNIVERSAL;
2850
2720
  });
2851
2721
  return found;
2852
2722
  }
2723
+
2853
2724
  /**
2854
2725
  * Return the most specific node at the line and column number given.
2855
2726
  * The source location is based on the original parsed location, locations aren't
@@ -2862,9 +2733,7 @@ types.UNIVERSAL = UNIVERSAL;
2862
2733
  * If not found, returns undefined.
2863
2734
  * @param {number} line The line number of the node to find. (1-based index)
2864
2735
  * @param {number} col The column number of the node to find. (1-based index)
2865
- */
2866
- ;
2867
-
2736
+ */;
2868
2737
  _proto.atPosition = function atPosition(line, col) {
2869
2738
  if (this.isAtPosition(line, col)) {
2870
2739
  return this._findChildAtPosition(line, col) || this;
@@ -2872,7 +2741,6 @@ types.UNIVERSAL = UNIVERSAL;
2872
2741
  return undefined;
2873
2742
  }
2874
2743
  };
2875
-
2876
2744
  _proto._inferEndPosition = function _inferEndPosition() {
2877
2745
  if (this.last && this.last.source && this.last.source.end) {
2878
2746
  this.source = this.source || {};
@@ -2880,195 +2748,152 @@ types.UNIVERSAL = UNIVERSAL;
2880
2748
  Object.assign(this.source.end, this.last.source.end);
2881
2749
  }
2882
2750
  };
2883
-
2884
2751
  _proto.each = function each(callback) {
2885
2752
  if (!this.lastEach) {
2886
2753
  this.lastEach = 0;
2887
2754
  }
2888
-
2889
2755
  if (!this.indexes) {
2890
2756
  this.indexes = {};
2891
2757
  }
2892
-
2893
2758
  this.lastEach++;
2894
2759
  var id = this.lastEach;
2895
2760
  this.indexes[id] = 0;
2896
-
2897
2761
  if (!this.length) {
2898
2762
  return undefined;
2899
2763
  }
2900
-
2901
2764
  var index, result;
2902
-
2903
2765
  while (this.indexes[id] < this.length) {
2904
2766
  index = this.indexes[id];
2905
2767
  result = callback(this.at(index), index);
2906
-
2907
2768
  if (result === false) {
2908
2769
  break;
2909
2770
  }
2910
-
2911
2771
  this.indexes[id] += 1;
2912
2772
  }
2913
-
2914
2773
  delete this.indexes[id];
2915
-
2916
2774
  if (result === false) {
2917
2775
  return false;
2918
2776
  }
2919
2777
  };
2920
-
2921
2778
  _proto.walk = function walk(callback) {
2922
2779
  return this.each(function (node, i) {
2923
2780
  var result = callback(node, i);
2924
-
2925
2781
  if (result !== false && node.length) {
2926
2782
  result = node.walk(callback);
2927
2783
  }
2928
-
2929
2784
  if (result === false) {
2930
2785
  return false;
2931
2786
  }
2932
2787
  });
2933
2788
  };
2934
-
2935
2789
  _proto.walkAttributes = function walkAttributes(callback) {
2936
2790
  var _this2 = this;
2937
-
2938
2791
  return this.walk(function (selector) {
2939
2792
  if (selector.type === types$1.ATTRIBUTE) {
2940
2793
  return callback.call(_this2, selector);
2941
2794
  }
2942
2795
  });
2943
2796
  };
2944
-
2945
2797
  _proto.walkClasses = function walkClasses(callback) {
2946
2798
  var _this3 = this;
2947
-
2948
2799
  return this.walk(function (selector) {
2949
2800
  if (selector.type === types$1.CLASS) {
2950
2801
  return callback.call(_this3, selector);
2951
2802
  }
2952
2803
  });
2953
2804
  };
2954
-
2955
2805
  _proto.walkCombinators = function walkCombinators(callback) {
2956
2806
  var _this4 = this;
2957
-
2958
2807
  return this.walk(function (selector) {
2959
2808
  if (selector.type === types$1.COMBINATOR) {
2960
2809
  return callback.call(_this4, selector);
2961
2810
  }
2962
2811
  });
2963
2812
  };
2964
-
2965
2813
  _proto.walkComments = function walkComments(callback) {
2966
2814
  var _this5 = this;
2967
-
2968
2815
  return this.walk(function (selector) {
2969
2816
  if (selector.type === types$1.COMMENT) {
2970
2817
  return callback.call(_this5, selector);
2971
2818
  }
2972
2819
  });
2973
2820
  };
2974
-
2975
2821
  _proto.walkIds = function walkIds(callback) {
2976
2822
  var _this6 = this;
2977
-
2978
2823
  return this.walk(function (selector) {
2979
2824
  if (selector.type === types$1.ID) {
2980
2825
  return callback.call(_this6, selector);
2981
2826
  }
2982
2827
  });
2983
2828
  };
2984
-
2985
2829
  _proto.walkNesting = function walkNesting(callback) {
2986
2830
  var _this7 = this;
2987
-
2988
2831
  return this.walk(function (selector) {
2989
2832
  if (selector.type === types$1.NESTING) {
2990
2833
  return callback.call(_this7, selector);
2991
2834
  }
2992
2835
  });
2993
2836
  };
2994
-
2995
2837
  _proto.walkPseudos = function walkPseudos(callback) {
2996
2838
  var _this8 = this;
2997
-
2998
2839
  return this.walk(function (selector) {
2999
2840
  if (selector.type === types$1.PSEUDO) {
3000
2841
  return callback.call(_this8, selector);
3001
2842
  }
3002
2843
  });
3003
2844
  };
3004
-
3005
2845
  _proto.walkTags = function walkTags(callback) {
3006
2846
  var _this9 = this;
3007
-
3008
2847
  return this.walk(function (selector) {
3009
2848
  if (selector.type === types$1.TAG) {
3010
2849
  return callback.call(_this9, selector);
3011
2850
  }
3012
2851
  });
3013
2852
  };
3014
-
3015
2853
  _proto.walkUniversals = function walkUniversals(callback) {
3016
2854
  var _this10 = this;
3017
-
3018
2855
  return this.walk(function (selector) {
3019
2856
  if (selector.type === types$1.UNIVERSAL) {
3020
2857
  return callback.call(_this10, selector);
3021
2858
  }
3022
2859
  });
3023
2860
  };
3024
-
3025
2861
  _proto.split = function split(callback) {
3026
2862
  var _this11 = this;
3027
-
3028
2863
  var current = [];
3029
2864
  return this.reduce(function (memo, node, index) {
3030
2865
  var split = callback.call(_this11, node);
3031
2866
  current.push(node);
3032
-
3033
2867
  if (split) {
3034
2868
  memo.push(current);
3035
2869
  current = [];
3036
2870
  } else if (index === _this11.length - 1) {
3037
2871
  memo.push(current);
3038
2872
  }
3039
-
3040
2873
  return memo;
3041
2874
  }, []);
3042
2875
  };
3043
-
3044
2876
  _proto.map = function map(callback) {
3045
2877
  return this.nodes.map(callback);
3046
2878
  };
3047
-
3048
2879
  _proto.reduce = function reduce(callback, memo) {
3049
2880
  return this.nodes.reduce(callback, memo);
3050
2881
  };
3051
-
3052
2882
  _proto.every = function every(callback) {
3053
2883
  return this.nodes.every(callback);
3054
2884
  };
3055
-
3056
2885
  _proto.some = function some(callback) {
3057
2886
  return this.nodes.some(callback);
3058
2887
  };
3059
-
3060
2888
  _proto.filter = function filter(callback) {
3061
2889
  return this.nodes.filter(callback);
3062
2890
  };
3063
-
3064
2891
  _proto.sort = function sort(callback) {
3065
2892
  return this.nodes.sort(callback);
3066
2893
  };
3067
-
3068
2894
  _proto.toString = function toString() {
3069
2895
  return this.map(String).join('');
3070
2896
  };
3071
-
3072
2897
  _createClass(Container, [{
3073
2898
  key: "first",
3074
2899
  get: function get() {
@@ -3085,10 +2910,8 @@ types.UNIVERSAL = UNIVERSAL;
3085
2910
  return this.nodes.length;
3086
2911
  }
3087
2912
  }]);
3088
-
3089
2913
  return Container;
3090
2914
  }(_node["default"]);
3091
-
3092
2915
  exports["default"] = Container;
3093
2916
  module.exports = exports.default;
3094
2917
  } (container, container.exports));
@@ -3099,34 +2922,22 @@ var containerExports = container.exports;
3099
2922
 
3100
2923
  exports.__esModule = true;
3101
2924
  exports["default"] = void 0;
3102
-
3103
2925
  var _container = _interopRequireDefault(containerExports);
3104
-
3105
2926
  var _types = types;
3106
-
3107
2927
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3108
-
3109
2928
  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); } }
3110
-
3111
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
3112
-
2929
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3113
2930
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3114
-
3115
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3116
-
2931
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3117
2932
  var Root = /*#__PURE__*/function (_Container) {
3118
2933
  _inheritsLoose(Root, _Container);
3119
-
3120
2934
  function Root(opts) {
3121
2935
  var _this;
3122
-
3123
2936
  _this = _Container.call(this, opts) || this;
3124
2937
  _this.type = _types.ROOT;
3125
2938
  return _this;
3126
2939
  }
3127
-
3128
2940
  var _proto = Root.prototype;
3129
-
3130
2941
  _proto.toString = function toString() {
3131
2942
  var str = this.reduce(function (memo, selector) {
3132
2943
  memo.push(String(selector));
@@ -3134,7 +2945,6 @@ var containerExports = container.exports;
3134
2945
  }, []).join(',');
3135
2946
  return this.trailingComma ? str + ',' : str;
3136
2947
  };
3137
-
3138
2948
  _proto.error = function error(message, options) {
3139
2949
  if (this._error) {
3140
2950
  return this._error(message, options);
@@ -3142,17 +2952,14 @@ var containerExports = container.exports;
3142
2952
  return new Error(message);
3143
2953
  }
3144
2954
  };
3145
-
3146
2955
  _createClass(Root, [{
3147
2956
  key: "errorGenerator",
3148
2957
  set: function set(handler) {
3149
2958
  this._error = handler;
3150
2959
  }
3151
2960
  }]);
3152
-
3153
2961
  return Root;
3154
2962
  }(_container["default"]);
3155
-
3156
2963
  exports["default"] = Root;
3157
2964
  module.exports = exports.default;
3158
2965
  } (root$1, root$1.exports));
@@ -3165,31 +2972,21 @@ var selector$1 = {exports: {}};
3165
2972
 
3166
2973
  exports.__esModule = true;
3167
2974
  exports["default"] = void 0;
3168
-
3169
2975
  var _container = _interopRequireDefault(containerExports);
3170
-
3171
2976
  var _types = types;
3172
-
3173
2977
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3174
-
3175
2978
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3176
-
3177
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3178
-
2979
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3179
2980
  var Selector = /*#__PURE__*/function (_Container) {
3180
2981
  _inheritsLoose(Selector, _Container);
3181
-
3182
2982
  function Selector(opts) {
3183
2983
  var _this;
3184
-
3185
2984
  _this = _Container.call(this, opts) || this;
3186
2985
  _this.type = _types.SELECTOR;
3187
2986
  return _this;
3188
2987
  }
3189
-
3190
2988
  return Selector;
3191
2989
  }(_container["default"]);
3192
-
3193
2990
  exports["default"] = Selector;
3194
2991
  module.exports = exports.default;
3195
2992
  } (selector$1, selector$1.exports));
@@ -3311,43 +3108,28 @@ var cssesc_1 = cssesc;
3311
3108
 
3312
3109
  exports.__esModule = true;
3313
3110
  exports["default"] = void 0;
3314
-
3315
3111
  var _cssesc = _interopRequireDefault(cssesc_1);
3316
-
3317
3112
  var _util = util;
3318
-
3319
3113
  var _node = _interopRequireDefault(nodeExports);
3320
-
3321
3114
  var _types = types;
3322
-
3323
3115
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3324
-
3325
3116
  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); } }
3326
-
3327
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
3328
-
3117
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3329
3118
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3330
-
3331
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3332
-
3119
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3333
3120
  var ClassName = /*#__PURE__*/function (_Node) {
3334
3121
  _inheritsLoose(ClassName, _Node);
3335
-
3336
3122
  function ClassName(opts) {
3337
3123
  var _this;
3338
-
3339
3124
  _this = _Node.call(this, opts) || this;
3340
3125
  _this.type = _types.CLASS;
3341
3126
  _this._constructed = true;
3342
3127
  return _this;
3343
3128
  }
3344
-
3345
3129
  var _proto = ClassName.prototype;
3346
-
3347
3130
  _proto.valueToString = function valueToString() {
3348
3131
  return '.' + _Node.prototype.valueToString.call(this);
3349
3132
  };
3350
-
3351
3133
  _createClass(ClassName, [{
3352
3134
  key: "value",
3353
3135
  get: function get() {
@@ -3358,7 +3140,6 @@ var cssesc_1 = cssesc;
3358
3140
  var escaped = (0, _cssesc["default"])(v, {
3359
3141
  isIdentifier: true
3360
3142
  });
3361
-
3362
3143
  if (escaped !== v) {
3363
3144
  (0, _util.ensureObject)(this, "raws");
3364
3145
  this.raws.value = escaped;
@@ -3366,14 +3147,11 @@ var cssesc_1 = cssesc;
3366
3147
  delete this.raws.value;
3367
3148
  }
3368
3149
  }
3369
-
3370
3150
  this._value = v;
3371
3151
  }
3372
3152
  }]);
3373
-
3374
3153
  return ClassName;
3375
3154
  }(_node["default"]);
3376
-
3377
3155
  exports["default"] = ClassName;
3378
3156
  module.exports = exports.default;
3379
3157
  } (className$1, className$1.exports));
@@ -3386,31 +3164,21 @@ var comment$2 = {exports: {}};
3386
3164
 
3387
3165
  exports.__esModule = true;
3388
3166
  exports["default"] = void 0;
3389
-
3390
3167
  var _node = _interopRequireDefault(nodeExports);
3391
-
3392
3168
  var _types = types;
3393
-
3394
3169
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3395
-
3396
3170
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3397
-
3398
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3399
-
3171
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3400
3172
  var Comment = /*#__PURE__*/function (_Node) {
3401
3173
  _inheritsLoose(Comment, _Node);
3402
-
3403
3174
  function Comment(opts) {
3404
3175
  var _this;
3405
-
3406
3176
  _this = _Node.call(this, opts) || this;
3407
3177
  _this.type = _types.COMMENT;
3408
3178
  return _this;
3409
3179
  }
3410
-
3411
3180
  return Comment;
3412
3181
  }(_node["default"]);
3413
-
3414
3182
  exports["default"] = Comment;
3415
3183
  module.exports = exports.default;
3416
3184
  } (comment$2, comment$2.exports));
@@ -3423,37 +3191,25 @@ var id$1 = {exports: {}};
3423
3191
 
3424
3192
  exports.__esModule = true;
3425
3193
  exports["default"] = void 0;
3426
-
3427
3194
  var _node = _interopRequireDefault(nodeExports);
3428
-
3429
3195
  var _types = types;
3430
-
3431
3196
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3432
-
3433
3197
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3434
-
3435
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3436
-
3198
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3437
3199
  var ID = /*#__PURE__*/function (_Node) {
3438
3200
  _inheritsLoose(ID, _Node);
3439
-
3440
3201
  function ID(opts) {
3441
3202
  var _this;
3442
-
3443
3203
  _this = _Node.call(this, opts) || this;
3444
3204
  _this.type = _types.ID;
3445
3205
  return _this;
3446
3206
  }
3447
-
3448
3207
  var _proto = ID.prototype;
3449
-
3450
3208
  _proto.valueToString = function valueToString() {
3451
3209
  return '#' + _Node.prototype.valueToString.call(this);
3452
3210
  };
3453
-
3454
3211
  return ID;
3455
3212
  }(_node["default"]);
3456
-
3457
3213
  exports["default"] = ID;
3458
3214
  module.exports = exports.default;
3459
3215
  } (id$1, id$1.exports));
@@ -3468,32 +3224,20 @@ var namespace = {exports: {}};
3468
3224
 
3469
3225
  exports.__esModule = true;
3470
3226
  exports["default"] = void 0;
3471
-
3472
3227
  var _cssesc = _interopRequireDefault(cssesc_1);
3473
-
3474
3228
  var _util = util;
3475
-
3476
3229
  var _node = _interopRequireDefault(nodeExports);
3477
-
3478
3230
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3479
-
3480
3231
  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); } }
3481
-
3482
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
3483
-
3232
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3484
3233
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3485
-
3486
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3487
-
3234
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3488
3235
  var Namespace = /*#__PURE__*/function (_Node) {
3489
3236
  _inheritsLoose(Namespace, _Node);
3490
-
3491
3237
  function Namespace() {
3492
3238
  return _Node.apply(this, arguments) || this;
3493
3239
  }
3494
-
3495
3240
  var _proto = Namespace.prototype;
3496
-
3497
3241
  _proto.qualifiedName = function qualifiedName(value) {
3498
3242
  if (this.namespace) {
3499
3243
  return this.namespaceString + "|" + value;
@@ -3501,11 +3245,9 @@ var namespace = {exports: {}};
3501
3245
  return value;
3502
3246
  }
3503
3247
  };
3504
-
3505
3248
  _proto.valueToString = function valueToString() {
3506
3249
  return this.qualifiedName(_Node.prototype.valueToString.call(this));
3507
3250
  };
3508
-
3509
3251
  _createClass(Namespace, [{
3510
3252
  key: "namespace",
3511
3253
  get: function get() {
@@ -3514,19 +3256,15 @@ var namespace = {exports: {}};
3514
3256
  set: function set(namespace) {
3515
3257
  if (namespace === true || namespace === "*" || namespace === "&") {
3516
3258
  this._namespace = namespace;
3517
-
3518
3259
  if (this.raws) {
3519
3260
  delete this.raws.namespace;
3520
3261
  }
3521
-
3522
3262
  return;
3523
3263
  }
3524
-
3525
3264
  var escaped = (0, _cssesc["default"])(namespace, {
3526
3265
  isIdentifier: true
3527
3266
  });
3528
3267
  this._namespace = namespace;
3529
-
3530
3268
  if (escaped !== namespace) {
3531
3269
  (0, _util.ensureObject)(this, "raws");
3532
3270
  this.raws.namespace = escaped;
@@ -3547,7 +3285,6 @@ var namespace = {exports: {}};
3547
3285
  get: function get() {
3548
3286
  if (this.namespace) {
3549
3287
  var ns = this.stringifyProperty("namespace");
3550
-
3551
3288
  if (ns === true) {
3552
3289
  return '';
3553
3290
  } else {
@@ -3558,10 +3295,8 @@ var namespace = {exports: {}};
3558
3295
  }
3559
3296
  }
3560
3297
  }]);
3561
-
3562
3298
  return Namespace;
3563
3299
  }(_node["default"]);
3564
-
3565
3300
  exports["default"] = Namespace;
3566
3301
  module.exports = exports.default;
3567
3302
  } (namespace, namespace.exports));
@@ -3572,31 +3307,21 @@ var namespaceExports = namespace.exports;
3572
3307
 
3573
3308
  exports.__esModule = true;
3574
3309
  exports["default"] = void 0;
3575
-
3576
3310
  var _namespace = _interopRequireDefault(namespaceExports);
3577
-
3578
3311
  var _types = types;
3579
-
3580
3312
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3581
-
3582
3313
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3583
-
3584
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3585
-
3314
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3586
3315
  var Tag = /*#__PURE__*/function (_Namespace) {
3587
3316
  _inheritsLoose(Tag, _Namespace);
3588
-
3589
3317
  function Tag(opts) {
3590
3318
  var _this;
3591
-
3592
3319
  _this = _Namespace.call(this, opts) || this;
3593
3320
  _this.type = _types.TAG;
3594
3321
  return _this;
3595
3322
  }
3596
-
3597
3323
  return Tag;
3598
3324
  }(_namespace["default"]);
3599
-
3600
3325
  exports["default"] = Tag;
3601
3326
  module.exports = exports.default;
3602
3327
  } (tag$1, tag$1.exports));
@@ -3609,31 +3334,21 @@ var string$1 = {exports: {}};
3609
3334
 
3610
3335
  exports.__esModule = true;
3611
3336
  exports["default"] = void 0;
3612
-
3613
3337
  var _node = _interopRequireDefault(nodeExports);
3614
-
3615
3338
  var _types = types;
3616
-
3617
3339
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3618
-
3619
3340
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3620
-
3621
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3622
-
3341
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3623
3342
  var String = /*#__PURE__*/function (_Node) {
3624
3343
  _inheritsLoose(String, _Node);
3625
-
3626
3344
  function String(opts) {
3627
3345
  var _this;
3628
-
3629
3346
  _this = _Node.call(this, opts) || this;
3630
3347
  _this.type = _types.STRING;
3631
3348
  return _this;
3632
3349
  }
3633
-
3634
3350
  return String;
3635
3351
  }(_node["default"]);
3636
-
3637
3352
  exports["default"] = String;
3638
3353
  module.exports = exports.default;
3639
3354
  } (string$1, string$1.exports));
@@ -3646,38 +3361,26 @@ var pseudo$1 = {exports: {}};
3646
3361
 
3647
3362
  exports.__esModule = true;
3648
3363
  exports["default"] = void 0;
3649
-
3650
3364
  var _container = _interopRequireDefault(containerExports);
3651
-
3652
3365
  var _types = types;
3653
-
3654
3366
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3655
-
3656
3367
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3657
-
3658
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3659
-
3368
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3660
3369
  var Pseudo = /*#__PURE__*/function (_Container) {
3661
3370
  _inheritsLoose(Pseudo, _Container);
3662
-
3663
3371
  function Pseudo(opts) {
3664
3372
  var _this;
3665
-
3666
3373
  _this = _Container.call(this, opts) || this;
3667
3374
  _this.type = _types.PSEUDO;
3668
3375
  return _this;
3669
3376
  }
3670
-
3671
3377
  var _proto = Pseudo.prototype;
3672
-
3673
3378
  _proto.toString = function toString() {
3674
3379
  var params = this.length ? '(' + this.map(String).join(',') + ')' : '';
3675
3380
  return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join('');
3676
3381
  };
3677
-
3678
3382
  return Pseudo;
3679
3383
  }(_container["default"]);
3680
-
3681
3384
  exports["default"] = Pseudo;
3682
3385
  module.exports = exports.default;
3683
3386
  } (pseudo$1, pseudo$1.exports));
@@ -3695,98 +3398,70 @@ var node = require$$0$2.deprecate;
3695
3398
  (function (exports) {
3696
3399
 
3697
3400
  exports.__esModule = true;
3698
- exports.unescapeValue = unescapeValue;
3699
3401
  exports["default"] = void 0;
3700
-
3402
+ exports.unescapeValue = unescapeValue;
3701
3403
  var _cssesc = _interopRequireDefault(cssesc_1);
3702
-
3703
3404
  var _unesc = _interopRequireDefault(unescExports);
3704
-
3705
3405
  var _namespace = _interopRequireDefault(namespaceExports);
3706
-
3707
3406
  var _types = types;
3708
-
3709
3407
  var _CSSESC_QUOTE_OPTIONS;
3710
-
3711
3408
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3712
-
3713
3409
  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); } }
3714
-
3715
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
3716
-
3410
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
3717
3411
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
3718
-
3719
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3720
-
3412
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3721
3413
  var deprecate = node;
3722
-
3723
3414
  var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
3724
3415
  var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead.");
3725
3416
  var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
3726
3417
  var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
3727
-
3728
3418
  function unescapeValue(value) {
3729
3419
  var deprecatedUsage = false;
3730
3420
  var quoteMark = null;
3731
3421
  var unescaped = value;
3732
3422
  var m = unescaped.match(WRAPPED_IN_QUOTES);
3733
-
3734
3423
  if (m) {
3735
3424
  quoteMark = m[1];
3736
3425
  unescaped = m[2];
3737
3426
  }
3738
-
3739
3427
  unescaped = (0, _unesc["default"])(unescaped);
3740
-
3741
3428
  if (unescaped !== value) {
3742
3429
  deprecatedUsage = true;
3743
3430
  }
3744
-
3745
3431
  return {
3746
3432
  deprecatedUsage: deprecatedUsage,
3747
3433
  unescaped: unescaped,
3748
3434
  quoteMark: quoteMark
3749
3435
  };
3750
3436
  }
3751
-
3752
3437
  function handleDeprecatedContructorOpts(opts) {
3753
3438
  if (opts.quoteMark !== undefined) {
3754
3439
  return opts;
3755
3440
  }
3756
-
3757
3441
  if (opts.value === undefined) {
3758
3442
  return opts;
3759
3443
  }
3760
-
3761
3444
  warnOfDeprecatedConstructor();
3762
-
3763
3445
  var _unescapeValue = unescapeValue(opts.value),
3764
- quoteMark = _unescapeValue.quoteMark,
3765
- unescaped = _unescapeValue.unescaped;
3766
-
3446
+ quoteMark = _unescapeValue.quoteMark,
3447
+ unescaped = _unescapeValue.unescaped;
3767
3448
  if (!opts.raws) {
3768
3449
  opts.raws = {};
3769
3450
  }
3770
-
3771
3451
  if (opts.raws.value === undefined) {
3772
3452
  opts.raws.value = opts.value;
3773
3453
  }
3774
-
3775
3454
  opts.value = unescaped;
3776
3455
  opts.quoteMark = quoteMark;
3777
3456
  return opts;
3778
3457
  }
3779
-
3780
3458
  var Attribute = /*#__PURE__*/function (_Namespace) {
3781
3459
  _inheritsLoose(Attribute, _Namespace);
3782
-
3783
3460
  function Attribute(opts) {
3784
3461
  var _this;
3785
-
3786
3462
  if (opts === void 0) {
3787
3463
  opts = {};
3788
3464
  }
3789
-
3790
3465
  _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
3791
3466
  _this.type = _types.ATTRIBUTE;
3792
3467
  _this.raws = _this.raws || {};
@@ -3801,6 +3476,7 @@ var node = require$$0$2.deprecate;
3801
3476
  _this._constructed = true;
3802
3477
  return _this;
3803
3478
  }
3479
+
3804
3480
  /**
3805
3481
  * Returns the Attribute's value quoted such that it would be legal to use
3806
3482
  * in the value of a css file. The original value's quotation setting
@@ -3822,42 +3498,34 @@ var node = require$$0$2.deprecate;
3822
3498
  * and the other options specified here. See the `smartQuoteMark()`
3823
3499
  * method.
3824
3500
  **/
3825
-
3826
-
3827
3501
  var _proto = Attribute.prototype;
3828
-
3829
3502
  _proto.getQuotedValue = function getQuotedValue(options) {
3830
3503
  if (options === void 0) {
3831
3504
  options = {};
3832
3505
  }
3833
-
3834
3506
  var quoteMark = this._determineQuoteMark(options);
3835
-
3836
3507
  var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
3837
3508
  var escaped = (0, _cssesc["default"])(this._value, cssescopts);
3838
3509
  return escaped;
3839
3510
  };
3840
-
3841
3511
  _proto._determineQuoteMark = function _determineQuoteMark(options) {
3842
3512
  return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
3843
3513
  }
3514
+
3844
3515
  /**
3845
3516
  * Set the unescaped value with the specified quotation options. The value
3846
3517
  * provided must not include any wrapping quote marks -- those quotes will
3847
3518
  * be interpreted as part of the value and escaped accordingly.
3848
- */
3849
- ;
3850
-
3519
+ */;
3851
3520
  _proto.setValue = function setValue(value, options) {
3852
3521
  if (options === void 0) {
3853
3522
  options = {};
3854
3523
  }
3855
-
3856
3524
  this._value = value;
3857
3525
  this._quoteMark = this._determineQuoteMark(options);
3858
-
3859
3526
  this._syncRawValue();
3860
3527
  }
3528
+
3861
3529
  /**
3862
3530
  * Intelligently select a quoteMark value based on the value's contents. If
3863
3531
  * the value is a legal CSS ident, it will not be quoted. Otherwise a quote
@@ -3869,35 +3537,28 @@ var node = require$$0$2.deprecate;
3869
3537
  *
3870
3538
  * @param options This takes the quoteMark and preferCurrentQuoteMark options
3871
3539
  * from the quoteValue method.
3872
- */
3873
- ;
3874
-
3540
+ */;
3875
3541
  _proto.smartQuoteMark = function smartQuoteMark(options) {
3876
3542
  var v = this.value;
3877
3543
  var numSingleQuotes = v.replace(/[^']/g, '').length;
3878
3544
  var numDoubleQuotes = v.replace(/[^"]/g, '').length;
3879
-
3880
3545
  if (numSingleQuotes + numDoubleQuotes === 0) {
3881
3546
  var escaped = (0, _cssesc["default"])(v, {
3882
3547
  isIdentifier: true
3883
3548
  });
3884
-
3885
3549
  if (escaped === v) {
3886
3550
  return Attribute.NO_QUOTE;
3887
3551
  } else {
3888
3552
  var pref = this.preferredQuoteMark(options);
3889
-
3890
3553
  if (pref === Attribute.NO_QUOTE) {
3891
3554
  // pick a quote mark that isn't none and see if it's smaller
3892
3555
  var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
3893
3556
  var opts = CSSESC_QUOTE_OPTIONS[quote];
3894
3557
  var quoteValue = (0, _cssesc["default"])(v, opts);
3895
-
3896
3558
  if (quoteValue.length < escaped.length) {
3897
3559
  return quote;
3898
3560
  }
3899
3561
  }
3900
-
3901
3562
  return pref;
3902
3563
  }
3903
3564
  } else if (numDoubleQuotes === numSingleQuotes) {
@@ -3908,30 +3569,24 @@ var node = require$$0$2.deprecate;
3908
3569
  return Attribute.SINGLE_QUOTE;
3909
3570
  }
3910
3571
  }
3572
+
3911
3573
  /**
3912
3574
  * Selects the preferred quote mark based on the options and the current quote mark value.
3913
3575
  * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)`
3914
3576
  * instead.
3915
- */
3916
- ;
3917
-
3577
+ */;
3918
3578
  _proto.preferredQuoteMark = function preferredQuoteMark(options) {
3919
3579
  var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
3920
-
3921
3580
  if (quoteMark === undefined) {
3922
3581
  quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
3923
3582
  }
3924
-
3925
3583
  if (quoteMark === undefined) {
3926
3584
  quoteMark = Attribute.DOUBLE_QUOTE;
3927
3585
  }
3928
-
3929
3586
  return quoteMark;
3930
3587
  };
3931
-
3932
3588
  _proto._syncRawValue = function _syncRawValue() {
3933
3589
  var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
3934
-
3935
3590
  if (rawValue === this._value) {
3936
3591
  if (this.raws) {
3937
3592
  delete this.raws.value;
@@ -3940,13 +3595,11 @@ var node = require$$0$2.deprecate;
3940
3595
  this.raws.value = rawValue;
3941
3596
  }
3942
3597
  };
3943
-
3944
3598
  _proto._handleEscapes = function _handleEscapes(prop, value) {
3945
3599
  if (this._constructed) {
3946
3600
  var escaped = (0, _cssesc["default"])(value, {
3947
3601
  isIdentifier: true
3948
3602
  });
3949
-
3950
3603
  if (escaped !== value) {
3951
3604
  this.raws[prop] = escaped;
3952
3605
  } else {
@@ -3954,7 +3607,6 @@ var node = require$$0$2.deprecate;
3954
3607
  }
3955
3608
  }
3956
3609
  };
3957
-
3958
3610
  _proto._spacesFor = function _spacesFor(name) {
3959
3611
  var attrSpaces = {
3960
3612
  before: '',
@@ -3964,20 +3616,17 @@ var node = require$$0$2.deprecate;
3964
3616
  var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
3965
3617
  return Object.assign(attrSpaces, spaces, rawSpaces);
3966
3618
  };
3967
-
3968
3619
  _proto._stringFor = function _stringFor(name, spaceName, concat) {
3969
3620
  if (spaceName === void 0) {
3970
3621
  spaceName = name;
3971
3622
  }
3972
-
3973
3623
  if (concat === void 0) {
3974
3624
  concat = defaultAttrConcat;
3975
3625
  }
3976
-
3977
3626
  var attrSpaces = this._spacesFor(spaceName);
3978
-
3979
3627
  return concat(this.stringifyProperty(name), attrSpaces);
3980
3628
  }
3629
+
3981
3630
  /**
3982
3631
  * returns the offset of the attribute part specified relative to the
3983
3632
  * start of the node of the output string.
@@ -3991,78 +3640,53 @@ var node = require$$0$2.deprecate;
3991
3640
  * * "insensitive" - the case insensitivity flag;
3992
3641
  * @param part One of the possible values inside an attribute.
3993
3642
  * @returns -1 if the name is invalid or the value doesn't exist in this attribute.
3994
- */
3995
- ;
3996
-
3643
+ */;
3997
3644
  _proto.offsetOf = function offsetOf(name) {
3998
3645
  var count = 1;
3999
-
4000
3646
  var attributeSpaces = this._spacesFor("attribute");
4001
-
4002
3647
  count += attributeSpaces.before.length;
4003
-
4004
3648
  if (name === "namespace" || name === "ns") {
4005
3649
  return this.namespace ? count : -1;
4006
3650
  }
4007
-
4008
3651
  if (name === "attributeNS") {
4009
3652
  return count;
4010
3653
  }
4011
-
4012
3654
  count += this.namespaceString.length;
4013
-
4014
3655
  if (this.namespace) {
4015
3656
  count += 1;
4016
3657
  }
4017
-
4018
3658
  if (name === "attribute") {
4019
3659
  return count;
4020
3660
  }
4021
-
4022
3661
  count += this.stringifyProperty("attribute").length;
4023
3662
  count += attributeSpaces.after.length;
4024
-
4025
3663
  var operatorSpaces = this._spacesFor("operator");
4026
-
4027
3664
  count += operatorSpaces.before.length;
4028
3665
  var operator = this.stringifyProperty("operator");
4029
-
4030
3666
  if (name === "operator") {
4031
3667
  return operator ? count : -1;
4032
3668
  }
4033
-
4034
3669
  count += operator.length;
4035
3670
  count += operatorSpaces.after.length;
4036
-
4037
3671
  var valueSpaces = this._spacesFor("value");
4038
-
4039
3672
  count += valueSpaces.before.length;
4040
3673
  var value = this.stringifyProperty("value");
4041
-
4042
3674
  if (name === "value") {
4043
3675
  return value ? count : -1;
4044
3676
  }
4045
-
4046
3677
  count += value.length;
4047
3678
  count += valueSpaces.after.length;
4048
-
4049
3679
  var insensitiveSpaces = this._spacesFor("insensitive");
4050
-
4051
3680
  count += insensitiveSpaces.before.length;
4052
-
4053
3681
  if (name === "insensitive") {
4054
3682
  return this.insensitive ? count : -1;
4055
3683
  }
4056
-
4057
3684
  return -1;
4058
3685
  };
4059
-
4060
3686
  _proto.toString = function toString() {
4061
3687
  var _this2 = this;
4062
-
4063
3688
  var selector = [this.rawSpaceBefore, '['];
4064
3689
  selector.push(this._stringFor('qualifiedAttribute', 'attribute'));
4065
-
4066
3690
  if (this.operator && (this.value || this.value === '')) {
4067
3691
  selector.push(this._stringFor('operator'));
4068
3692
  selector.push(this._stringFor('value'));
@@ -4070,16 +3694,13 @@ var node = require$$0$2.deprecate;
4070
3694
  if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) {
4071
3695
  attrSpaces.before = " ";
4072
3696
  }
4073
-
4074
3697
  return defaultAttrConcat(attrValue, attrSpaces);
4075
3698
  }));
4076
3699
  }
4077
-
4078
3700
  selector.push(']');
4079
3701
  selector.push(this.rawSpaceAfter);
4080
3702
  return selector.join('');
4081
3703
  };
4082
-
4083
3704
  _createClass(Attribute, [{
4084
3705
  key: "quoted",
4085
3706
  get: function get() {
@@ -4089,35 +3710,33 @@ var node = require$$0$2.deprecate;
4089
3710
  set: function set(value) {
4090
3711
  warnOfDeprecatedQuotedAssignment();
4091
3712
  }
3713
+
4092
3714
  /**
4093
3715
  * returns a single (`'`) or double (`"`) quote character if the value is quoted.
4094
3716
  * returns `null` if the value is not quoted.
4095
3717
  * returns `undefined` if the quotation state is unknown (this can happen when
4096
3718
  * the attribute is constructed without specifying a quote mark.)
4097
3719
  */
4098
-
4099
3720
  }, {
4100
3721
  key: "quoteMark",
4101
3722
  get: function get() {
4102
3723
  return this._quoteMark;
4103
3724
  }
3725
+
4104
3726
  /**
4105
3727
  * Set the quote mark to be used by this attribute's value.
4106
3728
  * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
4107
3729
  * value is updated accordingly.
4108
3730
  *
4109
3731
  * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
4110
- */
4111
- ,
3732
+ */,
4112
3733
  set: function set(quoteMark) {
4113
3734
  if (!this._constructed) {
4114
3735
  this._quoteMark = quoteMark;
4115
3736
  return;
4116
3737
  }
4117
-
4118
3738
  if (this._quoteMark !== quoteMark) {
4119
3739
  this._quoteMark = quoteMark;
4120
-
4121
3740
  this._syncRawValue();
4122
3741
  }
4123
3742
  }
@@ -4152,21 +3771,17 @@ var node = require$$0$2.deprecate;
4152
3771
  function set(v) {
4153
3772
  if (this._constructed) {
4154
3773
  var _unescapeValue2 = unescapeValue(v),
4155
- deprecatedUsage = _unescapeValue2.deprecatedUsage,
4156
- unescaped = _unescapeValue2.unescaped,
4157
- quoteMark = _unescapeValue2.quoteMark;
4158
-
3774
+ deprecatedUsage = _unescapeValue2.deprecatedUsage,
3775
+ unescaped = _unescapeValue2.unescaped,
3776
+ quoteMark = _unescapeValue2.quoteMark;
4159
3777
  if (deprecatedUsage) {
4160
3778
  warnOfDeprecatedValueAssignment();
4161
3779
  }
4162
-
4163
3780
  if (unescaped === this._value && quoteMark === this._quoteMark) {
4164
3781
  return;
4165
3782
  }
4166
-
4167
3783
  this._value = unescaped;
4168
3784
  this._quoteMark = quoteMark;
4169
-
4170
3785
  this._syncRawValue();
4171
3786
  } else {
4172
3787
  this._value = v;
@@ -4177,24 +3792,24 @@ var node = require$$0$2.deprecate;
4177
3792
  get: function get() {
4178
3793
  return this._insensitive;
4179
3794
  }
3795
+
4180
3796
  /**
4181
3797
  * Set the case insensitive flag.
4182
3798
  * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
4183
3799
  * of the attribute is updated accordingly.
4184
3800
  *
4185
3801
  * @param {true | false} insensitive true if the attribute should match case-insensitively.
4186
- */
4187
- ,
3802
+ */,
4188
3803
  set: function set(insensitive) {
4189
3804
  if (!insensitive) {
4190
- this._insensitive = false; // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation.
4191
- // When setting `attr.insensitive = false` both should be erased to ensure correct serialization.
3805
+ this._insensitive = false;
4192
3806
 
3807
+ // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation.
3808
+ // When setting `attr.insensitive = false` both should be erased to ensure correct serialization.
4193
3809
  if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) {
4194
3810
  this.raws.insensitiveFlag = undefined;
4195
3811
  }
4196
3812
  }
4197
-
4198
3813
  this._insensitive = insensitive;
4199
3814
  }
4200
3815
  }, {
@@ -4204,14 +3819,11 @@ var node = require$$0$2.deprecate;
4204
3819
  },
4205
3820
  set: function set(name) {
4206
3821
  this._handleEscapes("attribute", name);
4207
-
4208
3822
  this._attribute = name;
4209
3823
  }
4210
3824
  }]);
4211
-
4212
3825
  return Attribute;
4213
3826
  }(_namespace["default"]);
4214
-
4215
3827
  exports["default"] = Attribute;
4216
3828
  Attribute.NO_QUOTE = null;
4217
3829
  Attribute.SINGLE_QUOTE = "'";
@@ -4228,7 +3840,6 @@ var node = require$$0$2.deprecate;
4228
3840
  }, _CSSESC_QUOTE_OPTIONS[null] = {
4229
3841
  isIdentifier: true
4230
3842
  }, _CSSESC_QUOTE_OPTIONS);
4231
-
4232
3843
  function defaultAttrConcat(attrValue, attrSpaces) {
4233
3844
  return "" + attrSpaces.before + attrValue + attrSpaces.after;
4234
3845
  }
@@ -4240,32 +3851,22 @@ var universal$1 = {exports: {}};
4240
3851
 
4241
3852
  exports.__esModule = true;
4242
3853
  exports["default"] = void 0;
4243
-
4244
3854
  var _namespace = _interopRequireDefault(namespaceExports);
4245
-
4246
3855
  var _types = types;
4247
-
4248
3856
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
4249
-
4250
3857
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
4251
-
4252
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4253
-
3858
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4254
3859
  var Universal = /*#__PURE__*/function (_Namespace) {
4255
3860
  _inheritsLoose(Universal, _Namespace);
4256
-
4257
3861
  function Universal(opts) {
4258
3862
  var _this;
4259
-
4260
3863
  _this = _Namespace.call(this, opts) || this;
4261
3864
  _this.type = _types.UNIVERSAL;
4262
3865
  _this.value = '*';
4263
3866
  return _this;
4264
3867
  }
4265
-
4266
3868
  return Universal;
4267
3869
  }(_namespace["default"]);
4268
-
4269
3870
  exports["default"] = Universal;
4270
3871
  module.exports = exports.default;
4271
3872
  } (universal$1, universal$1.exports));
@@ -4278,31 +3879,21 @@ var combinator$2 = {exports: {}};
4278
3879
 
4279
3880
  exports.__esModule = true;
4280
3881
  exports["default"] = void 0;
4281
-
4282
3882
  var _node = _interopRequireDefault(nodeExports);
4283
-
4284
3883
  var _types = types;
4285
-
4286
3884
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
4287
-
4288
3885
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
4289
-
4290
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4291
-
3886
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4292
3887
  var Combinator = /*#__PURE__*/function (_Node) {
4293
3888
  _inheritsLoose(Combinator, _Node);
4294
-
4295
3889
  function Combinator(opts) {
4296
3890
  var _this;
4297
-
4298
3891
  _this = _Node.call(this, opts) || this;
4299
3892
  _this.type = _types.COMBINATOR;
4300
3893
  return _this;
4301
3894
  }
4302
-
4303
3895
  return Combinator;
4304
3896
  }(_node["default"]);
4305
-
4306
3897
  exports["default"] = Combinator;
4307
3898
  module.exports = exports.default;
4308
3899
  } (combinator$2, combinator$2.exports));
@@ -4315,32 +3906,22 @@ var nesting$1 = {exports: {}};
4315
3906
 
4316
3907
  exports.__esModule = true;
4317
3908
  exports["default"] = void 0;
4318
-
4319
3909
  var _node = _interopRequireDefault(nodeExports);
4320
-
4321
3910
  var _types = types;
4322
-
4323
3911
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
4324
-
4325
3912
  function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
4326
-
4327
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4328
-
3913
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4329
3914
  var Nesting = /*#__PURE__*/function (_Node) {
4330
3915
  _inheritsLoose(Nesting, _Node);
4331
-
4332
3916
  function Nesting(opts) {
4333
3917
  var _this;
4334
-
4335
3918
  _this = _Node.call(this, opts) || this;
4336
3919
  _this.type = _types.NESTING;
4337
3920
  _this.value = '&';
4338
3921
  return _this;
4339
3922
  }
4340
-
4341
3923
  return Nesting;
4342
3924
  }(_node["default"]);
4343
-
4344
3925
  exports["default"] = Nesting;
4345
3926
  module.exports = exports.default;
4346
3927
  } (nesting$1, nesting$1.exports));
@@ -4353,7 +3934,6 @@ var sortAscending = {exports: {}};
4353
3934
 
4354
3935
  exports.__esModule = true;
4355
3936
  exports["default"] = sortAscending;
4356
-
4357
3937
  function sortAscending(list) {
4358
3938
  return list.sort(function (a, b) {
4359
3939
  return a - b;
@@ -4369,91 +3949,66 @@ var tokenize = {};
4369
3949
  var tokenTypes = {};
4370
3950
 
4371
3951
  tokenTypes.__esModule = true;
4372
- tokenTypes.combinator = tokenTypes.word = tokenTypes.comment = tokenTypes.str = tokenTypes.tab = tokenTypes.newline = tokenTypes.feed = tokenTypes.cr = tokenTypes.backslash = tokenTypes.bang = tokenTypes.slash = tokenTypes.doubleQuote = tokenTypes.singleQuote = tokenTypes.space = tokenTypes.greaterThan = tokenTypes.pipe = tokenTypes.equals = tokenTypes.plus = tokenTypes.caret = tokenTypes.tilde = tokenTypes.dollar = tokenTypes.closeSquare = tokenTypes.openSquare = tokenTypes.closeParenthesis = tokenTypes.openParenthesis = tokenTypes.semicolon = tokenTypes.colon = tokenTypes.comma = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0;
3952
+ tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0;
4373
3953
  var ampersand = 38; // `&`.charCodeAt(0);
4374
-
4375
3954
  tokenTypes.ampersand = ampersand;
4376
3955
  var asterisk = 42; // `*`.charCodeAt(0);
4377
-
4378
3956
  tokenTypes.asterisk = asterisk;
4379
3957
  var at = 64; // `@`.charCodeAt(0);
4380
-
4381
3958
  tokenTypes.at = at;
4382
3959
  var comma = 44; // `,`.charCodeAt(0);
4383
-
4384
3960
  tokenTypes.comma = comma;
4385
3961
  var colon = 58; // `:`.charCodeAt(0);
4386
-
4387
3962
  tokenTypes.colon = colon;
4388
3963
  var semicolon = 59; // `;`.charCodeAt(0);
4389
-
4390
3964
  tokenTypes.semicolon = semicolon;
4391
3965
  var openParenthesis = 40; // `(`.charCodeAt(0);
4392
-
4393
3966
  tokenTypes.openParenthesis = openParenthesis;
4394
3967
  var closeParenthesis = 41; // `)`.charCodeAt(0);
4395
-
4396
3968
  tokenTypes.closeParenthesis = closeParenthesis;
4397
3969
  var openSquare = 91; // `[`.charCodeAt(0);
4398
-
4399
3970
  tokenTypes.openSquare = openSquare;
4400
3971
  var closeSquare = 93; // `]`.charCodeAt(0);
4401
-
4402
3972
  tokenTypes.closeSquare = closeSquare;
4403
3973
  var dollar = 36; // `$`.charCodeAt(0);
4404
-
4405
3974
  tokenTypes.dollar = dollar;
4406
3975
  var tilde = 126; // `~`.charCodeAt(0);
4407
-
4408
3976
  tokenTypes.tilde = tilde;
4409
3977
  var caret = 94; // `^`.charCodeAt(0);
4410
-
4411
3978
  tokenTypes.caret = caret;
4412
3979
  var plus = 43; // `+`.charCodeAt(0);
4413
-
4414
3980
  tokenTypes.plus = plus;
4415
3981
  var equals = 61; // `=`.charCodeAt(0);
4416
-
4417
3982
  tokenTypes.equals = equals;
4418
3983
  var pipe = 124; // `|`.charCodeAt(0);
4419
-
4420
3984
  tokenTypes.pipe = pipe;
4421
3985
  var greaterThan = 62; // `>`.charCodeAt(0);
4422
-
4423
3986
  tokenTypes.greaterThan = greaterThan;
4424
3987
  var space = 32; // ` `.charCodeAt(0);
4425
-
4426
3988
  tokenTypes.space = space;
4427
3989
  var singleQuote = 39; // `'`.charCodeAt(0);
4428
-
4429
3990
  tokenTypes.singleQuote = singleQuote;
4430
3991
  var doubleQuote = 34; // `"`.charCodeAt(0);
4431
-
4432
3992
  tokenTypes.doubleQuote = doubleQuote;
4433
3993
  var slash = 47; // `/`.charCodeAt(0);
4434
-
4435
3994
  tokenTypes.slash = slash;
4436
3995
  var bang = 33; // `!`.charCodeAt(0);
4437
-
4438
3996
  tokenTypes.bang = bang;
4439
3997
  var backslash = 92; // '\\'.charCodeAt(0);
4440
-
4441
3998
  tokenTypes.backslash = backslash;
4442
3999
  var cr = 13; // '\r'.charCodeAt(0);
4443
-
4444
4000
  tokenTypes.cr = cr;
4445
4001
  var feed = 12; // '\f'.charCodeAt(0);
4446
-
4447
4002
  tokenTypes.feed = feed;
4448
4003
  var newline = 10; // '\n'.charCodeAt(0);
4449
-
4450
4004
  tokenTypes.newline = newline;
4451
4005
  var tab = 9; // '\t'.charCodeAt(0);
4452
- // Expose aliases primarily for readability.
4453
4006
 
4007
+ // Expose aliases primarily for readability.
4454
4008
  tokenTypes.tab = tab;
4455
- var str = singleQuote; // No good single character representation!
4009
+ var str = singleQuote;
4456
4010
 
4011
+ // No good single character representation!
4457
4012
  tokenTypes.str = str;
4458
4013
  var comment$1 = -1;
4459
4014
  tokenTypes.comment = comment$1;
@@ -4465,39 +4020,30 @@ tokenTypes.combinator = combinator$1;
4465
4020
  (function (exports) {
4466
4021
 
4467
4022
  exports.__esModule = true;
4468
- exports["default"] = tokenize;
4469
4023
  exports.FIELDS = void 0;
4470
-
4024
+ exports["default"] = tokenize;
4471
4025
  var t = _interopRequireWildcard(tokenTypes);
4472
-
4473
4026
  var _unescapable, _wordDelimiters;
4474
-
4475
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
4476
-
4477
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
4478
-
4027
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
4028
+ function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
4479
4029
  var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
4480
4030
  var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
4481
4031
  var hex = {};
4482
4032
  var hexChars = "0123456789abcdefABCDEF";
4483
-
4484
4033
  for (var i = 0; i < hexChars.length; i++) {
4485
4034
  hex[hexChars.charCodeAt(i)] = true;
4486
4035
  }
4036
+
4487
4037
  /**
4488
4038
  * Returns the last index of the bar css word
4489
4039
  * @param {string} css The string in which the word begins
4490
4040
  * @param {number} start The index into the string where word's first letter occurs
4491
4041
  */
4492
-
4493
-
4494
4042
  function consumeWord(css, start) {
4495
4043
  var next = start;
4496
4044
  var code;
4497
-
4498
4045
  do {
4499
4046
  code = css.charCodeAt(next);
4500
-
4501
4047
  if (wordDelimiters[code]) {
4502
4048
  return next - 1;
4503
4049
  } else if (code === t.backslash) {
@@ -4507,30 +4053,26 @@ tokenTypes.combinator = combinator$1;
4507
4053
  next++;
4508
4054
  }
4509
4055
  } while (next < css.length);
4510
-
4511
4056
  return next - 1;
4512
4057
  }
4058
+
4513
4059
  /**
4514
4060
  * Returns the last index of the escape sequence
4515
4061
  * @param {string} css The string in which the sequence begins
4516
4062
  * @param {number} start The index into the string where escape character (`\`) occurs.
4517
4063
  */
4518
-
4519
-
4520
4064
  function consumeEscape(css, start) {
4521
4065
  var next = start;
4522
4066
  var code = css.charCodeAt(next + 1);
4523
-
4524
4067
  if (unescapable[code]) ; else if (hex[code]) {
4525
- var hexDigits = 0; // consume up to 6 hex chars
4526
-
4068
+ var hexDigits = 0;
4069
+ // consume up to 6 hex chars
4527
4070
  do {
4528
4071
  next++;
4529
4072
  hexDigits++;
4530
4073
  code = css.charCodeAt(next + 1);
4531
- } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape
4532
-
4533
-
4074
+ } while (hex[code] && hexDigits < 6);
4075
+ // if fewer than 6 hex chars, a trailing space ends the escape
4534
4076
  if (hexDigits < 6 && code === t.space) {
4535
4077
  next++;
4536
4078
  }
@@ -4538,10 +4080,8 @@ tokenTypes.combinator = combinator$1;
4538
4080
  // the next char is part of the current word
4539
4081
  next++;
4540
4082
  }
4541
-
4542
4083
  return next;
4543
4084
  }
4544
-
4545
4085
  var FIELDS = {
4546
4086
  TYPE: 0,
4547
4087
  START_LINE: 1,
@@ -4552,18 +4092,16 @@ tokenTypes.combinator = combinator$1;
4552
4092
  END_POS: 6
4553
4093
  };
4554
4094
  exports.FIELDS = FIELDS;
4555
-
4556
4095
  function tokenize(input) {
4557
4096
  var tokens = [];
4558
4097
  var css = input.css.valueOf();
4559
4098
  var _css = css,
4560
- length = _css.length;
4099
+ length = _css.length;
4561
4100
  var offset = -1;
4562
4101
  var line = 1;
4563
4102
  var start = 0;
4564
4103
  var end = 0;
4565
4104
  var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
4566
-
4567
4105
  function unclosed(what, fix) {
4568
4106
  if (input.safe) {
4569
4107
  // fyi: this is never set to true.
@@ -4573,15 +4111,12 @@ tokenTypes.combinator = combinator$1;
4573
4111
  throw input.error('Unclosed ' + what, line, start - offset, start);
4574
4112
  }
4575
4113
  }
4576
-
4577
4114
  while (start < length) {
4578
4115
  code = css.charCodeAt(start);
4579
-
4580
4116
  if (code === t.newline) {
4581
4117
  offset = start;
4582
4118
  line += 1;
4583
4119
  }
4584
-
4585
4120
  switch (code) {
4586
4121
  case t.space:
4587
4122
  case t.tab:
@@ -4589,41 +4124,35 @@ tokenTypes.combinator = combinator$1;
4589
4124
  case t.cr:
4590
4125
  case t.feed:
4591
4126
  next = start;
4592
-
4593
4127
  do {
4594
4128
  next += 1;
4595
4129
  code = css.charCodeAt(next);
4596
-
4597
4130
  if (code === t.newline) {
4598
4131
  offset = next;
4599
4132
  line += 1;
4600
4133
  }
4601
4134
  } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
4602
-
4603
4135
  tokenType = t.space;
4604
4136
  endLine = line;
4605
4137
  endColumn = next - offset - 1;
4606
4138
  end = next;
4607
4139
  break;
4608
-
4609
4140
  case t.plus:
4610
4141
  case t.greaterThan:
4611
4142
  case t.tilde:
4612
4143
  case t.pipe:
4613
4144
  next = start;
4614
-
4615
4145
  do {
4616
4146
  next += 1;
4617
4147
  code = css.charCodeAt(next);
4618
4148
  } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
4619
-
4620
4149
  tokenType = t.combinator;
4621
4150
  endLine = line;
4622
4151
  endColumn = start - offset;
4623
4152
  end = next;
4624
4153
  break;
4625
- // Consume these characters as single tokens.
4626
4154
 
4155
+ // Consume these characters as single tokens.
4627
4156
  case t.asterisk:
4628
4157
  case t.ampersand:
4629
4158
  case t.bang:
@@ -4643,46 +4172,36 @@ tokenTypes.combinator = combinator$1;
4643
4172
  endColumn = start - offset;
4644
4173
  end = next + 1;
4645
4174
  break;
4646
-
4647
4175
  case t.singleQuote:
4648
4176
  case t.doubleQuote:
4649
4177
  quote = code === t.singleQuote ? "'" : '"';
4650
4178
  next = start;
4651
-
4652
4179
  do {
4653
4180
  escaped = false;
4654
4181
  next = css.indexOf(quote, next + 1);
4655
-
4656
4182
  if (next === -1) {
4657
4183
  unclosed('quote', quote);
4658
4184
  }
4659
-
4660
4185
  escapePos = next;
4661
-
4662
4186
  while (css.charCodeAt(escapePos - 1) === t.backslash) {
4663
4187
  escapePos -= 1;
4664
4188
  escaped = !escaped;
4665
4189
  }
4666
4190
  } while (escaped);
4667
-
4668
4191
  tokenType = t.str;
4669
4192
  endLine = line;
4670
4193
  endColumn = start - offset;
4671
4194
  end = next + 1;
4672
4195
  break;
4673
-
4674
4196
  default:
4675
4197
  if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
4676
4198
  next = css.indexOf('*/', start + 2) + 1;
4677
-
4678
4199
  if (next === 0) {
4679
4200
  unclosed('comment', '*/');
4680
4201
  }
4681
-
4682
4202
  content = css.slice(start, next + 1);
4683
4203
  lines = content.split('\n');
4684
4204
  last = lines.length - 1;
4685
-
4686
4205
  if (last > 0) {
4687
4206
  nextLine = line + last;
4688
4207
  nextOffset = next - lines[last].length;
@@ -4690,7 +4209,6 @@ tokenTypes.combinator = combinator$1;
4690
4209
  nextLine = line;
4691
4210
  nextOffset = offset;
4692
4211
  }
4693
-
4694
4212
  tokenType = t.comment;
4695
4213
  line = nextLine;
4696
4214
  endLine = nextLine;
@@ -4707,29 +4225,33 @@ tokenTypes.combinator = combinator$1;
4707
4225
  endLine = line;
4708
4226
  endColumn = next - offset;
4709
4227
  }
4710
-
4711
4228
  end = next + 1;
4712
4229
  break;
4713
- } // Ensure that the token structure remains consistent
4714
-
4230
+ }
4715
4231
 
4716
- tokens.push([tokenType, // [0] Token type
4717
- line, // [1] Starting line
4718
- start - offset, // [2] Starting column
4719
- endLine, // [3] Ending line
4720
- endColumn, // [4] Ending column
4721
- start, // [5] Start position / Source index
4232
+ // Ensure that the token structure remains consistent
4233
+ tokens.push([tokenType,
4234
+ // [0] Token type
4235
+ line,
4236
+ // [1] Starting line
4237
+ start - offset,
4238
+ // [2] Starting column
4239
+ endLine,
4240
+ // [3] Ending line
4241
+ endColumn,
4242
+ // [4] Ending column
4243
+ start,
4244
+ // [5] Start position / Source index
4722
4245
  end // [6] End position
4723
- ]); // Reset offset for the next token
4246
+ ]);
4724
4247
 
4248
+ // Reset offset for the next token
4725
4249
  if (nextOffset) {
4726
4250
  offset = nextOffset;
4727
4251
  nextOffset = null;
4728
4252
  }
4729
-
4730
4253
  start = end;
4731
4254
  }
4732
-
4733
4255
  return tokens;
4734
4256
  }
4735
4257
  } (tokenize));
@@ -4738,70 +4260,43 @@ tokenTypes.combinator = combinator$1;
4738
4260
 
4739
4261
  exports.__esModule = true;
4740
4262
  exports["default"] = void 0;
4741
-
4742
4263
  var _root = _interopRequireDefault(rootExports);
4743
-
4744
4264
  var _selector = _interopRequireDefault(selectorExports);
4745
-
4746
4265
  var _className = _interopRequireDefault(classNameExports);
4747
-
4748
4266
  var _comment = _interopRequireDefault(commentExports);
4749
-
4750
4267
  var _id = _interopRequireDefault(idExports);
4751
-
4752
4268
  var _tag = _interopRequireDefault(tagExports);
4753
-
4754
4269
  var _string = _interopRequireDefault(stringExports);
4755
-
4756
4270
  var _pseudo = _interopRequireDefault(pseudoExports);
4757
-
4758
4271
  var _attribute = _interopRequireWildcard(attribute$1);
4759
-
4760
4272
  var _universal = _interopRequireDefault(universalExports);
4761
-
4762
4273
  var _combinator = _interopRequireDefault(combinatorExports);
4763
-
4764
4274
  var _nesting = _interopRequireDefault(nestingExports);
4765
-
4766
4275
  var _sortAscending = _interopRequireDefault(sortAscendingExports);
4767
-
4768
4276
  var _tokenize = _interopRequireWildcard(tokenize);
4769
-
4770
4277
  var tokens = _interopRequireWildcard(tokenTypes);
4771
-
4772
4278
  var types$1 = _interopRequireWildcard(types);
4773
-
4774
4279
  var _util = util;
4775
-
4776
4280
  var _WHITESPACE_TOKENS, _Object$assign;
4777
-
4778
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
4779
-
4780
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
4781
-
4281
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
4282
+ function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
4782
4283
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
4783
-
4784
4284
  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); } }
4785
-
4786
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
4787
-
4285
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4788
4286
  var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
4789
4287
  var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
4790
-
4791
4288
  function tokenStart(token) {
4792
4289
  return {
4793
4290
  line: token[_tokenize.FIELDS.START_LINE],
4794
4291
  column: token[_tokenize.FIELDS.START_COL]
4795
4292
  };
4796
4293
  }
4797
-
4798
4294
  function tokenEnd(token) {
4799
4295
  return {
4800
4296
  line: token[_tokenize.FIELDS.END_LINE],
4801
4297
  column: token[_tokenize.FIELDS.END_COL]
4802
4298
  };
4803
4299
  }
4804
-
4805
4300
  function getSource(startLine, startColumn, endLine, endColumn) {
4806
4301
  return {
4807
4302
  start: {
@@ -4814,62 +4309,48 @@ tokenTypes.combinator = combinator$1;
4814
4309
  }
4815
4310
  };
4816
4311
  }
4817
-
4818
4312
  function getTokenSource(token) {
4819
4313
  return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
4820
4314
  }
4821
-
4822
4315
  function getTokenSourceSpan(startToken, endToken) {
4823
4316
  if (!startToken) {
4824
4317
  return undefined;
4825
4318
  }
4826
-
4827
4319
  return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
4828
4320
  }
4829
-
4830
4321
  function unescapeProp(node, prop) {
4831
4322
  var value = node[prop];
4832
-
4833
4323
  if (typeof value !== "string") {
4834
4324
  return;
4835
4325
  }
4836
-
4837
4326
  if (value.indexOf("\\") !== -1) {
4838
4327
  (0, _util.ensureObject)(node, 'raws');
4839
4328
  node[prop] = (0, _util.unesc)(value);
4840
-
4841
4329
  if (node.raws[prop] === undefined) {
4842
4330
  node.raws[prop] = value;
4843
4331
  }
4844
4332
  }
4845
-
4846
4333
  return node;
4847
4334
  }
4848
-
4849
4335
  function indexesOf(array, item) {
4850
4336
  var i = -1;
4851
4337
  var indexes = [];
4852
-
4853
4338
  while ((i = array.indexOf(item, i + 1)) !== -1) {
4854
4339
  indexes.push(i);
4855
4340
  }
4856
-
4857
4341
  return indexes;
4858
4342
  }
4859
-
4860
4343
  function uniqs() {
4861
4344
  var list = Array.prototype.concat.apply([], arguments);
4862
4345
  return list.filter(function (item, i) {
4863
4346
  return i === list.indexOf(item);
4864
4347
  });
4865
4348
  }
4866
-
4867
4349
  var Parser = /*#__PURE__*/function () {
4868
4350
  function Parser(rule, options) {
4869
4351
  if (options === void 0) {
4870
4352
  options = {};
4871
4353
  }
4872
-
4873
4354
  this.rule = rule;
4874
4355
  this.options = Object.assign({
4875
4356
  lossy: false,
@@ -4893,62 +4374,51 @@ tokenTypes.combinator = combinator$1;
4893
4374
  line: 1,
4894
4375
  column: 1
4895
4376
  }
4896
- }
4377
+ },
4378
+ sourceIndex: 0
4897
4379
  });
4898
4380
  this.root.append(selector);
4899
4381
  this.current = selector;
4900
4382
  this.loop();
4901
4383
  }
4902
-
4903
4384
  var _proto = Parser.prototype;
4904
-
4905
4385
  _proto._errorGenerator = function _errorGenerator() {
4906
4386
  var _this = this;
4907
-
4908
4387
  return function (message, errorOptions) {
4909
4388
  if (typeof _this.rule === 'string') {
4910
4389
  return new Error(message);
4911
4390
  }
4912
-
4913
4391
  return _this.rule.error(message, errorOptions);
4914
4392
  };
4915
4393
  };
4916
-
4917
4394
  _proto.attribute = function attribute() {
4918
4395
  var attr = [];
4919
4396
  var startingToken = this.currToken;
4920
4397
  this.position++;
4921
-
4922
4398
  while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
4923
4399
  attr.push(this.currToken);
4924
4400
  this.position++;
4925
4401
  }
4926
-
4927
4402
  if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
4928
4403
  return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]);
4929
4404
  }
4930
-
4931
4405
  var len = attr.length;
4932
4406
  var node = {
4933
4407
  source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
4934
4408
  sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
4935
4409
  };
4936
-
4937
4410
  if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) {
4938
4411
  return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]);
4939
4412
  }
4940
-
4941
4413
  var pos = 0;
4942
4414
  var spaceBefore = '';
4943
4415
  var commentBefore = '';
4944
4416
  var lastAdded = null;
4945
4417
  var spaceAfterMeaningfulToken = false;
4946
-
4947
4418
  while (pos < len) {
4948
4419
  var token = attr[pos];
4949
4420
  var content = this.content(token);
4950
4421
  var next = attr[pos + 1];
4951
-
4952
4422
  switch (token[_tokenize.FIELDS.TYPE]) {
4953
4423
  case tokens.space:
4954
4424
  // if (
@@ -4958,17 +4428,14 @@ tokenTypes.combinator = combinator$1;
4958
4428
  // return this.expected('attribute', token[TOKEN.START_POS], content);
4959
4429
  // }
4960
4430
  spaceAfterMeaningfulToken = true;
4961
-
4962
4431
  if (this.options.lossy) {
4963
4432
  break;
4964
4433
  }
4965
-
4966
4434
  if (lastAdded) {
4967
4435
  (0, _util.ensureObject)(node, 'spaces', lastAdded);
4968
4436
  var prevContent = node.spaces[lastAdded].after || '';
4969
4437
  node.spaces[lastAdded].after = prevContent + content;
4970
4438
  var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null;
4971
-
4972
4439
  if (existingComment) {
4973
4440
  node.raws.spaces[lastAdded].after = existingComment + content;
4974
4441
  }
@@ -4976,9 +4443,7 @@ tokenTypes.combinator = combinator$1;
4976
4443
  spaceBefore = spaceBefore + content;
4977
4444
  commentBefore = commentBefore + content;
4978
4445
  }
4979
-
4980
4446
  break;
4981
-
4982
4447
  case tokens.asterisk:
4983
4448
  if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
4984
4449
  node.operator = content;
@@ -4989,72 +4454,57 @@ tokenTypes.combinator = combinator$1;
4989
4454
  node.spaces.attribute.before = spaceBefore;
4990
4455
  spaceBefore = '';
4991
4456
  }
4992
-
4993
4457
  if (commentBefore) {
4994
4458
  (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');
4995
4459
  node.raws.spaces.attribute.before = spaceBefore;
4996
4460
  commentBefore = '';
4997
4461
  }
4998
-
4999
4462
  node.namespace = (node.namespace || "") + content;
5000
4463
  var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null;
5001
-
5002
4464
  if (rawValue) {
5003
4465
  node.raws.namespace += content;
5004
4466
  }
5005
-
5006
4467
  lastAdded = 'namespace';
5007
4468
  }
5008
-
5009
4469
  spaceAfterMeaningfulToken = false;
5010
4470
  break;
5011
-
5012
4471
  case tokens.dollar:
5013
4472
  if (lastAdded === "value") {
5014
4473
  var oldRawValue = (0, _util.getProp)(node, 'raws', 'value');
5015
4474
  node.value += "$";
5016
-
5017
4475
  if (oldRawValue) {
5018
4476
  node.raws.value = oldRawValue + "$";
5019
4477
  }
5020
-
5021
4478
  break;
5022
4479
  }
5023
-
5024
4480
  // Falls through
5025
-
5026
4481
  case tokens.caret:
5027
4482
  if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
5028
4483
  node.operator = content;
5029
4484
  lastAdded = 'operator';
5030
4485
  }
5031
-
5032
4486
  spaceAfterMeaningfulToken = false;
5033
4487
  break;
5034
-
5035
4488
  case tokens.combinator:
5036
4489
  if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
5037
4490
  node.operator = content;
5038
4491
  lastAdded = 'operator';
5039
4492
  }
5040
-
5041
4493
  if (content !== '|') {
5042
4494
  spaceAfterMeaningfulToken = false;
5043
4495
  break;
5044
4496
  }
5045
-
5046
4497
  if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
5047
4498
  node.operator = content;
5048
4499
  lastAdded = 'operator';
5049
4500
  } else if (!node.namespace && !node.attribute) {
5050
4501
  node.namespace = true;
5051
4502
  }
5052
-
5053
4503
  spaceAfterMeaningfulToken = false;
5054
4504
  break;
5055
-
5056
4505
  case tokens.word:
5057
- if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved.
4506
+ if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals &&
4507
+ // this look-ahead probably fails with comment nodes involved.
5058
4508
  !node.operator && !node.namespace) {
5059
4509
  node.namespace = content;
5060
4510
  lastAdded = 'namespace';
@@ -5064,56 +4514,42 @@ tokenTypes.combinator = combinator$1;
5064
4514
  node.spaces.attribute.before = spaceBefore;
5065
4515
  spaceBefore = '';
5066
4516
  }
5067
-
5068
4517
  if (commentBefore) {
5069
4518
  (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');
5070
4519
  node.raws.spaces.attribute.before = commentBefore;
5071
4520
  commentBefore = '';
5072
4521
  }
5073
-
5074
4522
  node.attribute = (node.attribute || "") + content;
5075
-
5076
4523
  var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null;
5077
-
5078
4524
  if (_rawValue) {
5079
4525
  node.raws.attribute += content;
5080
4526
  }
5081
-
5082
4527
  lastAdded = 'attribute';
5083
4528
  } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
5084
4529
  var _unescaped = (0, _util.unesc)(content);
5085
-
5086
4530
  var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || '';
5087
-
5088
4531
  var oldValue = node.value || '';
5089
4532
  node.value = oldValue + _unescaped;
5090
4533
  node.quoteMark = null;
5091
-
5092
4534
  if (_unescaped !== content || _oldRawValue) {
5093
4535
  (0, _util.ensureObject)(node, 'raws');
5094
4536
  node.raws.value = (_oldRawValue || oldValue) + content;
5095
4537
  }
5096
-
5097
4538
  lastAdded = 'value';
5098
4539
  } else {
5099
4540
  var insensitive = content === 'i' || content === "I";
5100
-
5101
4541
  if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) {
5102
4542
  node.insensitive = insensitive;
5103
-
5104
4543
  if (!insensitive || content === "I") {
5105
4544
  (0, _util.ensureObject)(node, 'raws');
5106
4545
  node.raws.insensitiveFlag = content;
5107
4546
  }
5108
-
5109
4547
  lastAdded = 'insensitive';
5110
-
5111
4548
  if (spaceBefore) {
5112
4549
  (0, _util.ensureObject)(node, 'spaces', 'insensitive');
5113
4550
  node.spaces.insensitive.before = spaceBefore;
5114
4551
  spaceBefore = '';
5115
4552
  }
5116
-
5117
4553
  if (commentBefore) {
5118
4554
  (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive');
5119
4555
  node.raws.spaces.insensitive.before = commentBefore;
@@ -5122,27 +4558,22 @@ tokenTypes.combinator = combinator$1;
5122
4558
  } else if (node.value || node.value === '') {
5123
4559
  lastAdded = 'value';
5124
4560
  node.value += content;
5125
-
5126
4561
  if (node.raws.value) {
5127
4562
  node.raws.value += content;
5128
4563
  }
5129
4564
  }
5130
4565
  }
5131
-
5132
4566
  spaceAfterMeaningfulToken = false;
5133
4567
  break;
5134
-
5135
4568
  case tokens.str:
5136
4569
  if (!node.attribute || !node.operator) {
5137
4570
  return this.error("Expected an attribute followed by an operator preceding the string.", {
5138
4571
  index: token[_tokenize.FIELDS.START_POS]
5139
4572
  });
5140
4573
  }
5141
-
5142
4574
  var _unescapeValue = (0, _attribute.unescapeValue)(content),
5143
- unescaped = _unescapeValue.unescaped,
5144
- quoteMark = _unescapeValue.quoteMark;
5145
-
4575
+ unescaped = _unescapeValue.unescaped,
4576
+ quoteMark = _unescapeValue.quoteMark;
5146
4577
  node.value = unescaped;
5147
4578
  node.quoteMark = quoteMark;
5148
4579
  lastAdded = 'value';
@@ -5150,23 +4581,19 @@ tokenTypes.combinator = combinator$1;
5150
4581
  node.raws.value = content;
5151
4582
  spaceAfterMeaningfulToken = false;
5152
4583
  break;
5153
-
5154
4584
  case tokens.equals:
5155
4585
  if (!node.attribute) {
5156
4586
  return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content);
5157
4587
  }
5158
-
5159
4588
  if (node.value) {
5160
4589
  return this.error('Unexpected "=" found; an operator was already defined.', {
5161
4590
  index: token[_tokenize.FIELDS.START_POS]
5162
4591
  });
5163
4592
  }
5164
-
5165
4593
  node.operator = node.operator ? node.operator + content : content;
5166
4594
  lastAdded = 'operator';
5167
4595
  spaceAfterMeaningfulToken = false;
5168
4596
  break;
5169
-
5170
4597
  case tokens.comment:
5171
4598
  if (lastAdded) {
5172
4599
  if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') {
@@ -5183,23 +4610,20 @@ tokenTypes.combinator = combinator$1;
5183
4610
  } else {
5184
4611
  commentBefore = commentBefore + content;
5185
4612
  }
5186
-
5187
4613
  break;
5188
-
5189
4614
  default:
5190
4615
  return this.error("Unexpected \"" + content + "\" found.", {
5191
4616
  index: token[_tokenize.FIELDS.START_POS]
5192
4617
  });
5193
4618
  }
5194
-
5195
4619
  pos++;
5196
4620
  }
5197
-
5198
4621
  unescapeProp(node, "attribute");
5199
4622
  unescapeProp(node, "namespace");
5200
4623
  this.newNode(new _attribute["default"](node));
5201
4624
  this.position++;
5202
4625
  }
4626
+
5203
4627
  /**
5204
4628
  * return a node containing meaningless garbage up to (but not including) the specified token position.
5205
4629
  * if the token position is negative, all remaining tokens are consumed.
@@ -5211,19 +4635,15 @@ tokenTypes.combinator = combinator$1;
5211
4635
  * a previous node's space metadata.
5212
4636
  *
5213
4637
  * In lossy mode, this returns only comments.
5214
- */
5215
- ;
5216
-
4638
+ */;
5217
4639
  _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
5218
4640
  if (stopPosition < 0) {
5219
4641
  stopPosition = this.tokens.length;
5220
4642
  }
5221
-
5222
4643
  var startPosition = this.position;
5223
4644
  var nodes = [];
5224
4645
  var space = "";
5225
4646
  var lastComment = undefined;
5226
-
5227
4647
  do {
5228
4648
  if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
5229
4649
  if (!this.options.lossy) {
@@ -5231,12 +4651,10 @@ tokenTypes.combinator = combinator$1;
5231
4651
  }
5232
4652
  } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
5233
4653
  var spaces = {};
5234
-
5235
4654
  if (space) {
5236
4655
  spaces.before = space;
5237
4656
  space = "";
5238
4657
  }
5239
-
5240
4658
  lastComment = new _comment["default"]({
5241
4659
  value: this.content(),
5242
4660
  source: getTokenSource(this.currToken),
@@ -5246,7 +4664,6 @@ tokenTypes.combinator = combinator$1;
5246
4664
  nodes.push(lastComment);
5247
4665
  }
5248
4666
  } while (++this.position < stopPosition);
5249
-
5250
4667
  if (space) {
5251
4668
  if (lastComment) {
5252
4669
  lastComment.spaces.after = space;
@@ -5264,62 +4681,49 @@ tokenTypes.combinator = combinator$1;
5264
4681
  }));
5265
4682
  }
5266
4683
  }
5267
-
5268
4684
  return nodes;
5269
4685
  }
4686
+
5270
4687
  /**
5271
4688
  *
5272
4689
  * @param {*} nodes
5273
- */
5274
- ;
5275
-
4690
+ */;
5276
4691
  _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
5277
4692
  var _this2 = this;
5278
-
5279
4693
  if (requiredSpace === void 0) {
5280
4694
  requiredSpace = false;
5281
4695
  }
5282
-
5283
4696
  var space = "";
5284
4697
  var rawSpace = "";
5285
4698
  nodes.forEach(function (n) {
5286
4699
  var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
5287
-
5288
4700
  var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
5289
-
5290
4701
  space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
5291
4702
  rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
5292
4703
  });
5293
-
5294
4704
  if (rawSpace === space) {
5295
4705
  rawSpace = undefined;
5296
4706
  }
5297
-
5298
4707
  var result = {
5299
4708
  space: space,
5300
4709
  rawSpace: rawSpace
5301
4710
  };
5302
4711
  return result;
5303
4712
  };
5304
-
5305
4713
  _proto.isNamedCombinator = function isNamedCombinator(position) {
5306
4714
  if (position === void 0) {
5307
4715
  position = this.position;
5308
4716
  }
5309
-
5310
4717
  return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
5311
4718
  };
5312
-
5313
4719
  _proto.namedCombinator = function namedCombinator() {
5314
4720
  if (this.isNamedCombinator()) {
5315
4721
  var nameRaw = this.content(this.tokens[this.position + 1]);
5316
4722
  var name = (0, _util.unesc)(nameRaw).toLowerCase();
5317
4723
  var raws = {};
5318
-
5319
4724
  if (name !== nameRaw) {
5320
4725
  raws.value = "/" + nameRaw + "/";
5321
4726
  }
5322
-
5323
4727
  var node = new _combinator["default"]({
5324
4728
  value: "/" + name + "/",
5325
4729
  source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
@@ -5332,32 +4736,24 @@ tokenTypes.combinator = combinator$1;
5332
4736
  this.unexpected();
5333
4737
  }
5334
4738
  };
5335
-
5336
4739
  _proto.combinator = function combinator() {
5337
4740
  var _this3 = this;
5338
-
5339
4741
  if (this.content() === '|') {
5340
4742
  return this.namespace();
5341
- } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.
5342
-
5343
-
4743
+ }
4744
+ // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.
5344
4745
  var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
5345
-
5346
4746
  if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) {
5347
4747
  var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
5348
-
5349
4748
  if (nodes.length > 0) {
5350
4749
  var last = this.current.last;
5351
-
5352
4750
  if (last) {
5353
4751
  var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes),
5354
- space = _this$convertWhitespa.space,
5355
- rawSpace = _this$convertWhitespa.rawSpace;
5356
-
4752
+ space = _this$convertWhitespa.space,
4753
+ rawSpace = _this$convertWhitespa.rawSpace;
5357
4754
  if (rawSpace !== undefined) {
5358
4755
  last.rawSpaceAfter += rawSpace;
5359
4756
  }
5360
-
5361
4757
  last.spaces.after += space;
5362
4758
  } else {
5363
4759
  nodes.forEach(function (n) {
@@ -5365,19 +4761,14 @@ tokenTypes.combinator = combinator$1;
5365
4761
  });
5366
4762
  }
5367
4763
  }
5368
-
5369
4764
  return;
5370
4765
  }
5371
-
5372
4766
  var firstToken = this.currToken;
5373
4767
  var spaceOrDescendantSelectorNodes = undefined;
5374
-
5375
4768
  if (nextSigTokenPos > this.position) {
5376
4769
  spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
5377
4770
  }
5378
-
5379
4771
  var node;
5380
-
5381
4772
  if (this.isNamedCombinator()) {
5382
4773
  node = this.namedCombinator();
5383
4774
  } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
@@ -5390,31 +4781,26 @@ tokenTypes.combinator = combinator$1;
5390
4781
  } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) {
5391
4782
  this.unexpected();
5392
4783
  }
5393
-
5394
4784
  if (node) {
5395
4785
  if (spaceOrDescendantSelectorNodes) {
5396
4786
  var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes),
5397
- _space = _this$convertWhitespa2.space,
5398
- _rawSpace = _this$convertWhitespa2.rawSpace;
5399
-
4787
+ _space = _this$convertWhitespa2.space,
4788
+ _rawSpace = _this$convertWhitespa2.rawSpace;
5400
4789
  node.spaces.before = _space;
5401
4790
  node.rawSpaceBefore = _rawSpace;
5402
4791
  }
5403
4792
  } else {
5404
4793
  // descendant combinator
5405
4794
  var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true),
5406
- _space2 = _this$convertWhitespa3.space,
5407
- _rawSpace2 = _this$convertWhitespa3.rawSpace;
5408
-
4795
+ _space2 = _this$convertWhitespa3.space,
4796
+ _rawSpace2 = _this$convertWhitespa3.rawSpace;
5409
4797
  if (!_rawSpace2) {
5410
4798
  _rawSpace2 = _space2;
5411
4799
  }
5412
-
5413
4800
  var spaces = {};
5414
4801
  var raws = {
5415
4802
  spaces: {}
5416
4803
  };
5417
-
5418
4804
  if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {
5419
4805
  spaces.before = _space2.slice(0, _space2.length - 1);
5420
4806
  raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
@@ -5424,7 +4810,6 @@ tokenTypes.combinator = combinator$1;
5424
4810
  } else {
5425
4811
  raws.value = _rawSpace2;
5426
4812
  }
5427
-
5428
4813
  node = new _combinator["default"]({
5429
4814
  value: ' ',
5430
4815
  source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
@@ -5433,34 +4818,29 @@ tokenTypes.combinator = combinator$1;
5433
4818
  raws: raws
5434
4819
  });
5435
4820
  }
5436
-
5437
4821
  if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
5438
4822
  node.spaces.after = this.optionalSpace(this.content());
5439
4823
  this.position++;
5440
4824
  }
5441
-
5442
4825
  return this.newNode(node);
5443
4826
  };
5444
-
5445
4827
  _proto.comma = function comma() {
5446
4828
  if (this.position === this.tokens.length - 1) {
5447
4829
  this.root.trailingComma = true;
5448
4830
  this.position++;
5449
4831
  return;
5450
4832
  }
5451
-
5452
4833
  this.current._inferEndPosition();
5453
-
5454
4834
  var selector = new _selector["default"]({
5455
4835
  source: {
5456
4836
  start: tokenStart(this.tokens[this.position + 1])
5457
- }
4837
+ },
4838
+ sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS]
5458
4839
  });
5459
4840
  this.current.parent.append(selector);
5460
4841
  this.current = selector;
5461
4842
  this.position++;
5462
4843
  };
5463
-
5464
4844
  _proto.comment = function comment() {
5465
4845
  var current = this.currToken;
5466
4846
  this.newNode(new _comment["default"]({
@@ -5470,32 +4850,28 @@ tokenTypes.combinator = combinator$1;
5470
4850
  }));
5471
4851
  this.position++;
5472
4852
  };
5473
-
5474
4853
  _proto.error = function error(message, opts) {
5475
4854
  throw this.root.error(message, opts);
5476
4855
  };
5477
-
5478
4856
  _proto.missingBackslash = function missingBackslash() {
5479
4857
  return this.error('Expected a backslash preceding the semicolon.', {
5480
4858
  index: this.currToken[_tokenize.FIELDS.START_POS]
5481
4859
  });
5482
4860
  };
5483
-
5484
4861
  _proto.missingParenthesis = function missingParenthesis() {
5485
4862
  return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);
5486
4863
  };
5487
-
5488
4864
  _proto.missingSquareBracket = function missingSquareBracket() {
5489
4865
  return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]);
5490
4866
  };
5491
-
5492
4867
  _proto.unexpected = function unexpected() {
5493
4868
  return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
5494
4869
  };
5495
-
4870
+ _proto.unexpectedPipe = function unexpectedPipe() {
4871
+ return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
4872
+ };
5496
4873
  _proto.namespace = function namespace() {
5497
4874
  var before = this.prevToken && this.content(this.prevToken) || true;
5498
-
5499
4875
  if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
5500
4876
  this.position++;
5501
4877
  return this.word(before);
@@ -5503,18 +4879,16 @@ tokenTypes.combinator = combinator$1;
5503
4879
  this.position++;
5504
4880
  return this.universal(before);
5505
4881
  }
4882
+ this.unexpectedPipe();
5506
4883
  };
5507
-
5508
4884
  _proto.nesting = function nesting() {
5509
4885
  if (this.nextToken) {
5510
4886
  var nextContent = this.content(this.nextToken);
5511
-
5512
4887
  if (nextContent === "|") {
5513
4888
  this.position++;
5514
4889
  return;
5515
4890
  }
5516
4891
  }
5517
-
5518
4892
  var current = this.currToken;
5519
4893
  this.newNode(new _nesting["default"]({
5520
4894
  value: this.content(),
@@ -5523,31 +4897,27 @@ tokenTypes.combinator = combinator$1;
5523
4897
  }));
5524
4898
  this.position++;
5525
4899
  };
5526
-
5527
4900
  _proto.parentheses = function parentheses() {
5528
4901
  var last = this.current.last;
5529
4902
  var unbalanced = 1;
5530
4903
  this.position++;
5531
-
5532
4904
  if (last && last.type === types$1.PSEUDO) {
5533
4905
  var selector = new _selector["default"]({
5534
4906
  source: {
5535
- start: tokenStart(this.tokens[this.position - 1])
5536
- }
4907
+ start: tokenStart(this.tokens[this.position])
4908
+ },
4909
+ sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS]
5537
4910
  });
5538
4911
  var cache = this.current;
5539
4912
  last.append(selector);
5540
4913
  this.current = selector;
5541
-
5542
4914
  while (this.position < this.tokens.length && unbalanced) {
5543
4915
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
5544
4916
  unbalanced++;
5545
4917
  }
5546
-
5547
4918
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
5548
4919
  unbalanced--;
5549
4920
  }
5550
-
5551
4921
  if (unbalanced) {
5552
4922
  this.parse();
5553
4923
  } else {
@@ -5556,7 +4926,6 @@ tokenTypes.combinator = combinator$1;
5556
4926
  this.position++;
5557
4927
  }
5558
4928
  }
5559
-
5560
4929
  this.current = cache;
5561
4930
  } else {
5562
4931
  // I think this case should be an error. It's used to implement a basic parse of media queries
@@ -5564,21 +4933,17 @@ tokenTypes.combinator = combinator$1;
5564
4933
  var parenStart = this.currToken;
5565
4934
  var parenValue = "(";
5566
4935
  var parenEnd;
5567
-
5568
4936
  while (this.position < this.tokens.length && unbalanced) {
5569
4937
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
5570
4938
  unbalanced++;
5571
4939
  }
5572
-
5573
4940
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
5574
4941
  unbalanced--;
5575
4942
  }
5576
-
5577
4943
  parenEnd = this.currToken;
5578
4944
  parenValue += this.parseParenthesisToken(this.currToken);
5579
4945
  this.position++;
5580
4946
  }
5581
-
5582
4947
  if (last) {
5583
4948
  last.appendToPropertyAndEscape("value", parenValue, parenValue);
5584
4949
  } else {
@@ -5589,37 +4954,29 @@ tokenTypes.combinator = combinator$1;
5589
4954
  }));
5590
4955
  }
5591
4956
  }
5592
-
5593
4957
  if (unbalanced) {
5594
4958
  return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);
5595
4959
  }
5596
4960
  };
5597
-
5598
4961
  _proto.pseudo = function pseudo() {
5599
4962
  var _this4 = this;
5600
-
5601
4963
  var pseudoStr = '';
5602
4964
  var startingToken = this.currToken;
5603
-
5604
4965
  while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
5605
4966
  pseudoStr += this.content();
5606
4967
  this.position++;
5607
4968
  }
5608
-
5609
4969
  if (!this.currToken) {
5610
4970
  return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1);
5611
4971
  }
5612
-
5613
4972
  if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) {
5614
4973
  this.splitWord(false, function (first, length) {
5615
4974
  pseudoStr += first;
5616
-
5617
4975
  _this4.newNode(new _pseudo["default"]({
5618
4976
  value: pseudoStr,
5619
4977
  source: getTokenSourceSpan(startingToken, _this4.currToken),
5620
4978
  sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
5621
4979
  }));
5622
-
5623
4980
  if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
5624
4981
  _this4.error('Misplaced parenthesis.', {
5625
4982
  index: _this4.nextToken[_tokenize.FIELDS.START_POS]
@@ -5630,10 +4987,9 @@ tokenTypes.combinator = combinator$1;
5630
4987
  return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]);
5631
4988
  }
5632
4989
  };
5633
-
5634
4990
  _proto.space = function space() {
5635
- var content = this.content(); // Handle space before and after the selector
5636
-
4991
+ var content = this.content();
4992
+ // Handle space before and after the selector
5637
4993
  if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) {
5638
4994
  return node.type === 'comment';
5639
4995
  })) {
@@ -5646,7 +5002,6 @@ tokenTypes.combinator = combinator$1;
5646
5002
  this.combinator();
5647
5003
  }
5648
5004
  };
5649
-
5650
5005
  _proto.string = function string() {
5651
5006
  var current = this.currToken;
5652
5007
  this.newNode(new _string["default"]({
@@ -5656,15 +5011,12 @@ tokenTypes.combinator = combinator$1;
5656
5011
  }));
5657
5012
  this.position++;
5658
5013
  };
5659
-
5660
5014
  _proto.universal = function universal(namespace) {
5661
5015
  var nextToken = this.nextToken;
5662
-
5663
5016
  if (nextToken && this.content(nextToken) === '|') {
5664
5017
  this.position++;
5665
5018
  return this.namespace();
5666
5019
  }
5667
-
5668
5020
  var current = this.currToken;
5669
5021
  this.newNode(new _universal["default"]({
5670
5022
  value: this.content(),
@@ -5673,63 +5025,51 @@ tokenTypes.combinator = combinator$1;
5673
5025
  }), namespace);
5674
5026
  this.position++;
5675
5027
  };
5676
-
5677
5028
  _proto.splitWord = function splitWord(namespace, firstCallback) {
5678
5029
  var _this5 = this;
5679
-
5680
5030
  var nextToken = this.nextToken;
5681
5031
  var word = this.content();
5682
-
5683
5032
  while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
5684
5033
  this.position++;
5685
5034
  var current = this.content();
5686
5035
  word += current;
5687
-
5688
5036
  if (current.lastIndexOf('\\') === current.length - 1) {
5689
5037
  var next = this.nextToken;
5690
-
5691
5038
  if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
5692
5039
  word += this.requiredSpace(this.content(next));
5693
5040
  this.position++;
5694
5041
  }
5695
5042
  }
5696
-
5697
5043
  nextToken = this.nextToken;
5698
5044
  }
5699
-
5700
5045
  var hasClass = indexesOf(word, '.').filter(function (i) {
5701
5046
  // Allow escaped dot within class name
5702
- var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes
5703
-
5047
+ var escapedDot = word[i - 1] === '\\';
5048
+ // Allow decimal numbers percent in @keyframes
5704
5049
  var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
5705
5050
  return !escapedDot && !isKeyframesPercent;
5706
5051
  });
5707
5052
  var hasId = indexesOf(word, '#').filter(function (i) {
5708
5053
  return word[i - 1] !== '\\';
5709
- }); // Eliminate Sass interpolations from the list of id indexes
5710
-
5054
+ });
5055
+ // Eliminate Sass interpolations from the list of id indexes
5711
5056
  var interpolations = indexesOf(word, '#{');
5712
-
5713
5057
  if (interpolations.length) {
5714
5058
  hasId = hasId.filter(function (hashIndex) {
5715
5059
  return !~interpolations.indexOf(hashIndex);
5716
5060
  });
5717
5061
  }
5718
-
5719
5062
  var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
5720
5063
  indices.forEach(function (ind, i) {
5721
5064
  var index = indices[i + 1] || word.length;
5722
5065
  var value = word.slice(ind, index);
5723
-
5724
5066
  if (i === 0 && firstCallback) {
5725
5067
  return firstCallback.call(_this5, value, indices.length);
5726
5068
  }
5727
-
5728
5069
  var node;
5729
5070
  var current = _this5.currToken;
5730
5071
  var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];
5731
5072
  var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
5732
-
5733
5073
  if (~hasClass.indexOf(ind)) {
5734
5074
  var classNameOpts = {
5735
5075
  value: value.slice(1),
@@ -5753,136 +5093,105 @@ tokenTypes.combinator = combinator$1;
5753
5093
  unescapeProp(tagOpts, "value");
5754
5094
  node = new _tag["default"](tagOpts);
5755
5095
  }
5756
-
5757
- _this5.newNode(node, namespace); // Ensure that the namespace is used only once
5758
-
5759
-
5096
+ _this5.newNode(node, namespace);
5097
+ // Ensure that the namespace is used only once
5760
5098
  namespace = null;
5761
5099
  });
5762
5100
  this.position++;
5763
5101
  };
5764
-
5765
5102
  _proto.word = function word(namespace) {
5766
5103
  var nextToken = this.nextToken;
5767
-
5768
5104
  if (nextToken && this.content(nextToken) === '|') {
5769
5105
  this.position++;
5770
5106
  return this.namespace();
5771
5107
  }
5772
-
5773
5108
  return this.splitWord(namespace);
5774
5109
  };
5775
-
5776
5110
  _proto.loop = function loop() {
5777
5111
  while (this.position < this.tokens.length) {
5778
5112
  this.parse(true);
5779
5113
  }
5780
-
5781
5114
  this.current._inferEndPosition();
5782
-
5783
5115
  return this.root;
5784
5116
  };
5785
-
5786
5117
  _proto.parse = function parse(throwOnParenthesis) {
5787
5118
  switch (this.currToken[_tokenize.FIELDS.TYPE]) {
5788
5119
  case tokens.space:
5789
5120
  this.space();
5790
5121
  break;
5791
-
5792
5122
  case tokens.comment:
5793
5123
  this.comment();
5794
5124
  break;
5795
-
5796
5125
  case tokens.openParenthesis:
5797
5126
  this.parentheses();
5798
5127
  break;
5799
-
5800
5128
  case tokens.closeParenthesis:
5801
5129
  if (throwOnParenthesis) {
5802
5130
  this.missingParenthesis();
5803
5131
  }
5804
-
5805
5132
  break;
5806
-
5807
5133
  case tokens.openSquare:
5808
5134
  this.attribute();
5809
5135
  break;
5810
-
5811
5136
  case tokens.dollar:
5812
5137
  case tokens.caret:
5813
5138
  case tokens.equals:
5814
5139
  case tokens.word:
5815
5140
  this.word();
5816
5141
  break;
5817
-
5818
5142
  case tokens.colon:
5819
5143
  this.pseudo();
5820
5144
  break;
5821
-
5822
5145
  case tokens.comma:
5823
5146
  this.comma();
5824
5147
  break;
5825
-
5826
5148
  case tokens.asterisk:
5827
5149
  this.universal();
5828
5150
  break;
5829
-
5830
5151
  case tokens.ampersand:
5831
5152
  this.nesting();
5832
5153
  break;
5833
-
5834
5154
  case tokens.slash:
5835
5155
  case tokens.combinator:
5836
5156
  this.combinator();
5837
5157
  break;
5838
-
5839
5158
  case tokens.str:
5840
5159
  this.string();
5841
5160
  break;
5842
5161
  // These cases throw; no break needed.
5843
-
5844
5162
  case tokens.closeSquare:
5845
5163
  this.missingSquareBracket();
5846
-
5847
5164
  case tokens.semicolon:
5848
5165
  this.missingBackslash();
5849
-
5850
5166
  default:
5851
5167
  this.unexpected();
5852
5168
  }
5853
5169
  }
5170
+
5854
5171
  /**
5855
5172
  * Helpers
5856
- */
5857
- ;
5858
-
5173
+ */;
5859
5174
  _proto.expected = function expected(description, index, found) {
5860
5175
  if (Array.isArray(description)) {
5861
5176
  var last = description.pop();
5862
5177
  description = description.join(', ') + " or " + last;
5863
5178
  }
5864
-
5865
5179
  var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a';
5866
-
5867
5180
  if (!found) {
5868
5181
  return this.error("Expected " + an + " " + description + ".", {
5869
5182
  index: index
5870
5183
  });
5871
5184
  }
5872
-
5873
5185
  return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", {
5874
5186
  index: index
5875
5187
  });
5876
5188
  };
5877
-
5878
5189
  _proto.requiredSpace = function requiredSpace(space) {
5879
5190
  return this.options.lossy ? ' ' : space;
5880
5191
  };
5881
-
5882
5192
  _proto.optionalSpace = function optionalSpace(space) {
5883
5193
  return this.options.lossy ? '' : space;
5884
5194
  };
5885
-
5886
5195
  _proto.lossySpace = function lossySpace(space, required) {
5887
5196
  if (this.options.lossy) {
5888
5197
  return required ? ' ' : '';
@@ -5890,47 +5199,37 @@ tokenTypes.combinator = combinator$1;
5890
5199
  return space;
5891
5200
  }
5892
5201
  };
5893
-
5894
5202
  _proto.parseParenthesisToken = function parseParenthesisToken(token) {
5895
5203
  var content = this.content(token);
5896
-
5897
5204
  if (token[_tokenize.FIELDS.TYPE] === tokens.space) {
5898
5205
  return this.requiredSpace(content);
5899
5206
  } else {
5900
5207
  return content;
5901
5208
  }
5902
5209
  };
5903
-
5904
5210
  _proto.newNode = function newNode(node, namespace) {
5905
5211
  if (namespace) {
5906
5212
  if (/^ +$/.test(namespace)) {
5907
5213
  if (!this.options.lossy) {
5908
5214
  this.spaces = (this.spaces || '') + namespace;
5909
5215
  }
5910
-
5911
5216
  namespace = true;
5912
5217
  }
5913
-
5914
5218
  node.namespace = namespace;
5915
5219
  unescapeProp(node, "namespace");
5916
5220
  }
5917
-
5918
5221
  if (this.spaces) {
5919
5222
  node.spaces.before = this.spaces;
5920
5223
  this.spaces = '';
5921
5224
  }
5922
-
5923
5225
  return this.current.append(node);
5924
5226
  };
5925
-
5926
5227
  _proto.content = function content(token) {
5927
5228
  if (token === void 0) {
5928
5229
  token = this.currToken;
5929
5230
  }
5930
-
5931
5231
  return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
5932
5232
  };
5933
-
5934
5233
  /**
5935
5234
  * returns the index of the next non-whitespace, non-comment token.
5936
5235
  * returns -1 if no meaningful token is found.
@@ -5939,9 +5238,7 @@ tokenTypes.combinator = combinator$1;
5939
5238
  if (startPosition === void 0) {
5940
5239
  startPosition = this.position + 1;
5941
5240
  }
5942
-
5943
5241
  var searchPosition = startPosition;
5944
-
5945
5242
  while (searchPosition < this.tokens.length) {
5946
5243
  if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
5947
5244
  searchPosition++;
@@ -5950,10 +5247,8 @@ tokenTypes.combinator = combinator$1;
5950
5247
  return searchPosition;
5951
5248
  }
5952
5249
  }
5953
-
5954
5250
  return -1;
5955
5251
  };
5956
-
5957
5252
  _createClass(Parser, [{
5958
5253
  key: "currToken",
5959
5254
  get: function get() {
@@ -5970,10 +5265,8 @@ tokenTypes.combinator = combinator$1;
5970
5265
  return this.tokens[this.position - 1];
5971
5266
  }
5972
5267
  }]);
5973
-
5974
5268
  return Parser;
5975
5269
  }();
5976
-
5977
5270
  exports["default"] = Parser;
5978
5271
  module.exports = exports.default;
5979
5272
  } (parser, parser.exports));
@@ -5984,83 +5277,63 @@ var parserExports = parser.exports;
5984
5277
 
5985
5278
  exports.__esModule = true;
5986
5279
  exports["default"] = void 0;
5987
-
5988
5280
  var _parser = _interopRequireDefault(parserExports);
5989
-
5990
5281
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
5991
-
5992
5282
  var Processor = /*#__PURE__*/function () {
5993
5283
  function Processor(func, options) {
5994
5284
  this.func = func || function noop() {};
5995
-
5996
5285
  this.funcRes = null;
5997
5286
  this.options = options;
5998
5287
  }
5999
-
6000
5288
  var _proto = Processor.prototype;
6001
-
6002
5289
  _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
6003
5290
  if (options === void 0) {
6004
5291
  options = {};
6005
5292
  }
6006
-
6007
5293
  var merged = Object.assign({}, this.options, options);
6008
-
6009
5294
  if (merged.updateSelector === false) {
6010
5295
  return false;
6011
5296
  } else {
6012
5297
  return typeof rule !== "string";
6013
5298
  }
6014
5299
  };
6015
-
6016
5300
  _proto._isLossy = function _isLossy(options) {
6017
5301
  if (options === void 0) {
6018
5302
  options = {};
6019
5303
  }
6020
-
6021
5304
  var merged = Object.assign({}, this.options, options);
6022
-
6023
5305
  if (merged.lossless === false) {
6024
5306
  return true;
6025
5307
  } else {
6026
5308
  return false;
6027
5309
  }
6028
5310
  };
6029
-
6030
5311
  _proto._root = function _root(rule, options) {
6031
5312
  if (options === void 0) {
6032
5313
  options = {};
6033
5314
  }
6034
-
6035
5315
  var parser = new _parser["default"](rule, this._parseOptions(options));
6036
5316
  return parser.root;
6037
5317
  };
6038
-
6039
5318
  _proto._parseOptions = function _parseOptions(options) {
6040
5319
  return {
6041
5320
  lossy: this._isLossy(options)
6042
5321
  };
6043
5322
  };
6044
-
6045
5323
  _proto._run = function _run(rule, options) {
6046
5324
  var _this = this;
6047
-
6048
5325
  if (options === void 0) {
6049
5326
  options = {};
6050
5327
  }
6051
-
6052
5328
  return new Promise(function (resolve, reject) {
6053
5329
  try {
6054
5330
  var root = _this._root(rule, options);
6055
-
6056
5331
  Promise.resolve(_this.func(root)).then(function (transform) {
6057
5332
  var string = undefined;
6058
-
6059
5333
  if (_this._shouldUpdateSelector(rule, options)) {
6060
5334
  string = root.toString();
6061
5335
  rule.selector = string;
6062
5336
  }
6063
-
6064
5337
  return {
6065
5338
  transform: transform,
6066
5339
  root: root,
@@ -6073,117 +5346,101 @@ var parserExports = parser.exports;
6073
5346
  }
6074
5347
  });
6075
5348
  };
6076
-
6077
5349
  _proto._runSync = function _runSync(rule, options) {
6078
5350
  if (options === void 0) {
6079
5351
  options = {};
6080
5352
  }
6081
-
6082
5353
  var root = this._root(rule, options);
6083
-
6084
5354
  var transform = this.func(root);
6085
-
6086
5355
  if (transform && typeof transform.then === "function") {
6087
5356
  throw new Error("Selector processor returned a promise to a synchronous call.");
6088
5357
  }
6089
-
6090
5358
  var string = undefined;
6091
-
6092
5359
  if (options.updateSelector && typeof rule !== "string") {
6093
5360
  string = root.toString();
6094
5361
  rule.selector = string;
6095
5362
  }
6096
-
6097
5363
  return {
6098
5364
  transform: transform,
6099
5365
  root: root,
6100
5366
  string: string
6101
5367
  };
6102
5368
  }
5369
+
6103
5370
  /**
6104
5371
  * Process rule into a selector AST.
6105
5372
  *
6106
5373
  * @param rule {postcss.Rule | string} The css selector to be processed
6107
5374
  * @param options The options for processing
6108
5375
  * @returns {Promise<parser.Root>} The AST of the selector after processing it.
6109
- */
6110
- ;
6111
-
5376
+ */;
6112
5377
  _proto.ast = function ast(rule, options) {
6113
5378
  return this._run(rule, options).then(function (result) {
6114
5379
  return result.root;
6115
5380
  });
6116
5381
  }
5382
+
6117
5383
  /**
6118
5384
  * Process rule into a selector AST synchronously.
6119
5385
  *
6120
5386
  * @param rule {postcss.Rule | string} The css selector to be processed
6121
5387
  * @param options The options for processing
6122
5388
  * @returns {parser.Root} The AST of the selector after processing it.
6123
- */
6124
- ;
6125
-
5389
+ */;
6126
5390
  _proto.astSync = function astSync(rule, options) {
6127
5391
  return this._runSync(rule, options).root;
6128
5392
  }
5393
+
6129
5394
  /**
6130
5395
  * Process a selector into a transformed value asynchronously
6131
5396
  *
6132
5397
  * @param rule {postcss.Rule | string} The css selector to be processed
6133
5398
  * @param options The options for processing
6134
5399
  * @returns {Promise<any>} The value returned by the processor.
6135
- */
6136
- ;
6137
-
5400
+ */;
6138
5401
  _proto.transform = function transform(rule, options) {
6139
5402
  return this._run(rule, options).then(function (result) {
6140
5403
  return result.transform;
6141
5404
  });
6142
5405
  }
5406
+
6143
5407
  /**
6144
5408
  * Process a selector into a transformed value synchronously.
6145
5409
  *
6146
5410
  * @param rule {postcss.Rule | string} The css selector to be processed
6147
5411
  * @param options The options for processing
6148
5412
  * @returns {any} The value returned by the processor.
6149
- */
6150
- ;
6151
-
5413
+ */;
6152
5414
  _proto.transformSync = function transformSync(rule, options) {
6153
5415
  return this._runSync(rule, options).transform;
6154
5416
  }
5417
+
6155
5418
  /**
6156
5419
  * Process a selector into a new selector string asynchronously.
6157
5420
  *
6158
5421
  * @param rule {postcss.Rule | string} The css selector to be processed
6159
5422
  * @param options The options for processing
6160
5423
  * @returns {string} the selector after processing.
6161
- */
6162
- ;
6163
-
5424
+ */;
6164
5425
  _proto.process = function process(rule, options) {
6165
5426
  return this._run(rule, options).then(function (result) {
6166
5427
  return result.string || result.root.toString();
6167
5428
  });
6168
5429
  }
5430
+
6169
5431
  /**
6170
5432
  * Process a selector into a new selector string synchronously.
6171
5433
  *
6172
5434
  * @param rule {postcss.Rule | string} The css selector to be processed
6173
5435
  * @param options The options for processing
6174
5436
  * @returns {string} the selector after processing.
6175
- */
6176
- ;
6177
-
5437
+ */;
6178
5438
  _proto.processSync = function processSync(rule, options) {
6179
5439
  var result = this._runSync(rule, options);
6180
-
6181
5440
  return result.string || result.root.toString();
6182
5441
  };
6183
-
6184
5442
  return Processor;
6185
5443
  }();
6186
-
6187
5444
  exports["default"] = Processor;
6188
5445
  module.exports = exports.default;
6189
5446
  } (processor, processor.exports));
@@ -6196,129 +5453,90 @@ var constructors = {};
6196
5453
 
6197
5454
  constructors.__esModule = true;
6198
5455
  constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0;
6199
-
6200
5456
  var _attribute = _interopRequireDefault$2(attribute$1);
6201
-
6202
5457
  var _className = _interopRequireDefault$2(classNameExports);
6203
-
6204
5458
  var _combinator = _interopRequireDefault$2(combinatorExports);
6205
-
6206
5459
  var _comment = _interopRequireDefault$2(commentExports);
6207
-
6208
5460
  var _id = _interopRequireDefault$2(idExports);
6209
-
6210
5461
  var _nesting = _interopRequireDefault$2(nestingExports);
6211
-
6212
5462
  var _pseudo = _interopRequireDefault$2(pseudoExports);
6213
-
6214
5463
  var _root = _interopRequireDefault$2(rootExports);
6215
-
6216
5464
  var _selector = _interopRequireDefault$2(selectorExports);
6217
-
6218
5465
  var _string = _interopRequireDefault$2(stringExports);
6219
-
6220
5466
  var _tag = _interopRequireDefault$2(tagExports);
6221
-
6222
5467
  var _universal = _interopRequireDefault$2(universalExports);
6223
-
6224
5468
  function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
6225
-
6226
5469
  var attribute = function attribute(opts) {
6227
5470
  return new _attribute["default"](opts);
6228
5471
  };
6229
-
6230
5472
  constructors.attribute = attribute;
6231
-
6232
5473
  var className = function className(opts) {
6233
5474
  return new _className["default"](opts);
6234
5475
  };
6235
-
6236
5476
  constructors.className = className;
6237
-
6238
5477
  var combinator = function combinator(opts) {
6239
5478
  return new _combinator["default"](opts);
6240
5479
  };
6241
-
6242
5480
  constructors.combinator = combinator;
6243
-
6244
5481
  var comment = function comment(opts) {
6245
5482
  return new _comment["default"](opts);
6246
5483
  };
6247
-
6248
5484
  constructors.comment = comment;
6249
-
6250
5485
  var id = function id(opts) {
6251
5486
  return new _id["default"](opts);
6252
5487
  };
6253
-
6254
5488
  constructors.id = id;
6255
-
6256
5489
  var nesting = function nesting(opts) {
6257
5490
  return new _nesting["default"](opts);
6258
5491
  };
6259
-
6260
5492
  constructors.nesting = nesting;
6261
-
6262
5493
  var pseudo = function pseudo(opts) {
6263
5494
  return new _pseudo["default"](opts);
6264
5495
  };
6265
-
6266
5496
  constructors.pseudo = pseudo;
6267
-
6268
5497
  var root = function root(opts) {
6269
5498
  return new _root["default"](opts);
6270
5499
  };
6271
-
6272
5500
  constructors.root = root;
6273
-
6274
5501
  var selector = function selector(opts) {
6275
5502
  return new _selector["default"](opts);
6276
5503
  };
6277
-
6278
5504
  constructors.selector = selector;
6279
-
6280
5505
  var string = function string(opts) {
6281
5506
  return new _string["default"](opts);
6282
5507
  };
6283
-
6284
5508
  constructors.string = string;
6285
-
6286
5509
  var tag = function tag(opts) {
6287
5510
  return new _tag["default"](opts);
6288
5511
  };
6289
-
6290
5512
  constructors.tag = tag;
6291
-
6292
5513
  var universal = function universal(opts) {
6293
5514
  return new _universal["default"](opts);
6294
5515
  };
6295
-
6296
5516
  constructors.universal = universal;
6297
5517
 
6298
5518
  var guards = {};
6299
5519
 
6300
5520
  guards.__esModule = true;
6301
- guards.isNode = isNode;
6302
- guards.isPseudoElement = isPseudoElement;
6303
- guards.isPseudoClass = isPseudoClass;
5521
+ guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0;
6304
5522
  guards.isContainer = isContainer;
5523
+ guards.isIdentifier = void 0;
6305
5524
  guards.isNamespace = isNamespace;
6306
- guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = guards.isPseudo = guards.isNesting = guards.isIdentifier = guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0;
6307
-
5525
+ guards.isNesting = void 0;
5526
+ guards.isNode = isNode;
5527
+ guards.isPseudo = void 0;
5528
+ guards.isPseudoClass = isPseudoClass;
5529
+ guards.isPseudoElement = isPseudoElement;
5530
+ guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0;
6308
5531
  var _types = types;
6309
-
6310
5532
  var _IS_TYPE;
6311
-
6312
5533
  var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
6313
-
6314
5534
  function isNode(node) {
6315
5535
  return typeof node === "object" && IS_TYPE[node.type];
6316
5536
  }
6317
-
6318
5537
  function isNodeType(type, node) {
6319
5538
  return isNode(node) && node.type === type;
6320
5539
  }
6321
-
6322
5540
  var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
6323
5541
  guards.isAttribute = isAttribute;
6324
5542
  var isClassName = isNodeType.bind(null, _types.CLASS);
@@ -6343,19 +5561,15 @@ var isTag = isNodeType.bind(null, _types.TAG);
6343
5561
  guards.isTag = isTag;
6344
5562
  var isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
6345
5563
  guards.isUniversal = isUniversal;
6346
-
6347
5564
  function isPseudoElement(node) {
6348
5565
  return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
6349
5566
  }
6350
-
6351
5567
  function isPseudoClass(node) {
6352
5568
  return isPseudo(node) && !isPseudoElement(node);
6353
5569
  }
6354
-
6355
5570
  function isContainer(node) {
6356
5571
  return !!(isNode(node) && node.walk);
6357
5572
  }
6358
-
6359
5573
  function isNamespace(node) {
6360
5574
  return isAttribute(node) || isTag(node);
6361
5575
  }
@@ -6363,25 +5577,19 @@ function isNamespace(node) {
6363
5577
  (function (exports) {
6364
5578
 
6365
5579
  exports.__esModule = true;
6366
-
6367
5580
  var _types = types;
6368
-
6369
5581
  Object.keys(_types).forEach(function (key) {
6370
5582
  if (key === "default" || key === "__esModule") return;
6371
5583
  if (key in exports && exports[key] === _types[key]) return;
6372
5584
  exports[key] = _types[key];
6373
5585
  });
6374
-
6375
5586
  var _constructors = constructors;
6376
-
6377
5587
  Object.keys(_constructors).forEach(function (key) {
6378
5588
  if (key === "default" || key === "__esModule") return;
6379
5589
  if (key in exports && exports[key] === _constructors[key]) return;
6380
5590
  exports[key] = _constructors[key];
6381
5591
  });
6382
-
6383
5592
  var _guards = guards;
6384
-
6385
5593
  Object.keys(_guards).forEach(function (key) {
6386
5594
  if (key === "default" || key === "__esModule") return;
6387
5595
  if (key in exports && exports[key] === _guards[key]) return;
@@ -6393,21 +5601,14 @@ function isNamespace(node) {
6393
5601
 
6394
5602
  exports.__esModule = true;
6395
5603
  exports["default"] = void 0;
6396
-
6397
5604
  var _processor = _interopRequireDefault(processorExports);
6398
-
6399
5605
  var selectors$1 = _interopRequireWildcard(selectors);
6400
-
6401
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
6402
-
6403
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
6404
-
5606
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
5607
+ function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
6405
5608
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
6406
-
6407
5609
  var parser = function parser(processor) {
6408
5610
  return new _processor["default"](processor);
6409
5611
  };
6410
-
6411
5612
  Object.assign(parser, selectors$1);
6412
5613
  delete parser.__esModule;
6413
5614
  var _default = parser;