@angular/ssr 19.0.0-next.2 → 19.0.0-next.3

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.
@@ -6317,22 +6317,22 @@ var require_picocolors_browser = __commonJS({
6317
6317
  "external/npm/node_modules/picocolors/picocolors.browser.js"(exports, module) {
6318
6318
  var x = String;
6319
6319
  var create = function() {
6320
- return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x };
6320
+ return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x };
6321
6321
  };
6322
6322
  module.exports = create();
6323
6323
  module.exports.createColors = create;
6324
6324
  }
6325
6325
  });
6326
6326
 
6327
- // (disabled):external/npm/node_modules/postcss/lib/terminal-highlight
6327
+ // (disabled):external/npm/node_modules/critters/node_modules/postcss/lib/terminal-highlight
6328
6328
  var require_terminal_highlight = __commonJS({
6329
- "(disabled):external/npm/node_modules/postcss/lib/terminal-highlight"() {
6329
+ "(disabled):external/npm/node_modules/critters/node_modules/postcss/lib/terminal-highlight"() {
6330
6330
  }
6331
6331
  });
6332
6332
 
6333
- // external/npm/node_modules/postcss/lib/css-syntax-error.js
6333
+ // external/npm/node_modules/critters/node_modules/postcss/lib/css-syntax-error.js
6334
6334
  var require_css_syntax_error = __commonJS({
6335
- "external/npm/node_modules/postcss/lib/css-syntax-error.js"(exports, module) {
6335
+ "external/npm/node_modules/critters/node_modules/postcss/lib/css-syntax-error.js"(exports, module) {
6336
6336
  "use strict";
6337
6337
  var pico = require_picocolors_browser();
6338
6338
  var terminalHighlight = require_terminal_highlight();
@@ -6380,30 +6380,40 @@ var require_css_syntax_error = __commonJS({
6380
6380
  let css = this.source;
6381
6381
  if (color == null)
6382
6382
  color = pico.isColorSupported;
6383
- if (terminalHighlight) {
6384
- if (color)
6385
- css = terminalHighlight(css);
6386
- }
6387
- let lines = css.split(/\r?\n/);
6388
- let start = Math.max(this.line - 3, 0);
6389
- let end = Math.min(this.line + 2, lines.length);
6390
- let maxWidth = String(end).length;
6391
- let mark, aside;
6383
+ let aside = (text) => text;
6384
+ let mark = (text) => text;
6385
+ let highlight = (text) => text;
6392
6386
  if (color) {
6393
6387
  let { bold, gray, red } = pico.createColors(true);
6394
6388
  mark = (text) => bold(red(text));
6395
6389
  aside = (text) => gray(text);
6396
- } else {
6397
- mark = aside = (str) => str;
6390
+ if (terminalHighlight) {
6391
+ highlight = (text) => terminalHighlight(text);
6392
+ }
6398
6393
  }
6394
+ let lines = css.split(/\r?\n/);
6395
+ let start = Math.max(this.line - 3, 0);
6396
+ let end = Math.min(this.line + 2, lines.length);
6397
+ let maxWidth = String(end).length;
6399
6398
  return lines.slice(start, end).map((line, index) => {
6400
6399
  let number = start + 1 + index;
6401
6400
  let gutter = " " + (" " + number).slice(-maxWidth) + " | ";
6402
6401
  if (number === this.line) {
6402
+ if (line.length > 160) {
6403
+ let padding = 20;
6404
+ let subLineStart = Math.max(0, this.column - padding);
6405
+ let subLineEnd = Math.max(
6406
+ this.column + padding,
6407
+ this.endColumn + padding
6408
+ );
6409
+ let subLine = line.slice(subLineStart, subLineEnd);
6410
+ let spacing2 = aside(gutter.replace(/\d/g, " ")) + line.slice(0, Math.min(this.column - 1, padding - 1)).replace(/[^\t]/g, " ");
6411
+ return mark(">") + aside(gutter) + highlight(subLine) + "\n " + spacing2 + mark("^");
6412
+ }
6403
6413
  let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " ");
6404
- return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^");
6414
+ return mark(">") + aside(gutter) + highlight(line) + "\n " + spacing + mark("^");
6405
6415
  }
6406
- return " " + aside(gutter) + line;
6416
+ return " " + aside(gutter) + highlight(line);
6407
6417
  }).join("\n");
6408
6418
  }
6409
6419
  toString() {
@@ -6419,18 +6429,9 @@ var require_css_syntax_error = __commonJS({
6419
6429
  }
6420
6430
  });
6421
6431
 
6422
- // external/npm/node_modules/postcss/lib/symbols.js
6423
- var require_symbols = __commonJS({
6424
- "external/npm/node_modules/postcss/lib/symbols.js"(exports, module) {
6425
- "use strict";
6426
- module.exports.isClean = Symbol("isClean");
6427
- module.exports.my = Symbol("my");
6428
- }
6429
- });
6430
-
6431
- // external/npm/node_modules/postcss/lib/stringifier.js
6432
+ // external/npm/node_modules/critters/node_modules/postcss/lib/stringifier.js
6432
6433
  var require_stringifier = __commonJS({
6433
- "external/npm/node_modules/postcss/lib/stringifier.js"(exports, module) {
6434
+ "external/npm/node_modules/critters/node_modules/postcss/lib/stringifier.js"(exports, module) {
6434
6435
  "use strict";
6435
6436
  var DEFAULT_RAW = {
6436
6437
  after: "\n",
@@ -6750,9 +6751,9 @@ var require_stringifier = __commonJS({
6750
6751
  }
6751
6752
  });
6752
6753
 
6753
- // external/npm/node_modules/postcss/lib/stringify.js
6754
+ // external/npm/node_modules/critters/node_modules/postcss/lib/stringify.js
6754
6755
  var require_stringify3 = __commonJS({
6755
- "external/npm/node_modules/postcss/lib/stringify.js"(exports, module) {
6756
+ "external/npm/node_modules/critters/node_modules/postcss/lib/stringify.js"(exports, module) {
6756
6757
  "use strict";
6757
6758
  var Stringifier = require_stringifier();
6758
6759
  function stringify(node, builder) {
@@ -6764,14 +6765,23 @@ var require_stringify3 = __commonJS({
6764
6765
  }
6765
6766
  });
6766
6767
 
6767
- // external/npm/node_modules/postcss/lib/node.js
6768
+ // external/npm/node_modules/critters/node_modules/postcss/lib/symbols.js
6769
+ var require_symbols = __commonJS({
6770
+ "external/npm/node_modules/critters/node_modules/postcss/lib/symbols.js"(exports, module) {
6771
+ "use strict";
6772
+ module.exports.isClean = Symbol("isClean");
6773
+ module.exports.my = Symbol("my");
6774
+ }
6775
+ });
6776
+
6777
+ // external/npm/node_modules/critters/node_modules/postcss/lib/node.js
6768
6778
  var require_node2 = __commonJS({
6769
- "external/npm/node_modules/postcss/lib/node.js"(exports, module) {
6779
+ "external/npm/node_modules/critters/node_modules/postcss/lib/node.js"(exports, module) {
6770
6780
  "use strict";
6771
- var { isClean, my } = require_symbols();
6772
6781
  var CssSyntaxError = require_css_syntax_error();
6773
6782
  var Stringifier = require_stringifier();
6774
6783
  var stringify = require_stringify3();
6784
+ var { isClean, my } = require_symbols();
6775
6785
  function cloneNode(obj, parent) {
6776
6786
  let cloned = new obj.constructor();
6777
6787
  for (let i in obj) {
@@ -6899,6 +6909,9 @@ var require_node2 = __commonJS({
6899
6909
  }
6900
6910
  };
6901
6911
  }
6912
+ markClean() {
6913
+ this[isClean] = true;
6914
+ }
6902
6915
  markDirty() {
6903
6916
  if (this[isClean]) {
6904
6917
  this[isClean] = false;
@@ -7101,9 +7114,25 @@ var require_node2 = __commonJS({
7101
7114
  }
7102
7115
  });
7103
7116
 
7104
- // external/npm/node_modules/postcss/lib/declaration.js
7117
+ // external/npm/node_modules/critters/node_modules/postcss/lib/comment.js
7118
+ var require_comment = __commonJS({
7119
+ "external/npm/node_modules/critters/node_modules/postcss/lib/comment.js"(exports, module) {
7120
+ "use strict";
7121
+ var Node = require_node2();
7122
+ var Comment = class extends Node {
7123
+ constructor(defaults) {
7124
+ super(defaults);
7125
+ this.type = "comment";
7126
+ }
7127
+ };
7128
+ module.exports = Comment;
7129
+ Comment.default = Comment;
7130
+ }
7131
+ });
7132
+
7133
+ // external/npm/node_modules/critters/node_modules/postcss/lib/declaration.js
7105
7134
  var require_declaration = __commonJS({
7106
- "external/npm/node_modules/postcss/lib/declaration.js"(exports, module) {
7135
+ "external/npm/node_modules/critters/node_modules/postcss/lib/declaration.js"(exports, module) {
7107
7136
  "use strict";
7108
7137
  var Node = require_node2();
7109
7138
  var Declaration = class extends Node {
@@ -7123,1263 +7152,1381 @@ var require_declaration = __commonJS({
7123
7152
  }
7124
7153
  });
7125
7154
 
7126
- // (disabled):external/npm/node_modules/source-map-js/source-map.js
7127
- var require_source_map = __commonJS({
7128
- "(disabled):external/npm/node_modules/source-map-js/source-map.js"() {
7129
- }
7130
- });
7131
-
7132
- // (disabled):url
7133
- var require_url = __commonJS({
7134
- "(disabled):url"() {
7135
- }
7136
- });
7137
-
7138
- // external/npm/node_modules/nanoid/non-secure/index.cjs
7139
- var require_non_secure = __commonJS({
7140
- "external/npm/node_modules/nanoid/non-secure/index.cjs"(exports, module) {
7141
- var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
7142
- var customAlphabet = (alphabet, defaultSize = 21) => {
7143
- return (size = defaultSize) => {
7144
- let id = "";
7145
- let i = size;
7146
- while (i--) {
7147
- id += alphabet[Math.random() * alphabet.length | 0];
7148
- }
7149
- return id;
7150
- };
7151
- };
7152
- var nanoid = (size = 21) => {
7153
- let id = "";
7154
- let i = size;
7155
- while (i--) {
7156
- id += urlAlphabet[Math.random() * 64 | 0];
7157
- }
7158
- return id;
7159
- };
7160
- module.exports = { nanoid, customAlphabet };
7161
- }
7162
- });
7163
-
7164
- // external/npm/node_modules/postcss/lib/previous-map.js
7165
- var require_previous_map = __commonJS({
7166
- "external/npm/node_modules/postcss/lib/previous-map.js"(exports, module) {
7155
+ // external/npm/node_modules/critters/node_modules/postcss/lib/container.js
7156
+ var require_container = __commonJS({
7157
+ "external/npm/node_modules/critters/node_modules/postcss/lib/container.js"(exports, module) {
7167
7158
  "use strict";
7168
- var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
7169
- var { existsSync, readFileSync } = require_fs2();
7170
- var { dirname, join } = require_path();
7171
- function fromBase64(str) {
7172
- if (Buffer) {
7173
- return Buffer.from(str, "base64").toString();
7174
- } else {
7175
- return window.atob(str);
7176
- }
7159
+ var Comment = require_comment();
7160
+ var Declaration = require_declaration();
7161
+ var Node = require_node2();
7162
+ var { isClean, my } = require_symbols();
7163
+ var AtRule;
7164
+ var parse;
7165
+ var Root;
7166
+ var Rule;
7167
+ function cleanSource(nodes) {
7168
+ return nodes.map((i) => {
7169
+ if (i.nodes)
7170
+ i.nodes = cleanSource(i.nodes);
7171
+ delete i.source;
7172
+ return i;
7173
+ });
7177
7174
  }
7178
- var PreviousMap = class {
7179
- constructor(css, opts) {
7180
- if (opts.map === false)
7181
- return;
7182
- this.loadAnnotation(css);
7183
- this.inline = this.startWith(this.annotation, "data:");
7184
- let prev = opts.map ? opts.map.prev : void 0;
7185
- let text = this.loadMap(opts.from, prev);
7186
- if (!this.mapFile && opts.from) {
7187
- this.mapFile = opts.from;
7175
+ function markTreeDirty(node) {
7176
+ node[isClean] = false;
7177
+ if (node.proxyOf.nodes) {
7178
+ for (let i of node.proxyOf.nodes) {
7179
+ markTreeDirty(i);
7188
7180
  }
7189
- if (this.mapFile)
7190
- this.root = dirname(this.mapFile);
7191
- if (text)
7192
- this.text = text;
7193
7181
  }
7194
- consumer() {
7195
- if (!this.consumerCache) {
7196
- this.consumerCache = new SourceMapConsumer(this.text);
7182
+ }
7183
+ var Container = class extends Node {
7184
+ append(...children) {
7185
+ for (let child of children) {
7186
+ let nodes = this.normalize(child, this.last);
7187
+ for (let node of nodes)
7188
+ this.proxyOf.nodes.push(node);
7197
7189
  }
7198
- return this.consumerCache;
7190
+ this.markDirty();
7191
+ return this;
7199
7192
  }
7200
- decodeInline(text) {
7201
- let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/;
7202
- let baseUri = /^data:application\/json;base64,/;
7203
- let charsetUri = /^data:application\/json;charset=utf-?8,/;
7204
- let uri = /^data:application\/json,/;
7205
- let uriMatch = text.match(charsetUri) || text.match(uri);
7206
- if (uriMatch) {
7207
- return decodeURIComponent(text.substr(uriMatch[0].length));
7208
- }
7209
- let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
7210
- if (baseUriMatch) {
7211
- return fromBase64(text.substr(baseUriMatch[0].length));
7193
+ cleanRaws(keepBetween) {
7194
+ super.cleanRaws(keepBetween);
7195
+ if (this.nodes) {
7196
+ for (let node of this.nodes)
7197
+ node.cleanRaws(keepBetween);
7212
7198
  }
7213
- let encoding = text.match(/data:application\/json;([^,]+),/)[1];
7214
- throw new Error("Unsupported source map encoding " + encoding);
7215
- }
7216
- getAnnotationURL(sourceMapString) {
7217
- return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
7218
- }
7219
- isMap(map) {
7220
- if (typeof map !== "object")
7221
- return false;
7222
- return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
7223
7199
  }
7224
- loadAnnotation(css) {
7225
- let comments = css.match(/\/\*\s*# sourceMappingURL=/g);
7226
- if (!comments)
7227
- return;
7228
- let start = css.lastIndexOf(comments.pop());
7229
- let end = css.indexOf("*/", start);
7230
- if (start > -1 && end > -1) {
7231
- this.annotation = this.getAnnotationURL(css.substring(start, end));
7200
+ each(callback) {
7201
+ if (!this.proxyOf.nodes)
7202
+ return void 0;
7203
+ let iterator = this.getIterator();
7204
+ let index, result;
7205
+ while (this.indexes[iterator] < this.proxyOf.nodes.length) {
7206
+ index = this.indexes[iterator];
7207
+ result = callback(this.proxyOf.nodes[index], index);
7208
+ if (result === false)
7209
+ break;
7210
+ this.indexes[iterator] += 1;
7232
7211
  }
7212
+ delete this.indexes[iterator];
7213
+ return result;
7233
7214
  }
7234
- loadFile(path) {
7235
- this.root = dirname(path);
7236
- if (existsSync(path)) {
7237
- this.mapFile = path;
7238
- return readFileSync(path, "utf-8").toString().trim();
7239
- }
7215
+ every(condition) {
7216
+ return this.nodes.every(condition);
7240
7217
  }
7241
- loadMap(file, prev) {
7242
- if (prev === false)
7243
- return false;
7244
- if (prev) {
7245
- if (typeof prev === "string") {
7246
- return prev;
7247
- } else if (typeof prev === "function") {
7248
- let prevPath = prev(file);
7249
- if (prevPath) {
7250
- let map = this.loadFile(prevPath);
7251
- if (!map) {
7252
- throw new Error(
7253
- "Unable to load previous source map: " + prevPath.toString()
7218
+ getIterator() {
7219
+ if (!this.lastEach)
7220
+ this.lastEach = 0;
7221
+ if (!this.indexes)
7222
+ this.indexes = {};
7223
+ this.lastEach += 1;
7224
+ let iterator = this.lastEach;
7225
+ this.indexes[iterator] = 0;
7226
+ return iterator;
7227
+ }
7228
+ getProxyProcessor() {
7229
+ return {
7230
+ get(node, prop) {
7231
+ if (prop === "proxyOf") {
7232
+ return node;
7233
+ } else if (!node[prop]) {
7234
+ return node[prop];
7235
+ } else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
7236
+ return (...args) => {
7237
+ return node[prop](
7238
+ ...args.map((i) => {
7239
+ if (typeof i === "function") {
7240
+ return (child, index) => i(child.toProxy(), index);
7241
+ } else {
7242
+ return i;
7243
+ }
7244
+ })
7254
7245
  );
7255
- }
7256
- return map;
7246
+ };
7247
+ } else if (prop === "every" || prop === "some") {
7248
+ return (cb) => {
7249
+ return node[prop](
7250
+ (child, ...other) => cb(child.toProxy(), ...other)
7251
+ );
7252
+ };
7253
+ } else if (prop === "root") {
7254
+ return () => node.root().toProxy();
7255
+ } else if (prop === "nodes") {
7256
+ return node.nodes.map((i) => i.toProxy());
7257
+ } else if (prop === "first" || prop === "last") {
7258
+ return node[prop].toProxy();
7259
+ } else {
7260
+ return node[prop];
7257
7261
  }
7258
- } else if (prev instanceof SourceMapConsumer) {
7259
- return SourceMapGenerator.fromSourceMap(prev).toString();
7260
- } else if (prev instanceof SourceMapGenerator) {
7261
- return prev.toString();
7262
- } else if (this.isMap(prev)) {
7263
- return JSON.stringify(prev);
7264
- } else {
7265
- throw new Error(
7266
- "Unsupported previous source map format: " + prev.toString()
7267
- );
7262
+ },
7263
+ set(node, prop, value) {
7264
+ if (node[prop] === value)
7265
+ return true;
7266
+ node[prop] = value;
7267
+ if (prop === "name" || prop === "params" || prop === "selector") {
7268
+ node.markDirty();
7269
+ }
7270
+ return true;
7268
7271
  }
7269
- } else if (this.inline) {
7270
- return this.decodeInline(this.annotation);
7271
- } else if (this.annotation) {
7272
- let map = this.annotation;
7273
- if (file)
7274
- map = join(dirname(file), map);
7275
- return this.loadFile(map);
7276
- }
7277
- }
7278
- startWith(string, start) {
7279
- if (!string)
7280
- return false;
7281
- return string.substr(0, start.length) === start;
7272
+ };
7282
7273
  }
7283
- withContent() {
7284
- return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
7274
+ index(child) {
7275
+ if (typeof child === "number")
7276
+ return child;
7277
+ if (child.proxyOf)
7278
+ child = child.proxyOf;
7279
+ return this.proxyOf.nodes.indexOf(child);
7285
7280
  }
7286
- };
7287
- module.exports = PreviousMap;
7288
- PreviousMap.default = PreviousMap;
7289
- }
7290
- });
7291
-
7292
- // external/npm/node_modules/postcss/lib/input.js
7293
- var require_input = __commonJS({
7294
- "external/npm/node_modules/postcss/lib/input.js"(exports, module) {
7295
- "use strict";
7296
- var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
7297
- var { fileURLToPath, pathToFileURL } = require_url();
7298
- var { isAbsolute, resolve } = require_path();
7299
- var { nanoid } = require_non_secure();
7300
- var terminalHighlight = require_terminal_highlight();
7301
- var CssSyntaxError = require_css_syntax_error();
7302
- var PreviousMap = require_previous_map();
7303
- var fromOffsetCache = Symbol("fromOffsetCache");
7304
- var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
7305
- var pathAvailable = Boolean(resolve && isAbsolute);
7306
- var Input = class {
7307
- constructor(css, opts = {}) {
7308
- if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
7309
- throw new Error(`PostCSS received ${css} instead of CSS string`);
7310
- }
7311
- this.css = css.toString();
7312
- if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") {
7313
- this.hasBOM = true;
7314
- this.css = this.css.slice(1);
7315
- } else {
7316
- this.hasBOM = false;
7317
- }
7318
- if (opts.from) {
7319
- if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) {
7320
- this.file = opts.from;
7321
- } else {
7322
- this.file = resolve(opts.from);
7281
+ insertAfter(exist, add) {
7282
+ let existIndex = this.index(exist);
7283
+ let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
7284
+ existIndex = this.index(exist);
7285
+ for (let node of nodes)
7286
+ this.proxyOf.nodes.splice(existIndex + 1, 0, node);
7287
+ let index;
7288
+ for (let id in this.indexes) {
7289
+ index = this.indexes[id];
7290
+ if (existIndex < index) {
7291
+ this.indexes[id] = index + nodes.length;
7323
7292
  }
7324
7293
  }
7325
- if (pathAvailable && sourceMapAvailable) {
7326
- let map = new PreviousMap(this.css, opts);
7327
- if (map.text) {
7328
- this.map = map;
7329
- let file = map.consumer().file;
7330
- if (!this.file && file)
7331
- this.file = this.mapResolve(file);
7294
+ this.markDirty();
7295
+ return this;
7296
+ }
7297
+ insertBefore(exist, add) {
7298
+ let existIndex = this.index(exist);
7299
+ let type = existIndex === 0 ? "prepend" : false;
7300
+ let nodes = this.normalize(
7301
+ add,
7302
+ this.proxyOf.nodes[existIndex],
7303
+ type
7304
+ ).reverse();
7305
+ existIndex = this.index(exist);
7306
+ for (let node of nodes)
7307
+ this.proxyOf.nodes.splice(existIndex, 0, node);
7308
+ let index;
7309
+ for (let id in this.indexes) {
7310
+ index = this.indexes[id];
7311
+ if (existIndex <= index) {
7312
+ this.indexes[id] = index + nodes.length;
7332
7313
  }
7333
7314
  }
7334
- if (!this.file) {
7335
- this.id = "<input css " + nanoid(6) + ">";
7336
- }
7337
- if (this.map)
7338
- this.map.file = this.from;
7315
+ this.markDirty();
7316
+ return this;
7339
7317
  }
7340
- error(message, line, column, opts = {}) {
7341
- let result, endLine, endColumn;
7342
- if (line && typeof line === "object") {
7343
- let start = line;
7344
- let end = column;
7345
- if (typeof start.offset === "number") {
7346
- let pos = this.fromOffset(start.offset);
7347
- line = pos.line;
7348
- column = pos.col;
7349
- } else {
7350
- line = start.line;
7351
- column = start.column;
7352
- }
7353
- if (typeof end.offset === "number") {
7354
- let pos = this.fromOffset(end.offset);
7355
- endLine = pos.line;
7356
- endColumn = pos.col;
7357
- } else {
7358
- endLine = end.line;
7359
- endColumn = end.column;
7318
+ normalize(nodes, sample) {
7319
+ if (typeof nodes === "string") {
7320
+ nodes = cleanSource(parse(nodes).nodes);
7321
+ } else if (typeof nodes === "undefined") {
7322
+ nodes = [];
7323
+ } else if (Array.isArray(nodes)) {
7324
+ nodes = nodes.slice(0);
7325
+ for (let i of nodes) {
7326
+ if (i.parent)
7327
+ i.parent.removeChild(i, "ignore");
7360
7328
  }
7361
- } else if (!column) {
7362
- let pos = this.fromOffset(line);
7363
- line = pos.line;
7364
- column = pos.col;
7365
- }
7366
- let origin = this.origin(line, column, endLine, endColumn);
7367
- if (origin) {
7368
- result = new CssSyntaxError(
7369
- message,
7370
- origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },
7371
- origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },
7372
- origin.source,
7373
- origin.file,
7374
- opts.plugin
7375
- );
7376
- } else {
7377
- result = new CssSyntaxError(
7378
- message,
7379
- endLine === void 0 ? line : { column, line },
7380
- endLine === void 0 ? column : { column: endColumn, line: endLine },
7381
- this.css,
7382
- this.file,
7383
- opts.plugin
7384
- );
7385
- }
7386
- result.input = { column, endColumn, endLine, line, source: this.css };
7387
- if (this.file) {
7388
- if (pathToFileURL) {
7389
- result.input.url = pathToFileURL(this.file).toString();
7329
+ } else if (nodes.type === "root" && this.type !== "document") {
7330
+ nodes = nodes.nodes.slice(0);
7331
+ for (let i of nodes) {
7332
+ if (i.parent)
7333
+ i.parent.removeChild(i, "ignore");
7390
7334
  }
7391
- result.input.file = this.file;
7392
- }
7393
- return result;
7394
- }
7395
- fromOffset(offset) {
7396
- let lastLine, lineToIndex;
7397
- if (!this[fromOffsetCache]) {
7398
- let lines = this.css.split("\n");
7399
- lineToIndex = new Array(lines.length);
7400
- let prevIndex = 0;
7401
- for (let i = 0, l = lines.length; i < l; i++) {
7402
- lineToIndex[i] = prevIndex;
7403
- prevIndex += lines[i].length + 1;
7335
+ } else if (nodes.type) {
7336
+ nodes = [nodes];
7337
+ } else if (nodes.prop) {
7338
+ if (typeof nodes.value === "undefined") {
7339
+ throw new Error("Value field is missed in node creation");
7340
+ } else if (typeof nodes.value !== "string") {
7341
+ nodes.value = String(nodes.value);
7404
7342
  }
7405
- this[fromOffsetCache] = lineToIndex;
7343
+ nodes = [new Declaration(nodes)];
7344
+ } else if (nodes.selector || nodes.selectors) {
7345
+ nodes = [new Rule(nodes)];
7346
+ } else if (nodes.name) {
7347
+ nodes = [new AtRule(nodes)];
7348
+ } else if (nodes.text) {
7349
+ nodes = [new Comment(nodes)];
7406
7350
  } else {
7407
- lineToIndex = this[fromOffsetCache];
7351
+ throw new Error("Unknown node type in node creation");
7408
7352
  }
7409
- lastLine = lineToIndex[lineToIndex.length - 1];
7410
- let min = 0;
7411
- if (offset >= lastLine) {
7412
- min = lineToIndex.length - 1;
7413
- } else {
7414
- let max = lineToIndex.length - 2;
7415
- let mid;
7416
- while (min < max) {
7417
- mid = min + (max - min >> 1);
7418
- if (offset < lineToIndex[mid]) {
7419
- max = mid - 1;
7420
- } else if (offset >= lineToIndex[mid + 1]) {
7421
- min = mid + 1;
7422
- } else {
7423
- min = mid;
7424
- break;
7353
+ let processed = nodes.map((i) => {
7354
+ if (!i[my] || !i.markClean)
7355
+ Container.rebuild(i);
7356
+ i = i.proxyOf;
7357
+ if (i.parent)
7358
+ i.parent.removeChild(i);
7359
+ if (i[isClean])
7360
+ markTreeDirty(i);
7361
+ if (typeof i.raws.before === "undefined") {
7362
+ if (sample && typeof sample.raws.before !== "undefined") {
7363
+ i.raws.before = sample.raws.before.replace(/\S/g, "");
7425
7364
  }
7426
7365
  }
7366
+ i.parent = this.proxyOf;
7367
+ return i;
7368
+ });
7369
+ return processed;
7370
+ }
7371
+ prepend(...children) {
7372
+ children = children.reverse();
7373
+ for (let child of children) {
7374
+ let nodes = this.normalize(child, this.first, "prepend").reverse();
7375
+ for (let node of nodes)
7376
+ this.proxyOf.nodes.unshift(node);
7377
+ for (let id in this.indexes) {
7378
+ this.indexes[id] = this.indexes[id] + nodes.length;
7379
+ }
7427
7380
  }
7428
- return {
7429
- col: offset - lineToIndex[min] + 1,
7430
- line: min + 1
7431
- };
7381
+ this.markDirty();
7382
+ return this;
7432
7383
  }
7433
- mapResolve(file) {
7434
- if (/^\w+:\/\//.test(file)) {
7435
- return file;
7436
- }
7437
- return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
7384
+ push(child) {
7385
+ child.parent = this;
7386
+ this.proxyOf.nodes.push(child);
7387
+ return this;
7438
7388
  }
7439
- origin(line, column, endLine, endColumn) {
7440
- if (!this.map)
7441
- return false;
7442
- let consumer = this.map.consumer();
7443
- let from = consumer.originalPositionFor({ column, line });
7444
- if (!from.source)
7445
- return false;
7446
- let to;
7447
- if (typeof endLine === "number") {
7448
- to = consumer.originalPositionFor({ column: endColumn, line: endLine });
7449
- }
7450
- let fromUrl;
7451
- if (isAbsolute(from.source)) {
7452
- fromUrl = pathToFileURL(from.source);
7453
- } else {
7454
- fromUrl = new URL(
7455
- from.source,
7456
- this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
7457
- );
7458
- }
7459
- let result = {
7460
- column: from.column,
7461
- endColumn: to && to.column,
7462
- endLine: to && to.line,
7463
- line: from.line,
7464
- url: fromUrl.toString()
7465
- };
7466
- if (fromUrl.protocol === "file:") {
7467
- if (fileURLToPath) {
7468
- result.file = fileURLToPath(fromUrl);
7469
- } else {
7470
- throw new Error(`file: protocol is not available in this PostCSS build`);
7471
- }
7472
- }
7473
- let source = consumer.sourceContentFor(from.source);
7474
- if (source)
7475
- result.source = source;
7476
- return result;
7389
+ removeAll() {
7390
+ for (let node of this.proxyOf.nodes)
7391
+ node.parent = void 0;
7392
+ this.proxyOf.nodes = [];
7393
+ this.markDirty();
7394
+ return this;
7477
7395
  }
7478
- toJSON() {
7479
- let json = {};
7480
- for (let name of ["hasBOM", "css", "file", "id"]) {
7481
- if (this[name] != null) {
7482
- json[name] = this[name];
7396
+ removeChild(child) {
7397
+ child = this.index(child);
7398
+ this.proxyOf.nodes[child].parent = void 0;
7399
+ this.proxyOf.nodes.splice(child, 1);
7400
+ let index;
7401
+ for (let id in this.indexes) {
7402
+ index = this.indexes[id];
7403
+ if (index >= child) {
7404
+ this.indexes[id] = index - 1;
7483
7405
  }
7484
7406
  }
7485
- if (this.map) {
7486
- json.map = __spreadValues({}, this.map);
7487
- if (json.map.consumerCache) {
7488
- json.map.consumerCache = void 0;
7489
- }
7407
+ this.markDirty();
7408
+ return this;
7409
+ }
7410
+ replaceValues(pattern, opts, callback) {
7411
+ if (!callback) {
7412
+ callback = opts;
7413
+ opts = {};
7490
7414
  }
7491
- return json;
7415
+ this.walkDecls((decl) => {
7416
+ if (opts.props && !opts.props.includes(decl.prop))
7417
+ return;
7418
+ if (opts.fast && !decl.value.includes(opts.fast))
7419
+ return;
7420
+ decl.value = decl.value.replace(pattern, callback);
7421
+ });
7422
+ this.markDirty();
7423
+ return this;
7492
7424
  }
7493
- get from() {
7494
- return this.file || this.id;
7425
+ some(condition) {
7426
+ return this.nodes.some(condition);
7495
7427
  }
7496
- };
7497
- module.exports = Input;
7498
- Input.default = Input;
7499
- if (terminalHighlight && terminalHighlight.registerInput) {
7500
- terminalHighlight.registerInput(Input);
7501
- }
7502
- }
7503
- });
7504
-
7505
- // external/npm/node_modules/postcss/lib/map-generator.js
7506
- var require_map_generator = __commonJS({
7507
- "external/npm/node_modules/postcss/lib/map-generator.js"(exports, module) {
7508
- "use strict";
7509
- var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
7510
- var { dirname, relative, resolve, sep } = require_path();
7511
- var { pathToFileURL } = require_url();
7512
- var Input = require_input();
7513
- var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
7514
- var pathAvailable = Boolean(dirname && resolve && relative && sep);
7515
- var MapGenerator = class {
7516
- constructor(stringify, root, opts, cssString) {
7517
- this.stringify = stringify;
7518
- this.mapOpts = opts.map || {};
7519
- this.root = root;
7520
- this.opts = opts;
7521
- this.css = cssString;
7522
- this.originalCSS = cssString;
7523
- this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
7524
- this.memoizedFileURLs = /* @__PURE__ */ new Map();
7525
- this.memoizedPaths = /* @__PURE__ */ new Map();
7526
- this.memoizedURLs = /* @__PURE__ */ new Map();
7428
+ walk(callback) {
7429
+ return this.each((child, i) => {
7430
+ let result;
7431
+ try {
7432
+ result = callback(child, i);
7433
+ } catch (e) {
7434
+ throw child.addToError(e);
7435
+ }
7436
+ if (result !== false && child.walk) {
7437
+ result = child.walk(callback);
7438
+ }
7439
+ return result;
7440
+ });
7527
7441
  }
7528
- addAnnotation() {
7529
- let content;
7530
- if (this.isInline()) {
7531
- content = "data:application/json;base64," + this.toBase64(this.map.toString());
7532
- } else if (typeof this.mapOpts.annotation === "string") {
7533
- content = this.mapOpts.annotation;
7534
- } else if (typeof this.mapOpts.annotation === "function") {
7535
- content = this.mapOpts.annotation(this.opts.to, this.root);
7536
- } else {
7537
- content = this.outputFile() + ".map";
7442
+ walkAtRules(name, callback) {
7443
+ if (!callback) {
7444
+ callback = name;
7445
+ return this.walk((child, i) => {
7446
+ if (child.type === "atrule") {
7447
+ return callback(child, i);
7448
+ }
7449
+ });
7538
7450
  }
7539
- let eol = "\n";
7540
- if (this.css.includes("\r\n"))
7541
- eol = "\r\n";
7542
- this.css += eol + "/*# sourceMappingURL=" + content + " */";
7543
- }
7544
- applyPrevMaps() {
7545
- for (let prev of this.previous()) {
7546
- let from = this.toUrl(this.path(prev.file));
7547
- let root = prev.root || dirname(prev.file);
7548
- let map;
7549
- if (this.mapOpts.sourcesContent === false) {
7550
- map = new SourceMapConsumer(prev.text);
7551
- if (map.sourcesContent) {
7552
- map.sourcesContent = null;
7451
+ if (name instanceof RegExp) {
7452
+ return this.walk((child, i) => {
7453
+ if (child.type === "atrule" && name.test(child.name)) {
7454
+ return callback(child, i);
7553
7455
  }
7554
- } else {
7555
- map = prev.consumer();
7556
- }
7557
- this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
7456
+ });
7558
7457
  }
7458
+ return this.walk((child, i) => {
7459
+ if (child.type === "atrule" && child.name === name) {
7460
+ return callback(child, i);
7461
+ }
7462
+ });
7559
7463
  }
7560
- clearAnnotation() {
7561
- if (this.mapOpts.annotation === false)
7562
- return;
7563
- if (this.root) {
7564
- let node;
7565
- for (let i = this.root.nodes.length - 1; i >= 0; i--) {
7566
- node = this.root.nodes[i];
7567
- if (node.type !== "comment")
7568
- continue;
7569
- if (node.text.indexOf("# sourceMappingURL=") === 0) {
7570
- this.root.removeChild(i);
7571
- }
7464
+ walkComments(callback) {
7465
+ return this.walk((child, i) => {
7466
+ if (child.type === "comment") {
7467
+ return callback(child, i);
7572
7468
  }
7573
- } else if (this.css) {
7574
- this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, "");
7575
- }
7469
+ });
7576
7470
  }
7577
- generate() {
7578
- this.clearAnnotation();
7579
- if (pathAvailable && sourceMapAvailable && this.isMap()) {
7580
- return this.generateMap();
7581
- } else {
7582
- let result = "";
7583
- this.stringify(this.root, (i) => {
7584
- result += i;
7471
+ walkDecls(prop, callback) {
7472
+ if (!callback) {
7473
+ callback = prop;
7474
+ return this.walk((child, i) => {
7475
+ if (child.type === "decl") {
7476
+ return callback(child, i);
7477
+ }
7585
7478
  });
7586
- return [result];
7587
7479
  }
7588
- }
7589
- generateMap() {
7590
- if (this.root) {
7591
- this.generateString();
7592
- } else if (this.previous().length === 1) {
7593
- let prev = this.previous()[0].consumer();
7594
- prev.file = this.outputFile();
7595
- this.map = SourceMapGenerator.fromSourceMap(prev, {
7596
- ignoreInvalidMapping: true
7597
- });
7598
- } else {
7599
- this.map = new SourceMapGenerator({
7600
- file: this.outputFile(),
7601
- ignoreInvalidMapping: true
7602
- });
7603
- this.map.addMapping({
7604
- generated: { column: 0, line: 1 },
7605
- original: { column: 0, line: 1 },
7606
- source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
7480
+ if (prop instanceof RegExp) {
7481
+ return this.walk((child, i) => {
7482
+ if (child.type === "decl" && prop.test(child.prop)) {
7483
+ return callback(child, i);
7484
+ }
7607
7485
  });
7608
7486
  }
7609
- if (this.isSourcesContent())
7610
- this.setSourcesContent();
7611
- if (this.root && this.previous().length > 0)
7612
- this.applyPrevMaps();
7613
- if (this.isAnnotation())
7614
- this.addAnnotation();
7615
- if (this.isInline()) {
7616
- return [this.css];
7617
- } else {
7618
- return [this.css, this.map];
7619
- }
7487
+ return this.walk((child, i) => {
7488
+ if (child.type === "decl" && child.prop === prop) {
7489
+ return callback(child, i);
7490
+ }
7491
+ });
7620
7492
  }
7621
- generateString() {
7622
- this.css = "";
7623
- this.map = new SourceMapGenerator({
7624
- file: this.outputFile(),
7625
- ignoreInvalidMapping: true
7626
- });
7627
- let line = 1;
7628
- let column = 1;
7629
- let noSource = "<no source>";
7630
- let mapping = {
7631
- generated: { column: 0, line: 0 },
7632
- original: { column: 0, line: 0 },
7633
- source: ""
7634
- };
7635
- let lines, last;
7636
- this.stringify(this.root, (str, node, type) => {
7637
- this.css += str;
7638
- if (node && type !== "end") {
7639
- mapping.generated.line = line;
7640
- mapping.generated.column = column - 1;
7641
- if (node.source && node.source.start) {
7642
- mapping.source = this.sourcePath(node);
7643
- mapping.original.line = node.source.start.line;
7644
- mapping.original.column = node.source.start.column - 1;
7645
- this.map.addMapping(mapping);
7646
- } else {
7647
- mapping.source = noSource;
7648
- mapping.original.line = 1;
7649
- mapping.original.column = 0;
7650
- this.map.addMapping(mapping);
7493
+ walkRules(selector, callback) {
7494
+ if (!callback) {
7495
+ callback = selector;
7496
+ return this.walk((child, i) => {
7497
+ if (child.type === "rule") {
7498
+ return callback(child, i);
7651
7499
  }
7652
- }
7653
- lines = str.match(/\n/g);
7654
- if (lines) {
7655
- line += lines.length;
7656
- last = str.lastIndexOf("\n");
7657
- column = str.length - last;
7658
- } else {
7659
- column += str.length;
7660
- }
7661
- if (node && type !== "start") {
7662
- let p = node.parent || { raws: {} };
7663
- let childless = node.type === "decl" || node.type === "atrule" && !node.nodes;
7664
- if (!childless || node !== p.last || p.raws.semicolon) {
7665
- if (node.source && node.source.end) {
7666
- mapping.source = this.sourcePath(node);
7667
- mapping.original.line = node.source.end.line;
7668
- mapping.original.column = node.source.end.column - 1;
7669
- mapping.generated.line = line;
7670
- mapping.generated.column = column - 2;
7671
- this.map.addMapping(mapping);
7672
- } else {
7673
- mapping.source = noSource;
7674
- mapping.original.line = 1;
7675
- mapping.original.column = 0;
7676
- mapping.generated.line = line;
7677
- mapping.generated.column = column - 1;
7678
- this.map.addMapping(mapping);
7679
- }
7500
+ });
7501
+ }
7502
+ if (selector instanceof RegExp) {
7503
+ return this.walk((child, i) => {
7504
+ if (child.type === "rule" && selector.test(child.selector)) {
7505
+ return callback(child, i);
7680
7506
  }
7507
+ });
7508
+ }
7509
+ return this.walk((child, i) => {
7510
+ if (child.type === "rule" && child.selector === selector) {
7511
+ return callback(child, i);
7681
7512
  }
7682
7513
  });
7683
7514
  }
7684
- isAnnotation() {
7685
- if (this.isInline()) {
7686
- return true;
7687
- }
7688
- if (typeof this.mapOpts.annotation !== "undefined") {
7689
- return this.mapOpts.annotation;
7690
- }
7691
- if (this.previous().length) {
7692
- return this.previous().some((i) => i.annotation);
7693
- }
7694
- return true;
7515
+ get first() {
7516
+ if (!this.proxyOf.nodes)
7517
+ return void 0;
7518
+ return this.proxyOf.nodes[0];
7695
7519
  }
7696
- isInline() {
7697
- if (typeof this.mapOpts.inline !== "undefined") {
7698
- return this.mapOpts.inline;
7699
- }
7700
- let annotation = this.mapOpts.annotation;
7701
- if (typeof annotation !== "undefined" && annotation !== true) {
7702
- return false;
7703
- }
7704
- if (this.previous().length) {
7705
- return this.previous().some((i) => i.inline);
7706
- }
7707
- return true;
7520
+ get last() {
7521
+ if (!this.proxyOf.nodes)
7522
+ return void 0;
7523
+ return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
7708
7524
  }
7709
- isMap() {
7710
- if (typeof this.opts.map !== "undefined") {
7711
- return !!this.opts.map;
7712
- }
7713
- return this.previous().length > 0;
7525
+ };
7526
+ Container.registerParse = (dependant) => {
7527
+ parse = dependant;
7528
+ };
7529
+ Container.registerRule = (dependant) => {
7530
+ Rule = dependant;
7531
+ };
7532
+ Container.registerAtRule = (dependant) => {
7533
+ AtRule = dependant;
7534
+ };
7535
+ Container.registerRoot = (dependant) => {
7536
+ Root = dependant;
7537
+ };
7538
+ module.exports = Container;
7539
+ Container.default = Container;
7540
+ Container.rebuild = (node) => {
7541
+ if (node.type === "atrule") {
7542
+ Object.setPrototypeOf(node, AtRule.prototype);
7543
+ } else if (node.type === "rule") {
7544
+ Object.setPrototypeOf(node, Rule.prototype);
7545
+ } else if (node.type === "decl") {
7546
+ Object.setPrototypeOf(node, Declaration.prototype);
7547
+ } else if (node.type === "comment") {
7548
+ Object.setPrototypeOf(node, Comment.prototype);
7549
+ } else if (node.type === "root") {
7550
+ Object.setPrototypeOf(node, Root.prototype);
7714
7551
  }
7715
- isSourcesContent() {
7716
- if (typeof this.mapOpts.sourcesContent !== "undefined") {
7717
- return this.mapOpts.sourcesContent;
7718
- }
7719
- if (this.previous().length) {
7720
- return this.previous().some((i) => i.withContent());
7552
+ node[my] = true;
7553
+ if (node.nodes) {
7554
+ node.nodes.forEach((child) => {
7555
+ Container.rebuild(child);
7556
+ });
7557
+ }
7558
+ };
7559
+ }
7560
+ });
7561
+
7562
+ // external/npm/node_modules/critters/node_modules/postcss/lib/at-rule.js
7563
+ var require_at_rule = __commonJS({
7564
+ "external/npm/node_modules/critters/node_modules/postcss/lib/at-rule.js"(exports, module) {
7565
+ "use strict";
7566
+ var Container = require_container();
7567
+ var AtRule = class extends Container {
7568
+ constructor(defaults) {
7569
+ super(defaults);
7570
+ this.type = "atrule";
7571
+ }
7572
+ append(...children) {
7573
+ if (!this.proxyOf.nodes)
7574
+ this.nodes = [];
7575
+ return super.append(...children);
7576
+ }
7577
+ prepend(...children) {
7578
+ if (!this.proxyOf.nodes)
7579
+ this.nodes = [];
7580
+ return super.prepend(...children);
7581
+ }
7582
+ };
7583
+ module.exports = AtRule;
7584
+ AtRule.default = AtRule;
7585
+ Container.registerAtRule(AtRule);
7586
+ }
7587
+ });
7588
+
7589
+ // external/npm/node_modules/critters/node_modules/postcss/lib/document.js
7590
+ var require_document = __commonJS({
7591
+ "external/npm/node_modules/critters/node_modules/postcss/lib/document.js"(exports, module) {
7592
+ "use strict";
7593
+ var Container = require_container();
7594
+ var LazyResult;
7595
+ var Processor;
7596
+ var Document = class extends Container {
7597
+ constructor(defaults) {
7598
+ super(__spreadValues({ type: "document" }, defaults));
7599
+ if (!this.nodes) {
7600
+ this.nodes = [];
7721
7601
  }
7722
- return true;
7723
7602
  }
7724
- outputFile() {
7725
- if (this.opts.to) {
7726
- return this.path(this.opts.to);
7727
- } else if (this.opts.from) {
7728
- return this.path(this.opts.from);
7729
- } else {
7730
- return "to.css";
7603
+ toResult(opts = {}) {
7604
+ let lazy = new LazyResult(new Processor(), this, opts);
7605
+ return lazy.stringify();
7606
+ }
7607
+ };
7608
+ Document.registerLazyResult = (dependant) => {
7609
+ LazyResult = dependant;
7610
+ };
7611
+ Document.registerProcessor = (dependant) => {
7612
+ Processor = dependant;
7613
+ };
7614
+ module.exports = Document;
7615
+ Document.default = Document;
7616
+ }
7617
+ });
7618
+
7619
+ // external/npm/node_modules/nanoid/non-secure/index.cjs
7620
+ var require_non_secure = __commonJS({
7621
+ "external/npm/node_modules/nanoid/non-secure/index.cjs"(exports, module) {
7622
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
7623
+ var customAlphabet = (alphabet, defaultSize = 21) => {
7624
+ return (size = defaultSize) => {
7625
+ let id = "";
7626
+ let i = size;
7627
+ while (i--) {
7628
+ id += alphabet[Math.random() * alphabet.length | 0];
7731
7629
  }
7630
+ return id;
7631
+ };
7632
+ };
7633
+ var nanoid = (size = 21) => {
7634
+ let id = "";
7635
+ let i = size;
7636
+ while (i--) {
7637
+ id += urlAlphabet[Math.random() * 64 | 0];
7732
7638
  }
7733
- path(file) {
7734
- if (this.mapOpts.absolute)
7735
- return file;
7736
- if (file.charCodeAt(0) === 60)
7737
- return file;
7738
- if (/^\w+:\/\//.test(file))
7739
- return file;
7740
- let cached = this.memoizedPaths.get(file);
7741
- if (cached)
7742
- return cached;
7743
- let from = this.opts.to ? dirname(this.opts.to) : ".";
7744
- if (typeof this.mapOpts.annotation === "string") {
7745
- from = dirname(resolve(from, this.mapOpts.annotation));
7639
+ return id;
7640
+ };
7641
+ module.exports = { nanoid, customAlphabet };
7642
+ }
7643
+ });
7644
+
7645
+ // (disabled):external/npm/node_modules/source-map-js/source-map.js
7646
+ var require_source_map = __commonJS({
7647
+ "(disabled):external/npm/node_modules/source-map-js/source-map.js"() {
7648
+ }
7649
+ });
7650
+
7651
+ // (disabled):url
7652
+ var require_url = __commonJS({
7653
+ "(disabled):url"() {
7654
+ }
7655
+ });
7656
+
7657
+ // external/npm/node_modules/critters/node_modules/postcss/lib/previous-map.js
7658
+ var require_previous_map = __commonJS({
7659
+ "external/npm/node_modules/critters/node_modules/postcss/lib/previous-map.js"(exports, module) {
7660
+ "use strict";
7661
+ var { existsSync, readFileSync } = require_fs2();
7662
+ var { dirname, join } = require_path();
7663
+ var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
7664
+ function fromBase64(str) {
7665
+ if (Buffer) {
7666
+ return Buffer.from(str, "base64").toString();
7667
+ } else {
7668
+ return window.atob(str);
7669
+ }
7670
+ }
7671
+ var PreviousMap = class {
7672
+ constructor(css, opts) {
7673
+ if (opts.map === false)
7674
+ return;
7675
+ this.loadAnnotation(css);
7676
+ this.inline = this.startWith(this.annotation, "data:");
7677
+ let prev = opts.map ? opts.map.prev : void 0;
7678
+ let text = this.loadMap(opts.from, prev);
7679
+ if (!this.mapFile && opts.from) {
7680
+ this.mapFile = opts.from;
7746
7681
  }
7747
- let path = relative(from, file);
7748
- this.memoizedPaths.set(file, path);
7749
- return path;
7682
+ if (this.mapFile)
7683
+ this.root = dirname(this.mapFile);
7684
+ if (text)
7685
+ this.text = text;
7750
7686
  }
7751
- previous() {
7752
- if (!this.previousMaps) {
7753
- this.previousMaps = [];
7754
- if (this.root) {
7755
- this.root.walk((node) => {
7756
- if (node.source && node.source.input.map) {
7757
- let map = node.source.input.map;
7758
- if (!this.previousMaps.includes(map)) {
7759
- this.previousMaps.push(map);
7760
- }
7761
- }
7762
- });
7763
- } else {
7764
- let input = new Input(this.originalCSS, this.opts);
7765
- if (input.map)
7766
- this.previousMaps.push(input.map);
7767
- }
7687
+ consumer() {
7688
+ if (!this.consumerCache) {
7689
+ this.consumerCache = new SourceMapConsumer(this.text);
7768
7690
  }
7769
- return this.previousMaps;
7691
+ return this.consumerCache;
7770
7692
  }
7771
- setSourcesContent() {
7772
- let already = {};
7773
- if (this.root) {
7774
- this.root.walk((node) => {
7775
- if (node.source) {
7776
- let from = node.source.input.from;
7777
- if (from && !already[from]) {
7778
- already[from] = true;
7779
- let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
7780
- this.map.setSourceContent(fromUrl, node.source.input.css);
7781
- }
7782
- }
7783
- });
7784
- } else if (this.css) {
7785
- let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
7786
- this.map.setSourceContent(from, this.css);
7693
+ decodeInline(text) {
7694
+ let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/;
7695
+ let baseUri = /^data:application\/json;base64,/;
7696
+ let charsetUri = /^data:application\/json;charset=utf-?8,/;
7697
+ let uri = /^data:application\/json,/;
7698
+ let uriMatch = text.match(charsetUri) || text.match(uri);
7699
+ if (uriMatch) {
7700
+ return decodeURIComponent(text.substr(uriMatch[0].length));
7787
7701
  }
7702
+ let baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);
7703
+ if (baseUriMatch) {
7704
+ return fromBase64(text.substr(baseUriMatch[0].length));
7705
+ }
7706
+ let encoding = text.match(/data:application\/json;([^,]+),/)[1];
7707
+ throw new Error("Unsupported source map encoding " + encoding);
7788
7708
  }
7789
- sourcePath(node) {
7790
- if (this.mapOpts.from) {
7791
- return this.toUrl(this.mapOpts.from);
7792
- } else if (this.usesFileUrls) {
7793
- return this.toFileUrl(node.source.input.from);
7794
- } else {
7795
- return this.toUrl(this.path(node.source.input.from));
7709
+ getAnnotationURL(sourceMapString) {
7710
+ return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim();
7711
+ }
7712
+ isMap(map) {
7713
+ if (typeof map !== "object")
7714
+ return false;
7715
+ return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections);
7716
+ }
7717
+ loadAnnotation(css) {
7718
+ let comments = css.match(/\/\*\s*# sourceMappingURL=/g);
7719
+ if (!comments)
7720
+ return;
7721
+ let start = css.lastIndexOf(comments.pop());
7722
+ let end = css.indexOf("*/", start);
7723
+ if (start > -1 && end > -1) {
7724
+ this.annotation = this.getAnnotationURL(css.substring(start, end));
7796
7725
  }
7797
7726
  }
7798
- toBase64(str) {
7799
- if (Buffer) {
7800
- return Buffer.from(str).toString("base64");
7801
- } else {
7802
- return window.btoa(unescape(encodeURIComponent(str)));
7727
+ loadFile(path) {
7728
+ this.root = dirname(path);
7729
+ if (existsSync(path)) {
7730
+ this.mapFile = path;
7731
+ return readFileSync(path, "utf-8").toString().trim();
7803
7732
  }
7804
7733
  }
7805
- toFileUrl(path) {
7806
- let cached = this.memoizedFileURLs.get(path);
7807
- if (cached)
7808
- return cached;
7809
- if (pathToFileURL) {
7810
- let fileURL = pathToFileURL(path).toString();
7811
- this.memoizedFileURLs.set(path, fileURL);
7812
- return fileURL;
7813
- } else {
7814
- throw new Error(
7815
- "`map.absolute` option is not available in this PostCSS build"
7816
- );
7734
+ loadMap(file, prev) {
7735
+ if (prev === false)
7736
+ return false;
7737
+ if (prev) {
7738
+ if (typeof prev === "string") {
7739
+ return prev;
7740
+ } else if (typeof prev === "function") {
7741
+ let prevPath = prev(file);
7742
+ if (prevPath) {
7743
+ let map = this.loadFile(prevPath);
7744
+ if (!map) {
7745
+ throw new Error(
7746
+ "Unable to load previous source map: " + prevPath.toString()
7747
+ );
7748
+ }
7749
+ return map;
7750
+ }
7751
+ } else if (prev instanceof SourceMapConsumer) {
7752
+ return SourceMapGenerator.fromSourceMap(prev).toString();
7753
+ } else if (prev instanceof SourceMapGenerator) {
7754
+ return prev.toString();
7755
+ } else if (this.isMap(prev)) {
7756
+ return JSON.stringify(prev);
7757
+ } else {
7758
+ throw new Error(
7759
+ "Unsupported previous source map format: " + prev.toString()
7760
+ );
7761
+ }
7762
+ } else if (this.inline) {
7763
+ return this.decodeInline(this.annotation);
7764
+ } else if (this.annotation) {
7765
+ let map = this.annotation;
7766
+ if (file)
7767
+ map = join(dirname(file), map);
7768
+ return this.loadFile(map);
7817
7769
  }
7818
7770
  }
7819
- toUrl(path) {
7820
- let cached = this.memoizedURLs.get(path);
7821
- if (cached)
7822
- return cached;
7823
- if (sep === "\\") {
7824
- path = path.replace(/\\/g, "/");
7825
- }
7826
- let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
7827
- this.memoizedURLs.set(path, url);
7828
- return url;
7771
+ startWith(string, start) {
7772
+ if (!string)
7773
+ return false;
7774
+ return string.substr(0, start.length) === start;
7829
7775
  }
7830
- };
7831
- module.exports = MapGenerator;
7832
- }
7833
- });
7834
-
7835
- // external/npm/node_modules/postcss/lib/comment.js
7836
- var require_comment = __commonJS({
7837
- "external/npm/node_modules/postcss/lib/comment.js"(exports, module) {
7838
- "use strict";
7839
- var Node = require_node2();
7840
- var Comment = class extends Node {
7841
- constructor(defaults) {
7842
- super(defaults);
7843
- this.type = "comment";
7776
+ withContent() {
7777
+ return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
7844
7778
  }
7845
7779
  };
7846
- module.exports = Comment;
7847
- Comment.default = Comment;
7780
+ module.exports = PreviousMap;
7781
+ PreviousMap.default = PreviousMap;
7848
7782
  }
7849
7783
  });
7850
7784
 
7851
- // external/npm/node_modules/postcss/lib/container.js
7852
- var require_container = __commonJS({
7853
- "external/npm/node_modules/postcss/lib/container.js"(exports, module) {
7785
+ // external/npm/node_modules/critters/node_modules/postcss/lib/input.js
7786
+ var require_input = __commonJS({
7787
+ "external/npm/node_modules/critters/node_modules/postcss/lib/input.js"(exports, module) {
7854
7788
  "use strict";
7855
- var { isClean, my } = require_symbols();
7856
- var Declaration = require_declaration();
7857
- var Comment = require_comment();
7858
- var Node = require_node2();
7859
- var parse;
7860
- var Rule;
7861
- var AtRule;
7862
- var Root;
7863
- function cleanSource(nodes) {
7864
- return nodes.map((i) => {
7865
- if (i.nodes)
7866
- i.nodes = cleanSource(i.nodes);
7867
- delete i.source;
7868
- return i;
7869
- });
7870
- }
7871
- function markTreeDirty(node) {
7872
- node[isClean] = false;
7873
- if (node.proxyOf.nodes) {
7874
- for (let i of node.proxyOf.nodes) {
7875
- markTreeDirty(i);
7789
+ var { nanoid } = require_non_secure();
7790
+ var { isAbsolute, resolve } = require_path();
7791
+ var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
7792
+ var { fileURLToPath, pathToFileURL } = require_url();
7793
+ var CssSyntaxError = require_css_syntax_error();
7794
+ var PreviousMap = require_previous_map();
7795
+ var terminalHighlight = require_terminal_highlight();
7796
+ var fromOffsetCache = Symbol("fromOffsetCache");
7797
+ var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
7798
+ var pathAvailable = Boolean(resolve && isAbsolute);
7799
+ var Input = class {
7800
+ constructor(css, opts = {}) {
7801
+ if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
7802
+ throw new Error(`PostCSS received ${css} instead of CSS string`);
7876
7803
  }
7877
- }
7878
- }
7879
- var Container = class extends Node {
7880
- append(...children) {
7881
- for (let child of children) {
7882
- let nodes = this.normalize(child, this.last);
7883
- for (let node of nodes)
7884
- this.proxyOf.nodes.push(node);
7804
+ this.css = css.toString();
7805
+ if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") {
7806
+ this.hasBOM = true;
7807
+ this.css = this.css.slice(1);
7808
+ } else {
7809
+ this.hasBOM = false;
7885
7810
  }
7886
- this.markDirty();
7887
- return this;
7888
- }
7889
- cleanRaws(keepBetween) {
7890
- super.cleanRaws(keepBetween);
7891
- if (this.nodes) {
7892
- for (let node of this.nodes)
7893
- node.cleanRaws(keepBetween);
7811
+ if (opts.from) {
7812
+ if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) {
7813
+ this.file = opts.from;
7814
+ } else {
7815
+ this.file = resolve(opts.from);
7816
+ }
7894
7817
  }
7818
+ if (pathAvailable && sourceMapAvailable) {
7819
+ let map = new PreviousMap(this.css, opts);
7820
+ if (map.text) {
7821
+ this.map = map;
7822
+ let file = map.consumer().file;
7823
+ if (!this.file && file)
7824
+ this.file = this.mapResolve(file);
7825
+ }
7826
+ }
7827
+ if (!this.file) {
7828
+ this.id = "<input css " + nanoid(6) + ">";
7829
+ }
7830
+ if (this.map)
7831
+ this.map.file = this.from;
7895
7832
  }
7896
- each(callback) {
7897
- if (!this.proxyOf.nodes)
7898
- return void 0;
7899
- let iterator = this.getIterator();
7900
- let index, result;
7901
- while (this.indexes[iterator] < this.proxyOf.nodes.length) {
7902
- index = this.indexes[iterator];
7903
- result = callback(this.proxyOf.nodes[index], index);
7904
- if (result === false)
7905
- break;
7906
- this.indexes[iterator] += 1;
7833
+ error(message, line, column, opts = {}) {
7834
+ let endColumn, endLine, result;
7835
+ if (line && typeof line === "object") {
7836
+ let start = line;
7837
+ let end = column;
7838
+ if (typeof start.offset === "number") {
7839
+ let pos = this.fromOffset(start.offset);
7840
+ line = pos.line;
7841
+ column = pos.col;
7842
+ } else {
7843
+ line = start.line;
7844
+ column = start.column;
7845
+ }
7846
+ if (typeof end.offset === "number") {
7847
+ let pos = this.fromOffset(end.offset);
7848
+ endLine = pos.line;
7849
+ endColumn = pos.col;
7850
+ } else {
7851
+ endLine = end.line;
7852
+ endColumn = end.column;
7853
+ }
7854
+ } else if (!column) {
7855
+ let pos = this.fromOffset(line);
7856
+ line = pos.line;
7857
+ column = pos.col;
7858
+ }
7859
+ let origin = this.origin(line, column, endLine, endColumn);
7860
+ if (origin) {
7861
+ result = new CssSyntaxError(
7862
+ message,
7863
+ origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },
7864
+ origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },
7865
+ origin.source,
7866
+ origin.file,
7867
+ opts.plugin
7868
+ );
7869
+ } else {
7870
+ result = new CssSyntaxError(
7871
+ message,
7872
+ endLine === void 0 ? line : { column, line },
7873
+ endLine === void 0 ? column : { column: endColumn, line: endLine },
7874
+ this.css,
7875
+ this.file,
7876
+ opts.plugin
7877
+ );
7878
+ }
7879
+ result.input = { column, endColumn, endLine, line, source: this.css };
7880
+ if (this.file) {
7881
+ if (pathToFileURL) {
7882
+ result.input.url = pathToFileURL(this.file).toString();
7883
+ }
7884
+ result.input.file = this.file;
7907
7885
  }
7908
- delete this.indexes[iterator];
7909
7886
  return result;
7910
7887
  }
7911
- every(condition) {
7912
- return this.nodes.every(condition);
7913
- }
7914
- getIterator() {
7915
- if (!this.lastEach)
7916
- this.lastEach = 0;
7917
- if (!this.indexes)
7918
- this.indexes = {};
7919
- this.lastEach += 1;
7920
- let iterator = this.lastEach;
7921
- this.indexes[iterator] = 0;
7922
- return iterator;
7923
- }
7924
- getProxyProcessor() {
7925
- return {
7926
- get(node, prop) {
7927
- if (prop === "proxyOf") {
7928
- return node;
7929
- } else if (!node[prop]) {
7930
- return node[prop];
7931
- } else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) {
7932
- return (...args) => {
7933
- return node[prop](
7934
- ...args.map((i) => {
7935
- if (typeof i === "function") {
7936
- return (child, index) => i(child.toProxy(), index);
7937
- } else {
7938
- return i;
7939
- }
7940
- })
7941
- );
7942
- };
7943
- } else if (prop === "every" || prop === "some") {
7944
- return (cb) => {
7945
- return node[prop](
7946
- (child, ...other) => cb(child.toProxy(), ...other)
7947
- );
7948
- };
7949
- } else if (prop === "root") {
7950
- return () => node.root().toProxy();
7951
- } else if (prop === "nodes") {
7952
- return node.nodes.map((i) => i.toProxy());
7953
- } else if (prop === "first" || prop === "last") {
7954
- return node[prop].toProxy();
7888
+ fromOffset(offset) {
7889
+ let lastLine, lineToIndex;
7890
+ if (!this[fromOffsetCache]) {
7891
+ let lines = this.css.split("\n");
7892
+ lineToIndex = new Array(lines.length);
7893
+ let prevIndex = 0;
7894
+ for (let i = 0, l = lines.length; i < l; i++) {
7895
+ lineToIndex[i] = prevIndex;
7896
+ prevIndex += lines[i].length + 1;
7897
+ }
7898
+ this[fromOffsetCache] = lineToIndex;
7899
+ } else {
7900
+ lineToIndex = this[fromOffsetCache];
7901
+ }
7902
+ lastLine = lineToIndex[lineToIndex.length - 1];
7903
+ let min = 0;
7904
+ if (offset >= lastLine) {
7905
+ min = lineToIndex.length - 1;
7906
+ } else {
7907
+ let max = lineToIndex.length - 2;
7908
+ let mid;
7909
+ while (min < max) {
7910
+ mid = min + (max - min >> 1);
7911
+ if (offset < lineToIndex[mid]) {
7912
+ max = mid - 1;
7913
+ } else if (offset >= lineToIndex[mid + 1]) {
7914
+ min = mid + 1;
7955
7915
  } else {
7956
- return node[prop];
7957
- }
7958
- },
7959
- set(node, prop, value) {
7960
- if (node[prop] === value)
7961
- return true;
7962
- node[prop] = value;
7963
- if (prop === "name" || prop === "params" || prop === "selector") {
7964
- node.markDirty();
7916
+ min = mid;
7917
+ break;
7965
7918
  }
7966
- return true;
7967
7919
  }
7920
+ }
7921
+ return {
7922
+ col: offset - lineToIndex[min] + 1,
7923
+ line: min + 1
7968
7924
  };
7969
7925
  }
7970
- index(child) {
7971
- if (typeof child === "number")
7972
- return child;
7973
- if (child.proxyOf)
7974
- child = child.proxyOf;
7975
- return this.proxyOf.nodes.indexOf(child);
7976
- }
7977
- insertAfter(exist, add) {
7978
- let existIndex = this.index(exist);
7979
- let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();
7980
- existIndex = this.index(exist);
7981
- for (let node of nodes)
7982
- this.proxyOf.nodes.splice(existIndex + 1, 0, node);
7983
- let index;
7984
- for (let id in this.indexes) {
7985
- index = this.indexes[id];
7986
- if (existIndex < index) {
7987
- this.indexes[id] = index + nodes.length;
7988
- }
7926
+ mapResolve(file) {
7927
+ if (/^\w+:\/\//.test(file)) {
7928
+ return file;
7989
7929
  }
7990
- this.markDirty();
7991
- return this;
7930
+ return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file);
7992
7931
  }
7993
- insertBefore(exist, add) {
7994
- let existIndex = this.index(exist);
7995
- let type = existIndex === 0 ? "prepend" : false;
7996
- let nodes = this.normalize(
7997
- add,
7998
- this.proxyOf.nodes[existIndex],
7999
- type
8000
- ).reverse();
8001
- existIndex = this.index(exist);
8002
- for (let node of nodes)
8003
- this.proxyOf.nodes.splice(existIndex, 0, node);
8004
- let index;
8005
- for (let id in this.indexes) {
8006
- index = this.indexes[id];
8007
- if (existIndex <= index) {
8008
- this.indexes[id] = index + nodes.length;
7932
+ origin(line, column, endLine, endColumn) {
7933
+ if (!this.map)
7934
+ return false;
7935
+ let consumer = this.map.consumer();
7936
+ let from = consumer.originalPositionFor({ column, line });
7937
+ if (!from.source)
7938
+ return false;
7939
+ let to;
7940
+ if (typeof endLine === "number") {
7941
+ to = consumer.originalPositionFor({ column: endColumn, line: endLine });
7942
+ }
7943
+ let fromUrl;
7944
+ if (isAbsolute(from.source)) {
7945
+ fromUrl = pathToFileURL(from.source);
7946
+ } else {
7947
+ fromUrl = new URL(
7948
+ from.source,
7949
+ this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
7950
+ );
7951
+ }
7952
+ let result = {
7953
+ column: from.column,
7954
+ endColumn: to && to.column,
7955
+ endLine: to && to.line,
7956
+ line: from.line,
7957
+ url: fromUrl.toString()
7958
+ };
7959
+ if (fromUrl.protocol === "file:") {
7960
+ if (fileURLToPath) {
7961
+ result.file = fileURLToPath(fromUrl);
7962
+ } else {
7963
+ throw new Error(`file: protocol is not available in this PostCSS build`);
8009
7964
  }
8010
7965
  }
8011
- this.markDirty();
8012
- return this;
7966
+ let source = consumer.sourceContentFor(from.source);
7967
+ if (source)
7968
+ result.source = source;
7969
+ return result;
8013
7970
  }
8014
- normalize(nodes, sample) {
8015
- if (typeof nodes === "string") {
8016
- nodes = cleanSource(parse(nodes).nodes);
8017
- } else if (typeof nodes === "undefined") {
8018
- nodes = [];
8019
- } else if (Array.isArray(nodes)) {
8020
- nodes = nodes.slice(0);
8021
- for (let i of nodes) {
8022
- if (i.parent)
8023
- i.parent.removeChild(i, "ignore");
8024
- }
8025
- } else if (nodes.type === "root" && this.type !== "document") {
8026
- nodes = nodes.nodes.slice(0);
8027
- for (let i of nodes) {
8028
- if (i.parent)
8029
- i.parent.removeChild(i, "ignore");
7971
+ toJSON() {
7972
+ let json = {};
7973
+ for (let name of ["hasBOM", "css", "file", "id"]) {
7974
+ if (this[name] != null) {
7975
+ json[name] = this[name];
8030
7976
  }
8031
- } else if (nodes.type) {
8032
- nodes = [nodes];
8033
- } else if (nodes.prop) {
8034
- if (typeof nodes.value === "undefined") {
8035
- throw new Error("Value field is missed in node creation");
8036
- } else if (typeof nodes.value !== "string") {
8037
- nodes.value = String(nodes.value);
7977
+ }
7978
+ if (this.map) {
7979
+ json.map = __spreadValues({}, this.map);
7980
+ if (json.map.consumerCache) {
7981
+ json.map.consumerCache = void 0;
8038
7982
  }
8039
- nodes = [new Declaration(nodes)];
8040
- } else if (nodes.selector || nodes.selectors) {
8041
- nodes = [new Rule(nodes)];
8042
- } else if (nodes.name) {
8043
- nodes = [new AtRule(nodes)];
8044
- } else if (nodes.text) {
8045
- nodes = [new Comment(nodes)];
8046
- } else {
8047
- throw new Error("Unknown node type in node creation");
8048
7983
  }
8049
- let processed = nodes.map((i) => {
8050
- if (!i[my])
8051
- Container.rebuild(i);
8052
- i = i.proxyOf;
8053
- if (i.parent)
8054
- i.parent.removeChild(i);
8055
- if (i[isClean])
8056
- markTreeDirty(i);
8057
- if (typeof i.raws.before === "undefined") {
8058
- if (sample && typeof sample.raws.before !== "undefined") {
8059
- i.raws.before = sample.raws.before.replace(/\S/g, "");
7984
+ return json;
7985
+ }
7986
+ get from() {
7987
+ return this.file || this.id;
7988
+ }
7989
+ };
7990
+ module.exports = Input;
7991
+ Input.default = Input;
7992
+ if (terminalHighlight && terminalHighlight.registerInput) {
7993
+ terminalHighlight.registerInput(Input);
7994
+ }
7995
+ }
7996
+ });
7997
+
7998
+ // external/npm/node_modules/critters/node_modules/postcss/lib/root.js
7999
+ var require_root = __commonJS({
8000
+ "external/npm/node_modules/critters/node_modules/postcss/lib/root.js"(exports, module) {
8001
+ "use strict";
8002
+ var Container = require_container();
8003
+ var LazyResult;
8004
+ var Processor;
8005
+ var Root = class extends Container {
8006
+ constructor(defaults) {
8007
+ super(defaults);
8008
+ this.type = "root";
8009
+ if (!this.nodes)
8010
+ this.nodes = [];
8011
+ }
8012
+ normalize(child, sample, type) {
8013
+ let nodes = super.normalize(child);
8014
+ if (sample) {
8015
+ if (type === "prepend") {
8016
+ if (this.nodes.length > 1) {
8017
+ sample.raws.before = this.nodes[1].raws.before;
8018
+ } else {
8019
+ delete sample.raws.before;
8020
+ }
8021
+ } else if (this.first !== sample) {
8022
+ for (let node of nodes) {
8023
+ node.raws.before = sample.raws.before;
8060
8024
  }
8061
8025
  }
8062
- i.parent = this.proxyOf;
8063
- return i;
8064
- });
8065
- return processed;
8026
+ }
8027
+ return nodes;
8066
8028
  }
8067
- prepend(...children) {
8068
- children = children.reverse();
8069
- for (let child of children) {
8070
- let nodes = this.normalize(child, this.first, "prepend").reverse();
8071
- for (let node of nodes)
8072
- this.proxyOf.nodes.unshift(node);
8073
- for (let id in this.indexes) {
8074
- this.indexes[id] = this.indexes[id] + nodes.length;
8029
+ removeChild(child, ignore) {
8030
+ let index = this.index(child);
8031
+ if (!ignore && index === 0 && this.nodes.length > 1) {
8032
+ this.nodes[1].raws.before = this.nodes[index].raws.before;
8033
+ }
8034
+ return super.removeChild(child);
8035
+ }
8036
+ toResult(opts = {}) {
8037
+ let lazy = new LazyResult(new Processor(), this, opts);
8038
+ return lazy.stringify();
8039
+ }
8040
+ };
8041
+ Root.registerLazyResult = (dependant) => {
8042
+ LazyResult = dependant;
8043
+ };
8044
+ Root.registerProcessor = (dependant) => {
8045
+ Processor = dependant;
8046
+ };
8047
+ module.exports = Root;
8048
+ Root.default = Root;
8049
+ Container.registerRoot(Root);
8050
+ }
8051
+ });
8052
+
8053
+ // external/npm/node_modules/critters/node_modules/postcss/lib/list.js
8054
+ var require_list = __commonJS({
8055
+ "external/npm/node_modules/critters/node_modules/postcss/lib/list.js"(exports, module) {
8056
+ "use strict";
8057
+ var list = {
8058
+ comma(string) {
8059
+ return list.split(string, [","], true);
8060
+ },
8061
+ space(string) {
8062
+ let spaces = [" ", "\n", " "];
8063
+ return list.split(string, spaces);
8064
+ },
8065
+ split(string, separators, last) {
8066
+ let array = [];
8067
+ let current = "";
8068
+ let split = false;
8069
+ let func = 0;
8070
+ let inQuote = false;
8071
+ let prevQuote = "";
8072
+ let escape = false;
8073
+ for (let letter of string) {
8074
+ if (escape) {
8075
+ escape = false;
8076
+ } else if (letter === "\\") {
8077
+ escape = true;
8078
+ } else if (inQuote) {
8079
+ if (letter === prevQuote) {
8080
+ inQuote = false;
8081
+ }
8082
+ } else if (letter === '"' || letter === "'") {
8083
+ inQuote = true;
8084
+ prevQuote = letter;
8085
+ } else if (letter === "(") {
8086
+ func += 1;
8087
+ } else if (letter === ")") {
8088
+ if (func > 0)
8089
+ func -= 1;
8090
+ } else if (func === 0) {
8091
+ if (separators.includes(letter))
8092
+ split = true;
8093
+ }
8094
+ if (split) {
8095
+ if (current !== "")
8096
+ array.push(current.trim());
8097
+ current = "";
8098
+ split = false;
8099
+ } else {
8100
+ current += letter;
8075
8101
  }
8076
8102
  }
8077
- this.markDirty();
8078
- return this;
8103
+ if (last || current !== "")
8104
+ array.push(current.trim());
8105
+ return array;
8079
8106
  }
8080
- push(child) {
8081
- child.parent = this;
8082
- this.proxyOf.nodes.push(child);
8083
- return this;
8107
+ };
8108
+ module.exports = list;
8109
+ list.default = list;
8110
+ }
8111
+ });
8112
+
8113
+ // external/npm/node_modules/critters/node_modules/postcss/lib/rule.js
8114
+ var require_rule = __commonJS({
8115
+ "external/npm/node_modules/critters/node_modules/postcss/lib/rule.js"(exports, module) {
8116
+ "use strict";
8117
+ var Container = require_container();
8118
+ var list = require_list();
8119
+ var Rule = class extends Container {
8120
+ constructor(defaults) {
8121
+ super(defaults);
8122
+ this.type = "rule";
8123
+ if (!this.nodes)
8124
+ this.nodes = [];
8084
8125
  }
8085
- removeAll() {
8086
- for (let node of this.proxyOf.nodes)
8087
- node.parent = void 0;
8088
- this.proxyOf.nodes = [];
8089
- this.markDirty();
8090
- return this;
8126
+ get selectors() {
8127
+ return list.comma(this.selector);
8091
8128
  }
8092
- removeChild(child) {
8093
- child = this.index(child);
8094
- this.proxyOf.nodes[child].parent = void 0;
8095
- this.proxyOf.nodes.splice(child, 1);
8096
- let index;
8097
- for (let id in this.indexes) {
8098
- index = this.indexes[id];
8099
- if (index >= child) {
8100
- this.indexes[id] = index - 1;
8129
+ set selectors(values) {
8130
+ let match = this.selector ? this.selector.match(/,\s*/) : null;
8131
+ let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
8132
+ this.selector = values.join(sep);
8133
+ }
8134
+ };
8135
+ module.exports = Rule;
8136
+ Rule.default = Rule;
8137
+ Container.registerRule(Rule);
8138
+ }
8139
+ });
8140
+
8141
+ // external/npm/node_modules/critters/node_modules/postcss/lib/fromJSON.js
8142
+ var require_fromJSON = __commonJS({
8143
+ "external/npm/node_modules/critters/node_modules/postcss/lib/fromJSON.js"(exports, module) {
8144
+ "use strict";
8145
+ var AtRule = require_at_rule();
8146
+ var Comment = require_comment();
8147
+ var Declaration = require_declaration();
8148
+ var Input = require_input();
8149
+ var PreviousMap = require_previous_map();
8150
+ var Root = require_root();
8151
+ var Rule = require_rule();
8152
+ function fromJSON(json, inputs) {
8153
+ if (Array.isArray(json))
8154
+ return json.map((n) => fromJSON(n));
8155
+ let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
8156
+ if (ownInputs) {
8157
+ inputs = [];
8158
+ for (let input of ownInputs) {
8159
+ let inputHydrated = __spreadProps(__spreadValues({}, input), { __proto__: Input.prototype });
8160
+ if (inputHydrated.map) {
8161
+ inputHydrated.map = __spreadProps(__spreadValues({}, inputHydrated.map), {
8162
+ __proto__: PreviousMap.prototype
8163
+ });
8101
8164
  }
8165
+ inputs.push(inputHydrated);
8102
8166
  }
8103
- this.markDirty();
8104
- return this;
8105
8167
  }
8106
- replaceValues(pattern, opts, callback) {
8107
- if (!callback) {
8108
- callback = opts;
8109
- opts = {};
8168
+ if (defaults.nodes) {
8169
+ defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
8170
+ }
8171
+ if (defaults.source) {
8172
+ let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
8173
+ defaults.source = source;
8174
+ if (inputId != null) {
8175
+ defaults.source.input = inputs[inputId];
8110
8176
  }
8111
- this.walkDecls((decl) => {
8112
- if (opts.props && !opts.props.includes(decl.prop))
8113
- return;
8114
- if (opts.fast && !decl.value.includes(opts.fast))
8115
- return;
8116
- decl.value = decl.value.replace(pattern, callback);
8117
- });
8118
- this.markDirty();
8119
- return this;
8120
8177
  }
8121
- some(condition) {
8122
- return this.nodes.some(condition);
8178
+ if (defaults.type === "root") {
8179
+ return new Root(defaults);
8180
+ } else if (defaults.type === "decl") {
8181
+ return new Declaration(defaults);
8182
+ } else if (defaults.type === "rule") {
8183
+ return new Rule(defaults);
8184
+ } else if (defaults.type === "comment") {
8185
+ return new Comment(defaults);
8186
+ } else if (defaults.type === "atrule") {
8187
+ return new AtRule(defaults);
8188
+ } else {
8189
+ throw new Error("Unknown node type: " + json.type);
8123
8190
  }
8124
- walk(callback) {
8125
- return this.each((child, i) => {
8126
- let result;
8127
- try {
8128
- result = callback(child, i);
8129
- } catch (e) {
8130
- throw child.addToError(e);
8131
- }
8132
- if (result !== false && child.walk) {
8133
- result = child.walk(callback);
8191
+ }
8192
+ module.exports = fromJSON;
8193
+ fromJSON.default = fromJSON;
8194
+ }
8195
+ });
8196
+
8197
+ // external/npm/node_modules/critters/node_modules/postcss/lib/map-generator.js
8198
+ var require_map_generator = __commonJS({
8199
+ "external/npm/node_modules/critters/node_modules/postcss/lib/map-generator.js"(exports, module) {
8200
+ "use strict";
8201
+ var { dirname, relative, resolve, sep } = require_path();
8202
+ var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
8203
+ var { pathToFileURL } = require_url();
8204
+ var Input = require_input();
8205
+ var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
8206
+ var pathAvailable = Boolean(dirname && resolve && relative && sep);
8207
+ var MapGenerator = class {
8208
+ constructor(stringify, root, opts, cssString) {
8209
+ this.stringify = stringify;
8210
+ this.mapOpts = opts.map || {};
8211
+ this.root = root;
8212
+ this.opts = opts;
8213
+ this.css = cssString;
8214
+ this.originalCSS = cssString;
8215
+ this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;
8216
+ this.memoizedFileURLs = /* @__PURE__ */ new Map();
8217
+ this.memoizedPaths = /* @__PURE__ */ new Map();
8218
+ this.memoizedURLs = /* @__PURE__ */ new Map();
8219
+ }
8220
+ addAnnotation() {
8221
+ let content;
8222
+ if (this.isInline()) {
8223
+ content = "data:application/json;base64," + this.toBase64(this.map.toString());
8224
+ } else if (typeof this.mapOpts.annotation === "string") {
8225
+ content = this.mapOpts.annotation;
8226
+ } else if (typeof this.mapOpts.annotation === "function") {
8227
+ content = this.mapOpts.annotation(this.opts.to, this.root);
8228
+ } else {
8229
+ content = this.outputFile() + ".map";
8230
+ }
8231
+ let eol = "\n";
8232
+ if (this.css.includes("\r\n"))
8233
+ eol = "\r\n";
8234
+ this.css += eol + "/*# sourceMappingURL=" + content + " */";
8235
+ }
8236
+ applyPrevMaps() {
8237
+ for (let prev of this.previous()) {
8238
+ let from = this.toUrl(this.path(prev.file));
8239
+ let root = prev.root || dirname(prev.file);
8240
+ let map;
8241
+ if (this.mapOpts.sourcesContent === false) {
8242
+ map = new SourceMapConsumer(prev.text);
8243
+ if (map.sourcesContent) {
8244
+ map.sourcesContent = null;
8245
+ }
8246
+ } else {
8247
+ map = prev.consumer();
8134
8248
  }
8135
- return result;
8136
- });
8249
+ this.map.applySourceMap(map, from, this.toUrl(this.path(root)));
8250
+ }
8137
8251
  }
8138
- walkAtRules(name, callback) {
8139
- if (!callback) {
8140
- callback = name;
8141
- return this.walk((child, i) => {
8142
- if (child.type === "atrule") {
8143
- return callback(child, i);
8252
+ clearAnnotation() {
8253
+ if (this.mapOpts.annotation === false)
8254
+ return;
8255
+ if (this.root) {
8256
+ let node;
8257
+ for (let i = this.root.nodes.length - 1; i >= 0; i--) {
8258
+ node = this.root.nodes[i];
8259
+ if (node.type !== "comment")
8260
+ continue;
8261
+ if (node.text.startsWith("# sourceMappingURL=")) {
8262
+ this.root.removeChild(i);
8144
8263
  }
8264
+ }
8265
+ } else if (this.css) {
8266
+ this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, "");
8267
+ }
8268
+ }
8269
+ generate() {
8270
+ this.clearAnnotation();
8271
+ if (pathAvailable && sourceMapAvailable && this.isMap()) {
8272
+ return this.generateMap();
8273
+ } else {
8274
+ let result = "";
8275
+ this.stringify(this.root, (i) => {
8276
+ result += i;
8145
8277
  });
8278
+ return [result];
8146
8279
  }
8147
- if (name instanceof RegExp) {
8148
- return this.walk((child, i) => {
8149
- if (child.type === "atrule" && name.test(child.name)) {
8150
- return callback(child, i);
8151
- }
8280
+ }
8281
+ generateMap() {
8282
+ if (this.root) {
8283
+ this.generateString();
8284
+ } else if (this.previous().length === 1) {
8285
+ let prev = this.previous()[0].consumer();
8286
+ prev.file = this.outputFile();
8287
+ this.map = SourceMapGenerator.fromSourceMap(prev, {
8288
+ ignoreInvalidMapping: true
8289
+ });
8290
+ } else {
8291
+ this.map = new SourceMapGenerator({
8292
+ file: this.outputFile(),
8293
+ ignoreInvalidMapping: true
8152
8294
  });
8295
+ this.map.addMapping({
8296
+ generated: { column: 0, line: 1 },
8297
+ original: { column: 0, line: 1 },
8298
+ source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>"
8299
+ });
8300
+ }
8301
+ if (this.isSourcesContent())
8302
+ this.setSourcesContent();
8303
+ if (this.root && this.previous().length > 0)
8304
+ this.applyPrevMaps();
8305
+ if (this.isAnnotation())
8306
+ this.addAnnotation();
8307
+ if (this.isInline()) {
8308
+ return [this.css];
8309
+ } else {
8310
+ return [this.css, this.map];
8153
8311
  }
8154
- return this.walk((child, i) => {
8155
- if (child.type === "atrule" && child.name === name) {
8156
- return callback(child, i);
8157
- }
8158
- });
8159
8312
  }
8160
- walkComments(callback) {
8161
- return this.walk((child, i) => {
8162
- if (child.type === "comment") {
8163
- return callback(child, i);
8164
- }
8313
+ generateString() {
8314
+ this.css = "";
8315
+ this.map = new SourceMapGenerator({
8316
+ file: this.outputFile(),
8317
+ ignoreInvalidMapping: true
8165
8318
  });
8166
- }
8167
- walkDecls(prop, callback) {
8168
- if (!callback) {
8169
- callback = prop;
8170
- return this.walk((child, i) => {
8171
- if (child.type === "decl") {
8172
- return callback(child, i);
8319
+ let line = 1;
8320
+ let column = 1;
8321
+ let noSource = "<no source>";
8322
+ let mapping = {
8323
+ generated: { column: 0, line: 0 },
8324
+ original: { column: 0, line: 0 },
8325
+ source: ""
8326
+ };
8327
+ let last, lines;
8328
+ this.stringify(this.root, (str, node, type) => {
8329
+ this.css += str;
8330
+ if (node && type !== "end") {
8331
+ mapping.generated.line = line;
8332
+ mapping.generated.column = column - 1;
8333
+ if (node.source && node.source.start) {
8334
+ mapping.source = this.sourcePath(node);
8335
+ mapping.original.line = node.source.start.line;
8336
+ mapping.original.column = node.source.start.column - 1;
8337
+ this.map.addMapping(mapping);
8338
+ } else {
8339
+ mapping.source = noSource;
8340
+ mapping.original.line = 1;
8341
+ mapping.original.column = 0;
8342
+ this.map.addMapping(mapping);
8173
8343
  }
8174
- });
8175
- }
8176
- if (prop instanceof RegExp) {
8177
- return this.walk((child, i) => {
8178
- if (child.type === "decl" && prop.test(child.prop)) {
8179
- return callback(child, i);
8344
+ }
8345
+ lines = str.match(/\n/g);
8346
+ if (lines) {
8347
+ line += lines.length;
8348
+ last = str.lastIndexOf("\n");
8349
+ column = str.length - last;
8350
+ } else {
8351
+ column += str.length;
8352
+ }
8353
+ if (node && type !== "start") {
8354
+ let p = node.parent || { raws: {} };
8355
+ let childless = node.type === "decl" || node.type === "atrule" && !node.nodes;
8356
+ if (!childless || node !== p.last || p.raws.semicolon) {
8357
+ if (node.source && node.source.end) {
8358
+ mapping.source = this.sourcePath(node);
8359
+ mapping.original.line = node.source.end.line;
8360
+ mapping.original.column = node.source.end.column - 1;
8361
+ mapping.generated.line = line;
8362
+ mapping.generated.column = column - 2;
8363
+ this.map.addMapping(mapping);
8364
+ } else {
8365
+ mapping.source = noSource;
8366
+ mapping.original.line = 1;
8367
+ mapping.original.column = 0;
8368
+ mapping.generated.line = line;
8369
+ mapping.generated.column = column - 1;
8370
+ this.map.addMapping(mapping);
8371
+ }
8180
8372
  }
8181
- });
8182
- }
8183
- return this.walk((child, i) => {
8184
- if (child.type === "decl" && child.prop === prop) {
8185
- return callback(child, i);
8186
8373
  }
8187
8374
  });
8188
8375
  }
8189
- walkRules(selector, callback) {
8190
- if (!callback) {
8191
- callback = selector;
8192
- return this.walk((child, i) => {
8193
- if (child.type === "rule") {
8194
- return callback(child, i);
8195
- }
8196
- });
8376
+ isAnnotation() {
8377
+ if (this.isInline()) {
8378
+ return true;
8197
8379
  }
8198
- if (selector instanceof RegExp) {
8199
- return this.walk((child, i) => {
8200
- if (child.type === "rule" && selector.test(child.selector)) {
8201
- return callback(child, i);
8202
- }
8203
- });
8380
+ if (typeof this.mapOpts.annotation !== "undefined") {
8381
+ return this.mapOpts.annotation;
8204
8382
  }
8205
- return this.walk((child, i) => {
8206
- if (child.type === "rule" && child.selector === selector) {
8207
- return callback(child, i);
8208
- }
8209
- });
8210
- }
8211
- get first() {
8212
- if (!this.proxyOf.nodes)
8213
- return void 0;
8214
- return this.proxyOf.nodes[0];
8215
- }
8216
- get last() {
8217
- if (!this.proxyOf.nodes)
8218
- return void 0;
8219
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
8220
- }
8221
- };
8222
- Container.registerParse = (dependant) => {
8223
- parse = dependant;
8224
- };
8225
- Container.registerRule = (dependant) => {
8226
- Rule = dependant;
8227
- };
8228
- Container.registerAtRule = (dependant) => {
8229
- AtRule = dependant;
8230
- };
8231
- Container.registerRoot = (dependant) => {
8232
- Root = dependant;
8233
- };
8234
- module.exports = Container;
8235
- Container.default = Container;
8236
- Container.rebuild = (node) => {
8237
- if (node.type === "atrule") {
8238
- Object.setPrototypeOf(node, AtRule.prototype);
8239
- } else if (node.type === "rule") {
8240
- Object.setPrototypeOf(node, Rule.prototype);
8241
- } else if (node.type === "decl") {
8242
- Object.setPrototypeOf(node, Declaration.prototype);
8243
- } else if (node.type === "comment") {
8244
- Object.setPrototypeOf(node, Comment.prototype);
8245
- } else if (node.type === "root") {
8246
- Object.setPrototypeOf(node, Root.prototype);
8383
+ if (this.previous().length) {
8384
+ return this.previous().some((i) => i.annotation);
8385
+ }
8386
+ return true;
8247
8387
  }
8248
- node[my] = true;
8249
- if (node.nodes) {
8250
- node.nodes.forEach((child) => {
8251
- Container.rebuild(child);
8252
- });
8388
+ isInline() {
8389
+ if (typeof this.mapOpts.inline !== "undefined") {
8390
+ return this.mapOpts.inline;
8391
+ }
8392
+ let annotation = this.mapOpts.annotation;
8393
+ if (typeof annotation !== "undefined" && annotation !== true) {
8394
+ return false;
8395
+ }
8396
+ if (this.previous().length) {
8397
+ return this.previous().some((i) => i.inline);
8398
+ }
8399
+ return true;
8253
8400
  }
8254
- };
8255
- }
8256
- });
8257
-
8258
- // external/npm/node_modules/postcss/lib/document.js
8259
- var require_document = __commonJS({
8260
- "external/npm/node_modules/postcss/lib/document.js"(exports, module) {
8261
- "use strict";
8262
- var Container = require_container();
8263
- var LazyResult;
8264
- var Processor;
8265
- var Document = class extends Container {
8266
- constructor(defaults) {
8267
- super(__spreadValues({ type: "document" }, defaults));
8268
- if (!this.nodes) {
8269
- this.nodes = [];
8401
+ isMap() {
8402
+ if (typeof this.opts.map !== "undefined") {
8403
+ return !!this.opts.map;
8270
8404
  }
8405
+ return this.previous().length > 0;
8271
8406
  }
8272
- toResult(opts = {}) {
8273
- let lazy = new LazyResult(new Processor(), this, opts);
8274
- return lazy.stringify();
8407
+ isSourcesContent() {
8408
+ if (typeof this.mapOpts.sourcesContent !== "undefined") {
8409
+ return this.mapOpts.sourcesContent;
8410
+ }
8411
+ if (this.previous().length) {
8412
+ return this.previous().some((i) => i.withContent());
8413
+ }
8414
+ return true;
8275
8415
  }
8276
- };
8277
- Document.registerLazyResult = (dependant) => {
8278
- LazyResult = dependant;
8279
- };
8280
- Document.registerProcessor = (dependant) => {
8281
- Processor = dependant;
8282
- };
8283
- module.exports = Document;
8284
- Document.default = Document;
8285
- }
8286
- });
8287
-
8288
- // external/npm/node_modules/postcss/lib/warn-once.js
8289
- var require_warn_once = __commonJS({
8290
- "external/npm/node_modules/postcss/lib/warn-once.js"(exports, module) {
8291
- "use strict";
8292
- var printed = {};
8293
- module.exports = function warnOnce(message) {
8294
- if (printed[message])
8295
- return;
8296
- printed[message] = true;
8297
- if (typeof console !== "undefined" && console.warn) {
8298
- console.warn(message);
8416
+ outputFile() {
8417
+ if (this.opts.to) {
8418
+ return this.path(this.opts.to);
8419
+ } else if (this.opts.from) {
8420
+ return this.path(this.opts.from);
8421
+ } else {
8422
+ return "to.css";
8423
+ }
8299
8424
  }
8300
- };
8301
- }
8302
- });
8303
-
8304
- // external/npm/node_modules/postcss/lib/warning.js
8305
- var require_warning = __commonJS({
8306
- "external/npm/node_modules/postcss/lib/warning.js"(exports, module) {
8307
- "use strict";
8308
- var Warning = class {
8309
- constructor(text, opts = {}) {
8310
- this.type = "warning";
8311
- this.text = text;
8312
- if (opts.node && opts.node.source) {
8313
- let range = opts.node.rangeBy(opts);
8314
- this.line = range.start.line;
8315
- this.column = range.start.column;
8316
- this.endLine = range.end.line;
8317
- this.endColumn = range.end.column;
8425
+ path(file) {
8426
+ if (this.mapOpts.absolute)
8427
+ return file;
8428
+ if (file.charCodeAt(0) === 60)
8429
+ return file;
8430
+ if (/^\w+:\/\//.test(file))
8431
+ return file;
8432
+ let cached = this.memoizedPaths.get(file);
8433
+ if (cached)
8434
+ return cached;
8435
+ let from = this.opts.to ? dirname(this.opts.to) : ".";
8436
+ if (typeof this.mapOpts.annotation === "string") {
8437
+ from = dirname(resolve(from, this.mapOpts.annotation));
8318
8438
  }
8319
- for (let opt in opts)
8320
- this[opt] = opts[opt];
8439
+ let path = relative(from, file);
8440
+ this.memoizedPaths.set(file, path);
8441
+ return path;
8321
8442
  }
8322
- toString() {
8323
- if (this.node) {
8324
- return this.node.error(this.text, {
8325
- index: this.index,
8326
- plugin: this.plugin,
8327
- word: this.word
8328
- }).message;
8329
- }
8330
- if (this.plugin) {
8331
- return this.plugin + ": " + this.text;
8443
+ previous() {
8444
+ if (!this.previousMaps) {
8445
+ this.previousMaps = [];
8446
+ if (this.root) {
8447
+ this.root.walk((node) => {
8448
+ if (node.source && node.source.input.map) {
8449
+ let map = node.source.input.map;
8450
+ if (!this.previousMaps.includes(map)) {
8451
+ this.previousMaps.push(map);
8452
+ }
8453
+ }
8454
+ });
8455
+ } else {
8456
+ let input = new Input(this.originalCSS, this.opts);
8457
+ if (input.map)
8458
+ this.previousMaps.push(input.map);
8459
+ }
8332
8460
  }
8333
- return this.text;
8461
+ return this.previousMaps;
8334
8462
  }
8335
- };
8336
- module.exports = Warning;
8337
- Warning.default = Warning;
8338
- }
8339
- });
8340
-
8341
- // external/npm/node_modules/postcss/lib/result.js
8342
- var require_result = __commonJS({
8343
- "external/npm/node_modules/postcss/lib/result.js"(exports, module) {
8344
- "use strict";
8345
- var Warning = require_warning();
8346
- var Result = class {
8347
- constructor(processor, root, opts) {
8348
- this.processor = processor;
8349
- this.messages = [];
8350
- this.root = root;
8351
- this.opts = opts;
8352
- this.css = void 0;
8353
- this.map = void 0;
8463
+ setSourcesContent() {
8464
+ let already = {};
8465
+ if (this.root) {
8466
+ this.root.walk((node) => {
8467
+ if (node.source) {
8468
+ let from = node.source.input.from;
8469
+ if (from && !already[from]) {
8470
+ already[from] = true;
8471
+ let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));
8472
+ this.map.setSourceContent(fromUrl, node.source.input.css);
8473
+ }
8474
+ }
8475
+ });
8476
+ } else if (this.css) {
8477
+ let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>";
8478
+ this.map.setSourceContent(from, this.css);
8479
+ }
8354
8480
  }
8355
- toString() {
8356
- return this.css;
8481
+ sourcePath(node) {
8482
+ if (this.mapOpts.from) {
8483
+ return this.toUrl(this.mapOpts.from);
8484
+ } else if (this.usesFileUrls) {
8485
+ return this.toFileUrl(node.source.input.from);
8486
+ } else {
8487
+ return this.toUrl(this.path(node.source.input.from));
8488
+ }
8357
8489
  }
8358
- warn(text, opts = {}) {
8359
- if (!opts.plugin) {
8360
- if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
8361
- opts.plugin = this.lastPlugin.postcssPlugin;
8362
- }
8490
+ toBase64(str) {
8491
+ if (Buffer) {
8492
+ return Buffer.from(str).toString("base64");
8493
+ } else {
8494
+ return window.btoa(unescape(encodeURIComponent(str)));
8363
8495
  }
8364
- let warning = new Warning(text, opts);
8365
- this.messages.push(warning);
8366
- return warning;
8367
8496
  }
8368
- warnings() {
8369
- return this.messages.filter((i) => i.type === "warning");
8497
+ toFileUrl(path) {
8498
+ let cached = this.memoizedFileURLs.get(path);
8499
+ if (cached)
8500
+ return cached;
8501
+ if (pathToFileURL) {
8502
+ let fileURL = pathToFileURL(path).toString();
8503
+ this.memoizedFileURLs.set(path, fileURL);
8504
+ return fileURL;
8505
+ } else {
8506
+ throw new Error(
8507
+ "`map.absolute` option is not available in this PostCSS build"
8508
+ );
8509
+ }
8370
8510
  }
8371
- get content() {
8372
- return this.css;
8511
+ toUrl(path) {
8512
+ let cached = this.memoizedURLs.get(path);
8513
+ if (cached)
8514
+ return cached;
8515
+ if (sep === "\\") {
8516
+ path = path.replace(/\\/g, "/");
8517
+ }
8518
+ let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);
8519
+ this.memoizedURLs.set(path, url);
8520
+ return url;
8373
8521
  }
8374
8522
  };
8375
- module.exports = Result;
8376
- Result.default = Result;
8523
+ module.exports = MapGenerator;
8377
8524
  }
8378
8525
  });
8379
8526
 
8380
- // external/npm/node_modules/postcss/lib/tokenize.js
8527
+ // external/npm/node_modules/critters/node_modules/postcss/lib/tokenize.js
8381
8528
  var require_tokenize = __commonJS({
8382
- "external/npm/node_modules/postcss/lib/tokenize.js"(exports, module) {
8529
+ "external/npm/node_modules/critters/node_modules/postcss/lib/tokenize.js"(exports, module) {
8383
8530
  "use strict";
8384
8531
  var SINGLE_QUOTE = "'".charCodeAt(0);
8385
8532
  var DOUBLE_QUOTE = '"'.charCodeAt(0);
@@ -8407,8 +8554,8 @@ var require_tokenize = __commonJS({
8407
8554
  module.exports = function tokenizer(input, options = {}) {
8408
8555
  let css = input.css.valueOf();
8409
8556
  let ignore = options.ignoreErrors;
8410
- let code, next, quote, content, escape;
8411
- let escaped, escapePos, prev, n, currentToken;
8557
+ let code, content, escape, next, quote;
8558
+ let currentToken, escaped, escapePos, n, prev;
8412
8559
  let length = css.length;
8413
8560
  let pos = 0;
8414
8561
  let buffer = [];
@@ -8568,212 +8715,42 @@ var require_tokenize = __commonJS({
8568
8715
  RE_WORD_END.test(css);
8569
8716
  if (RE_WORD_END.lastIndex === 0) {
8570
8717
  next = css.length - 1;
8571
- } else {
8572
- next = RE_WORD_END.lastIndex - 2;
8573
- }
8574
- currentToken = ["word", css.slice(pos, next + 1), pos, next];
8575
- buffer.push(currentToken);
8576
- pos = next;
8577
- }
8578
- break;
8579
- }
8580
- }
8581
- pos++;
8582
- return currentToken;
8583
- }
8584
- function back(token) {
8585
- returned.push(token);
8586
- }
8587
- return {
8588
- back,
8589
- endOfFile,
8590
- nextToken,
8591
- position
8592
- };
8593
- };
8594
- }
8595
- });
8596
-
8597
- // external/npm/node_modules/postcss/lib/at-rule.js
8598
- var require_at_rule = __commonJS({
8599
- "external/npm/node_modules/postcss/lib/at-rule.js"(exports, module) {
8600
- "use strict";
8601
- var Container = require_container();
8602
- var AtRule = class extends Container {
8603
- constructor(defaults) {
8604
- super(defaults);
8605
- this.type = "atrule";
8606
- }
8607
- append(...children) {
8608
- if (!this.proxyOf.nodes)
8609
- this.nodes = [];
8610
- return super.append(...children);
8611
- }
8612
- prepend(...children) {
8613
- if (!this.proxyOf.nodes)
8614
- this.nodes = [];
8615
- return super.prepend(...children);
8616
- }
8617
- };
8618
- module.exports = AtRule;
8619
- AtRule.default = AtRule;
8620
- Container.registerAtRule(AtRule);
8621
- }
8622
- });
8623
-
8624
- // external/npm/node_modules/postcss/lib/root.js
8625
- var require_root = __commonJS({
8626
- "external/npm/node_modules/postcss/lib/root.js"(exports, module) {
8627
- "use strict";
8628
- var Container = require_container();
8629
- var LazyResult;
8630
- var Processor;
8631
- var Root = class extends Container {
8632
- constructor(defaults) {
8633
- super(defaults);
8634
- this.type = "root";
8635
- if (!this.nodes)
8636
- this.nodes = [];
8637
- }
8638
- normalize(child, sample, type) {
8639
- let nodes = super.normalize(child);
8640
- if (sample) {
8641
- if (type === "prepend") {
8642
- if (this.nodes.length > 1) {
8643
- sample.raws.before = this.nodes[1].raws.before;
8644
- } else {
8645
- delete sample.raws.before;
8646
- }
8647
- } else if (this.first !== sample) {
8648
- for (let node of nodes) {
8649
- node.raws.before = sample.raws.before;
8650
- }
8651
- }
8652
- }
8653
- return nodes;
8654
- }
8655
- removeChild(child, ignore) {
8656
- let index = this.index(child);
8657
- if (!ignore && index === 0 && this.nodes.length > 1) {
8658
- this.nodes[1].raws.before = this.nodes[index].raws.before;
8659
- }
8660
- return super.removeChild(child);
8661
- }
8662
- toResult(opts = {}) {
8663
- let lazy = new LazyResult(new Processor(), this, opts);
8664
- return lazy.stringify();
8665
- }
8666
- };
8667
- Root.registerLazyResult = (dependant) => {
8668
- LazyResult = dependant;
8669
- };
8670
- Root.registerProcessor = (dependant) => {
8671
- Processor = dependant;
8672
- };
8673
- module.exports = Root;
8674
- Root.default = Root;
8675
- Container.registerRoot(Root);
8676
- }
8677
- });
8678
-
8679
- // external/npm/node_modules/postcss/lib/list.js
8680
- var require_list = __commonJS({
8681
- "external/npm/node_modules/postcss/lib/list.js"(exports, module) {
8682
- "use strict";
8683
- var list = {
8684
- comma(string) {
8685
- return list.split(string, [","], true);
8686
- },
8687
- space(string) {
8688
- let spaces = [" ", "\n", " "];
8689
- return list.split(string, spaces);
8690
- },
8691
- split(string, separators, last) {
8692
- let array = [];
8693
- let current = "";
8694
- let split = false;
8695
- let func = 0;
8696
- let inQuote = false;
8697
- let prevQuote = "";
8698
- let escape = false;
8699
- for (let letter of string) {
8700
- if (escape) {
8701
- escape = false;
8702
- } else if (letter === "\\") {
8703
- escape = true;
8704
- } else if (inQuote) {
8705
- if (letter === prevQuote) {
8706
- inQuote = false;
8718
+ } else {
8719
+ next = RE_WORD_END.lastIndex - 2;
8720
+ }
8721
+ currentToken = ["word", css.slice(pos, next + 1), pos, next];
8722
+ buffer.push(currentToken);
8723
+ pos = next;
8707
8724
  }
8708
- } else if (letter === '"' || letter === "'") {
8709
- inQuote = true;
8710
- prevQuote = letter;
8711
- } else if (letter === "(") {
8712
- func += 1;
8713
- } else if (letter === ")") {
8714
- if (func > 0)
8715
- func -= 1;
8716
- } else if (func === 0) {
8717
- if (separators.includes(letter))
8718
- split = true;
8719
- }
8720
- if (split) {
8721
- if (current !== "")
8722
- array.push(current.trim());
8723
- current = "";
8724
- split = false;
8725
- } else {
8726
- current += letter;
8725
+ break;
8727
8726
  }
8728
8727
  }
8729
- if (last || current !== "")
8730
- array.push(current.trim());
8731
- return array;
8732
- }
8733
- };
8734
- module.exports = list;
8735
- list.default = list;
8736
- }
8737
- });
8738
-
8739
- // external/npm/node_modules/postcss/lib/rule.js
8740
- var require_rule = __commonJS({
8741
- "external/npm/node_modules/postcss/lib/rule.js"(exports, module) {
8742
- "use strict";
8743
- var Container = require_container();
8744
- var list = require_list();
8745
- var Rule = class extends Container {
8746
- constructor(defaults) {
8747
- super(defaults);
8748
- this.type = "rule";
8749
- if (!this.nodes)
8750
- this.nodes = [];
8751
- }
8752
- get selectors() {
8753
- return list.comma(this.selector);
8728
+ pos++;
8729
+ return currentToken;
8754
8730
  }
8755
- set selectors(values) {
8756
- let match = this.selector ? this.selector.match(/,\s*/) : null;
8757
- let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
8758
- this.selector = values.join(sep);
8731
+ function back(token) {
8732
+ returned.push(token);
8759
8733
  }
8734
+ return {
8735
+ back,
8736
+ endOfFile,
8737
+ nextToken,
8738
+ position
8739
+ };
8760
8740
  };
8761
- module.exports = Rule;
8762
- Rule.default = Rule;
8763
- Container.registerRule(Rule);
8764
8741
  }
8765
8742
  });
8766
8743
 
8767
- // external/npm/node_modules/postcss/lib/parser.js
8744
+ // external/npm/node_modules/critters/node_modules/postcss/lib/parser.js
8768
8745
  var require_parser = __commonJS({
8769
- "external/npm/node_modules/postcss/lib/parser.js"(exports, module) {
8746
+ "external/npm/node_modules/critters/node_modules/postcss/lib/parser.js"(exports, module) {
8770
8747
  "use strict";
8771
- var Declaration = require_declaration();
8772
- var tokenizer = require_tokenize();
8773
- var Comment = require_comment();
8774
8748
  var AtRule = require_at_rule();
8749
+ var Comment = require_comment();
8750
+ var Declaration = require_declaration();
8775
8751
  var Root = require_root();
8776
8752
  var Rule = require_rule();
8753
+ var tokenizer = require_tokenize();
8777
8754
  var SAFE_COMMENT_NEIGHBOR = {
8778
8755
  empty: true,
8779
8756
  space: true
@@ -8895,7 +8872,7 @@ var require_parser = __commonJS({
8895
8872
  }
8896
8873
  colon(tokens) {
8897
8874
  let brackets = 0;
8898
- let token, type, prev;
8875
+ let prev, token, type;
8899
8876
  for (let [i, element] of tokens.entries()) {
8900
8877
  token = element;
8901
8878
  type = token[0];
@@ -9005,12 +8982,12 @@ var require_parser = __commonJS({
9005
8982
  let str = "";
9006
8983
  for (let j = i; j > 0; j--) {
9007
8984
  let type = cache[j][0];
9008
- if (str.trim().indexOf("!") === 0 && type !== "space") {
8985
+ if (str.trim().startsWith("!") && type !== "space") {
9009
8986
  break;
9010
8987
  }
9011
8988
  str = cache.pop()[1] + str;
9012
8989
  }
9013
- if (str.trim().indexOf("!") === 0) {
8990
+ if (str.trim().startsWith("!")) {
9014
8991
  node.important = true;
9015
8992
  node.raws.important = str;
9016
8993
  tokens = cache;
@@ -9311,13 +9288,13 @@ var require_parser = __commonJS({
9311
9288
  }
9312
9289
  });
9313
9290
 
9314
- // external/npm/node_modules/postcss/lib/parse.js
9291
+ // external/npm/node_modules/critters/node_modules/postcss/lib/parse.js
9315
9292
  var require_parse3 = __commonJS({
9316
- "external/npm/node_modules/postcss/lib/parse.js"(exports, module) {
9293
+ "external/npm/node_modules/critters/node_modules/postcss/lib/parse.js"(exports, module) {
9317
9294
  "use strict";
9318
9295
  var Container = require_container();
9319
- var Parser = require_parser();
9320
9296
  var Input = require_input();
9297
+ var Parser = require_parser();
9321
9298
  function parse(css, opts) {
9322
9299
  let input = new Input(css, opts);
9323
9300
  let parser = new Parser(input);
@@ -9345,19 +9322,111 @@ var require_parse3 = __commonJS({
9345
9322
  }
9346
9323
  });
9347
9324
 
9348
- // external/npm/node_modules/postcss/lib/lazy-result.js
9325
+ // external/npm/node_modules/critters/node_modules/postcss/lib/warning.js
9326
+ var require_warning = __commonJS({
9327
+ "external/npm/node_modules/critters/node_modules/postcss/lib/warning.js"(exports, module) {
9328
+ "use strict";
9329
+ var Warning = class {
9330
+ constructor(text, opts = {}) {
9331
+ this.type = "warning";
9332
+ this.text = text;
9333
+ if (opts.node && opts.node.source) {
9334
+ let range = opts.node.rangeBy(opts);
9335
+ this.line = range.start.line;
9336
+ this.column = range.start.column;
9337
+ this.endLine = range.end.line;
9338
+ this.endColumn = range.end.column;
9339
+ }
9340
+ for (let opt in opts)
9341
+ this[opt] = opts[opt];
9342
+ }
9343
+ toString() {
9344
+ if (this.node) {
9345
+ return this.node.error(this.text, {
9346
+ index: this.index,
9347
+ plugin: this.plugin,
9348
+ word: this.word
9349
+ }).message;
9350
+ }
9351
+ if (this.plugin) {
9352
+ return this.plugin + ": " + this.text;
9353
+ }
9354
+ return this.text;
9355
+ }
9356
+ };
9357
+ module.exports = Warning;
9358
+ Warning.default = Warning;
9359
+ }
9360
+ });
9361
+
9362
+ // external/npm/node_modules/critters/node_modules/postcss/lib/result.js
9363
+ var require_result = __commonJS({
9364
+ "external/npm/node_modules/critters/node_modules/postcss/lib/result.js"(exports, module) {
9365
+ "use strict";
9366
+ var Warning = require_warning();
9367
+ var Result = class {
9368
+ constructor(processor, root, opts) {
9369
+ this.processor = processor;
9370
+ this.messages = [];
9371
+ this.root = root;
9372
+ this.opts = opts;
9373
+ this.css = void 0;
9374
+ this.map = void 0;
9375
+ }
9376
+ toString() {
9377
+ return this.css;
9378
+ }
9379
+ warn(text, opts = {}) {
9380
+ if (!opts.plugin) {
9381
+ if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
9382
+ opts.plugin = this.lastPlugin.postcssPlugin;
9383
+ }
9384
+ }
9385
+ let warning = new Warning(text, opts);
9386
+ this.messages.push(warning);
9387
+ return warning;
9388
+ }
9389
+ warnings() {
9390
+ return this.messages.filter((i) => i.type === "warning");
9391
+ }
9392
+ get content() {
9393
+ return this.css;
9394
+ }
9395
+ };
9396
+ module.exports = Result;
9397
+ Result.default = Result;
9398
+ }
9399
+ });
9400
+
9401
+ // external/npm/node_modules/critters/node_modules/postcss/lib/warn-once.js
9402
+ var require_warn_once = __commonJS({
9403
+ "external/npm/node_modules/critters/node_modules/postcss/lib/warn-once.js"(exports, module) {
9404
+ "use strict";
9405
+ var printed = {};
9406
+ module.exports = function warnOnce(message) {
9407
+ if (printed[message])
9408
+ return;
9409
+ printed[message] = true;
9410
+ if (typeof console !== "undefined" && console.warn) {
9411
+ console.warn(message);
9412
+ }
9413
+ };
9414
+ }
9415
+ });
9416
+
9417
+ // external/npm/node_modules/critters/node_modules/postcss/lib/lazy-result.js
9349
9418
  var require_lazy_result = __commonJS({
9350
- "external/npm/node_modules/postcss/lib/lazy-result.js"(exports, module) {
9419
+ "external/npm/node_modules/critters/node_modules/postcss/lib/lazy-result.js"(exports, module) {
9351
9420
  "use strict";
9352
- var { isClean, my } = require_symbols();
9353
- var MapGenerator = require_map_generator();
9354
- var stringify = require_stringify3();
9355
9421
  var Container = require_container();
9356
9422
  var Document = require_document();
9357
- var warnOnce = require_warn_once();
9358
- var Result = require_result();
9423
+ var MapGenerator = require_map_generator();
9359
9424
  var parse = require_parse3();
9425
+ var Result = require_result();
9360
9426
  var Root = require_root();
9427
+ var stringify = require_stringify3();
9428
+ var { isClean, my } = require_symbols();
9429
+ var warnOnce = require_warn_once();
9361
9430
  var TYPE_TO_CLASS_NAME = {
9362
9431
  atrule: "AtRule",
9363
9432
  comment: "Comment",
@@ -9841,15 +9910,15 @@ var require_lazy_result = __commonJS({
9841
9910
  }
9842
9911
  });
9843
9912
 
9844
- // external/npm/node_modules/postcss/lib/no-work-result.js
9913
+ // external/npm/node_modules/critters/node_modules/postcss/lib/no-work-result.js
9845
9914
  var require_no_work_result = __commonJS({
9846
- "external/npm/node_modules/postcss/lib/no-work-result.js"(exports, module) {
9915
+ "external/npm/node_modules/critters/node_modules/postcss/lib/no-work-result.js"(exports, module) {
9847
9916
  "use strict";
9848
9917
  var MapGenerator = require_map_generator();
9849
- var stringify = require_stringify3();
9850
- var warnOnce = require_warn_once();
9851
9918
  var parse = require_parse3();
9852
9919
  var Result = require_result();
9920
+ var stringify = require_stringify3();
9921
+ var warnOnce = require_warn_once();
9853
9922
  var NoWorkResult = class {
9854
9923
  constructor(processor, css, opts) {
9855
9924
  css = css.toString();
@@ -9959,17 +10028,17 @@ var require_no_work_result = __commonJS({
9959
10028
  }
9960
10029
  });
9961
10030
 
9962
- // external/npm/node_modules/postcss/lib/processor.js
10031
+ // external/npm/node_modules/critters/node_modules/postcss/lib/processor.js
9963
10032
  var require_processor = __commonJS({
9964
- "external/npm/node_modules/postcss/lib/processor.js"(exports, module) {
10033
+ "external/npm/node_modules/critters/node_modules/postcss/lib/processor.js"(exports, module) {
9965
10034
  "use strict";
9966
- var NoWorkResult = require_no_work_result();
9967
- var LazyResult = require_lazy_result();
9968
10035
  var Document = require_document();
10036
+ var LazyResult = require_lazy_result();
10037
+ var NoWorkResult = require_no_work_result();
9969
10038
  var Root = require_root();
9970
10039
  var Processor = class {
9971
10040
  constructor(plugins = []) {
9972
- this.version = "8.4.41";
10041
+ this.version = "8.4.44";
9973
10042
  this.plugins = this.normalize(plugins);
9974
10043
  }
9975
10044
  normalize(plugins) {
@@ -10017,84 +10086,28 @@ var require_processor = __commonJS({
10017
10086
  }
10018
10087
  });
10019
10088
 
10020
- // external/npm/node_modules/postcss/lib/fromJSON.js
10021
- var require_fromJSON = __commonJS({
10022
- "external/npm/node_modules/postcss/lib/fromJSON.js"(exports, module) {
10023
- "use strict";
10024
- var Declaration = require_declaration();
10025
- var PreviousMap = require_previous_map();
10026
- var Comment = require_comment();
10027
- var AtRule = require_at_rule();
10028
- var Input = require_input();
10029
- var Root = require_root();
10030
- var Rule = require_rule();
10031
- function fromJSON(json, inputs) {
10032
- if (Array.isArray(json))
10033
- return json.map((n) => fromJSON(n));
10034
- let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
10035
- if (ownInputs) {
10036
- inputs = [];
10037
- for (let input of ownInputs) {
10038
- let inputHydrated = __spreadProps(__spreadValues({}, input), { __proto__: Input.prototype });
10039
- if (inputHydrated.map) {
10040
- inputHydrated.map = __spreadProps(__spreadValues({}, inputHydrated.map), {
10041
- __proto__: PreviousMap.prototype
10042
- });
10043
- }
10044
- inputs.push(inputHydrated);
10045
- }
10046
- }
10047
- if (defaults.nodes) {
10048
- defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs));
10049
- }
10050
- if (defaults.source) {
10051
- let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
10052
- defaults.source = source;
10053
- if (inputId != null) {
10054
- defaults.source.input = inputs[inputId];
10055
- }
10056
- }
10057
- if (defaults.type === "root") {
10058
- return new Root(defaults);
10059
- } else if (defaults.type === "decl") {
10060
- return new Declaration(defaults);
10061
- } else if (defaults.type === "rule") {
10062
- return new Rule(defaults);
10063
- } else if (defaults.type === "comment") {
10064
- return new Comment(defaults);
10065
- } else if (defaults.type === "atrule") {
10066
- return new AtRule(defaults);
10067
- } else {
10068
- throw new Error("Unknown node type: " + json.type);
10069
- }
10070
- }
10071
- module.exports = fromJSON;
10072
- fromJSON.default = fromJSON;
10073
- }
10074
- });
10075
-
10076
- // external/npm/node_modules/postcss/lib/postcss.js
10089
+ // external/npm/node_modules/critters/node_modules/postcss/lib/postcss.js
10077
10090
  var require_postcss = __commonJS({
10078
- "external/npm/node_modules/postcss/lib/postcss.js"(exports, module) {
10091
+ "external/npm/node_modules/critters/node_modules/postcss/lib/postcss.js"(exports, module) {
10079
10092
  "use strict";
10093
+ var AtRule = require_at_rule();
10094
+ var Comment = require_comment();
10095
+ var Container = require_container();
10080
10096
  var CssSyntaxError = require_css_syntax_error();
10081
10097
  var Declaration = require_declaration();
10082
- var LazyResult = require_lazy_result();
10083
- var Container = require_container();
10084
- var Processor = require_processor();
10085
- var stringify = require_stringify3();
10086
- var fromJSON = require_fromJSON();
10087
10098
  var Document = require_document();
10088
- var Warning = require_warning();
10089
- var Comment = require_comment();
10090
- var AtRule = require_at_rule();
10091
- var Result = require_result();
10099
+ var fromJSON = require_fromJSON();
10092
10100
  var Input = require_input();
10093
- var parse = require_parse3();
10101
+ var LazyResult = require_lazy_result();
10094
10102
  var list = require_list();
10095
- var Rule = require_rule();
10096
- var Root = require_root();
10097
10103
  var Node = require_node2();
10104
+ var parse = require_parse3();
10105
+ var Processor = require_processor();
10106
+ var Result = require_result();
10107
+ var Root = require_root();
10108
+ var Rule = require_rule();
10109
+ var stringify = require_stringify3();
10110
+ var Warning = require_warning();
10098
10111
  function postcss(...plugins) {
10099
10112
  if (plugins.length === 1 && Array.isArray(plugins[0])) {
10100
10113
  plugins = plugins[0];