UNPKG

@angular/material

Version:
1,558 lines (1,546 loc) 821 kB
var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __objRest = (source, exclude) => { var target = {}; for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop]; if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) { if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop]; } return target; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // node_modules/picocolors/picocolors.js var require_picocolors = __commonJS({ "node_modules/picocolors/picocolors.js"(exports, module2) { var tty = require("tty"); var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env); var formatter = (open, close, replace = open) => (input) => { let string = "" + input; let index2 = string.indexOf(close, open.length); return ~index2 ? open + replaceClose(string, close, replace, index2) + close : open + string + close; }; var replaceClose = (string, close, replace, index2) => { let start = string.substring(0, index2) + replace; let end = string.substring(index2 + close.length); let nextIndex = end.indexOf(close); return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end; }; var createColors = (enabled = isColorSupported) => ({ isColorSupported: enabled, reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String, bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String, dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String, italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String, underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String, inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String, hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String, strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String, black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String, red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String, green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String, yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String, blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String, magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String, cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String, white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String, gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String, bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String, bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String, bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String, bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String, bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String, bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String, bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String, bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String }); module2.exports = createColors(); module2.exports.createColors = createColors; } }); // node_modules/postcss/lib/tokenize.js var require_tokenize = __commonJS({ "node_modules/postcss/lib/tokenize.js"(exports, module2) { "use strict"; var SINGLE_QUOTE = "'".charCodeAt(0); var DOUBLE_QUOTE = '"'.charCodeAt(0); var BACKSLASH = "\\".charCodeAt(0); var SLASH = "/".charCodeAt(0); var NEWLINE = "\n".charCodeAt(0); var SPACE = " ".charCodeAt(0); var FEED = "\f".charCodeAt(0); var TAB = " ".charCodeAt(0); var CR = "\r".charCodeAt(0); var OPEN_SQUARE = "[".charCodeAt(0); var CLOSE_SQUARE = "]".charCodeAt(0); var OPEN_PARENTHESES = "(".charCodeAt(0); var CLOSE_PARENTHESES = ")".charCodeAt(0); var OPEN_CURLY = "{".charCodeAt(0); var CLOSE_CURLY = "}".charCodeAt(0); var SEMICOLON = ";".charCodeAt(0); var ASTERISK = "*".charCodeAt(0); var COLON = ":".charCodeAt(0); var AT = "@".charCodeAt(0); var RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; var RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; var RE_BAD_BRACKET = /.[\n"'(/\\]/; var RE_HEX_ESCAPE = /[\da-f]/i; module2.exports = function tokenizer(input, options = {}) { let css = input.css.valueOf(); let ignore = options.ignoreErrors; let code, next, quote, content, escape; let escaped, escapePos, prev, n, currentToken; let length = css.length; let pos = 0; let buffer = []; let returned = []; function position() { return pos; } function unclosed(what) { throw input.error("Unclosed " + what, pos); } function endOfFile() { return returned.length === 0 && pos >= length; } function nextToken(opts) { if (returned.length) return returned.pop(); if (pos >= length) return; let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; code = css.charCodeAt(pos); switch (code) { case NEWLINE: case SPACE: case TAB: case CR: case FEED: { next = pos; do { next += 1; code = css.charCodeAt(next); } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED); currentToken = ["space", css.slice(pos, next)]; pos = next - 1; break; } case OPEN_SQUARE: case CLOSE_SQUARE: case OPEN_CURLY: case CLOSE_CURLY: case COLON: case SEMICOLON: case CLOSE_PARENTHESES: { let controlChar = String.fromCharCode(code); currentToken = [controlChar, controlChar, pos]; break; } case OPEN_PARENTHESES: { prev = buffer.length ? buffer.pop()[1] : ""; n = css.charCodeAt(pos + 1); if (prev === "url" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) { next = pos; do { escaped = false; next = css.indexOf(")", next + 1); if (next === -1) { if (ignore || ignoreUnclosed) { next = pos; break; } else { unclosed("bracket"); } } escapePos = next; while (css.charCodeAt(escapePos - 1) === BACKSLASH) { escapePos -= 1; escaped = !escaped; } } while (escaped); currentToken = ["brackets", css.slice(pos, next + 1), pos, next]; pos = next; } else { next = css.indexOf(")", pos + 1); content = css.slice(pos, next + 1); if (next === -1 || RE_BAD_BRACKET.test(content)) { currentToken = ["(", "(", pos]; } else { currentToken = ["brackets", content, pos, next]; pos = next; } } break; } case SINGLE_QUOTE: case DOUBLE_QUOTE: { quote = code === SINGLE_QUOTE ? "'" : '"'; next = pos; do { escaped = false; next = css.indexOf(quote, next + 1); if (next === -1) { if (ignore || ignoreUnclosed) { next = pos + 1; break; } else { unclosed("string"); } } escapePos = next; while (css.charCodeAt(escapePos - 1) === BACKSLASH) { escapePos -= 1; escaped = !escaped; } } while (escaped); currentToken = ["string", css.slice(pos, next + 1), pos, next]; pos = next; break; } case AT: { RE_AT_END.lastIndex = pos + 1; RE_AT_END.test(css); if (RE_AT_END.lastIndex === 0) { next = css.length - 1; } else { next = RE_AT_END.lastIndex - 2; } currentToken = ["at-word", css.slice(pos, next + 1), pos, next]; pos = next; break; } case BACKSLASH: { next = pos; escape = true; while (css.charCodeAt(next + 1) === BACKSLASH) { next += 1; escape = !escape; } code = css.charCodeAt(next + 1); if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { next += 1; if (RE_HEX_ESCAPE.test(css.charAt(next))) { while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { next += 1; } if (css.charCodeAt(next + 1) === SPACE) { next += 1; } } } currentToken = ["word", css.slice(pos, next + 1), pos, next]; pos = next; break; } default: { if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { next = css.indexOf("*/", pos + 2) + 1; if (next === 0) { if (ignore || ignoreUnclosed) { next = css.length; } else { unclosed("comment"); } } currentToken = ["comment", css.slice(pos, next + 1), pos, next]; pos = next; } else { RE_WORD_END.lastIndex = pos + 1; RE_WORD_END.test(css); if (RE_WORD_END.lastIndex === 0) { next = css.length - 1; } else { next = RE_WORD_END.lastIndex - 2; } currentToken = ["word", css.slice(pos, next + 1), pos, next]; buffer.push(currentToken); pos = next; } break; } } pos++; return currentToken; } function back(token) { returned.push(token); } return { back, nextToken, endOfFile, position }; }; } }); // node_modules/postcss/lib/terminal-highlight.js var require_terminal_highlight = __commonJS({ "node_modules/postcss/lib/terminal-highlight.js"(exports, module2) { "use strict"; var pico = require_picocolors(); var tokenizer = require_tokenize(); var Input2; function registerInput(dependant) { Input2 = dependant; } var HIGHLIGHT_THEME = { "brackets": pico.cyan, "at-word": pico.cyan, "comment": pico.gray, "string": pico.green, "class": pico.yellow, "hash": pico.magenta, "call": pico.cyan, "(": pico.cyan, ")": pico.cyan, "{": pico.yellow, "}": pico.yellow, "[": pico.yellow, "]": pico.yellow, ":": pico.yellow, ";": pico.yellow }; function getTokenType([type, value], processor) { if (type === "word") { if (value[0] === ".") { return "class"; } if (value[0] === "#") { return "hash"; } } if (!processor.endOfFile()) { let next = processor.nextToken(); processor.back(next); if (next[0] === "brackets" || next[0] === "(") return "call"; } return type; } function terminalHighlight(css) { let processor = tokenizer(new Input2(css), { ignoreErrors: true }); let result = ""; while (!processor.endOfFile()) { let token = processor.nextToken(); let color = HIGHLIGHT_THEME[getTokenType(token, processor)]; if (color) { result += token[1].split(/\r?\n/).map((i) => color(i)).join("\n"); } else { result += token[1]; } } return result; } terminalHighlight.registerInput = registerInput; module2.exports = terminalHighlight; } }); // node_modules/postcss/lib/css-syntax-error.js var require_css_syntax_error = __commonJS({ "node_modules/postcss/lib/css-syntax-error.js"(exports, module2) { "use strict"; var pico = require_picocolors(); var terminalHighlight = require_terminal_highlight(); var CssSyntaxError2 = class extends Error { constructor(message, line, column, source, file, plugin2) { super(message); this.name = "CssSyntaxError"; this.reason = message; if (file) { this.file = file; } if (source) { this.source = source; } if (plugin2) { this.plugin = plugin2; } if (typeof line !== "undefined" && typeof column !== "undefined") { if (typeof line === "number") { this.line = line; this.column = column; } else { this.line = line.line; this.column = line.column; this.endLine = column.line; this.endColumn = column.column; } } this.setMessage(); if (Error.captureStackTrace) { Error.captureStackTrace(this, CssSyntaxError2); } } setMessage() { this.message = this.plugin ? this.plugin + ": " : ""; this.message += this.file ? this.file : "<css input>"; if (typeof this.line !== "undefined") { this.message += ":" + this.line + ":" + this.column; } this.message += ": " + this.reason; } showSourceCode(color) { if (!this.source) return ""; let css = this.source; if (color == null) color = pico.isColorSupported; if (terminalHighlight) { if (color) css = terminalHighlight(css); } let lines = css.split(/\r?\n/); let start = Math.max(this.line - 3, 0); let end = Math.min(this.line + 2, lines.length); let maxWidth = String(end).length; let mark, aside; if (color) { let { bold, red, gray } = pico.createColors(true); mark = (text) => bold(red(text)); aside = (text) => gray(text); } else { mark = aside = (str) => str; } return lines.slice(start, end).map((line, index2) => { let number = start + 1 + index2; let gutter = " " + (" " + number).slice(-maxWidth) + " | "; if (number === this.line) { let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " "); return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^"); } return " " + aside(gutter) + line; }).join("\n"); } toString() { let code = this.showSourceCode(); if (code) { code = "\n\n" + code + "\n"; } return this.name + ": " + this.message + code; } }; module2.exports = CssSyntaxError2; CssSyntaxError2.default = CssSyntaxError2; } }); // node_modules/postcss/lib/symbols.js var require_symbols = __commonJS({ "node_modules/postcss/lib/symbols.js"(exports, module2) { "use strict"; module2.exports.isClean = Symbol("isClean"); module2.exports.my = Symbol("my"); } }); // node_modules/postcss/lib/stringifier.js var require_stringifier = __commonJS({ "node_modules/postcss/lib/stringifier.js"(exports, module2) { "use strict"; var DEFAULT_RAW = { colon: ": ", indent: " ", beforeDecl: "\n", beforeRule: "\n", beforeOpen: " ", beforeClose: "\n", beforeComment: "\n", after: "\n", emptyBody: "", commentLeft: " ", commentRight: " ", semicolon: false }; function capitalize(str) { return str[0].toUpperCase() + str.slice(1); } var Stringifier = class { constructor(builder) { this.builder = builder; } stringify(node, semicolon) { if (!this[node.type]) { throw new Error("Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier."); } this[node.type](node, semicolon); } document(node) { this.body(node); } root(node) { this.body(node); if (node.raws.after) this.builder(node.raws.after); } comment(node) { let left = this.raw(node, "left", "commentLeft"); let right = this.raw(node, "right", "commentRight"); this.builder("/*" + left + node.text + right + "*/", node); } decl(node, semicolon) { let between = this.raw(node, "between", "colon"); let string = node.prop + between + this.rawValue(node, "value"); if (node.important) { string += node.raws.important || " !important"; } if (semicolon) string += ";"; this.builder(string, node); } rule(node) { this.block(node, this.rawValue(node, "selector")); if (node.raws.ownSemicolon) { this.builder(node.raws.ownSemicolon, node, "end"); } } atrule(node, semicolon) { let name = "@" + node.name; let params = node.params ? this.rawValue(node, "params") : ""; if (typeof node.raws.afterName !== "undefined") { name += node.raws.afterName; } else if (params) { name += " "; } if (node.nodes) { this.block(node, name + params); } else { let end = (node.raws.between || "") + (semicolon ? ";" : ""); this.builder(name + params + end, node); } } body(node) { let last = node.nodes.length - 1; while (last > 0) { if (node.nodes[last].type !== "comment") break; last -= 1; } let semicolon = this.raw(node, "semicolon"); for (let i = 0; i < node.nodes.length; i++) { let child = node.nodes[i]; let before = this.raw(child, "before"); if (before) this.builder(before); this.stringify(child, last !== i || semicolon); } } block(node, start) { let between = this.raw(node, "between", "beforeOpen"); this.builder(start + between + "{", node, "start"); let after; if (node.nodes && node.nodes.length) { this.body(node); after = this.raw(node, "after"); } else { after = this.raw(node, "after", "emptyBody"); } if (after) this.builder(after); this.builder("}", node, "end"); } raw(node, own, detect) { let value; if (!detect) detect = own; if (own) { value = node.raws[own]; if (typeof value !== "undefined") return value; } let parent = node.parent; if (detect === "before") { if (!parent || parent.type === "root" && parent.first === node) { return ""; } if (parent && parent.type === "document") { return ""; } } if (!parent) return DEFAULT_RAW[detect]; let root2 = node.root(); if (!root2.rawCache) root2.rawCache = {}; if (typeof root2.rawCache[detect] !== "undefined") { return root2.rawCache[detect]; } if (detect === "before" || detect === "after") { return this.beforeAfter(node, detect); } else { let method = "raw" + capitalize(detect); if (this[method]) { value = this[method](root2, node); } else { root2.walk((i) => { value = i.raws[own]; if (typeof value !== "undefined") return false; }); } } if (typeof value === "undefined") value = DEFAULT_RAW[detect]; root2.rawCache[detect] = value; return value; } rawSemicolon(root2) { let value; root2.walk((i) => { if (i.nodes && i.nodes.length && i.last.type === "decl") { value = i.raws.semicolon; if (typeof value !== "undefined") return false; } }); return value; } rawEmptyBody(root2) { let value; root2.walk((i) => { if (i.nodes && i.nodes.length === 0) { value = i.raws.after; if (typeof value !== "undefined") return false; } }); return value; } rawIndent(root2) { if (root2.raws.indent) return root2.raws.indent; let value; root2.walk((i) => { let p = i.parent; if (p && p !== root2 && p.parent && p.parent === root2) { if (typeof i.raws.before !== "undefined") { let parts = i.raws.before.split("\n"); value = parts[parts.length - 1]; value = value.replace(/\S/g, ""); return false; } } }); return value; } rawBeforeComment(root2, node) { let value; root2.walkComments((i) => { if (typeof i.raws.before !== "undefined") { value = i.raws.before; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } }); if (typeof value === "undefined") { value = this.raw(node, null, "beforeDecl"); } else if (value) { value = value.replace(/\S/g, ""); } return value; } rawBeforeDecl(root2, node) { let value; root2.walkDecls((i) => { if (typeof i.raws.before !== "undefined") { value = i.raws.before; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } }); if (typeof value === "undefined") { value = this.raw(node, null, "beforeRule"); } else if (value) { value = value.replace(/\S/g, ""); } return value; } rawBeforeRule(root2) { let value; root2.walk((i) => { if (i.nodes && (i.parent !== root2 || root2.first !== i)) { if (typeof i.raws.before !== "undefined") { value = i.raws.before; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } } }); if (value) value = value.replace(/\S/g, ""); return value; } rawBeforeClose(root2) { let value; root2.walk((i) => { if (i.nodes && i.nodes.length > 0) { if (typeof i.raws.after !== "undefined") { value = i.raws.after; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } } }); if (value) value = value.replace(/\S/g, ""); return value; } rawBeforeOpen(root2) { let value; root2.walk((i) => { if (i.type !== "decl") { value = i.raws.between; if (typeof value !== "undefined") return false; } }); return value; } rawColon(root2) { let value; root2.walkDecls((i) => { if (typeof i.raws.between !== "undefined") { value = i.raws.between.replace(/[^\s:]/g, ""); return false; } }); return value; } beforeAfter(node, detect) { let value; if (node.type === "decl") { value = this.raw(node, null, "beforeDecl"); } else if (node.type === "comment") { value = this.raw(node, null, "beforeComment"); } else if (detect === "before") { value = this.raw(node, null, "beforeRule"); } else { value = this.raw(node, null, "beforeClose"); } let buf = node.parent; let depth = 0; while (buf && buf.type !== "root") { depth += 1; buf = buf.parent; } if (value.includes("\n")) { let indent = this.raw(node, null, "indent"); if (indent.length) { for (let step = 0; step < depth; step++) value += indent; } } return value; } rawValue(node, prop) { let value = node[prop]; let raw = node.raws[prop]; if (raw && raw.value === value) { return raw.raw; } return value; } }; module2.exports = Stringifier; Stringifier.default = Stringifier; } }); // node_modules/postcss/lib/stringify.js var require_stringify = __commonJS({ "node_modules/postcss/lib/stringify.js"(exports, module2) { "use strict"; var Stringifier = require_stringifier(); function stringify4(node, builder) { let str = new Stringifier(builder); str.stringify(node); } module2.exports = stringify4; stringify4.default = stringify4; } }); // node_modules/postcss/lib/node.js var require_node = __commonJS({ "node_modules/postcss/lib/node.js"(exports, module2) { "use strict"; var { isClean, my } = require_symbols(); var CssSyntaxError2 = require_css_syntax_error(); var Stringifier = require_stringifier(); var stringify4 = require_stringify(); function cloneNode(obj, parent) { let cloned = new obj.constructor(); for (let i in obj) { if (!Object.prototype.hasOwnProperty.call(obj, i)) { continue; } if (i === "proxyCache") continue; let value = obj[i]; let type = typeof value; if (i === "parent" && type === "object") { if (parent) cloned[i] = parent; } else if (i === "source") { cloned[i] = value; } else if (Array.isArray(value)) { cloned[i] = value.map((j) => cloneNode(j, cloned)); } else { if (type === "object" && value !== null) value = cloneNode(value); cloned[i] = value; } } return cloned; } var Node2 = class { constructor(defaults = {}) { this.raws = {}; this[isClean] = false; this[my] = true; for (let name in defaults) { if (name === "nodes") { this.nodes = []; for (let node of defaults[name]) { if (typeof node.clone === "function") { this.append(node.clone()); } else { this.append(node); } } } else { this[name] = defaults[name]; } } } error(message, opts = {}) { if (this.source) { let { start, end } = this.rangeBy(opts); return this.source.input.error(message, { line: start.line, column: start.column }, { line: end.line, column: end.column }, opts); } return new CssSyntaxError2(message); } warn(result, text, opts) { let data = { node: this }; for (let i in opts) data[i] = opts[i]; return result.warn(text, data); } remove() { if (this.parent) { this.parent.removeChild(this); } this.parent = void 0; return this; } toString(stringifier = stringify4) { if (stringifier.stringify) stringifier = stringifier.stringify; let result = ""; stringifier(this, (i) => { result += i; }); return result; } assign(overrides = {}) { for (let name in overrides) { this[name] = overrides[name]; } return this; } clone(overrides = {}) { let cloned = cloneNode(this); for (let name in overrides) { cloned[name] = overrides[name]; } return cloned; } cloneBefore(overrides = {}) { let cloned = this.clone(overrides); this.parent.insertBefore(this, cloned); return cloned; } cloneAfter(overrides = {}) { let cloned = this.clone(overrides); this.parent.insertAfter(this, cloned); return cloned; } replaceWith(...nodes) { if (this.parent) { let bookmark = this; let foundSelf = false; for (let node of nodes) { if (node === this) { foundSelf = true; } else if (foundSelf) { this.parent.insertAfter(bookmark, node); bookmark = node; } else { this.parent.insertBefore(bookmark, node); } } if (!foundSelf) { this.remove(); } } return this; } next() { if (!this.parent) return void 0; let index2 = this.parent.index(this); return this.parent.nodes[index2 + 1]; } prev() { if (!this.parent) return void 0; let index2 = this.parent.index(this); return this.parent.nodes[index2 - 1]; } before(add) { this.parent.insertBefore(this, add); return this; } after(add) { this.parent.insertAfter(this, add); return this; } root() { let result = this; while (result.parent && result.parent.type !== "document") { result = result.parent; } return result; } raw(prop, defaultType) { let str = new Stringifier(); return str.raw(this, prop, defaultType); } cleanRaws(keepBetween) { delete this.raws.before; delete this.raws.after; if (!keepBetween) delete this.raws.between; } toJSON(_, inputs) { let fixed = {}; let emitInputs = inputs == null; inputs = inputs || /* @__PURE__ */ new Map(); let inputsNextIndex = 0; for (let name in this) { if (!Object.prototype.hasOwnProperty.call(this, name)) { continue; } if (name === "parent" || name === "proxyCache") continue; let value = this[name]; if (Array.isArray(value)) { fixed[name] = value.map((i) => { if (typeof i === "object" && i.toJSON) { return i.toJSON(null, inputs); } else { return i; } }); } else if (typeof value === "object" && value.toJSON) { fixed[name] = value.toJSON(null, inputs); } else if (name === "source") { let inputId = inputs.get(value.input); if (inputId == null) { inputId = inputsNextIndex; inputs.set(value.input, inputsNextIndex); inputsNextIndex++; } fixed[name] = { inputId, start: value.start, end: value.end }; } else { fixed[name] = value; } } if (emitInputs) { fixed.inputs = [...inputs.keys()].map((input) => input.toJSON()); } return fixed; } positionInside(index2) { let string = this.toString(); let column = this.source.start.column; let line = this.source.start.line; for (let i = 0; i < index2; i++) { if (string[i] === "\n") { column = 1; line += 1; } else { column += 1; } } return { line, column }; } positionBy(opts) { let pos = this.source.start; if (opts.index) { pos = this.positionInside(opts.index); } else if (opts.word) { let index2 = this.toString().indexOf(opts.word); if (index2 !== -1) pos = this.positionInside(index2); } return pos; } rangeBy(opts) { let start = { line: this.source.start.line, column: this.source.start.column }; let end = this.source.end ? { line: this.source.end.line, column: this.source.end.column + 1 } : { line: start.line, column: start.column + 1 }; if (opts.word) { let index2 = this.toString().indexOf(opts.word); if (index2 !== -1) { start = this.positionInside(index2); end = this.positionInside(index2 + opts.word.length); } } else { if (opts.start) { start = { line: opts.start.line, column: opts.start.column }; } else if (opts.index) { start = this.positionInside(opts.index); } if (opts.end) { end = { line: opts.end.line, column: opts.end.column }; } else if (opts.endIndex) { end = this.positionInside(opts.endIndex); } else if (opts.index) { end = this.positionInside(opts.index + 1); } } if (end.line < start.line || end.line === start.line && end.column <= start.column) { end = { line: start.line, column: start.column + 1 }; } return { start, end }; } getProxyProcessor() { return { set(node, prop, value) { if (node[prop] === value) return true; node[prop] = value; if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || prop === "text") { node.markDirty(); } return true; }, get(node, prop) { if (prop === "proxyOf") { return node; } else if (prop === "root") { return () => node.root().toProxy(); } else { return node[prop]; } } }; } toProxy() { if (!this.proxyCache) { this.proxyCache = new Proxy(this, this.getProxyProcessor()); } return this.proxyCache; } addToError(error2) { error2.postcssNode = this; if (error2.stack && this.source && /\n\s{4}at /.test(error2.stack)) { let s = this.source; error2.stack = error2.stack.replace(/\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`); } return error2; } markDirty() { if (this[isClean]) { this[isClean] = false; let next = this; while (next = next.parent) { next[isClean] = false; } } } get proxyOf() { return this; } }; module2.exports = Node2; Node2.default = Node2; } }); // node_modules/postcss/lib/declaration.js var require_declaration = __commonJS({ "node_modules/postcss/lib/declaration.js"(exports, module2) { "use strict"; var Node2 = require_node(); var Declaration2 = class extends Node2 { constructor(defaults) { if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") { defaults = __spreadProps(__spreadValues({}, defaults), { value: String(defaults.value) }); } super(defaults); this.type = "decl"; } get variable() { return this.prop.startsWith("--") || this.prop[0] === "$"; } }; module2.exports = Declaration2; Declaration2.default = Declaration2; } }); // node_modules/source-map-js/lib/base64.js var require_base64 = __commonJS({ "node_modules/source-map-js/lib/base64.js"(exports) { var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); exports.encode = function(number) { if (0 <= number && number < intToCharMap.length) { return intToCharMap[number]; } throw new TypeError("Must be between 0 and 63: " + number); }; exports.decode = function(charCode) { var bigA = 65; var bigZ = 90; var littleA = 97; var littleZ = 122; var zero = 48; var nine = 57; var plus = 43; var slash = 47; var littleOffset = 26; var numberOffset = 52; if (bigA <= charCode && charCode <= bigZ) { return charCode - bigA; } if (littleA <= charCode && charCode <= littleZ) { return charCode - littleA + littleOffset; } if (zero <= charCode && charCode <= nine) { return charCode - zero + numberOffset; } if (charCode == plus) { return 62; } if (charCode == slash) { return 63; } return -1; }; } }); // node_modules/source-map-js/lib/base64-vlq.js var require_base64_vlq = __commonJS({ "node_modules/source-map-js/lib/base64-vlq.js"(exports) { var base64 = require_base64(); var VLQ_BASE_SHIFT = 5; var VLQ_BASE = 1 << VLQ_BASE_SHIFT; var VLQ_BASE_MASK = VLQ_BASE - 1; var VLQ_CONTINUATION_BIT = VLQ_BASE; function toVLQSigned(aValue) { return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; } function fromVLQSigned(aValue) { var isNegative = (aValue & 1) === 1; var shifted = aValue >> 1; return isNegative ? -shifted : shifted; } exports.encode = function base64VLQ_encode(aValue) { var encoded = ""; var digit; var vlq = toVLQSigned(aValue); do { digit = vlq & VLQ_BASE_MASK; vlq >>>= VLQ_BASE_SHIFT; if (vlq > 0) { digit |= VLQ_CONTINUATION_BIT; } encoded += base64.encode(digit); } while (vlq > 0); return encoded; }; exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { var strLen = aStr.length; var result = 0; var shift = 0; var continuation, digit; do { if (aIndex >= strLen) { throw new Error("Expected more digits in base 64 VLQ value."); } digit = base64.decode(aStr.charCodeAt(aIndex++)); if (digit === -1) { throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); } continuation = !!(digit & VLQ_CONTINUATION_BIT); digit &= VLQ_BASE_MASK; result = result + (digit << shift); shift += VLQ_BASE_SHIFT; } while (continuation); aOutParam.value = fromVLQSigned(result); aOutParam.rest = aIndex; }; } }); // node_modules/source-map-js/lib/util.js var require_util = __commonJS({ "node_modules/source-map-js/lib/util.js"(exports) { function getArg(aArgs, aName, aDefaultValue) { if (aName in aArgs) { return aArgs[aName]; } else if (arguments.length === 3) { return aDefaultValue; } else { throw new Error('"' + aName + '" is a required argument.'); } } exports.getArg = getArg; var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; var dataUrlRegexp = /^data:.+\,.+$/; function urlParse(aUrl) { var match = aUrl.match(urlRegexp); if (!match) { return null; } return { scheme: match[1], auth: match[2], host: match[3], port: match[4], path: match[5] }; } exports.urlParse = urlParse; function urlGenerate(aParsedUrl) { var url = ""; if (aParsedUrl.scheme) { url += aParsedUrl.scheme + ":"; } url += "//"; if (aParsedUrl.auth) { url += aParsedUrl.auth + "@"; } if (aParsedUrl.host) { url += aParsedUrl.host; } if (aParsedUrl.port) { url += ":" + aParsedUrl.port; } if (aParsedUrl.path) { url += aParsedUrl.path; } return url; } exports.urlGenerate = urlGenerate; var MAX_CACHED_INPUTS = 32; function lruMemoize(f) { var cache = []; return function(input) { for (var i = 0; i < cache.length; i++) { if (cache[i].input === input) { var temp = cache[0]; cache[0] = cache[i]; cache[i] = temp; return cache[0].result; } } var result = f(input); cache.unshift({ input, result }); if (cache.length > MAX_CACHED_INPUTS) { cache.pop(); } return result; }; } var normalize = lruMemoize(function normalize2(aPath) { var path = aPath; var url = urlParse(aPath); if (url) { if (!url.path) { return aPath; } path = url.path; } var isAbsolute = exports.isAbsolute(path); var parts = []; var start = 0; var i = 0; while (true) { start = i; i = path.indexOf("/", start); if (i === -1) { parts.push(path.slice(start)); break; } else { parts.push(path.slice(start, i)); while (i < path.length && path[i] === "/") { i++; } } } for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { part = parts[i]; if (part === ".") { parts.splice(i, 1); } else if (part === "..") { up++; } else if (up > 0) { if (part === "") { parts.splice(i + 1, up); up = 0; } else { parts.splice(i, 2); up--; } } } path = parts.join("/"); if (path === "") { path = isAbsolute ? "/" : "."; } if (url) { url.path = path; return urlGenerate(url); } return path; }); exports.normalize = normalize; function join(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } if (aPath === "") { aPath = "."; } var aPathUrl = urlParse(aPath); var aRootUrl = urlParse(aRoot); if (aRootUrl) { aRoot = aRootUrl.path || "/"; } if (aPathUrl && !aPathUrl.scheme) { if (aRootUrl) { aPathUrl.scheme = aRootUrl.scheme; } return urlGenerate(aPathUrl); } if (aPathUrl || aPath.match(dataUrlRegexp)) { return aPath; } if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { aRootUrl.host = aPath; return urlGenerate(aRootUrl); } var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); if (aRootUrl) { aRootUrl.path = joined; return urlGenerate(aRootUrl); } return joined; } exports.join = join; exports.isAbsolute = function(aPath) { return aPath.charAt(0) === "/" || urlRegexp.test(aPath); }; function relative(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } aRoot = aRoot.replace(/\/$/, ""); var level = 0; while (aPath.indexOf(aRoot + "/") !== 0) { var index2 = aRoot.lastIndexOf("/"); if (index2 < 0) { return aPath; } aRoot = aRoot.slice(0, index2); if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { return aPath; } ++level; } return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); } exports.relative = relative; var supportsNullProto = function() { var obj = /* @__PURE__ */ Object.create(null); return !("__proto__" in obj); }(); function identity(s) { return s; } function toSetString(aStr) { if (isProtoString(aStr)) { return "$" + aStr; } return aStr; } exports.toSetString = supportsNullProto ? identity : toSetString; function fromSetString(aStr) { if (isProtoString(aStr)) { return aStr.slice(1); } return aStr; } exports.fromSetString = supportsNullProto ? identity : fromSetString; function isProtoString(s) { if (!s) { return false; } var length = s.length; if (length < 9) { return false; } if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { return false; } for (var i = length - 10; i >= 0; i--) { if (s.charCodeAt(i) !== 36) { return false; } } return true; } function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { var cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByOriginalPositions = compareByOriginalPositions; function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { var cmp; cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0 || onlyCompareGenerated) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp =