@fumadocs/tailwind 0.0.4 → 0.1.0
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.
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/typography/index.mjs +1678 -1332
- package/package.json +12 -14
- package/dist/compile.d.mts +0 -6
- package/dist/compile.mjs +0 -11
|
@@ -7,7 +7,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
7
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
10
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
12
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
13
|
key = keys[i];
|
|
@@ -22,7 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
value: mod,
|
|
23
23
|
enumerable: true
|
|
24
24
|
}) : target, mod));
|
|
25
|
-
var __require = /*
|
|
25
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/typography/styles.ts
|
|
28
28
|
function round(num) {
|
|
@@ -473,13 +473,13 @@ var require_deepmerge = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
473
473
|
Object.defineProperty(module.exports, "isMergeableObject", { get: defaultIsMergeableObjectFactory });
|
|
474
474
|
}));
|
|
475
475
|
//#endregion
|
|
476
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
477
|
-
var require_unesc = /* @__PURE__ */ __commonJSMin(((exports
|
|
478
|
-
exports
|
|
479
|
-
exports
|
|
476
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/unesc.js
|
|
477
|
+
var require_unesc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
478
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
479
|
+
exports.default = unesc;
|
|
480
480
|
/**
|
|
481
|
-
*
|
|
482
|
-
* @param {string} str
|
|
481
|
+
*
|
|
482
|
+
* @param {string} str
|
|
483
483
|
* @returns {[string, number]|undefined}
|
|
484
484
|
*/
|
|
485
485
|
function gobbleHex(str) {
|
|
@@ -522,15 +522,15 @@ var require_unesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
522
522
|
}
|
|
523
523
|
return ret;
|
|
524
524
|
}
|
|
525
|
-
module.exports = exports.default;
|
|
526
525
|
}));
|
|
527
526
|
//#endregion
|
|
528
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
529
|
-
var require_getProp = /* @__PURE__ */ __commonJSMin(((exports
|
|
530
|
-
exports
|
|
531
|
-
exports
|
|
527
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/getProp.js
|
|
528
|
+
var require_getProp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
529
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
530
|
+
exports.default = getProp;
|
|
532
531
|
function getProp(obj) {
|
|
533
|
-
|
|
532
|
+
var props = [];
|
|
533
|
+
for (var _i = 1; _i < arguments.length; _i++) props[_i - 1] = arguments[_i];
|
|
534
534
|
while (props.length > 0) {
|
|
535
535
|
var prop = props.shift();
|
|
536
536
|
if (!obj[prop]) return;
|
|
@@ -538,28 +538,27 @@ var require_getProp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
538
538
|
}
|
|
539
539
|
return obj;
|
|
540
540
|
}
|
|
541
|
-
module.exports = exports.default;
|
|
542
541
|
}));
|
|
543
542
|
//#endregion
|
|
544
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
545
|
-
var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports
|
|
546
|
-
exports
|
|
547
|
-
exports
|
|
543
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/ensureObject.js
|
|
544
|
+
var require_ensureObject = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
545
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
546
|
+
exports.default = ensureObject;
|
|
548
547
|
function ensureObject(obj) {
|
|
549
|
-
|
|
548
|
+
var props = [];
|
|
549
|
+
for (var _i = 1; _i < arguments.length; _i++) props[_i - 1] = arguments[_i];
|
|
550
550
|
while (props.length > 0) {
|
|
551
551
|
var prop = props.shift();
|
|
552
552
|
if (!obj[prop]) obj[prop] = {};
|
|
553
553
|
obj = obj[prop];
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
module.exports = exports.default;
|
|
557
556
|
}));
|
|
558
557
|
//#endregion
|
|
559
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
560
|
-
var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports
|
|
561
|
-
exports
|
|
562
|
-
exports
|
|
558
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/stripComments.js
|
|
559
|
+
var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
560
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
561
|
+
exports.default = stripComments;
|
|
563
562
|
function stripComments(str) {
|
|
564
563
|
var s = "";
|
|
565
564
|
var commentStart = str.indexOf("/*");
|
|
@@ -574,43 +573,92 @@ var require_stripComments = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
574
573
|
s = s + str.slice(lastEnd);
|
|
575
574
|
return s;
|
|
576
575
|
}
|
|
577
|
-
module.exports = exports.default;
|
|
578
576
|
}));
|
|
579
577
|
//#endregion
|
|
580
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
581
|
-
var
|
|
582
|
-
exports
|
|
583
|
-
exports.
|
|
584
|
-
exports.
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
578
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/maxNestingDepth.js
|
|
579
|
+
var require_maxNestingDepth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
580
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
581
|
+
exports.MAX_NESTING_DEPTH = void 0;
|
|
582
|
+
exports.default = resolveMaxNestingDepth;
|
|
583
|
+
/**
|
|
584
|
+
* The default maximum selector nesting depth allowed when parsing or
|
|
585
|
+
* serializing a selector. Going beyond this would otherwise recurse deeply
|
|
586
|
+
* enough to overflow the call stack (CVE-2026-9358 / CWE-674). Real-world
|
|
587
|
+
* selectors never get anywhere near this, so it acts purely as a safety net
|
|
588
|
+
* that turns an uncatchable stack overflow into a catchable error.
|
|
589
|
+
*/
|
|
590
|
+
exports.MAX_NESTING_DEPTH = 256;
|
|
591
|
+
/**
|
|
592
|
+
* Coerce a user-supplied nesting-depth limit into a safe value. Anything that
|
|
593
|
+
* is not a non-negative safe integer (NaN, Infinity, negative numbers, or a
|
|
594
|
+
* non-number) would disable or break the guard, so it falls back to the
|
|
595
|
+
* default.
|
|
596
|
+
*
|
|
597
|
+
* @param {unknown} value the limit provided through the `maxNestingDepth` option
|
|
598
|
+
* @returns {number} a safe, non-negative integer limit
|
|
599
|
+
*/
|
|
600
|
+
function resolveMaxNestingDepth(value) {
|
|
601
|
+
return Number.isSafeInteger(value) && value >= 0 ? value : exports.MAX_NESTING_DEPTH;
|
|
590
602
|
}
|
|
591
603
|
}));
|
|
592
604
|
//#endregion
|
|
593
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
594
|
-
var
|
|
595
|
-
exports.
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/util/index.js
|
|
606
|
+
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
607
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
608
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
609
|
+
};
|
|
610
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
611
|
+
exports.MAX_NESTING_DEPTH = exports.resolveMaxNestingDepth = exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0;
|
|
612
|
+
var unesc_1 = require_unesc();
|
|
613
|
+
Object.defineProperty(exports, "unesc", {
|
|
614
|
+
enumerable: true,
|
|
615
|
+
get: function() {
|
|
616
|
+
return __importDefault(unesc_1).default;
|
|
605
617
|
}
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
618
|
+
});
|
|
619
|
+
var getProp_1 = require_getProp();
|
|
620
|
+
Object.defineProperty(exports, "getProp", {
|
|
621
|
+
enumerable: true,
|
|
622
|
+
get: function() {
|
|
623
|
+
return __importDefault(getProp_1).default;
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
var ensureObject_1 = require_ensureObject();
|
|
627
|
+
Object.defineProperty(exports, "ensureObject", {
|
|
628
|
+
enumerable: true,
|
|
629
|
+
get: function() {
|
|
630
|
+
return __importDefault(ensureObject_1).default;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
var stripComments_1 = require_stripComments();
|
|
634
|
+
Object.defineProperty(exports, "stripComments", {
|
|
635
|
+
enumerable: true,
|
|
636
|
+
get: function() {
|
|
637
|
+
return __importDefault(stripComments_1).default;
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
var maxNestingDepth_1 = require_maxNestingDepth();
|
|
641
|
+
Object.defineProperty(exports, "resolveMaxNestingDepth", {
|
|
642
|
+
enumerable: true,
|
|
643
|
+
get: function() {
|
|
644
|
+
return __importDefault(maxNestingDepth_1).default;
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
Object.defineProperty(exports, "MAX_NESTING_DEPTH", {
|
|
648
|
+
enumerable: true,
|
|
649
|
+
get: function() {
|
|
650
|
+
return maxNestingDepth_1.MAX_NESTING_DEPTH;
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
}));
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/node.js
|
|
656
|
+
var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
657
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
658
|
+
var util_1 = require_util();
|
|
659
|
+
var cloneNode = function(obj, parent, depth) {
|
|
660
|
+
if (depth === void 0) depth = 0;
|
|
661
|
+
if (depth > util_1.MAX_NESTING_DEPTH) throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(util_1.MAX_NESTING_DEPTH, "."));
|
|
614
662
|
if (typeof obj !== "object" || obj === null) return obj;
|
|
615
663
|
var cloned = new obj.constructor();
|
|
616
664
|
for (var i in obj) {
|
|
@@ -619,13 +667,13 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
619
667
|
if (i === "parent" && typeof value === "object") {
|
|
620
668
|
if (parent) cloned[i] = parent;
|
|
621
669
|
} else if (value instanceof Array) cloned[i] = value.map(function(j) {
|
|
622
|
-
return cloneNode(j, cloned);
|
|
670
|
+
return cloneNode(j, cloned, depth + 1);
|
|
623
671
|
});
|
|
624
|
-
else cloned[i] = cloneNode(value, cloned);
|
|
672
|
+
else cloned[i] = cloneNode(value, cloned, depth + 1);
|
|
625
673
|
}
|
|
626
674
|
return cloned;
|
|
627
675
|
};
|
|
628
|
-
exports
|
|
676
|
+
exports.default = function() {
|
|
629
677
|
function Node(opts) {
|
|
630
678
|
if (opts === void 0) opts = {};
|
|
631
679
|
Object.assign(this, opts);
|
|
@@ -633,32 +681,40 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
633
681
|
this.spaces.before = this.spaces.before || "";
|
|
634
682
|
this.spaces.after = this.spaces.after || "";
|
|
635
683
|
}
|
|
636
|
-
|
|
637
|
-
_proto.remove = function remove() {
|
|
684
|
+
Node.prototype.remove = function() {
|
|
638
685
|
if (this.parent) this.parent.removeChild(this);
|
|
639
686
|
this.parent = void 0;
|
|
640
687
|
return this;
|
|
641
688
|
};
|
|
642
|
-
|
|
689
|
+
Node.prototype.replaceWith = function() {
|
|
643
690
|
if (this.parent) {
|
|
644
691
|
for (var index in arguments) this.parent.insertBefore(this, arguments[index]);
|
|
645
692
|
this.remove();
|
|
646
693
|
}
|
|
647
694
|
return this;
|
|
648
695
|
};
|
|
649
|
-
|
|
696
|
+
Node.prototype.next = function() {
|
|
650
697
|
return this.parent.at(this.parent.index(this) + 1);
|
|
651
698
|
};
|
|
652
|
-
|
|
699
|
+
Node.prototype.prev = function() {
|
|
653
700
|
return this.parent.at(this.parent.index(this) - 1);
|
|
654
701
|
};
|
|
655
|
-
|
|
702
|
+
Node.prototype.clone = function(overrides) {
|
|
656
703
|
if (overrides === void 0) overrides = {};
|
|
657
704
|
var cloned = cloneNode(this);
|
|
658
705
|
for (var name in overrides) cloned[name] = overrides[name];
|
|
659
706
|
return cloned;
|
|
660
707
|
};
|
|
661
|
-
|
|
708
|
+
/**
|
|
709
|
+
* Some non-standard syntax doesn't follow normal escaping rules for css.
|
|
710
|
+
* This allows non standard syntax to be appended to an existing property
|
|
711
|
+
* by specifying the escaped value. By specifying the escaped value,
|
|
712
|
+
* illegal characters are allowed to be directly inserted into css output.
|
|
713
|
+
* @param {string} name the property to set
|
|
714
|
+
* @param {any} value the unescaped value of the property
|
|
715
|
+
* @param {string} valueEscaped optional. the escaped value of the property.
|
|
716
|
+
*/
|
|
717
|
+
Node.prototype.appendToPropertyAndEscape = function(name, value, valueEscaped) {
|
|
662
718
|
if (!this.raws) this.raws = {};
|
|
663
719
|
var originalValue = this[name];
|
|
664
720
|
var originalEscaped = this.raws[name];
|
|
@@ -666,16 +722,36 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
666
722
|
if (originalEscaped || valueEscaped !== value) this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
|
|
667
723
|
else delete this.raws[name];
|
|
668
724
|
};
|
|
669
|
-
|
|
725
|
+
/**
|
|
726
|
+
* Some non-standard syntax doesn't follow normal escaping rules for css.
|
|
727
|
+
* This allows the escaped value to be specified directly, allowing illegal
|
|
728
|
+
* characters to be directly inserted into css output.
|
|
729
|
+
* @param {string} name the property to set
|
|
730
|
+
* @param {any} value the unescaped value of the property
|
|
731
|
+
* @param {string} valueEscaped the escaped value of the property.
|
|
732
|
+
*/
|
|
733
|
+
Node.prototype.setPropertyAndEscape = function(name, value, valueEscaped) {
|
|
670
734
|
if (!this.raws) this.raws = {};
|
|
671
735
|
this[name] = value;
|
|
672
736
|
this.raws[name] = valueEscaped;
|
|
673
737
|
};
|
|
674
|
-
|
|
738
|
+
/**
|
|
739
|
+
* When you want a value to passed through to CSS directly. This method
|
|
740
|
+
* deletes the corresponding raw value causing the stringifier to fallback
|
|
741
|
+
* to the unescaped value.
|
|
742
|
+
* @param {string} name the property to set.
|
|
743
|
+
* @param {any} value The value that is both escaped and unescaped.
|
|
744
|
+
*/
|
|
745
|
+
Node.prototype.setPropertyWithoutEscape = function(name, value) {
|
|
675
746
|
this[name] = value;
|
|
676
747
|
if (this.raws) delete this.raws[name];
|
|
677
748
|
};
|
|
678
|
-
|
|
749
|
+
/**
|
|
750
|
+
*
|
|
751
|
+
* @param {number} line The number (starting with 1)
|
|
752
|
+
* @param {number} column The column number (starting with 1)
|
|
753
|
+
*/
|
|
754
|
+
Node.prototype.isAtPosition = function(line, column) {
|
|
679
755
|
if (this.source && this.source.start && this.source.end) {
|
|
680
756
|
if (this.source.start.line > line) return false;
|
|
681
757
|
if (this.source.end.line < line) return false;
|
|
@@ -684,51 +760,56 @@ var require_node$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
684
760
|
return true;
|
|
685
761
|
}
|
|
686
762
|
};
|
|
687
|
-
|
|
763
|
+
Node.prototype.stringifyProperty = function(name) {
|
|
688
764
|
return this.raws && this.raws[name] || this[name];
|
|
689
765
|
};
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
};
|
|
693
|
-
_proto.toString = function toString() {
|
|
694
|
-
return [
|
|
695
|
-
this.rawSpaceBefore,
|
|
696
|
-
this.valueToString(),
|
|
697
|
-
this.rawSpaceAfter
|
|
698
|
-
].join("");
|
|
699
|
-
};
|
|
700
|
-
_createClass(Node, [{
|
|
701
|
-
key: "rawSpaceBefore",
|
|
702
|
-
get: function get() {
|
|
766
|
+
Object.defineProperty(Node.prototype, "rawSpaceBefore", {
|
|
767
|
+
get: function() {
|
|
703
768
|
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
|
|
704
769
|
if (rawSpace === void 0) rawSpace = this.spaces && this.spaces.before;
|
|
705
770
|
return rawSpace || "";
|
|
706
771
|
},
|
|
707
|
-
set: function
|
|
708
|
-
(0,
|
|
772
|
+
set: function(raw) {
|
|
773
|
+
(0, util_1.ensureObject)(this, "raws", "spaces");
|
|
709
774
|
this.raws.spaces.before = raw;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
775
|
+
},
|
|
776
|
+
enumerable: false,
|
|
777
|
+
configurable: true
|
|
778
|
+
});
|
|
779
|
+
Object.defineProperty(Node.prototype, "rawSpaceAfter", {
|
|
780
|
+
get: function() {
|
|
714
781
|
var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
|
|
715
782
|
if (rawSpace === void 0) rawSpace = this.spaces.after;
|
|
716
783
|
return rawSpace || "";
|
|
717
784
|
},
|
|
718
|
-
set: function
|
|
719
|
-
(0,
|
|
785
|
+
set: function(raw) {
|
|
786
|
+
(0, util_1.ensureObject)(this, "raws", "spaces");
|
|
720
787
|
this.raws.spaces.after = raw;
|
|
721
|
-
}
|
|
722
|
-
|
|
788
|
+
},
|
|
789
|
+
enumerable: false,
|
|
790
|
+
configurable: true
|
|
791
|
+
});
|
|
792
|
+
Node.prototype.valueToString = function() {
|
|
793
|
+
return String(this.stringifyProperty("value"));
|
|
794
|
+
};
|
|
795
|
+
Node.prototype.toString = function() {
|
|
796
|
+
return [
|
|
797
|
+
this.rawSpaceBefore,
|
|
798
|
+
this.valueToString(),
|
|
799
|
+
this.rawSpaceAfter
|
|
800
|
+
].join("");
|
|
801
|
+
};
|
|
802
|
+
Node.prototype._stringify = function() {
|
|
803
|
+
return this.toString();
|
|
804
|
+
};
|
|
723
805
|
return Node;
|
|
724
806
|
}();
|
|
725
|
-
module.exports = exports.default;
|
|
726
807
|
}));
|
|
727
808
|
//#endregion
|
|
728
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
809
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/types.js
|
|
729
810
|
var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
730
|
-
exports
|
|
731
|
-
exports.UNIVERSAL = exports.
|
|
811
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
812
|
+
exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0;
|
|
732
813
|
exports.TAG = "tag";
|
|
733
814
|
exports.STRING = "string";
|
|
734
815
|
exports.SELECTOR = "selector";
|
|
@@ -743,122 +824,159 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
743
824
|
exports.UNIVERSAL = "universal";
|
|
744
825
|
}));
|
|
745
826
|
//#endregion
|
|
746
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
747
|
-
var require_container = /* @__PURE__ */ __commonJSMin(((exports
|
|
748
|
-
exports.
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
function
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
827
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/container.js
|
|
828
|
+
var require_container = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
829
|
+
var __extends = exports && exports.__extends || (function() {
|
|
830
|
+
var extendStatics = function(d, b) {
|
|
831
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
832
|
+
d.__proto__ = b;
|
|
833
|
+
} || function(d, b) {
|
|
834
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
835
|
+
};
|
|
836
|
+
return extendStatics(d, b);
|
|
837
|
+
};
|
|
838
|
+
return function(d, b) {
|
|
839
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
840
|
+
extendStatics(d, b);
|
|
841
|
+
function __() {
|
|
842
|
+
this.constructor = d;
|
|
843
|
+
}
|
|
844
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
845
|
+
};
|
|
846
|
+
})();
|
|
847
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
848
|
+
if (k2 === void 0) k2 = k;
|
|
849
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
850
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
851
|
+
enumerable: true,
|
|
852
|
+
get: function() {
|
|
853
|
+
return m[k];
|
|
854
|
+
}
|
|
855
|
+
};
|
|
856
|
+
Object.defineProperty(o, k2, desc);
|
|
857
|
+
}) : (function(o, m, k, k2) {
|
|
858
|
+
if (k2 === void 0) k2 = k;
|
|
859
|
+
o[k2] = m[k];
|
|
860
|
+
}));
|
|
861
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
862
|
+
Object.defineProperty(o, "default", {
|
|
863
|
+
enumerable: true,
|
|
864
|
+
value: v
|
|
865
|
+
});
|
|
866
|
+
}) : function(o, v) {
|
|
867
|
+
o["default"] = v;
|
|
868
|
+
});
|
|
869
|
+
var __importStar = exports && exports.__importStar || (function() {
|
|
870
|
+
var ownKeys = function(o) {
|
|
871
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
872
|
+
var ar = [];
|
|
873
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
874
|
+
return ar;
|
|
791
875
|
};
|
|
876
|
+
return ownKeys(o);
|
|
877
|
+
};
|
|
878
|
+
return function(mod) {
|
|
879
|
+
if (mod && mod.__esModule) return mod;
|
|
880
|
+
var result = {};
|
|
881
|
+
if (mod != null) {
|
|
882
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
883
|
+
}
|
|
884
|
+
__setModuleDefault(result, mod);
|
|
885
|
+
return result;
|
|
886
|
+
};
|
|
887
|
+
})();
|
|
888
|
+
var __values = exports && exports.__values || function(o) {
|
|
889
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
890
|
+
if (m) return m.call(o);
|
|
891
|
+
if (o && typeof o.length === "number") return { next: function() {
|
|
892
|
+
if (o && i >= o.length) o = void 0;
|
|
893
|
+
return {
|
|
894
|
+
value: o && o[i++],
|
|
895
|
+
done: !o
|
|
896
|
+
};
|
|
897
|
+
} };
|
|
898
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
899
|
+
};
|
|
900
|
+
var __read = exports && exports.__read || function(o, n) {
|
|
901
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
902
|
+
if (!m) return o;
|
|
903
|
+
var i = m.call(o), r, ar = [], e;
|
|
904
|
+
try {
|
|
905
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
906
|
+
} catch (error) {
|
|
907
|
+
e = { error };
|
|
908
|
+
} finally {
|
|
909
|
+
try {
|
|
910
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
911
|
+
} finally {
|
|
912
|
+
if (e) throw e.error;
|
|
913
|
+
}
|
|
792
914
|
}
|
|
793
|
-
|
|
794
|
-
}
|
|
795
|
-
function
|
|
796
|
-
if (
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
802
|
-
}
|
|
803
|
-
function _arrayLikeToArray(arr, len) {
|
|
804
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
805
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
806
|
-
return arr2;
|
|
807
|
-
}
|
|
808
|
-
function _defineProperties(target, props) {
|
|
809
|
-
for (var i = 0; i < props.length; i++) {
|
|
810
|
-
var descriptor = props[i];
|
|
811
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
812
|
-
descriptor.configurable = true;
|
|
813
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
814
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
915
|
+
return ar;
|
|
916
|
+
};
|
|
917
|
+
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
918
|
+
if (pack || arguments.length === 2) {
|
|
919
|
+
for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {
|
|
920
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
921
|
+
ar[i] = from[i];
|
|
922
|
+
}
|
|
815
923
|
}
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
function _setPrototypeOf(o, p) {
|
|
829
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
830
|
-
o.__proto__ = p;
|
|
831
|
-
return o;
|
|
832
|
-
};
|
|
833
|
-
return _setPrototypeOf(o, p);
|
|
834
|
-
}
|
|
835
|
-
exports["default"] = /* @__PURE__ */ function(_Node) {
|
|
836
|
-
_inheritsLoose(Container, _Node);
|
|
924
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
925
|
+
};
|
|
926
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
927
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
928
|
+
};
|
|
929
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
930
|
+
var util_1 = require_util();
|
|
931
|
+
var node_1 = __importDefault(require_node$1());
|
|
932
|
+
var types = __importStar(require_types());
|
|
933
|
+
exports.default = function(_super) {
|
|
934
|
+
__extends(Container, _super);
|
|
837
935
|
function Container(opts) {
|
|
838
|
-
var _this =
|
|
936
|
+
var _this = _super.call(this, opts) || this;
|
|
839
937
|
if (!_this.nodes) _this.nodes = [];
|
|
840
938
|
return _this;
|
|
841
939
|
}
|
|
842
|
-
|
|
843
|
-
_proto.append = function append(selector) {
|
|
940
|
+
Container.prototype.append = function(selector) {
|
|
844
941
|
selector.parent = this;
|
|
845
942
|
this.nodes.push(selector);
|
|
846
943
|
return this;
|
|
847
944
|
};
|
|
848
|
-
|
|
945
|
+
Container.prototype.prepend = function(selector) {
|
|
849
946
|
selector.parent = this;
|
|
850
947
|
this.nodes.unshift(selector);
|
|
851
948
|
for (var id in this.indexes) this.indexes[id]++;
|
|
852
949
|
return this;
|
|
853
950
|
};
|
|
854
|
-
|
|
951
|
+
Container.prototype.at = function(index) {
|
|
855
952
|
return this.nodes[index];
|
|
856
953
|
};
|
|
857
|
-
|
|
954
|
+
Container.prototype.index = function(child) {
|
|
858
955
|
if (typeof child === "number") return child;
|
|
859
956
|
return this.nodes.indexOf(child);
|
|
860
957
|
};
|
|
861
|
-
|
|
958
|
+
Object.defineProperty(Container.prototype, "first", {
|
|
959
|
+
get: function() {
|
|
960
|
+
return this.at(0);
|
|
961
|
+
},
|
|
962
|
+
enumerable: false,
|
|
963
|
+
configurable: true
|
|
964
|
+
});
|
|
965
|
+
Object.defineProperty(Container.prototype, "last", {
|
|
966
|
+
get: function() {
|
|
967
|
+
return this.at(this.length - 1);
|
|
968
|
+
},
|
|
969
|
+
enumerable: false,
|
|
970
|
+
configurable: true
|
|
971
|
+
});
|
|
972
|
+
Object.defineProperty(Container.prototype, "length", {
|
|
973
|
+
get: function() {
|
|
974
|
+
return this.nodes.length;
|
|
975
|
+
},
|
|
976
|
+
enumerable: false,
|
|
977
|
+
configurable: true
|
|
978
|
+
});
|
|
979
|
+
Container.prototype.removeChild = function(child) {
|
|
862
980
|
child = this.index(child);
|
|
863
981
|
this.at(child).parent = void 0;
|
|
864
982
|
this.nodes.splice(child, 1);
|
|
@@ -869,28 +987,39 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
869
987
|
}
|
|
870
988
|
return this;
|
|
871
989
|
};
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
990
|
+
Container.prototype.removeAll = function() {
|
|
991
|
+
var e_1, _a;
|
|
992
|
+
try {
|
|
993
|
+
for (var _b = __values(this.nodes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
994
|
+
var node = _c.value;
|
|
995
|
+
node.parent = void 0;
|
|
996
|
+
}
|
|
997
|
+
} catch (e_1_1) {
|
|
998
|
+
e_1 = { error: e_1_1 };
|
|
999
|
+
} finally {
|
|
1000
|
+
try {
|
|
1001
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1002
|
+
} finally {
|
|
1003
|
+
if (e_1) throw e_1.error;
|
|
1004
|
+
}
|
|
876
1005
|
}
|
|
877
1006
|
this.nodes = [];
|
|
878
1007
|
return this;
|
|
879
1008
|
};
|
|
880
|
-
|
|
1009
|
+
Container.prototype.empty = function() {
|
|
881
1010
|
return this.removeAll();
|
|
882
1011
|
};
|
|
883
|
-
|
|
884
|
-
var
|
|
1012
|
+
Container.prototype.insertAfter = function(oldNode, newNode) {
|
|
1013
|
+
var _a;
|
|
885
1014
|
newNode.parent = this;
|
|
886
1015
|
var oldIndex = this.index(oldNode);
|
|
887
1016
|
var resetNode = [];
|
|
888
1017
|
for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
|
|
889
|
-
(
|
|
1018
|
+
(_a = this.nodes).splice.apply(_a, __spreadArray([
|
|
890
1019
|
oldIndex + 1,
|
|
891
1020
|
0,
|
|
892
1021
|
newNode
|
|
893
|
-
]
|
|
1022
|
+
], __read(resetNode), false));
|
|
894
1023
|
newNode.parent = this;
|
|
895
1024
|
var index;
|
|
896
1025
|
for (var id in this.indexes) {
|
|
@@ -899,17 +1028,17 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
899
1028
|
}
|
|
900
1029
|
return this;
|
|
901
1030
|
};
|
|
902
|
-
|
|
903
|
-
var
|
|
1031
|
+
Container.prototype.insertBefore = function(oldNode, newNode) {
|
|
1032
|
+
var _a;
|
|
904
1033
|
newNode.parent = this;
|
|
905
1034
|
var oldIndex = this.index(oldNode);
|
|
906
1035
|
var resetNode = [];
|
|
907
1036
|
for (var i = 2; i < arguments.length; i++) resetNode.push(arguments[i]);
|
|
908
|
-
(
|
|
1037
|
+
(_a = this.nodes).splice.apply(_a, __spreadArray([
|
|
909
1038
|
oldIndex,
|
|
910
1039
|
0,
|
|
911
1040
|
newNode
|
|
912
|
-
]
|
|
1041
|
+
], __read(resetNode), false));
|
|
913
1042
|
newNode.parent = this;
|
|
914
1043
|
var index;
|
|
915
1044
|
for (var id in this.indexes) {
|
|
@@ -918,7 +1047,7 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
918
1047
|
}
|
|
919
1048
|
return this;
|
|
920
1049
|
};
|
|
921
|
-
|
|
1050
|
+
Container.prototype._findChildAtPosition = function(line, col) {
|
|
922
1051
|
var found = void 0;
|
|
923
1052
|
this.each(function(node) {
|
|
924
1053
|
if (node.atPosition) {
|
|
@@ -934,18 +1063,31 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
934
1063
|
});
|
|
935
1064
|
return found;
|
|
936
1065
|
};
|
|
937
|
-
|
|
1066
|
+
/**
|
|
1067
|
+
* Return the most specific node at the line and column number given.
|
|
1068
|
+
* The source location is based on the original parsed location, locations aren't
|
|
1069
|
+
* updated as selector nodes are mutated.
|
|
1070
|
+
*
|
|
1071
|
+
* Note that this location is relative to the location of the first character
|
|
1072
|
+
* of the selector, and not the location of the selector in the overall document
|
|
1073
|
+
* when used in conjunction with postcss.
|
|
1074
|
+
*
|
|
1075
|
+
* If not found, returns undefined.
|
|
1076
|
+
* @param {number} line The line number of the node to find. (1-based index)
|
|
1077
|
+
* @param {number} col The column number of the node to find. (1-based index)
|
|
1078
|
+
*/
|
|
1079
|
+
Container.prototype.atPosition = function(line, col) {
|
|
938
1080
|
if (this.isAtPosition(line, col)) return this._findChildAtPosition(line, col) || this;
|
|
939
1081
|
else return;
|
|
940
1082
|
};
|
|
941
|
-
|
|
1083
|
+
Container.prototype._inferEndPosition = function() {
|
|
942
1084
|
if (this.last && this.last.source && this.last.source.end) {
|
|
943
1085
|
this.source = this.source || {};
|
|
944
1086
|
this.source.end = this.source.end || {};
|
|
945
1087
|
Object.assign(this.source.end, this.last.source.end);
|
|
946
1088
|
}
|
|
947
1089
|
};
|
|
948
|
-
|
|
1090
|
+
Container.prototype.each = function(callback) {
|
|
949
1091
|
if (!this.lastEach) this.lastEach = 0;
|
|
950
1092
|
if (!this.indexes) this.indexes = {};
|
|
951
1093
|
this.lastEach++;
|
|
@@ -962,223 +1104,208 @@ var require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
962
1104
|
delete this.indexes[id];
|
|
963
1105
|
if (result === false) return false;
|
|
964
1106
|
};
|
|
965
|
-
|
|
1107
|
+
Container.prototype.walk = function(callback, depth) {
|
|
1108
|
+
if (depth === void 0) depth = 0;
|
|
1109
|
+
if (depth > util_1.MAX_NESTING_DEPTH) throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(util_1.MAX_NESTING_DEPTH, "."));
|
|
966
1110
|
return this.each(function(node, i) {
|
|
967
1111
|
var result = callback(node, i);
|
|
968
|
-
if (result !== false && node.length) result = node.walk(callback);
|
|
1112
|
+
if (result !== false && node.length) result = node.walk(callback, depth + 1);
|
|
969
1113
|
if (result === false) return false;
|
|
970
1114
|
});
|
|
971
1115
|
};
|
|
972
|
-
|
|
973
|
-
var
|
|
1116
|
+
Container.prototype.walkAttributes = function(callback) {
|
|
1117
|
+
var _this = this;
|
|
974
1118
|
return this.walk(function(selector) {
|
|
975
|
-
if (selector.type === types.ATTRIBUTE) return callback.call(
|
|
1119
|
+
if (selector.type === types.ATTRIBUTE) return callback.call(_this, selector);
|
|
976
1120
|
});
|
|
977
1121
|
};
|
|
978
|
-
|
|
979
|
-
var
|
|
1122
|
+
Container.prototype.walkClasses = function(callback) {
|
|
1123
|
+
var _this = this;
|
|
980
1124
|
return this.walk(function(selector) {
|
|
981
|
-
if (selector.type === types.CLASS) return callback.call(
|
|
1125
|
+
if (selector.type === types.CLASS) return callback.call(_this, selector);
|
|
982
1126
|
});
|
|
983
1127
|
};
|
|
984
|
-
|
|
985
|
-
var
|
|
1128
|
+
Container.prototype.walkCombinators = function(callback) {
|
|
1129
|
+
var _this = this;
|
|
986
1130
|
return this.walk(function(selector) {
|
|
987
|
-
if (selector.type === types.COMBINATOR) return callback.call(
|
|
1131
|
+
if (selector.type === types.COMBINATOR) return callback.call(_this, selector);
|
|
988
1132
|
});
|
|
989
1133
|
};
|
|
990
|
-
|
|
991
|
-
var
|
|
1134
|
+
Container.prototype.walkComments = function(callback) {
|
|
1135
|
+
var _this = this;
|
|
992
1136
|
return this.walk(function(selector) {
|
|
993
|
-
if (selector.type === types.COMMENT) return callback.call(
|
|
1137
|
+
if (selector.type === types.COMMENT) return callback.call(_this, selector);
|
|
994
1138
|
});
|
|
995
1139
|
};
|
|
996
|
-
|
|
997
|
-
var
|
|
1140
|
+
Container.prototype.walkIds = function(callback) {
|
|
1141
|
+
var _this = this;
|
|
998
1142
|
return this.walk(function(selector) {
|
|
999
|
-
if (selector.type === types.ID) return callback.call(
|
|
1143
|
+
if (selector.type === types.ID) return callback.call(_this, selector);
|
|
1000
1144
|
});
|
|
1001
1145
|
};
|
|
1002
|
-
|
|
1003
|
-
var
|
|
1146
|
+
Container.prototype.walkNesting = function(callback) {
|
|
1147
|
+
var _this = this;
|
|
1004
1148
|
return this.walk(function(selector) {
|
|
1005
|
-
if (selector.type === types.NESTING) return callback.call(
|
|
1149
|
+
if (selector.type === types.NESTING) return callback.call(_this, selector);
|
|
1006
1150
|
});
|
|
1007
1151
|
};
|
|
1008
|
-
|
|
1009
|
-
var
|
|
1152
|
+
Container.prototype.walkPseudos = function(callback) {
|
|
1153
|
+
var _this = this;
|
|
1010
1154
|
return this.walk(function(selector) {
|
|
1011
|
-
if (selector.type === types.PSEUDO) return callback.call(
|
|
1155
|
+
if (selector.type === types.PSEUDO) return callback.call(_this, selector);
|
|
1012
1156
|
});
|
|
1013
1157
|
};
|
|
1014
|
-
|
|
1015
|
-
var
|
|
1158
|
+
Container.prototype.walkTags = function(callback) {
|
|
1159
|
+
var _this = this;
|
|
1016
1160
|
return this.walk(function(selector) {
|
|
1017
|
-
if (selector.type === types.TAG) return callback.call(
|
|
1161
|
+
if (selector.type === types.TAG) return callback.call(_this, selector);
|
|
1018
1162
|
});
|
|
1019
1163
|
};
|
|
1020
|
-
|
|
1021
|
-
var
|
|
1164
|
+
Container.prototype.walkUniversals = function(callback) {
|
|
1165
|
+
var _this = this;
|
|
1022
1166
|
return this.walk(function(selector) {
|
|
1023
|
-
if (selector.type === types.UNIVERSAL) return callback.call(
|
|
1167
|
+
if (selector.type === types.UNIVERSAL) return callback.call(_this, selector);
|
|
1024
1168
|
});
|
|
1025
1169
|
};
|
|
1026
|
-
|
|
1027
|
-
var
|
|
1170
|
+
Container.prototype.split = function(callback) {
|
|
1171
|
+
var _this = this;
|
|
1028
1172
|
var current = [];
|
|
1029
1173
|
return this.reduce(function(memo, node, index) {
|
|
1030
|
-
var split = callback.call(
|
|
1174
|
+
var split = callback.call(_this, node);
|
|
1031
1175
|
current.push(node);
|
|
1032
1176
|
if (split) {
|
|
1033
1177
|
memo.push(current);
|
|
1034
1178
|
current = [];
|
|
1035
|
-
} else if (index ===
|
|
1179
|
+
} else if (index === _this.length - 1) memo.push(current);
|
|
1036
1180
|
return memo;
|
|
1037
1181
|
}, []);
|
|
1038
1182
|
};
|
|
1039
|
-
|
|
1183
|
+
Container.prototype.map = function(callback) {
|
|
1040
1184
|
return this.nodes.map(callback);
|
|
1041
1185
|
};
|
|
1042
|
-
|
|
1186
|
+
Container.prototype.reduce = function(callback, memo) {
|
|
1043
1187
|
return this.nodes.reduce(callback, memo);
|
|
1044
1188
|
};
|
|
1045
|
-
|
|
1189
|
+
Container.prototype.every = function(callback) {
|
|
1046
1190
|
return this.nodes.every(callback);
|
|
1047
1191
|
};
|
|
1048
|
-
|
|
1192
|
+
Container.prototype.some = function(callback) {
|
|
1049
1193
|
return this.nodes.some(callback);
|
|
1050
1194
|
};
|
|
1051
|
-
|
|
1195
|
+
Container.prototype.filter = function(callback) {
|
|
1052
1196
|
return this.nodes.filter(callback);
|
|
1053
1197
|
};
|
|
1054
|
-
|
|
1198
|
+
Container.prototype.sort = function(callback) {
|
|
1055
1199
|
return this.nodes.sort(callback);
|
|
1056
1200
|
};
|
|
1057
|
-
|
|
1058
|
-
|
|
1201
|
+
Container.prototype.toString = function(options) {
|
|
1202
|
+
if (options === void 0) options = {};
|
|
1203
|
+
return this._stringify(options, 0, (0, util_1.resolveMaxNestingDepth)(options.maxNestingDepth));
|
|
1204
|
+
};
|
|
1205
|
+
Container.prototype._stringify = function(options, depth, max) {
|
|
1206
|
+
var _this = this;
|
|
1207
|
+
return this.map(function(child) {
|
|
1208
|
+
return _this._stringifyChild(child, options, depth, max);
|
|
1209
|
+
}).join("");
|
|
1210
|
+
};
|
|
1211
|
+
Container.prototype._stringifyChild = function(child, options, depth, max) {
|
|
1212
|
+
return typeof child._stringify === "function" ? child._stringify(options, depth, max) : String(child);
|
|
1059
1213
|
};
|
|
1060
|
-
_createClass(Container, [
|
|
1061
|
-
{
|
|
1062
|
-
key: "first",
|
|
1063
|
-
get: function get() {
|
|
1064
|
-
return this.at(0);
|
|
1065
|
-
}
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
key: "last",
|
|
1069
|
-
get: function get() {
|
|
1070
|
-
return this.at(this.length - 1);
|
|
1071
|
-
}
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
key: "length",
|
|
1075
|
-
get: function get() {
|
|
1076
|
-
return this.nodes.length;
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
]);
|
|
1080
1214
|
return Container;
|
|
1081
|
-
}(
|
|
1082
|
-
module.exports = exports.default;
|
|
1215
|
+
}(node_1.default);
|
|
1083
1216
|
}));
|
|
1084
1217
|
//#endregion
|
|
1085
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1086
|
-
var require_root = /* @__PURE__ */ __commonJSMin(((exports
|
|
1087
|
-
exports.
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
for (var i = 0; i < props.length; i++) {
|
|
1096
|
-
var descriptor = props[i];
|
|
1097
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1098
|
-
descriptor.configurable = true;
|
|
1099
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1100
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1104
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1105
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1106
|
-
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1107
|
-
return Constructor;
|
|
1108
|
-
}
|
|
1109
|
-
function _inheritsLoose(subClass, superClass) {
|
|
1110
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1111
|
-
subClass.prototype.constructor = subClass;
|
|
1112
|
-
_setPrototypeOf(subClass, superClass);
|
|
1113
|
-
}
|
|
1114
|
-
function _setPrototypeOf(o, p) {
|
|
1115
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1116
|
-
o.__proto__ = p;
|
|
1117
|
-
return o;
|
|
1218
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/root.js
|
|
1219
|
+
var require_root = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1220
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1221
|
+
var extendStatics = function(d, b) {
|
|
1222
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1223
|
+
d.__proto__ = b;
|
|
1224
|
+
} || function(d, b) {
|
|
1225
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1226
|
+
};
|
|
1227
|
+
return extendStatics(d, b);
|
|
1118
1228
|
};
|
|
1119
|
-
return
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1229
|
+
return function(d, b) {
|
|
1230
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1231
|
+
extendStatics(d, b);
|
|
1232
|
+
function __() {
|
|
1233
|
+
this.constructor = d;
|
|
1234
|
+
}
|
|
1235
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1236
|
+
};
|
|
1237
|
+
})();
|
|
1238
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1239
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1240
|
+
};
|
|
1241
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1242
|
+
var container_1 = __importDefault(require_container());
|
|
1243
|
+
var types_1 = require_types();
|
|
1244
|
+
exports.default = function(_super) {
|
|
1245
|
+
__extends(Root, _super);
|
|
1123
1246
|
function Root(opts) {
|
|
1124
|
-
var _this =
|
|
1125
|
-
_this.type =
|
|
1247
|
+
var _this = _super.call(this, opts) || this;
|
|
1248
|
+
_this.type = types_1.ROOT;
|
|
1126
1249
|
return _this;
|
|
1127
1250
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1251
|
+
Root.prototype._stringify = function(options, depth, max) {
|
|
1252
|
+
var _this = this;
|
|
1130
1253
|
var str = this.reduce(function(memo, selector) {
|
|
1131
|
-
memo.push(
|
|
1254
|
+
memo.push(_this._stringifyChild(selector, options, depth, max));
|
|
1132
1255
|
return memo;
|
|
1133
1256
|
}, []).join(",");
|
|
1134
1257
|
return this.trailingComma ? str + "," : str;
|
|
1135
1258
|
};
|
|
1136
|
-
|
|
1259
|
+
Root.prototype.error = function(message, options) {
|
|
1137
1260
|
if (this._error) return this._error(message, options);
|
|
1138
1261
|
else return new Error(message);
|
|
1139
1262
|
};
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
set: function set(handler) {
|
|
1263
|
+
Object.defineProperty(Root.prototype, "errorGenerator", {
|
|
1264
|
+
set: function(handler) {
|
|
1143
1265
|
this._error = handler;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1266
|
+
},
|
|
1267
|
+
enumerable: false,
|
|
1268
|
+
configurable: true
|
|
1269
|
+
});
|
|
1146
1270
|
return Root;
|
|
1147
|
-
}(
|
|
1148
|
-
module.exports = exports.default;
|
|
1271
|
+
}(container_1.default);
|
|
1149
1272
|
}));
|
|
1150
1273
|
//#endregion
|
|
1151
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1152
|
-
var require_selector = /* @__PURE__ */ __commonJSMin(((exports
|
|
1153
|
-
exports.
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1162
|
-
subClass.prototype.constructor = subClass;
|
|
1163
|
-
_setPrototypeOf(subClass, superClass);
|
|
1164
|
-
}
|
|
1165
|
-
function _setPrototypeOf(o, p) {
|
|
1166
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1167
|
-
o.__proto__ = p;
|
|
1168
|
-
return o;
|
|
1274
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/selector.js
|
|
1275
|
+
var require_selector = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1276
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1277
|
+
var extendStatics = function(d, b) {
|
|
1278
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1279
|
+
d.__proto__ = b;
|
|
1280
|
+
} || function(d, b) {
|
|
1281
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1282
|
+
};
|
|
1283
|
+
return extendStatics(d, b);
|
|
1169
1284
|
};
|
|
1170
|
-
return
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1285
|
+
return function(d, b) {
|
|
1286
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1287
|
+
extendStatics(d, b);
|
|
1288
|
+
function __() {
|
|
1289
|
+
this.constructor = d;
|
|
1290
|
+
}
|
|
1291
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1292
|
+
};
|
|
1293
|
+
})();
|
|
1294
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1295
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1296
|
+
};
|
|
1297
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1298
|
+
var container_1 = __importDefault(require_container());
|
|
1299
|
+
var types_1 = require_types();
|
|
1300
|
+
exports.default = function(_super) {
|
|
1301
|
+
__extends(Selector, _super);
|
|
1174
1302
|
function Selector(opts) {
|
|
1175
|
-
var _this =
|
|
1176
|
-
_this.type =
|
|
1303
|
+
var _this = _super.call(this, opts) || this;
|
|
1304
|
+
_this.type = types_1.SELECTOR;
|
|
1177
1305
|
return _this;
|
|
1178
1306
|
}
|
|
1179
1307
|
return Selector;
|
|
1180
|
-
}(
|
|
1181
|
-
module.exports = exports.default;
|
|
1308
|
+
}(container_1.default);
|
|
1182
1309
|
}));
|
|
1183
1310
|
//#endregion
|
|
1184
1311
|
//#region ../../node_modules/.pnpm/cssesc@3.0.0/node_modules/cssesc/cssesc.js
|
|
@@ -1242,339 +1369,340 @@ var require_cssesc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1242
1369
|
module.exports = cssesc;
|
|
1243
1370
|
}));
|
|
1244
1371
|
//#endregion
|
|
1245
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1246
|
-
var require_className = /* @__PURE__ */ __commonJSMin(((exports
|
|
1247
|
-
exports.
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}
|
|
1256
|
-
function _defineProperties(target, props) {
|
|
1257
|
-
for (var i = 0; i < props.length; i++) {
|
|
1258
|
-
var descriptor = props[i];
|
|
1259
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1260
|
-
descriptor.configurable = true;
|
|
1261
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1262
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1266
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1267
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1268
|
-
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1269
|
-
return Constructor;
|
|
1270
|
-
}
|
|
1271
|
-
function _inheritsLoose(subClass, superClass) {
|
|
1272
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1273
|
-
subClass.prototype.constructor = subClass;
|
|
1274
|
-
_setPrototypeOf(subClass, superClass);
|
|
1275
|
-
}
|
|
1276
|
-
function _setPrototypeOf(o, p) {
|
|
1277
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1278
|
-
o.__proto__ = p;
|
|
1279
|
-
return o;
|
|
1372
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/className.js
|
|
1373
|
+
var require_className = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1374
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1375
|
+
var extendStatics = function(d, b) {
|
|
1376
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1377
|
+
d.__proto__ = b;
|
|
1378
|
+
} || function(d, b) {
|
|
1379
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1380
|
+
};
|
|
1381
|
+
return extendStatics(d, b);
|
|
1280
1382
|
};
|
|
1281
|
-
return
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1383
|
+
return function(d, b) {
|
|
1384
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1385
|
+
extendStatics(d, b);
|
|
1386
|
+
function __() {
|
|
1387
|
+
this.constructor = d;
|
|
1388
|
+
}
|
|
1389
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1390
|
+
};
|
|
1391
|
+
})();
|
|
1392
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1393
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1394
|
+
};
|
|
1395
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1396
|
+
var cssesc_1 = __importDefault(require_cssesc());
|
|
1397
|
+
var util_1 = require_util();
|
|
1398
|
+
var node_1 = __importDefault(require_node$1());
|
|
1399
|
+
var types_1 = require_types();
|
|
1400
|
+
exports.default = function(_super) {
|
|
1401
|
+
__extends(ClassName, _super);
|
|
1285
1402
|
function ClassName(opts) {
|
|
1286
|
-
var _this =
|
|
1287
|
-
_this.type =
|
|
1403
|
+
var _this = _super.call(this, opts) || this;
|
|
1404
|
+
_this.type = types_1.CLASS;
|
|
1288
1405
|
_this._constructed = true;
|
|
1289
1406
|
return _this;
|
|
1290
1407
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
return "." + _Node.prototype.valueToString.call(this);
|
|
1294
|
-
};
|
|
1295
|
-
_createClass(ClassName, [{
|
|
1296
|
-
key: "value",
|
|
1297
|
-
get: function get() {
|
|
1408
|
+
Object.defineProperty(ClassName.prototype, "value", {
|
|
1409
|
+
get: function() {
|
|
1298
1410
|
return this._value;
|
|
1299
1411
|
},
|
|
1300
|
-
set: function
|
|
1412
|
+
set: function(v) {
|
|
1301
1413
|
if (this._constructed) {
|
|
1302
|
-
var escaped = (0,
|
|
1414
|
+
var escaped = (0, cssesc_1.default)(v, { isIdentifier: true });
|
|
1303
1415
|
if (escaped !== v) {
|
|
1304
|
-
(0,
|
|
1416
|
+
(0, util_1.ensureObject)(this, "raws");
|
|
1305
1417
|
this.raws.value = escaped;
|
|
1306
1418
|
} else if (this.raws) delete this.raws.value;
|
|
1307
1419
|
}
|
|
1308
1420
|
this._value = v;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1421
|
+
},
|
|
1422
|
+
enumerable: false,
|
|
1423
|
+
configurable: true
|
|
1424
|
+
});
|
|
1425
|
+
ClassName.prototype.valueToString = function() {
|
|
1426
|
+
return "." + _super.prototype.valueToString.call(this);
|
|
1427
|
+
};
|
|
1311
1428
|
return ClassName;
|
|
1312
|
-
}(
|
|
1313
|
-
module.exports = exports.default;
|
|
1429
|
+
}(node_1.default);
|
|
1314
1430
|
}));
|
|
1315
1431
|
//#endregion
|
|
1316
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1317
|
-
var require_comment = /* @__PURE__ */ __commonJSMin(((exports
|
|
1318
|
-
exports.
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1327
|
-
subClass.prototype.constructor = subClass;
|
|
1328
|
-
_setPrototypeOf(subClass, superClass);
|
|
1329
|
-
}
|
|
1330
|
-
function _setPrototypeOf(o, p) {
|
|
1331
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1332
|
-
o.__proto__ = p;
|
|
1333
|
-
return o;
|
|
1432
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/comment.js
|
|
1433
|
+
var require_comment = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1434
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1435
|
+
var extendStatics = function(d, b) {
|
|
1436
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1437
|
+
d.__proto__ = b;
|
|
1438
|
+
} || function(d, b) {
|
|
1439
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1440
|
+
};
|
|
1441
|
+
return extendStatics(d, b);
|
|
1334
1442
|
};
|
|
1335
|
-
return
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1443
|
+
return function(d, b) {
|
|
1444
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1445
|
+
extendStatics(d, b);
|
|
1446
|
+
function __() {
|
|
1447
|
+
this.constructor = d;
|
|
1448
|
+
}
|
|
1449
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1450
|
+
};
|
|
1451
|
+
})();
|
|
1452
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1453
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1454
|
+
};
|
|
1455
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1456
|
+
var node_1 = __importDefault(require_node$1());
|
|
1457
|
+
var types_1 = require_types();
|
|
1458
|
+
exports.default = function(_super) {
|
|
1459
|
+
__extends(Comment, _super);
|
|
1339
1460
|
function Comment(opts) {
|
|
1340
|
-
var _this =
|
|
1341
|
-
_this.type =
|
|
1461
|
+
var _this = _super.call(this, opts) || this;
|
|
1462
|
+
_this.type = types_1.COMMENT;
|
|
1342
1463
|
return _this;
|
|
1343
1464
|
}
|
|
1344
1465
|
return Comment;
|
|
1345
|
-
}(
|
|
1346
|
-
module.exports = exports.default;
|
|
1466
|
+
}(node_1.default);
|
|
1347
1467
|
}));
|
|
1348
1468
|
//#endregion
|
|
1349
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1350
|
-
var require_id = /* @__PURE__ */ __commonJSMin(((exports
|
|
1351
|
-
exports.
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1360
|
-
subClass.prototype.constructor = subClass;
|
|
1361
|
-
_setPrototypeOf(subClass, superClass);
|
|
1362
|
-
}
|
|
1363
|
-
function _setPrototypeOf(o, p) {
|
|
1364
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1365
|
-
o.__proto__ = p;
|
|
1366
|
-
return o;
|
|
1469
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/id.js
|
|
1470
|
+
var require_id = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1471
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1472
|
+
var extendStatics = function(d, b) {
|
|
1473
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1474
|
+
d.__proto__ = b;
|
|
1475
|
+
} || function(d, b) {
|
|
1476
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1477
|
+
};
|
|
1478
|
+
return extendStatics(d, b);
|
|
1367
1479
|
};
|
|
1368
|
-
return
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1480
|
+
return function(d, b) {
|
|
1481
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1482
|
+
extendStatics(d, b);
|
|
1483
|
+
function __() {
|
|
1484
|
+
this.constructor = d;
|
|
1485
|
+
}
|
|
1486
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1487
|
+
};
|
|
1488
|
+
})();
|
|
1489
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1490
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1491
|
+
};
|
|
1492
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1493
|
+
var node_1 = __importDefault(require_node$1());
|
|
1494
|
+
var types_1 = require_types();
|
|
1495
|
+
exports.default = function(_super) {
|
|
1496
|
+
__extends(ID, _super);
|
|
1372
1497
|
function ID(opts) {
|
|
1373
|
-
var _this =
|
|
1374
|
-
_this.type =
|
|
1498
|
+
var _this = _super.call(this, opts) || this;
|
|
1499
|
+
_this.type = types_1.ID;
|
|
1375
1500
|
return _this;
|
|
1376
1501
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
return "#" + _Node.prototype.valueToString.call(this);
|
|
1502
|
+
ID.prototype.valueToString = function() {
|
|
1503
|
+
return "#" + _super.prototype.valueToString.call(this);
|
|
1380
1504
|
};
|
|
1381
1505
|
return ID;
|
|
1382
|
-
}(
|
|
1383
|
-
module.exports = exports.default;
|
|
1506
|
+
}(node_1.default);
|
|
1384
1507
|
}));
|
|
1385
1508
|
//#endregion
|
|
1386
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1387
|
-
var require_namespace = /* @__PURE__ */ __commonJSMin(((exports
|
|
1388
|
-
exports.
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
function _defineProperties(target, props) {
|
|
1397
|
-
for (var i = 0; i < props.length; i++) {
|
|
1398
|
-
var descriptor = props[i];
|
|
1399
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1400
|
-
descriptor.configurable = true;
|
|
1401
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1402
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1406
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1407
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1408
|
-
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1409
|
-
return Constructor;
|
|
1410
|
-
}
|
|
1411
|
-
function _inheritsLoose(subClass, superClass) {
|
|
1412
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1413
|
-
subClass.prototype.constructor = subClass;
|
|
1414
|
-
_setPrototypeOf(subClass, superClass);
|
|
1415
|
-
}
|
|
1416
|
-
function _setPrototypeOf(o, p) {
|
|
1417
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1418
|
-
o.__proto__ = p;
|
|
1419
|
-
return o;
|
|
1509
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/namespace.js
|
|
1510
|
+
var require_namespace = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1511
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1512
|
+
var extendStatics = function(d, b) {
|
|
1513
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1514
|
+
d.__proto__ = b;
|
|
1515
|
+
} || function(d, b) {
|
|
1516
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1517
|
+
};
|
|
1518
|
+
return extendStatics(d, b);
|
|
1420
1519
|
};
|
|
1421
|
-
return
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1520
|
+
return function(d, b) {
|
|
1521
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1522
|
+
extendStatics(d, b);
|
|
1523
|
+
function __() {
|
|
1524
|
+
this.constructor = d;
|
|
1525
|
+
}
|
|
1526
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1527
|
+
};
|
|
1528
|
+
})();
|
|
1529
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1530
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1531
|
+
};
|
|
1532
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1533
|
+
var cssesc_1 = __importDefault(require_cssesc());
|
|
1534
|
+
var util_1 = require_util();
|
|
1535
|
+
exports.default = function(_super) {
|
|
1536
|
+
__extends(Namespace, _super);
|
|
1425
1537
|
function Namespace() {
|
|
1426
|
-
return
|
|
1538
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1427
1539
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
return this.qualifiedName(_Node.prototype.valueToString.call(this));
|
|
1435
|
-
};
|
|
1436
|
-
_createClass(Namespace, [
|
|
1437
|
-
{
|
|
1438
|
-
key: "namespace",
|
|
1439
|
-
get: function get() {
|
|
1440
|
-
return this._namespace;
|
|
1441
|
-
},
|
|
1442
|
-
set: function set(namespace) {
|
|
1443
|
-
if (namespace === true || namespace === "*" || namespace === "&") {
|
|
1444
|
-
this._namespace = namespace;
|
|
1445
|
-
if (this.raws) delete this.raws.namespace;
|
|
1446
|
-
return;
|
|
1447
|
-
}
|
|
1448
|
-
var escaped = (0, _cssesc["default"])(namespace, { isIdentifier: true });
|
|
1540
|
+
Object.defineProperty(Namespace.prototype, "namespace", {
|
|
1541
|
+
get: function() {
|
|
1542
|
+
return this._namespace;
|
|
1543
|
+
},
|
|
1544
|
+
set: function(namespace) {
|
|
1545
|
+
if (namespace === true || namespace === "*" || namespace === "&") {
|
|
1449
1546
|
this._namespace = namespace;
|
|
1450
|
-
if (
|
|
1451
|
-
|
|
1452
|
-
this.raws.namespace = escaped;
|
|
1453
|
-
} else if (this.raws) delete this.raws.namespace;
|
|
1547
|
+
if (this.raws) delete this.raws.namespace;
|
|
1548
|
+
return;
|
|
1454
1549
|
}
|
|
1550
|
+
var escaped = (0, cssesc_1.default)(namespace, { isIdentifier: true });
|
|
1551
|
+
this._namespace = namespace;
|
|
1552
|
+
if (escaped !== namespace) {
|
|
1553
|
+
(0, util_1.ensureObject)(this, "raws");
|
|
1554
|
+
this.raws.namespace = escaped;
|
|
1555
|
+
} else if (this.raws) delete this.raws.namespace;
|
|
1455
1556
|
},
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
this.namespace = namespace;
|
|
1463
|
-
}
|
|
1557
|
+
enumerable: false,
|
|
1558
|
+
configurable: true
|
|
1559
|
+
});
|
|
1560
|
+
Object.defineProperty(Namespace.prototype, "ns", {
|
|
1561
|
+
get: function() {
|
|
1562
|
+
return this._namespace;
|
|
1464
1563
|
},
|
|
1465
|
-
{
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1564
|
+
set: function(namespace) {
|
|
1565
|
+
this.namespace = namespace;
|
|
1566
|
+
},
|
|
1567
|
+
enumerable: false,
|
|
1568
|
+
configurable: true
|
|
1569
|
+
});
|
|
1570
|
+
Object.defineProperty(Namespace.prototype, "namespaceString", {
|
|
1571
|
+
get: function() {
|
|
1572
|
+
if (this.namespace) {
|
|
1573
|
+
var ns = this.stringifyProperty("namespace");
|
|
1574
|
+
if (ns === true) return "";
|
|
1575
|
+
else return ns;
|
|
1576
|
+
} else return "";
|
|
1577
|
+
},
|
|
1578
|
+
enumerable: false,
|
|
1579
|
+
configurable: true
|
|
1580
|
+
});
|
|
1581
|
+
Namespace.prototype.qualifiedName = function(value) {
|
|
1582
|
+
if (this.namespace) return "".concat(this.namespaceString, "|").concat(value);
|
|
1583
|
+
else return value;
|
|
1584
|
+
};
|
|
1585
|
+
Namespace.prototype.valueToString = function() {
|
|
1586
|
+
return this.qualifiedName(_super.prototype.valueToString.call(this));
|
|
1587
|
+
};
|
|
1476
1588
|
return Namespace;
|
|
1477
|
-
}(
|
|
1478
|
-
module.exports = exports.default;
|
|
1589
|
+
}(__importDefault(require_node$1()).default);
|
|
1479
1590
|
}));
|
|
1480
1591
|
//#endregion
|
|
1481
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1482
|
-
var require_tag = /* @__PURE__ */ __commonJSMin(((exports
|
|
1483
|
-
exports.
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1492
|
-
subClass.prototype.constructor = subClass;
|
|
1493
|
-
_setPrototypeOf(subClass, superClass);
|
|
1494
|
-
}
|
|
1495
|
-
function _setPrototypeOf(o, p) {
|
|
1496
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1497
|
-
o.__proto__ = p;
|
|
1498
|
-
return o;
|
|
1592
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/tag.js
|
|
1593
|
+
var require_tag = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1594
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1595
|
+
var extendStatics = function(d, b) {
|
|
1596
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1597
|
+
d.__proto__ = b;
|
|
1598
|
+
} || function(d, b) {
|
|
1599
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1600
|
+
};
|
|
1601
|
+
return extendStatics(d, b);
|
|
1499
1602
|
};
|
|
1500
|
-
return
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1603
|
+
return function(d, b) {
|
|
1604
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1605
|
+
extendStatics(d, b);
|
|
1606
|
+
function __() {
|
|
1607
|
+
this.constructor = d;
|
|
1608
|
+
}
|
|
1609
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1610
|
+
};
|
|
1611
|
+
})();
|
|
1612
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1613
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1614
|
+
};
|
|
1615
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1616
|
+
var namespace_1 = __importDefault(require_namespace());
|
|
1617
|
+
var types_1 = require_types();
|
|
1618
|
+
exports.default = function(_super) {
|
|
1619
|
+
__extends(Tag, _super);
|
|
1504
1620
|
function Tag(opts) {
|
|
1505
|
-
var _this =
|
|
1506
|
-
_this.type =
|
|
1621
|
+
var _this = _super.call(this, opts) || this;
|
|
1622
|
+
_this.type = types_1.TAG;
|
|
1507
1623
|
return _this;
|
|
1508
1624
|
}
|
|
1509
1625
|
return Tag;
|
|
1510
|
-
}(
|
|
1511
|
-
module.exports = exports.default;
|
|
1626
|
+
}(namespace_1.default);
|
|
1512
1627
|
}));
|
|
1513
1628
|
//#endregion
|
|
1514
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1515
|
-
var require_string = /* @__PURE__ */ __commonJSMin(((exports
|
|
1516
|
-
exports.
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1525
|
-
subClass.prototype.constructor = subClass;
|
|
1526
|
-
_setPrototypeOf(subClass, superClass);
|
|
1527
|
-
}
|
|
1528
|
-
function _setPrototypeOf(o, p) {
|
|
1529
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1530
|
-
o.__proto__ = p;
|
|
1531
|
-
return o;
|
|
1629
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/string.js
|
|
1630
|
+
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1631
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1632
|
+
var extendStatics = function(d, b) {
|
|
1633
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1634
|
+
d.__proto__ = b;
|
|
1635
|
+
} || function(d, b) {
|
|
1636
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1637
|
+
};
|
|
1638
|
+
return extendStatics(d, b);
|
|
1532
1639
|
};
|
|
1533
|
-
return
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1640
|
+
return function(d, b) {
|
|
1641
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1642
|
+
extendStatics(d, b);
|
|
1643
|
+
function __() {
|
|
1644
|
+
this.constructor = d;
|
|
1645
|
+
}
|
|
1646
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1647
|
+
};
|
|
1648
|
+
})();
|
|
1649
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1650
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1651
|
+
};
|
|
1652
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1653
|
+
var node_1 = __importDefault(require_node$1());
|
|
1654
|
+
var types_1 = require_types();
|
|
1655
|
+
var String = function(_super) {
|
|
1656
|
+
__extends(String, _super);
|
|
1537
1657
|
function String(opts) {
|
|
1538
|
-
var _this =
|
|
1539
|
-
_this.type =
|
|
1658
|
+
var _this = _super.call(this, opts) || this;
|
|
1659
|
+
_this.type = types_1.STRING;
|
|
1540
1660
|
return _this;
|
|
1541
1661
|
}
|
|
1542
1662
|
return String;
|
|
1543
|
-
}(
|
|
1544
|
-
|
|
1663
|
+
}(node_1.default);
|
|
1664
|
+
exports.default = String;
|
|
1545
1665
|
}));
|
|
1546
1666
|
//#endregion
|
|
1547
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1548
|
-
var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports
|
|
1549
|
-
exports.
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1558
|
-
subClass.prototype.constructor = subClass;
|
|
1559
|
-
_setPrototypeOf(subClass, superClass);
|
|
1560
|
-
}
|
|
1561
|
-
function _setPrototypeOf(o, p) {
|
|
1562
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1563
|
-
o.__proto__ = p;
|
|
1564
|
-
return o;
|
|
1667
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
|
|
1668
|
+
var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1669
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1670
|
+
var extendStatics = function(d, b) {
|
|
1671
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1672
|
+
d.__proto__ = b;
|
|
1673
|
+
} || function(d, b) {
|
|
1674
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1675
|
+
};
|
|
1676
|
+
return extendStatics(d, b);
|
|
1565
1677
|
};
|
|
1566
|
-
return
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1678
|
+
return function(d, b) {
|
|
1679
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1680
|
+
extendStatics(d, b);
|
|
1681
|
+
function __() {
|
|
1682
|
+
this.constructor = d;
|
|
1683
|
+
}
|
|
1684
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1685
|
+
};
|
|
1686
|
+
})();
|
|
1687
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1688
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1689
|
+
};
|
|
1690
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1691
|
+
var container_1 = __importDefault(require_container());
|
|
1692
|
+
var types_1 = require_types();
|
|
1693
|
+
exports.default = function(_super) {
|
|
1694
|
+
__extends(Pseudo, _super);
|
|
1570
1695
|
function Pseudo(opts) {
|
|
1571
|
-
var _this =
|
|
1572
|
-
_this.type =
|
|
1696
|
+
var _this = _super.call(this, opts) || this;
|
|
1697
|
+
_this.type = types_1.PSEUDO;
|
|
1573
1698
|
return _this;
|
|
1574
1699
|
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1700
|
+
Pseudo.prototype._stringify = function(options, depth, max) {
|
|
1701
|
+
var _this = this;
|
|
1702
|
+
if (depth >= max) throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(max, "."));
|
|
1703
|
+
var params = this.length ? "(" + this.map(function(child) {
|
|
1704
|
+
return _this._stringifyChild(child, options, depth + 1, max);
|
|
1705
|
+
}).join(",") + ")" : "";
|
|
1578
1706
|
return [
|
|
1579
1707
|
this.rawSpaceBefore,
|
|
1580
1708
|
this.stringifyProperty("value"),
|
|
@@ -1583,8 +1711,7 @@ var require_pseudo = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1583
1711
|
].join("");
|
|
1584
1712
|
};
|
|
1585
1713
|
return Pseudo;
|
|
1586
|
-
}(
|
|
1587
|
-
module.exports = exports.default;
|
|
1714
|
+
}(container_1.default);
|
|
1588
1715
|
}));
|
|
1589
1716
|
//#endregion
|
|
1590
1717
|
//#region ../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js
|
|
@@ -1595,46 +1722,36 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1595
1722
|
module.exports = __require("util").deprecate;
|
|
1596
1723
|
}));
|
|
1597
1724
|
//#endregion
|
|
1598
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1725
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/attribute.js
|
|
1599
1726
|
var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1600
|
-
exports.
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
function _interopRequireDefault(obj) {
|
|
1609
|
-
return obj && obj.__esModule ? obj : { "default": obj };
|
|
1610
|
-
}
|
|
1611
|
-
function _defineProperties(target, props) {
|
|
1612
|
-
for (var i = 0; i < props.length; i++) {
|
|
1613
|
-
var descriptor = props[i];
|
|
1614
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1615
|
-
descriptor.configurable = true;
|
|
1616
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1617
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1621
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1622
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1623
|
-
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1624
|
-
return Constructor;
|
|
1625
|
-
}
|
|
1626
|
-
function _inheritsLoose(subClass, superClass) {
|
|
1627
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1628
|
-
subClass.prototype.constructor = subClass;
|
|
1629
|
-
_setPrototypeOf(subClass, superClass);
|
|
1630
|
-
}
|
|
1631
|
-
function _setPrototypeOf(o, p) {
|
|
1632
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1633
|
-
o.__proto__ = p;
|
|
1634
|
-
return o;
|
|
1727
|
+
var __extends = exports && exports.__extends || (function() {
|
|
1728
|
+
var extendStatics = function(d, b) {
|
|
1729
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
1730
|
+
d.__proto__ = b;
|
|
1731
|
+
} || function(d, b) {
|
|
1732
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
1733
|
+
};
|
|
1734
|
+
return extendStatics(d, b);
|
|
1635
1735
|
};
|
|
1636
|
-
return
|
|
1637
|
-
|
|
1736
|
+
return function(d, b) {
|
|
1737
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1738
|
+
extendStatics(d, b);
|
|
1739
|
+
function __() {
|
|
1740
|
+
this.constructor = d;
|
|
1741
|
+
}
|
|
1742
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1743
|
+
};
|
|
1744
|
+
})();
|
|
1745
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
1746
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
1747
|
+
};
|
|
1748
|
+
var _a;
|
|
1749
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1750
|
+
exports.unescapeValue = unescapeValue;
|
|
1751
|
+
var cssesc_1 = __importDefault(require_cssesc());
|
|
1752
|
+
var unesc_1 = __importDefault(require_unesc());
|
|
1753
|
+
var namespace_1 = __importDefault(require_namespace());
|
|
1754
|
+
var types_1 = require_types();
|
|
1638
1755
|
var deprecate = require_node();
|
|
1639
1756
|
var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
|
|
1640
1757
|
var warnOfDeprecatedValueAssignment = deprecate(function() {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead.");
|
|
@@ -1649,7 +1766,7 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1649
1766
|
quoteMark = m[1];
|
|
1650
1767
|
unescaped = m[2];
|
|
1651
1768
|
}
|
|
1652
|
-
unescaped = (0,
|
|
1769
|
+
unescaped = (0, unesc_1.default)(unescaped);
|
|
1653
1770
|
if (unescaped !== value) deprecatedUsage = true;
|
|
1654
1771
|
return {
|
|
1655
1772
|
deprecatedUsage,
|
|
@@ -1661,20 +1778,19 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1661
1778
|
if (opts.quoteMark !== void 0) return opts;
|
|
1662
1779
|
if (opts.value === void 0) return opts;
|
|
1663
1780
|
warnOfDeprecatedConstructor();
|
|
1664
|
-
var
|
|
1781
|
+
var _a = unescapeValue(opts.value), quoteMark = _a.quoteMark, unescaped = _a.unescaped;
|
|
1665
1782
|
if (!opts.raws) opts.raws = {};
|
|
1666
1783
|
if (opts.raws.value === void 0) opts.raws.value = opts.value;
|
|
1667
1784
|
opts.value = unescaped;
|
|
1668
1785
|
opts.quoteMark = quoteMark;
|
|
1669
1786
|
return opts;
|
|
1670
1787
|
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1788
|
+
exports.default = function(_super) {
|
|
1789
|
+
__extends(Attribute, _super);
|
|
1673
1790
|
function Attribute(opts) {
|
|
1674
|
-
var _this;
|
|
1675
1791
|
if (opts === void 0) opts = {};
|
|
1676
|
-
_this =
|
|
1677
|
-
_this.type =
|
|
1792
|
+
var _this = _super.call(this, handleDeprecatedContructorOpts(opts)) || this;
|
|
1793
|
+
_this.type = types_1.ATTRIBUTE;
|
|
1678
1794
|
_this.raws = _this.raws || {};
|
|
1679
1795
|
Object.defineProperty(_this.raws, "unquoted", {
|
|
1680
1796
|
get: deprecate(function() {
|
|
@@ -1708,34 +1824,50 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1708
1824
|
* and the other options specified here. See the `smartQuoteMark()`
|
|
1709
1825
|
* method.
|
|
1710
1826
|
**/
|
|
1711
|
-
|
|
1712
|
-
_proto.getQuotedValue = function getQuotedValue(options) {
|
|
1827
|
+
Attribute.prototype.getQuotedValue = function(options) {
|
|
1713
1828
|
if (options === void 0) options = {};
|
|
1714
1829
|
var cssescopts = CSSESC_QUOTE_OPTIONS[this._determineQuoteMark(options)];
|
|
1715
|
-
return (0,
|
|
1830
|
+
return (0, cssesc_1.default)(this._value, cssescopts);
|
|
1716
1831
|
};
|
|
1717
|
-
|
|
1832
|
+
Attribute.prototype._determineQuoteMark = function(options) {
|
|
1718
1833
|
return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
|
|
1719
1834
|
};
|
|
1720
|
-
|
|
1835
|
+
/**
|
|
1836
|
+
* Set the unescaped value with the specified quotation options. The value
|
|
1837
|
+
* provided must not include any wrapping quote marks -- those quotes will
|
|
1838
|
+
* be interpreted as part of the value and escaped accordingly.
|
|
1839
|
+
*/
|
|
1840
|
+
Attribute.prototype.setValue = function(value, options) {
|
|
1721
1841
|
if (options === void 0) options = {};
|
|
1722
1842
|
this._value = value;
|
|
1723
1843
|
this._quoteMark = this._determineQuoteMark(options);
|
|
1724
1844
|
this._syncRawValue();
|
|
1725
1845
|
};
|
|
1726
|
-
|
|
1846
|
+
/**
|
|
1847
|
+
* Intelligently select a quoteMark value based on the value's contents. If
|
|
1848
|
+
* the value is a legal CSS ident, it will not be quoted. Otherwise a quote
|
|
1849
|
+
* mark will be picked that minimizes the number of escapes.
|
|
1850
|
+
*
|
|
1851
|
+
* If there's no clear winner, the quote mark from these options is used,
|
|
1852
|
+
* then the source quote mark (this is inverted if `preferCurrentQuoteMark` is
|
|
1853
|
+
* true). If the quoteMark is unspecified, a double quote is used.
|
|
1854
|
+
*
|
|
1855
|
+
* @param options This takes the quoteMark and preferCurrentQuoteMark options
|
|
1856
|
+
* from the quoteValue method.
|
|
1857
|
+
*/
|
|
1858
|
+
Attribute.prototype.smartQuoteMark = function(options) {
|
|
1727
1859
|
var v = this.value;
|
|
1728
1860
|
var numSingleQuotes = v.replace(/[^']/g, "").length;
|
|
1729
1861
|
var numDoubleQuotes = v.replace(/[^"]/g, "").length;
|
|
1730
1862
|
if (numSingleQuotes + numDoubleQuotes === 0) {
|
|
1731
|
-
var escaped = (0,
|
|
1863
|
+
var escaped = (0, cssesc_1.default)(v, { isIdentifier: true });
|
|
1732
1864
|
if (escaped === v) return Attribute.NO_QUOTE;
|
|
1733
1865
|
else {
|
|
1734
1866
|
var pref = this.preferredQuoteMark(options);
|
|
1735
1867
|
if (pref === Attribute.NO_QUOTE) {
|
|
1736
1868
|
var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
|
|
1737
1869
|
var opts = CSSESC_QUOTE_OPTIONS[quote];
|
|
1738
|
-
if ((0,
|
|
1870
|
+
if ((0, cssesc_1.default)(v, opts).length < escaped.length) return quote;
|
|
1739
1871
|
}
|
|
1740
1872
|
return pref;
|
|
1741
1873
|
}
|
|
@@ -1743,26 +1875,147 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1743
1875
|
else if (numDoubleQuotes < numSingleQuotes) return Attribute.DOUBLE_QUOTE;
|
|
1744
1876
|
else return Attribute.SINGLE_QUOTE;
|
|
1745
1877
|
};
|
|
1746
|
-
|
|
1878
|
+
/**
|
|
1879
|
+
* Selects the preferred quote mark based on the options and the current quote mark value.
|
|
1880
|
+
* If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)`
|
|
1881
|
+
* instead.
|
|
1882
|
+
*/
|
|
1883
|
+
Attribute.prototype.preferredQuoteMark = function(options) {
|
|
1747
1884
|
var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
|
|
1748
1885
|
if (quoteMark === void 0) quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
|
|
1749
1886
|
if (quoteMark === void 0) quoteMark = Attribute.DOUBLE_QUOTE;
|
|
1750
1887
|
return quoteMark;
|
|
1751
1888
|
};
|
|
1752
|
-
|
|
1753
|
-
|
|
1889
|
+
Object.defineProperty(Attribute.prototype, "quoted", {
|
|
1890
|
+
get: function() {
|
|
1891
|
+
var qm = this.quoteMark;
|
|
1892
|
+
return qm === "'" || qm === "\"";
|
|
1893
|
+
},
|
|
1894
|
+
set: function(value) {
|
|
1895
|
+
warnOfDeprecatedQuotedAssignment();
|
|
1896
|
+
},
|
|
1897
|
+
enumerable: false,
|
|
1898
|
+
configurable: true
|
|
1899
|
+
});
|
|
1900
|
+
Object.defineProperty(Attribute.prototype, "quoteMark", {
|
|
1901
|
+
/**
|
|
1902
|
+
* returns a single (`'`) or double (`"`) quote character if the value is quoted.
|
|
1903
|
+
* returns `null` if the value is not quoted.
|
|
1904
|
+
* returns `undefined` if the quotation state is unknown (this can happen when
|
|
1905
|
+
* the attribute is constructed without specifying a quote mark.)
|
|
1906
|
+
*/
|
|
1907
|
+
get: function() {
|
|
1908
|
+
return this._quoteMark;
|
|
1909
|
+
},
|
|
1910
|
+
/**
|
|
1911
|
+
* Set the quote mark to be used by this attribute's value.
|
|
1912
|
+
* If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
|
|
1913
|
+
* value is updated accordingly.
|
|
1914
|
+
*
|
|
1915
|
+
* @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
|
|
1916
|
+
*/
|
|
1917
|
+
set: function(quoteMark) {
|
|
1918
|
+
if (!this._constructed) {
|
|
1919
|
+
this._quoteMark = quoteMark;
|
|
1920
|
+
return;
|
|
1921
|
+
}
|
|
1922
|
+
if (this._quoteMark !== quoteMark) {
|
|
1923
|
+
this._quoteMark = quoteMark;
|
|
1924
|
+
this._syncRawValue();
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
enumerable: false,
|
|
1928
|
+
configurable: true
|
|
1929
|
+
});
|
|
1930
|
+
Attribute.prototype._syncRawValue = function() {
|
|
1931
|
+
var rawValue = (0, cssesc_1.default)(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
|
|
1754
1932
|
if (rawValue === this._value) {
|
|
1755
1933
|
if (this.raws) delete this.raws.value;
|
|
1756
1934
|
} else this.raws.value = rawValue;
|
|
1757
1935
|
};
|
|
1758
|
-
|
|
1936
|
+
Object.defineProperty(Attribute.prototype, "qualifiedAttribute", {
|
|
1937
|
+
get: function() {
|
|
1938
|
+
return this.qualifiedName(this.raws.attribute || this.attribute);
|
|
1939
|
+
},
|
|
1940
|
+
enumerable: false,
|
|
1941
|
+
configurable: true
|
|
1942
|
+
});
|
|
1943
|
+
Object.defineProperty(Attribute.prototype, "insensitiveFlag", {
|
|
1944
|
+
get: function() {
|
|
1945
|
+
return this.insensitive ? "i" : "";
|
|
1946
|
+
},
|
|
1947
|
+
enumerable: false,
|
|
1948
|
+
configurable: true
|
|
1949
|
+
});
|
|
1950
|
+
Object.defineProperty(Attribute.prototype, "value", {
|
|
1951
|
+
get: function() {
|
|
1952
|
+
return this._value;
|
|
1953
|
+
},
|
|
1954
|
+
/**
|
|
1955
|
+
* Before 3.0, the value had to be set to an escaped value including any wrapped
|
|
1956
|
+
* quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value
|
|
1957
|
+
* is unescaped during parsing and any quote marks are removed.
|
|
1958
|
+
*
|
|
1959
|
+
* Because the ambiguity of this semantic change, if you set `attr.value = newValue`,
|
|
1960
|
+
* a deprecation warning is raised when the new value contains any characters that would
|
|
1961
|
+
* require escaping (including if it contains wrapped quotes).
|
|
1962
|
+
*
|
|
1963
|
+
* Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe
|
|
1964
|
+
* how the new value is quoted.
|
|
1965
|
+
*/
|
|
1966
|
+
set: function(v) {
|
|
1967
|
+
if (this._constructed) {
|
|
1968
|
+
var _a = unescapeValue(v), deprecatedUsage = _a.deprecatedUsage, unescaped = _a.unescaped, quoteMark = _a.quoteMark;
|
|
1969
|
+
if (deprecatedUsage) warnOfDeprecatedValueAssignment();
|
|
1970
|
+
if (unescaped === this._value && quoteMark === this._quoteMark) return;
|
|
1971
|
+
this._value = unescaped;
|
|
1972
|
+
this._quoteMark = quoteMark;
|
|
1973
|
+
this._syncRawValue();
|
|
1974
|
+
} else this._value = v;
|
|
1975
|
+
},
|
|
1976
|
+
enumerable: false,
|
|
1977
|
+
configurable: true
|
|
1978
|
+
});
|
|
1979
|
+
Object.defineProperty(Attribute.prototype, "insensitive", {
|
|
1980
|
+
get: function() {
|
|
1981
|
+
return this._insensitive;
|
|
1982
|
+
},
|
|
1983
|
+
/**
|
|
1984
|
+
* Set the case insensitive flag.
|
|
1985
|
+
* If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
|
|
1986
|
+
* of the attribute is updated accordingly.
|
|
1987
|
+
*
|
|
1988
|
+
* @param {true | false} insensitive true if the attribute should match case-insensitively.
|
|
1989
|
+
*/
|
|
1990
|
+
set: function(insensitive) {
|
|
1991
|
+
if (!insensitive) {
|
|
1992
|
+
this._insensitive = false;
|
|
1993
|
+
if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
|
|
1994
|
+
}
|
|
1995
|
+
this._insensitive = insensitive;
|
|
1996
|
+
},
|
|
1997
|
+
enumerable: false,
|
|
1998
|
+
configurable: true
|
|
1999
|
+
});
|
|
2000
|
+
Object.defineProperty(Attribute.prototype, "attribute", {
|
|
2001
|
+
get: function() {
|
|
2002
|
+
return this._attribute;
|
|
2003
|
+
},
|
|
2004
|
+
set: function(name) {
|
|
2005
|
+
this._handleEscapes("attribute", name);
|
|
2006
|
+
this._attribute = name;
|
|
2007
|
+
},
|
|
2008
|
+
enumerable: false,
|
|
2009
|
+
configurable: true
|
|
2010
|
+
});
|
|
2011
|
+
Attribute.prototype._handleEscapes = function(prop, value) {
|
|
1759
2012
|
if (this._constructed) {
|
|
1760
|
-
var escaped = (0,
|
|
2013
|
+
var escaped = (0, cssesc_1.default)(value, { isIdentifier: true });
|
|
1761
2014
|
if (escaped !== value) this.raws[prop] = escaped;
|
|
1762
2015
|
else delete this.raws[prop];
|
|
1763
2016
|
}
|
|
1764
2017
|
};
|
|
1765
|
-
|
|
2018
|
+
Attribute.prototype._spacesFor = function(name) {
|
|
1766
2019
|
var attrSpaces = {
|
|
1767
2020
|
before: "",
|
|
1768
2021
|
after: ""
|
|
@@ -1771,13 +2024,27 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1771
2024
|
var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
|
|
1772
2025
|
return Object.assign(attrSpaces, spaces, rawSpaces);
|
|
1773
2026
|
};
|
|
1774
|
-
|
|
2027
|
+
Attribute.prototype._stringFor = function(name, spaceName, concat) {
|
|
1775
2028
|
if (spaceName === void 0) spaceName = name;
|
|
1776
2029
|
if (concat === void 0) concat = defaultAttrConcat;
|
|
1777
2030
|
var attrSpaces = this._spacesFor(spaceName);
|
|
1778
2031
|
return concat(this.stringifyProperty(name), attrSpaces);
|
|
1779
2032
|
};
|
|
1780
|
-
|
|
2033
|
+
/**
|
|
2034
|
+
* returns the offset of the attribute part specified relative to the
|
|
2035
|
+
* start of the node of the output string.
|
|
2036
|
+
*
|
|
2037
|
+
* * "ns" - alias for "namespace"
|
|
2038
|
+
* * "namespace" - the namespace if it exists.
|
|
2039
|
+
* * "attribute" - the attribute name
|
|
2040
|
+
* * "attributeNS" - the start of the attribute or its namespace
|
|
2041
|
+
* * "operator" - the match operator of the attribute
|
|
2042
|
+
* * "value" - The value (string or identifier)
|
|
2043
|
+
* * "insensitive" - the case insensitivity flag;
|
|
2044
|
+
* @param part One of the possible values inside an attribute.
|
|
2045
|
+
* @returns -1 if the name is invalid or the value doesn't exist in this attribute.
|
|
2046
|
+
*/
|
|
2047
|
+
Attribute.prototype.offsetOf = function(name) {
|
|
1781
2048
|
var count = 1;
|
|
1782
2049
|
var attributeSpaces = this._spacesFor("attribute");
|
|
1783
2050
|
count += attributeSpaces.before.length;
|
|
@@ -1805,15 +2072,15 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1805
2072
|
if (name === "insensitive") return this.insensitive ? count : -1;
|
|
1806
2073
|
return -1;
|
|
1807
2074
|
};
|
|
1808
|
-
|
|
1809
|
-
var
|
|
2075
|
+
Attribute.prototype.toString = function() {
|
|
2076
|
+
var _this = this;
|
|
1810
2077
|
var selector = [this.rawSpaceBefore, "["];
|
|
1811
2078
|
selector.push(this._stringFor("qualifiedAttribute", "attribute"));
|
|
1812
2079
|
if (this.operator && (this.value || this.value === "")) {
|
|
1813
2080
|
selector.push(this._stringFor("operator"));
|
|
1814
2081
|
selector.push(this._stringFor("value"));
|
|
1815
2082
|
selector.push(this._stringFor("insensitiveFlag", "insensitive", function(attrValue, attrSpaces) {
|
|
1816
|
-
if (attrValue.length > 0 && !
|
|
2083
|
+
if (attrValue.length > 0 && !_this.quoted && attrSpaces.before.length === 0 && !(_this.spaces.value && _this.spaces.value.after)) attrSpaces.before = " ";
|
|
1817
2084
|
return defaultAttrConcat(attrValue, attrSpaces);
|
|
1818
2085
|
}));
|
|
1819
2086
|
}
|
|
@@ -1821,92 +2088,12 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1821
2088
|
selector.push(this.rawSpaceAfter);
|
|
1822
2089
|
return selector.join("");
|
|
1823
2090
|
};
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
get: function get() {
|
|
1828
|
-
var qm = this.quoteMark;
|
|
1829
|
-
return qm === "'" || qm === "\"";
|
|
1830
|
-
},
|
|
1831
|
-
set: function set(value) {
|
|
1832
|
-
warnOfDeprecatedQuotedAssignment();
|
|
1833
|
-
}
|
|
1834
|
-
},
|
|
1835
|
-
{
|
|
1836
|
-
key: "quoteMark",
|
|
1837
|
-
get: function get() {
|
|
1838
|
-
return this._quoteMark;
|
|
1839
|
-
},
|
|
1840
|
-
set: function set(quoteMark) {
|
|
1841
|
-
if (!this._constructed) {
|
|
1842
|
-
this._quoteMark = quoteMark;
|
|
1843
|
-
return;
|
|
1844
|
-
}
|
|
1845
|
-
if (this._quoteMark !== quoteMark) {
|
|
1846
|
-
this._quoteMark = quoteMark;
|
|
1847
|
-
this._syncRawValue();
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
},
|
|
1851
|
-
{
|
|
1852
|
-
key: "qualifiedAttribute",
|
|
1853
|
-
get: function get() {
|
|
1854
|
-
return this.qualifiedName(this.raws.attribute || this.attribute);
|
|
1855
|
-
}
|
|
1856
|
-
},
|
|
1857
|
-
{
|
|
1858
|
-
key: "insensitiveFlag",
|
|
1859
|
-
get: function get() {
|
|
1860
|
-
return this.insensitive ? "i" : "";
|
|
1861
|
-
}
|
|
1862
|
-
},
|
|
1863
|
-
{
|
|
1864
|
-
key: "value",
|
|
1865
|
-
get: function get() {
|
|
1866
|
-
return this._value;
|
|
1867
|
-
},
|
|
1868
|
-
set: function set(v) {
|
|
1869
|
-
if (this._constructed) {
|
|
1870
|
-
var _unescapeValue2 = unescapeValue(v), deprecatedUsage = _unescapeValue2.deprecatedUsage, unescaped = _unescapeValue2.unescaped, quoteMark = _unescapeValue2.quoteMark;
|
|
1871
|
-
if (deprecatedUsage) warnOfDeprecatedValueAssignment();
|
|
1872
|
-
if (unescaped === this._value && quoteMark === this._quoteMark) return;
|
|
1873
|
-
this._value = unescaped;
|
|
1874
|
-
this._quoteMark = quoteMark;
|
|
1875
|
-
this._syncRawValue();
|
|
1876
|
-
} else this._value = v;
|
|
1877
|
-
}
|
|
1878
|
-
},
|
|
1879
|
-
{
|
|
1880
|
-
key: "insensitive",
|
|
1881
|
-
get: function get() {
|
|
1882
|
-
return this._insensitive;
|
|
1883
|
-
},
|
|
1884
|
-
set: function set(insensitive) {
|
|
1885
|
-
if (!insensitive) {
|
|
1886
|
-
this._insensitive = false;
|
|
1887
|
-
if (this.raws && (this.raws.insensitiveFlag === "I" || this.raws.insensitiveFlag === "i")) this.raws.insensitiveFlag = void 0;
|
|
1888
|
-
}
|
|
1889
|
-
this._insensitive = insensitive;
|
|
1890
|
-
}
|
|
1891
|
-
},
|
|
1892
|
-
{
|
|
1893
|
-
key: "attribute",
|
|
1894
|
-
get: function get() {
|
|
1895
|
-
return this._attribute;
|
|
1896
|
-
},
|
|
1897
|
-
set: function set(name) {
|
|
1898
|
-
this._handleEscapes("attribute", name);
|
|
1899
|
-
this._attribute = name;
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
]);
|
|
2091
|
+
Attribute.NO_QUOTE = null;
|
|
2092
|
+
Attribute.SINGLE_QUOTE = "'";
|
|
2093
|
+
Attribute.DOUBLE_QUOTE = "\"";
|
|
1903
2094
|
return Attribute;
|
|
1904
|
-
}(
|
|
1905
|
-
|
|
1906
|
-
Attribute.NO_QUOTE = null;
|
|
1907
|
-
Attribute.SINGLE_QUOTE = "'";
|
|
1908
|
-
Attribute.DOUBLE_QUOTE = "\"";
|
|
1909
|
-
var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
|
|
2095
|
+
}(namespace_1.default);
|
|
2096
|
+
var CSSESC_QUOTE_OPTIONS = (_a = {
|
|
1910
2097
|
"'": {
|
|
1911
2098
|
quotes: "single",
|
|
1912
2099
|
wrap: true
|
|
@@ -1915,129 +2102,140 @@ var require_attribute = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1915
2102
|
quotes: "double",
|
|
1916
2103
|
wrap: true
|
|
1917
2104
|
}
|
|
1918
|
-
},
|
|
2105
|
+
}, _a[null] = { isIdentifier: true }, _a);
|
|
1919
2106
|
function defaultAttrConcat(attrValue, attrSpaces) {
|
|
1920
|
-
return ""
|
|
2107
|
+
return "".concat(attrSpaces.before).concat(attrValue).concat(attrSpaces.after);
|
|
1921
2108
|
}
|
|
1922
2109
|
}));
|
|
1923
2110
|
//#endregion
|
|
1924
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1925
|
-
var require_universal = /* @__PURE__ */ __commonJSMin(((exports
|
|
1926
|
-
exports.
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1935
|
-
subClass.prototype.constructor = subClass;
|
|
1936
|
-
_setPrototypeOf(subClass, superClass);
|
|
1937
|
-
}
|
|
1938
|
-
function _setPrototypeOf(o, p) {
|
|
1939
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1940
|
-
o.__proto__ = p;
|
|
1941
|
-
return o;
|
|
2111
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/universal.js
|
|
2112
|
+
var require_universal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2113
|
+
var __extends = exports && exports.__extends || (function() {
|
|
2114
|
+
var extendStatics = function(d, b) {
|
|
2115
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
2116
|
+
d.__proto__ = b;
|
|
2117
|
+
} || function(d, b) {
|
|
2118
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
2119
|
+
};
|
|
2120
|
+
return extendStatics(d, b);
|
|
1942
2121
|
};
|
|
1943
|
-
return
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
2122
|
+
return function(d, b) {
|
|
2123
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
2124
|
+
extendStatics(d, b);
|
|
2125
|
+
function __() {
|
|
2126
|
+
this.constructor = d;
|
|
2127
|
+
}
|
|
2128
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2129
|
+
};
|
|
2130
|
+
})();
|
|
2131
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2132
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2133
|
+
};
|
|
2134
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2135
|
+
var namespace_1 = __importDefault(require_namespace());
|
|
2136
|
+
var types_1 = require_types();
|
|
2137
|
+
exports.default = function(_super) {
|
|
2138
|
+
__extends(Universal, _super);
|
|
1947
2139
|
function Universal(opts) {
|
|
1948
|
-
var _this =
|
|
1949
|
-
_this.type =
|
|
2140
|
+
var _this = _super.call(this, opts) || this;
|
|
2141
|
+
_this.type = types_1.UNIVERSAL;
|
|
1950
2142
|
_this.value = "*";
|
|
1951
2143
|
return _this;
|
|
1952
2144
|
}
|
|
1953
2145
|
return Universal;
|
|
1954
|
-
}(
|
|
1955
|
-
module.exports = exports.default;
|
|
2146
|
+
}(namespace_1.default);
|
|
1956
2147
|
}));
|
|
1957
2148
|
//#endregion
|
|
1958
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1959
|
-
var require_combinator = /* @__PURE__ */ __commonJSMin(((exports
|
|
1960
|
-
exports.
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
1969
|
-
subClass.prototype.constructor = subClass;
|
|
1970
|
-
_setPrototypeOf(subClass, superClass);
|
|
1971
|
-
}
|
|
1972
|
-
function _setPrototypeOf(o, p) {
|
|
1973
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1974
|
-
o.__proto__ = p;
|
|
1975
|
-
return o;
|
|
2149
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/combinator.js
|
|
2150
|
+
var require_combinator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2151
|
+
var __extends = exports && exports.__extends || (function() {
|
|
2152
|
+
var extendStatics = function(d, b) {
|
|
2153
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
2154
|
+
d.__proto__ = b;
|
|
2155
|
+
} || function(d, b) {
|
|
2156
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
2157
|
+
};
|
|
2158
|
+
return extendStatics(d, b);
|
|
1976
2159
|
};
|
|
1977
|
-
return
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2160
|
+
return function(d, b) {
|
|
2161
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
2162
|
+
extendStatics(d, b);
|
|
2163
|
+
function __() {
|
|
2164
|
+
this.constructor = d;
|
|
2165
|
+
}
|
|
2166
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2167
|
+
};
|
|
2168
|
+
})();
|
|
2169
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2170
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2171
|
+
};
|
|
2172
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2173
|
+
var node_1 = __importDefault(require_node$1());
|
|
2174
|
+
var types_1 = require_types();
|
|
2175
|
+
exports.default = function(_super) {
|
|
2176
|
+
__extends(Combinator, _super);
|
|
1981
2177
|
function Combinator(opts) {
|
|
1982
|
-
var _this =
|
|
1983
|
-
_this.type =
|
|
2178
|
+
var _this = _super.call(this, opts) || this;
|
|
2179
|
+
_this.type = types_1.COMBINATOR;
|
|
1984
2180
|
return _this;
|
|
1985
2181
|
}
|
|
1986
2182
|
return Combinator;
|
|
1987
|
-
}(
|
|
1988
|
-
module.exports = exports.default;
|
|
2183
|
+
}(node_1.default);
|
|
1989
2184
|
}));
|
|
1990
2185
|
//#endregion
|
|
1991
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
1992
|
-
var require_nesting = /* @__PURE__ */ __commonJSMin(((exports
|
|
1993
|
-
exports.
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
2002
|
-
subClass.prototype.constructor = subClass;
|
|
2003
|
-
_setPrototypeOf(subClass, superClass);
|
|
2004
|
-
}
|
|
2005
|
-
function _setPrototypeOf(o, p) {
|
|
2006
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
2007
|
-
o.__proto__ = p;
|
|
2008
|
-
return o;
|
|
2186
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/nesting.js
|
|
2187
|
+
var require_nesting = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2188
|
+
var __extends = exports && exports.__extends || (function() {
|
|
2189
|
+
var extendStatics = function(d, b) {
|
|
2190
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
2191
|
+
d.__proto__ = b;
|
|
2192
|
+
} || function(d, b) {
|
|
2193
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
2194
|
+
};
|
|
2195
|
+
return extendStatics(d, b);
|
|
2009
2196
|
};
|
|
2010
|
-
return
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2197
|
+
return function(d, b) {
|
|
2198
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
2199
|
+
extendStatics(d, b);
|
|
2200
|
+
function __() {
|
|
2201
|
+
this.constructor = d;
|
|
2202
|
+
}
|
|
2203
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2204
|
+
};
|
|
2205
|
+
})();
|
|
2206
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2207
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2208
|
+
};
|
|
2209
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2210
|
+
var node_1 = __importDefault(require_node$1());
|
|
2211
|
+
var types_1 = require_types();
|
|
2212
|
+
exports.default = function(_super) {
|
|
2213
|
+
__extends(Nesting, _super);
|
|
2014
2214
|
function Nesting(opts) {
|
|
2015
|
-
var _this =
|
|
2016
|
-
_this.type =
|
|
2215
|
+
var _this = _super.call(this, opts) || this;
|
|
2216
|
+
_this.type = types_1.NESTING;
|
|
2017
2217
|
_this.value = "&";
|
|
2018
2218
|
return _this;
|
|
2019
2219
|
}
|
|
2020
2220
|
return Nesting;
|
|
2021
|
-
}(
|
|
2022
|
-
module.exports = exports.default;
|
|
2221
|
+
}(node_1.default);
|
|
2023
2222
|
}));
|
|
2024
2223
|
//#endregion
|
|
2025
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
2026
|
-
var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports
|
|
2027
|
-
exports
|
|
2028
|
-
exports
|
|
2224
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/sortAscending.js
|
|
2225
|
+
var require_sortAscending = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2226
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2227
|
+
exports.default = sortAscending;
|
|
2029
2228
|
function sortAscending(list) {
|
|
2030
2229
|
return list.sort(function(a, b) {
|
|
2031
2230
|
return a - b;
|
|
2032
2231
|
});
|
|
2033
2232
|
}
|
|
2034
|
-
module.exports = exports.default;
|
|
2035
2233
|
}));
|
|
2036
2234
|
//#endregion
|
|
2037
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
2235
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenTypes.js
|
|
2038
2236
|
var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2039
|
-
exports
|
|
2040
|
-
exports.
|
|
2237
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2238
|
+
exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0;
|
|
2041
2239
|
exports.ampersand = 38;
|
|
2042
2240
|
exports.asterisk = 42;
|
|
2043
2241
|
exports.at = 64;
|
|
@@ -2056,8 +2254,7 @@ var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2056
2254
|
exports.pipe = 124;
|
|
2057
2255
|
exports.greaterThan = 62;
|
|
2058
2256
|
exports.space = 32;
|
|
2059
|
-
|
|
2060
|
-
exports.singleQuote = singleQuote;
|
|
2257
|
+
exports.singleQuote = 39;
|
|
2061
2258
|
exports.doubleQuote = 34;
|
|
2062
2259
|
exports.slash = 47;
|
|
2063
2260
|
exports.bang = 33;
|
|
@@ -2066,45 +2263,62 @@ var require_tokenTypes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2066
2263
|
exports.feed = 12;
|
|
2067
2264
|
exports.newline = 10;
|
|
2068
2265
|
exports.tab = 9;
|
|
2069
|
-
exports.str = singleQuote;
|
|
2266
|
+
exports.str = exports.singleQuote;
|
|
2070
2267
|
exports.comment = -1;
|
|
2071
2268
|
exports.word = -2;
|
|
2072
2269
|
exports.combinator = -3;
|
|
2073
2270
|
}));
|
|
2074
2271
|
//#endregion
|
|
2075
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
2272
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/tokenize.js
|
|
2076
2273
|
var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2077
|
-
exports.
|
|
2274
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2275
|
+
if (k2 === void 0) k2 = k;
|
|
2276
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2277
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
2278
|
+
enumerable: true,
|
|
2279
|
+
get: function() {
|
|
2280
|
+
return m[k];
|
|
2281
|
+
}
|
|
2282
|
+
};
|
|
2283
|
+
Object.defineProperty(o, k2, desc);
|
|
2284
|
+
}) : (function(o, m, k, k2) {
|
|
2285
|
+
if (k2 === void 0) k2 = k;
|
|
2286
|
+
o[k2] = m[k];
|
|
2287
|
+
}));
|
|
2288
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
2289
|
+
Object.defineProperty(o, "default", {
|
|
2290
|
+
enumerable: true,
|
|
2291
|
+
value: v
|
|
2292
|
+
});
|
|
2293
|
+
}) : function(o, v) {
|
|
2294
|
+
o["default"] = v;
|
|
2295
|
+
});
|
|
2296
|
+
var __importStar = exports && exports.__importStar || (function() {
|
|
2297
|
+
var ownKeys = function(o) {
|
|
2298
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2299
|
+
var ar = [];
|
|
2300
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2301
|
+
return ar;
|
|
2302
|
+
};
|
|
2303
|
+
return ownKeys(o);
|
|
2304
|
+
};
|
|
2305
|
+
return function(mod) {
|
|
2306
|
+
if (mod && mod.__esModule) return mod;
|
|
2307
|
+
var result = {};
|
|
2308
|
+
if (mod != null) {
|
|
2309
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2310
|
+
}
|
|
2311
|
+
__setModuleDefault(result, mod);
|
|
2312
|
+
return result;
|
|
2313
|
+
};
|
|
2314
|
+
})();
|
|
2315
|
+
var _a, _b;
|
|
2316
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2078
2317
|
exports.FIELDS = void 0;
|
|
2079
|
-
exports
|
|
2080
|
-
var t =
|
|
2081
|
-
var
|
|
2082
|
-
|
|
2083
|
-
if (typeof WeakMap !== "function") return null;
|
|
2084
|
-
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
2085
|
-
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
2086
|
-
return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
2087
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
2088
|
-
})(nodeInterop);
|
|
2089
|
-
}
|
|
2090
|
-
function _interopRequireWildcard(obj, nodeInterop) {
|
|
2091
|
-
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
2092
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { "default": obj };
|
|
2093
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
2094
|
-
if (cache && cache.has(obj)) return cache.get(obj);
|
|
2095
|
-
var newObj = {};
|
|
2096
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
2097
|
-
for (var key in obj) if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2098
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
2099
|
-
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
2100
|
-
else newObj[key] = obj[key];
|
|
2101
|
-
}
|
|
2102
|
-
newObj["default"] = obj;
|
|
2103
|
-
if (cache) cache.set(obj, newObj);
|
|
2104
|
-
return newObj;
|
|
2105
|
-
}
|
|
2106
|
-
var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
|
|
2107
|
-
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);
|
|
2318
|
+
exports.default = tokenize;
|
|
2319
|
+
var t = __importStar(require_tokenTypes());
|
|
2320
|
+
var unescapable = (_a = {}, _a[t.tab] = true, _a[t.newline] = true, _a[t.cr] = true, _a[t.feed] = true, _a);
|
|
2321
|
+
var wordDelimiters = (_b = {}, _b[t.space] = true, _b[t.tab] = true, _b[t.newline] = true, _b[t.cr] = true, _b[t.feed] = true, _b[t.ampersand] = true, _b[t.asterisk] = true, _b[t.bang] = true, _b[t.comma] = true, _b[t.colon] = true, _b[t.semicolon] = true, _b[t.openParenthesis] = true, _b[t.closeParenthesis] = true, _b[t.openSquare] = true, _b[t.closeSquare] = true, _b[t.singleQuote] = true, _b[t.doubleQuote] = true, _b[t.plus] = true, _b[t.pipe] = true, _b[t.tilde] = true, _b[t.greaterThan] = true, _b[t.equals] = true, _b[t.dollar] = true, _b[t.caret] = true, _b[t.slash] = true, _b);
|
|
2108
2322
|
var hex = {};
|
|
2109
2323
|
var hexChars = "0123456789abcdefABCDEF";
|
|
2110
2324
|
for (var i = 0; i < hexChars.length; i++) hex[hexChars.charCodeAt(i)] = true;
|
|
@@ -2297,82 +2511,119 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2297
2511
|
}
|
|
2298
2512
|
}));
|
|
2299
2513
|
//#endregion
|
|
2300
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
2301
|
-
var require_parser = /* @__PURE__ */ __commonJSMin(((exports
|
|
2302
|
-
exports.
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
var
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
function
|
|
2323
|
-
if (
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
var
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2514
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/parser.js
|
|
2515
|
+
var require_parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2516
|
+
var __assign = exports && exports.__assign || function() {
|
|
2517
|
+
__assign = Object.assign || function(t) {
|
|
2518
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2519
|
+
s = arguments[i];
|
|
2520
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
2521
|
+
}
|
|
2522
|
+
return t;
|
|
2523
|
+
};
|
|
2524
|
+
return __assign.apply(this, arguments);
|
|
2525
|
+
};
|
|
2526
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
2527
|
+
if (k2 === void 0) k2 = k;
|
|
2528
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2529
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
2530
|
+
enumerable: true,
|
|
2531
|
+
get: function() {
|
|
2532
|
+
return m[k];
|
|
2533
|
+
}
|
|
2534
|
+
};
|
|
2535
|
+
Object.defineProperty(o, k2, desc);
|
|
2536
|
+
}) : (function(o, m, k, k2) {
|
|
2537
|
+
if (k2 === void 0) k2 = k;
|
|
2538
|
+
o[k2] = m[k];
|
|
2539
|
+
}));
|
|
2540
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
2541
|
+
Object.defineProperty(o, "default", {
|
|
2542
|
+
enumerable: true,
|
|
2543
|
+
value: v
|
|
2544
|
+
});
|
|
2545
|
+
}) : function(o, v) {
|
|
2546
|
+
o["default"] = v;
|
|
2547
|
+
});
|
|
2548
|
+
var __importStar = exports && exports.__importStar || (function() {
|
|
2549
|
+
var ownKeys = function(o) {
|
|
2550
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2551
|
+
var ar = [];
|
|
2552
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2553
|
+
return ar;
|
|
2554
|
+
};
|
|
2555
|
+
return ownKeys(o);
|
|
2556
|
+
};
|
|
2557
|
+
return function(mod) {
|
|
2558
|
+
if (mod && mod.__esModule) return mod;
|
|
2559
|
+
var result = {};
|
|
2560
|
+
if (mod != null) {
|
|
2561
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
2562
|
+
}
|
|
2563
|
+
__setModuleDefault(result, mod);
|
|
2564
|
+
return result;
|
|
2565
|
+
};
|
|
2566
|
+
})();
|
|
2567
|
+
var __read = exports && exports.__read || function(o, n) {
|
|
2568
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2569
|
+
if (!m) return o;
|
|
2570
|
+
var i = m.call(o), r, ar = [], e;
|
|
2571
|
+
try {
|
|
2572
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2573
|
+
} catch (error) {
|
|
2574
|
+
e = { error };
|
|
2575
|
+
} finally {
|
|
2576
|
+
try {
|
|
2577
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2578
|
+
} finally {
|
|
2579
|
+
if (e) throw e.error;
|
|
2580
|
+
}
|
|
2341
2581
|
}
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
for (var i = 0; i < props.length; i++) {
|
|
2351
|
-
var descriptor = props[i];
|
|
2352
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
2353
|
-
descriptor.configurable = true;
|
|
2354
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
2355
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2582
|
+
return ar;
|
|
2583
|
+
};
|
|
2584
|
+
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
2585
|
+
if (pack || arguments.length === 2) {
|
|
2586
|
+
for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {
|
|
2587
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2588
|
+
ar[i] = from[i];
|
|
2589
|
+
}
|
|
2356
2590
|
}
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
}
|
|
2364
|
-
var
|
|
2365
|
-
var
|
|
2591
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2592
|
+
};
|
|
2593
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
2594
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2595
|
+
};
|
|
2596
|
+
var _a, _b;
|
|
2597
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2598
|
+
var root_1 = __importDefault(require_root());
|
|
2599
|
+
var selector_1 = __importDefault(require_selector());
|
|
2600
|
+
var className_1 = __importDefault(require_className());
|
|
2601
|
+
var comment_1 = __importDefault(require_comment());
|
|
2602
|
+
var id_1 = __importDefault(require_id());
|
|
2603
|
+
var tag_1 = __importDefault(require_tag());
|
|
2604
|
+
var string_1 = __importDefault(require_string());
|
|
2605
|
+
var pseudo_1 = __importDefault(require_pseudo());
|
|
2606
|
+
var attribute_1 = __importStar(require_attribute());
|
|
2607
|
+
var universal_1 = __importDefault(require_universal());
|
|
2608
|
+
var combinator_1 = __importDefault(require_combinator());
|
|
2609
|
+
var nesting_1 = __importDefault(require_nesting());
|
|
2610
|
+
var sortAscending_1 = __importDefault(require_sortAscending());
|
|
2611
|
+
var tokenize_1 = __importStar(require_tokenize());
|
|
2612
|
+
var tokens = __importStar(require_tokenTypes());
|
|
2613
|
+
var types = __importStar(require_types());
|
|
2614
|
+
var util_1 = require_util();
|
|
2615
|
+
var WHITESPACE_TOKENS = (_a = {}, _a[tokens.space] = true, _a[tokens.cr] = true, _a[tokens.feed] = true, _a[tokens.newline] = true, _a[tokens.tab] = true, _a);
|
|
2616
|
+
var WHITESPACE_EQUIV_TOKENS = __assign(__assign({}, WHITESPACE_TOKENS), (_b = {}, _b[tokens.comment] = true, _b));
|
|
2366
2617
|
function tokenStart(token) {
|
|
2367
2618
|
return {
|
|
2368
|
-
line: token[
|
|
2369
|
-
column: token[
|
|
2619
|
+
line: token[tokenize_1.FIELDS.START_LINE],
|
|
2620
|
+
column: token[tokenize_1.FIELDS.START_COL]
|
|
2370
2621
|
};
|
|
2371
2622
|
}
|
|
2372
2623
|
function tokenEnd(token) {
|
|
2373
2624
|
return {
|
|
2374
|
-
line: token[
|
|
2375
|
-
column: token[
|
|
2625
|
+
line: token[tokenize_1.FIELDS.END_LINE],
|
|
2626
|
+
column: token[tokenize_1.FIELDS.END_COL]
|
|
2376
2627
|
};
|
|
2377
2628
|
}
|
|
2378
2629
|
function getSource(startLine, startColumn, endLine, endColumn) {
|
|
@@ -2388,18 +2639,18 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2388
2639
|
};
|
|
2389
2640
|
}
|
|
2390
2641
|
function getTokenSource(token) {
|
|
2391
|
-
return getSource(token[
|
|
2642
|
+
return getSource(token[tokenize_1.FIELDS.START_LINE], token[tokenize_1.FIELDS.START_COL], token[tokenize_1.FIELDS.END_LINE], token[tokenize_1.FIELDS.END_COL]);
|
|
2392
2643
|
}
|
|
2393
2644
|
function getTokenSourceSpan(startToken, endToken) {
|
|
2394
2645
|
if (!startToken) return;
|
|
2395
|
-
return getSource(startToken[
|
|
2646
|
+
return getSource(startToken[tokenize_1.FIELDS.START_LINE], startToken[tokenize_1.FIELDS.START_COL], endToken[tokenize_1.FIELDS.END_LINE], endToken[tokenize_1.FIELDS.END_COL]);
|
|
2396
2647
|
}
|
|
2397
2648
|
function unescapeProp(node, prop) {
|
|
2398
2649
|
var value = node[prop];
|
|
2399
2650
|
if (typeof value !== "string") return;
|
|
2400
2651
|
if (value.indexOf("\\") !== -1) {
|
|
2401
|
-
(0,
|
|
2402
|
-
node[prop] = (0,
|
|
2652
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2653
|
+
node[prop] = (0, util_1.unesc)(value);
|
|
2403
2654
|
if (node.raws[prop] === void 0) node.raws[prop] = value;
|
|
2404
2655
|
}
|
|
2405
2656
|
return node;
|
|
@@ -2416,7 +2667,7 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2416
2667
|
return i === list.indexOf(item);
|
|
2417
2668
|
});
|
|
2418
2669
|
}
|
|
2419
|
-
exports
|
|
2670
|
+
exports.default = function() {
|
|
2420
2671
|
function Parser(rule, options) {
|
|
2421
2672
|
if (options === void 0) options = {};
|
|
2422
2673
|
this.rule = rule;
|
|
@@ -2425,16 +2676,18 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2425
2676
|
safe: false
|
|
2426
2677
|
}, options);
|
|
2427
2678
|
this.position = 0;
|
|
2679
|
+
this.nestingDepth = 0;
|
|
2680
|
+
this.maxNestingDepth = (0, util_1.resolveMaxNestingDepth)(this.options.maxNestingDepth);
|
|
2428
2681
|
this.css = typeof this.rule === "string" ? this.rule : this.rule.selector;
|
|
2429
|
-
this.tokens = (0,
|
|
2682
|
+
this.tokens = (0, tokenize_1.default)({
|
|
2430
2683
|
css: this.css,
|
|
2431
2684
|
error: this._errorGenerator(),
|
|
2432
2685
|
safe: this.options.safe
|
|
2433
2686
|
});
|
|
2434
2687
|
var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
|
|
2435
|
-
this.root = new
|
|
2688
|
+
this.root = new root_1.default({ source: rootSource });
|
|
2436
2689
|
this.root.errorGenerator = this._errorGenerator();
|
|
2437
|
-
var selector = new
|
|
2690
|
+
var selector = new selector_1.default({
|
|
2438
2691
|
source: { start: {
|
|
2439
2692
|
line: 1,
|
|
2440
2693
|
column: 1
|
|
@@ -2445,29 +2698,28 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2445
2698
|
this.current = selector;
|
|
2446
2699
|
this.loop();
|
|
2447
2700
|
}
|
|
2448
|
-
|
|
2449
|
-
_proto._errorGenerator = function _errorGenerator() {
|
|
2701
|
+
Parser.prototype._errorGenerator = function() {
|
|
2450
2702
|
var _this = this;
|
|
2451
2703
|
return function(message, errorOptions) {
|
|
2452
2704
|
if (typeof _this.rule === "string") return new Error(message);
|
|
2453
2705
|
return _this.rule.error(message, errorOptions);
|
|
2454
2706
|
};
|
|
2455
2707
|
};
|
|
2456
|
-
|
|
2708
|
+
Parser.prototype.attribute = function() {
|
|
2457
2709
|
var attr = [];
|
|
2458
2710
|
var startingToken = this.currToken;
|
|
2459
2711
|
this.position++;
|
|
2460
|
-
while (this.position < this.tokens.length && this.currToken[
|
|
2712
|
+
while (this.position < this.tokens.length && this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) {
|
|
2461
2713
|
attr.push(this.currToken);
|
|
2462
2714
|
this.position++;
|
|
2463
2715
|
}
|
|
2464
|
-
if (this.currToken[
|
|
2716
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] !== tokens.closeSquare) return this.expected("closing square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2465
2717
|
var len = attr.length;
|
|
2466
2718
|
var node = {
|
|
2467
2719
|
source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
|
|
2468
|
-
sourceIndex: startingToken[
|
|
2720
|
+
sourceIndex: startingToken[tokenize_1.FIELDS.START_POS]
|
|
2469
2721
|
};
|
|
2470
|
-
if (len === 1 && !~[tokens.word].indexOf(attr[0][
|
|
2722
|
+
if (len === 1 && !~[tokens.word].indexOf(attr[0][tokenize_1.FIELDS.TYPE])) return this.expected("attribute", attr[0][tokenize_1.FIELDS.START_POS]);
|
|
2471
2723
|
var pos = 0;
|
|
2472
2724
|
var spaceBefore = "";
|
|
2473
2725
|
var commentBefore = "";
|
|
@@ -2477,15 +2729,15 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2477
2729
|
var token = attr[pos];
|
|
2478
2730
|
var content = this.content(token);
|
|
2479
2731
|
var next = attr[pos + 1];
|
|
2480
|
-
switch (token[
|
|
2732
|
+
switch (token[tokenize_1.FIELDS.TYPE]) {
|
|
2481
2733
|
case tokens.space:
|
|
2482
2734
|
spaceAfterMeaningfulToken = true;
|
|
2483
2735
|
if (this.options.lossy) break;
|
|
2484
2736
|
if (lastAdded) {
|
|
2485
|
-
(0,
|
|
2737
|
+
(0, util_1.ensureObject)(node, "spaces", lastAdded);
|
|
2486
2738
|
var prevContent = node.spaces[lastAdded].after || "";
|
|
2487
2739
|
node.spaces[lastAdded].after = prevContent + content;
|
|
2488
|
-
var existingComment = (0,
|
|
2740
|
+
var existingComment = (0, util_1.getProp)(node, "raws", "spaces", lastAdded, "after") || null;
|
|
2489
2741
|
if (existingComment) node.raws.spaces[lastAdded].after = existingComment + content;
|
|
2490
2742
|
} else {
|
|
2491
2743
|
spaceBefore = spaceBefore + content;
|
|
@@ -2493,41 +2745,42 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2493
2745
|
}
|
|
2494
2746
|
break;
|
|
2495
2747
|
case tokens.asterisk:
|
|
2496
|
-
if (next[
|
|
2748
|
+
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2497
2749
|
node.operator = content;
|
|
2498
2750
|
lastAdded = "operator";
|
|
2499
2751
|
} else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
|
|
2500
2752
|
if (spaceBefore) {
|
|
2501
|
-
(0,
|
|
2753
|
+
(0, util_1.ensureObject)(node, "spaces", "attribute");
|
|
2502
2754
|
node.spaces.attribute.before = spaceBefore;
|
|
2503
2755
|
spaceBefore = "";
|
|
2504
2756
|
}
|
|
2505
2757
|
if (commentBefore) {
|
|
2506
|
-
(0,
|
|
2758
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
|
|
2507
2759
|
node.raws.spaces.attribute.before = spaceBefore;
|
|
2508
2760
|
commentBefore = "";
|
|
2509
2761
|
}
|
|
2510
2762
|
node.namespace = (node.namespace || "") + content;
|
|
2511
|
-
|
|
2763
|
+
var rawValue = (0, util_1.getProp)(node, "raws", "namespace") || null;
|
|
2764
|
+
if (rawValue) node.raws.namespace += content;
|
|
2512
2765
|
lastAdded = "namespace";
|
|
2513
2766
|
}
|
|
2514
2767
|
spaceAfterMeaningfulToken = false;
|
|
2515
2768
|
break;
|
|
2516
2769
|
case tokens.dollar: if (lastAdded === "value") {
|
|
2517
|
-
var oldRawValue = (0,
|
|
2770
|
+
var oldRawValue = (0, util_1.getProp)(node, "raws", "value");
|
|
2518
2771
|
node.value += "$";
|
|
2519
2772
|
if (oldRawValue) node.raws.value = oldRawValue + "$";
|
|
2520
2773
|
break;
|
|
2521
2774
|
}
|
|
2522
2775
|
case tokens.caret:
|
|
2523
|
-
if (next[
|
|
2776
|
+
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2524
2777
|
node.operator = content;
|
|
2525
2778
|
lastAdded = "operator";
|
|
2526
2779
|
}
|
|
2527
2780
|
spaceAfterMeaningfulToken = false;
|
|
2528
2781
|
break;
|
|
2529
2782
|
case tokens.combinator:
|
|
2530
|
-
if (content === "~" && next[
|
|
2783
|
+
if (content === "~" && next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2531
2784
|
node.operator = content;
|
|
2532
2785
|
lastAdded = "operator";
|
|
2533
2786
|
}
|
|
@@ -2535,39 +2788,40 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2535
2788
|
spaceAfterMeaningfulToken = false;
|
|
2536
2789
|
break;
|
|
2537
2790
|
}
|
|
2538
|
-
if (next[
|
|
2791
|
+
if (next[tokenize_1.FIELDS.TYPE] === tokens.equals) {
|
|
2539
2792
|
node.operator = content;
|
|
2540
2793
|
lastAdded = "operator";
|
|
2541
2794
|
} else if (!node.namespace && !node.attribute) node.namespace = true;
|
|
2542
2795
|
spaceAfterMeaningfulToken = false;
|
|
2543
2796
|
break;
|
|
2544
2797
|
case tokens.word:
|
|
2545
|
-
if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][
|
|
2798
|
+
if (next && this.content(next) === "|" && attr[pos + 2] && attr[pos + 2][tokenize_1.FIELDS.TYPE] !== tokens.equals && !node.operator && !node.namespace) {
|
|
2546
2799
|
node.namespace = content;
|
|
2547
2800
|
lastAdded = "namespace";
|
|
2548
2801
|
} else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
|
|
2549
2802
|
if (spaceBefore) {
|
|
2550
|
-
(0,
|
|
2803
|
+
(0, util_1.ensureObject)(node, "spaces", "attribute");
|
|
2551
2804
|
node.spaces.attribute.before = spaceBefore;
|
|
2552
2805
|
spaceBefore = "";
|
|
2553
2806
|
}
|
|
2554
2807
|
if (commentBefore) {
|
|
2555
|
-
(0,
|
|
2808
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", "attribute");
|
|
2556
2809
|
node.raws.spaces.attribute.before = commentBefore;
|
|
2557
2810
|
commentBefore = "";
|
|
2558
2811
|
}
|
|
2559
2812
|
node.attribute = (node.attribute || "") + content;
|
|
2560
|
-
|
|
2813
|
+
var rawValue = (0, util_1.getProp)(node, "raws", "attribute") || null;
|
|
2814
|
+
if (rawValue) node.raws.attribute += content;
|
|
2561
2815
|
lastAdded = "attribute";
|
|
2562
2816
|
} else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
|
|
2563
|
-
var
|
|
2564
|
-
var
|
|
2817
|
+
var unescaped_1 = (0, util_1.unesc)(content);
|
|
2818
|
+
var oldRawValue = (0, util_1.getProp)(node, "raws", "value") || "";
|
|
2565
2819
|
var oldValue = node.value || "";
|
|
2566
|
-
node.value = oldValue +
|
|
2820
|
+
node.value = oldValue + unescaped_1;
|
|
2567
2821
|
node.quoteMark = null;
|
|
2568
|
-
if (
|
|
2569
|
-
(0,
|
|
2570
|
-
node.raws.value = (
|
|
2822
|
+
if (unescaped_1 !== content || oldRawValue) {
|
|
2823
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2824
|
+
node.raws.value = (oldRawValue || oldValue) + content;
|
|
2571
2825
|
}
|
|
2572
2826
|
lastAdded = "value";
|
|
2573
2827
|
} else {
|
|
@@ -2575,17 +2829,17 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2575
2829
|
if ((node.value || node.value === "") && (node.quoteMark || spaceAfterMeaningfulToken)) {
|
|
2576
2830
|
node.insensitive = insensitive;
|
|
2577
2831
|
if (!insensitive || content === "I") {
|
|
2578
|
-
(0,
|
|
2832
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2579
2833
|
node.raws.insensitiveFlag = content;
|
|
2580
2834
|
}
|
|
2581
2835
|
lastAdded = "insensitive";
|
|
2582
2836
|
if (spaceBefore) {
|
|
2583
|
-
(0,
|
|
2837
|
+
(0, util_1.ensureObject)(node, "spaces", "insensitive");
|
|
2584
2838
|
node.spaces.insensitive.before = spaceBefore;
|
|
2585
2839
|
spaceBefore = "";
|
|
2586
2840
|
}
|
|
2587
2841
|
if (commentBefore) {
|
|
2588
|
-
(0,
|
|
2842
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", "insensitive");
|
|
2589
2843
|
node.raws.spaces.insensitive.before = commentBefore;
|
|
2590
2844
|
commentBefore = "";
|
|
2591
2845
|
}
|
|
@@ -2598,64 +2852,76 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2598
2852
|
spaceAfterMeaningfulToken = false;
|
|
2599
2853
|
break;
|
|
2600
2854
|
case tokens.str:
|
|
2601
|
-
if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[
|
|
2602
|
-
var
|
|
2855
|
+
if (!node.attribute || !node.operator) return this.error("Expected an attribute followed by an operator preceding the string.", { index: token[tokenize_1.FIELDS.START_POS] });
|
|
2856
|
+
var _a = (0, attribute_1.unescapeValue)(content), unescaped = _a.unescaped, quoteMark = _a.quoteMark;
|
|
2603
2857
|
node.value = unescaped;
|
|
2604
2858
|
node.quoteMark = quoteMark;
|
|
2605
2859
|
lastAdded = "value";
|
|
2606
|
-
(0,
|
|
2860
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2607
2861
|
node.raws.value = content;
|
|
2608
2862
|
spaceAfterMeaningfulToken = false;
|
|
2609
2863
|
break;
|
|
2610
2864
|
case tokens.equals:
|
|
2611
|
-
if (!node.attribute) return this.expected("attribute", token[
|
|
2612
|
-
if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[
|
|
2865
|
+
if (!node.attribute) return this.expected("attribute", token[tokenize_1.FIELDS.START_POS], content);
|
|
2866
|
+
if (node.value) return this.error("Unexpected \"=\" found; an operator was already defined.", { index: token[tokenize_1.FIELDS.START_POS] });
|
|
2613
2867
|
node.operator = node.operator ? node.operator + content : content;
|
|
2614
2868
|
lastAdded = "operator";
|
|
2615
2869
|
spaceAfterMeaningfulToken = false;
|
|
2616
2870
|
break;
|
|
2617
2871
|
case tokens.comment:
|
|
2618
|
-
if (lastAdded) if (spaceAfterMeaningfulToken || next && next[
|
|
2619
|
-
var lastComment = (0,
|
|
2620
|
-
var rawLastComment = (0,
|
|
2621
|
-
(0,
|
|
2872
|
+
if (lastAdded) if (spaceAfterMeaningfulToken || next && next[tokenize_1.FIELDS.TYPE] === tokens.space || lastAdded === "insensitive") {
|
|
2873
|
+
var lastComment = (0, util_1.getProp)(node, "spaces", lastAdded, "after") || "";
|
|
2874
|
+
var rawLastComment = (0, util_1.getProp)(node, "raws", "spaces", lastAdded, "after") || lastComment;
|
|
2875
|
+
(0, util_1.ensureObject)(node, "raws", "spaces", lastAdded);
|
|
2622
2876
|
node.raws.spaces[lastAdded].after = rawLastComment + content;
|
|
2623
2877
|
} else {
|
|
2624
2878
|
var lastValue = node[lastAdded] || "";
|
|
2625
|
-
var rawLastValue = (0,
|
|
2626
|
-
(0,
|
|
2879
|
+
var rawLastValue = (0, util_1.getProp)(node, "raws", lastAdded) || lastValue;
|
|
2880
|
+
(0, util_1.ensureObject)(node, "raws");
|
|
2627
2881
|
node.raws[lastAdded] = rawLastValue + content;
|
|
2628
2882
|
}
|
|
2629
2883
|
else commentBefore = commentBefore + content;
|
|
2630
2884
|
break;
|
|
2631
|
-
default: return this.error("Unexpected \""
|
|
2885
|
+
default: return this.error("Unexpected \"".concat(content, "\" found."), { index: token[tokenize_1.FIELDS.START_POS] });
|
|
2632
2886
|
}
|
|
2633
2887
|
pos++;
|
|
2634
2888
|
}
|
|
2635
2889
|
unescapeProp(node, "attribute");
|
|
2636
2890
|
unescapeProp(node, "namespace");
|
|
2637
|
-
this.newNode(new
|
|
2891
|
+
this.newNode(new attribute_1.default(node));
|
|
2638
2892
|
this.position++;
|
|
2639
2893
|
};
|
|
2640
|
-
|
|
2894
|
+
/**
|
|
2895
|
+
* return a node containing meaningless garbage up to (but not including) the specified token position.
|
|
2896
|
+
* if the token position is negative, all remaining tokens are consumed.
|
|
2897
|
+
*
|
|
2898
|
+
* This returns an array containing a single string node if all whitespace,
|
|
2899
|
+
* otherwise an array of comment nodes with space before and after.
|
|
2900
|
+
*
|
|
2901
|
+
* These tokens are not added to the current selector, the caller can add them or use them to amend
|
|
2902
|
+
* a previous node's space metadata.
|
|
2903
|
+
*
|
|
2904
|
+
* In lossy mode, this returns only comments.
|
|
2905
|
+
*/
|
|
2906
|
+
Parser.prototype.parseWhitespaceEquivalentTokens = function(stopPosition) {
|
|
2641
2907
|
if (stopPosition < 0) stopPosition = this.tokens.length;
|
|
2642
2908
|
var startPosition = this.position;
|
|
2643
2909
|
var nodes = [];
|
|
2644
2910
|
var space = "";
|
|
2645
2911
|
var lastComment = void 0;
|
|
2646
2912
|
do
|
|
2647
|
-
if (WHITESPACE_TOKENS[this.currToken[
|
|
2913
|
+
if (WHITESPACE_TOKENS[this.currToken[tokenize_1.FIELDS.TYPE]]) {
|
|
2648
2914
|
if (!this.options.lossy) space += this.content();
|
|
2649
|
-
} else if (this.currToken[
|
|
2915
|
+
} else if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.comment) {
|
|
2650
2916
|
var spaces = {};
|
|
2651
2917
|
if (space) {
|
|
2652
2918
|
spaces.before = space;
|
|
2653
2919
|
space = "";
|
|
2654
2920
|
}
|
|
2655
|
-
lastComment = new
|
|
2921
|
+
lastComment = new comment_1.default({
|
|
2656
2922
|
value: this.content(),
|
|
2657
2923
|
source: getTokenSource(this.currToken),
|
|
2658
|
-
sourceIndex: this.currToken[
|
|
2924
|
+
sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS],
|
|
2659
2925
|
spaces
|
|
2660
2926
|
});
|
|
2661
2927
|
nodes.push(lastComment);
|
|
@@ -2666,10 +2932,10 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2666
2932
|
else if (!this.options.lossy) {
|
|
2667
2933
|
var firstToken = this.tokens[startPosition];
|
|
2668
2934
|
var lastToken = this.tokens[this.position - 1];
|
|
2669
|
-
nodes.push(new
|
|
2935
|
+
nodes.push(new string_1.default({
|
|
2670
2936
|
value: "",
|
|
2671
|
-
source: getSource(firstToken[
|
|
2672
|
-
sourceIndex: firstToken[
|
|
2937
|
+
source: getSource(firstToken[tokenize_1.FIELDS.START_LINE], firstToken[tokenize_1.FIELDS.START_COL], lastToken[tokenize_1.FIELDS.END_LINE], lastToken[tokenize_1.FIELDS.END_COL]),
|
|
2938
|
+
sourceIndex: firstToken[tokenize_1.FIELDS.START_POS],
|
|
2673
2939
|
spaces: {
|
|
2674
2940
|
before: space,
|
|
2675
2941
|
after: ""
|
|
@@ -2679,16 +2945,20 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2679
2945
|
}
|
|
2680
2946
|
return nodes;
|
|
2681
2947
|
};
|
|
2682
|
-
|
|
2683
|
-
|
|
2948
|
+
/**
|
|
2949
|
+
*
|
|
2950
|
+
* @param {*} nodes
|
|
2951
|
+
*/
|
|
2952
|
+
Parser.prototype.convertWhitespaceNodesToSpace = function(nodes, requiredSpace) {
|
|
2953
|
+
var _this = this;
|
|
2684
2954
|
if (requiredSpace === void 0) requiredSpace = false;
|
|
2685
2955
|
var space = "";
|
|
2686
2956
|
var rawSpace = "";
|
|
2687
2957
|
nodes.forEach(function(n) {
|
|
2688
|
-
var spaceBefore =
|
|
2689
|
-
var rawSpaceBefore =
|
|
2690
|
-
space += spaceBefore +
|
|
2691
|
-
rawSpace += spaceBefore + n.value +
|
|
2958
|
+
var spaceBefore = _this.lossySpace(n.spaces.before, requiredSpace);
|
|
2959
|
+
var rawSpaceBefore = _this.lossySpace(n.rawSpaceBefore, requiredSpace);
|
|
2960
|
+
space += spaceBefore + _this.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
|
|
2961
|
+
rawSpace += spaceBefore + n.value + _this.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
|
|
2692
2962
|
});
|
|
2693
2963
|
if (rawSpace === space) rawSpace = void 0;
|
|
2694
2964
|
return {
|
|
@@ -2696,40 +2966,40 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2696
2966
|
rawSpace
|
|
2697
2967
|
};
|
|
2698
2968
|
};
|
|
2699
|
-
|
|
2969
|
+
Parser.prototype.isNamedCombinator = function(position) {
|
|
2700
2970
|
if (position === void 0) position = this.position;
|
|
2701
|
-
return this.tokens[position + 0] && this.tokens[position + 0][
|
|
2971
|
+
return this.tokens[position + 0] && this.tokens[position + 0][tokenize_1.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][tokenize_1.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][tokenize_1.FIELDS.TYPE] === tokens.slash;
|
|
2702
2972
|
};
|
|
2703
|
-
|
|
2973
|
+
Parser.prototype.namedCombinator = function() {
|
|
2704
2974
|
if (this.isNamedCombinator()) {
|
|
2705
2975
|
var nameRaw = this.content(this.tokens[this.position + 1]);
|
|
2706
|
-
var name = (0,
|
|
2976
|
+
var name = (0, util_1.unesc)(nameRaw).toLowerCase();
|
|
2707
2977
|
var raws = {};
|
|
2708
|
-
if (name !== nameRaw) raws.value = "/"
|
|
2709
|
-
var node = new
|
|
2710
|
-
value: "/"
|
|
2711
|
-
source: getSource(this.currToken[
|
|
2712
|
-
sourceIndex: this.currToken[
|
|
2978
|
+
if (name !== nameRaw) raws.value = "/".concat(nameRaw, "/");
|
|
2979
|
+
var node = new combinator_1.default({
|
|
2980
|
+
value: "/".concat(name, "/"),
|
|
2981
|
+
source: getSource(this.currToken[tokenize_1.FIELDS.START_LINE], this.currToken[tokenize_1.FIELDS.START_COL], this.tokens[this.position + 2][tokenize_1.FIELDS.END_LINE], this.tokens[this.position + 2][tokenize_1.FIELDS.END_COL]),
|
|
2982
|
+
sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS],
|
|
2713
2983
|
raws
|
|
2714
2984
|
});
|
|
2715
2985
|
this.position = this.position + 3;
|
|
2716
2986
|
return node;
|
|
2717
2987
|
} else this.unexpected();
|
|
2718
2988
|
};
|
|
2719
|
-
|
|
2720
|
-
var
|
|
2989
|
+
Parser.prototype.combinator = function() {
|
|
2990
|
+
var _this = this;
|
|
2721
2991
|
if (this.content() === "|") return this.namespace();
|
|
2722
2992
|
var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
|
|
2723
|
-
if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][
|
|
2993
|
+
if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][tokenize_1.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
2724
2994
|
var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
|
2725
2995
|
if (nodes.length > 0) {
|
|
2726
2996
|
var last = this.current.last;
|
|
2727
2997
|
if (last) {
|
|
2728
|
-
var
|
|
2998
|
+
var _a = this.convertWhitespaceNodesToSpace(nodes), space = _a.space, rawSpace = _a.rawSpace;
|
|
2729
2999
|
if (rawSpace !== void 0) last.rawSpaceAfter += rawSpace;
|
|
2730
3000
|
last.spaces.after += space;
|
|
2731
3001
|
} else nodes.forEach(function(n) {
|
|
2732
|
-
return
|
|
3002
|
+
return _this.newNode(n);
|
|
2733
3003
|
});
|
|
2734
3004
|
}
|
|
2735
3005
|
return;
|
|
@@ -2739,100 +3009,100 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2739
3009
|
if (nextSigTokenPos > this.position) spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
|
|
2740
3010
|
var node;
|
|
2741
3011
|
if (this.isNamedCombinator()) node = this.namedCombinator();
|
|
2742
|
-
else if (this.currToken[
|
|
2743
|
-
node = new
|
|
3012
|
+
else if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.combinator) {
|
|
3013
|
+
node = new combinator_1.default({
|
|
2744
3014
|
value: this.content(),
|
|
2745
3015
|
source: getTokenSource(this.currToken),
|
|
2746
|
-
sourceIndex: this.currToken[
|
|
3016
|
+
sourceIndex: this.currToken[tokenize_1.FIELDS.START_POS]
|
|
2747
3017
|
});
|
|
2748
3018
|
this.position++;
|
|
2749
|
-
} else if (WHITESPACE_TOKENS[this.currToken[
|
|
3019
|
+
} else if (WHITESPACE_TOKENS[this.currToken[tokenize_1.FIELDS.TYPE]]) {} else if (!spaceOrDescendantSelectorNodes) this.unexpected();
|
|
2750
3020
|
if (node) {
|
|
2751
3021
|
if (spaceOrDescendantSelectorNodes) {
|
|
2752
|
-
var
|
|
2753
|
-
node.spaces.before =
|
|
2754
|
-
node.rawSpaceBefore =
|
|
3022
|
+
var _b = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), space = _b.space, rawSpace = _b.rawSpace;
|
|
3023
|
+
node.spaces.before = space;
|
|
3024
|
+
node.rawSpaceBefore = rawSpace;
|
|
2755
3025
|
}
|
|
2756
3026
|
} else {
|
|
2757
|
-
var
|
|
2758
|
-
if (!
|
|
3027
|
+
var _c = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), space = _c.space, rawSpace = _c.rawSpace;
|
|
3028
|
+
if (!rawSpace) rawSpace = space;
|
|
2759
3029
|
var spaces = {};
|
|
2760
3030
|
var raws = { spaces: {} };
|
|
2761
|
-
if (
|
|
2762
|
-
spaces.before =
|
|
2763
|
-
raws.spaces.before =
|
|
2764
|
-
} else if (
|
|
2765
|
-
spaces.after =
|
|
2766
|
-
raws.spaces.after =
|
|
2767
|
-
} else raws.value =
|
|
2768
|
-
node = new
|
|
3031
|
+
if (space.endsWith(" ") && rawSpace.endsWith(" ")) {
|
|
3032
|
+
spaces.before = space.slice(0, space.length - 1);
|
|
3033
|
+
raws.spaces.before = rawSpace.slice(0, rawSpace.length - 1);
|
|
3034
|
+
} else if (space[0] === " " && rawSpace[0] === " ") {
|
|
3035
|
+
spaces.after = space.slice(1);
|
|
3036
|
+
raws.spaces.after = rawSpace.slice(1);
|
|
3037
|
+
} else raws.value = rawSpace;
|
|
3038
|
+
node = new combinator_1.default({
|
|
2769
3039
|
value: " ",
|
|
2770
3040
|
source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
|
|
2771
|
-
sourceIndex: firstToken[
|
|
3041
|
+
sourceIndex: firstToken[tokenize_1.FIELDS.START_POS],
|
|
2772
3042
|
spaces,
|
|
2773
3043
|
raws
|
|
2774
3044
|
});
|
|
2775
3045
|
}
|
|
2776
|
-
if (this.currToken && this.currToken[
|
|
3046
|
+
if (this.currToken && this.currToken[tokenize_1.FIELDS.TYPE] === tokens.space) {
|
|
2777
3047
|
node.spaces.after = this.optionalSpace(this.content());
|
|
2778
3048
|
this.position++;
|
|
2779
3049
|
}
|
|
2780
3050
|
return this.newNode(node);
|
|
2781
3051
|
};
|
|
2782
|
-
|
|
3052
|
+
Parser.prototype.comma = function() {
|
|
2783
3053
|
if (this.position === this.tokens.length - 1) {
|
|
2784
3054
|
this.root.trailingComma = true;
|
|
2785
3055
|
this.position++;
|
|
2786
3056
|
return;
|
|
2787
3057
|
}
|
|
2788
3058
|
this.current._inferEndPosition();
|
|
2789
|
-
var selector = new
|
|
3059
|
+
var selector = new selector_1.default({
|
|
2790
3060
|
source: { start: tokenStart(this.tokens[this.position + 1]) },
|
|
2791
|
-
sourceIndex: this.tokens[this.position + 1][
|
|
3061
|
+
sourceIndex: this.tokens[this.position + 1][tokenize_1.FIELDS.START_POS]
|
|
2792
3062
|
});
|
|
2793
3063
|
this.current.parent.append(selector);
|
|
2794
3064
|
this.current = selector;
|
|
2795
3065
|
this.position++;
|
|
2796
3066
|
};
|
|
2797
|
-
|
|
3067
|
+
Parser.prototype.comment = function() {
|
|
2798
3068
|
var current = this.currToken;
|
|
2799
|
-
this.newNode(new
|
|
3069
|
+
this.newNode(new comment_1.default({
|
|
2800
3070
|
value: this.content(),
|
|
2801
3071
|
source: getTokenSource(current),
|
|
2802
|
-
sourceIndex: current[
|
|
3072
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
2803
3073
|
}));
|
|
2804
3074
|
this.position++;
|
|
2805
3075
|
};
|
|
2806
|
-
|
|
3076
|
+
Parser.prototype.error = function(message, opts) {
|
|
2807
3077
|
throw this.root.error(message, opts);
|
|
2808
3078
|
};
|
|
2809
|
-
|
|
2810
|
-
return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[
|
|
3079
|
+
Parser.prototype.missingBackslash = function() {
|
|
3080
|
+
return this.error("Expected a backslash preceding the semicolon.", { index: this.currToken[tokenize_1.FIELDS.START_POS] });
|
|
2811
3081
|
};
|
|
2812
|
-
|
|
2813
|
-
return this.expected("opening parenthesis", this.currToken[
|
|
3082
|
+
Parser.prototype.missingParenthesis = function() {
|
|
3083
|
+
return this.expected("opening parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2814
3084
|
};
|
|
2815
|
-
|
|
2816
|
-
return this.expected("opening square bracket", this.currToken[
|
|
3085
|
+
Parser.prototype.missingSquareBracket = function() {
|
|
3086
|
+
return this.expected("opening square bracket", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2817
3087
|
};
|
|
2818
|
-
|
|
2819
|
-
return this.error("Unexpected '"
|
|
3088
|
+
Parser.prototype.unexpected = function() {
|
|
3089
|
+
return this.error("Unexpected '".concat(this.content(), "'. Escaping special characters with \\ may help."), this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2820
3090
|
};
|
|
2821
|
-
|
|
2822
|
-
return this.error("Unexpected '|'.", this.currToken[
|
|
3091
|
+
Parser.prototype.unexpectedPipe = function() {
|
|
3092
|
+
return this.error("Unexpected '|'.", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2823
3093
|
};
|
|
2824
|
-
|
|
3094
|
+
Parser.prototype.namespace = function() {
|
|
2825
3095
|
var before = this.prevToken && this.content(this.prevToken) || true;
|
|
2826
|
-
if (this.nextToken[
|
|
3096
|
+
if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.word) {
|
|
2827
3097
|
this.position++;
|
|
2828
3098
|
return this.word(before);
|
|
2829
|
-
} else if (this.nextToken[
|
|
3099
|
+
} else if (this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.asterisk) {
|
|
2830
3100
|
this.position++;
|
|
2831
3101
|
return this.universal(before);
|
|
2832
3102
|
}
|
|
2833
3103
|
this.unexpectedPipe();
|
|
2834
3104
|
};
|
|
2835
|
-
|
|
3105
|
+
Parser.prototype.nesting = function() {
|
|
2836
3106
|
if (this.nextToken) {
|
|
2837
3107
|
if (this.content(this.nextToken) === "|") {
|
|
2838
3108
|
this.position++;
|
|
@@ -2840,113 +3110,119 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2840
3110
|
}
|
|
2841
3111
|
}
|
|
2842
3112
|
var current = this.currToken;
|
|
2843
|
-
this.newNode(new
|
|
3113
|
+
this.newNode(new nesting_1.default({
|
|
2844
3114
|
value: this.content(),
|
|
2845
3115
|
source: getTokenSource(current),
|
|
2846
|
-
sourceIndex: current[
|
|
3116
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
2847
3117
|
}));
|
|
2848
3118
|
this.position++;
|
|
2849
3119
|
};
|
|
2850
|
-
|
|
3120
|
+
Parser.prototype.parentheses = function() {
|
|
2851
3121
|
var last = this.current.last;
|
|
2852
3122
|
var unbalanced = 1;
|
|
2853
3123
|
this.position++;
|
|
2854
3124
|
if (last && last.type === types.PSEUDO) {
|
|
2855
|
-
var selector = new
|
|
3125
|
+
var selector = new selector_1.default({
|
|
2856
3126
|
source: { start: tokenStart(this.tokens[this.position]) },
|
|
2857
|
-
sourceIndex: this.tokens[this.position][
|
|
3127
|
+
sourceIndex: this.tokens[this.position][tokenize_1.FIELDS.START_POS]
|
|
2858
3128
|
});
|
|
2859
3129
|
var cache = this.current;
|
|
2860
3130
|
last.append(selector);
|
|
2861
3131
|
this.current = selector;
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
if (this.currToken[
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
this.
|
|
2868
|
-
|
|
2869
|
-
|
|
3132
|
+
this.nestingDepth++;
|
|
3133
|
+
try {
|
|
3134
|
+
if (this.nestingDepth > this.maxNestingDepth) this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth, "."), { index: this.currToken[tokenize_1.FIELDS.START_POS] });
|
|
3135
|
+
while (this.position < this.tokens.length && unbalanced) {
|
|
3136
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
|
|
3137
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
|
|
3138
|
+
if (unbalanced) this.parse();
|
|
3139
|
+
else {
|
|
3140
|
+
this.current.source.end = tokenEnd(this.currToken);
|
|
3141
|
+
this.current.parent.source.end = tokenEnd(this.currToken);
|
|
3142
|
+
this.position++;
|
|
3143
|
+
}
|
|
2870
3144
|
}
|
|
3145
|
+
} finally {
|
|
3146
|
+
this.nestingDepth--;
|
|
2871
3147
|
}
|
|
2872
3148
|
this.current = cache;
|
|
2873
3149
|
} else {
|
|
2874
3150
|
var parenStart = this.currToken;
|
|
2875
3151
|
var parenValue = "(";
|
|
2876
|
-
var parenEnd;
|
|
3152
|
+
var parenEnd = void 0;
|
|
2877
3153
|
while (this.position < this.tokens.length && unbalanced) {
|
|
2878
|
-
if (this.currToken[
|
|
2879
|
-
if (this.currToken[
|
|
3154
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) unbalanced++;
|
|
3155
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) unbalanced--;
|
|
2880
3156
|
parenEnd = this.currToken;
|
|
2881
3157
|
parenValue += this.parseParenthesisToken(this.currToken);
|
|
2882
3158
|
this.position++;
|
|
2883
3159
|
}
|
|
2884
3160
|
if (last) last.appendToPropertyAndEscape("value", parenValue, parenValue);
|
|
2885
|
-
else this.newNode(new
|
|
3161
|
+
else this.newNode(new string_1.default({
|
|
2886
3162
|
value: parenValue,
|
|
2887
|
-
source: getSource(parenStart[
|
|
2888
|
-
sourceIndex: parenStart[
|
|
3163
|
+
source: getSource(parenStart[tokenize_1.FIELDS.START_LINE], parenStart[tokenize_1.FIELDS.START_COL], parenEnd[tokenize_1.FIELDS.END_LINE], parenEnd[tokenize_1.FIELDS.END_COL]),
|
|
3164
|
+
sourceIndex: parenStart[tokenize_1.FIELDS.START_POS]
|
|
2889
3165
|
}));
|
|
2890
3166
|
}
|
|
2891
|
-
if (unbalanced) return this.expected("closing parenthesis", this.currToken[
|
|
3167
|
+
if (unbalanced) return this.expected("closing parenthesis", this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2892
3168
|
};
|
|
2893
|
-
|
|
2894
|
-
var
|
|
3169
|
+
Parser.prototype.pseudo = function() {
|
|
3170
|
+
var _this = this;
|
|
2895
3171
|
var pseudoStr = "";
|
|
2896
3172
|
var startingToken = this.currToken;
|
|
2897
|
-
while (this.currToken && this.currToken[
|
|
3173
|
+
while (this.currToken && this.currToken[tokenize_1.FIELDS.TYPE] === tokens.colon) {
|
|
2898
3174
|
pseudoStr += this.content();
|
|
2899
3175
|
this.position++;
|
|
2900
3176
|
}
|
|
2901
3177
|
if (!this.currToken) return this.expected(["pseudo-class", "pseudo-element"], this.position - 1);
|
|
2902
|
-
if (this.currToken[
|
|
3178
|
+
if (this.currToken[tokenize_1.FIELDS.TYPE] === tokens.word) this.splitWord(false, function(first, length) {
|
|
2903
3179
|
pseudoStr += first;
|
|
2904
|
-
|
|
3180
|
+
_this.newNode(new pseudo_1.default({
|
|
2905
3181
|
value: pseudoStr,
|
|
2906
|
-
source: getTokenSourceSpan(startingToken,
|
|
2907
|
-
sourceIndex: startingToken[
|
|
3182
|
+
source: getTokenSourceSpan(startingToken, _this.currToken),
|
|
3183
|
+
sourceIndex: startingToken[tokenize_1.FIELDS.START_POS]
|
|
2908
3184
|
}));
|
|
2909
|
-
if (length > 1 &&
|
|
3185
|
+
if (length > 1 && _this.nextToken && _this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis) _this.error("Misplaced parenthesis.", { index: _this.nextToken[tokenize_1.FIELDS.START_POS] });
|
|
2910
3186
|
});
|
|
2911
|
-
else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[
|
|
3187
|
+
else return this.expected(["pseudo-class", "pseudo-element"], this.currToken[tokenize_1.FIELDS.START_POS]);
|
|
2912
3188
|
};
|
|
2913
|
-
|
|
3189
|
+
Parser.prototype.space = function() {
|
|
2914
3190
|
var content = this.content();
|
|
2915
|
-
if (this.position === 0 || this.prevToken[
|
|
3191
|
+
if (this.position === 0 || this.prevToken[tokenize_1.FIELDS.TYPE] === tokens.comma || this.prevToken[tokenize_1.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function(node) {
|
|
2916
3192
|
return node.type === "comment";
|
|
2917
3193
|
})) {
|
|
2918
3194
|
this.spaces = this.optionalSpace(content);
|
|
2919
3195
|
this.position++;
|
|
2920
|
-
} else if (this.position === this.tokens.length - 1 || this.nextToken[
|
|
3196
|
+
} else if (this.position === this.tokens.length - 1 || this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.comma || this.nextToken[tokenize_1.FIELDS.TYPE] === tokens.closeParenthesis) {
|
|
2921
3197
|
this.current.last.spaces.after = this.optionalSpace(content);
|
|
2922
3198
|
this.position++;
|
|
2923
3199
|
} else this.combinator();
|
|
2924
3200
|
};
|
|
2925
|
-
|
|
3201
|
+
Parser.prototype.string = function() {
|
|
2926
3202
|
var current = this.currToken;
|
|
2927
|
-
this.newNode(new
|
|
3203
|
+
this.newNode(new string_1.default({
|
|
2928
3204
|
value: this.content(),
|
|
2929
3205
|
source: getTokenSource(current),
|
|
2930
|
-
sourceIndex: current[
|
|
3206
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
2931
3207
|
}));
|
|
2932
3208
|
this.position++;
|
|
2933
3209
|
};
|
|
2934
|
-
|
|
3210
|
+
Parser.prototype.universal = function(namespace) {
|
|
2935
3211
|
var nextToken = this.nextToken;
|
|
2936
3212
|
if (nextToken && this.content(nextToken) === "|") {
|
|
2937
3213
|
this.position++;
|
|
2938
3214
|
return this.namespace();
|
|
2939
3215
|
}
|
|
2940
3216
|
var current = this.currToken;
|
|
2941
|
-
this.newNode(new
|
|
3217
|
+
this.newNode(new universal_1.default({
|
|
2942
3218
|
value: this.content(),
|
|
2943
3219
|
source: getTokenSource(current),
|
|
2944
|
-
sourceIndex: current[
|
|
3220
|
+
sourceIndex: current[tokenize_1.FIELDS.START_POS]
|
|
2945
3221
|
}), namespace);
|
|
2946
3222
|
this.position++;
|
|
2947
3223
|
};
|
|
2948
|
-
|
|
2949
|
-
var
|
|
3224
|
+
Parser.prototype.splitWord = function(namespace, firstCallback) {
|
|
3225
|
+
var _this = this;
|
|
2950
3226
|
var nextToken = this.nextToken;
|
|
2951
3227
|
var word = this.content();
|
|
2952
3228
|
while (nextToken && ~[
|
|
@@ -2954,13 +3230,13 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2954
3230
|
tokens.caret,
|
|
2955
3231
|
tokens.equals,
|
|
2956
3232
|
tokens.word
|
|
2957
|
-
].indexOf(nextToken[
|
|
3233
|
+
].indexOf(nextToken[tokenize_1.FIELDS.TYPE])) {
|
|
2958
3234
|
this.position++;
|
|
2959
3235
|
var current = this.content();
|
|
2960
3236
|
word += current;
|
|
2961
3237
|
if (current.lastIndexOf("\\") === current.length - 1) {
|
|
2962
3238
|
var next = this.nextToken;
|
|
2963
|
-
if (next && next[
|
|
3239
|
+
if (next && next[tokenize_1.FIELDS.TYPE] === tokens.space) {
|
|
2964
3240
|
word += this.requiredSpace(this.content(next));
|
|
2965
3241
|
this.position++;
|
|
2966
3242
|
}
|
|
@@ -2979,14 +3255,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2979
3255
|
if (interpolations.length) hasId = hasId.filter(function(hashIndex) {
|
|
2980
3256
|
return !~interpolations.indexOf(hashIndex);
|
|
2981
3257
|
});
|
|
2982
|
-
var indices = (0,
|
|
3258
|
+
var indices = (0, sortAscending_1.default)(uniqs(__spreadArray(__spreadArray([0], __read(hasClass), false), __read(hasId), false)));
|
|
2983
3259
|
indices.forEach(function(ind, i) {
|
|
2984
3260
|
var index = indices[i + 1] || word.length;
|
|
2985
3261
|
var value = word.slice(ind, index);
|
|
2986
|
-
if (i === 0 && firstCallback) return firstCallback.call(
|
|
3262
|
+
if (i === 0 && firstCallback) return firstCallback.call(_this, value, indices.length);
|
|
2987
3263
|
var node;
|
|
2988
|
-
var current =
|
|
2989
|
-
var sourceIndex = current[
|
|
3264
|
+
var current = _this.currToken;
|
|
3265
|
+
var sourceIndex = current[tokenize_1.FIELDS.START_POS] + indices[i];
|
|
2990
3266
|
var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
|
|
2991
3267
|
if (~hasClass.indexOf(ind)) {
|
|
2992
3268
|
var classNameOpts = {
|
|
@@ -2994,14 +3270,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2994
3270
|
source,
|
|
2995
3271
|
sourceIndex
|
|
2996
3272
|
};
|
|
2997
|
-
node = new
|
|
3273
|
+
node = new className_1.default(unescapeProp(classNameOpts, "value"));
|
|
2998
3274
|
} else if (~hasId.indexOf(ind)) {
|
|
2999
3275
|
var idOpts = {
|
|
3000
3276
|
value: value.slice(1),
|
|
3001
3277
|
source,
|
|
3002
3278
|
sourceIndex
|
|
3003
3279
|
};
|
|
3004
|
-
node = new
|
|
3280
|
+
node = new id_1.default(unescapeProp(idOpts, "value"));
|
|
3005
3281
|
} else {
|
|
3006
3282
|
var tagOpts = {
|
|
3007
3283
|
value,
|
|
@@ -3009,14 +3285,14 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3009
3285
|
sourceIndex
|
|
3010
3286
|
};
|
|
3011
3287
|
unescapeProp(tagOpts, "value");
|
|
3012
|
-
node = new
|
|
3288
|
+
node = new tag_1.default(tagOpts);
|
|
3013
3289
|
}
|
|
3014
|
-
|
|
3290
|
+
_this.newNode(node, namespace);
|
|
3015
3291
|
namespace = null;
|
|
3016
3292
|
});
|
|
3017
3293
|
this.position++;
|
|
3018
3294
|
};
|
|
3019
|
-
|
|
3295
|
+
Parser.prototype.word = function(namespace) {
|
|
3020
3296
|
var nextToken = this.nextToken;
|
|
3021
3297
|
if (nextToken && this.content(nextToken) === "|") {
|
|
3022
3298
|
this.position++;
|
|
@@ -3024,13 +3300,13 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3024
3300
|
}
|
|
3025
3301
|
return this.splitWord(namespace);
|
|
3026
3302
|
};
|
|
3027
|
-
|
|
3303
|
+
Parser.prototype.loop = function() {
|
|
3028
3304
|
while (this.position < this.tokens.length) this.parse(true);
|
|
3029
3305
|
this.current._inferEndPosition();
|
|
3030
3306
|
return this.root;
|
|
3031
3307
|
};
|
|
3032
|
-
|
|
3033
|
-
switch (this.currToken[
|
|
3308
|
+
Parser.prototype.parse = function(throwOnParenthesis) {
|
|
3309
|
+
switch (this.currToken[tokenize_1.FIELDS.TYPE]) {
|
|
3034
3310
|
case tokens.space:
|
|
3035
3311
|
this.space();
|
|
3036
3312
|
break;
|
|
@@ -3076,31 +3352,34 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3076
3352
|
default: this.unexpected();
|
|
3077
3353
|
}
|
|
3078
3354
|
};
|
|
3079
|
-
|
|
3355
|
+
/**
|
|
3356
|
+
* Helpers
|
|
3357
|
+
*/
|
|
3358
|
+
Parser.prototype.expected = function(description, index, found) {
|
|
3080
3359
|
if (Array.isArray(description)) {
|
|
3081
3360
|
var last = description.pop();
|
|
3082
|
-
description = description.join(", ")
|
|
3361
|
+
description = "".concat(description.join(", "), " or ").concat(last);
|
|
3083
3362
|
}
|
|
3084
3363
|
var an = /^[aeiou]/.test(description[0]) ? "an" : "a";
|
|
3085
|
-
if (!found) return this.error("Expected "
|
|
3086
|
-
return this.error("Expected "
|
|
3364
|
+
if (!found) return this.error("Expected ".concat(an, " ").concat(description, "."), { index });
|
|
3365
|
+
return this.error("Expected ".concat(an, " ").concat(description, ", found \"").concat(found, "\" instead."), { index });
|
|
3087
3366
|
};
|
|
3088
|
-
|
|
3367
|
+
Parser.prototype.requiredSpace = function(space) {
|
|
3089
3368
|
return this.options.lossy ? " " : space;
|
|
3090
3369
|
};
|
|
3091
|
-
|
|
3370
|
+
Parser.prototype.optionalSpace = function(space) {
|
|
3092
3371
|
return this.options.lossy ? "" : space;
|
|
3093
3372
|
};
|
|
3094
|
-
|
|
3373
|
+
Parser.prototype.lossySpace = function(space, required) {
|
|
3095
3374
|
if (this.options.lossy) return required ? " " : "";
|
|
3096
3375
|
else return space;
|
|
3097
3376
|
};
|
|
3098
|
-
|
|
3377
|
+
Parser.prototype.parseParenthesisToken = function(token) {
|
|
3099
3378
|
var content = this.content(token);
|
|
3100
|
-
if (token[
|
|
3379
|
+
if (token[tokenize_1.FIELDS.TYPE] === tokens.space) return this.requiredSpace(content);
|
|
3101
3380
|
else return content;
|
|
3102
3381
|
};
|
|
3103
|
-
|
|
3382
|
+
Parser.prototype.newNode = function(node, namespace) {
|
|
3104
3383
|
if (namespace) {
|
|
3105
3384
|
if (/^ +$/.test(namespace)) {
|
|
3106
3385
|
if (!this.options.lossy) this.spaces = (this.spaces || "") + namespace;
|
|
@@ -3115,95 +3394,100 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3115
3394
|
}
|
|
3116
3395
|
return this.current.append(node);
|
|
3117
3396
|
};
|
|
3118
|
-
|
|
3397
|
+
Parser.prototype.content = function(token) {
|
|
3119
3398
|
if (token === void 0) token = this.currToken;
|
|
3120
|
-
return this.css.slice(token[
|
|
3399
|
+
return this.css.slice(token[tokenize_1.FIELDS.START_POS], token[tokenize_1.FIELDS.END_POS]);
|
|
3121
3400
|
};
|
|
3401
|
+
Object.defineProperty(Parser.prototype, "currToken", {
|
|
3402
|
+
get: function() {
|
|
3403
|
+
return this.tokens[this.position];
|
|
3404
|
+
},
|
|
3405
|
+
enumerable: false,
|
|
3406
|
+
configurable: true
|
|
3407
|
+
});
|
|
3408
|
+
Object.defineProperty(Parser.prototype, "nextToken", {
|
|
3409
|
+
get: function() {
|
|
3410
|
+
return this.tokens[this.position + 1];
|
|
3411
|
+
},
|
|
3412
|
+
enumerable: false,
|
|
3413
|
+
configurable: true
|
|
3414
|
+
});
|
|
3415
|
+
Object.defineProperty(Parser.prototype, "prevToken", {
|
|
3416
|
+
get: function() {
|
|
3417
|
+
return this.tokens[this.position - 1];
|
|
3418
|
+
},
|
|
3419
|
+
enumerable: false,
|
|
3420
|
+
configurable: true
|
|
3421
|
+
});
|
|
3122
3422
|
/**
|
|
3123
3423
|
* returns the index of the next non-whitespace, non-comment token.
|
|
3124
3424
|
* returns -1 if no meaningful token is found.
|
|
3125
3425
|
*/
|
|
3126
|
-
|
|
3426
|
+
Parser.prototype.locateNextMeaningfulToken = function(startPosition) {
|
|
3127
3427
|
if (startPosition === void 0) startPosition = this.position + 1;
|
|
3128
3428
|
var searchPosition = startPosition;
|
|
3129
|
-
while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][
|
|
3429
|
+
while (searchPosition < this.tokens.length) if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][tokenize_1.FIELDS.TYPE]]) {
|
|
3130
3430
|
searchPosition++;
|
|
3131
3431
|
continue;
|
|
3132
3432
|
} else return searchPosition;
|
|
3133
3433
|
return -1;
|
|
3134
3434
|
};
|
|
3135
|
-
_createClass(Parser, [
|
|
3136
|
-
{
|
|
3137
|
-
key: "currToken",
|
|
3138
|
-
get: function get() {
|
|
3139
|
-
return this.tokens[this.position];
|
|
3140
|
-
}
|
|
3141
|
-
},
|
|
3142
|
-
{
|
|
3143
|
-
key: "nextToken",
|
|
3144
|
-
get: function get() {
|
|
3145
|
-
return this.tokens[this.position + 1];
|
|
3146
|
-
}
|
|
3147
|
-
},
|
|
3148
|
-
{
|
|
3149
|
-
key: "prevToken",
|
|
3150
|
-
get: function get() {
|
|
3151
|
-
return this.tokens[this.position - 1];
|
|
3152
|
-
}
|
|
3153
|
-
}
|
|
3154
|
-
]);
|
|
3155
3435
|
return Parser;
|
|
3156
3436
|
}();
|
|
3157
|
-
module.exports = exports.default;
|
|
3158
3437
|
}));
|
|
3159
3438
|
//#endregion
|
|
3160
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3161
|
-
var require_processor = /* @__PURE__ */ __commonJSMin(((exports
|
|
3162
|
-
exports.
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
exports["default"] = /* @__PURE__ */ function() {
|
|
3439
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/processor.js
|
|
3440
|
+
var require_processor = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3441
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
3442
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3443
|
+
};
|
|
3444
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3445
|
+
var parser_1 = __importDefault(require_parser());
|
|
3446
|
+
exports.default = function() {
|
|
3169
3447
|
function Processor(func, options) {
|
|
3170
3448
|
this.func = func || function noop() {};
|
|
3171
3449
|
this.funcRes = null;
|
|
3172
3450
|
this.options = options;
|
|
3173
3451
|
}
|
|
3174
|
-
|
|
3175
|
-
_proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
|
|
3452
|
+
Processor.prototype._shouldUpdateSelector = function(rule, options) {
|
|
3176
3453
|
if (options === void 0) options = {};
|
|
3177
3454
|
if (Object.assign({}, this.options, options).updateSelector === false) return false;
|
|
3178
3455
|
else return typeof rule !== "string";
|
|
3179
3456
|
};
|
|
3180
|
-
|
|
3457
|
+
Processor.prototype._isLossy = function(options) {
|
|
3181
3458
|
if (options === void 0) options = {};
|
|
3182
3459
|
if (Object.assign({}, this.options, options).lossless === false) return true;
|
|
3183
3460
|
else return false;
|
|
3184
3461
|
};
|
|
3185
|
-
|
|
3462
|
+
Processor.prototype._root = function(rule, options) {
|
|
3186
3463
|
if (options === void 0) options = {};
|
|
3187
|
-
return new
|
|
3464
|
+
return new parser_1.default(rule, this._parseOptions(options)).root;
|
|
3188
3465
|
};
|
|
3189
|
-
|
|
3190
|
-
|
|
3466
|
+
Processor.prototype._parseOptions = function(options) {
|
|
3467
|
+
var merged = Object.assign({}, this.options, options);
|
|
3468
|
+
return {
|
|
3469
|
+
lossy: this._isLossy(merged),
|
|
3470
|
+
maxNestingDepth: merged.maxNestingDepth
|
|
3471
|
+
};
|
|
3472
|
+
};
|
|
3473
|
+
Processor.prototype._stringifyOptions = function(options) {
|
|
3474
|
+
return { maxNestingDepth: Object.assign({}, this.options, options).maxNestingDepth };
|
|
3191
3475
|
};
|
|
3192
|
-
|
|
3476
|
+
Processor.prototype._run = function(rule, options) {
|
|
3193
3477
|
var _this = this;
|
|
3194
3478
|
if (options === void 0) options = {};
|
|
3195
3479
|
return new Promise(function(resolve, reject) {
|
|
3196
3480
|
try {
|
|
3197
|
-
var
|
|
3198
|
-
Promise.resolve(_this.func(
|
|
3481
|
+
var root_1 = _this._root(rule, options);
|
|
3482
|
+
Promise.resolve(_this.func(root_1)).then(function(transform) {
|
|
3199
3483
|
var string = void 0;
|
|
3200
3484
|
if (_this._shouldUpdateSelector(rule, options)) {
|
|
3201
|
-
string =
|
|
3485
|
+
string = root_1.toString(_this._stringifyOptions(options));
|
|
3202
3486
|
rule.selector = string;
|
|
3203
3487
|
}
|
|
3204
3488
|
return {
|
|
3205
3489
|
transform,
|
|
3206
|
-
root,
|
|
3490
|
+
root: root_1,
|
|
3207
3491
|
string
|
|
3208
3492
|
};
|
|
3209
3493
|
}).then(resolve, reject);
|
|
@@ -3213,14 +3497,14 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3213
3497
|
}
|
|
3214
3498
|
});
|
|
3215
3499
|
};
|
|
3216
|
-
|
|
3500
|
+
Processor.prototype._runSync = function(rule, options) {
|
|
3217
3501
|
if (options === void 0) options = {};
|
|
3218
3502
|
var root = this._root(rule, options);
|
|
3219
3503
|
var transform = this.func(root);
|
|
3220
3504
|
if (transform && typeof transform.then === "function") throw new Error("Selector processor returned a promise to a synchronous call.");
|
|
3221
3505
|
var string = void 0;
|
|
3222
3506
|
if (options.updateSelector && typeof rule !== "string") {
|
|
3223
|
-
string = root.toString();
|
|
3507
|
+
string = root.toString(this._stringifyOptions(options));
|
|
3224
3508
|
rule.selector = string;
|
|
3225
3509
|
}
|
|
3226
3510
|
return {
|
|
@@ -3229,207 +3513,269 @@ var require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3229
3513
|
string
|
|
3230
3514
|
};
|
|
3231
3515
|
};
|
|
3232
|
-
|
|
3516
|
+
/**
|
|
3517
|
+
* Process rule into a selector AST.
|
|
3518
|
+
*
|
|
3519
|
+
* @param rule {postcss.Rule | string} The css selector to be processed
|
|
3520
|
+
* @param options The options for processing
|
|
3521
|
+
* @returns {Promise<parser.Root>} The AST of the selector after processing it.
|
|
3522
|
+
*/
|
|
3523
|
+
Processor.prototype.ast = function(rule, options) {
|
|
3233
3524
|
return this._run(rule, options).then(function(result) {
|
|
3234
3525
|
return result.root;
|
|
3235
3526
|
});
|
|
3236
3527
|
};
|
|
3237
|
-
|
|
3528
|
+
/**
|
|
3529
|
+
* Process rule into a selector AST synchronously.
|
|
3530
|
+
*
|
|
3531
|
+
* @param rule {postcss.Rule | string} The css selector to be processed
|
|
3532
|
+
* @param options The options for processing
|
|
3533
|
+
* @returns {parser.Root} The AST of the selector after processing it.
|
|
3534
|
+
*/
|
|
3535
|
+
Processor.prototype.astSync = function(rule, options) {
|
|
3238
3536
|
return this._runSync(rule, options).root;
|
|
3239
3537
|
};
|
|
3240
|
-
|
|
3538
|
+
/**
|
|
3539
|
+
* Process a selector into a transformed value asynchronously
|
|
3540
|
+
*
|
|
3541
|
+
* @param rule {postcss.Rule | string} The css selector to be processed
|
|
3542
|
+
* @param options The options for processing
|
|
3543
|
+
* @returns {Promise<any>} The value returned by the processor.
|
|
3544
|
+
*/
|
|
3545
|
+
Processor.prototype.transform = function(rule, options) {
|
|
3241
3546
|
return this._run(rule, options).then(function(result) {
|
|
3242
3547
|
return result.transform;
|
|
3243
3548
|
});
|
|
3244
3549
|
};
|
|
3245
|
-
|
|
3550
|
+
/**
|
|
3551
|
+
* Process a selector into a transformed value synchronously.
|
|
3552
|
+
*
|
|
3553
|
+
* @param rule {postcss.Rule | string} The css selector to be processed
|
|
3554
|
+
* @param options The options for processing
|
|
3555
|
+
* @returns {any} The value returned by the processor.
|
|
3556
|
+
*/
|
|
3557
|
+
Processor.prototype.transformSync = function(rule, options) {
|
|
3246
3558
|
return this._runSync(rule, options).transform;
|
|
3247
3559
|
};
|
|
3248
|
-
|
|
3560
|
+
/**
|
|
3561
|
+
* Process a selector into a new selector string asynchronously.
|
|
3562
|
+
*
|
|
3563
|
+
* @param rule {postcss.Rule | string} The css selector to be processed
|
|
3564
|
+
* @param options The options for processing
|
|
3565
|
+
* @returns {string} the selector after processing.
|
|
3566
|
+
*/
|
|
3567
|
+
Processor.prototype.process = function(rule, options) {
|
|
3568
|
+
var _this = this;
|
|
3249
3569
|
return this._run(rule, options).then(function(result) {
|
|
3250
|
-
return result.string || result.root.toString();
|
|
3570
|
+
return result.string || result.root.toString(_this._stringifyOptions(options));
|
|
3251
3571
|
});
|
|
3252
3572
|
};
|
|
3253
|
-
|
|
3573
|
+
/**
|
|
3574
|
+
* Process a selector into a new selector string synchronously.
|
|
3575
|
+
*
|
|
3576
|
+
* @param rule {postcss.Rule | string} The css selector to be processed
|
|
3577
|
+
* @param options The options for processing
|
|
3578
|
+
* @returns {string} the selector after processing.
|
|
3579
|
+
*/
|
|
3580
|
+
Processor.prototype.processSync = function(rule, options) {
|
|
3254
3581
|
var result = this._runSync(rule, options);
|
|
3255
|
-
return result.string || result.root.toString();
|
|
3582
|
+
return result.string || result.root.toString(this._stringifyOptions(options));
|
|
3256
3583
|
};
|
|
3257
3584
|
return Processor;
|
|
3258
3585
|
}();
|
|
3259
|
-
module.exports = exports.default;
|
|
3260
3586
|
}));
|
|
3261
3587
|
//#endregion
|
|
3262
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3588
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/constructors.js
|
|
3263
3589
|
var require_constructors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3264
|
-
exports.
|
|
3590
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
3591
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3592
|
+
};
|
|
3593
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3265
3594
|
exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
|
|
3266
|
-
var
|
|
3267
|
-
var
|
|
3268
|
-
var
|
|
3269
|
-
var
|
|
3270
|
-
var
|
|
3271
|
-
var
|
|
3272
|
-
var
|
|
3273
|
-
var
|
|
3274
|
-
var
|
|
3275
|
-
var
|
|
3276
|
-
var
|
|
3277
|
-
var
|
|
3278
|
-
function
|
|
3279
|
-
return
|
|
3280
|
-
}
|
|
3281
|
-
exports.attribute = function attribute(opts) {
|
|
3282
|
-
return new _attribute["default"](opts);
|
|
3595
|
+
var attribute_1 = __importDefault(require_attribute());
|
|
3596
|
+
var className_1 = __importDefault(require_className());
|
|
3597
|
+
var combinator_1 = __importDefault(require_combinator());
|
|
3598
|
+
var comment_1 = __importDefault(require_comment());
|
|
3599
|
+
var id_1 = __importDefault(require_id());
|
|
3600
|
+
var nesting_1 = __importDefault(require_nesting());
|
|
3601
|
+
var pseudo_1 = __importDefault(require_pseudo());
|
|
3602
|
+
var root_1 = __importDefault(require_root());
|
|
3603
|
+
var selector_1 = __importDefault(require_selector());
|
|
3604
|
+
var string_1 = __importDefault(require_string());
|
|
3605
|
+
var tag_1 = __importDefault(require_tag());
|
|
3606
|
+
var universal_1 = __importDefault(require_universal());
|
|
3607
|
+
var attribute = function(opts) {
|
|
3608
|
+
return new attribute_1.default(opts);
|
|
3283
3609
|
};
|
|
3284
|
-
exports.
|
|
3285
|
-
|
|
3610
|
+
exports.attribute = attribute;
|
|
3611
|
+
var className = function(opts) {
|
|
3612
|
+
return new className_1.default(opts);
|
|
3286
3613
|
};
|
|
3287
|
-
exports.
|
|
3288
|
-
|
|
3614
|
+
exports.className = className;
|
|
3615
|
+
var combinator = function(opts) {
|
|
3616
|
+
return new combinator_1.default(opts);
|
|
3289
3617
|
};
|
|
3290
|
-
exports.
|
|
3291
|
-
|
|
3618
|
+
exports.combinator = combinator;
|
|
3619
|
+
var comment = function(opts) {
|
|
3620
|
+
return new comment_1.default(opts);
|
|
3292
3621
|
};
|
|
3293
|
-
exports.
|
|
3294
|
-
|
|
3622
|
+
exports.comment = comment;
|
|
3623
|
+
var id = function(opts) {
|
|
3624
|
+
return new id_1.default(opts);
|
|
3295
3625
|
};
|
|
3296
|
-
exports.
|
|
3297
|
-
|
|
3626
|
+
exports.id = id;
|
|
3627
|
+
var nesting = function(opts) {
|
|
3628
|
+
return new nesting_1.default(opts);
|
|
3298
3629
|
};
|
|
3299
|
-
exports.
|
|
3300
|
-
|
|
3630
|
+
exports.nesting = nesting;
|
|
3631
|
+
var pseudo = function(opts) {
|
|
3632
|
+
return new pseudo_1.default(opts);
|
|
3301
3633
|
};
|
|
3302
|
-
exports.
|
|
3303
|
-
|
|
3634
|
+
exports.pseudo = pseudo;
|
|
3635
|
+
var root = function(opts) {
|
|
3636
|
+
return new root_1.default(opts);
|
|
3304
3637
|
};
|
|
3305
|
-
exports.
|
|
3306
|
-
|
|
3638
|
+
exports.root = root;
|
|
3639
|
+
var selector = function(opts) {
|
|
3640
|
+
return new selector_1.default(opts);
|
|
3307
3641
|
};
|
|
3308
|
-
exports.
|
|
3309
|
-
|
|
3642
|
+
exports.selector = selector;
|
|
3643
|
+
var string = function(opts) {
|
|
3644
|
+
return new string_1.default(opts);
|
|
3310
3645
|
};
|
|
3311
|
-
exports.
|
|
3312
|
-
|
|
3646
|
+
exports.string = string;
|
|
3647
|
+
var tag = function(opts) {
|
|
3648
|
+
return new tag_1.default(opts);
|
|
3313
3649
|
};
|
|
3314
|
-
exports.
|
|
3315
|
-
|
|
3650
|
+
exports.tag = tag;
|
|
3651
|
+
var universal = function(opts) {
|
|
3652
|
+
return new universal_1.default(opts);
|
|
3316
3653
|
};
|
|
3654
|
+
exports.universal = universal;
|
|
3317
3655
|
}));
|
|
3318
3656
|
//#endregion
|
|
3319
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3657
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/guards.js
|
|
3320
3658
|
var require_guards = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
exports.
|
|
3324
|
-
exports.isIdentifier = void 0;
|
|
3325
|
-
exports.isNamespace = isNamespace;
|
|
3326
|
-
exports.isNesting = void 0;
|
|
3659
|
+
var _a;
|
|
3660
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3661
|
+
exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
|
|
3327
3662
|
exports.isNode = isNode;
|
|
3328
|
-
exports.isPseudo = void 0;
|
|
3329
|
-
exports.isPseudoClass = isPseudoClass;
|
|
3330
3663
|
exports.isPseudoElement = isPseudoElement;
|
|
3331
|
-
exports.
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
var
|
|
3664
|
+
exports.isPseudoClass = isPseudoClass;
|
|
3665
|
+
exports.isContainer = isContainer;
|
|
3666
|
+
exports.isNamespace = isNamespace;
|
|
3667
|
+
var types_1 = require_types();
|
|
3668
|
+
var IS_TYPE = (_a = {}, _a[types_1.ATTRIBUTE] = true, _a[types_1.CLASS] = true, _a[types_1.COMBINATOR] = true, _a[types_1.COMMENT] = true, _a[types_1.ID] = true, _a[types_1.NESTING] = true, _a[types_1.PSEUDO] = true, _a[types_1.ROOT] = true, _a[types_1.SELECTOR] = true, _a[types_1.STRING] = true, _a[types_1.TAG] = true, _a[types_1.UNIVERSAL] = true, _a);
|
|
3335
3669
|
function isNode(node) {
|
|
3336
3670
|
return typeof node === "object" && IS_TYPE[node.type];
|
|
3337
3671
|
}
|
|
3338
3672
|
function isNodeType(type, node) {
|
|
3339
3673
|
return isNode(node) && node.type === type;
|
|
3340
3674
|
}
|
|
3341
|
-
|
|
3342
|
-
exports.
|
|
3343
|
-
exports.
|
|
3344
|
-
exports.
|
|
3345
|
-
exports.
|
|
3346
|
-
exports.
|
|
3347
|
-
exports.
|
|
3348
|
-
|
|
3349
|
-
exports.
|
|
3350
|
-
exports.
|
|
3351
|
-
exports.
|
|
3352
|
-
exports.
|
|
3353
|
-
var isTag = isNodeType.bind(null, _types.TAG);
|
|
3354
|
-
exports.isTag = isTag;
|
|
3355
|
-
exports.isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
|
|
3675
|
+
exports.isAttribute = isNodeType.bind(null, types_1.ATTRIBUTE);
|
|
3676
|
+
exports.isClassName = isNodeType.bind(null, types_1.CLASS);
|
|
3677
|
+
exports.isCombinator = isNodeType.bind(null, types_1.COMBINATOR);
|
|
3678
|
+
exports.isComment = isNodeType.bind(null, types_1.COMMENT);
|
|
3679
|
+
exports.isIdentifier = isNodeType.bind(null, types_1.ID);
|
|
3680
|
+
exports.isNesting = isNodeType.bind(null, types_1.NESTING);
|
|
3681
|
+
exports.isPseudo = isNodeType.bind(null, types_1.PSEUDO);
|
|
3682
|
+
exports.isRoot = isNodeType.bind(null, types_1.ROOT);
|
|
3683
|
+
exports.isSelector = isNodeType.bind(null, types_1.SELECTOR);
|
|
3684
|
+
exports.isString = isNodeType.bind(null, types_1.STRING);
|
|
3685
|
+
exports.isTag = isNodeType.bind(null, types_1.TAG);
|
|
3686
|
+
exports.isUniversal = isNodeType.bind(null, types_1.UNIVERSAL);
|
|
3356
3687
|
function isPseudoElement(node) {
|
|
3357
|
-
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");
|
|
3688
|
+
return (0, exports.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");
|
|
3358
3689
|
}
|
|
3359
3690
|
function isPseudoClass(node) {
|
|
3360
|
-
return isPseudo(node) && !isPseudoElement(node);
|
|
3691
|
+
return (0, exports.isPseudo)(node) && !isPseudoElement(node);
|
|
3361
3692
|
}
|
|
3362
3693
|
function isContainer(node) {
|
|
3363
3694
|
return !!(isNode(node) && node.walk);
|
|
3364
3695
|
}
|
|
3365
3696
|
function isNamespace(node) {
|
|
3366
|
-
return isAttribute(node) || isTag(node);
|
|
3697
|
+
return (0, exports.isAttribute)(node) || (0, exports.isTag)(node);
|
|
3367
3698
|
}
|
|
3368
3699
|
}));
|
|
3369
3700
|
//#endregion
|
|
3370
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3701
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/selectors/index.js
|
|
3371
3702
|
var require_selectors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3372
|
-
exports.
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
if (
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
if (
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3703
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3704
|
+
if (k2 === void 0) k2 = k;
|
|
3705
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3706
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
3707
|
+
enumerable: true,
|
|
3708
|
+
get: function() {
|
|
3709
|
+
return m[k];
|
|
3710
|
+
}
|
|
3711
|
+
};
|
|
3712
|
+
Object.defineProperty(o, k2, desc);
|
|
3713
|
+
}) : (function(o, m, k, k2) {
|
|
3714
|
+
if (k2 === void 0) k2 = k;
|
|
3715
|
+
o[k2] = m[k];
|
|
3716
|
+
}));
|
|
3717
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
|
|
3718
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
3719
|
+
};
|
|
3720
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3721
|
+
__exportStar(require_types(), exports);
|
|
3722
|
+
__exportStar(require_constructors(), exports);
|
|
3723
|
+
__exportStar(require_guards(), exports);
|
|
3391
3724
|
}));
|
|
3392
3725
|
//#endregion
|
|
3393
|
-
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.
|
|
3726
|
+
//#region ../../node_modules/.pnpm/postcss-selector-parser@7.1.4/node_modules/postcss-selector-parser/dist/index.js
|
|
3394
3727
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3395
|
-
exports.
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3728
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3729
|
+
if (k2 === void 0) k2 = k;
|
|
3730
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3731
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
3732
|
+
enumerable: true,
|
|
3733
|
+
get: function() {
|
|
3734
|
+
return m[k];
|
|
3735
|
+
}
|
|
3736
|
+
};
|
|
3737
|
+
Object.defineProperty(o, k2, desc);
|
|
3738
|
+
}) : (function(o, m, k, k2) {
|
|
3739
|
+
if (k2 === void 0) k2 = k;
|
|
3740
|
+
o[k2] = m[k];
|
|
3741
|
+
}));
|
|
3742
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
3743
|
+
Object.defineProperty(o, "default", {
|
|
3744
|
+
enumerable: true,
|
|
3745
|
+
value: v
|
|
3746
|
+
});
|
|
3747
|
+
}) : function(o, v) {
|
|
3748
|
+
o["default"] = v;
|
|
3749
|
+
});
|
|
3750
|
+
var __importStar = exports && exports.__importStar || (function() {
|
|
3751
|
+
var ownKeys = function(o) {
|
|
3752
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
3753
|
+
var ar = [];
|
|
3754
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
3755
|
+
return ar;
|
|
3756
|
+
};
|
|
3757
|
+
return ownKeys(o);
|
|
3758
|
+
};
|
|
3759
|
+
return function(mod) {
|
|
3760
|
+
if (mod && mod.__esModule) return mod;
|
|
3761
|
+
var result = {};
|
|
3762
|
+
if (mod != null) {
|
|
3763
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
3764
|
+
}
|
|
3765
|
+
__setModuleDefault(result, mod);
|
|
3766
|
+
return result;
|
|
3767
|
+
};
|
|
3768
|
+
})();
|
|
3769
|
+
var processor_1 = (exports && exports.__importDefault || function(mod) {
|
|
3770
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3771
|
+
})(require_processor());
|
|
3772
|
+
var selectors = __importStar(require_selectors());
|
|
3773
|
+
var parser = function(processor) {
|
|
3774
|
+
return new processor_1.default(processor);
|
|
3428
3775
|
};
|
|
3429
3776
|
Object.assign(parser, selectors);
|
|
3430
3777
|
delete parser.__esModule;
|
|
3431
|
-
exports
|
|
3432
|
-
module.exports = exports.default;
|
|
3778
|
+
module.exports = parser;
|
|
3433
3779
|
}));
|
|
3434
3780
|
//#endregion
|
|
3435
3781
|
//#region src/typography/index.ts
|