@putout/bundle 5.4.0 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,3 @@
1
- function fullstore(value) {
2
- const data = {
3
- value,
4
- };
5
-
6
- return (...args) => {
7
- const [value] = args;
8
-
9
- if (!args.length)
10
- return data.value;
11
-
12
- data.value = value;
13
-
14
- return value;
15
- };
16
- }
17
-
18
1
  var global$1 = (typeof global !== "undefined" ? global :
19
2
  typeof self !== "undefined" ? self :
20
3
  typeof window !== "undefined" ? window : {});
@@ -216,7 +199,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
216
199
 
217
200
  var toString = {}.toString;
218
201
 
219
- var isArray$e = Array.isArray || function (arr) {
202
+ var isArray$g = Array.isArray || function (arr) {
220
203
  return toString.call(arr) == '[object Array]';
221
204
  };
222
205
 
@@ -500,7 +483,7 @@ function fromObject (that, obj) {
500
483
  return fromArrayLike(that, obj)
501
484
  }
502
485
 
503
- if (obj.type === 'Buffer' && isArray$e(obj.data)) {
486
+ if (obj.type === 'Buffer' && isArray$g(obj.data)) {
504
487
  return fromArrayLike(that, obj.data)
505
488
  }
506
489
  }
@@ -565,7 +548,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
565
548
  };
566
549
 
567
550
  Buffer.concat = function concat (list, length) {
568
- if (!isArray$e(list)) {
551
+ if (!isArray$g(list)) {
569
552
  throw new TypeError('"list" argument must be an Array of Buffers')
570
553
  }
571
554
 
@@ -2011,7 +1994,7 @@ var browser$1 = {
2011
1994
  env: env};
2012
1995
 
2013
1996
  var util = /*#__PURE__*/Object.freeze({
2014
- __proto__: null
1997
+ __proto__: null
2015
1998
  });
2016
1999
 
2017
2000
  var __create = Object.create;
@@ -2056,9 +2039,9 @@ __defProp(target, 'default', {
2056
2039
  enumerable: true,
2057
2040
  }) , mod));
2058
2041
 
