@putout/bundle 5.3.1 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/putout.js CHANGED
@@ -216,7 +216,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
216
216
 
217
217
  var toString = {}.toString;
218
218
 
219
- var isArray$d = Array.isArray || function (arr) {
219
+ var isArray$e = Array.isArray || function (arr) {
220
220
  return toString.call(arr) == '[object Array]';
221
221
  };
222
222
 
@@ -500,7 +500,7 @@ function fromObject (that, obj) {
500
500
  return fromArrayLike(that, obj)
501
501
  }
502
502
 
503
- if (obj.type === 'Buffer' && isArray$d(obj.data)) {
503
+ if (obj.type === 'Buffer' && isArray$e(obj.data)) {
504
504
  return fromArrayLike(that, obj.data)
505
505
  }
506
506
  }
@@ -565,7 +565,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
565
565
  };
566
566
 
567
567
  Buffer.concat = function concat (list, length) {
568
- if (!isArray$d(list)) {
568
+ if (!isArray$e(list)) {
569
569
  throw new TypeError('"list" argument must be an Array of Buffers')
570
570
  }
571
571
 
@@ -2264,9 +2264,9 @@ __defProp(target, 'default', {
2264
2264
  enumerable: true,
2265
2265
  }) , mod));
2266
2266
 
2267
- // ../babel-babel/node_modules/jsesc/jsesc.js
2267
+ // node_modules/jsesc/jsesc.js
2268
2268
  var require_jsesc = __commonJS({
2269
- '../babel-babel/node_modules/jsesc/jsesc.js'(exports$1, module) {
2269
+ 'node_modules/jsesc/jsesc.js'(exports$1, module) {
2270
2270
 
2271
2271
  var object = {};
2272
2272
  var hasOwnProperty = object.hasOwnProperty;
@@ -2330,6 +2330,10 @@ var require_jsesc = __commonJS({
2330
2330
  return typeof value == 'number' || toString.call(value) == '[object Number]';
2331
2331
  };
2332
2332
 
2333
+ var isBigInt = (value) => {
2334
+ return typeof value == 'bigint';
2335
+ };
2336
+
2333
2337
  var isFunction5 = (value) => {
2334
2338
  return typeof value == 'function';
2335
2339
  };
@@ -2478,32 +2482,41 @@ var require_jsesc = __commonJS({
2478
2482
  }
2479
2483
 
2480
2484
  return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
2481
- } else if (isNumber2(argument)) {
2485
+ } else if (isNumber2(argument) || isBigInt(argument)) {
2482
2486
  if (json) {
2483
- return JSON.stringify(argument);
2487
+ return JSON.stringify(Number(argument));
2484
2488
  }
2485
2489
 
2486
- if (useDecNumbers) {
2487
- return String(argument);
2488
- }
2490
+ let result2;
2489
2491
 
2490
- if (useHexNumbers) {
2492
+ if (useDecNumbers) {
2493
+ result2 = String(argument);
2494
+ } else if (useHexNumbers) {
2491
2495
  let hexadecimal2 = argument.toString(16);
2492
2496
 
2493
2497
  if (!lowercaseHex) {
2494
2498
  hexadecimal2 = hexadecimal2.toUpperCase();
2495
2499
  }
2496
2500
 
2497
- return '0x' + hexadecimal2;
2501
+ result2 = '0x' + hexadecimal2;
2502
+ } else if (useBinNumbers) {
2503
+ result2 = '0b' + argument.toString(2);
2504
+ } else if (useOctNumbers) {
2505
+ result2 = '0o' + argument.toString(8);
2498
2506
  }
2507
+
2499
2508
 
2500
- if (useBinNumbers) {
2501
- return '0b' + argument.toString(2);
2509
+ if (isBigInt(argument)) {
2510
+ return result2 + 'n';
2502
2511
  }
2503
2512
 
2504
- if (useOctNumbers) {
2505
- return '0o' + argument.toString(8);
2513
+ return result2;
2514
+ } else if (isBigInt(argument)) {
2515
+ if (json) {
2516
+ return JSON.stringify(Number(argument));
2506
2517
  }
2518
+
2519
+ return argument + 'n';
2507
2520
  } else if (!isObject(argument)) {
2508
2521
  if (json) {
2509
2522
  return JSON.stringify(argument) || 'null';
@@ -2526,6 +2539,7 @@ var require_jsesc = __commonJS({
2526
2539
  return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
2527
2540
  }
2528
2541
 
2542
+
2529
2543
  }
2530
2544
 
2531
2545
  const regex = options.escapeEverything ? escapeEverythingRegex : escapeNonAsciiRegex;
@@ -2612,7 +2626,7 @@ var require_jsesc = __commonJS({
2612
2626
  },
2613
2627
  });
2614
2628
 
2615
- // ../babel-babel/packages/babel-types/lib/index.js
2629
+ // node_modules/@babel/types/lib/index.js
2616
2630
  var lib_exports = {};
2617
2631
 
2618
2632
  __export(lib_exports, {
@@ -3861,7 +3875,7 @@ __export(lib_exports, {
3861
3875
  yieldExpression: () => yieldExpression,
3862
3876
  });
3863
3877
 
3864
- // ../babel-babel/packages/babel-helper-validator-identifier/lib/index.js
3878
+ // node_modules/@babel/helper-validator-identifier/lib/index.js
3865
3879
  var nonASCIIidentifierStartChars = '\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC';
3866
3880
  var nonASCIIidentifierChars = '\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65';
3867
3881
  var nonASCIIidentifierStart = new RegExp('[' + nonASCIIidentifierStartChars + ']');
@@ -4979,7 +4993,7 @@ function isKeyword$1(word) {
4979
4993
  return keywords$1.has(word);
4980
4994
  }
4981
4995
 
4982
- // ../babel-babel/packages/babel-helper-string-parser/lib/index.js
4996
+ // node_modules/@babel/helper-string-parser/lib/index.js
4983
4997
  var _isDigit = function isDigit(code2) {
4984
4998
  return code2 >= 48 && code2 <= 57;
4985
4999
  };
@@ -5280,7 +5294,7 @@ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
5280
5294
  };
5281
5295
  }
5282
5296
 
5283
- // ../babel-babel/packages/babel-types/lib/index.js
5297
+ // node_modules/@babel/types/lib/index.js
5284
5298
  function shallowEqual(actual, expected) {
5285
5299
  const keys2 = Object.keys(expected);
5286
5300
 
@@ -19090,8 +19104,8 @@ function toExpression$1(node) {
19090
19104
  return node;
19091
19105
  }
19092
19106
 
19093
- var _skip = Symbol();
19094
- var _stop = Symbol();
19107
+ var _skip = /* @__PURE__ */Symbol();
19108
+ var _stop = /* @__PURE__ */Symbol();
19095
19109
 
19096
19110
  function traverseFast(node, enter, opts) {
19097
19111
  if (!node)
@@ -19965,7 +19979,7 @@ var react = {
19965
19979
  buildChildren,
19966
19980
  };
19967
19981
 
19968
- // ../babel-babel/packages/babel-parser/lib/index.js
19982
+ // node_modules/@babel/parser/lib/index.js
19969
19983
  var Position = class {
19970
19984
  line;
19971
19985
  column;
@@ -20418,8 +20432,7 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
20418
20432
  regex = new RegExp(pattern, flags);
20419
20433
  } catch {}
20420
20434
 
20421
-
20422
- const node = this.estreeParseLiteral(regex);
20435
+ const node = this.estreeParseLiteral(regex);
20423
20436
 
20424
20437
  node.regex = {
20425
20438
  pattern,
@@ -20437,8 +20450,7 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
20437
20450
  bigInt = null;
20438
20451
  }
20439
20452
 
20440
-
20441
- const node = this.estreeParseLiteral(bigInt);
20453
+ const node = this.estreeParseLiteral(bigInt);
20442
20454
 
20443
20455
  node.bigint = String(node.value || value);
20444
20456
  return node;
@@ -32087,8 +32099,7 @@ var ExpressionParser = class extends LValParser {
32087
32099
  bigInt = null;
32088
32100
  }
32089
32101
 
32090
-
32091
- const node = this.parseLiteral(bigInt, 'BigIntLiteral');
32102
+ const node = this.parseLiteral(bigInt, 'BigIntLiteral');
32092
32103
 
32093
32104
  return node;
32094
32105
  }
@@ -33077,8 +33088,7 @@ var ExpressionParser = class extends LValParser {
33077
33088
  } finally {
33078
33089
  revertScopes();
33079
33090
  }
33080
-
33081
-
33091
+
33082
33092
  return this.finishNode(node, 'ModuleExpression');
33083
33093
  }
33084
33094
 
@@ -35402,8 +35412,7 @@ function parse$b(input, options) {
35402
35412
  return getParser$1(options, input).parse();
35403
35413
  } catch {}
35404
35414
 
35405
-
35406
- throw moduleError;
35415
+ throw moduleError;
35407
35416
  }
35408
35417
  } else {
35409
35418
  return getParser$1(options, input).parse();
@@ -35474,7 +35483,7 @@ function getParserClass(pluginsMap) {
35474
35483
  return cls;
35475
35484
  }
35476
35485
 
35477
- // ../babel-babel/packages/babel-code-frame/lib/common-BO7XIBW3.js
35486
+ // node_modules/@babel/code-frame/lib/common-BO7XIBW3.js
35478
35487
  var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
35479
35488
 
35480
35489
  function getMarkerLines(loc, source, opts, startLineBaseZero) {
@@ -35632,7 +35641,7 @@ ${frame}`;
35632
35641
  return defs2.reset(frame);
35633
35642
  }
35634
35643
 
35635
- const {styleText = (a, b) => b} = util;// ../babel-babel/node_modules/js-tokens/index.js
35644
+ const {styleText = (a, b) => b} = util;// node_modules/js-tokens/index.js
35636
35645
  var HashbangComment;
35637
35646
  var Identifier2;
35638
35647
  var JSXIdentifier2;
@@ -36142,7 +36151,7 @@ jsTokens = function*(input, {jsx: jsx2 = false} = {}) {
36142
36151
  };
36143
36152
  var js_tokens_default = jsTokens;
36144
36153
 
36145
- // ../babel-babel/packages/babel-code-frame/lib/index.js
36154
+ // node_modules/@babel/code-frame/lib/index.js
36146
36155
  function isColorSupported() {
36147
36156
  return styleText('red', '-') !== '-';
36148
36157
  }
@@ -36321,7 +36330,7 @@ function codeFrameColumns(rawLines, loc, opts = {}) {
36321
36330
  } : void 0);
36322
36331
  }
36323
36332
 
36324
- // ../babel-babel/packages/babel-template/lib/index.js
36333
+ // node_modules/@babel/template/lib/index.js
36325
36334
  var {assertExpressionStatement: assertExpressionStatement2} = lib_exports;
36326
36335
 
36327
36336
  function makeStatementFormatter(fn) {
@@ -36960,7 +36969,7 @@ var index = Object.assign(smart.bind(void 0), {
36960
36969
  ast: smart.ast,
36961
36970
  });
36962
36971
 
36963
- // ../babel-babel/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
36972
+ // node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
36964
36973
  var comma = ','.charCodeAt(0);
36965
36974
  var semicolon = ';'.charCodeAt(0);
36966
36975
  var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -37209,7 +37218,7 @@ function encode(decoded) {
37209
37218
  return writer.flush();
37210
37219
  }
37211
37220
 
37212
- // ../babel-babel/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
37221
+ // node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
37213
37222
  var schemeRegex = /^[\w+.-]+:\/\//;
37214
37223
  var urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
37215
37224
  var fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
@@ -37429,7 +37438,7 @@ case 2:
37429
37438
  }
37430
37439
  }
37431
37440
 
37432
- // ../babel-babel/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
37441
+ // node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
37433
37442
  function stripFilename(path) {
37434
37443
  if (!path)
37435
37444
  return '';
@@ -37701,7 +37710,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
37701
37710
  return index3;
37702
37711
  }
37703
37712
 
37704
- // ../babel-babel/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
37713
+ // node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
37705
37714
  var SetArray = class {
37706
37715
  constructor() {
37707
37716
  this._indexes = {
@@ -37970,7 +37979,7 @@ function addMappingInternal(skipable, map, mapping) {
37970
37979
  return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
37971
37980
  }
37972
37981
 
37973
- // ../babel-babel/packages/babel-generator/lib/index.js
37982
+ // node_modules/@babel/generator/lib/index.js
37974
37983
  var import_jsesc = __toESM(require_jsesc());
37975
37984
 
37976
37985
  var SourceMap = class {
@@ -43815,7 +43824,7 @@ function generate$1(ast, opts = {}, code2) {
43815
43824
  return printer.generate(ast);
43816
43825
  }
43817
43826
 
43818
- // ../babel-babel/node_modules/obug/dist/core.js
43827
+ // node_modules/obug/dist/core.js
43819
43828
  function selectColor$1(colors2, namespace) {
43820
43829
  let hash = 0;
43821
43830
 
@@ -43862,7 +43871,7 @@ function enable$1(namespaces$1) {
43862
43871
  names$1.push(ns);
43863
43872
  }
43864
43873
 
43865
- // ../babel-babel/node_modules/obug/dist/node.js
43874
+ // node_modules/obug/dist/node.js
43866
43875
  var colors$1 = [];
43867
43876
 
43868
43877
  var inspectOpts = {};
@@ -43909,7 +43918,7 @@ function createDebug2(namespace, options) {
43909
43918
  }
43910
43919
 
43911
43920
  enable$1(browser$1.env.DEBUG || '');
43912
- // ../babel-babel/packages/babel-helper-globals/data/builtin-lower.json
43921
+ // node_modules/@babel/helper-globals/data/builtin-lower.json
43913
43922
 
43914
43923
  var builtin_lower_default = [
43915
43924
  'decodeURI',
@@ -43927,7 +43936,7 @@ var builtin_lower_default = [
43927
43936
  'unescape',
43928
43937
  ];
43929
43938
 
43930
- // ../babel-babel/packages/babel-helper-globals/data/builtin-upper.json
43939
+ // node_modules/@babel/helper-globals/data/builtin-upper.json
43931
43940
  var builtin_upper_default = [
43932
43941
  'AggregateError',
43933
43942
  'Array',
@@ -43980,7 +43989,7 @@ var builtin_upper_default = [
43980
43989
  'WeakSet',
43981
43990
  ];
43982
43991
 
43983
- // ../babel-babel/packages/babel-traverse/lib/index.js
43992
+ // node_modules/@babel/traverse/lib/index.js
43984
43993
  var ReferencedIdentifier = [
43985
43994
  'Identifier',
43986
43995
  'JSXIdentifier',
@@ -44515,7 +44524,7 @@ function verify$1(visitor) {
44515
44524
  continue;
44516
44525
 
44517
44526
  if (!TYPES2.includes(nodeType)) {
44518
- throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${'8.0.0-rc.1'}`);
44527
+ throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${'8.0.0-rc.2'}`);
44519
44528
  }
44520
44529
 
44521
44530
  const visitors2 = visitor[nodeType];
@@ -47435,8 +47444,7 @@ function replaceWithSourceString(replacement) {
47435
47444
  throw err;
47436
47445
  }
47437
47446
 
47438
-
47439
- const expressionAST = ast.program.body[0].expression;
47447
+ const expressionAST = ast.program.body[0].expression;
47440
47448
  traverse3.removeProperties(expressionAST);
47441
47449
  return this.replaceWith(expressionAST);
47442
47450
  }
@@ -49098,7 +49106,7 @@ function isExecutionUncertainInList(paths, maxIndex) {
49098
49106
  return false;
49099
49107
  }
49100
49108
 
49101
- var SYMBOL_CHECKING = Symbol();
49109
+ var SYMBOL_CHECKING = /* @__PURE__ */Symbol();
49102
49110
 
49103
49111
  function _guessExecutionStatusRelativeTo(target) {
49104
49112
  return _guessExecutionStatusRelativeToCached(this, target, /* @__PURE__ */new Map());
@@ -52020,12 +52028,12 @@ const ClassDeclaration = {
52020
52028
  },
52021
52029
  };
52022
52030
 
52023
- const {isArray: isArray$c} = Array;
52031
+ const {isArray: isArray$d} = Array;
52024
52032
 
52025
52033
  const parseArgs = (path) => {
52026
52034
  const argsPath = path.get('arguments');
52027
52035
 
52028
- if (!isArray$c(argsPath))
52036
+ if (!isArray$d(argsPath))
52029
52037
  return [];
52030
52038
 
52031
52039
  return argsPath;
@@ -57047,9 +57055,13 @@ const TSDeclareFunction = {
57047
57055
 
57048
57056
  printParams(path, printer, semantics);
57049
57057
 
57050
- print(':');
57051
- print.space();
57052
- print('__returnType');
57058
+ const {returnType} = path.node;
57059
+
57060
+ if (returnType) {
57061
+ print(':');
57062
+ print.space();
57063
+ print('__returnType');
57064
+ }
57053
57065
  }),
57054
57066
  afterIf: (path) => !isInsideDefaultExport(path),
57055
57067
  after: (path, {print}) => {
@@ -58243,15 +58255,14 @@ const isString$c = (a) => typeof a === 'string';
58243
58255
  const constant = (a) => () => a;
58244
58256
  const {keys: keys$3} = Object;
58245
58257
 
58246
- var rendy = (template, values, modifiers) => {
58258
+ const rendy = (template, values, modifiers) => {
58247
58259
  check$e(template, values);
58248
58260
 
58249
58261
  let result = template;
58250
-
58251
- const names = !modifiers ? keys$3(values) : template.match(/{{(.*?)}}/g);
58262
+ const names = keys$3(values) ;
58252
58263
 
58253
58264
  for (const key of names) {
58254
- const [parsedKey, value] = parseValue$1(key, values, modifiers);
58265
+ const [parsedKey, value] = parseValue$1(key, values);
58255
58266
  const str = constant(value);
58256
58267
 
58257
58268
  while (result.includes(parsedKey))
@@ -58273,34 +58284,12 @@ function check$e(template, values) {
58273
58284
  }
58274
58285
 
58275
58286
  function parseValue$1(key, values, modifiers) {
58276
- if (!modifiers)
58277
- return [
58287
+ return [
58278
58288
  `{{ ${key} }}`,
58279
58289
  values[key],
58280
58290
  ];
58281
-
58282
- const preparedKey = key
58283
- .replaceAll('{{', '')
58284
- .replaceAll('}}', '')
58285
- .replaceAll(' ', '');
58286
-
58287
- const value = values[preparedKey] || '';
58288
-
58289
- if (!preparedKey.includes('|'))
58290
- return [key, value];
58291
-
58292
- const [name, modifierName] = preparedKey.split('|');
58293
- const fn = modifiers[modifierName];
58294
- const currentValue = values[name];
58295
-
58296
- if (!fn)
58297
- return [key, currentValue];
58298
-
58299
- return [key, fn(currentValue)];
58300
58291
  }
58301
58292
 
58302
- var rendy$1 = rendy.default;
58303
-
58304
58293
  var maybeSatisfy = (plugin) => {
58305
58294
  if (!plugin.afterSatisfy && !plugin.beforeSatisfy && !plugin.satisfy)
58306
58295
  return plugin;
@@ -58338,7 +58327,7 @@ const maybeThrow = (a, path, b) => {
58338
58327
  if (!a)
58339
58328
  return;
58340
58329
 
58341
- throw Error(rendy$1(b, {
58330
+ throw Error(rendy(b, {
58342
58331
  path,
58343
58332
  type: path.type,
58344
58333
  }));
@@ -59090,12 +59079,12 @@ const print$1 = (ast, options) => {
59090
59079
  return alignSpaces(code);
59091
59080
  };
59092
59081
 
59093
- const {isArray: isArray$b} = Array;
59082
+ const {isArray: isArray$c} = Array;
59094
59083
 
59095
- const maybeArray$4 = (a) => isArray$b(a) ? a : [a, {}];
59084
+ const maybeArray$5 = (a) => isArray$c(a) ? a : [a, {}];
59096
59085
 
59097
59086
  const print = (ast, options = {}) => {
59098
- const [printer = 'putout', printerOptions] = maybeArray$4(options.printer);
59087
+ const [printer = 'putout', printerOptions] = maybeArray$5(options.printer);
59099
59088
 
59100
59089
  if (printer === 'babel')
59101
59090
  return print$1(ast, {
@@ -60657,7 +60646,7 @@ function buildPluginsDirs(name) {
60657
60646
  }
60658
60647
 
60659
60648
  const isStr$2 = (a) => typeof a === 'string';
60660
- const {isArray: isArray$a} = Array;
60649
+ const {isArray: isArray$b} = Array;
60661
60650
  const {entries: entries$a} = Object;
60662
60651
 
60663
60652
  const parsePluginNames = (plugins) => {
@@ -60669,7 +60658,7 @@ const parsePluginNames = (plugins) => {
60669
60658
  continue;
60670
60659
  }
60671
60660
 
60672
- if (isArray$a(plugin)) {
60661
+ if (isArray$b(plugin)) {
60673
60662
  const [pluginName, fn] = plugin;
60674
60663
  result.push([pluginName, fn]);
60675
60664
  continue;
@@ -60681,7 +60670,7 @@ const parsePluginNames = (plugins) => {
60681
60670
  return result;
60682
60671
  };
60683
60672
 
60684
- const {isArray: isArray$9} = Array;
60673
+ const {isArray: isArray$a} = Array;
60685
60674
  const isBool$1 = (a) => typeof a === 'boolean';
60686
60675
  const isStr$1 = (a) => typeof a === 'string';
60687
60676
  const isObj = (a) => typeof a === 'object';
@@ -60735,7 +60724,7 @@ const parseRules = (rules) => {
60735
60724
  continue;
60736
60725
  }
60737
60726
 
60738
- const looksLikeArray = isArray$9(value);
60727
+ const looksLikeArray = isArray$a(value);
60739
60728
  const looksLikeNormalArray = looksLikeArray && value.length;
60740
60729
 
60741
60730
  if (looksLikeNormalArray) {
@@ -60798,7 +60787,7 @@ function validateState(rule, value) {
60798
60787
  }
60799
60788
 
60800
60789
  function check$9(rules) {
60801
- if (isArray$9(rules))
60790
+ if (isArray$a(rules))
60802
60791
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
60803
60792
  }
60804
60793
 
@@ -60982,8 +60971,8 @@ var validatePlugin = ({plugin, rule}) => {
60982
60971
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
60983
60972
  };
60984
60973
 
60985
- const {isArray: isArray$8} = Array;
60986
- const maybeTuple = (a) => isArray$8(a) ? a : ['on', a];
60974
+ const {isArray: isArray$9} = Array;
60975
+ const maybeTuple = (a) => isArray$9(a) ? a : ['on', a];
60987
60976
 
60988
60977
  // Would be great to have ability to filter
60989
60978
  // disabled plugins and prevent them from loading
@@ -61118,7 +61107,7 @@ function parseRuleName(rule) {
61118
61107
  return rule;
61119
61108
  }
61120
61109
 
61121
- const {isArray: isArray$7} = Array;
61110
+ const {isArray: isArray$8} = Array;
61122
61111
 
61123
61112
  const loadPlugins = (options) => {
61124
61113
  check$8(options);
@@ -61150,7 +61139,7 @@ const parseRule = (rule) => rule
61150
61139
  .replace('import:@putout/plugin-', '')
61151
61140
  .replace('@putout/plugin-', '');
61152
61141
 
61153
- const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
61142
+ const maybeFromTuple = (a) => isArray$8(a) ? a[1] : a;
61154
61143
 
61155
61144
  function loadAllPlugins({items, loadedRules}) {
61156
61145
  const plugins = [];
@@ -61565,14 +61554,14 @@ function validatePath(path) {
61565
61554
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
61566
61555
  }
61567
61556
 
61568
- const {isArray: isArray$6} = Array;
61569
- const maybeArray$2 = (a) => isArray$6(a) ? a : [a];
61557
+ const {isArray: isArray$7} = Array;
61558
+ const maybeArray$3 = (a) => isArray$7(a) ? a : [a];
61570
61559
 
61571
- var maybeArray$3 = (a) => {
61560
+ var maybeArray$4 = (a) => {
61572
61561
  if (!a)
61573
61562
  return [];
61574
61563
 
61575
- return maybeArray$2(a);
61564
+ return maybeArray$3(a);
61576
61565
  };
61577
61566
 
61578
61567
  const isFn$3 = (a) => typeof a === 'function';
@@ -61680,11 +61669,11 @@ const parse$3 = (name, plugin, options) => {
61680
61669
 
61681
61670
  if (plugin[name]) {
61682
61671
  validate(name, plugin[name]);
61683
- list.push(...maybeArray$3(plugin[name]()));
61672
+ list.push(...maybeArray$4(plugin[name]()));
61684
61673
  }
61685
61674
 
61686
61675
  if (options[name])
61687
- list.push(...maybeArray$3(options[name]));
61676
+ list.push(...maybeArray$4(options[name]));
61688
61677
 
61689
61678
  return list;
61690
61679
  };
@@ -62063,7 +62052,7 @@ const isBool = (a, b) => {
62063
62052
  };
62064
62053
 
62065
62054
  const isEqualType = (a, b) => a.type === b.type;
62066
- const {isArray: isArray$5} = Array;
62055
+ const {isArray: isArray$6} = Array;
62067
62056
 
62068
62057
  const isAny = (a) => {
62069
62058
  if (isIdentifier$4(a, {name: ANY}))
@@ -62082,7 +62071,7 @@ const isAnyLiteral = (a, b) => {
62082
62071
  };
62083
62072
 
62084
62073
  const isArgs = (a) => {
62085
- const b = !isArray$5(a) ? a : a[0];
62074
+ const b = !isArray$6(a) ? a : a[0];
62086
62075
 
62087
62076
  return isIdentifier$4(b, {
62088
62077
  name: ARGS,
@@ -62112,12 +62101,12 @@ const isEqualTypeParams = (a, b) => {
62112
62101
  };
62113
62102
 
62114
62103
  const isLinkedArgs = (a) => {
62115
- const b = !isArray$5(a) ? a : a[0];
62104
+ const b = !isArray$6(a) ? a : a[0];
62116
62105
  return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
62117
62106
  };
62118
62107
 
62119
62108
  const isJSXChildren = (a) => {
62120
- const b = !isArray$5(a) ? a : a[0];
62109
+ const b = !isArray$6(a) ? a : a[0];
62121
62110
 
62122
62111
  return isJSXText$2(b, {
62123
62112
  value: JSX_CHILDREN,
@@ -62125,7 +62114,7 @@ const isJSXChildren = (a) => {
62125
62114
  };
62126
62115
 
62127
62116
  const isJSXAttributes = (a) => {
62128
- const b = !isArray$5(a) ? a : a[0];
62117
+ const b = !isArray$6(a) ? a : a[0];
62129
62118
 
62130
62119
  if (!isJSXAttribute$1(b))
62131
62120
  return false;
@@ -62162,21 +62151,21 @@ const isObject$4 = (a) => {
62162
62151
  if (!a)
62163
62152
  return false;
62164
62153
 
62165
- if (isArray$5(a))
62154
+ if (isArray$6(a))
62166
62155
  return false;
62167
62156
 
62168
62157
  return typeof a === 'object';
62169
62158
  };
62170
62159
 
62171
62160
  const isArrays = (a, b) => {
62172
- if (!isArray$5(a) || !isArray$5(b))
62161
+ if (!isArray$6(a) || !isArray$6(b))
62173
62162
  return false;
62174
62163
 
62175
62164
  return a.length === b.length;
62176
62165
  };
62177
62166
 
62178
62167
  const isImports = (a) => {
62179
- const b = !isArray$5(a) ? a : a[0];
62168
+ const b = !isArray$6(a) ? a : a[0];
62180
62169
 
62181
62170
  if (!isImportDefaultSpecifier(b))
62182
62171
  return false;
@@ -62187,7 +62176,7 @@ const isImports = (a) => {
62187
62176
  };
62188
62177
 
62189
62178
  const isExports = (a) => {
62190
- const b = !isArray$5(a) ? a : a[0];
62179
+ const b = !isArray$6(a) ? a : a[0];
62191
62180
 
62192
62181
  if (isExportSpecifier(b))
62193
62182
  return isIdentifier$4(b.local, {
@@ -62488,7 +62477,7 @@ const createDebug = (namespace) => {
62488
62477
 
62489
62478
  const debug$3 = createDebug('putout:compare');
62490
62479
 
62491
- const {isArray: isArray$4} = Array;
62480
+ const {isArray: isArray$5} = Array;
62492
62481
  const isObject$3 = (a) => a && typeof a === 'object';
62493
62482
 
62494
62483
  var log$4 = (a, b) => {
@@ -62502,7 +62491,7 @@ var log$4 = (a, b) => {
62502
62491
  };
62503
62492
 
62504
62493
  function parseValue(a) {
62505
- if (isArray$4(a) && a[0]) {
62494
+ if (isArray$5(a) && a[0]) {
62506
62495
  const [{
62507
62496
  type,
62508
62497
  name,
@@ -62772,13 +62761,13 @@ const {extractExpression} = template$1;
62772
62761
  const addWaterMark = (a) => a;
62773
62762
 
62774
62763
  const {keys: keys$2} = Object;
62775
- const {isArray: isArray$3} = Array;
62764
+ const {isArray: isArray$4} = Array;
62776
62765
  const noop$1 = () => {};
62777
- const isEmptyArray = (a) => isArray$3(a) && !a.length;
62766
+ const isEmptyArray = (a) => isArray$4(a) && !a.length;
62778
62767
 
62779
62768
  const compareType = (type) => (path) => path.type === type;
62780
62769
  const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
62781
- const maybeArray$1 = (a) => isArray$3(a) ? a : [a];
62770
+ const maybeArray$2 = (a) => isArray$4(a) ? a : [a];
62782
62771
 
62783
62772
  const findParent = (path, type) => {
62784
62773
  const newPathNode = path.findParent(compareType(type));
@@ -62836,7 +62825,7 @@ function compare(path, template, options = {}, equal = noop$1) {
62836
62825
  }
62837
62826
 
62838
62827
  const compareAny = (path, templateNodes, options) => {
62839
- templateNodes = maybeArray$1(templateNodes);
62828
+ templateNodes = maybeArray$2(templateNodes);
62840
62829
 
62841
62830
  for (const template of templateNodes) {
62842
62831
  if (compare(path, template, options))
@@ -62847,7 +62836,7 @@ const compareAny = (path, templateNodes, options) => {
62847
62836
  };
62848
62837
 
62849
62838
  const compareAll = (path, templateNodes, options) => {
62850
- templateNodes = maybeArray$1(templateNodes);
62839
+ templateNodes = maybeArray$2(templateNodes);
62851
62840
 
62852
62841
  for (const template of templateNodes) {
62853
62842
  if (!compare(path, template, options))
@@ -62943,8 +62932,8 @@ const exclude = ({rule, tmpl, fn, nodesExclude}) => {
62943
62932
 
62944
62933
  var template = ({rule, visitor, options}) => {
62945
62934
  const parsed = [];
62946
- const nodesExclude = maybeArray$3(options.exclude);
62947
- const nodesInclude = maybeArray$3(options.include);
62935
+ const nodesExclude = maybeArray$4(options.exclude);
62936
+ const nodesInclude = maybeArray$4(options.include);
62948
62937
 
62949
62938
  for (const [tmpl, fn] of entries$5(visitor)) {
62950
62939
  if (!tmpl)
@@ -63562,7 +63551,7 @@ const include$1 = ({rule, plugin, msg, options}) => {
63562
63551
  ...options,
63563
63552
  exclude: [
63564
63553
  ...exclude(),
63565
- ...maybeArray$3(options.exclude),
63554
+ ...maybeArray$4(options.exclude),
63566
63555
  ],
63567
63556
  },
63568
63557
  plugin: {
@@ -63616,7 +63605,7 @@ function check$4(fn) {
63616
63605
  var wraptile$1 = wraptile;
63617
63606
 
63618
63607
  const {entries: entries$4} = Object;
63619
- const {isArray: isArray$2} = Array;
63608
+ const {isArray: isArray$3} = Array;
63620
63609
 
63621
63610
  var findPath = (parentPath) => {
63622
63611
  let current = {
@@ -63638,7 +63627,7 @@ function findKey(path, parent) {
63638
63627
  let value;
63639
63628
 
63640
63629
  for ([key, value] of entries$4(parent)) {
63641
- if (isArray$2(value)) {
63630
+ if (isArray$3(value)) {
63642
63631
  const index = value.indexOf(node);
63643
63632
 
63644
63633
  if (index >= 0)
@@ -63774,7 +63763,7 @@ const replace = ({rule, plugin, msg, options}) => {
63774
63763
  ...options,
63775
63764
  exclude: [
63776
63765
  ...exclude(),
63777
- ...maybeArray$3(options.exclude),
63766
+ ...maybeArray$4(options.exclude),
63778
63767
  ],
63779
63768
  },
63780
63769
  plugin: {
@@ -63799,7 +63788,7 @@ const parseExpression = (nodeFrom, {node}) => {
63799
63788
  return node;
63800
63789
  };
63801
63790
 
63802
- const fix$9 = (from, to, path) => {
63791
+ const fix$a = (from, to, path) => {
63803
63792
  const nodeFrom = template$1.ast(from);
63804
63793
  const mark = watermark(from, to, path);
63805
63794
 
@@ -63854,7 +63843,7 @@ const getFix = (items, match) => (path) => {
63854
63843
  const matchFn = match[from];
63855
63844
 
63856
63845
  if (!matchFn || runMatch(path, nodeFrom, matchFn))
63857
- fix$9(from, to, path);
63846
+ fix$a(from, to, path);
63858
63847
  }
63859
63848
  }
63860
63849
  };
@@ -63997,13 +63986,13 @@ const TS_EXCLUDE = [
63997
63986
  ];
63998
63987
 
63999
63988
  const declare$1 = (declarations) => ({
64000
- report: report$4,
63989
+ report: report$5,
64001
63990
  include,
64002
- fix: fix$8(declarations),
63991
+ fix: fix$9(declarations),
64003
63992
  filter: filter(declarations),
64004
63993
  });
64005
63994
 
64006
- const report$4 = (path) => {
63995
+ const report$5 = (path) => {
64007
63996
  const {name} = path.node;
64008
63997
  const peaceOfName = cutName(name);
64009
63998
 
@@ -64043,7 +64032,7 @@ const filter = (declarations) => (path, {options}) => {
64043
64032
  return parseCode(type, allDeclarations[name]);
64044
64033
  };
64045
64034
 
64046
- const fix$8 = (declarations) => (path, {options}) => {
64035
+ const fix$9 = (declarations) => (path, {options}) => {
64047
64036
  const type = getModuleType(path);
64048
64037
 
64049
64038
  const allDeclarations = {
@@ -64352,8 +64341,11 @@ const {
64352
64341
  } = lib_exports;
64353
64342
 
64354
64343
  const isString$1 = (a) => typeof a === 'string';
64355
- const {isArray: isArray$1} = Array;
64356
- const maybeArray = (a) => isArray$1(a) ? a : [a];
64344
+ const isSet = (a) => a instanceof Set;
64345
+ const {isArray: isArray$2} = Array;
64346
+
64347
+ const maybeArray$1 = (a) => isArray$2(a) ? a : [a];
64348
+ const maybeArrayFrom = (a) => isSet(a) ? Array.from(a) : maybeArray$1(a);
64357
64349
 
64358
64350
  const escape = (a) => encodeURIComponent(a).replaceAll('%', '+');
64359
64351
  const unescape = (a) => decodeURIComponent(a.replaceAll('+', '%'));
@@ -64421,7 +64413,7 @@ function parseFindFileOptions(options) {
64421
64413
  excluded: [],
64422
64414
  };
64423
64415
 
64424
- if (isArray$1(options))
64416
+ if (isArray$2(options))
64425
64417
  return {
64426
64418
  exclude: options,
64427
64419
  };
@@ -64437,8 +64429,8 @@ function findFile(node, name, options) {
64437
64429
 
64438
64430
  checkName(name);
64439
64431
 
64440
- const filePaths = [];
64441
- const names = maybeArray(name);
64432
+ const filePaths = new Set();
64433
+ const names = maybeArrayFrom(name);
64442
64434
 
64443
64435
  for (const filenamePath of crawled) {
64444
64436
  const {value} = filenamePath.node.value;
@@ -64456,17 +64448,17 @@ function findFile(node, name, options) {
64456
64448
  if (excluded)
64457
64449
  continue;
64458
64450
 
64459
- filePaths.push(path);
64451
+ filePaths.add(path);
64460
64452
  }
64461
64453
  }
64462
64454
  }
64463
64455
 
64464
- return filePaths;
64456
+ return Array.from(filePaths);
64465
64457
  }
64466
64458
 
64467
64459
  function checkName(name) {
64468
- if (!isString$1(name) && !isArray$1(name))
64469
- throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
64460
+ if (!isString$1(name) && !isArray$2(name) && !isSet(name))
64461
+ throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[] | Set<string>): FilePath'`);
64470
64462
  }
64471
64463
 
64472
64464
  function getFilenamePath(filePath) {
@@ -64793,7 +64785,7 @@ function getRootDirectory(path) {
64793
64785
  }
64794
64786
 
64795
64787
  function getFile(directoryPath, name, {type} = {}) {
64796
- const names = maybeArray(name);
64788
+ const names = maybeArray$1(name);
64797
64789
  const files = new Map();
64798
64790
  let count = 0;
64799
64791
 
@@ -64863,7 +64855,7 @@ function parseContent(node, path) {
64863
64855
  throw Error(`☝️ Looks like wrong content type: '${node.type}' from file: '${path}'`);
64864
64856
  }
64865
64857
 
64866
- const fix$7 = (path) => {
64858
+ const fix$8 = (path) => {
64867
64859
  const array = arrayExpression$1([]);
64868
64860
 
64869
64861
  for (const element of path.get('elements')) {
@@ -64977,7 +64969,7 @@ function check$3(filename) {
64977
64969
 
64978
64970
  var fromSimple = /*#__PURE__*/Object.freeze({
64979
64971
  __proto__: null,
64980
- fix: fix$7,
64972
+ fix: fix$8,
64981
64973
  traverse: traverse$2
64982
64974
  });
64983
64975
 
@@ -64986,10 +64978,10 @@ const {
64986
64978
  arrayExpression,
64987
64979
  } = lib_exports;
64988
64980
 
64989
- const {isArray} = Array;
64981
+ const {isArray: isArray$1} = Array;
64990
64982
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
64991
64983
 
64992
- const fix$6 = (root, {files}) => {
64984
+ const fix$7 = (root, {files}) => {
64993
64985
  const names = [];
64994
64986
 
64995
64987
  for (const file of files) {
@@ -65014,7 +65006,7 @@ const fix$6 = (root, {files}) => {
65014
65006
  const list = [];
65015
65007
 
65016
65008
  for (const name of names) {
65017
- if (isArray(name)) {
65009
+ if (isArray$1(name)) {
65018
65010
  list.push(arrayExpression([
65019
65011
  stringLiteral$3(name[0]),
65020
65012
  stringLiteral$3(name[1]),
@@ -65041,7 +65033,7 @@ const traverse$1 = ({push}) => ({
65041
65033
 
65042
65034
  var toSimple = /*#__PURE__*/Object.freeze({
65043
65035
  __proto__: null,
65044
- fix: fix$6,
65036
+ fix: fix$7,
65045
65037
  traverse: traverse$1
65046
65038
  });
65047
65039
 
@@ -71644,15 +71636,15 @@ const isCall = (path) => {
71644
71636
  return isCallExpression(path.find(isCallOrStatement));
71645
71637
  };
71646
71638
 
71647
- const report$3 = ({name}) => `Argument '${name}' is missing`;
71639
+ const report$4 = ({name}) => `Argument '${name}' is missing`;
71648
71640
 
71649
71641
  const addArgs = (args) => ({
71650
- report: report$3,
71651
- fix: fix$5,
71642
+ report: report$4,
71643
+ fix: fix$6,
71652
71644
  traverse: traverse(args),
71653
71645
  });
71654
71646
 
71655
- const fix$5 = ({declaration, path, pattern, params, index}) => {
71647
+ const fix$6 = ({declaration, path, pattern, params, index}) => {
71656
71648
  const declarationNode = template$1.ast.fresh(declaration);
71657
71649
 
71658
71650
  if (isSequenceExpression(declarationNode)) {
@@ -71905,7 +71897,7 @@ const {join} = path;
71905
71897
 
71906
71898
  const isObject$1 = (a) => a && typeof a === 'object';
71907
71899
  const {entries} = Object;
71908
- const report$2 = (path, {message}) => message;
71900
+ const report$3 = (path, {message}) => message;
71909
71901
 
71910
71902
  const matchFiles = (options) => {
71911
71903
  const {filename} = options;
@@ -71914,20 +71906,20 @@ const matchFiles = (options) => {
71914
71906
 
71915
71907
  check(files);
71916
71908
 
71917
- const scan = createScan$2({
71909
+ const scan = createScan$3({
71918
71910
  defaultFilename: filename,
71919
71911
  files,
71920
71912
  exclude,
71921
71913
  });
71922
71914
 
71923
71915
  return {
71924
- fix: fix$4,
71916
+ fix: fix$5,
71925
71917
  scan,
71926
- report: report$2,
71918
+ report: report$3,
71927
71919
  };
71928
71920
  };
71929
71921
 
71930
- function fix$4(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options, rawOptions}) {
71922
+ function fix$5(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options, rawOptions}) {
71931
71923
  transform(matchedAST, matchedJS, options);
71932
71924
 
71933
71925
  const matchedJSON = magicPrint(outputFilename, matchedAST, rawOptions);
@@ -71944,7 +71936,7 @@ function fix$4(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJ
71944
71936
  removeFile(inputFile);
71945
71937
  }
71946
71938
 
71947
- const createScan$2 = ({files, exclude, defaultFilename}) => (mainPath, {push, progress, options}) => {
71939
+ const createScan$3 = ({files, exclude, defaultFilename}) => (mainPath, {push, progress, options}) => {
71948
71940
  const allFiles = [];
71949
71941
  const cwd = getFilename(mainPath);
71950
71942
 
@@ -72099,13 +72091,13 @@ function parseOptions(inputFilename, rawOptions) {
72099
72091
 
72100
72092
  const {parse: parse$2} = JSON;
72101
72093
 
72102
- const report$1 = (file, {from, to}) => `Rename '${from}' to '${to}'`;
72094
+ const report$2 = (file, {from, to}) => `Rename '${from}' to '${to}'`;
72103
72095
 
72104
- const fix$3 = (file, {to}) => {
72096
+ const fix$4 = (file, {to}) => {
72105
72097
  renameFile(file, to);
72106
72098
  };
72107
72099
 
72108
- const createScan$1 = ({type, mask, rename} = {}) => (path, {push, trackFile}) => {
72100
+ const createScan$2 = ({type, mask, rename} = {}) => (path, {push, trackFile}) => {
72109
72101
  for (const file of trackFile(path, mask)) {
72110
72102
  if (type && !checkType(type, file))
72111
72103
  continue;
@@ -72154,28 +72146,28 @@ function findUpPackage(file) {
72154
72146
 
72155
72147
  var renameFileWithFn = /*#__PURE__*/Object.freeze({
72156
72148
  __proto__: null,
72157
- createScan: createScan$1,
72158
- fix: fix$3,
72159
- report: report$1
72149
+ createScan: createScan$2,
72150
+ fix: fix$4,
72151
+ report: report$2
72160
72152
  });
72161
72153
 
72162
72154
  const returns = (a) => () => a;
72163
72155
 
72164
- const report = (path, {mask, from, to}) => {
72156
+ const report$1 = (path, {mask, from, to}) => {
72165
72157
  if (!mask)
72166
72158
  return `Rename '${from}' to '${to}'`;
72167
72159
 
72168
72160
  return `Rename '${mask}' to '${mask.replace(from, to)}'`;
72169
72161
  };
72170
72162
 
72171
- const fix$2 = (path, {from, to}) => {
72163
+ const fix$3 = (path, {from, to}) => {
72172
72164
  const filename = getFilename(path);
72173
72165
  const newFilename = filename.replace(from, to);
72174
72166
 
72175
72167
  renameFile(path, newFilename);
72176
72168
  };
72177
72169
 
72178
- const createScan = (baseOptions) => (rootPath, {push, options, trackFile}) => {
72170
+ const createScan$1 = (baseOptions) => (rootPath, {push, options, trackFile}) => {
72179
72171
  const from = options.from || baseOptions.from;
72180
72172
  const to = options.to || baseOptions.to;
72181
72173
  const mask = options.mask || baseOptions.mask;
@@ -72215,9 +72207,9 @@ const createCheckNear = (near) => (file) => {
72215
72207
 
72216
72208
  var renameFileByMask = /*#__PURE__*/Object.freeze({
72217
72209
  __proto__: null,
72218
- createScan: createScan,
72219
- fix: fix$2,
72220
- report: report
72210
+ createScan: createScan$1,
72211
+ fix: fix$3,
72212
+ report: report$1
72221
72213
  });
72222
72214
 
72223
72215
  const renameFiles = ({type, mask, rename, from, to, near} = {}) => {
@@ -74354,9 +74346,11 @@ var picomatch$1 = picomatch_1.default;
74354
74346
  const {stringLiteral: stringLiteral$1} = lib_exports;
74355
74347
  const getValue = ({node}) => node.value;
74356
74348
 
74349
+ const difference$1 = (a, b) => new Set(a).difference(new Set(b));
74350
+
74357
74351
  const ignore = ({name, property, list, type = __ignore}) => ({
74358
74352
  report: createReport$1(name),
74359
- fix: fix$1,
74353
+ fix: fix$2,
74360
74354
  traverse: createTraverse$1({
74361
74355
  type,
74362
74356
  property,
@@ -74381,7 +74375,7 @@ const createReport$1 = (filename) => ({name, matchedElements}) => {
74381
74375
  return `Add '${name}'${insteadOf} to '${filename}'`;
74382
74376
  };
74383
74377
 
74384
- const fix$1 = ({path, name, matchedElements}) => {
74378
+ const fix$2 = ({path, name, matchedElements}) => {
74385
74379
  path.node.elements.push(stringLiteral$1(name));
74386
74380
  matchedElements.map(remove);
74387
74381
  };
@@ -74404,10 +74398,7 @@ const createTraverse$1 = ({type, property, list}) => ({push, options}) => {
74404
74398
 
74405
74399
  const list = elements.map(getValue);
74406
74400
 
74407
- for (const name of newNames) {
74408
- if (list.includes(name))
74409
- continue;
74410
-
74401
+ for (const name of difference$1(newNames, list)) {
74411
74402
  const match = picomatch$1(name);
74412
74403
  const matchedElements = [];
74413
74404
 
@@ -74547,7 +74538,7 @@ const sortIgnore = ({name, property, type = __ignore}) => ({
74547
74538
  name,
74548
74539
  property,
74549
74540
  }),
74550
- fix,
74541
+ fix: fix$1,
74551
74542
  traverse: createTraverse({
74552
74543
  type,
74553
74544
  property,
@@ -74561,17 +74552,12 @@ const createReport = ({name, property}) => () => {
74561
74552
  return `Sort '${name}'`;
74562
74553
  };
74563
74554
 
74564
- const fix = ({path, sortedElements}) => {
74555
+ const fix$1 = ({path, sortedElements}) => {
74565
74556
  path.node.elements = sortedElements;
74566
74557
  };
74567
74558
 
74568
74559
  const createTraverse = ({type, property}) => ({push}) => ({
74569
74560
  [type]: (path) => {
74570
- const masks = [];
74571
- const hidden = [];
74572
- const files = [];
74573
- const dirs = [];
74574
-
74575
74561
  const parentOfElements = parseElements(path, {
74576
74562
  property,
74577
74563
  });
@@ -74581,39 +74567,9 @@ const createTraverse = ({type, property}) => ({push}) => ({
74581
74567
 
74582
74568
  const {elements} = parentOfElements.node;
74583
74569
 
74584
- for (const element of elements) {
74585
- const {value} = element;
74586
-
74587
- if (!value)
74588
- continue;
74589
-
74590
- if (value.startsWith('*')) {
74591
- masks.push(element);
74592
- continue;
74593
- }
74594
-
74595
- if (value.startsWith('.')) {
74596
- hidden.push(element);
74597
- continue;
74598
- }
74599
-
74600
- if (value.includes('.')) {
74601
- files.push(element);
74602
- continue;
74603
- }
74604
-
74605
- if (value.startsWith('#'))
74606
- continue;
74607
-
74608
- dirs.push(element);
74609
- }
74610
-
74611
- const sortedElements = [
74612
- ...maybeSeparate(masks, property),
74613
- ...maybeSeparate(hidden, property),
74614
- ...maybeSeparate(files, property),
74615
- ...dirs,
74616
- ];
74570
+ const sortedElements = cleverSort(elements, {
74571
+ separate: !property,
74572
+ });
74617
74573
 
74618
74574
  for (const [index, {value}] of elements.entries()) {
74619
74575
  const current = sortedElements[index];
@@ -74647,8 +74603,93 @@ function parseElements(path, {property}) {
74647
74603
  return prop.get('value');
74648
74604
  }
74649
74605
 
74650
- function maybeSeparate(array, property) {
74651
- if (property)
74606
+ function cleverSort(elements, {separate}) {
74607
+ const twoStars = [];
74608
+ const noStars = [];
74609
+
74610
+ for (const element of elements) {
74611
+ const {value} = element;
74612
+
74613
+ if (value.startsWith('**/')) {
74614
+ twoStars.push(element);
74615
+ continue;
74616
+ }
74617
+
74618
+ noStars.push(element);
74619
+ }
74620
+
74621
+ const sortedElements = [
74622
+ ...sortElements(twoStars, {
74623
+ separate,
74624
+ }),
74625
+ ...sortElements(noStars, {
74626
+ separate,
74627
+ }),
74628
+ ];
74629
+
74630
+ if (!sortedElements.length)
74631
+ return elements;
74632
+
74633
+ if (!sortedElements.at(-1).value)
74634
+ return sortedElements.slice(0, -1);
74635
+
74636
+ return sortedElements;
74637
+ }
74638
+
74639
+ function sortElements(elements, {separate} = {}) {
74640
+ const masks = [];
74641
+ const hidden = [];
74642
+ const files = [];
74643
+ const dirs = [];
74644
+ const allowed = [];
74645
+
74646
+ for (const element of elements) {
74647
+ const value = cutStars(element);
74648
+
74649
+ if (!value)
74650
+ continue;
74651
+
74652
+ if (value.startsWith('*')) {
74653
+ masks.push(element);
74654
+ continue;
74655
+ }
74656
+
74657
+ if (value.startsWith('.')) {
74658
+ hidden.push(element);
74659
+ continue;
74660
+ }
74661
+
74662
+ if (value.startsWith('!')) {
74663
+ allowed.push(element);
74664
+ continue;
74665
+ }
74666
+
74667
+ if (value.includes('.')) {
74668
+ files.push(element);
74669
+ continue;
74670
+ }
74671
+
74672
+ if (value.startsWith('#'))
74673
+ continue;
74674
+
74675
+ dirs.push(element);
74676
+ }
74677
+
74678
+ const sortedElements = [
74679
+ masks,
74680
+ hidden,
74681
+ files,
74682
+ dirs,
74683
+ allowed,
74684
+ ];
74685
+
74686
+ return sortedElements.flatMap(maybeSeparate({
74687
+ separate,
74688
+ }));
74689
+ }
74690
+
74691
+ const maybeSeparate = ({separate} = {}) => (array) => {
74692
+ if (!separate)
74652
74693
  return array;
74653
74694
 
74654
74695
  if (!array.length)
@@ -74658,7 +74699,54 @@ function maybeSeparate(array, property) {
74658
74699
  ...array,
74659
74700
  stringLiteral(''),
74660
74701
  ];
74661
- }
74702
+ };
74703
+
74704
+ const cutStars = ({value}) => {
74705
+ if (!value)
74706
+ return '';
74707
+
74708
+ if (value.startsWith('**/'))
74709
+ return value.slice(3);
74710
+
74711
+ return value;
74712
+ };
74713
+
74714
+ const difference = (a, b) => new Set(a).difference(new Set(b));
74715
+ const {isArray} = Array;
74716
+ const maybeArray = (a) => isArray(a) ? a : [a];
74717
+
74718
+ const report = (file) => `Remove files: '${getFilename(file)}'`;
74719
+
74720
+ const fix = (file) => {
74721
+ removeFile(file);
74722
+ };
74723
+
74724
+ const removeFiles = (defaultNames) => ({
74725
+ report,
74726
+ fix,
74727
+ scan: createScan(defaultNames),
74728
+ });
74729
+
74730
+ const createScan = (defaultNames = []) => (path, {push, trackFile, options}) => {
74731
+ const {names, dismiss} = options;
74732
+ const allNames = [
74733
+ maybeArray(defaultNames),
74734
+ maybeArray(names),
74735
+ ];
74736
+
74737
+ const flatNames = allNames
74738
+ .flat()
74739
+ .filter(Boolean);
74740
+
74741
+ if (!flatNames.length)
74742
+ return;
74743
+
74744
+ for (const file of trackFile(path, difference(flatNames, dismiss))) {
74745
+ push(file, {
74746
+ names: allNames,
74747
+ });
74748
+ }
74749
+ };
74662
74750
 
74663
74751
  var operator = /*#__PURE__*/Object.freeze({
74664
74752
  __proto__: null,
@@ -74694,7 +74782,7 @@ var operator = /*#__PURE__*/Object.freeze({
74694
74782
  findFile: findFile,
74695
74783
  findFileUp: findFileUp,
74696
74784
  findVarsWays: findVarsWays,
74697
- fix: fix$1,
74785
+ fix: fix$2,
74698
74786
  fromJS: fromJS,
74699
74787
  getAttributeNode: getAttributeNode,
74700
74788
  getAttributePath: getAttributePath,
@@ -74748,6 +74836,7 @@ var operator = /*#__PURE__*/Object.freeze({
74748
74836
  removeClassName: removeClassName,
74749
74837
  removeEmptyDirectory: removeEmptyDirectory,
74750
74838
  removeFile: removeFile,
74839
+ removeFiles: removeFiles,
74751
74840
  removeParens: removeParens,
74752
74841
  rename: rename,
74753
74842
  renameFile: renameFile,