2059
- // node_modules/jsesc/jsesc.js
2042
+ // ../babel-babel/node_modules/jsesc/jsesc.js
2060
2043
  var require_jsesc = __commonJS({
2061
- 'node_modules/jsesc/jsesc.js'(exports$1, module) {
2044
+ '../babel-babel/node_modules/jsesc/jsesc.js'(exports$1, module) {
2062
2045
 
2063
2046
  var object = {};
2064
2047
  var hasOwnProperty = object.hasOwnProperty;
@@ -2122,10 +2105,6 @@ var require_jsesc = __commonJS({
2122
2105
  return typeof value == 'number' || toString.call(value) == '[object Number]';
2123
2106
  };
2124
2107
 
2125
- var isBigInt = (value) => {
2126
- return typeof value == 'bigint';
2127
- };
2128
-
2129
2108
  var isFunction5 = (value) => {
2130
2109
  return typeof value == 'function';
2131
2110
  };
@@ -2274,41 +2253,32 @@ var require_jsesc = __commonJS({
2274
2253
  }
2275
2254
 
2276
2255
  return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
2277
- } else if (isNumber2(argument) || isBigInt(argument)) {
2256
+ } else if (isNumber2(argument)) {
2278
2257
  if (json) {
2279
- return JSON.stringify(Number(argument));
2258
+ return JSON.stringify(argument);
2280
2259
  }
2281
2260
 
2282
- let result2;
2283
-
2284
2261
  if (useDecNumbers) {
2285
- result2 = String(argument);
2286
- } else if (useHexNumbers) {
2262
+ return String(argument);
2263
+ }
2264
+
2265
+ if (useHexNumbers) {
2287
2266
  let hexadecimal2 = argument.toString(16);
2288
2267
 
2289
2268
  if (!lowercaseHex) {
2290
2269
  hexadecimal2 = hexadecimal2.toUpperCase();
2291
2270
  }
2292
2271
 
2293
- result2 = '0x' + hexadecimal2;
2294
- } else if (useBinNumbers) {
2295
- result2 = '0b' + argument.toString(2);
2296
- } else if (useOctNumbers) {
2297
- result2 = '0o' + argument.toString(8);
2272
+ return '0x' + hexadecimal2;
2298
2273
  }
2299
-
2300
2274
 
2301
- if (isBigInt(argument)) {
2302
- return result2 + 'n';
2275
+ if (useBinNumbers) {
2276
+ return '0b' + argument.toString(2);
2303
2277
  }
2304
2278
 
2305
- return result2;
2306
- } else if (isBigInt(argument)) {
2307
- if (json) {
2308
- return JSON.stringify(Number(argument));
2279
+ if (useOctNumbers) {
2280
+ return '0o' + argument.toString(8);
2309
2281
  }
2310
-
2311
- return argument + 'n';
2312
2282
  } else if (!isObject(argument)) {
2313
2283
  if (json) {
2314
2284
  return JSON.stringify(argument) || 'null';
@@ -2331,7 +2301,6 @@ var require_jsesc = __commonJS({
2331
2301
  return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
2332
2302
  }
2333
2303
 
2334
-
2335
2304
  }
2336
2305
 
2337
2306
  const regex = options.escapeEverything ? escapeEverythingRegex : escapeNonAsciiRegex;
@@ -2418,7 +2387,7 @@ var require_jsesc = __commonJS({
2418
2387
  },
2419
2388
  });
2420
2389
 
2421
- // node_modules/@babel/types/lib/index.js
2390
+ // ../babel-babel/packages/babel-types/lib/index.js
2422
2391
  var lib_exports = {};
2423
2392
 
2424
2393
  __export(lib_exports, {
@@ -3174,7 +3143,7 @@ __export(lib_exports, {
3174
3143
  isAccessor: () => isAccessor,
3175
3144
  isAnyTypeAnnotation: () => isAnyTypeAnnotation,
3176
3145
  isArgumentPlaceholder: () => isArgumentPlaceholder,
3177
- isArrayExpression: () => isArrayExpression$a,
3146
+ isArrayExpression: () => isArrayExpression$b,
3178
3147
  isArrayPattern: () => isArrayPattern,
3179
3148
  isArrayTypeAnnotation: () => isArrayTypeAnnotation,
3180
3149
  isArrowFunctionExpression: () => isArrowFunctionExpression$3,
@@ -3667,14 +3636,11 @@ __export(lib_exports, {
3667
3636
  yieldExpression: () => yieldExpression,
3668
3637
  });
3669
3638
 
3670
- // node_modules/@babel/helper-validator-identifier/lib/index.js
3639
+ // ../babel-babel/packages/babel-helper-validator-identifier/lib/index.js
3671
3640
  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';
3672
3641
  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';
3673
3642
  var nonASCIIidentifierStart = new RegExp('[' + nonASCIIidentifierStartChars + ']');
3674
3643
  var nonASCIIidentifier = new RegExp('[' + nonASCIIidentifierStartChars + nonASCIIidentifierChars + ']');
3675
-
3676
- nonASCIIidentifierStartChars =
3677
- nonASCIIidentifierChars = null;
3678
3644
  var astralIdentifierStartCodes = [
3679
3645
  0,
3680
3646
  11,
@@ -4785,7 +4751,7 @@ function isKeyword$1(word) {
4785
4751
  return keywords$1.has(word);
4786
4752
  }
4787
4753
 
4788
- // node_modules/@babel/helper-string-parser/lib/index.js
4754
+ // ../babel-babel/packages/babel-helper-string-parser/lib/index.js
4789
4755
  var _isDigit = function isDigit(code2) {
4790
4756
  return code2 >= 48 && code2 <= 57;
4791
4757
  };
@@ -5086,7 +5052,7 @@ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
5086
5052
  };
5087
5053
  }
5088
5054
 
5089
- // node_modules/@babel/types/lib/index.js
5055
+ // ../babel-babel/packages/babel-types/lib/index.js
5090
5056
  function shallowEqual(actual, expected) {
5091
5057
  const keys2 = Object.keys(expected);
5092
5058
 
@@ -5148,7 +5114,7 @@ function captureShortStackTrace(skip2, length) {
5148
5114
  };
5149
5115
  }
5150
5116
 
5151
- function isArrayExpression$a(node, opts) {
5117
+ function isArrayExpression$b(node, opts) {
5152
5118
  if (!node)
5153
5119
  return false;
5154
5120
 
@@ -18422,15 +18388,13 @@ function removeTypeDuplicates$1(nodesIn) {
18422
18388
  const name = getQualifiedName$1(node.id);
18423
18389
 
18424
18390
  if (generics.has(name)) {
18425
- let existing = generics.get(name);
18391
+ const existingTypeParameters = generics.get(name).typeParameters;
18426
18392
 
18427
- if (existing.typeParameters) {
18393
+ if (existingTypeParameters) {
18428
18394
  if (node.typeParameters) {
18429
- existing.typeParameters.params.push(...node.typeParameters.params);
18430
- existing.typeParameters.params = removeTypeDuplicates$1(existing.typeParameters.params);
18395
+ existingTypeParameters.params.push(...node.typeParameters.params);
18396
+ existingTypeParameters.params = removeTypeDuplicates$1(existingTypeParameters.params);
18431
18397
  }
18432
- } else {
18433
- existing = node.typeParameters;
18434
18398
  }
18435
18399
  } else {
18436
18400
  generics.set(name, node);
@@ -18509,14 +18473,11 @@ function removeTypeDuplicates(nodesIn) {
18509
18473
  const name = getQualifiedName(node.typeName);
18510
18474
 
18511
18475
  if (generics.has(name)) {
18512
- let existing = generics.get(name);
18513
- const existingTypeArguments = existing[typeArgumentsKey];
18476
+ const existingTypeArguments = generics.get(name)[typeArgumentsKey];
18514
18477
 
18515
18478
  if (existingTypeArguments) {
18516
18479
  existingTypeArguments.params.push(...typeArguments.params);
18517
18480
  existingTypeArguments.params = removeTypeDuplicates(existingTypeArguments.params);
18518
- } else {
18519
- existing = typeArguments;
18520
18481
  }
18521
18482
  } else {
18522
18483
  generics.set(name, node);
@@ -18576,6 +18537,9 @@ function cloneIfNodeOrArray(obj, deep, withoutLoc, commentsCache) {
18576
18537
  }
18577
18538
 
18578
18539
  function cloneNode(node, deep = true, withoutLoc = false) {
18540
+ if (!node)
18541
+ return node;
18542
+
18579
18543
  return cloneNodeInternal(node, deep, withoutLoc, /* @__PURE__ */new Map());
18580
18544
  }
18581
18545
 
@@ -18811,7 +18775,7 @@ function toBlock(node, parent) {
18811
18775
  return node;
18812
18776
  }
18813
18777
 
18814
- let blockNodes = [];
18778
+ let blockNodes;
18815
18779
 
18816
18780
  if (isEmptyStatement(node)) {
18817
18781
  blockNodes = [];
@@ -18896,8 +18860,8 @@ function toExpression$1(node) {
18896
18860
  return node;
18897
18861
  }
18898
18862
 
18899
- var _skip = /* @__PURE__ */Symbol();
18900
- var _stop = /* @__PURE__ */Symbol();
18863
+ var _skip = Symbol();
18864
+ var _stop = Symbol();
18901
18865
 
18902
18866
  function traverseFast(node, enter, opts) {
18903
18867
  if (!node)
@@ -19771,7 +19735,7 @@ var react = {
19771
19735
  buildChildren,
19772
19736
  };
19773
19737
 
19774
- // node_modules/@babel/parser/lib/index.js
19738
+ // ../babel-babel/packages/babel-parser/lib/index.js
19775
19739
  var Position = class {
19776
19740
  line;
19777
19741
  column;
@@ -21211,9 +21175,6 @@ var nonASCIIidentifierStartChars2 = '\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u
21211
21175
  var nonASCIIidentifierChars2 = '\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';
21212
21176
  var nonASCIIidentifierStart2 = new RegExp('[' + nonASCIIidentifierStartChars2 + ']');
21213
21177
  var nonASCIIidentifier2 = new RegExp('[' + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + ']');
21214
-
21215
- nonASCIIidentifierStartChars2 =
21216
- nonASCIIidentifierChars2 = null;
21217
21178
  var astralIdentifierStartCodes2 = [
21218
21179
  0,
21219
21180
  11,
@@ -23817,7 +23778,7 @@ var CommentsParser = class extends BaseParser {
23817
23778
  };
23818
23779
 
23819
23780
  var State$2 = class _State {
23820
- flags = 512;
23781
+ flags = 4096;
23821
23782
  get strict() {
23822
23783
  return (this.flags & 1) > 0;
23823
23784
  }
@@ -23913,32 +23874,61 @@ var State$2 = class _State {
23913
23874
  this.flags &= -65;
23914
23875
  }
23915
23876
 
23916
- topicContext = {
23917
- maxNumOfResolvableTopics: 0,
23918
- maxTopicIndex: null,
23919
- };
23920
- get soloAwait() {
23877
+ get inConditionalConsequent() {
23921
23878
  return (this.flags & 128) > 0;
23922
23879
  }
23923
23880
 
23924
- set soloAwait(v) {
23881
+ set inConditionalConsequent(v) {
23925
23882
  if (v)
23926
23883
  this.flags |= 128;
23927
23884
  else
23928
23885
  this.flags &= -129;
23929
23886
  }
23930
23887
 
23931
- get inFSharpPipelineDirectBody() {
23888
+ get inHackPipelineBody() {
23932
23889
  return (this.flags & 256) > 0;
23933
23890
  }
23934
23891
 
23935
- set inFSharpPipelineDirectBody(v) {
23892
+ set inHackPipelineBody(v) {
23936
23893
  if (v)
23937
23894
  this.flags |= 256;
23938
23895
  else
23939
23896
  this.flags &= -257;
23940
23897
  }
23941
23898
 
23899
+ get seenTopicReference() {
23900
+ return (this.flags & 512) > 0;
23901
+ }
23902
+
23903
+ set seenTopicReference(v) {
23904
+ if (v)
23905
+ this.flags |= 512;
23906
+ else
23907
+ this.flags &= -513;
23908
+ }
23909
+
23910
+ get soloAwait() {
23911
+ return (this.flags & 1024) > 0;
23912
+ }
23913
+
23914
+ set soloAwait(v) {
23915
+ if (v)
23916
+ this.flags |= 1024;
23917
+ else
23918
+ this.flags &= -1025;
23919
+ }
23920
+
23921
+ get inFSharpPipelineDirectBody() {
23922
+ return (this.flags & 2048) > 0;
23923
+ }
23924
+
23925
+ set inFSharpPipelineDirectBody(v) {
23926
+ if (v)
23927
+ this.flags |= 2048;
23928
+ else
23929
+ this.flags &= -2049;
23930
+ }
23931
+
23942
23932
  labels = [];
23943
23933
  commentsLen = 0;
23944
23934
  commentStack = [];
@@ -23951,37 +23941,37 @@ var State$2 = class _State {
23951
23941
  lastTokStartLoc = null;
23952
23942
  context = [types.brace];
23953
23943
  get canStartJSXElement() {
23954
- return (this.flags & 512) > 0;
23944
+ return (this.flags & 4096) > 0;
23955
23945
  }
23956
23946
 
23957
23947
  set canStartJSXElement(v) {
23958
23948
  if (v)
23959
- this.flags |= 512;
23949
+ this.flags |= 4096;
23960
23950
  else
23961
- this.flags &= -513;
23951
+ this.flags &= -4097;
23962
23952
  }
23963
23953
 
23964
23954
  get containsEsc() {
23965
- return (this.flags & 1024) > 0;
23955
+ return (this.flags & 8192) > 0;
23966
23956
  }
23967
23957
 
23968
23958
  set containsEsc(v) {
23969
23959
  if (v)
23970
- this.flags |= 1024;
23960
+ this.flags |= 8192;
23971
23961
  else
23972
- this.flags &= -1025;
23962
+ this.flags &= -8193;
23973
23963
  }
23974
23964
 
23975
23965
  firstInvalidTemplateEscapePos = null;
23976
23966
  get hasTopLevelAwait() {
23977
- return (this.flags & 2048) > 0;
23967
+ return (this.flags & 16384) > 0;
23978
23968
  }
23979
23969
 
23980
23970
  set hasTopLevelAwait(v) {
23981
23971
  if (v)
23982
- this.flags |= 2048;
23972
+ this.flags |= 16384;
23983
23973
  else
23984
- this.flags &= -2049;
23974
+ this.flags &= -16385;
23985
23975
  }
23986
23976
 
23987
23977
  strictErrors = /* @__PURE__ */new Map();
@@ -24003,7 +23993,6 @@ var State$2 = class _State {
24003
23993
  state.potentialArrowAt = this.potentialArrowAt;
24004
23994
  state.noArrowAt = this.noArrowAt.slice();
24005
23995
  state.noArrowParamsConversionAt = this.noArrowParamsConversionAt.slice();
24006
- state.topicContext = this.topicContext;
24007
23996
  state.labels = this.labels.slice();
24008
23997
  state.commentsLen = this.commentsLen;
24009
23998
  state.commentStack = this.commentStack.slice();
@@ -29384,7 +29373,18 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
29384
29373
  }
29385
29374
  }
29386
29375
 
29387
- return super.parseConditional(expr, startLoc, refExpressionErrors);
29376
+ this.next();
29377
+ const node = this.startNodeAt(startLoc);
29378
+
29379
+ node.test = expr;
29380
+ const oldInConditionalConsequent = this.state.inConditionalConsequent;
29381
+
29382
+ this.state.inConditionalConsequent = true;
29383
+ node.consequent = this.parseMaybeAssignAllowIn();
29384
+ this.state.inConditionalConsequent = oldInConditionalConsequent;
29385
+ this.expect(10);
29386
+ node.alternate = this.parseMaybeAssign();
29387
+ return this.finishNode(node, 'ConditionalExpression');
29388
29388
  }
29389
29389
 
29390
29390
  parseParenItem(node, startLoc) {
@@ -29969,7 +29969,24 @@ var typescript$1 = (superClass) => class TypeScriptParserMixin extends superClas
29969
29969
  }
29970
29970
 
29971
29971
  shouldParseAsyncArrow() {
29972
- return this.match(10) || super.shouldParseAsyncArrow();
29972
+ if (this.match(10)) {
29973
+ if (this.state.inConditionalConsequent)
29974
+ return false;
29975
+
29976
+ return true;
29977
+ }
29978
+
29979
+ return super.shouldParseAsyncArrow();
29980
+ }
29981
+
29982
+ parseParenAndDistinguishExpression(canBeArrow) {
29983
+ const oldInConditionalConsequent = this.state.inConditionalConsequent;
29984
+
29985
+ this.state.inConditionalConsequent = false;
29986
+ const result = super.parseParenAndDistinguishExpression(canBeArrow);
29987
+
29988
+ this.state.inConditionalConsequent = oldInConditionalConsequent;
29989
+ return result;
29973
29990
  }
29974
29991
 
29975
29992
  canHaveLeadingDecorator() {
@@ -32189,7 +32206,7 @@ var ExpressionParser = class extends LValParser {
32189
32206
  }
32190
32207
 
32191
32208
  parsePropertyDefinition(refExpressionErrors) {
32192
- let decorators = [];
32209
+ const decorators = [];
32193
32210
 
32194
32211
  if (this.match(22)) {
32195
32212
  if (this.hasPlugin('decorators')) {
@@ -32215,7 +32232,6 @@ var ExpressionParser = class extends LValParser {
32215
32232
 
32216
32233
  if (decorators.length) {
32217
32234
  prop.decorators = decorators;
32218
- decorators = [];
32219
32235
  }
32220
32236
 
32221
32237
  prop.method = false;
@@ -32781,16 +32797,17 @@ var ExpressionParser = class extends LValParser {
32781
32797
  }
32782
32798
 
32783
32799
  withTopicBindingContext(callback) {
32784
- const outerContextTopicState = this.state.topicContext;
32800
+ const oldInHackPipelineBody = this.state.inHackPipelineBody;
32785
32801
 
32786
- this.state.topicContext = {
32787
- maxNumOfResolvableTopics: 1,
32788
- maxTopicIndex: null,
32789
- };
32802
+ this.state.inHackPipelineBody = true;
32803
+ const oldSeenTopicReference = this.state.seenTopicReference;
32804
+
32805
+ this.state.seenTopicReference = false;
32790
32806
  try {
32791
32807
  return callback();
32792
32808
  } finally {
32793
- this.state.topicContext = outerContextTopicState;
32809
+ this.state.inHackPipelineBody = oldInHackPipelineBody;
32810
+ this.state.seenTopicReference = oldSeenTopicReference;
32794
32811
  }
32795
32812
  }
32796
32813
 
@@ -32838,15 +32855,15 @@ var ExpressionParser = class extends LValParser {
32838
32855
  }
32839
32856
 
32840
32857
  registerTopicReference() {
32841
- this.state.topicContext.maxTopicIndex = 0;
32858
+ this.state.seenTopicReference = true;
32842
32859
  }
32843
32860
 
32844
32861
  topicReferenceIsAllowedInCurrentContext() {
32845
- return this.state.topicContext.maxNumOfResolvableTopics >= 1;
32862
+ return this.state.inHackPipelineBody;
32846
32863
  }
32847
32864
 
32848
32865
  topicReferenceWasUsedInCurrentContext() {
32849
- return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
32866
+ return this.state.seenTopicReference;
32850
32867
  }
32851
32868
 
32852
32869
  parseFSharpPipelineBody(prec) {
@@ -35275,7 +35292,7 @@ function getParserClass(pluginsMap) {
35275
35292
  return cls;
35276
35293
  }
35277
35294
 
35278
- // node_modules/@babel/code-frame/lib/common-BO7XIBW3.js
35295
+ // ../babel-babel/packages/babel-code-frame/lib/common-BO7XIBW3.js
35279
35296
  var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
35280
35297
 
35281
35298
  function getMarkerLines(loc, source, opts, startLineBaseZero) {
@@ -35433,7 +35450,7 @@ ${frame}`;
35433
35450
  return defs2.reset(frame);
35434
35451
  }
35435
35452
 
35436
- const {styleText = (a, b) => b} = util;// node_modules/js-tokens/index.js
35453
+ const {styleText = (a, b) => b} = util;// ../babel-babel/node_modules/js-tokens/index.js
35437
35454
  var HashbangComment;
35438
35455
  var Identifier2;
35439
35456
  var JSXIdentifier2;
@@ -35943,7 +35960,7 @@ jsTokens = function*(input, {jsx: jsx2 = false} = {}) {
35943
35960
  };
35944
35961
  var js_tokens_default = jsTokens;
35945
35962
 
35946
- // node_modules/@babel/code-frame/lib/index.js
35963
+ // ../babel-babel/packages/babel-code-frame/lib/index.js
35947
35964
  function isColorSupported() {
35948
35965
  return styleText('red', '-') !== '-';
35949
35966
  }
@@ -36122,7 +36139,7 @@ function codeFrameColumns(rawLines, loc, opts = {}) {
36122
36139
  } : void 0);
36123
36140
  }
36124
36141
 
36125
- // node_modules/@babel/template/lib/index.js
36142
+ // ../babel-babel/packages/babel-template/lib/index.js
36126
36143
  var {assertExpressionStatement: assertExpressionStatement2} = lib_exports;
36127
36144
 
36128
36145
  function makeStatementFormatter(fn) {
@@ -36761,7 +36778,7 @@ var index = Object.assign(smart.bind(void 0), {
36761
36778
  ast: smart.ast,
36762
36779
  });
36763
36780
 
36764
- // node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
36781
+ // ../babel-babel/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
36765
36782
  var comma = ','.charCodeAt(0);
36766
36783
  var semicolon = ';'.charCodeAt(0);
36767
36784
  var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -37010,7 +37027,7 @@ function encode(decoded) {
37010
37027
  return writer.flush();
37011
37028
  }
37012
37029
 
37013
- // node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
37030
+ // ../babel-babel/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
37014
37031
  var schemeRegex = /^[\w+.-]+:\/\//;
37015
37032
  var urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
37016
37033
  var fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
@@ -37230,7 +37247,7 @@ case 2:
37230
37247
  }
37231
37248
  }
37232
37249
 
37233
- // node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
37250
+ // ../babel-babel/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
37234
37251
  function stripFilename(path) {
37235
37252
  if (!path)
37236
37253
  return '';
@@ -37502,7 +37519,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
37502
37519
  return index3;
37503
37520
  }
37504
37521
 
37505
- // node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
37522
+ // ../babel-babel/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
37506
37523
  var SetArray = class {
37507
37524
  constructor() {
37508
37525
  this._indexes = {
@@ -37771,7 +37788,7 @@ function addMappingInternal(skipable, map, mapping) {
37771
37788
  return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
37772
37789
  }
37773
37790
 
37774
- // node_modules/@babel/generator/lib/index.js
37791
+ // ../babel-babel/packages/babel-generator/lib/index.js
37775
37792
  var import_jsesc = __toESM(require_jsesc());
37776
37793
 
37777
37794
  var SourceMap = class {
@@ -43616,7 +43633,7 @@ function generate$1(ast, opts = {}, code2) {
43616
43633
  return printer.generate(ast);
43617
43634
  }
43618
43635
 
43619
- // node_modules/obug/dist/core.js
43636
+ // ../babel-babel/node_modules/obug/dist/core.js
43620
43637
  function selectColor(colors2, namespace) {
43621
43638
  let hash = 0;
43622
43639
 
@@ -43663,7 +43680,7 @@ function enable(namespaces$1) {
43663
43680
  names.push(ns);
43664
43681
  }
43665
43682
 
43666
- // node_modules/obug/dist/node.js
43683
+ // ../babel-babel/node_modules/obug/dist/node.js
43667
43684
  var colors = [];
43668
43685
 
43669
43686
  var inspectOpts = {};
@@ -43710,7 +43727,7 @@ function createDebug2(namespace, options) {
43710
43727
  }
43711
43728
 
43712
43729
  enable(browser$1.env.DEBUG || '');
43713
- // node_modules/@babel/helper-globals/data/builtin-lower.json
43730
+ // ../babel-babel/packages/babel-helper-globals/data/builtin-lower.json
43714
43731
 
43715
43732
  var builtin_lower_default = [
43716
43733
  'decodeURI',
@@ -43728,7 +43745,7 @@ var builtin_lower_default = [
43728
43745
  'unescape',
43729
43746
  ];
43730
43747
 
43731
- // node_modules/@babel/helper-globals/data/builtin-upper.json
43748
+ // ../babel-babel/packages/babel-helper-globals/data/builtin-upper.json
43732
43749
  var builtin_upper_default = [
43733
43750
  'AggregateError',
43734
43751
  'Array',
@@ -43781,7 +43798,7 @@ var builtin_upper_default = [
43781
43798
  'WeakSet',
43782
43799
  ];
43783
43800
 
43784
- // node_modules/@babel/traverse/lib/index.js
43801
+ // ../babel-babel/packages/babel-traverse/lib/index.js
43785
43802
  var ReferencedIdentifier = [
43786
43803
  'Identifier',
43787
43804
  'JSXIdentifier',
@@ -48898,7 +48915,7 @@ function isExecutionUncertainInList(paths, maxIndex) {
48898
48915
  return false;
48899
48916
  }
48900
48917
 
48901
- var SYMBOL_CHECKING = /* @__PURE__ */Symbol();
48918
+ var SYMBOL_CHECKING = Symbol();
48902
48919
 
48903
48920
  function _guessExecutionStatusRelativeTo(target) {
48904
48921
  return _guessExecutionStatusRelativeToCached(this, target, /* @__PURE__ */new Map());
@@ -50263,17 +50280,45 @@ traverse3.hasType = function(tree, type, denylistTypes) {
50263
50280
  };
50264
50281
  traverse3.cache = cache;
50265
50282
 
50266
- const TYPES$3 = {
50267
- TOKEN: 'Token',
50268
- NEWLINE: 'Newline',
50269
- SPLITTER: 'Splitter',
50270
- INDENT: 'Indent',
50271
- DEBUG: 'Debug',
50272
- SPACE: 'Space',
50273
- QUOTE: 'Quote',
50274
- END_OF_FILE: 'EndOfFile',
50283
+ const isString$f = (a) => typeof a === 'string';
50284
+ const constant = (a) => () => a;
50285
+ const {keys: keys$3} = Object;
50286
+
50287
+ const rendy = (template, values, modifiers) => {
50288
+ check$e(template, values);
50289
+
50290
+ let result = template;
50291
+ const names = keys$3(values) ;
50292
+
50293
+ for (const key of names) {
50294
+ const [parsedKey, value] = parseValue$1(key, values);
50295
+ const str = constant(value);
50296
+
50297
+ while (result.includes(parsedKey))
50298
+ result = result.replace(parsedKey, str);
50299
+ }
50300
+
50301
+ if (result.includes('{{'))
50302
+ result = result.replace(/{{.*?}}/g, '');
50303
+
50304
+ return result;
50275
50305
  };
50276
50306
 
50307
+ function check$e(template, values) {
50308
+ if (!isString$f(template))
50309
+ throw Error('template should be a string!');
50310
+
50311
+ if (typeof values !== 'object')
50312
+ throw Error('values should be an object!');
50313
+ }
50314
+
50315
+ function parseValue$1(key, values, modifiers) {
50316
+ return [
50317
+ `{{ ${key} }}`,
50318
+ values[key],
50319
+ ];
50320
+ }
50321
+
50277
50322
  const {
50278
50323
  isStringLiteral: isStringLiteral$a,
50279
50324
  isIdentifier: isIdentifier$g,
@@ -50282,7 +50327,7 @@ const {
50282
50327
  isForOfStatement: isForOfStatement$1,
50283
50328
  isVariableDeclaration: isVariableDeclaration$4,
50284
50329
  isMemberExpression: isMemberExpression$8,
50285
- isArrayExpression: isArrayExpression$9,
50330
+ isArrayExpression: isArrayExpression$a,
50286
50331
  isObjectExpression: isObjectExpression$c,
50287
50332
  isLabeledStatement: isLabeledStatement$1,
50288
50333
  isTryStatement,
@@ -50390,7 +50435,7 @@ const isStringAndArray = ([a, b]) => {
50390
50435
  if (!isStringLiteral$a(a))
50391
50436
  return false;
50392
50437
 
50393
- if (!isArrayExpression$9(b))
50438
+ if (!isArrayExpression$a(b))
50394
50439
  return false;
50395
50440
 
50396
50441
  return !isStringAndIdentifier(b.node.elements);
@@ -50452,39 +50497,214 @@ const hasLeadingComment = (path) => path.node?.leadingComments?.length;
50452
50497
  const noTrailingComment = (path) => !path.node.trailingComments?.length;
50453
50498
  const noLeadingComment = (path) => !path.node.leadingComments?.length;
50454
50499
 
50500
+ var maybeSatisfy = (plugin) => {
50501
+ if (!plugin.afterSatisfy && !plugin.beforeSatisfy && !plugin.satisfy)
50502
+ return plugin;
50503
+
50504
+ const {
50505
+ satisfy,
50506
+ afterSatisfy = satisfy,
50507
+ beforeSatisfy = satisfy,
50508
+ } = plugin;
50509
+
50510
+ return {
50511
+ afterIf: createIf(afterSatisfy),
50512
+ beforeIf: createIf(beforeSatisfy),
50513
+ ...plugin,
50514
+ };
50515
+ };
50516
+
50517
+ const createIf = (getConditions) => {
50518
+ const conditions = getConditions?.() || [];
50519
+ return satisfy(conditions);
50520
+ };
50521
+
50522
+ const {
50523
+ isProgram: isProgram$4,
50524
+ isFile: isFile$1,
50525
+ isStatement: isStatement$5,
50526
+ expressionStatement: expressionStatement$3,
50527
+ program,
50528
+ file,
50529
+ } = lib_exports;
50530
+
50455
50531
  const isFn$7 = (a) => typeof a === 'function';
50456
50532
 
50457
- const isParens$2 = (path) => path.node.extra?.parenthesized;
50533
+ const maybeThrow = (a, path, b) => {
50534
+ if (!a)
50535
+ return;
50536
+
50537
+ throw Error(rendy(b, {
50538
+ path,
50539
+ type: path.type,
50540
+ }));
50541
+ };
50458
50542
 
50459
- const maybeParens = (print) => {
50460
- if (isFn$7(print))
50461
- return maybeParensPrint(print);
50543
+ const maybeStatement = (ast) => isStatement$5(ast) ? ast : expressionStatement$3(ast);
50544
+
50545
+ const maybeProgram = (ast) => isProgram$4(ast) ? ast : program([
50546
+ maybeStatement(ast),
50547
+ ]);
50548
+
50549
+ const maybeFile = (ast) => isFile$1(ast) ? ast : file(maybeProgram(ast));
50550
+
50551
+ const maybeVisitor = (plugin, path, printer, options) => {
50552
+ if (isFn$7(plugin))
50553
+ return plugin(path, printer, options);
50462
50554
 
50463
- return maybeParensCondition(print);
50555
+ return objectPlugin(plugin, path, printer, options);
50464
50556
  };
50465
50557
 
50466
- const maybeParensPrint = (print) => ({
50467
- condition: isParens$2,
50468
- before(path, {write}) {
50469
- write('(');
50470
- },
50471
- print,
50472
- after(path, {write}) {
50473
- write(')');
50474
- },
50475
- });
50558
+ function objectPlugin(plugin, path, printer, semantics) {
50559
+ const {
50560
+ print,
50561
+ split,
50562
+ condition,
50563
+ before = split,
50564
+ beforeIf = condition,
50565
+ after = split,
50566
+ afterIf = condition,
50567
+ } = maybeSatisfy(plugin);
50568
+
50569
+ if (beforeIf?.(path, printer, semantics))
50570
+ before(path, printer, semantics);
50571
+
50572
+ print(path, printer, semantics);
50573
+
50574
+ if (afterIf?.(path, printer, semantics))
50575
+ after(path, printer, semantics);
50576
+ }
50476
50577
 
50477
- const maybeParensCondition = ({print, condition, checkParens = true}) => ({
50478
- ...maybeParensPrint(print),
50479
- condition: (path, print, semantics) => {
50480
- const is = condition?.(path, print, semantics);
50578
+ function fullstore(value) {
50579
+ const data = {
50580
+ value,
50581
+ };
50582
+
50583
+ return (...args) => {
50584
+ const [value] = args;
50481
50585
 
50482
- if (!checkParens)
50483
- return is;
50586
+ if (!args.length)
50587
+ return data.value;
50484
50588
 
50485
- return is || isParens$2(path);
50486
- },
50487
- });
50589
+ data.value = value;
50590
+
50591
+ return value;
50592
+ };
50593
+ }
50594
+
50595
+ const TYPES$3 = {
50596
+ TOKEN: 'Token',
50597
+ NEWLINE: 'Newline',
50598
+ SPLITTER: 'Splitter',
50599
+ INDENT: 'Indent',
50600
+ DEBUG: 'Debug',
50601
+ SPACE: 'Space',
50602
+ QUOTE: 'Quote',
50603
+ END_OF_FILE: 'EndOfFile',
50604
+ };
50605
+
50606
+ var stringSnakeCase = snakeCase;
50607
+
50608
+ /*
50609
+ snakeCase('the quick brown fox'); // 'the_quick_brown_fox'
50610
+ snakeCase('the-quick-brown-fox'); // 'the_quick_brown_fox'
50611
+ snakeCase('the_quick_brown_fox'); // 'the_quick_brown_fox'
50612
+ snakeCase('theQuickBrownFox'); // 'the_quick_brown_fox'
50613
+ snakeCase('theQuickBrown Fox'); // 'the_quick_brown_Fox'
50614
+ snakeCase('thequickbrownfox'); // 'thequickbrownfox'
50615
+ snakeCase('the - quick * brown# fox'); // 'the_quick_brown_fox'
50616
+ snakeCase('theQUICKBrownFox'); // 'the_q_u_i_c_k_brown_fox'
50617
+ */
50618
+
50619
+ // any combination of spaces and punctuation characters
50620
+ // thanks to http://stackoverflow.com/a/25575009
50621
+ var wordSeparators = /[\s\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]+/;
50622
+ var capitals = /[A-Z\u00C0-\u00D6\u00D9-\u00DD]/g;
50623
+
50624
+ function snakeCase(str) {
50625
+ //replace capitals with space + lower case equivalent for later parsing
50626
+ str = str.replace(capitals, function(match) {
50627
+ return ' ' + (match.toLowerCase() || match);
50628
+ });
50629
+ return str
50630
+ .trim()
50631
+ .split(wordSeparators)
50632
+ .join('_');
50633
+ }
50634
+
50635
+ const {stringify: stringify$7} = JSON;
50636
+ const {
50637
+ LOG,
50638
+ LOG_ALL,
50639
+ LOG_TOKENS,
50640
+ LOG_TERM,
50641
+ LOG_DEBUG,
50642
+ } = {};
50643
+
50644
+ const createDebug$3 = (tokens) => (a) => {
50645
+ if (!LOG_DEBUG)
50646
+ return;
50647
+
50648
+ tokens.push({
50649
+ type: TYPES$3.DEBUG,
50650
+ value: `/*__${stringSnakeCase(a)}*/`,
50651
+ });
50652
+ };
50653
+
50654
+ const createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type, value}) => {
50655
+ if (LOG_TOKENS) {
50656
+ console.log(codeFrameColumns(stringify$7({
50657
+ type,
50658
+ value,
50659
+ }), {}, {
50660
+ highlightCode: true,
50661
+ }));
50662
+
50663
+ return;
50664
+ }
50665
+
50666
+ if (LOG_ALL) {
50667
+ console.log(codeFrameColumns(value, {}, {
50668
+ highlightCode: true,
50669
+ }));
50670
+
50671
+ return;
50672
+ }
50673
+
50674
+ if (LOG) {
50675
+ if (value === newline) {
50676
+ console.log(codeFrameColumns(store(), {}, {
50677
+ highlightCode: true,
50678
+ }));
50679
+
50680
+ return;
50681
+ }
50682
+
50683
+ store(value);
50684
+ }
50685
+
50686
+ if (LOG_TERM)
50687
+ browser$1.stdout.write(value);
50688
+ };
50689
+
50690
+ function createStore$1() {
50691
+ let chunks = [];
50692
+
50693
+ return (...args) => {
50694
+ const [chunk] = args;
50695
+
50696
+ if (args.length) {
50697
+ chunks.push(chunk);
50698
+ return;
50699
+ }
50700
+
50701
+ const result = chunks.join('');
50702
+
50703
+ chunks = [];
50704
+
50705
+ return result;
50706
+ };
50707
+ }
50488
50708
 
50489
50709
  const WATER_MARK_BEFORE = '__putout_newline_before';
50490
50710
  const WATER_MARK_AFTER = '__putout_newline_after';
@@ -50507,6 +50727,40 @@ const hasPrevNewline = (path) => {
50507
50727
  return isMarkedAfter(path.getPrevSibling());
50508
50728
  };
50509
50729
 
50730
+ const isFn$6 = (a) => typeof a === 'function';
50731
+
50732
+ const isParens$2 = (path) => path.node.extra?.parenthesized;
50733
+
50734
+ const maybeParens = (print) => {
50735
+ if (isFn$6(print))
50736
+ return maybeParensPrint(print);
50737
+
50738
+ return maybeParensCondition(print);
50739
+ };
50740
+
50741
+ const maybeParensPrint = (print) => ({
50742
+ condition: isParens$2,
50743
+ before(path, {write}) {
50744
+ write('(');
50745
+ },
50746
+ print,
50747
+ after(path, {write}) {
50748
+ write(')');
50749
+ },
50750
+ });
50751
+
50752
+ const maybeParensCondition = ({print, condition, checkParens = true}) => ({
50753
+ ...maybeParensPrint(print),
50754
+ condition: (path, print, semantics) => {
50755
+ const is = condition?.(path, print, semantics);
50756
+
50757
+ if (!checkParens)
50758
+ return is;
50759
+
50760
+ return is || isParens$2(path);
50761
+ },
50762
+ });
50763
+
50510
50764
  const maybeInsideFn = (insideFn, {print, indent}) => {
50511
50765
  if (!insideFn)
50512
50766
  return;
@@ -50781,7 +51035,7 @@ const parseLeadingComments = (path, printer, semantics, {currentTraverse = {}} =
50781
51035
  }
50782
51036
  };
50783
51037
 
50784
- const {assign: assign$b} = Object;
51038
+ const {assign: assign$c} = Object;
50785
51039
 
50786
51040
  const chain$1 = (path) => {
50787
51041
  const all = [
@@ -50851,7 +51105,7 @@ function build(path) {
50851
51105
  };
50852
51106
 
50853
51107
  if (path.isCallExpression())
50854
- assign$b(prop, {
51108
+ assign$c(prop, {
50855
51109
  args: path.node.arguments.length,
50856
51110
  name: path.node.callee.property?.name || '',
50857
51111
  });
@@ -51106,6 +51360,8 @@ function isPrevCall(path) {
51106
51360
  return !isCallExpression$8(expression.arguments[0]);
51107
51361
  }
51108
51362
 
51363
+ const isEmptyBody$1 = ({node}) => !node.body.length;
51364
+
51109
51365
  const parseComments = (path, {write, maybe}, semantics) => {
51110
51366
  if (!semantics.comments)
51111
51367
  return;
@@ -51124,7 +51380,7 @@ const parseComments = (path, {write, maybe}, semantics) => {
51124
51380
  write('//');
51125
51381
  write(value);
51126
51382
 
51127
- if (program) {
51383
+ if (program && isEmptyBody$1(path)) {
51128
51384
  maybe.write.newline(i < n);
51129
51385
  continue;
51130
51386
  }
@@ -51820,12 +52076,12 @@ const ClassDeclaration = {
51820
52076
  },
51821
52077
  };
51822
52078
 
51823
- const {isArray: isArray$d} = Array;
52079
+ const {isArray: isArray$f} = Array;
51824
52080
 
51825
52081
  const parseArgs = (path) => {
51826
52082
  const argsPath = path.get('arguments');
51827
52083
 
51828
- if (!isArray$d(argsPath))
52084
+ if (!isArray$f(argsPath))
51829
52085
  return [];
51830
52086
 
51831
52087
  return argsPath;
@@ -51968,7 +52224,7 @@ function maybePrintBrace(brace, path, printer, semantics) {
51968
52224
  maybe.print(roundBraces.new, brace);
51969
52225
  }
51970
52226
 
51971
- const {isArrayExpression: isArrayExpression$8} = lib_exports;
52227
+ const {isArrayExpression: isArrayExpression$9} = lib_exports;
51972
52228
 
51973
52229
  const TYPES$2 = [
51974
52230
  'NullLiteral',
@@ -51979,7 +52235,7 @@ const TYPES$2 = [
51979
52235
  const isInsideTuple = (path) => {
51980
52236
  const {parentPath} = path;
51981
52237
 
51982
- if (!isArrayExpression$8(parentPath))
52238
+ if (!isArrayExpression$9(parentPath))
51983
52239
  return false;
51984
52240
 
51985
52241
  const [first, second] = parentPath.node.elements;
@@ -51991,13 +52247,13 @@ const isInsideTuple = (path) => {
51991
52247
  };
51992
52248
 
51993
52249
  const {
51994
- isArrayExpression: isArrayExpression$7,
52250
+ isArrayExpression: isArrayExpression$8,
51995
52251
  isCallExpression: isCallExpression$7,
51996
52252
  isIdentifier: isIdentifier$e,
51997
52253
  } = lib_exports;
51998
52254
 
51999
52255
  const isThirdObjectInsideArray = ({parentPath}) => {
52000
- if (!isArrayExpression$7(parentPath))
52256
+ if (!isArrayExpression$8(parentPath))
52001
52257
  return false;
52002
52258
 
52003
52259
  const [, second] = parentPath.node.elements;
@@ -52007,7 +52263,7 @@ const isThirdObjectInsideArray = ({parentPath}) => {
52007
52263
 
52008
52264
  const {
52009
52265
  isStringLiteral: isStringLiteral$9,
52010
- isArrayExpression: isArrayExpression$6,
52266
+ isArrayExpression: isArrayExpression$7,
52011
52267
  isSpreadElement: isSpreadElement$2,
52012
52268
  } = lib_exports;
52013
52269
 
@@ -52031,10 +52287,10 @@ const isMemberExpressionCallee = ({parentPath}) => {
52031
52287
  const isInsideCall = ({parentPath}) => parentPath.isCallExpression();
52032
52288
 
52033
52289
  function isInsideNestedArrayCall({parentPath}) {
52034
- if (!isArrayExpression$6(parentPath))
52290
+ if (!isArrayExpression$7(parentPath))
52035
52291
  return false;
52036
52292
 
52037
- if (!isArrayExpression$6(parentPath.parentPath))
52293
+ if (!isArrayExpression$7(parentPath.parentPath))
52038
52294
  return false;
52039
52295
 
52040
52296
  return isInsideCall(parentPath.parentPath);
@@ -52297,7 +52553,7 @@ function maybePrintTypeAnnotation(path, printer) {
52297
52553
 
52298
52554
  const {
52299
52555
  isAssignmentPattern: isAssignmentPattern$4,
52300
- isArrayExpression: isArrayExpression$5,
52556
+ isArrayExpression: isArrayExpression$6,
52301
52557
  isObjectExpression: isObjectExpression$a,
52302
52558
  isIdentifier: isIdentifier$d,
52303
52559
  } = lib_exports;
@@ -52306,7 +52562,7 @@ const calculateAssigns = (property, semantics) => {
52306
52562
  const currentAssign = isLongAssignPattern(property, semantics);
52307
52563
 
52308
52564
  const {right} = property.node.value;
52309
- const isArrayOrObjectRight = isArrayExpression$5(right) || isComplexObject(right);
52565
+ const isArrayOrObjectRight = isArrayExpression$6(right) || isComplexObject(right);
52310
52566
  const complexAssign = currentAssign && isArrayOrObjectRight;
52311
52567
 
52312
52568
  return {
@@ -52939,7 +53195,7 @@ const isSimple = (a) => {
52939
53195
  };
52940
53196
 
52941
53197
  const {
52942
- isArrayExpression: isArrayExpression$4,
53198
+ isArrayExpression: isArrayExpression$5,
52943
53199
  isLiteral: isLiteral$2,
52944
53200
  isIdentifier: isIdentifier$8,
52945
53201
  isMemberExpression: isMemberExpression$2,
@@ -52979,7 +53235,7 @@ function extract(node) {
52979
53235
  if (isMemberExpression$2(node))
52980
53236
  return `${extract(node.object)}.${extract(node.property)}`;
52981
53237
 
52982
- if (isArrayExpression$4(node))
53238
+ if (isArrayExpression$5(node))
52983
53239
  return extractArrayExpression(node);
52984
53240
 
52985
53241
  if (isJSXText$3(node))
@@ -53020,7 +53276,7 @@ function extract(node) {
53020
53276
 
53021
53277
  function extractArrayExpression(node, collector = []) {
53022
53278
  for (const el of node.elements) {
53023
- if (isArrayExpression$4(el)) {
53279
+ if (isArrayExpression$5(el)) {
53024
53280
  extractArrayExpression(el, collector);
53025
53281
  continue;
53026
53282
  }
@@ -53506,22 +53762,22 @@ function maybeEncode(a) {
53506
53762
  }
53507
53763
 
53508
53764
  const {
53509
- isStatement: isStatement$5,
53765
+ isStatement: isStatement$4,
53510
53766
  isBlockStatement: isBlockStatement$5,
53511
53767
  blockStatement,
53512
- expressionStatement: expressionStatement$3,
53768
+ expressionStatement: expressionStatement$2,
53513
53769
  } = lib_exports;
53514
53770
 
53515
53771
  const maybeBody = (path, node) => {
53516
53772
  const {parentPath} = path;
53517
53773
 
53518
- if (node && !isStatement$5(node) || isBlockStatement$5(node) || !parentPath?.isArrowFunctionExpression?.())
53774
+ if (node && !isStatement$4(node) || isBlockStatement$5(node) || !parentPath?.isArrowFunctionExpression?.())
53519
53775
  return {
53520
53776
  currentPath: path,
53521
53777
  };
53522
53778
 
53523
53779
  parentPath.node.body = blockStatement([
53524
- expressionStatement$3(path.node),
53780
+ expressionStatement$2(path.node),
53525
53781
  ]);
53526
53782
 
53527
53783
  return {
@@ -53532,7 +53788,7 @@ const maybeBody = (path, node) => {
53532
53788
  const {
53533
53789
  isExpression: isExpression$1,
53534
53790
  toStatement,
53535
- expressionStatement: expressionStatement$2,
53791
+ expressionStatement: expressionStatement$1,
53536
53792
  } = lib_exports;
53537
53793
 
53538
53794
  const toExpression = (el) => {
@@ -53546,7 +53802,7 @@ const toExpression = (el) => {
53546
53802
  return el;
53547
53803
 
53548
53804
  if (isExpression$1(el))
53549
- return expressionStatement$2(el);
53805
+ return expressionStatement$1(el);
53550
53806
 
53551
53807
  return toStatement(el);
53552
53808
  };
@@ -53598,7 +53854,7 @@ function removeDuplicateLeadingComments(nodes) {
53598
53854
  }
53599
53855
  }
53600
53856
 
53601
- const {assign: assign$a} = Object;
53857
+ const {assign: assign$b} = Object;
53602
53858
 
53603
53859
  const parseNode$2 = (a) => {
53604
53860
  a = extractMark(a);
@@ -53622,7 +53878,7 @@ const replaceWith = (path, node) => {
53622
53878
 
53623
53879
  currentPath.replaceWith(node);
53624
53880
 
53625
- assign$a(currentPath.node, {
53881
+ assign$b(currentPath.node, {
53626
53882
  comments,
53627
53883
  loc,
53628
53884
  });
@@ -53645,8 +53901,8 @@ const {
53645
53901
  matchesPattern,
53646
53902
  isImportDeclaration: isImportDeclaration$1,
53647
53903
  isExportDeclaration: isExportDeclaration$4,
53648
- isStatement: isStatement$4,
53649
- expressionStatement: expressionStatement$1,
53904
+ isStatement: isStatement$3,
53905
+ expressionStatement,
53650
53906
  } = lib_exports;
53651
53907
 
53652
53908
  const insertBefore = (path, node) => {
@@ -53662,8 +53918,8 @@ const insertAfter = (path, node) => {
53662
53918
  if (node.trailingComments)
53663
53919
  delete node.trailingComments;
53664
53920
 
53665
- if (isStatement$4(path) && !isStatement$4(node))
53666
- path.insertAfter(expressionStatement$1(node));
53921
+ if (isStatement$3(path) && !isStatement$3(node))
53922
+ path.insertAfter(expressionStatement(node));
53667
53923
  else
53668
53924
  path.insertAfter(node);
53669
53925
 
@@ -53712,7 +53968,7 @@ const isESM = (path) => {
53712
53968
 
53713
53969
  const {
53714
53970
  isObjectExpression: isObjectExpression$4,
53715
- isArrayExpression: isArrayExpression$3,
53971
+ isArrayExpression: isArrayExpression$4,
53716
53972
  isObjectProperty: isObjectProperty$1,
53717
53973
  isCallExpression: isCallExpression$5,
53718
53974
  isAwaitExpression,
@@ -53723,7 +53979,7 @@ const {
53723
53979
  isIdentifier: isIdentifier$7,
53724
53980
  } = lib_exports;
53725
53981
 
53726
- const {round: round$1} = Math;
53982
+ const {round} = Math;
53727
53983
 
53728
53984
  const isOneSpread = (elements) => {
53729
53985
  if (elements.length > 1)
@@ -53835,7 +54091,7 @@ const isMultiLine = (path, {elements, maxElementsInOneLine, maxElementLengthInOn
53835
54091
  if (isSimpleAndObject(elements))
53836
54092
  return ONE_LINE;
53837
54093
 
53838
- if (isStringAndString(elements) && path.parentPath.isArrayExpression() && isArrayExpression$3(path.parentPath.node.elements[0]))
54094
+ if (isStringAndString(elements) && path.parentPath.isArrayExpression() && isArrayExpression$4(path.parentPath.node.elements[0]))
53839
54095
  return ONE_LINE;
53840
54096
 
53841
54097
  if (isSiblingIsArray(path))
@@ -53921,7 +54177,7 @@ function isTwoStringsDifferentLength(strings) {
53921
54177
  const aLength = a.node.value.length;
53922
54178
  const bLength = b.node.value.length;
53923
54179
 
53924
- return round$1(bLength / aLength) > 2;
54180
+ return round(bLength / aLength) > 2;
53925
54181
  }
53926
54182
 
53927
54183
  function isInsideLoop(path) {
@@ -54011,7 +54267,7 @@ const isCurrentNewLine = (path) => {
54011
54267
 
54012
54268
  const {
54013
54269
  isStringLiteral: isStringLiteral$5,
54014
- isArrayExpression: isArrayExpression$2,
54270
+ isArrayExpression: isArrayExpression$3,
54015
54271
  isObjectExpression: isObjectExpression$3,
54016
54272
  isTemplateLiteral: isTemplateLiteral$2,
54017
54273
  } = lib_exports;
@@ -54050,8 +54306,8 @@ function isArrayInsideArray(path) {
54050
54306
  return false;
54051
54307
 
54052
54308
  const parentElements = path.parentPath.node.elements;
54053
- const parentHasArrays = parentElements.filter(isArrayExpression$2).length;
54054
- const lastNotArray = !isArrayExpression$2(parentElements.at(-1));
54309
+ const parentHasArrays = parentElements.filter(isArrayExpression$3).length;
54310
+ const lastNotArray = !isArrayExpression$3(parentElements.at(-1));
54055
54311
 
54056
54312
  if (parentHasArrays && lastNotArray)
54057
54313
  return false;
@@ -55647,7 +55903,7 @@ const {
55647
55903
  isExportDeclaration: isExportDeclaration$2,
55648
55904
  isDoWhileStatement,
55649
55905
  isBlockStatement: isBlockStatement$4,
55650
- isArrayExpression: isArrayExpression$1,
55906
+ isArrayExpression: isArrayExpression$2,
55651
55907
  } = lib_exports;
55652
55908
 
55653
55909
  const isFirstStatement = (path) => path.node.body[0];
@@ -55657,7 +55913,7 @@ const isMethodOrArrow = (path) => isArrowFunctionExpression(path) || isObjectMet
55657
55913
  const isInsideArrayTupleOfThree = (path) => {
55658
55914
  const {parentPath} = path.parentPath;
55659
55915
 
55660
- if (!isArrayExpression$1(parentPath))
55916
+ if (!isArrayExpression$2(parentPath))
55661
55917
  return false;
55662
55918
 
55663
55919
  const {length} = parentPath.node.elements;
@@ -55877,7 +56133,7 @@ const ForOfStatement = {
55877
56133
  const {
55878
56134
  isBlockStatement: isBlockStatement$3,
55879
56135
  isFunctionDeclaration,
55880
- isStatement: isStatement$3,
56136
+ isStatement: isStatement$2,
55881
56137
  isExpressionStatement: isExpressionStatement$4,
55882
56138
  isReturnStatement,
55883
56139
  isContinueStatement,
@@ -55989,7 +56245,7 @@ const IfStatement = {
55989
56245
 
55990
56246
  const nextPath = path.parentPath.getNextSibling();
55991
56247
 
55992
- if (path === partOfAlternate && !isTopLevel(path) && !isStatement$3(nextPath))
56248
+ if (path === partOfAlternate && !isTopLevel(path) && !isStatement$2(nextPath))
55993
56249
  print.newline();
55994
56250
 
55995
56251
  if (isLastEmptyInsideBody(path))
@@ -56247,7 +56503,7 @@ const isInsideAssignNextAssignFunction = (path) => {
56247
56503
 
56248
56504
  const {
56249
56505
  isBlockStatement: isBlockStatement$2,
56250
- isProgram: isProgram$4,
56506
+ isProgram: isProgram$3,
56251
56507
  isIfStatement,
56252
56508
  } = lib_exports;
56253
56509
 
@@ -56276,7 +56532,7 @@ const printLeadingCommentBlock$1 = (path, printer, semantics, {printComment}) =>
56276
56532
  if (hasTrailingComment(prev))
56277
56533
  return;
56278
56534
 
56279
- if (isBlockStatement$2(path.parentPath) && !isProgram$4(path.parentPath.parentPath))
56535
+ if (isBlockStatement$2(path.parentPath) && !isProgram$3(path.parentPath.parentPath))
56280
56536
  indent();
56281
56537
 
56282
56538
  printComment();
@@ -57879,390 +58135,170 @@ const JSXClosingElement = (path, {print}) => {
57879
58135
  };
57880
58136
 
57881
58137
  var baseVisitors = /*#__PURE__*/Object.freeze({
57882
- __proto__: null,
57883
- ArrayExpression: ArrayExpression,
57884
- ArrayPattern: ArrayPattern,
57885
- ArrowFunctionExpression: ArrowFunctionExpression,
57886
- AssignmentExpression: AssignmentExpression,
57887
- AssignmentPattern: AssignmentPattern,
57888
- AwaitExpression: AwaitExpression,
57889
- BigIntLiteral: BigIntLiteral,
57890
- BinaryExpression: BinaryExpression,
57891
- BlockStatement: BlockStatement,
57892
- BooleanLiteral: BooleanLiteral,
57893
- BreakStatement: BreakStatement,
57894
- CallExpression: CallExpression,
57895
- CatchClause: CatchClause,
57896
- ClassAccessorProperty: ClassAccessorProperty,
57897
- ClassDeclaration: ClassDeclaration,
57898
- ClassExpression: ClassExpression,
57899
- ClassMethod: ClassMethod,
57900
- ClassPrivateMethod: ClassPrivateMethod,
57901
- ClassPrivateProperty: ClassPrivateProperty,
57902
- ClassProperty: ClassProperty,
57903
- ConditionalExpression: ConditionalExpression,
57904
- ContinueStatement: ContinueStatement,
57905
- DebuggerStatement: DebuggerStatement,
57906
- Decorator: Decorator,
57907
- Directive: Directive,
57908
- DirectiveLiteral: DirectiveLiteral,
57909
- DoWhileStatement: DoWhileStatement,
57910
- EmptyStatement: EmptyStatement,
57911
- ExportAllDeclaration: ExportAllDeclaration,
57912
- ExportDefaultDeclaration: ExportDefaultDeclaration,
57913
- ExportDefaultSpecifier: ExportDefaultSpecifier,
57914
- ExportNamedDeclaration: ExportNamedDeclaration,
57915
- ExportNamespaceSpecifier: ExportNamespaceSpecifier,
57916
- ExportSpecifier: ExportSpecifier,
57917
- ExpressionStatement: ExpressionStatement,
57918
- ForInStatement: ForInStatement,
57919
- ForOfStatement: ForOfStatement,
57920
- ForStatement: ForStatement,
57921
- FunctionDeclaration: FunctionDeclaration,
57922
- FunctionExpression: FunctionExpression,
57923
- Identifier: Identifier,
57924
- IfStatement: IfStatement,
57925
- ImportAttribute: ImportAttribute,
57926
- ImportDeclaration: ImportDeclaration,
57927
- ImportExpression: ImportExpression,
57928
- InterpreterDirective: InterpreterDirective,
57929
- JSXAttribute: JSXAttribute,
57930
- JSXClosingElement: JSXClosingElement,
57931
- JSXClosingFragment: JSXClosingFragment,
57932
- JSXElement: JSXElement,
57933
- JSXEmptyExpression: JSXEmptyExpression,
57934
- JSXExpressionContainer: JSXExpressionContainer,
57935
- JSXFragment: JSXFragment,
57936
- JSXIdentifier: JSXIdentifier,
57937
- JSXMemberExpression: JSXMemberExpression,
57938
- JSXOpeningElement: JSXOpeningElement,
57939
- JSXOpeningFragment: JSXOpeningFragment,
57940
- JSXSpreadAttribute: JSXSpreadAttribute,
57941
- JSXText: JSXText,
57942
- LabeledStatement: LabeledStatement,
57943
- LogicalExpression: LogicalExpression,
57944
- MemberExpression: MemberExpression,
57945
- MetaProperty: MetaProperty,
57946
- NewExpression: NewExpression,
57947
- NullLiteral: NullLiteral,
57948
- NumericLiteral: NumericLiteral,
57949
- ObjectExpression: ObjectExpression,
57950
- ObjectMethod: ObjectMethod,
57951
- ObjectPattern: ObjectPattern,
57952
- ObjectProperty: ObjectProperty,
57953
- OptionalCallExpression: OptionalCallExpression,
57954
- OptionalMemberExpression: OptionalMemberExpression,
57955
- ParenthesizedExpression: ParenthesizedExpression,
57956
- PrivateName: PrivateName,
57957
- Program: Program,
57958
- RegExpLiteral: RegExpLiteral,
57959
- RestElement: RestElement,
57960
- ReturnStatement: ReturnStatement,
57961
- SequenceExpression: SequenceExpression,
57962
- SpreadElement: SpreadElement,
57963
- StaticBlock: StaticBlock,
57964
- StringLiteral: StringLiteral,
57965
- Super: Super,
57966
- SwitchStatement: SwitchStatement,
57967
- TSAnyKeyword: TSAnyKeyword,
57968
- TSArrayType: TSArrayType,
57969
- TSAsExpression: TSAsExpression,
57970
- TSBigIntKeyword: TSBigIntKeyword,
57971
- TSBooleanKeyword: TSBooleanKeyword,
57972
- TSCallSignatureDeclaration: TSCallSignatureDeclaration,
57973
- TSClassImplements: TSClassImplements,
57974
- TSConditionalType: TSConditionalType,
57975
- TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
57976
- TSConstructorType: TSConstructorType,
57977
- TSDeclareFunction: TSDeclareFunction,
57978
- TSDeclareMethod: TSDeclareMethod,
57979
- TSEnumDeclaration: TSEnumDeclaration,
57980
- TSEnumMember: TSEnumMember,
57981
- TSExportAssignment: TSExportAssignment,
57982
- TSExternalModuleReference: TSExternalModuleReference,
57983
- TSFunctionType: TSFunctionType,
57984
- TSImportEqualsDeclaration: TSImportEqualsDeclaration,
57985
- TSImportType: TSImportType,
57986
- TSIndexSignature: TSIndexSignature,
57987
- TSIndexedAccessType: TSIndexedAccessType,
57988
- TSInferType: TSInferType,
57989
- TSInstantiationExpression: TSInstantiationExpression,
57990
- TSInterfaceBody: TSInterfaceBody,
57991
- TSInterfaceDeclaration: TSInterfaceDeclaration,
57992
- TSInterfaceHeritage: TSInterfaceHeritage,
57993
- TSIntersectionType: TSIntersectionType,
57994
- TSLiteralType: TSLiteralType,
57995
- TSMappedType: TSMappedType,
57996
- TSMethodSignature: TSMethodSignature,
57997
- TSModuleBlock: TSModuleBlock,
57998
- TSModuleDeclaration: TSModuleDeclaration,
57999
- TSNamedTupleMember: TSNamedTupleMember,
58000
- TSNeverKeyword: TSNeverKeyword,
58001
- TSNonNullExpression: TSNonNullExpression,
58002
- TSNullKeyword: TSNullKeyword,
58003
- TSNumberKeyword: TSNumberKeyword,
58004
- TSObjectKeyword: TSObjectKeyword,
58005
- TSOptionalType: TSOptionalType,
58006
- TSParameterProperty: TSParameterProperty,
58007
- TSParenthesizedType: TSParenthesizedType,
58008
- TSPropertySignature: TSPropertySignature,
58009
- TSQualifiedName: TSQualifiedName,
58010
- TSRestType: TSRestType,
58011
- TSSatisfiesExpression: TSSatisfiesExpression,
58012
- TSStringKeyword: TSStringKeyword,
58013
- TSSymbolKeyword: TSSymbolKeyword,
58014
- TSTemplateLiteralType: TSTemplateLiteralType,
58015
- TSThisType: TSThisType,
58016
- TSTupleType: TSTupleType,
58017
- TSTypeAliasDeclaration: TSTypeAliasDeclaration,
58018
- TSTypeAnnotation: TSTypeAnnotation,
58019
- TSTypeAssertion: TSTypeAssertion,
58020
- TSTypeLiteral: TSTypeLiteral,
58021
- TSTypeOperator: TSTypeOperator,
58022
- TSTypeParameter: TSTypeParameter,
58023
- TSTypeParameterDeclaration: TSTypeParameterDeclaration,
58024
- TSTypeParameterInstantiation: TSTypeParameterInstantiation,
58025
- TSTypePredicate: TSTypePredicate,
58026
- TSTypeQuery: TSTypeQuery,
58027
- TSTypeReference: TSTypeReference,
58028
- TSUndefinedKeyword: TSUndefinedKeyword,
58029
- TSUnionType: TSUnionType,
58030
- TSUnknownKeyword: TSUnknownKeyword,
58031
- TSVoidKeyword: TSVoidKeyword,
58032
- TaggedTemplateExpression: TaggedTemplateExpression,
58033
- TemplateLiteral: TemplateLiteral,
58034
- ThisExpression: ThisExpression,
58035
- ThrowStatement: ThrowStatement,
58036
- TryStatement: TryStatement,
58037
- UnaryExpression: UnaryExpression,
58038
- UpdateExpression: UpdateExpression,
58039
- VariableDeclaration: VariableDeclaration,
58040
- VoidPattern: VoidPattern,
58041
- WhileStatement: WhileStatement,
58042
- WithStatement: WithStatement,
58043
- YieldExpression: YieldExpression
58138
+ __proto__: null,
58139
+ ArrayExpression: ArrayExpression,
58140
+ ArrayPattern: ArrayPattern,
58141
+ ArrowFunctionExpression: ArrowFunctionExpression,
58142
+ AssignmentExpression: AssignmentExpression,
58143
+ AssignmentPattern: AssignmentPattern,
58144
+ AwaitExpression: AwaitExpression,
58145
+ BigIntLiteral: BigIntLiteral,
58146
+ BinaryExpression: BinaryExpression,
58147
+ BlockStatement: BlockStatement,
58148
+ BooleanLiteral: BooleanLiteral,
58149
+ BreakStatement: BreakStatement,
58150
+ CallExpression: CallExpression,
58151
+ CatchClause: CatchClause,
58152
+ ClassAccessorProperty: ClassAccessorProperty,
58153
+ ClassDeclaration: ClassDeclaration,
58154
+ ClassExpression: ClassExpression,
58155
+ ClassMethod: ClassMethod,
58156
+ ClassPrivateMethod: ClassPrivateMethod,
58157
+ ClassPrivateProperty: ClassPrivateProperty,
58158
+ ClassProperty: ClassProperty,
58159
+ ConditionalExpression: ConditionalExpression,
58160
+ ContinueStatement: ContinueStatement,
58161
+ DebuggerStatement: DebuggerStatement,
58162
+ Decorator: Decorator,
58163
+ Directive: Directive,
58164
+ DirectiveLiteral: DirectiveLiteral,
58165
+ DoWhileStatement: DoWhileStatement,
58166
+ EmptyStatement: EmptyStatement,
58167
+ ExportAllDeclaration: ExportAllDeclaration,
58168
+ ExportDefaultDeclaration: ExportDefaultDeclaration,
58169
+ ExportDefaultSpecifier: ExportDefaultSpecifier,
58170
+ ExportNamedDeclaration: ExportNamedDeclaration,
58171
+ ExportNamespaceSpecifier: ExportNamespaceSpecifier,
58172
+ ExportSpecifier: ExportSpecifier,
58173
+ ExpressionStatement: ExpressionStatement,
58174
+ ForInStatement: ForInStatement,
58175
+ ForOfStatement: ForOfStatement,
58176
+ ForStatement: ForStatement,
58177
+ FunctionDeclaration: FunctionDeclaration,
58178
+ FunctionExpression: FunctionExpression,
58179
+ Identifier: Identifier,
58180
+ IfStatement: IfStatement,
58181
+ ImportAttribute: ImportAttribute,
58182
+ ImportDeclaration: ImportDeclaration,
58183
+ ImportExpression: ImportExpression,
58184
+ InterpreterDirective: InterpreterDirective,
58185
+ JSXAttribute: JSXAttribute,
58186
+ JSXClosingElement: JSXClosingElement,
58187
+ JSXClosingFragment: JSXClosingFragment,
58188
+ JSXElement: JSXElement,
58189
+ JSXEmptyExpression: JSXEmptyExpression,
58190
+ JSXExpressionContainer: JSXExpressionContainer,
58191
+ JSXFragment: JSXFragment,
58192
+ JSXIdentifier: JSXIdentifier,
58193
+ JSXMemberExpression: JSXMemberExpression,
58194
+ JSXOpeningElement: JSXOpeningElement,
58195
+ JSXOpeningFragment: JSXOpeningFragment,
58196
+ JSXSpreadAttribute: JSXSpreadAttribute,
58197
+ JSXText: JSXText,
58198
+ LabeledStatement: LabeledStatement,
58199
+ LogicalExpression: LogicalExpression,
58200
+ MemberExpression: MemberExpression,
58201
+ MetaProperty: MetaProperty,
58202
+ NewExpression: NewExpression,
58203
+ NullLiteral: NullLiteral,
58204
+ NumericLiteral: NumericLiteral,
58205
+ ObjectExpression: ObjectExpression,
58206
+ ObjectMethod: ObjectMethod,
58207
+ ObjectPattern: ObjectPattern,
58208
+ ObjectProperty: ObjectProperty,
58209
+ OptionalCallExpression: OptionalCallExpression,
58210
+ OptionalMemberExpression: OptionalMemberExpression,
58211
+ ParenthesizedExpression: ParenthesizedExpression,
58212
+ PrivateName: PrivateName,
58213
+ Program: Program,
58214
+ RegExpLiteral: RegExpLiteral,
58215
+ RestElement: RestElement,
58216
+ ReturnStatement: ReturnStatement,
58217
+ SequenceExpression: SequenceExpression,
58218
+ SpreadElement: SpreadElement,
58219
+ StaticBlock: StaticBlock,
58220
+ StringLiteral: StringLiteral,
58221
+ Super: Super,
58222
+ SwitchStatement: SwitchStatement,
58223
+ TSAnyKeyword: TSAnyKeyword,
58224
+ TSArrayType: TSArrayType,
58225
+ TSAsExpression: TSAsExpression,
58226
+ TSBigIntKeyword: TSBigIntKeyword,
58227
+ TSBooleanKeyword: TSBooleanKeyword,
58228
+ TSCallSignatureDeclaration: TSCallSignatureDeclaration,
58229
+ TSClassImplements: TSClassImplements,
58230
+ TSConditionalType: TSConditionalType,
58231
+ TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
58232
+ TSConstructorType: TSConstructorType,
58233
+ TSDeclareFunction: TSDeclareFunction,
58234
+ TSDeclareMethod: TSDeclareMethod,
58235
+ TSEnumDeclaration: TSEnumDeclaration,
58236
+ TSEnumMember: TSEnumMember,
58237
+ TSExportAssignment: TSExportAssignment,
58238
+ TSExternalModuleReference: TSExternalModuleReference,
58239
+ TSFunctionType: TSFunctionType,
58240
+ TSImportEqualsDeclaration: TSImportEqualsDeclaration,
58241
+ TSImportType: TSImportType,
58242
+ TSIndexSignature: TSIndexSignature,
58243
+ TSIndexedAccessType: TSIndexedAccessType,
58244
+ TSInferType: TSInferType,
58245
+ TSInstantiationExpression: TSInstantiationExpression,
58246
+ TSInterfaceBody: TSInterfaceBody,
58247
+ TSInterfaceDeclaration: TSInterfaceDeclaration,
58248
+ TSInterfaceHeritage: TSInterfaceHeritage,
58249
+ TSIntersectionType: TSIntersectionType,
58250
+ TSLiteralType: TSLiteralType,
58251
+ TSMappedType: TSMappedType,
58252
+ TSMethodSignature: TSMethodSignature,
58253
+ TSModuleBlock: TSModuleBlock,
58254
+ TSModuleDeclaration: TSModuleDeclaration,
58255
+ TSNamedTupleMember: TSNamedTupleMember,
58256
+ TSNeverKeyword: TSNeverKeyword,
58257
+ TSNonNullExpression: TSNonNullExpression,
58258
+ TSNullKeyword: TSNullKeyword,
58259
+ TSNumberKeyword: TSNumberKeyword,
58260
+ TSObjectKeyword: TSObjectKeyword,
58261
+ TSOptionalType: TSOptionalType,
58262
+ TSParameterProperty: TSParameterProperty,
58263
+ TSParenthesizedType: TSParenthesizedType,
58264
+ TSPropertySignature: TSPropertySignature,
58265
+ TSQualifiedName: TSQualifiedName,
58266
+ TSRestType: TSRestType,
58267
+ TSSatisfiesExpression: TSSatisfiesExpression,
58268
+ TSStringKeyword: TSStringKeyword,
58269
+ TSSymbolKeyword: TSSymbolKeyword,
58270
+ TSTemplateLiteralType: TSTemplateLiteralType,
58271
+ TSThisType: TSThisType,
58272
+ TSTupleType: TSTupleType,
58273
+ TSTypeAliasDeclaration: TSTypeAliasDeclaration,
58274
+ TSTypeAnnotation: TSTypeAnnotation,
58275
+ TSTypeAssertion: TSTypeAssertion,
58276
+ TSTypeLiteral: TSTypeLiteral,
58277
+ TSTypeOperator: TSTypeOperator,
58278
+ TSTypeParameter: TSTypeParameter,
58279
+ TSTypeParameterDeclaration: TSTypeParameterDeclaration,
58280
+ TSTypeParameterInstantiation: TSTypeParameterInstantiation,
58281
+ TSTypePredicate: TSTypePredicate,
58282
+ TSTypeQuery: TSTypeQuery,
58283
+ TSTypeReference: TSTypeReference,
58284
+ TSUndefinedKeyword: TSUndefinedKeyword,
58285
+ TSUnionType: TSUnionType,
58286
+ TSUnknownKeyword: TSUnknownKeyword,
58287
+ TSVoidKeyword: TSVoidKeyword,
58288
+ TaggedTemplateExpression: TaggedTemplateExpression,
58289
+ TemplateLiteral: TemplateLiteral,
58290
+ ThisExpression: ThisExpression,
58291
+ ThrowStatement: ThrowStatement,
58292
+ TryStatement: TryStatement,
58293
+ UnaryExpression: UnaryExpression,
58294
+ UpdateExpression: UpdateExpression,
58295
+ VariableDeclaration: VariableDeclaration,
58296
+ VoidPattern: VoidPattern,
58297
+ WhileStatement: WhileStatement,
58298
+ WithStatement: WithStatement,
58299
+ YieldExpression: YieldExpression
58044
58300
  });
58045
58301
 
58046
- const isString$c = (a) => typeof a === 'string';
58047
- const constant = (a) => () => a;
58048
- const {keys: keys$3} = Object;
58049
-
58050
- const rendy = (template, values, modifiers) => {
58051
- check$e(template, values);
58052
-
58053
- let result = template;
58054
- const names = keys$3(values) ;
58055
-
58056
- for (const key of names) {
58057
- const [parsedKey, value] = parseValue$1(key, values);
58058
- const str = constant(value);
58059
-
58060
- while (result.includes(parsedKey))
58061
- result = result.replace(parsedKey, str);
58062
- }
58063
-
58064
- if (result.includes('{{'))
58065
- result = result.replace(/{{.*?}}/g, '');
58066
-
58067
- return result;
58068
- };
58069
-
58070
- function check$e(template, values) {
58071
- if (!isString$c(template))
58072
- throw Error('template should be a string!');
58073
-
58074
- if (typeof values !== 'object')
58075
- throw Error('values should be an object!');
58076
- }
58077
-
58078
- function parseValue$1(key, values, modifiers) {
58079
- return [
58080
- `{{ ${key} }}`,
58081
- values[key],
58082
- ];
58083
- }
58084
-
58085
- var maybeSatisfy = (plugin) => {
58086
- if (!plugin.afterSatisfy && !plugin.beforeSatisfy && !plugin.satisfy)
58087
- return plugin;
58088
-
58089
- const {
58090
- satisfy,
58091
- afterSatisfy = satisfy,
58092
- beforeSatisfy = satisfy,
58093
- } = plugin;
58094
-
58095
- return {
58096
- afterIf: createIf(afterSatisfy),
58097
- beforeIf: createIf(beforeSatisfy),
58098
- ...plugin,
58099
- };
58100
- };
58101
-
58102
- const createIf = (getConditions) => {
58103
- const conditions = getConditions?.() || [];
58104
- return satisfy(conditions);
58105
- };
58106
-
58107
- const {
58108
- isProgram: isProgram$3,
58109
- isFile: isFile$1,
58110
- isStatement: isStatement$2,
58111
- expressionStatement,
58112
- program,
58113
- file,
58114
- } = lib_exports;
58115
-
58116
- const isFn$6 = (a) => typeof a === 'function';
58117
-
58118
- const maybeThrow = (a, path, b) => {
58119
- if (!a)
58120
- return;
58121
-
58122
- throw Error(rendy(b, {
58123
- path,
58124
- type: path.type,
58125
- }));
58126
- };
58127
-
58128
- const maybeStatement = (ast) => isStatement$2(ast) ? ast : expressionStatement(ast);
58129
-
58130
- const maybeProgram = (ast) => isProgram$3(ast) ? ast : program([
58131
- maybeStatement(ast),
58132
- ]);
58133
-
58134
- const maybeFile = (ast) => isFile$1(ast) ? ast : file(maybeProgram(ast));
58135
-
58136
- const maybeVisitor = (plugin, path, printer, options) => {
58137
- if (isFn$6(plugin))
58138
- return plugin(path, printer, options);
58139
-
58140
- return objectPlugin(plugin, path, printer, options);
58141
- };
58142
-
58143
- function objectPlugin(plugin, path, printer, semantics) {
58144
- const {
58145
- print,
58146
- split,
58147
- condition,
58148
- before = split,
58149
- beforeIf = condition,
58150
- after = split,
58151
- afterIf = condition,
58152
- } = maybeSatisfy(plugin);
58153
-
58154
- if (beforeIf?.(path, printer, semantics))
58155
- before(path, printer, semantics);
58156
-
58157
- print(path, printer, semantics);
58158
-
58159
- if (afterIf?.(path, printer, semantics))
58160
- after(path, printer, semantics);
58161
- }
58162
-
58163
- var stringSnakeCase = snakeCase;
58164
-
58165
- /*
58166
- snakeCase('the quick brown fox'); // 'the_quick_brown_fox'
58167
- snakeCase('the-quick-brown-fox'); // 'the_quick_brown_fox'
58168
- snakeCase('the_quick_brown_fox'); // 'the_quick_brown_fox'
58169
- snakeCase('theQuickBrownFox'); // 'the_quick_brown_fox'
58170
- snakeCase('theQuickBrown Fox'); // 'the_quick_brown_Fox'
58171
- snakeCase('thequickbrownfox'); // 'thequickbrownfox'
58172
- snakeCase('the - quick * brown# fox'); // 'the_quick_brown_fox'
58173
- snakeCase('theQUICKBrownFox'); // 'the_q_u_i_c_k_brown_fox'
58174
- */
58175
-
58176
- // any combination of spaces and punctuation characters
58177
- // thanks to http://stackoverflow.com/a/25575009
58178
- var wordSeparators = /[\s\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]+/;
58179
- var capitals = /[A-Z\u00C0-\u00D6\u00D9-\u00DD]/g;
58180
-
58181
- function snakeCase(str) {
58182
- //replace capitals with space + lower case equivalent for later parsing
58183
- str = str.replace(capitals, function(match) {
58184
- return ' ' + (match.toLowerCase() || match);
58185
- });
58186
- return str
58187
- .trim()
58188
- .split(wordSeparators)
58189
- .join('_');
58190
- }
58191
-
58192
- const {stringify: stringify$7} = JSON;
58193
- const {
58194
- LOG,
58195
- LOG_ALL,
58196
- LOG_TOKENS,
58197
- LOG_TERM,
58198
- LOG_DEBUG,
58199
- } = {};
58200
-
58201
- const createDebug$3 = (tokens) => (a) => {
58202
- if (!LOG_DEBUG)
58203
- return;
58204
-
58205
- tokens.push({
58206
- type: TYPES$3.DEBUG,
58207
- value: `/*__${stringSnakeCase(a)}*/`,
58208
- });
58209
- };
58210
-
58211
- const createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type, value}) => {
58212
- if (LOG_TOKENS) {
58213
- console.log(codeFrameColumns(stringify$7({
58214
- type,
58215
- value,
58216
- }), {}, {
58217
- highlightCode: true,
58218
- }));
58219
-
58220
- return;
58221
- }
58222
-
58223
- if (LOG_ALL) {
58224
- console.log(codeFrameColumns(value, {}, {
58225
- highlightCode: true,
58226
- }));
58227
-
58228
- return;
58229
- }
58230
-
58231
- if (LOG) {
58232
- if (value === newline) {
58233
- console.log(codeFrameColumns(store(), {}, {
58234
- highlightCode: true,
58235
- }));
58236
-
58237
- return;
58238
- }
58239
-
58240
- store(value);
58241
- }
58242
-
58243
- if (LOG_TERM)
58244
- browser$1.stdout.write(value);
58245
- };
58246
-
58247
- function createStore$1() {
58248
- let chunks = [];
58249
-
58250
- return (...args) => {
58251
- const [chunk] = args;
58252
-
58253
- if (args.length) {
58254
- chunks.push(chunk);
58255
- return;
58256
- }
58257
-
58258
- const result = chunks.join('');
58259
-
58260
- chunks = [];
58261
-
58262
- return result;
58263
- };
58264
- }
58265
-
58266
58302
  const isObject$7 = (a) => a && typeof a === 'object';
58267
58303
  const isBool$3 = (a) => typeof a === 'boolean';
58268
58304
 
@@ -58358,40 +58394,13 @@ const initSemantics = (format, semantics = {}) => ({
58358
58394
  roundBraces: parseRoundBraces(semantics),
58359
58395
  });
58360
58396
 
58361
- const isObject$6 = (a) => a && typeof a === 'object';
58362
- const {round} = Math;
58363
- const isString$b = (a) => typeof a === 'string';
58364
- const {assign: assign$9, freeze} = Object;
58365
-
58366
- const GET = '__';
58367
- const get = (path, command) => path.get(command.replace(GET, ''));
58368
-
58369
- const createAddToken = (tokens) => {
58370
- const log = createLog();
58371
-
58372
- return (token) => {
58373
- log(token);
58374
- tokens.push(token);
58375
- };
58376
- };
58397
+ const {assign: assign$a} = Object;
58377
58398
 
58378
- const tokenize = (ast, overrides) => {
58379
- const {
58380
- visitors,
58381
- format,
58382
- semantics,
58383
- } = parseOverrides(overrides);
58384
-
58385
- const tokens = [];
58386
- const addToken = createAddToken(tokens);
58387
- const debug = createDebug$3(tokens);
58399
+ const createIndent = ({format, addToken}) => {
58400
+ let i = 0;
58388
58401
 
58389
- const write = (value) => {
58390
- addToken({
58391
- type: TYPES$3.TOKEN,
58392
- value,
58393
- });
58394
- };
58402
+ const incIndent = () => ++i;
58403
+ const decIndent = () => --i;
58395
58404
 
58396
58405
  const indent = () => {
58397
58406
  addToken({
@@ -58400,73 +58409,87 @@ const tokenize = (ast, overrides) => {
58400
58409
  });
58401
58410
  };
58402
58411
 
58403
- const maybeIndent = (a) => a && indent();
58404
-
58405
- const maybeIndentInc = (a) => a && indent.inc();
58406
-
58407
- const maybeIndentDec = (a) => a && indent.dec();
58412
+ assign$a(indent, {
58413
+ inc: incIndent,
58414
+ dec: decIndent,
58415
+ getLevel() {
58416
+ return i;
58417
+ },
58418
+ });
58408
58419
 
58409
- const newline = () => {
58410
- addToken({
58411
- type: TYPES$3.NEWLINE,
58412
- value: format.newline,
58413
- });
58414
- };
58420
+ return indent;
58421
+ };
58422
+
58423
+ function printIndent(i, indent) {
58424
+ let result = '';
58425
+ ++i;
58415
58426
 
58416
- const maybeNewline = (a) => a && newline();
58427
+ while (--i > 0) {
58428
+ result += indent;
58429
+ }
58417
58430
 
58418
- const breakline = () => {
58419
- newline();
58420
- indent();
58421
- };
58431
+ return result;
58432
+ }
58433
+
58434
+ const isObject$6 = (a) => a && typeof a === 'object';
58435
+ const isString$c = (a) => typeof a === 'string';
58436
+
58437
+ const GET = '__';
58438
+ const get = (path, command) => path.get(command.replace(GET, ''));
58439
+
58440
+ const {freeze, assign: assign$9} = Object;
58441
+
58442
+ const createPrinter = (overrides) => {
58443
+ const tokens = [];
58444
+ const {
58445
+ format,
58446
+ semantics,
58447
+ visitors,
58448
+ } = parseOverrides(overrides);
58422
58449
 
58423
- const maybeBreakline = (a) => a && breakline();
58450
+ const addToken = createAddToken(tokens);
58451
+ const debug = createDebug$3(tokens);
58452
+ const write = createWrite(addToken);
58424
58453
 
58425
- const linebreak = () => {
58426
- indent();
58427
- newline();
58428
- };
58454
+ const indent = createIndent({
58455
+ format,
58456
+ addToken,
58457
+ });
58429
58458
 
58430
- const maybeLinebreak = (a) => a && linebreak();
58431
- const maybeWrite = (a, b) => a && write(b);
58459
+ const newline = createNewline({
58460
+ format,
58461
+ addToken,
58462
+ });
58432
58463
 
58433
- const space = () => {
58434
- addToken({
58435
- type: TYPES$3.SPACE,
58436
- value: format.space,
58437
- });
58438
- };
58464
+ const breakline = createBreakline({
58465
+ newline,
58466
+ indent,
58467
+ });
58439
58468
 
58440
- const maybeSpace = (a) => a && space();
58441
- let i = 0;
58442
- const incIndent = () => ++i;
58443
- const decIndent = () => --i;
58469
+ const linebreak = createLinebreak({
58470
+ indent,
58471
+ newline,
58472
+ });
58444
58473
 
58445
- assign$9(indent, {
58446
- inc: incIndent,
58447
- dec: decIndent,
58474
+ const space = createSpace({
58475
+ format,
58476
+ addToken,
58448
58477
  });
58449
58478
 
58450
- const splitter = () => {
58451
- addToken({
58452
- type: TYPES$3.SPLITTER,
58453
- value: format.splitter,
58454
- });
58455
- };
58479
+ const splitter = createSplitter({
58480
+ format,
58481
+ addToken,
58482
+ });
58456
58483
 
58457
- const quote = () => {
58458
- addToken({
58459
- type: TYPES$3.QUOTE,
58460
- value: format.quote,
58461
- });
58462
- };
58484
+ const endOfFile = createEndOfFile({
58485
+ format,
58486
+ addToken,
58487
+ });
58463
58488
 
58464
- const endOfFile = () => {
58465
- addToken({
58466
- type: TYPES$3.END_OF_FILE,
58467
- value: format.endOfFile,
58468
- });
58469
- };
58489
+ const quote = createQuote({
58490
+ addToken,
58491
+ format,
58492
+ });
58470
58493
 
58471
58494
  assign$9(write, {
58472
58495
  indent,
@@ -58479,6 +58502,15 @@ const tokenize = (ast, overrides) => {
58479
58502
  endOfFile,
58480
58503
  });
58481
58504
 
58505
+ const maybeBreakline = createMaybe(breakline);
58506
+ const maybeNewline = createMaybe(newline);
58507
+ const maybeLinebreak = createMaybe(linebreak);
58508
+ const maybeSpace = createMaybe(space);
58509
+
58510
+ const maybeWrite = createMaybeWrite({
58511
+ write,
58512
+ });
58513
+
58482
58514
  assign$9(maybeWrite, {
58483
58515
  newline: maybeNewline,
58484
58516
  breakline: maybeBreakline,
@@ -58486,6 +58518,8 @@ const tokenize = (ast, overrides) => {
58486
58518
  space: maybeSpace,
58487
58519
  });
58488
58520
 
58521
+ const maybeIndent = createMaybe(indent);
58522
+
58489
58523
  const maybe = {
58490
58524
  indent: maybeIndent,
58491
58525
  markAfter: maybeMarkAfter,
@@ -58493,117 +58527,138 @@ const tokenize = (ast, overrides) => {
58493
58527
  space: maybeSpace,
58494
58528
  };
58495
58529
 
58530
+ const maybeIndentInc = createMaybe(indent.inc);
58531
+ const maybeIndentDec = createMaybe(indent.dec);
58532
+
58496
58533
  assign$9(maybe.indent, {
58497
58534
  inc: maybeIndentInc,
58498
58535
  dec: maybeIndentDec,
58499
58536
  });
58500
58537
 
58538
+ const getMainPrinter = () => mainPrinter;
58539
+
58540
+ const traverse = createTraverse$6({
58541
+ maybeNewline,
58542
+ maybeLinebreak,
58543
+ maybeSpace,
58544
+ maybeBreakline,
58545
+ indent,
58546
+ write,
58547
+ debug,
58548
+ semantics,
58549
+ visitors,
58550
+ getMainPrinter,
58551
+ });
58552
+
58501
58553
  // should never change to avoid unexpected errors related to printing path, since it hard to debug
58502
58554
  const mainPrinter = freeze({
58503
58555
  indent,
58504
58556
  write,
58505
58557
  debug,
58506
- traverse,
58507
58558
  maybe,
58508
58559
  quote,
58509
58560
  store: fullstore(),
58561
+ traverse,
58510
58562
  });
58511
58563
 
58564
+ const getTokens = () => tokens;
58565
+
58566
+ return {
58567
+ getTokens,
58568
+ traverse,
58569
+ };
58570
+ };
58571
+
58572
+ const createTraverse$6 = (overrides) => function traverse(path) {
58573
+ const {
58574
+ write,
58575
+ debug,
58576
+ maybeLinebreak,
58577
+ maybeSpace,
58578
+ maybeBreakline,
58579
+ maybeNewline,
58580
+ indent,
58581
+ semantics,
58582
+ visitors,
58583
+ getMainPrinter,
58584
+ } = overrides;
58585
+
58586
+ const mainPrinter = getMainPrinter();
58587
+
58512
58588
  const currentTraversers = {
58513
58589
  ...baseVisitors,
58514
58590
  ...visitors,
58515
58591
  };
58516
58592
 
58517
- if (ast.parentPath)
58518
- pathTraverse(ast, traverse);
58519
- else
58520
- traverse3(maybeFile(ast), {
58521
- Program(path) {
58522
- traverse(path);
58523
- path.stop();
58524
- },
58525
- });
58593
+ const {type} = path;
58594
+ const currentTraverse = currentTraversers[type];
58526
58595
 
58527
- function traverse(path) {
58528
- const {type} = path;
58529
- const currentTraverse = currentTraversers[type];
58530
-
58531
- if (!path.node)
58532
- return;
58533
-
58534
- const print = createPrint(path, {
58535
- write,
58536
- traverse,
58537
- });
58538
-
58539
- assign$9(print, write, {
58540
- space,
58541
- round,
58542
- });
58543
-
58544
- const printer = {
58545
- ...mainPrinter,
58546
- print,
58547
- };
58548
-
58549
- const maybePrint = (a, b) => a && print(b);
58550
-
58551
- assign$9(maybePrint, {
58552
- newline: maybeNewline,
58553
- breakline: maybeBreakline,
58554
- linebreak: maybeLinebreak,
58555
- space: maybeSpace,
58556
- });
58557
-
58558
- assign$9(printer.maybe, {
58559
- print: maybePrint,
58560
- });
58561
-
58562
- maybeThrow(!currentTraverse, path, `☝️ Node type '{{ type }}' is not supported yet by @putout/printer: '{{ path }}'`);
58563
-
58564
- const currentIndent = i;
58565
- parseLeadingComments(path, printer, semantics, {
58566
- currentTraverse,
58567
- });
58568
-
58569
- // this is main thing
58570
- maybeVisitor(currentTraverse, path, printer, semantics);
58571
- parseTrailingComments(path, printer, semantics, {
58572
- currentTraverse,
58573
- });
58574
- maybeThrow(i !== currentIndent, path, `☝️Looks like indent level changed after token visitor: '{{ type }}', for code: '{{ path }}'`);
58575
-
58576
- debug(path.type);
58577
- }
58596
+ if (!path.node)
58597
+ return;
58578
58598
 
58579
- return tokens;
58580
- };
58581
-
58582
- function printIndent(i, indent) {
58583
- let result = '';
58584
- ++i;
58599
+ const print = createPrint(path, {
58600
+ write,
58601
+ traverse,
58602
+ });
58585
58603
 
58586
- while (--i > 0) {
58587
- result += indent;
58588
- }
58604
+ const printer = {
58605
+ ...mainPrinter,
58606
+ traverse,
58607
+ print,
58608
+ };
58589
58609
 
58590
- return result;
58591
- }
58592
-
58593
- const createPrint = (path, {traverse, write}) => (maybeLine) => {
58594
- if (maybeLine === path)
58595
- return null;
58610
+ const maybePrint = (a, b) => a && print(b);
58596
58611
 
58597
- const computed = computePath(path, maybeLine);
58612
+ assign$9(maybePrint, {
58613
+ newline: maybeNewline,
58614
+ breakline: maybeBreakline,
58615
+ linebreak: maybeLinebreak,
58616
+ space: maybeSpace,
58617
+ });
58618
+
58619
+ assign$9(printer.maybe, {
58620
+ print: maybePrint,
58621
+ });
58622
+
58623
+ maybeThrow(!currentTraverse, path, `☝️ Node type '{{ type }}' is not supported yet by @putout/printer: '{{ path }}'`);
58598
58624
 
58599
- if (isObject$6(computed))
58600
- return traverse(computed);
58625
+ const currentIndent = indent.getLevel();
58601
58626
 
58602
- return write(computed);
58627
+ parseLeadingComments(path, printer, semantics, {
58628
+ currentTraverse,
58629
+ });
58630
+
58631
+ // this is main thing
58632
+ maybeVisitor(currentTraverse, path, printer, semantics);
58633
+ parseTrailingComments(path, printer, semantics, {
58634
+ currentTraverse,
58635
+ });
58636
+
58637
+ maybeThrow(indent.getLevel() !== currentIndent, path, `☝️Looks like indent level changed after token visitor: '{{ type }}', for code: '{{ path }}'`);
58638
+
58639
+ debug(path.type);
58640
+ };
58641
+
58642
+ const createPrint = (path, {traverse, write}) => {
58643
+ const print = (maybeLine) => {
58644
+ if (maybeLine === path)
58645
+ return null;
58646
+
58647
+ const computed = computePath(path, maybeLine);
58648
+
58649
+ if (isObject$6(computed))
58650
+ return traverse(computed);
58651
+
58652
+ return write(computed);
58653
+ };
58654
+
58655
+ assign$9(print, write);
58656
+
58657
+ return print;
58603
58658
  };
58604
58659
 
58605
58660
  const computePath = (path, maybeLine) => {
58606
- if (isString$b(maybeLine) && maybeLine.startsWith(GET))
58661
+ if (isString$c(maybeLine) && maybeLine.startsWith(GET))
58607
58662
  return get(path, maybeLine);
58608
58663
 
58609
58664
  if (isObject$6(maybeLine))
@@ -58612,6 +58667,87 @@ const computePath = (path, maybeLine) => {
58612
58667
  return maybeLine;
58613
58668
  };
58614
58669
 
58670
+ const createWrite = (addToken) => (value) => {
58671
+ addToken({
58672
+ type: TYPES$3.TOKEN,
58673
+ value,
58674
+ });
58675
+ };
58676
+
58677
+ const createNewline = ({format, addToken}) => () => {
58678
+ addToken({
58679
+ type: TYPES$3.NEWLINE,
58680
+ value: format.newline,
58681
+ });
58682
+ };
58683
+
58684
+ const createMaybe = (fn) => (a) => a && fn();
58685
+
58686
+ const createBreakline = ({newline, indent}) => () => {
58687
+ newline();
58688
+ indent();
58689
+ };
58690
+
58691
+ const createLinebreak = ({indent, newline}) => () => {
58692
+ indent();
58693
+ newline();
58694
+ };
58695
+
58696
+ const createMaybeWrite = ({write}) => (a, b) => a && write(b);
58697
+
58698
+ const createSpace = ({format, addToken}) => () => {
58699
+ addToken({
58700
+ type: TYPES$3.SPACE,
58701
+ value: format.space,
58702
+ });
58703
+ };
58704
+
58705
+ const createSplitter = ({format, addToken}) => () => {
58706
+ addToken({
58707
+ type: TYPES$3.SPLITTER,
58708
+ value: format.splitter,
58709
+ });
58710
+ };
58711
+
58712
+ const createQuote = ({addToken, format}) => () => {
58713
+ addToken({
58714
+ type: TYPES$3.QUOTE,
58715
+ value: format.quote,
58716
+ });
58717
+ };
58718
+
58719
+ const createEndOfFile = ({format, addToken}) => () => {
58720
+ addToken({
58721
+ type: TYPES$3.END_OF_FILE,
58722
+ value: format.endOfFile,
58723
+ });
58724
+ };
58725
+
58726
+ const createAddToken = (tokens) => {
58727
+ const log = createLog();
58728
+
58729
+ return (token) => {
58730
+ log(token);
58731
+ tokens.push(token);
58732
+ };
58733
+ };
58734
+
58735
+ const tokenize = (ast, overrides) => {
58736
+ const {getTokens, traverse} = createPrinter(overrides);
58737
+
58738
+ if (ast.parentPath)
58739
+ pathTraverse(ast, traverse);
58740
+ else
58741
+ traverse3(maybeFile(ast), {
58742
+ Program(path) {
58743
+ traverse(path);
58744
+ path.stop();
58745
+ },
58746
+ });
58747
+
58748
+ return getTokens();
58749
+ };
58750
+
58615
58751
  function pathTraverse(ast, traverse) {
58616
58752
  ast.parentPath.traverse({
58617
58753
  enter(path) {
@@ -58789,7 +58925,7 @@ function check$d(ast) {
58789
58925
  throw Error('☝️Looks like ast not an object');
58790
58926
  }
58791
58927
 
58792
- const isString$a = (a) => typeof a === 'string';
58928
+ const isString$b = (a) => typeof a === 'string';
58793
58929
 
58794
58930
  const alignSpaces = (str) => {
58795
58931
  check$c(str);
@@ -58837,7 +58973,7 @@ function getSpaces(s) {
58837
58973
  }
58838
58974
 
58839
58975
  function check$c(str) {
58840
- if (!isString$a(str))
58976
+ if (!isString$b(str))
58841
58977
  throw Error('str should be a string!');
58842
58978
  }
58843
58979
 
@@ -58871,9 +59007,9 @@ const print$1 = (ast, options) => {
58871
59007
  return alignSpaces(code);
58872
59008
  };
58873
59009
 
58874
- const {isArray: isArray$c} = Array;
59010
+ const {isArray: isArray$e} = Array;
58875
59011
 
58876
- const maybeArray$5 = (a) => isArray$c(a) ? a : [a, {}];
59012
+ const maybeArray$5 = (a) => isArray$e(a) ? a : [a, {}];
58877
59013
 
58878
59014
  const print = (ast, options = {}) => {
58879
59015
  const [printer = 'putout', printerOptions] = maybeArray$5(options.printer);
@@ -59141,7 +59277,7 @@ function getCommentGroup({trailing, leading}) {
59141
59277
  return 'innerComments'; // Dangling comments, such as `[/* a */]`.
59142
59278
  }
59143
59279
 
59144
- const isString$9 = (a) => typeof a === 'string';
59280
+ const isString$a = (a) => typeof a === 'string';
59145
59281
  const isNumber$2 = (a) => typeof a === 'number';
59146
59282
  const isNull = (a) => a === null;
59147
59283
  const isBool$2 = (a) => typeof a === 'boolean';
@@ -59157,7 +59293,7 @@ var setLiteral = (node) => {
59157
59293
  return;
59158
59294
  }
59159
59295
 
59160
- if (isString$9(value)) {
59296
+ if (isString$a(value)) {
59161
59297
  node.type = 'StringLiteral';
59162
59298
  return;
59163
59299
  }
@@ -59466,8 +59602,8 @@ var onceExports = once$6.exports;
59466
59602
  const noop$3 = () => {};
59467
59603
 
59468
59604
  var empty = /*#__PURE__*/Object.freeze({
59469
- __proto__: null,
59470
- default: noop$3
59605
+ __proto__: null,
59606
+ default: noop$3
59471
59607
  });
59472
59608
 
59473
59609
  var require$$1 = /*@__PURE__*/getAugmentedNamespace(empty);
@@ -59498,8 +59634,8 @@ function privateMethods(Parser) {
59498
59634
  }
59499
59635
 
59500
59636
  var acornPrivateMethods = /*#__PURE__*/Object.freeze({
59501
- __proto__: null,
59502
- default: privateMethods
59637
+ __proto__: null,
59638
+ default: privateMethods
59503
59639
  });
59504
59640
 
59505
59641
  var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
@@ -59580,10 +59716,10 @@ const allowUndeclaredExports = true;
59580
59716
  const allowImportExportEverywhere = true;
59581
59717
 
59582
59718
  var options = /*#__PURE__*/Object.freeze({
59583
- __proto__: null,
59584
- allowImportExportEverywhere: allowImportExportEverywhere,
59585
- allowReturnOutsideFunction: allowReturnOutsideFunction,
59586
- allowUndeclaredExports: allowUndeclaredExports
59719
+ __proto__: null,
59720
+ allowImportExportEverywhere: allowImportExportEverywhere,
59721
+ allowReturnOutsideFunction: allowReturnOutsideFunction,
59722
+ allowUndeclaredExports: allowUndeclaredExports
59587
59723
  });
59588
59724
 
59589
59725
  const {assign: assign$5} = Object;
@@ -59820,7 +59956,7 @@ const tryThrowWithReason$1 = (fn, ...args) => {
59820
59956
  };
59821
59957
 
59822
59958
  const {assign: assign$4} = Object;
59823
- const isString$8 = (a) => typeof a === 'string';
59959
+ const isString$9 = (a) => typeof a === 'string';
59824
59960
 
59825
59961
  const parse$4 = (source, options) => {
59826
59962
  check$b(source);
@@ -59862,7 +59998,7 @@ const getParser = ({parser = 'babel', isTS, isJSX, printer}) => ({
59862
59998
  });
59863
59999
 
59864
60000
  function check$b(source) {
59865
- if (!isString$8(source))
60001
+ if (!isString$9(source))
59866
60002
  throw Error(`☝️ Looks like type of 'source' is not 'string', but '${typeof source}'`);
59867
60003
  }
59868
60004
 
@@ -59972,6 +60108,126 @@ function $cf838c15c8b009ba$export$22f15dd4e5be7e52(fn, o) {
59972
60108
  return f;
59973
60109
  }
59974
60110
 
60111
+ const wrap = (fn) => (...a) => (...b) => fn(...a, ...b);
60112
+
60113
+ var wraptile = (fn, ...a) => {
60114
+ check$a(fn);
60115
+
60116
+ if (a.length)
60117
+ return wrap(fn)(...a);
60118
+
60119
+ return wrap(fn);
60120
+ };
60121
+
60122
+ function check$a(fn) {
60123
+ if (typeof fn !== 'function')
60124
+ throw Error('fn should be a function!');
60125
+ }
60126
+
60127
+ var wraptile$1 = wraptile;
60128
+
60129
+ const {entries: entries$a} = Object;
60130
+ const {isArray: isArray$d} = Array;
60131
+
60132
+ var findPath = (parentPath) => {
60133
+ let current = {
60134
+ parentPath,
60135
+ };
60136
+
60137
+ const path = [];
60138
+
60139
+ while (current = current.parentPath) {
60140
+ path.unshift(findKey(current, current.parent));
60141
+ }
60142
+
60143
+ return path.join('.');
60144
+ };
60145
+
60146
+ function findKey(path, parent) {
60147
+ const {node} = path;
60148
+ let key;
60149
+ let value;
60150
+
60151
+ for ([key, value] of entries$a(parent)) {
60152
+ if (isArray$d(value)) {
60153
+ const index = value.indexOf(node);
60154
+
60155
+ if (index >= 0)
60156
+ return `${key}.${index}`;
60157
+
60158
+ continue;
60159
+ }
60160
+
60161
+ if (value === node)
60162
+ break;
60163
+ }
60164
+
60165
+ return key;
60166
+ }
60167
+
60168
+ const {isProgram: isProgram$2} = lib_exports;
60169
+ const hasWatermark = (watermark) => (path) => path.node?.[__watermark]?.has(watermark);
60170
+
60171
+ const __watermark = '__putout_runner_replace';
60172
+
60173
+ const watermark = (from, to, path) => {
60174
+ const {watermark, highWatermark} = create(from, to, path);
60175
+ const program = path.findParent(isProgram$2);
60176
+ const options = {
60177
+ watermark,
60178
+ highWatermark,
60179
+ program,
60180
+ path,
60181
+ };
60182
+
60183
+ return {
60184
+ init: wraptile$1(init, options),
60185
+ has: wraptile$1(has, options),
60186
+ add: wraptile$1(add, options),
60187
+ };
60188
+ };
60189
+
60190
+ function create(from, to, path) {
60191
+ const watermark = `${from} -> ${to}`;
60192
+ const highWatermark = `${findPath(path)}: ${watermark}`;
60193
+
60194
+ return {
60195
+ watermark,
60196
+ highWatermark,
60197
+ };
60198
+ }
60199
+
60200
+ function init({path, program}) {
60201
+ if (path.node)
60202
+ path.node[__watermark] = path.node[__watermark] || new Set();
60203
+
60204
+ program.node[__watermark] = program.node[__watermark] || new Set();
60205
+ }
60206
+
60207
+ function add({path, program, watermark, highWatermark}) {
60208
+ init({
60209
+ path,
60210
+ program,
60211
+ });
60212
+
60213
+ path?.node[__watermark].add(watermark);
60214
+ program.node[__watermark].add(highWatermark);
60215
+ }
60216
+
60217
+ const clearWatermark = (node) => {
60218
+ delete node?.[__watermark];
60219
+ };
60220
+
60221
+ function has({path, program, watermark, highWatermark}) {
60222
+ const {node} = path;
60223
+ const {loc} = node;
60224
+
60225
+ if (node?.[__watermark].has(watermark) || path.findParent(hasWatermark(watermark)) && !loc)
60226
+ return true;
60227
+
60228
+ return program.node[__watermark].has(highWatermark);
60229
+ }
60230
+
59975
60231
  const {
59976
60232
  nanomemoize = $cf838c15c8b009ba$export$22f15dd4e5be7e52,
59977
60233
  } = $cf838c15c8b009ba$export$22f15dd4e5be7e52;
@@ -60014,7 +60270,7 @@ const template$1 = nanomemoize((value, options) => {
60014
60270
 
60015
60271
  template$1.extractExpression = extractExpression$2;
60016
60272
 
60017
- template$1.ast = nanomemoize((value, options) => {
60273
+ const templateAst = nanomemoize((value, options) => {
60018
60274
  const result = index.ast(value, {
60019
60275
  ...defaults,
60020
60276
  ...options,
@@ -60023,6 +60279,14 @@ template$1.ast = nanomemoize((value, options) => {
60023
60279
  return extractExpression$2(result);
60024
60280
  });
60025
60281
 
60282
+ template$1.ast = (...a) => {
60283
+ const node = templateAst(...a);
60284
+
60285
+ clearWatermark(node);
60286
+
60287
+ return templateAst(...a);
60288
+ };
60289
+
60026
60290
  template$1.program = nanomemoize((value, options) => {
60027
60291
  const result = index.program(value, {
60028
60292
  ...defaults,
@@ -60050,31 +60314,6 @@ template$1.ast.fresh = (value, options) => {
60050
60314
  return extractExpression$2(result);
60051
60315
  };
60052
60316
 
60053
- const mergeShebang = (shebang, source) => {
60054
- if (!shebang)
60055
- return source;
60056
-
60057
- return `${shebang}\n${source}`;
60058
- };
60059
-
60060
- const cutShebang = (source) => {
60061
- if (source.indexOf('#'))
60062
- return [source, ''];
60063
-
60064
- const lines = source.split('\n');
60065
-
60066
- const result = lines
60067
- .slice(1)
60068
- .join('\n');
60069
-
60070
- const [shebang] = lines;
60071
-
60072
- return [
60073
- result,
60074
- `${shebang}\n`,
60075
- ];
60076
- };
60077
-
60078
60317
  // Copyright Joyent, Inc. and other Node contributors.
60079
60318
  //
60080
60319
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -60311,7 +60550,7 @@ var substr = 'ab'.substr(-1) === 'b' ?
60311
60550
  const isFn$5 = (a) => typeof a === 'function';
60312
60551
 
60313
60552
  const tryToCatch = async (fn, ...args) => {
60314
- check$a(fn);
60553
+ check$9(fn);
60315
60554
 
60316
60555
  try {
60317
60556
  return [null, await fn(...args)];
@@ -60320,7 +60559,7 @@ const tryToCatch = async (fn, ...args) => {
60320
60559
  }
60321
60560
  };
60322
60561
 
60323
- function check$a(fn) {
60562
+ function check$9(fn) {
60324
60563
  if (!isFn$5(fn))
60325
60564
  throw Error('fn should be a function!');
60326
60565
  }
@@ -60438,8 +60677,8 @@ function buildPluginsDirs(name) {
60438
60677
  }
60439
60678
 
60440
60679
  const isStr$2 = (a) => typeof a === 'string';
60441
- const {isArray: isArray$b} = Array;
60442
- const {entries: entries$a} = Object;
60680
+ const {isArray: isArray$c} = Array;
60681
+ const {entries: entries$9} = Object;
60443
60682
 
60444
60683
  const parsePluginNames = (plugins) => {
60445
60684
  const result = [];
@@ -60450,23 +60689,23 @@ const parsePluginNames = (plugins) => {
60450
60689
  continue;
60451
60690
  }
60452
60691
 
60453
- if (isArray$b(plugin)) {
60692
+ if (isArray$c(plugin)) {
60454
60693
  const [pluginName, fn] = plugin;
60455
60694
  result.push([pluginName, fn]);
60456
60695
  continue;
60457
60696
  }
60458
60697
 
60459
- result.push(...entries$a(plugin));
60698
+ result.push(...entries$9(plugin));
60460
60699
  }
60461
60700
 
60462
60701
  return result;
60463
60702
  };
60464
60703
 
60465
- const {isArray: isArray$a} = Array;
60704
+ const {isArray: isArray$b} = Array;
60466
60705
  const isBool$1 = (a) => typeof a === 'boolean';
60467
60706
  const isStr$1 = (a) => typeof a === 'string';
60468
60707
  const isObj = (a) => typeof a === 'object';
60469
- const {entries: entries$9} = Object;
60708
+ const {entries: entries$8} = Object;
60470
60709
  const {stringify: stringify$6} = JSON;
60471
60710
 
60472
60711
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
@@ -60491,9 +60730,9 @@ const parseRules = (rules) => {
60491
60730
  const plugin = null;
60492
60731
  const msg = '';
60493
60732
 
60494
- check$9(rules);
60733
+ check$8(rules);
60495
60734
 
60496
- for (const [rule, value] of entries$9(rules)) {
60735
+ for (const [rule, value] of entries$8(rules)) {
60497
60736
  if (isStr$1(value)) {
60498
60737
  result.push({
60499
60738
  rule,
@@ -60516,7 +60755,7 @@ const parseRules = (rules) => {
60516
60755
  continue;
60517
60756
  }
60518
60757
 
60519
- const looksLikeArray = isArray$a(value);
60758
+ const looksLikeArray = isArray$b(value);
60520
60759
  const looksLikeNormalArray = looksLikeArray && value.length;
60521
60760
 
60522
60761
  if (looksLikeNormalArray) {
@@ -60578,8 +60817,8 @@ function validateState(rule, value) {
60578
60817
  });
60579
60818
  }
60580
60819
 
60581
- function check$9(rules) {
60582
- if (isArray$a(rules))
60820
+ function check$8(rules) {
60821
+ if (isArray$b(rules))
60583
60822
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
60584
60823
  }
60585
60824
 
@@ -60684,22 +60923,26 @@ const getLoadedRules = (rules) => {
60684
60923
  return loadedRules;
60685
60924
  };
60686
60925
 
60687
- const isString$7 = (a) => typeof a === 'string';
60926
+ const isString$8 = (a) => typeof a === 'string';
60688
60927
 
60689
- const check$8 = (options) => {
60928
+ const check$7 = (options) => {
60690
60929
  if (!options || typeof options !== 'object')
60691
60930
  throw Error('options should be an object!');
60692
60931
  };
60693
60932
 
60694
60933
  const checkRule = (rule) => {
60695
- if (!isString$7(rule))
60934
+ if (!isString$8(rule))
60696
60935
  throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
60697
60936
  };
60698
60937
 
60699
60938
  const validateRulesRelations = (options) => {
60700
- check$8(options);
60939
+ check$7(options);
60940
+
60941
+ const {
60942
+ pluginNames = [],
60943
+ rules = {},
60944
+ } = options;
60701
60945
 
60702
- const {pluginNames = [], rules = {}} = options;
60703
60946
  const items = parsePluginNames(pluginNames);
60704
60947
 
60705
60948
  validateRules({
@@ -60708,13 +60951,13 @@ const validateRulesRelations = (options) => {
60708
60951
  });
60709
60952
  };
60710
60953
 
60711
- const {entries: entries$8, fromEntries} = Object;
60954
+ const {entries: entries$7, fromEntries} = Object;
60712
60955
  const cut = (a) => a.split('/')[0];
60713
60956
 
60714
60957
  const enableNestedRules = (rules) => {
60715
60958
  const newRules = new Map();
60716
60959
 
60717
- for (const [rule, value] of entries$8(rules)) {
60960
+ for (const [rule, value] of entries$7(rules)) {
60718
60961
  if (newRules.has(rule))
60719
60962
  continue;
60720
60963
 
@@ -60763,8 +61006,8 @@ var validatePlugin = ({plugin, rule}) => {
60763
61006
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
60764
61007
  };
60765
61008
 
60766
- const {isArray: isArray$9} = Array;
60767
- const maybeTuple = (a) => isArray$9(a) ? a : ['on', a];
61009
+ const {isArray: isArray$a} = Array;
61010
+ const maybeTuple = (a) => isArray$a(a) ? a : ['on', a];
60768
61011
 
60769
61012
  // Would be great to have ability to filter
60770
61013
  // disabled plugins and prevent them from loading
@@ -60807,9 +61050,13 @@ function isExactRuleEnabled(name, status, rules) {
60807
61050
  const loadPluginAsync = createAsyncLoader('plugin');
60808
61051
 
60809
61052
  const loadPluginsAsync = async (options) => {
60810
- check$8(options);
61053
+ check$7(options);
61054
+
61055
+ const {
61056
+ pluginNames = [],
61057
+ rules = {},
61058
+ } = options;
60811
61059
 
60812
- const {pluginNames = [], rules = {}} = options;
60813
61060
  const {
60814
61061
  items,
60815
61062
  loadedRules,
@@ -60899,12 +61146,16 @@ function parseRuleName(rule) {
60899
61146
  return rule;
60900
61147
  }
60901
61148
 
60902
- const {isArray: isArray$8} = Array;
61149
+ const {isArray: isArray$9} = Array;
60903
61150
 
60904
61151
  const loadPlugins = (options) => {
60905
- check$8(options);
61152
+ check$7(options);
61153
+
61154
+ const {
61155
+ pluginNames = [],
61156
+ rules = {},
61157
+ } = options;
60906
61158
 
60907
- const {pluginNames = [], rules = {}} = options;
60908
61159
  const {
60909
61160
  items,
60910
61161
  loadedRules,
@@ -60931,16 +61182,17 @@ const parseRule = (rule) => rule
60931
61182
  .replace('import:@putout/plugin-', '')
60932
61183
  .replace('@putout/plugin-', '');
60933
61184
 
60934
- const maybeFromTuple = (a) => isArray$8(a) ? a[1] : a;
61185
+ const maybeFromTuple = (a) => isArray$9(a) ? a[1] : a;
60935
61186
 
60936
61187
  function loadAllPlugins({items, loadedRules}) {
60937
61188
  const plugins = [];
60938
61189
 
60939
61190
  for (const [rule, itemPlugin] of items) {
61191
+ checkRule(rule);
61192
+
60940
61193
  if (!isEnabled(rule, loadedRules))
60941
61194
  continue;
60942
61195
 
60943
- checkRule(rule);
60944
61196
  const parsedRule = parseRule(rule);
60945
61197
 
60946
61198
  const [name, namespace] = splitRule(rule);
@@ -61017,21 +61269,12 @@ const isFn$4 = (a) => typeof a === 'function';
61017
61269
  const getPath$1 = (path) => path.path || path;
61018
61270
  const debug$4 = createDebug$1('putout:runner:fix');
61019
61271
 
61020
- const chooseFixArgs = ({path, pathOptions, options}) => {
61021
- if (pathOptions)
61022
- return [
61023
- path,
61024
- pathOptions, {
61025
- options,
61026
- },
61027
- ];
61028
-
61029
- return [
61030
- path, {
61031
- options,
61032
- },
61033
- ];
61034
- };
61272
+ const chooseFixArgs = ({path, pathOptions, options}) => [
61273
+ path, {
61274
+ options,
61275
+ ...pathOptions,
61276
+ },
61277
+ ];
61035
61278
 
61036
61279
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
61037
61280
  const [e] = tryCatch(fix, ...chooseFixArgs({
@@ -61080,7 +61323,7 @@ function validate$1(name, fn) {
61080
61323
 
61081
61324
  const getPath = (item) => item.path || item[0] || item;
61082
61325
 
61083
- const getPosition = (path, shebang) => {
61326
+ const getPosition = (path) => {
61084
61327
  const parsedPath = getPath(path);
61085
61328
 
61086
61329
  validatePath(parsedPath);
@@ -61090,14 +61333,14 @@ const getPosition = (path, shebang) => {
61090
61333
 
61091
61334
  if (!loc)
61092
61335
  return {
61093
- line: 0,
61336
+ line: 1,
61094
61337
  column: 1,
61095
61338
  };
61096
61339
 
61097
61340
  const {line, column} = node.loc.start;
61098
61341
 
61099
61342
  return {
61100
- line: shebang ? line + 1 : line,
61343
+ line,
61101
61344
  column: column + 1,
61102
61345
  };
61103
61346
  };
@@ -61107,8 +61350,8 @@ function validatePath(path) {
61107
61350
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
61108
61351
  }
61109
61352
 
61110
- const {isArray: isArray$7} = Array;
61111
- const maybeArray$3 = (a) => isArray$7(a) ? a : [a];
61353
+ const {isArray: isArray$8} = Array;
61354
+ const maybeArray$3 = (a) => isArray$8(a) ? a : [a];
61112
61355
 
61113
61356
  var maybeArray$4 = (a) => {
61114
61357
  if (!a)
@@ -61119,15 +61362,23 @@ var maybeArray$4 = (a) => {
61119
61362
 
61120
61363
  const isFn$3 = (a) => typeof a === 'function';
61121
61364
  const {stringify: stringify$4} = JSON;
61365
+ const {isArray: isArray$7} = Array;
61122
61366
 
61123
61367
  const validate = (name, fn) => {
61368
+ if (name === 'include-items') {
61369
+ if (!isArray$7(fn))
61370
+ throw Error(`☝️ Looks like 'include' does not return an 'array'. More on using Includer: https://git.io/JqcMn`);
61371
+
61372
+ return;
61373
+ }
61374
+
61124
61375
  if (!isFn$3(fn))
61125
61376
  throw Error(`☝️ Looks like '${name}' is not a 'function' but '${typeof fn}' with value: '${stringify$4(fn)}'. More on using Includer: https://git.io/JqcMn`);
61126
61377
  };
61127
61378
 
61128
61379
  const {
61129
61380
  values,
61130
- entries: entries$7,
61381
+ entries: entries$6,
61131
61382
  assign: assign$2,
61132
61383
  } = Object;
61133
61384
 
@@ -61186,7 +61437,7 @@ function createStore({set, get}) {
61186
61437
  map = {};
61187
61438
  };
61188
61439
 
61189
- fn.entries = () => entries$7(map);
61440
+ fn.entries = () => entries$6(map);
61190
61441
 
61191
61442
  return fn;
61192
61443
  };
@@ -61231,7 +61482,7 @@ const parse$3 = (name, plugin, options) => {
61231
61482
  return list;
61232
61483
  };
61233
61484
 
61234
- var mergeVisitors = (pluginsToMerge, {fix, shebang, template}) => {
61485
+ var mergeVisitors = (pluginsToMerge, {fix, template}) => {
61235
61486
  const mergeItems = [];
61236
61487
  const pushed = {};
61237
61488
 
@@ -61247,7 +61498,6 @@ var mergeVisitors = (pluginsToMerge, {fix, shebang, template}) => {
61247
61498
  } = getStore(plugin, {
61248
61499
  fix,
61249
61500
  rule,
61250
- shebang,
61251
61501
  msg,
61252
61502
  options,
61253
61503
  });
@@ -61290,7 +61540,7 @@ var mergeVisitors = (pluginsToMerge, {fix, shebang, template}) => {
61290
61540
  };
61291
61541
  };
61292
61542
 
61293
- function getStore(plugin, {fix, rule, shebang, msg, options}) {
61543
+ function getStore(plugin, {fix, rule, msg, options}) {
61294
61544
  const store = mapStore();
61295
61545
  const list = listStore();
61296
61546
  const upstore = upStore();
@@ -61299,8 +61549,11 @@ function getStore(plugin, {fix, rule, shebang, msg, options}) {
61299
61549
  const paths = pathStore();
61300
61550
 
61301
61551
  const push = (path, pathOptions) => {
61302
- const position = getPosition(path, shebang);
61303
- const message = msg || plugin.report(path, pathOptions);
61552
+ const position = getPosition(path);
61553
+ const message = msg || plugin.report(path, {
61554
+ options,
61555
+ ...pathOptions,
61556
+ });
61304
61557
 
61305
61558
  placesStore({
61306
61559
  message,
@@ -61347,7 +61600,7 @@ function superFind({rule, find, ast, options, template, traverse = traverse3}) {
61347
61600
  };
61348
61601
 
61349
61602
  const returnItems = find(ast, {
61350
- traverse: createTraverse$4({
61603
+ traverse: createTraverse$5({
61351
61604
  rule,
61352
61605
  options,
61353
61606
  template,
@@ -61365,7 +61618,7 @@ function superFind({rule, find, ast, options, template, traverse = traverse3}) {
61365
61618
  ];
61366
61619
  }
61367
61620
 
61368
- const createTraverse$4 = ({rule, options, template, traverse}) => (ast, visitor) => {
61621
+ const createTraverse$5 = ({rule, options, template, traverse}) => (ast, visitor) => {
61369
61622
  const templateVisitors = merge$1(template({
61370
61623
  rule,
61371
61624
  visitor,
@@ -61375,7 +61628,7 @@ const createTraverse$4 = ({rule, options, template, traverse}) => (ast, visitor)
61375
61628
  return traverse(ast, templateVisitors);
61376
61629
  };
61377
61630
 
61378
- const isString$6 = (a) => typeof a === 'string';
61631
+ const isString$7 = (a) => typeof a === 'string';
61379
61632
  const isUndefined = (a) => typeof a === 'undefined';
61380
61633
  const isEmpty = (obj) => !Object.keys(obj).length;
61381
61634
 
@@ -61385,7 +61638,7 @@ function jessy(selector, divider, value) {
61385
61638
  divider = '.';
61386
61639
  }
61387
61640
 
61388
- check$7(selector, value);
61641
+ check$6(selector, value);
61389
61642
 
61390
61643
  if (!selector)
61391
61644
  return value;
@@ -61418,8 +61671,8 @@ function jessy(selector, divider, value) {
61418
61671
  return value;
61419
61672
  }
61420
61673
 
61421
- function check$7(selector, obj) {
61422
- if (!isString$6(selector))
61674
+ function check$6(selector, obj) {
61675
+ if (!isString$7(selector))
61423
61676
  throw Error('selector should be string!');
61424
61677
 
61425
61678
  if (typeof obj !== 'object')
@@ -61428,7 +61681,7 @@ function check$7(selector, obj) {
61428
61681
 
61429
61682
  const isNumber$1 = (a) => !Number.isNaN(a) && typeof a === 'number';
61430
61683
  const isNumberLike = (a, b = Number(a)) => isNumber$1(b);
61431
- const isString$5 = (a) => typeof a === 'string';
61684
+ const isString$6 = (a) => typeof a === 'string';
61432
61685
  const notSecure = (a) => /__proto__|prototype/.test(a);
61433
61686
 
61434
61687
  function nessy(selector, value, divider, obj) {
@@ -61439,7 +61692,7 @@ function nessy(selector, value, divider, obj) {
61439
61692
 
61440
61693
  const result = obj;
61441
61694
 
61442
- check$6(selector);
61695
+ check$5(selector);
61443
61696
 
61444
61697
  const array = selector
61445
61698
  .split(divider)
@@ -61464,8 +61717,8 @@ function nessy(selector, value, divider, obj) {
61464
61717
 
61465
61718
  return result;
61466
61719
  }
61467
- function check$6(selector) {
61468
- if (!isString$5(selector))
61720
+ function check$5(selector) {
61721
+ if (!isString$6(selector))
61469
61722
  throw Error('selector should be string!');
61470
61723
  }
61471
61724
 
@@ -61543,14 +61796,14 @@ const isTemplate = (a) => /[(;={.\s]/.test(a) || !/^[A-Z]/.test(a);
61543
61796
 
61544
61797
  const is = (str, array = ALL) => {
61545
61798
  for (const item of array) {
61546
- if (check$5(str, item))
61799
+ if (check$4(str, item))
61547
61800
  return true;
61548
61801
  }
61549
61802
 
61550
61803
  return false;
61551
61804
  };
61552
61805
 
61553
- function check$5(str, item) {
61806
+ function check$4(str, item) {
61554
61807
  if (isStr(item))
61555
61808
  return str === item;
61556
61809
 
@@ -61851,15 +62104,15 @@ const {
61851
62104
 
61852
62105
  const {extractExpression: extractExpression$1} = template$1;
61853
62106
 
61854
- const {entries: entries$6} = Object;
62107
+ const {entries: entries$5} = Object;
61855
62108
  const isNumber = (a) => typeof a === 'number';
61856
- const isString$4 = (a) => typeof a === 'string';
62109
+ const isString$5 = (a) => typeof a === 'string';
61857
62110
 
61858
62111
  const parseNode$1 = (a) => a.node || a;
61859
62112
  const {stringify: stringify$3} = JSON;
61860
62113
 
61861
62114
  const getTemplateValues = (node, str) => {
61862
- if (!isString$4(str))
62115
+ if (!isString$5(str))
61863
62116
  throw Error(`☝️ Looks like argument 'template' of 'getTemplateValues(node, template)': is not a string, but '${stringify$3(str)}'`);
61864
62117
 
61865
62118
  node = parseNode$1(node);
@@ -61936,7 +62189,7 @@ function findVarsWays(node) {
61936
62189
  function getValues({waysFrom, node}) {
61937
62190
  const result = {};
61938
62191
 
61939
- for (const [name, ways] of entries$6(waysFrom)) {
62192
+ for (const [name, ways] of entries$5(waysFrom)) {
61940
62193
  for (let way of ways) {
61941
62194
  if (isImportsStr(name))
61942
62195
  way = way.replace(/\.0.local$/, '');
@@ -61963,7 +62216,7 @@ const makeRaw = (a) => a.replace('`', '\\`');
61963
62216
  function setValues({waysTo, values, path}) {
61964
62217
  const node = extractExpression$1(path.node);
61965
62218
 
61966
- for (const [name, ways] of entries$6(waysTo)) {
62219
+ for (const [name, ways] of entries$5(waysTo)) {
61967
62220
  for (let way of ways) {
61968
62221
  if (!way) {
61969
62222
  replaceWith(path, values[name]);
@@ -62456,7 +62709,7 @@ function superCompareIterate(node, template) {
62456
62709
 
62457
62710
  const debug$2 = createDebug$1('putout:runner:template');
62458
62711
 
62459
- const {entries: entries$5} = Object;
62712
+ const {entries: entries$4} = Object;
62460
62713
  const isFn$2 = (a) => typeof a === 'function';
62461
62714
 
62462
62715
  const log$3 = (rule, path) => {
@@ -62488,7 +62741,7 @@ var template = ({rule, visitor, options}) => {
62488
62741
  const nodesExclude = maybeArray$4(options.exclude);
62489
62742
  const nodesInclude = maybeArray$4(options.include);
62490
62743
 
62491
- for (const [tmpl, fn] of entries$5(visitor)) {
62744
+ for (const [tmpl, fn] of entries$4(visitor)) {
62492
62745
  if (!tmpl)
62493
62746
  continue;
62494
62747
 
@@ -63095,6 +63348,10 @@ const include$1 = ({rule, plugin, msg, options}) => {
63095
63348
  validate('include', include);
63096
63349
  validate('report', report);
63097
63350
 
63351
+ const includeItems = include();
63352
+
63353
+ validate('include-items', includeItems);
63354
+
63098
63355
  const traverse = getTraverse(include(), filter, rule);
63099
63356
 
63100
63357
  return {
@@ -63139,123 +63396,6 @@ const getTraverse = (include, filter, rule) => ({push, options}) => {
63139
63396
  return result;
63140
63397
  };
63141
63398
 
63142
- const wrap = (fn) => (...a) => (...b) => fn(...a, ...b);
63143
-
63144
- var wraptile = (fn, ...a) => {
63145
- check$4(fn);
63146
-
63147
- if (a.length)
63148
- return wrap(fn)(...a);
63149
-
63150
- return wrap(fn);
63151
- };
63152
-
63153
- function check$4(fn) {
63154
- if (typeof fn !== 'function')
63155
- throw Error('fn should be a function!');
63156
- }
63157
-
63158
- var wraptile$1 = wraptile;
63159
-
63160
- const {entries: entries$4} = Object;
63161
- const {isArray: isArray$3} = Array;
63162
-
63163
- var findPath = (parentPath) => {
63164
- let current = {
63165
- parentPath,
63166
- };
63167
-
63168
- const path = [];
63169
-
63170
- while (current = current.parentPath) {
63171
- path.unshift(findKey(current, current.parent));
63172
- }
63173
-
63174
- return path.join('.');
63175
- };
63176
-
63177
- function findKey(path, parent) {
63178
- const {node} = path;
63179
- let key;
63180
- let value;
63181
-
63182
- for ([key, value] of entries$4(parent)) {
63183
- if (isArray$3(value)) {
63184
- const index = value.indexOf(node);
63185
-
63186
- if (index >= 0)
63187
- return `${key}.${index}`;
63188
-
63189
- continue;
63190
- }
63191
-
63192
- if (value === node)
63193
- break;
63194
- }
63195
-
63196
- return key;
63197
- }
63198
-
63199
- const {isProgram: isProgram$2} = lib_exports;
63200
- const name = '__putout_runner_replace';
63201
- const hasWatermark = (watermark) => (path) => path.node?.[name]?.has(watermark);
63202
-
63203
- const watermark = (from, to, path) => {
63204
- const {watermark, highWatermark} = create(from, to, path);
63205
- const program = path.findParent(isProgram$2);
63206
- const options = {
63207
- watermark,
63208
- highWatermark,
63209
- program,
63210
- path,
63211
- };
63212
-
63213
- return {
63214
- init: wraptile$1(init, options),
63215
- has: wraptile$1(has, options),
63216
- add: wraptile$1(add, options),
63217
- };
63218
- };
63219
-
63220
- const REPLACE_WATERMARK = name;
63221
-
63222
- function create(from, to, path) {
63223
- const watermark = `${from} -> ${to}`;
63224
- const highWatermark = `${findPath(path)}: ${watermark}`;
63225
-
63226
- return {
63227
- watermark,
63228
- highWatermark,
63229
- };
63230
- }
63231
-
63232
- function init({path, program}) {
63233
- if (path.node)
63234
- path.node[name] = path.node[name] || new Set();
63235
-
63236
- program.node[name] = program.node[name] || new Set();
63237
- }
63238
-
63239
- function add({path, program, watermark, highWatermark}) {
63240
- init({
63241
- path,
63242
- program,
63243
- });
63244
-
63245
- path?.node[name].add(watermark);
63246
- program.node[name].add(highWatermark);
63247
- }
63248
-
63249
- function has({path, program, watermark, highWatermark}) {
63250
- const {node} = path;
63251
- const {loc} = node;
63252
-
63253
- if (node?.[name].has(watermark) || path.findParent(hasWatermark(watermark)) && !loc)
63254
- return true;
63255
-
63256
- return program.node[name].has(highWatermark);
63257
- }
63258
-
63259
63399
  const debug$1 = createDebug$1('putout:runner:replace');
63260
63400
 
63261
63401
  const log$1 = (from, path) => {
@@ -63279,7 +63419,7 @@ const PRINT_OPTIONS = {
63279
63419
  }],
63280
63420
  };
63281
63421
 
63282
- const isString$3 = (a) => typeof a === 'string';
63422
+ const isString$4 = (a) => typeof a === 'string';
63283
63423
 
63284
63424
  const {keys: keys$1, entries: entries$3} = Object;
63285
63425
  const {stringify: stringify$1} = JSON;
@@ -63328,10 +63468,6 @@ const replace = ({rule, plugin, msg, options}) => {
63328
63468
  };
63329
63469
  };
63330
63470
 
63331
- const clearWatermark = (ast) => {
63332
- delete ast.program[REPLACE_WATERMARK];
63333
- };
63334
-
63335
63471
  const isFn$1 = (a) => typeof a === 'function';
63336
63472
 
63337
63473
  const parseExpression = (nodeFrom, {node}) => {
@@ -63341,7 +63477,7 @@ const parseExpression = (nodeFrom, {node}) => {
63341
63477
  return node;
63342
63478
  };
63343
63479
 
63344
- const fix$a = (from, to, path) => {
63480
+ const fix$b = (from, to, path) => {
63345
63481
  const nodeFrom = template$1.ast(from);
63346
63482
  const mark = watermark(from, to, path);
63347
63483
 
@@ -63396,7 +63532,7 @@ const getFix = (items, match) => (path) => {
63396
63532
  const matchFn = match[from];
63397
63533
 
63398
63534
  if (!matchFn || runMatch(path, nodeFrom, matchFn))
63399
- fix$a(from, to, path);
63535
+ fix$b(from, to, path);
63400
63536
  }
63401
63537
  }
63402
63538
  };
@@ -63441,7 +63577,7 @@ function parseTo(to, values, path) {
63441
63577
  return toStr;
63442
63578
  }
63443
63579
 
63444
- if (!isString$3(toStr))
63580
+ if (!isString$4(toStr))
63445
63581
  throw Error(`☝️ Looks like you passed 'replace' value with a wrong type. Allowed: 'string', 'node' and 'path'. Received: '${typeof toStr}' with value '${toStr}'.`);
63446
63582
 
63447
63583
  return template$1.ast.fresh(toStr);
@@ -63513,7 +63649,7 @@ const {
63513
63649
  } = lib_exports;
63514
63650
 
63515
63651
  const {keys} = Object;
63516
- const isString$2 = (a) => typeof a === 'string';
63652
+ const isString$3 = (a) => typeof a === 'string';
63517
63653
 
63518
63654
  const getLastVarPath = (bodyPath) => bodyPath
63519
63655
  .filter(isVariableDeclaration)
@@ -63539,13 +63675,13 @@ const TS_EXCLUDE = [
63539
63675
  ];
63540
63676
 
63541
63677
  const declare$1 = (declarations) => ({
63542
- report: report$5,
63678
+ report: report$6,
63543
63679
  include,
63544
- fix: fix$9(declarations),
63680
+ fix: fix$a(declarations),
63545
63681
  filter: filter(declarations),
63546
63682
  });
63547
63683
 
63548
- const report$5 = (path) => {
63684
+ const report$6 = (path) => {
63549
63685
  const {name} = path.node;
63550
63686
  const peaceOfName = cutName(name);
63551
63687
 
@@ -63585,7 +63721,7 @@ const filter = (declarations) => (path, {options}) => {
63585
63721
  return parseCode(type, allDeclarations[name]);
63586
63722
  };
63587
63723
 
63588
- const fix$9 = (declarations) => (path, {options}) => {
63724
+ const fix$a = (declarations) => (path, {options}) => {
63589
63725
  const type = getModuleType(path);
63590
63726
 
63591
63727
  const allDeclarations = {
@@ -63607,7 +63743,7 @@ const fix$9 = (declarations) => (path, {options}) => {
63607
63743
  };
63608
63744
 
63609
63745
  const parseCode = (type, current) => {
63610
- if (isString$2(current))
63746
+ if (isString$3(current))
63611
63747
  return current;
63612
63748
 
63613
63749
  return current[type];
@@ -63768,7 +63904,7 @@ const {entries: entries$2} = Object;
63768
63904
 
63769
63905
  const isPath = (path) => Boolean(path.node);
63770
63906
 
63771
- const createTraverse$3 = (path) => {
63907
+ const createTraverse$4 = (path) => {
63772
63908
  if (isPath(path))
63773
63909
  return path.traverse.bind(path);
63774
63910
 
@@ -63785,7 +63921,7 @@ const createTraverse$3 = (path) => {
63785
63921
  const getTemplate = ([a]) => a;
63786
63922
 
63787
63923
  function traverse$3(basePath, visitor) {
63788
- const traverse = createTraverse$3(basePath);
63924
+ const traverse = createTraverse$4(basePath);
63789
63925
  const items = [];
63790
63926
  const parsedVisitors = entries$2(visitor);
63791
63927
 
@@ -63893,11 +64029,11 @@ const {
63893
64029
  objectExpression: objectExpression$1,
63894
64030
  } = lib_exports;
63895
64031
 
63896
- const isString$1 = (a) => typeof a === 'string';
64032
+ const isString$2 = (a) => typeof a === 'string';
63897
64033
  const isSet = (a) => a instanceof Set;
63898
- const {isArray: isArray$2} = Array;
64034
+ const {isArray: isArray$3} = Array;
63899
64035
 
63900
- const maybeArray$1 = (a) => isArray$2(a) ? a : [a];
64036
+ const maybeArray$1 = (a) => isArray$3(a) ? a : [a];
63901
64037
  const maybeArrayFrom = (a) => isSet(a) ? Array.from(a) : maybeArray$1(a);
63902
64038
 
63903
64039
  const escape = (a) => encodeURIComponent(a).replaceAll('%', '+');
@@ -63966,7 +64102,7 @@ function parseFindFileOptions(options) {
63966
64102
  excluded: [],
63967
64103
  };
63968
64104
 
63969
- if (isArray$2(options))
64105
+ if (isArray$3(options))
63970
64106
  return {
63971
64107
  exclude: options,
63972
64108
  };
@@ -64010,7 +64146,7 @@ function findFile(node, name, options) {
64010
64146
  }
64011
64147
 
64012
64148
  function checkName(name) {
64013
- if (!isString$1(name) && !isArray$2(name) && !isSet(name))
64149
+ if (!isString$2(name) && !isArray$3(name) && !isSet(name))
64014
64150
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[] | Set<string>): FilePath'`);
64015
64151
  }
64016
64152
 
@@ -64039,7 +64175,7 @@ function getFileContent(filePath) {
64039
64175
  }
64040
64176
 
64041
64177
  function checkRenameFileName(name) {
64042
- if (!isString$1(name))
64178
+ if (!isString$2(name))
64043
64179
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'renameFile(filePath: FilePath, name: string)'`);
64044
64180
  }
64045
64181
 
@@ -64184,7 +64320,7 @@ const createFile = (dirPath, name, content) => {
64184
64320
 
64185
64321
  const filePath = dirPathFiles.get('value.elements').at(-1);
64186
64322
 
64187
- if (isString$1(content))
64323
+ if (isString$2(content))
64188
64324
  writeFileContent(filePath, content);
64189
64325
 
64190
64326
  return filePath;
@@ -64370,7 +64506,7 @@ const {
64370
64506
  objectExpression,
64371
64507
  arrayExpression: arrayExpression$1,
64372
64508
  stringLiteral: stringLiteral$4,
64373
- isArrayExpression,
64509
+ isArrayExpression: isArrayExpression$1,
64374
64510
  isStringLiteral,
64375
64511
  isTemplateLiteral,
64376
64512
  objectProperty: objectProperty$1,
@@ -64408,7 +64544,7 @@ function parseContent(node, path) {
64408
64544
  throw Error(`☝️ Looks like wrong content type: '${node.type}' from file: '${path}'`);
64409
64545
  }
64410
64546
 
64411
- const fix$8 = (path) => {
64547
+ const fix$9 = (path) => {
64412
64548
  const array = arrayExpression$1([]);
64413
64549
 
64414
64550
  for (const element of path.get('elements')) {
@@ -64498,7 +64634,7 @@ function buildTree(path, list) {
64498
64634
  }
64499
64635
 
64500
64636
  const isTwoElementsTuple = (a) => {
64501
- if (!isArrayExpression(a))
64637
+ if (!isArrayExpression$1(a))
64502
64638
  return false;
64503
64639
 
64504
64640
  const {elements} = a.node;
@@ -64507,7 +64643,7 @@ const isTwoElementsTuple = (a) => {
64507
64643
  };
64508
64644
 
64509
64645
  const isOneElementTuple = (a) => {
64510
- if (!isArrayExpression(a))
64646
+ if (!isArrayExpression$1(a))
64511
64647
  return false;
64512
64648
 
64513
64649
  const {elements} = a.node;
@@ -64521,9 +64657,9 @@ function check$3(filename) {
64521
64657
  }
64522
64658
 
64523
64659
  var fromSimple = /*#__PURE__*/Object.freeze({
64524
- __proto__: null,
64525
- fix: fix$8,
64526
- traverse: traverse$2
64660
+ __proto__: null,
64661
+ fix: fix$9,
64662
+ traverse: traverse$2
64527
64663
  });
64528
64664
 
64529
64665
  const {
@@ -64531,10 +64667,10 @@ const {
64531
64667
  arrayExpression,
64532
64668
  } = lib_exports;
64533
64669
 
64534
- const {isArray: isArray$1} = Array;
64670
+ const {isArray: isArray$2} = Array;
64535
64671
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
64536
64672
 
64537
- const fix$7 = (root, {files}) => {
64673
+ const fix$8 = (root, {files}) => {
64538
64674
  const names = [];
64539
64675
 
64540
64676
  for (const file of files) {
@@ -64559,7 +64695,7 @@ const fix$7 = (root, {files}) => {
64559
64695
  const list = [];
64560
64696
 
64561
64697
  for (const name of names) {
64562
- if (isArray$1(name)) {
64698
+ if (isArray$2(name)) {
64563
64699
  list.push(arrayExpression([
64564
64700
  stringLiteral$3(name[0]),
64565
64701
  stringLiteral$3(name[1]),
@@ -64585,9 +64721,9 @@ const traverse$1 = ({push}) => ({
64585
64721
  });
64586
64722
 
64587
64723
  var toSimple = /*#__PURE__*/Object.freeze({
64588
- __proto__: null,
64589
- fix: fix$7,
64590
- traverse: traverse$1
64724
+ __proto__: null,
64725
+ fix: fix$8,
64726
+ traverse: traverse$1
64591
64727
  });
64592
64728
 
64593
64729
  const log = createDebug$1('putout:runner:scanner');
@@ -64601,7 +64737,7 @@ const scan$2 = ({rule, plugin, msg, options}, {progress}) => {
64601
64737
 
64602
64738
  progress.inc();
64603
64739
 
64604
- const traverse = createTraverse$2({
64740
+ const traverse = createTraverse$3({
64605
64741
  scan,
64606
64742
  rule,
64607
64743
  progress,
@@ -64658,7 +64794,7 @@ const createTrackFile = ({fileProgress, crawled}) => function*(...a) {
64658
64794
  }
64659
64795
  };
64660
64796
 
64661
- const createTraverse$2 = ({scan, rule, progress}) => ({push, options}) => ({
64797
+ const createTraverse$3 = ({scan, rule, progress}) => ({push, options}) => ({
64662
64798
  [`${__filesystem_name}(__)`](path) {
64663
64799
  log(rule);
64664
64800
  progress.start(rule);
@@ -64756,7 +64892,7 @@ function parseVisitor(visitors) {
64756
64892
  const debug = createDebug$1('putout:runner:find');
64757
64893
  const isRemoved = (a) => a?.removed;
64758
64894
 
64759
- const runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress(), traverse = traverse3}) => {
64895
+ const runPlugins = ({ast, fix, fixCount = 2, plugins, progress = createProgress(), traverse = traverse3}) => {
64760
64896
  let places = [];
64761
64897
 
64762
64898
  const merge = onceExports(mergeVisitors);
@@ -64771,7 +64907,6 @@ const runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = create
64771
64907
  places = run({
64772
64908
  ast,
64773
64909
  fix,
64774
- shebang,
64775
64910
  pluginsFind,
64776
64911
  pluginsTraverse,
64777
64912
  merge,
@@ -64784,17 +64919,18 @@ const runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = create
64784
64919
  if (!fix || !places.length)
64785
64920
  return places;
64786
64921
 
64787
- clearWatermark(ast);
64922
+ const {program} = ast;
64923
+
64924
+ clearWatermark(program);
64788
64925
  }
64789
64926
 
64790
64927
  return places;
64791
64928
  };
64792
64929
 
64793
- const run = ({ast, fix, shebang, pluginsFind, pluginsTraverse, template, merge, traverse}) => [
64930
+ const run = ({ast, fix, pluginsFind, pluginsTraverse, template, merge, traverse}) => [
64794
64931
  ...runWithoutMerge({
64795
64932
  ast,
64796
64933
  fix,
64797
- shebang,
64798
64934
  template,
64799
64935
  pluginsFind,
64800
64936
  traverse,
@@ -64802,7 +64938,6 @@ const run = ({ast, fix, shebang, pluginsFind, pluginsTraverse, template, merge,
64802
64938
  ...runWithMerge({
64803
64939
  ast,
64804
64940
  fix,
64805
- shebang,
64806
64941
  template,
64807
64942
  pluginsTraverse,
64808
64943
  merge,
@@ -64810,10 +64945,9 @@ const run = ({ast, fix, shebang, pluginsFind, pluginsTraverse, template, merge,
64810
64945
  }),
64811
64946
  ];
64812
64947
 
64813
- function runWithMerge({ast, fix, shebang, template, pluginsTraverse, merge, traverse}) {
64948
+ function runWithMerge({ast, fix, template, pluginsTraverse, merge, traverse}) {
64814
64949
  const {entries, visitor} = merge(pluginsTraverse, {
64815
64950
  fix,
64816
- shebang,
64817
64951
  template,
64818
64952
  });
64819
64953
 
@@ -64836,7 +64970,7 @@ function runWithMerge({ast, fix, shebang, template, pluginsTraverse, merge, trav
64836
64970
  return places;
64837
64971
  }
64838
64972
 
64839
- function runWithoutMerge({ast, fix, shebang, template, pluginsFind, traverse}) {
64973
+ function runWithoutMerge({ast, fix, template, pluginsFind, traverse}) {
64840
64974
  const places = [];
64841
64975
 
64842
64976
  for (const {rule, plugin, msg, options} of pluginsFind) {
@@ -64850,7 +64984,6 @@ function runWithoutMerge({ast, fix, shebang, template, pluginsFind, traverse}) {
64850
64984
  ast,
64851
64985
  options,
64852
64986
  fix,
64853
- shebang,
64854
64987
  template,
64855
64988
  traverse,
64856
64989
  });
@@ -64861,7 +64994,7 @@ function runWithoutMerge({ast, fix, shebang, template, pluginsFind, traverse}) {
64861
64994
  for (const item of items) {
64862
64995
  const message = msg || report(item);
64863
64996
  const {parentPath} = getPath(item);
64864
- const position = getPosition(item, shebang);
64997
+ const position = getPosition(item);
64865
64998
 
64866
64999
  places.push({
64867
65000
  rule,
@@ -64978,16 +65111,7 @@ const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
64978
65111
 
64979
65112
  const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
64980
65113
 
64981
- // why we pass 'source' to 'transform()'?
64982
- // because we need to calculate position in a right way
64983
- // and determine is shebang is existing
64984
- //
64985
- // 25 return {¬
64986
- // 26 line: shebang ? line + 1 : line,¬
64987
- // 27 column,¬
64988
- // 28 };¬
64989
- //
64990
- const transform = (ast, source, opts) => {
65114
+ const transform = (ast, opts) => {
64991
65115
  opts = defaultOptions(opts);
64992
65116
 
64993
65117
  const {
@@ -65000,8 +65124,6 @@ const transform = (ast, source, opts) => {
65000
65124
  progress,
65001
65125
  } = opts;
65002
65126
 
65003
- const [, shebang] = cutShebang(source);
65004
-
65005
65127
  const [validationError] = tryCatch(validateRulesRelations, {
65006
65128
  rules,
65007
65129
  pluginNames,
@@ -65014,7 +65136,6 @@ const transform = (ast, source, opts) => {
65014
65136
 
65015
65137
  const places = runPlugins({
65016
65138
  ast,
65017
- shebang,
65018
65139
  fix,
65019
65140
  fixCount,
65020
65141
  plugins,
@@ -65027,7 +65148,7 @@ const transform = (ast, source, opts) => {
65027
65148
  ];
65028
65149
  };
65029
65150
 
65030
- const transformAsync = async (ast, source, opts) => {
65151
+ const transformAsync = async (ast, opts) => {
65031
65152
  opts = defaultOptions(opts);
65032
65153
 
65033
65154
  const {
@@ -65040,8 +65161,6 @@ const transformAsync = async (ast, source, opts) => {
65040
65161
  progress,
65041
65162
  } = opts;
65042
65163
 
65043
- const [, shebang] = cutShebang(source);
65044
-
65045
65164
  const [validationError] = tryCatch(validateRulesRelations, {
65046
65165
  rules,
65047
65166
  pluginNames,
@@ -65054,7 +65173,6 @@ const transformAsync = async (ast, source, opts) => {
65054
65173
 
65055
65174
  const places = runPlugins({
65056
65175
  ast,
65057
- shebang,
65058
65176
  fix,
65059
65177
  fixCount,
65060
65178
  plugins,
@@ -65078,16 +65196,14 @@ const putout = (source, opts) => {
65078
65196
  printer,
65079
65197
  } = opts;
65080
65198
 
65081
- const [clearSource, shebang] = cutShebang(source);
65082
-
65083
- const ast = parse$4(clearSource, {
65199
+ const ast = parse$4(source, {
65084
65200
  parser,
65085
65201
  isTS,
65086
65202
  isJSX,
65087
65203
  printer,
65088
65204
  });
65089
65205
 
65090
- const places = transform(ast, source, opts);
65206
+ const places = transform(ast, opts);
65091
65207
 
65092
65208
  if (!opts.fix)
65093
65209
  return {
@@ -65095,13 +65211,11 @@ const putout = (source, opts) => {
65095
65211
  places,
65096
65212
  };
65097
65213
 
65098
- const printed = print(ast, {
65214
+ const code = print(ast, {
65099
65215
  printer,
65100
65216
  source,
65101
65217
  });
65102
65218
 
65103
- const code = mergeShebang(shebang, printed);
65104
-
65105
65219
  return {
65106
65220
  code,
65107
65221
  places,
@@ -65119,16 +65233,14 @@ const putoutAsync = async (source, opts) => {
65119
65233
  printer,
65120
65234
  } = opts;
65121
65235
 
65122
- const [clearSource, shebang] = cutShebang(source);
65123
-
65124
- const ast = parse$4(clearSource, {
65236
+ const ast = parse$4(source, {
65125
65237
  parser,
65126
65238
  isTS,
65127
65239
  isJSX,
65128
65240
  printer,
65129
65241
  });
65130
65242
 
65131
- const places = await transformAsync(ast, source, opts);
65243
+ const places = await transformAsync(ast, opts);
65132
65244
 
65133
65245
  if (!opts.fix)
65134
65246
  return {
@@ -65136,22 +65248,20 @@ const putoutAsync = async (source, opts) => {
65136
65248
  places,
65137
65249
  };
65138
65250
 
65139
- const printed = print(ast, {
65251
+ const code = print(ast, {
65140
65252
  printer,
65141
65253
  });
65142
65254
 
65143
- const code = mergeShebang(shebang, printed);
65144
-
65145
65255
  return {
65146
65256
  code,
65147
65257
  places,
65148
65258
  };
65149
65259
  };
65150
65260
 
65151
- const isString = (a) => typeof a === 'string';
65261
+ const isString$1 = (a) => typeof a === 'string';
65152
65262
 
65153
65263
  function check$2(source) {
65154
- if (!isString(source))
65264
+ if (!isString$1(source))
65155
65265
  throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
65156
65266
  }
65157
65267
 
@@ -71169,6 +71279,9 @@ function check$1(regExpTransformer) {
71169
71279
  throw Error('☝️ Looks like RegExpTransformer is missing');
71170
71280
  }
71171
71281
 
71282
+ const isString = (a) => typeof a === 'string';
71283
+ const {isArray: isArray$1} = Array;
71284
+
71172
71285
  const {
71173
71286
  isBlockStatement,
71174
71287
  isFunction,
@@ -71189,15 +71302,15 @@ const isCall = (path) => {
71189
71302
  return isCallExpression(path.find(isCallOrStatement));
71190
71303
  };
71191
71304
 
71192
- const report$4 = ({name}) => `Argument '${name}' is missing`;
71305
+ const report$5 = ({name}) => `Argument '${name}' is missing`;
71193
71306
 
71194
71307
  const addArgs = (args) => ({
71195
- report: report$4,
71196
- fix: fix$6,
71308
+ report: report$5,
71309
+ fix: fix$7,
71197
71310
  traverse: traverse(args),
71198
71311
  });
71199
71312
 
71200
- const fix$6 = ({declaration, path, pattern, params, index}) => {
71313
+ const fix$7 = ({declaration, path, pattern, params, index}) => {
71201
71314
  const declarationNode = template$1.ast.fresh(declaration);
71202
71315
 
71203
71316
  if (isSequenceExpression(declarationNode)) {
@@ -71232,7 +71345,9 @@ const traverse = (args) => ({push, options}) => {
71232
71345
 
71233
71346
  return {
71234
71347
  ReferencedIdentifier(path) {
71235
- for (const [name, [declaration, pattern, exclude]] of entries$1(allArgs)) {
71348
+ for (const [name, config] of entries$1(allArgs)) {
71349
+ const [declaration, include, exclude] = parseConfig(config);
71350
+
71236
71351
  if (path.node.name !== name)
71237
71352
  continue;
71238
71353
 
@@ -71249,7 +71364,7 @@ const traverse = (args) => ({push, options}) => {
71249
71364
 
71250
71365
  const {block} = fnPath.scope;
71251
71366
 
71252
- if (!compareAny(path.scope.path, pattern))
71367
+ if (!compareAny(path.scope.path, include))
71253
71368
  continue;
71254
71369
 
71255
71370
  if (compareAny(path.scope.path, exclude))
@@ -71309,6 +71424,25 @@ function getObjectPattern(params) {
71309
71424
  ];
71310
71425
  }
71311
71426
 
71427
+ function parseConfig(config) {
71428
+ const [declaration, patternsInclude, patternsExclude] = config;
71429
+
71430
+ if (isArray$1(patternsInclude) || isString(patternsInclude))
71431
+ return [
71432
+ declaration,
71433
+ patternsInclude,
71434
+ patternsExclude,
71435
+ ];
71436
+
71437
+ const {include, exclude} = patternsInclude;
71438
+
71439
+ return [
71440
+ declaration,
71441
+ include,
71442
+ exclude,
71443
+ ];
71444
+ }
71445
+
71312
71446
  const moduleDeclarations = [
71313
71447
  'import',
71314
71448
  'export',
@@ -71406,15 +71540,15 @@ const isLegacyKeyword = (name) => {
71406
71540
  return legacyKeywords.includes(name);
71407
71541
  };
71408
71542
 
71409
- const findPlaces = (ast, source, opts) => {
71410
- return transform(ast, source, {
71543
+ const findPlaces = (ast, opts) => {
71544
+ return transform(ast, {
71411
71545
  ...opts,
71412
71546
  fix: false,
71413
71547
  });
71414
71548
  };
71415
71549
 
71416
- const findPlacesAsync = async (ast, source, opts) => {
71417
- return await transformAsync(ast, source, {
71550
+ const findPlacesAsync = async (ast, opts) => {
71551
+ return await transformAsync(ast, {
71418
71552
  ...opts,
71419
71553
  fix: false,
71420
71554
  });
@@ -71450,7 +71584,7 @@ const {join} = path;
71450
71584
 
71451
71585
  const isObject$1 = (a) => a && typeof a === 'object';
71452
71586
  const {entries} = Object;
71453
- const report$3 = (path, {message}) => message;
71587
+ const report$4 = (path, {message}) => message;
71454
71588
 
71455
71589
  const matchFiles = (options) => {
71456
71590
  const {filename} = options;
@@ -71466,14 +71600,14 @@ const matchFiles = (options) => {
71466
71600
  });
71467
71601
 
71468
71602
  return {
71469
- fix: fix$5,
71603
+ fix: fix$6,
71470
71604
  scan,
71471
- report: report$3,
71605
+ report: report$4,
71472
71606
  };
71473
71607
  };
71474
71608
 
71475
- function fix$5(inputFile, {dirPath, matchInputFilename, outputFilename, matchedJS, matchedAST, options, rawOptions}) {
71476
- transform(matchedAST, matchedJS, options);
71609
+ function fix$6(inputFile, {dirPath, matchInputFilename, outputFilename, matchedAST, options, rawOptions}) {
71610
+ transform(matchedAST, options);
71477
71611
 
71478
71612
  const matchedJSON = magicPrint(outputFilename, matchedAST, rawOptions);
71479
71613
  const outputFile = getOutputFile({
@@ -71542,7 +71676,7 @@ const createScan$3 = ({files, exclude, defaultFilename}) => (mainPath, {push, pr
71542
71676
  const [matchedJS, matchedAST] = magicParse(inputFilename, fileContent);
71543
71677
 
71544
71678
  const options = parseOptions(inputFilename, rawOptions);
71545
- const places = findPlaces(matchedAST, matchedJS, options);
71679
+ const places = findPlaces(matchedAST, options);
71546
71680
 
71547
71681
  if (!places.length)
71548
71682
  continue;
@@ -71644,9 +71778,9 @@ function parseOptions(inputFilename, rawOptions) {
71644
71778
 
71645
71779
  const {parse: parse$2} = JSON;
71646
71780
 
71647
- const report$2 = (file, {from, to}) => `Rename '${from}' to '${to}'`;
71781
+ const report$3 = (file, {from, to}) => `Rename '${from}' to '${to}'`;
71648
71782
 
71649
- const fix$4 = (file, {to}) => {
71783
+ const fix$5 = (file, {to}) => {
71650
71784
  renameFile(file, to);
71651
71785
  };
71652
71786
 
@@ -71698,22 +71832,22 @@ function findUpPackage(file) {
71698
71832
  }
71699
71833
 
71700
71834
  var renameFileWithFn = /*#__PURE__*/Object.freeze({
71701
- __proto__: null,
71702
- createScan: createScan$2,
71703
- fix: fix$4,
71704
- report: report$2
71835
+ __proto__: null,
71836
+ createScan: createScan$2,
71837
+ fix: fix$5,
71838
+ report: report$3
71705
71839
  });
71706
71840
 
71707
71841
  const returns = (a) => () => a;
71708
71842
 
71709
- const report$1 = (path, {mask, from, to}) => {
71843
+ const report$2 = (path, {mask, from, to}) => {
71710
71844
  if (!mask)
71711
71845
  return `Rename '${from}' to '${to}'`;
71712
71846
 
71713
71847
  return `Rename '${mask}' to '${mask.replace(from, to)}'`;
71714
71848
  };
71715
71849
 
71716
- const fix$3 = (path, {from, to}) => {
71850
+ const fix$4 = (path, {from, to}) => {
71717
71851
  const filename = getFilename(path);
71718
71852
  const newFilename = filename.replace(from, to);
71719
71853
 
@@ -71759,10 +71893,10 @@ const createCheckNear = (near) => (file) => {
71759
71893
  };
71760
71894
 
71761
71895
  var renameFileByMask = /*#__PURE__*/Object.freeze({
71762
- __proto__: null,
71763
- createScan: createScan$1,
71764
- fix: fix$3,
71765
- report: report$1
71896
+ __proto__: null,
71897
+ createScan: createScan$1,
71898
+ fix: fix$4,
71899
+ report: report$2
71766
71900
  });
71767
71901
 
71768
71902
  const renameFiles = ({type, mask, rename, from, to, near} = {}) => {
@@ -73903,8 +74037,8 @@ const difference$1 = (a, b) => new Set(a).difference(new Set(b));
73903
74037
 
73904
74038
  const ignore = ({name, property, list, type = __ignore}) => ({
73905
74039
  report: createReport$1(name),
73906
- fix: fix$2,
73907
- traverse: createTraverse$1({
74040
+ fix: fix$3,
74041
+ traverse: createTraverse$2({
73908
74042
  type,
73909
74043
  property,
73910
74044
  list,
@@ -73928,12 +74062,12 @@ const createReport$1 = (filename) => ({name, matchedElements}) => {
73928
74062
  return `Add '${name}'${insteadOf} to '${filename}'`;
73929
74063
  };
73930
74064
 
73931
- const fix$2 = ({path, name, matchedElements}) => {
74065
+ const fix$3 = ({path, name, matchedElements}) => {
73932
74066
  path.node.elements.push(stringLiteral$1(name));
73933
74067
  matchedElements.map(remove);
73934
74068
  };
73935
74069
 
73936
- const createTraverse$1 = ({type, property, list}) => ({push, options}) => {
74070
+ const createTraverse$2 = ({type, property, list}) => ({push, options}) => {
73937
74071
  const {dismiss = []} = options;
73938
74072
  const newNames = filterNames(list, dismiss);
73939
74073
 
@@ -74084,15 +74218,18 @@ const findFileUp = (file, name) => {
74084
74218
  return findFileUp(parentDirectory, name);
74085
74219
  };
74086
74220
 
74087
- const {stringLiteral} = lib_exports;
74221
+ const {
74222
+ stringLiteral,
74223
+ isArrayExpression,
74224
+ } = lib_exports;
74088
74225
 
74089
74226
  const sortIgnore = ({name, property, type = __ignore}) => ({
74090
74227
  report: createReport({
74091
74228
  name,
74092
74229
  property,
74093
74230
  }),
74094
- fix: fix$1,
74095
- traverse: createTraverse({
74231
+ fix: fix$2,
74232
+ traverse: createTraverse$1({
74096
74233
  type,
74097
74234
  property,
74098
74235
  }),
@@ -74105,11 +74242,11 @@ const createReport = ({name, property}) => () => {
74105
74242
  return `Sort '${name}'`;
74106
74243
  };
74107
74244
 
74108
- const fix$1 = ({path, sortedElements}) => {
74245
+ const fix$2 = ({path, sortedElements}) => {
74109
74246
  path.node.elements = sortedElements;
74110
74247
  };
74111
74248
 
74112
- const createTraverse = ({type, property}) => ({push}) => ({
74249
+ const createTraverse$1 = ({type, property}) => ({push}) => ({
74113
74250
  [type]: (path) => {
74114
74251
  const parentOfElements = parseElements(path, {
74115
74252
  property,
@@ -74153,7 +74290,12 @@ function parseElements(path, {property}) {
74153
74290
  if (!prop)
74154
74291
  return null;
74155
74292
 
74156
- return prop.get('value');
74293
+ const arrayPath = prop.get('value');
74294
+
74295
+ if (!isArrayExpression(arrayPath))
74296
+ return null;
74297
+
74298
+ return arrayPath;
74157
74299
  }
74158
74300
 
74159
74301
  function cleverSort(elements, {separate}) {
@@ -74268,15 +74410,15 @@ const difference = (a, b) => new Set(a).difference(new Set(b));
74268
74410
  const {isArray} = Array;
74269
74411
  const maybeArray = (a) => isArray(a) ? a : [a];
74270
74412
 
74271
- const report = (file) => `Remove files: '${getFilename(file)}'`;
74413
+ const report$1 = (file) => `Remove files: '${getFilename(file)}'`;
74272
74414
 
74273
- const fix = (file) => {
74415
+ const fix$1 = (file) => {
74274
74416
  removeFile(file);
74275
74417
  };
74276
74418
 
74277
74419
  const removeFiles = (defaultNames) => ({
74278
- report,
74279
- fix,
74420
+ report: report$1,
74421
+ fix: fix$1,
74280
74422
  scan: createScan(defaultNames),
74281
74423
  });
74282
74424
 
@@ -74301,112 +74443,144 @@ const createScan = (defaultNames = []) => (path, {push, trackFile, options}) =>
74301
74443
  }
74302
74444
  };
74303
74445
 
74446
+ const renameProperties = (tuples) => ({
74447
+ report,
74448
+ fix,
74449
+ traverse: createTraverse(tuples),
74450
+ });
74451
+
74452
+ const report = ({from, to}) => `Rename property: '${from}' -> '${to}'`;
74453
+
74454
+ const fix = ({path, to}) => {
74455
+ if (!to) {
74456
+ remove(path);
74457
+ return;
74458
+ }
74459
+
74460
+ setLiteralValue(path.node.key, to);
74461
+ };
74462
+
74463
+ const createTraverse = (tuples) => ({push}) => ({
74464
+ [__json](mainPath) {
74465
+ for (const [from, to] of tuples) {
74466
+ for (const path of traverseProperties(mainPath, from)) {
74467
+ push({
74468
+ path,
74469
+ from,
74470
+ to,
74471
+ });
74472
+ }
74473
+ }
74474
+ },
74475
+ });
74476
+
74304
74477
  var operator = /*#__PURE__*/Object.freeze({
74305
- __proto__: null,
74306
- __filesystem: __filesystem,
74307
- __filesystem_name: __filesystem_name,
74308
- __ignore: __ignore,
74309
- __ignore_name: __ignore_name,
74310
- __json: __json,
74311
- __json_name: __json_name,
74312
- __toml: __toml,
74313
- __toml_name: __toml_name,
74314
- __yaml: __yaml,
74315
- __yaml_name: __yaml_name,
74316
- addArgs: addArgs,
74317
- addAttribute: addAttribute,
74318
- addAttributeValue: addAttributeValue,
74319
- addClassName: addClassName,
74320
- addParens: addParens,
74321
- compare: compare,
74322
- compareAll: compareAll,
74323
- compareAny: compareAny,
74324
- compute: compute,
74325
- contains: contains,
74326
- containsClassName: containsClassName,
74327
- copyFile: copyFile,
74328
- crawlDirectory: crawlDirectory,
74329
- createDirectory: createDirectory,
74330
- createFile: createFile,
74331
- createNestedDirectory: createNestedDirectory,
74332
- declare: declare$1,
74333
- extract: extract,
74334
- findBinding: findBinding,
74335
- findFile: findFile,
74336
- findFileUp: findFileUp,
74337
- findVarsWays: findVarsWays,
74338
- fix: fix$2,
74339
- fromJS: fromJS,
74340
- getAttributeNode: getAttributeNode,
74341
- getAttributePath: getAttributePath,
74342
- getAttributeValue: getAttributeValue,
74343
- getBinding: getBinding,
74344
- getBindingPath: getBindingPath,
74345
- getClassName: getClassName,
74346
- getExportDefault: getExportDefault,
74347
- getFile: getFile,
74348
- getFileContent: getFileContent,
74349
- getFileType: getFileType,
74350
- getFilename: getFilename,
74351
- getLiteralRaw: getLiteralRaw,
74352
- getParentDirectory: getParentDirectory,
74353
- getPathAfterImports: getPathAfterImports,
74354
- getPathAfterRequires: getPathAfterRequires,
74355
- getProperties: getProperties,
74356
- getProperty: getProperty,
74357
- getRootDirectory: getRootDirectory,
74358
- getTemplateValues: getTemplateValues,
74359
- getValues: getValues,
74360
- hasAttributeValue: hasAttributeValue,
74361
- hasDataName: hasDataName,
74362
- hasParens: hasParens,
74363
- hasTagName: hasTagName,
74364
- ignore: ignore,
74365
- insertAfter: insertAfter,
74366
- insertBefore: insertBefore,
74367
- isConditionKeyword: isConditionKeyword,
74368
- isDeclarationKeyword: isDeclarationKeyword,
74369
- isESM: isESM,
74370
- isJSON: isJSON,
74371
- isJSONGroup: isJSONGroup,
74372
- isKeyword: isKeyword,
74373
- isLegacyKeyword: isLegacyKeyword,
74374
- isModuleDeclarationKeyword: isModuleDeclarationKeyword,
74375
- isModuleExports: isModuleExports,
74376
- isSimple: isSimple,
74377
- isSimpleRegExp: isSimpleRegExp,
74378
- isStatementKeyword: isStatementKeyword,
74379
- isTOML: isTOML,
74380
- isTSKeyword: isTSKeyword,
74381
- isTemplate: isTemplate,
74382
- matchFiles: matchFiles,
74383
- moveFile: moveFile,
74384
- parseTemplate: parseTemplate,
74385
- readDirectory: readDirectory,
74386
- readFileContent: readFileContent,
74387
- remove: remove,
74388
- removeAttributeValue: removeAttributeValue,
74389
- removeClassName: removeClassName,
74390
- removeEmptyDirectory: removeEmptyDirectory,
74391
- removeFile: removeFile,
74392
- removeFiles: removeFiles,
74393
- removeParens: removeParens,
74394
- rename: rename,
74395
- renameFile: renameFile,
74396
- renameFiles: renameFiles,
74397
- renameProperty: renameProperty,
74398
- replaceWith: replaceWith,
74399
- replaceWithMultiple: replaceWithMultiple,
74400
- setAttributeValue: setAttributeValue,
74401
- setLiteralValue: setLiteralValue,
74402
- setValues: setValues,
74403
- sortIgnore: sortIgnore,
74404
- toExpression: toExpression,
74405
- toJS: toJS,
74406
- transformRegExp: transformRegExp,
74407
- traverse: traverse$3,
74408
- traverseProperties: traverseProperties,
74409
- writeFileContent: writeFileContent
74478
+ __proto__: null,
74479
+ __filesystem: __filesystem,
74480
+ __filesystem_name: __filesystem_name,
74481
+ __ignore: __ignore,
74482
+ __ignore_name: __ignore_name,
74483
+ __json: __json,
74484
+ __json_name: __json_name,
74485
+ __toml: __toml,
74486
+ __toml_name: __toml_name,
74487
+ __yaml: __yaml,
74488
+ __yaml_name: __yaml_name,
74489
+ addArgs: addArgs,
74490
+ addAttribute: addAttribute,
74491
+ addAttributeValue: addAttributeValue,
74492
+ addClassName: addClassName,
74493
+ addParens: addParens,
74494
+ compare: compare,
74495
+ compareAll: compareAll,
74496
+ compareAny: compareAny,
74497
+ compute: compute,
74498
+ contains: contains,
74499
+ containsClassName: containsClassName,
74500
+ copyFile: copyFile,
74501
+ crawlDirectory: crawlDirectory,
74502
+ createDirectory: createDirectory,
74503
+ createFile: createFile,
74504
+ createNestedDirectory: createNestedDirectory,
74505
+ declare: declare$1,
74506
+ extract: extract,
74507
+ findBinding: findBinding,
74508
+ findFile: findFile,
74509
+ findFileUp: findFileUp,
74510
+ findVarsWays: findVarsWays,
74511
+ fix: fix$3,
74512
+ fromJS: fromJS,
74513
+ getAttributeNode: getAttributeNode,
74514
+ getAttributePath: getAttributePath,
74515
+ getAttributeValue: getAttributeValue,
74516
+ getBinding: getBinding,
74517
+ getBindingPath: getBindingPath,
74518
+ getClassName: getClassName,
74519
+ getExportDefault: getExportDefault,
74520
+ getFile: getFile,
74521
+ getFileContent: getFileContent,
74522
+ getFileType: getFileType,
74523
+ getFilename: getFilename,
74524
+ getLiteralRaw: getLiteralRaw,
74525
+ getParentDirectory: getParentDirectory,
74526
+ getPathAfterImports: getPathAfterImports,
74527
+ getPathAfterRequires: getPathAfterRequires,
74528
+ getProperties: getProperties,
74529
+ getProperty: getProperty,
74530
+ getRootDirectory: getRootDirectory,
74531
+ getTemplateValues: getTemplateValues,
74532
+ getValues: getValues,
74533
+ hasAttributeValue: hasAttributeValue,
74534
+ hasDataName: hasDataName,
74535
+ hasParens: hasParens,
74536
+ hasTagName: hasTagName,
74537
+ ignore: ignore,
74538
+ insertAfter: insertAfter,
74539
+ insertBefore: insertBefore,
74540
+ isConditionKeyword: isConditionKeyword,
74541
+ isDeclarationKeyword: isDeclarationKeyword,
74542
+ isESM: isESM,
74543
+ isJSON: isJSON,
74544
+ isJSONGroup: isJSONGroup,
74545
+ isKeyword: isKeyword,
74546
+ isLegacyKeyword: isLegacyKeyword,
74547
+ isModuleDeclarationKeyword: isModuleDeclarationKeyword,
74548
+ isModuleExports: isModuleExports,
74549
+ isSimple: isSimple,
74550
+ isSimpleRegExp: isSimpleRegExp,
74551
+ isStatementKeyword: isStatementKeyword,
74552
+ isTOML: isTOML,
74553
+ isTSKeyword: isTSKeyword,
74554
+ isTemplate: isTemplate,
74555
+ matchFiles: matchFiles,
74556
+ moveFile: moveFile,
74557
+ parseTemplate: parseTemplate,
74558
+ readDirectory: readDirectory,
74559
+ readFileContent: readFileContent,
74560
+ remove: remove,
74561
+ removeAttributeValue: removeAttributeValue,
74562
+ removeClassName: removeClassName,
74563
+ removeEmptyDirectory: removeEmptyDirectory,
74564
+ removeFile: removeFile,
74565
+ removeFiles: removeFiles,
74566
+ removeParens: removeParens,
74567
+ rename: rename,
74568
+ renameFile: renameFile,
74569
+ renameFiles: renameFiles,
74570
+ renameProperties: renameProperties,
74571
+ renameProperty: renameProperty,
74572
+ replaceWith: replaceWith,
74573
+ replaceWithMultiple: replaceWithMultiple,
74574
+ setAttributeValue: setAttributeValue,
74575
+ setLiteralValue: setLiteralValue,
74576
+ setValues: setValues,
74577
+ sortIgnore: sortIgnore,
74578
+ toExpression: toExpression,
74579
+ toJS: toJS,
74580
+ transformRegExp: transformRegExp,
74581
+ traverse: traverse$3,
74582
+ traverseProperties: traverseProperties,
74583
+ writeFileContent: writeFileContent
74410
74584
  });
74411
74585
 
74412
74586
  const codeframe = ({source, error, highlightCode = true}) => {
@@ -74426,20 +74600,20 @@ const codeframe = ({source, error, highlightCode = true}) => {
74426
74600
  };
74427
74601
 
74428
74602
  var exports$1 = /*#__PURE__*/Object.freeze({
74429
- __proto__: null,
74430
- codeframe: codeframe,
74431
- findPlaces: findPlaces,
74432
- findPlacesAsync: findPlacesAsync,
74433
- generate: generate,
74434
- operator: operator,
74435
- parse: parse$4,
74436
- print: print,
74437
- putoutAsync: putoutAsync,
74438
- template: template$1,
74439
- transform: transform,
74440
- transformAsync: transformAsync,
74441
- traverse: traverse3,
74442
- types: lib_exports
74603
+ __proto__: null,
74604
+ codeframe: codeframe,
74605
+ findPlaces: findPlaces,
74606
+ findPlacesAsync: findPlacesAsync,
74607
+ generate: generate,
74608
+ operator: operator,
74609
+ parse: parse$4,
74610
+ print: print,
74611
+ putoutAsync: putoutAsync,
74612
+ template: template$1,
74613
+ transform: transform,
74614
+ transformAsync: transformAsync,
74615
+ traverse: traverse3,
74616
+ types: lib_exports
74443
74617
  });
74444
74618
 
74445
74619
  Object.assign(putout, exports$1);