@putout/babel 4.4.3 → 4.5.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.
- package/README.md +1 -1
- package/bundle/index.d.ts +264 -1
- package/bundle/index.js +732 -493
- package/bundle/metafile-cjs.json +1 -1
- package/package.json +7 -7
package/bundle/index.js
CHANGED
|
@@ -51,9 +51,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, '__esModule', {
|
|
|
51
51
|
}), mod);
|
|
52
52
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== 'symbol' ? key + '' : key, value);
|
|
53
53
|
|
|
54
|
-
// node_modules/picocolors/picocolors.js
|
|
54
|
+
// ../babel-babel/node_modules/picocolors/picocolors.js
|
|
55
55
|
var require_picocolors = __commonJS({
|
|
56
|
-
'node_modules/picocolors/picocolors.js'(exports2, module2) {
|
|
56
|
+
'../babel-babel/node_modules/picocolors/picocolors.js'(exports2, module2) {
|
|
57
57
|
var p = process || {};
|
|
58
58
|
var argv = p.argv || [];
|
|
59
59
|
var env = p.env || {};
|
|
@@ -136,9 +136,9 @@ var require_picocolors = __commonJS({
|
|
|
136
136
|
},
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
-
// node_modules/js-tokens/index.js
|
|
140
|
-
var
|
|
141
|
-
'node_modules/js-tokens/index.js'(exports2, module2) {
|
|
139
|
+
// ../babel-babel/node_modules/js-tokens-BABEL_8_BREAKING-true/index.js
|
|
140
|
+
var require_js_tokens_BABEL_8_BREAKING_true = __commonJS({
|
|
141
|
+
'../babel-babel/node_modules/js-tokens-BABEL_8_BREAKING-true/index.js'(exports2, module2) {
|
|
142
142
|
var Identifier3;
|
|
143
143
|
var JSXIdentifier3;
|
|
144
144
|
var JSXPunctuator;
|
|
@@ -160,19 +160,19 @@ var require_js_tokens = __commonJS({
|
|
|
160
160
|
var WhiteSpace;
|
|
161
161
|
var jsTokens2;
|
|
162
162
|
|
|
163
|
-
RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[
|
|
163
|
+
RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;
|
|
164
164
|
Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
|
|
165
|
-
Identifier3 = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]
|
|
166
|
-
StringLiteral4 = /(['"])(?:
|
|
165
|
+
Identifier3 = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;
|
|
166
|
+
StringLiteral4 = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y;
|
|
167
167
|
NumericLiteral4 = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;
|
|
168
|
-
Template = /[`}](?:[^`\\$]
|
|
168
|
+
Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y;
|
|
169
169
|
WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu;
|
|
170
170
|
LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
|
|
171
|
-
MultiLineComment = /\/\*(?:[^*]
|
|
171
|
+
MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y;
|
|
172
172
|
SingleLineComment = /\/\/.*/y;
|
|
173
173
|
JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y;
|
|
174
174
|
JSXIdentifier3 = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;
|
|
175
|
-
JSXString = /(['"])(?:
|
|
175
|
+
JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y;
|
|
176
176
|
JSXText3 = /[^<>{}]+/y;
|
|
177
177
|
TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
|
|
178
178
|
TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
|
|
@@ -639,9 +639,23 @@ var require_js_tokens = __commonJS({
|
|
|
639
639
|
},
|
|
640
640
|
});
|
|
641
641
|
|
|
642
|
-
// node_modules/
|
|
642
|
+
// ../babel-babel/node_modules/js-tokens-BABEL_8_BREAKING-false/index.js
|
|
643
|
+
var require_js_tokens = __commonJS({
|
|
644
|
+
'../babel-babel/node_modules/js-tokens/index.js'(exports2, module2) {
|
|
645
|
+
function bool2(value) {
|
|
646
|
+
if (value == null)
|
|
647
|
+
return false;
|
|
648
|
+
|
|
649
|
+
return value && value !== 'false' && value !== '0';
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
module2.exports = require_js_tokens_BABEL_8_BREAKING_true();
|
|
653
|
+
},
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
// ../babel-babel/node_modules/jsesc/jsesc.js
|
|
643
657
|
var require_jsesc = __commonJS({
|
|
644
|
-
'node_modules/jsesc/jsesc.js'(exports2, module2) {
|
|
658
|
+
'../babel-babel/node_modules/jsesc/jsesc.js'(exports2, module2) {
|
|
645
659
|
"use strict";
|
|
646
660
|
|
|
647
661
|
var object = {};
|
|
@@ -706,10 +720,6 @@ var require_jsesc = __commonJS({
|
|
|
706
720
|
return typeof value == 'number' || toString.call(value) == '[object Number]';
|
|
707
721
|
};
|
|
708
722
|
|
|
709
|
-
var isBigInt = (value) => {
|
|
710
|
-
return typeof value == 'bigint';
|
|
711
|
-
};
|
|
712
|
-
|
|
713
723
|
var isFunction5 = (value) => {
|
|
714
724
|
return typeof value == 'function';
|
|
715
725
|
};
|
|
@@ -858,41 +868,32 @@ var require_jsesc = __commonJS({
|
|
|
858
868
|
}
|
|
859
869
|
|
|
860
870
|
return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
|
|
861
|
-
} else if (isNumber2(argument)
|
|
871
|
+
} else if (isNumber2(argument)) {
|
|
862
872
|
if (json) {
|
|
863
|
-
return JSON.stringify(
|
|
873
|
+
return JSON.stringify(argument);
|
|
864
874
|
}
|
|
865
875
|
|
|
866
|
-
let result2;
|
|
867
|
-
|
|
868
876
|
if (useDecNumbers) {
|
|
869
|
-
|
|
870
|
-
}
|
|
877
|
+
return String(argument);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if (useHexNumbers) {
|
|
871
881
|
let hexadecimal2 = argument.toString(16);
|
|
872
882
|
|
|
873
883
|
if (!lowercaseHex) {
|
|
874
884
|
hexadecimal2 = hexadecimal2.toUpperCase();
|
|
875
885
|
}
|
|
876
886
|
|
|
877
|
-
|
|
878
|
-
} else if (useBinNumbers) {
|
|
879
|
-
result2 = '0b' + argument.toString(2);
|
|
880
|
-
} else if (useOctNumbers) {
|
|
881
|
-
result2 = '0o' + argument.toString(8);
|
|
887
|
+
return '0x' + hexadecimal2;
|
|
882
888
|
}
|
|
883
|
-
|
|
884
889
|
|
|
885
|
-
if (
|
|
886
|
-
return
|
|
890
|
+
if (useBinNumbers) {
|
|
891
|
+
return '0b' + argument.toString(2);
|
|
887
892
|
}
|
|
888
893
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
if (json) {
|
|
892
|
-
return JSON.stringify(Number(argument));
|
|
894
|
+
if (useOctNumbers) {
|
|
895
|
+
return '0o' + argument.toString(8);
|
|
893
896
|
}
|
|
894
|
-
|
|
895
|
-
return argument + 'n';
|
|
896
897
|
} else if (!isObject(argument)) {
|
|
897
898
|
if (json) {
|
|
898
899
|
return JSON.stringify(argument) || 'null';
|
|
@@ -915,7 +916,6 @@ var require_jsesc = __commonJS({
|
|
|
915
916
|
return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
|
|
916
917
|
}
|
|
917
918
|
|
|
918
|
-
|
|
919
919
|
}
|
|
920
920
|
|
|
921
921
|
const regex = options.escapeEverything ? escapeEverythingRegex : escapeNonAsciiRegex;
|
|
@@ -1002,53 +1002,63 @@ var require_jsesc = __commonJS({
|
|
|
1002
1002
|
},
|
|
1003
1003
|
});
|
|
1004
1004
|
|
|
1005
|
-
// node_modules/ms/index.js
|
|
1005
|
+
// ../babel-babel/node_modules/ms/index.js
|
|
1006
1006
|
var require_ms = () => () => {};
|
|
1007
1007
|
|
|
1008
|
-
// node_modules/debug/src/common.js
|
|
1008
|
+
// ../babel-babel/node_modules/debug/src/common.js
|
|
1009
1009
|
var require_common = () => () => ({
|
|
1010
1010
|
enabled: false,
|
|
1011
1011
|
});
|
|
1012
1012
|
|
|
1013
|
-
// node_modules/debug/src/browser.js
|
|
1013
|
+
// ../babel-babel/node_modules/debug/src/browser.js
|
|
1014
1014
|
var require_browser = () => () => ({
|
|
1015
1015
|
enabled: false,
|
|
1016
1016
|
});
|
|
1017
1017
|
|
|
1018
|
-
// node_modules/has-flag/index.js
|
|
1018
|
+
// ../babel-babel/node_modules/has-flag/index.js
|
|
1019
1019
|
var require_has_flag = __commonJS({
|
|
1020
|
-
'node_modules/has-flag/index.js'(exports2, module2) {
|
|
1020
|
+
'../babel-babel/node_modules/has-flag/index.js'(exports2, module2) {
|
|
1021
1021
|
"use strict";
|
|
1022
1022
|
|
|
1023
|
-
module2.exports = (flag, argv) => {
|
|
1024
|
-
argv = argv || process.argv;
|
|
1023
|
+
module2.exports = (flag, argv = process.argv) => {
|
|
1025
1024
|
const prefix2 = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
1026
|
-
const
|
|
1027
|
-
const
|
|
1025
|
+
const position = argv.indexOf(prefix2 + flag);
|
|
1026
|
+
const terminatorPosition = argv.indexOf('--');
|
|
1028
1027
|
|
|
1029
|
-
return
|
|
1028
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
1030
1029
|
};
|
|
1031
1030
|
},
|
|
1032
1031
|
});
|
|
1033
1032
|
|
|
1034
|
-
// node_modules/supports-color/index.js
|
|
1033
|
+
// ../babel-babel/node_modules/supports-color/index.js
|
|
1035
1034
|
var require_supports_color = __commonJS({
|
|
1036
|
-
'node_modules/supports-color/index.js'(exports2, module2) {
|
|
1035
|
+
'../babel-babel/node_modules/supports-color/index.js'(exports2, module2) {
|
|
1037
1036
|
"use strict";
|
|
1038
1037
|
|
|
1039
1038
|
var os = require('os');
|
|
1039
|
+
var tty = require('tty');
|
|
1040
1040
|
var hasFlag = require_has_flag();
|
|
1041
|
-
var env = process
|
|
1042
|
-
var
|
|
1041
|
+
var {env} = process;
|
|
1042
|
+
var flagForceColor;
|
|
1043
1043
|
|
|
1044
|
-
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
|
|
1045
|
-
|
|
1044
|
+
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) {
|
|
1045
|
+
flagForceColor = 0;
|
|
1046
1046
|
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
1047
|
-
|
|
1047
|
+
flagForceColor = 1;
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1050
|
+
function envForceColor() {
|
|
1051
|
+
if ('FORCE_COLOR' in env) {
|
|
1052
|
+
if (env.FORCE_COLOR === 'true') {
|
|
1053
|
+
return 1;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
if (env.FORCE_COLOR === 'false') {
|
|
1057
|
+
return 0;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
1061
|
+
}
|
|
1052
1062
|
}
|
|
1053
1063
|
|
|
1054
1064
|
function translateLevel(level) {
|
|
@@ -1064,31 +1074,45 @@ var require_supports_color = __commonJS({
|
|
|
1064
1074
|
};
|
|
1065
1075
|
}
|
|
1066
1076
|
|
|
1067
|
-
function supportsColor(
|
|
1068
|
-
|
|
1069
|
-
|
|
1077
|
+
function supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
|
1078
|
+
const noFlagForceColor = envForceColor();
|
|
1079
|
+
|
|
1080
|
+
if (noFlagForceColor !== void 0) {
|
|
1081
|
+
flagForceColor = noFlagForceColor;
|
|
1070
1082
|
}
|
|
1071
1083
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1084
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
1085
|
+
|
|
1086
|
+
if (forceColor === 0) {
|
|
1087
|
+
return 0;
|
|
1074
1088
|
}
|
|
1075
1089
|
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1090
|
+
if (sniffFlags) {
|
|
1091
|
+
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
1092
|
+
return 3;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
if (hasFlag('color=256')) {
|
|
1096
|
+
return 2;
|
|
1097
|
+
}
|
|
1078
1098
|
}
|
|
1079
1099
|
|
|
1080
|
-
if (
|
|
1100
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
1081
1101
|
return 0;
|
|
1082
1102
|
}
|
|
1083
1103
|
|
|
1084
|
-
const min = forceColor
|
|
1104
|
+
const min = forceColor || 0;
|
|
1105
|
+
|
|
1106
|
+
if (env.TERM === 'dumb') {
|
|
1107
|
+
return min;
|
|
1108
|
+
}
|
|
1085
1109
|
|
|
1086
1110
|
if (process.platform === 'win32') {
|
|
1087
1111
|
const osRelease = os
|
|
1088
1112
|
.release()
|
|
1089
1113
|
.split('.');
|
|
1090
1114
|
|
|
1091
|
-
if (Number(
|
|
1115
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1092
1116
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1093
1117
|
}
|
|
1094
1118
|
|
|
@@ -1101,6 +1125,9 @@ var require_supports_color = __commonJS({
|
|
|
1101
1125
|
'CIRCLECI',
|
|
1102
1126
|
'APPVEYOR',
|
|
1103
1127
|
'GITLAB_CI',
|
|
1128
|
+
'GITHUB_ACTIONS',
|
|
1129
|
+
'BUILDKITE',
|
|
1130
|
+
'DRONE',
|
|
1104
1131
|
].some((sign) => sign in env) || env.CI_NAME === 'codeship') {
|
|
1105
1132
|
return 1;
|
|
1106
1133
|
}
|
|
@@ -1117,7 +1144,7 @@ var require_supports_color = __commonJS({
|
|
|
1117
1144
|
}
|
|
1118
1145
|
|
|
1119
1146
|
if ('TERM_PROGRAM' in env) {
|
|
1120
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || '')
|
|
1147
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '')
|
|
1121
1148
|
.split('.')[0], 10);
|
|
1122
1149
|
|
|
1123
1150
|
switch(env.TERM_PROGRAM) {
|
|
@@ -1141,34 +1168,38 @@ var require_supports_color = __commonJS({
|
|
|
1141
1168
|
return 1;
|
|
1142
1169
|
}
|
|
1143
1170
|
|
|
1144
|
-
if (env.TERM === 'dumb') {
|
|
1145
|
-
return min;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
1171
|
return min;
|
|
1149
1172
|
}
|
|
1150
1173
|
|
|
1151
|
-
function getSupportLevel(stream) {
|
|
1152
|
-
const level = supportsColor(stream
|
|
1174
|
+
function getSupportLevel(stream, options = {}) {
|
|
1175
|
+
const level = supportsColor(stream, {
|
|
1176
|
+
streamIsTTY: stream && stream.isTTY,
|
|
1177
|
+
...options,
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1153
1180
|
return translateLevel(level);
|
|
1154
1181
|
}
|
|
1155
1182
|
|
|
1156
1183
|
module2.exports = {
|
|
1157
1184
|
supportsColor: getSupportLevel,
|
|
1158
|
-
stdout: getSupportLevel(
|
|
1159
|
-
|
|
1185
|
+
stdout: getSupportLevel({
|
|
1186
|
+
isTTY: tty.isatty(1),
|
|
1187
|
+
}),
|
|
1188
|
+
stderr: getSupportLevel({
|
|
1189
|
+
isTTY: tty.isatty(2),
|
|
1190
|
+
}),
|
|
1160
1191
|
};
|
|
1161
1192
|
},
|
|
1162
1193
|
});
|
|
1163
1194
|
|
|
1164
|
-
// node_modules/debug/src/node.js
|
|
1195
|
+
// ../babel-babel/node_modules/debug/src/node.js
|
|
1165
1196
|
var require_node = () => () => ({
|
|
1166
1197
|
enabled: false,
|
|
1167
1198
|
});
|
|
1168
1199
|
|
|
1169
|
-
// node_modules/debug/src/index.js
|
|
1200
|
+
// ../babel-babel/node_modules/debug/src/index.js
|
|
1170
1201
|
var require_src = __commonJS({
|
|
1171
|
-
'node_modules/debug/src/index.js'(exports2, module2) {
|
|
1202
|
+
'../babel-babel/node_modules/debug/src/index.js'(exports2, module2) {
|
|
1172
1203
|
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
1173
1204
|
module2.exports = require_browser();
|
|
1174
1205
|
} else {
|
|
@@ -1191,7 +1222,7 @@ __export(index_exports, {
|
|
|
1191
1222
|
types: () => lib_exports,
|
|
1192
1223
|
});
|
|
1193
1224
|
module.exports = __toCommonJS(index_exports);
|
|
1194
|
-
//
|
|
1225
|
+
// ../babel-babel/packages/babel-types/lib/index.js
|
|
1195
1226
|
var lib_exports = {};
|
|
1196
1227
|
|
|
1197
1228
|
__export(lib_exports, {
|
|
@@ -1359,6 +1390,7 @@ __export(lib_exports, {
|
|
|
1359
1390
|
ModuleExpression: () => ModuleExpression,
|
|
1360
1391
|
NODE_FIELDS: () => NODE_FIELDS$1,
|
|
1361
1392
|
NODE_PARENT_VALIDATIONS: () => NODE_PARENT_VALIDATIONS,
|
|
1393
|
+
NODE_UNION_SHAPES__PRIVATE: () => NODE_UNION_SHAPES__PRIVATE,
|
|
1362
1394
|
NUMBER_BINARY_OPERATORS: () => NUMBER_BINARY_OPERATORS,
|
|
1363
1395
|
NUMBER_UNARY_OPERATORS: () => NUMBER_UNARY_OPERATORS,
|
|
1364
1396
|
NewExpression: () => NewExpression,
|
|
@@ -1399,7 +1431,6 @@ __export(lib_exports, {
|
|
|
1399
1431
|
PrivateName: () => PrivateName,
|
|
1400
1432
|
Program: () => Program,
|
|
1401
1433
|
QualifiedTypeIdentifier: () => QualifiedTypeIdentifier,
|
|
1402
|
-
RecordExpression: () => RecordExpression,
|
|
1403
1434
|
RegExpLiteral: () => RegExpLiteral,
|
|
1404
1435
|
RestElement: () => RestElement,
|
|
1405
1436
|
ReturnStatement: () => ReturnStatement,
|
|
@@ -1501,7 +1532,6 @@ __export(lib_exports, {
|
|
|
1501
1532
|
ThrowStatement: () => ThrowStatement,
|
|
1502
1533
|
TopicReference: () => TopicReference,
|
|
1503
1534
|
TryStatement: () => TryStatement,
|
|
1504
|
-
TupleExpression: () => TupleExpression,
|
|
1505
1535
|
TupleTypeAnnotation: () => TupleTypeAnnotation,
|
|
1506
1536
|
TypeAlias: () => TypeAlias,
|
|
1507
1537
|
TypeAnnotation: () => TypeAnnotation,
|
|
@@ -1720,7 +1750,6 @@ __export(lib_exports, {
|
|
|
1720
1750
|
assertProperty: () => assertProperty,
|
|
1721
1751
|
assertPureish: () => assertPureish,
|
|
1722
1752
|
assertQualifiedTypeIdentifier: () => assertQualifiedTypeIdentifier,
|
|
1723
|
-
assertRecordExpression: () => assertRecordExpression,
|
|
1724
1753
|
assertRegExpLiteral: () => assertRegExpLiteral,
|
|
1725
1754
|
assertRegexLiteral: () => assertRegexLiteral,
|
|
1726
1755
|
assertRestElement: () => assertRestElement,
|
|
@@ -1821,7 +1850,6 @@ __export(lib_exports, {
|
|
|
1821
1850
|
assertThrowStatement: () => assertThrowStatement,
|
|
1822
1851
|
assertTopicReference: () => assertTopicReference,
|
|
1823
1852
|
assertTryStatement: () => assertTryStatement,
|
|
1824
|
-
assertTupleExpression: () => assertTupleExpression,
|
|
1825
1853
|
assertTupleTypeAnnotation: () => assertTupleTypeAnnotation,
|
|
1826
1854
|
assertTypeAlias: () => assertTypeAlias,
|
|
1827
1855
|
assertTypeAnnotation: () => assertTypeAnnotation,
|
|
@@ -2140,7 +2168,6 @@ __export(lib_exports, {
|
|
|
2140
2168
|
isProperty: () => isProperty,
|
|
2141
2169
|
isPureish: () => isPureish,
|
|
2142
2170
|
isQualifiedTypeIdentifier: () => isQualifiedTypeIdentifier,
|
|
2143
|
-
isRecordExpression: () => isRecordExpression,
|
|
2144
2171
|
isReferenced: () => isReferenced,
|
|
2145
2172
|
isRegExpLiteral: () => isRegExpLiteral,
|
|
2146
2173
|
isRegexLiteral: () => isRegexLiteral,
|
|
@@ -2244,7 +2271,6 @@ __export(lib_exports, {
|
|
|
2244
2271
|
isThrowStatement: () => isThrowStatement,
|
|
2245
2272
|
isTopicReference: () => isTopicReference,
|
|
2246
2273
|
isTryStatement: () => isTryStatement,
|
|
2247
|
-
isTupleExpression: () => isTupleExpression,
|
|
2248
2274
|
isTupleTypeAnnotation: () => isTupleTypeAnnotation,
|
|
2249
2275
|
isType: () => isType,
|
|
2250
2276
|
isTypeAlias: () => isTypeAlias,
|
|
@@ -2327,7 +2353,6 @@ __export(lib_exports, {
|
|
|
2327
2353
|
program: () => program,
|
|
2328
2354
|
qualifiedTypeIdentifier: () => qualifiedTypeIdentifier,
|
|
2329
2355
|
react: () => react,
|
|
2330
|
-
recordExpression: () => recordExpression,
|
|
2331
2356
|
regExpLiteral: () => regExpLiteral,
|
|
2332
2357
|
regexLiteral: () => RegexLiteral,
|
|
2333
2358
|
removeComments: () => removeComments,
|
|
@@ -2434,7 +2459,6 @@ __export(lib_exports, {
|
|
|
2434
2459
|
tsUnionType: () => tsUnionType,
|
|
2435
2460
|
tsUnknownKeyword: () => tsUnknownKeyword,
|
|
2436
2461
|
tsVoidKeyword: () => tsVoidKeyword,
|
|
2437
|
-
tupleExpression: () => tupleExpression,
|
|
2438
2462
|
tupleTypeAnnotation: () => tupleTypeAnnotation,
|
|
2439
2463
|
typeAlias: () => typeAlias,
|
|
2440
2464
|
typeAnnotation: () => typeAnnotation,
|
|
@@ -2459,9 +2483,9 @@ __export(lib_exports, {
|
|
|
2459
2483
|
yieldExpression: () => yieldExpression,
|
|
2460
2484
|
});
|
|
2461
2485
|
|
|
2462
|
-
//
|
|
2463
|
-
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-\
|
|
2464
|
-
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-\
|
|
2486
|
+
// ../babel-babel/packages/babel-helper-validator-identifier/lib/index.js
|
|
2487
|
+
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';
|
|
2488
|
+
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';
|
|
2465
2489
|
var nonASCIIidentifierStart = new RegExp('[' + nonASCIIidentifierStartChars + ']');
|
|
2466
2490
|
var nonASCIIidentifier = new RegExp('[' + nonASCIIidentifierStartChars + nonASCIIidentifierChars + ']');
|
|
2467
2491
|
|
|
@@ -2566,7 +2590,9 @@ var astralIdentifierStartCodes = [
|
|
|
2566
2590
|
21,
|
|
2567
2591
|
11,
|
|
2568
2592
|
25,
|
|
2569
|
-
|
|
2593
|
+
7,
|
|
2594
|
+
25,
|
|
2595
|
+
39,
|
|
2570
2596
|
55,
|
|
2571
2597
|
7,
|
|
2572
2598
|
1,
|
|
@@ -2611,8 +2637,8 @@ var astralIdentifierStartCodes = [
|
|
|
2611
2637
|
7,
|
|
2612
2638
|
1,
|
|
2613
2639
|
17,
|
|
2614
|
-
|
|
2615
|
-
|
|
2640
|
+
5,
|
|
2641
|
+
57,
|
|
2616
2642
|
28,
|
|
2617
2643
|
11,
|
|
2618
2644
|
0,
|
|
@@ -2796,7 +2822,9 @@ var astralIdentifierStartCodes = [
|
|
|
2796
2822
|
31,
|
|
2797
2823
|
15,
|
|
2798
2824
|
0,
|
|
2799
|
-
|
|
2825
|
+
24,
|
|
2826
|
+
43,
|
|
2827
|
+
261,
|
|
2800
2828
|
18,
|
|
2801
2829
|
16,
|
|
2802
2830
|
0,
|
|
@@ -2844,7 +2872,11 @@ var astralIdentifierStartCodes = [
|
|
|
2844
2872
|
44,
|
|
2845
2873
|
212,
|
|
2846
2874
|
63,
|
|
2847
|
-
|
|
2875
|
+
33,
|
|
2876
|
+
24,
|
|
2877
|
+
3,
|
|
2878
|
+
24,
|
|
2879
|
+
45,
|
|
2848
2880
|
74,
|
|
2849
2881
|
6,
|
|
2850
2882
|
0,
|
|
@@ -2854,13 +2886,15 @@ var astralIdentifierStartCodes = [
|
|
|
2854
2886
|
1,
|
|
2855
2887
|
2,
|
|
2856
2888
|
0,
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2889
|
+
15,
|
|
2890
|
+
4,
|
|
2891
|
+
10,
|
|
2892
|
+
7381,
|
|
2861
2893
|
42,
|
|
2862
|
-
|
|
2863
|
-
|
|
2894
|
+
31,
|
|
2895
|
+
98,
|
|
2896
|
+
114,
|
|
2897
|
+
8702,
|
|
2864
2898
|
3,
|
|
2865
2899
|
2,
|
|
2866
2900
|
6,
|
|
@@ -2968,7 +3002,19 @@ var astralIdentifierStartCodes = [
|
|
|
2968
3002
|
29,
|
|
2969
3003
|
3,
|
|
2970
3004
|
0,
|
|
2971
|
-
|
|
3005
|
+
208,
|
|
3006
|
+
30,
|
|
3007
|
+
2,
|
|
3008
|
+
2,
|
|
3009
|
+
2,
|
|
3010
|
+
1,
|
|
3011
|
+
2,
|
|
3012
|
+
6,
|
|
3013
|
+
3,
|
|
3014
|
+
4,
|
|
3015
|
+
10,
|
|
3016
|
+
1,
|
|
3017
|
+
225,
|
|
2972
3018
|
6,
|
|
2973
3019
|
2,
|
|
2974
3020
|
3,
|
|
@@ -3051,12 +3097,10 @@ var astralIdentifierStartCodes = [
|
|
|
3051
3097
|
4421,
|
|
3052
3098
|
42719,
|
|
3053
3099
|
33,
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3100
|
+
4381,
|
|
3101
|
+
3,
|
|
3102
|
+
5773,
|
|
3057
3103
|
3,
|
|
3058
|
-
5761,
|
|
3059
|
-
15,
|
|
3060
3104
|
7472,
|
|
3061
3105
|
16,
|
|
3062
3106
|
621,
|
|
@@ -3065,7 +3109,7 @@ var astralIdentifierStartCodes = [
|
|
|
3065
3109
|
1507,
|
|
3066
3110
|
4938,
|
|
3067
3111
|
6,
|
|
3068
|
-
|
|
3112
|
+
8489,
|
|
3069
3113
|
];
|
|
3070
3114
|
var astralIdentifierCodes = [
|
|
3071
3115
|
509,
|
|
@@ -3098,8 +3142,8 @@ var astralIdentifierCodes = [
|
|
|
3098
3142
|
4,
|
|
3099
3143
|
318,
|
|
3100
3144
|
1,
|
|
3101
|
-
|
|
3102
|
-
|
|
3145
|
+
78,
|
|
3146
|
+
5,
|
|
3103
3147
|
71,
|
|
3104
3148
|
10,
|
|
3105
3149
|
50,
|
|
@@ -3244,7 +3288,9 @@ var astralIdentifierCodes = [
|
|
|
3244
3288
|
10,
|
|
3245
3289
|
47,
|
|
3246
3290
|
15,
|
|
3247
|
-
|
|
3291
|
+
199,
|
|
3292
|
+
7,
|
|
3293
|
+
137,
|
|
3248
3294
|
9,
|
|
3249
3295
|
54,
|
|
3250
3296
|
7,
|
|
@@ -3276,7 +3322,9 @@ var astralIdentifierCodes = [
|
|
|
3276
3322
|
4,
|
|
3277
3323
|
9,
|
|
3278
3324
|
9,
|
|
3279
|
-
|
|
3325
|
+
55,
|
|
3326
|
+
9,
|
|
3327
|
+
266,
|
|
3280
3328
|
3,
|
|
3281
3329
|
10,
|
|
3282
3330
|
1,
|
|
@@ -3376,7 +3424,15 @@ var astralIdentifierCodes = [
|
|
|
3376
3424
|
1,
|
|
3377
3425
|
2,
|
|
3378
3426
|
9,
|
|
3379
|
-
|
|
3427
|
+
233,
|
|
3428
|
+
0,
|
|
3429
|
+
3,
|
|
3430
|
+
0,
|
|
3431
|
+
8,
|
|
3432
|
+
1,
|
|
3433
|
+
6,
|
|
3434
|
+
0,
|
|
3435
|
+
475,
|
|
3380
3436
|
6,
|
|
3381
3437
|
110,
|
|
3382
3438
|
6,
|
|
@@ -3548,7 +3604,7 @@ function isKeyword(word) {
|
|
|
3548
3604
|
return keywords.has(word);
|
|
3549
3605
|
}
|
|
3550
3606
|
|
|
3551
|
-
//
|
|
3607
|
+
// ../babel-babel/packages/babel-helper-string-parser/lib/index.js
|
|
3552
3608
|
var _isDigit = function isDigit(code2) {
|
|
3553
3609
|
return code2 >= 48 && code2 <= 57;
|
|
3554
3610
|
};
|
|
@@ -3903,7 +3959,7 @@ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
|
|
3903
3959
|
};
|
|
3904
3960
|
}
|
|
3905
3961
|
|
|
3906
|
-
//
|
|
3962
|
+
// ../babel-babel/packages/babel-types/lib/index.js
|
|
3907
3963
|
function shallowEqual(actual, expected) {
|
|
3908
3964
|
const keys2 = Object.keys(expected);
|
|
3909
3965
|
|
|
@@ -5725,26 +5781,6 @@ function isExportDefaultSpecifier(node, opts) {
|
|
|
5725
5781
|
return opts == null || shallowEqual(node, opts);
|
|
5726
5782
|
}
|
|
5727
5783
|
|
|
5728
|
-
function isRecordExpression(node, opts) {
|
|
5729
|
-
if (!node)
|
|
5730
|
-
return false;
|
|
5731
|
-
|
|
5732
|
-
if (node.type !== 'RecordExpression')
|
|
5733
|
-
return false;
|
|
5734
|
-
|
|
5735
|
-
return opts == null || shallowEqual(node, opts);
|
|
5736
|
-
}
|
|
5737
|
-
|
|
5738
|
-
function isTupleExpression(node, opts) {
|
|
5739
|
-
if (!node)
|
|
5740
|
-
return false;
|
|
5741
|
-
|
|
5742
|
-
if (node.type !== 'TupleExpression')
|
|
5743
|
-
return false;
|
|
5744
|
-
|
|
5745
|
-
return opts == null || shallowEqual(node, opts);
|
|
5746
|
-
}
|
|
5747
|
-
|
|
5748
5784
|
function isModuleExpression(node, opts) {
|
|
5749
5785
|
if (!node)
|
|
5750
5786
|
return false;
|
|
@@ -6646,8 +6682,6 @@ function isExpression(node, opts) {
|
|
|
6646
6682
|
case 'JSXFragment':
|
|
6647
6683
|
case 'BindExpression':
|
|
6648
6684
|
case 'DoExpression':
|
|
6649
|
-
case 'RecordExpression':
|
|
6650
|
-
case 'TupleExpression':
|
|
6651
6685
|
case 'ModuleExpression':
|
|
6652
6686
|
case 'TopicReference':
|
|
6653
6687
|
case 'PipelineTopicExpression':
|
|
@@ -8073,6 +8107,7 @@ var NODE_FIELDS$1 = {};
|
|
|
8073
8107
|
var BUILDER_KEYS = {};
|
|
8074
8108
|
var DEPRECATED_KEYS = {};
|
|
8075
8109
|
var NODE_PARENT_VALIDATIONS = {};
|
|
8110
|
+
var NODE_UNION_SHAPES__PRIVATE = {};
|
|
8076
8111
|
|
|
8077
8112
|
function getType(val) {
|
|
8078
8113
|
if (Array.isArray(val)) {
|
|
@@ -8311,6 +8346,7 @@ var validTypeOpts = /* @__PURE__ */new Set([
|
|
|
8311
8346
|
'inherits',
|
|
8312
8347
|
'visitor',
|
|
8313
8348
|
'validate',
|
|
8349
|
+
'unionShape',
|
|
8314
8350
|
]);
|
|
8315
8351
|
var validFieldKeys = /* @__PURE__ */new Set([
|
|
8316
8352
|
'default',
|
|
@@ -8424,6 +8460,10 @@ function defineType$5(type, opts = {}) {
|
|
|
8424
8460
|
NODE_PARENT_VALIDATIONS[type] = opts.validate;
|
|
8425
8461
|
}
|
|
8426
8462
|
|
|
8463
|
+
if (opts.unionShape) {
|
|
8464
|
+
NODE_UNION_SHAPES__PRIVATE[type] = opts.unionShape;
|
|
8465
|
+
}
|
|
8466
|
+
|
|
8427
8467
|
store[type] = opts;
|
|
8428
8468
|
}
|
|
8429
8469
|
|
|
@@ -8435,6 +8475,7 @@ var utils = /* @__PURE__ */Object.freeze({
|
|
|
8435
8475
|
FLIPPED_ALIAS_KEYS,
|
|
8436
8476
|
NODE_FIELDS: NODE_FIELDS$1,
|
|
8437
8477
|
NODE_PARENT_VALIDATIONS,
|
|
8478
|
+
NODE_UNION_SHAPES__PRIVATE,
|
|
8438
8479
|
VISITOR_KEYS,
|
|
8439
8480
|
allExpandedTypes,
|
|
8440
8481
|
arrayOf,
|
|
@@ -8456,6 +8497,29 @@ var utils = /* @__PURE__ */Object.freeze({
|
|
|
8456
8497
|
validateType,
|
|
8457
8498
|
});
|
|
8458
8499
|
|
|
8500
|
+
var classMethodOrPropertyUnionShapeCommon = (allowPrivateName = false) => ({
|
|
8501
|
+
unionShape: {
|
|
8502
|
+
discriminator: 'computed',
|
|
8503
|
+
shapes: [{
|
|
8504
|
+
name: 'computed',
|
|
8505
|
+
value: [true],
|
|
8506
|
+
properties: {
|
|
8507
|
+
key: {
|
|
8508
|
+
validate: assertNodeType('Expression'),
|
|
8509
|
+
},
|
|
8510
|
+
},
|
|
8511
|
+
}, {
|
|
8512
|
+
name: 'nonComputed',
|
|
8513
|
+
value: [false],
|
|
8514
|
+
properties: {
|
|
8515
|
+
key: {
|
|
8516
|
+
validate: allowPrivateName ? assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName') : assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral'),
|
|
8517
|
+
},
|
|
8518
|
+
},
|
|
8519
|
+
}],
|
|
8520
|
+
},
|
|
8521
|
+
});
|
|
8522
|
+
|
|
8459
8523
|
var defineType$4 = defineAliasedType('Standardized');
|
|
8460
8524
|
|
|
8461
8525
|
defineType$4('ArrayExpression', {
|
|
@@ -9098,6 +9162,26 @@ defineType$4('MemberExpression', {
|
|
|
9098
9162
|
'LVal',
|
|
9099
9163
|
'PatternLike',
|
|
9100
9164
|
],
|
|
9165
|
+
unionShape: {
|
|
9166
|
+
discriminator: 'computed',
|
|
9167
|
+
shapes: [{
|
|
9168
|
+
name: 'computed',
|
|
9169
|
+
value: [true],
|
|
9170
|
+
properties: {
|
|
9171
|
+
property: {
|
|
9172
|
+
validate: assertNodeType('Expression'),
|
|
9173
|
+
},
|
|
9174
|
+
},
|
|
9175
|
+
}, {
|
|
9176
|
+
name: 'nonComputed',
|
|
9177
|
+
value: [false],
|
|
9178
|
+
properties: {
|
|
9179
|
+
property: {
|
|
9180
|
+
validate: assertNodeType('Identifier', 'PrivateName'),
|
|
9181
|
+
},
|
|
9182
|
+
},
|
|
9183
|
+
}],
|
|
9184
|
+
},
|
|
9101
9185
|
fields: Object.assign({
|
|
9102
9186
|
object: {
|
|
9103
9187
|
validate: assertNodeType('Expression', 'Super'),
|
|
@@ -9164,7 +9248,7 @@ defineType$4('ObjectExpression', {
|
|
|
9164
9248
|
properties: validateArrayOfType('ObjectMethod', 'ObjectProperty', 'SpreadElement'),
|
|
9165
9249
|
},
|
|
9166
9250
|
});
|
|
9167
|
-
defineType$4('ObjectMethod', {
|
|
9251
|
+
defineType$4('ObjectMethod', Object.assign({
|
|
9168
9252
|
builder: [
|
|
9169
9253
|
'kind',
|
|
9170
9254
|
'key',
|
|
@@ -9182,6 +9266,7 @@ defineType$4('ObjectMethod', {
|
|
|
9182
9266
|
'returnType',
|
|
9183
9267
|
'body',
|
|
9184
9268
|
],
|
|
9269
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
9185
9270
|
fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
|
|
9186
9271
|
kind: Object.assign({
|
|
9187
9272
|
validate: assertOneOf('method', 'get', 'set'),
|
|
@@ -9225,7 +9310,7 @@ defineType$4('ObjectMethod', {
|
|
|
9225
9310
|
'Method',
|
|
9226
9311
|
'ObjectMember',
|
|
9227
9312
|
],
|
|
9228
|
-
});
|
|
9313
|
+
}));
|
|
9229
9314
|
defineType$4('ObjectProperty', {
|
|
9230
9315
|
builder: [
|
|
9231
9316
|
'key',
|
|
@@ -9234,6 +9319,26 @@ defineType$4('ObjectProperty', {
|
|
|
9234
9319
|
'shorthand',
|
|
9235
9320
|
...[],
|
|
9236
9321
|
],
|
|
9322
|
+
unionShape: {
|
|
9323
|
+
discriminator: 'computed',
|
|
9324
|
+
shapes: [{
|
|
9325
|
+
name: 'computed',
|
|
9326
|
+
value: [true],
|
|
9327
|
+
properties: {
|
|
9328
|
+
key: {
|
|
9329
|
+
validate: assertNodeType('Expression'),
|
|
9330
|
+
},
|
|
9331
|
+
},
|
|
9332
|
+
}, {
|
|
9333
|
+
name: 'nonComputed',
|
|
9334
|
+
value: [false],
|
|
9335
|
+
properties: {
|
|
9336
|
+
key: {
|
|
9337
|
+
validate: assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName'),
|
|
9338
|
+
},
|
|
9339
|
+
},
|
|
9340
|
+
}],
|
|
9341
|
+
},
|
|
9237
9342
|
fields: {
|
|
9238
9343
|
computed: {
|
|
9239
9344
|
default: false,
|
|
@@ -10097,7 +10202,7 @@ var classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(),
|
|
|
10097
10202
|
},
|
|
10098
10203
|
});
|
|
10099
10204
|
|
|
10100
|
-
defineType$4('ClassMethod', {
|
|
10205
|
+
defineType$4('ClassMethod', Object.assign({
|
|
10101
10206
|
aliases: [
|
|
10102
10207
|
'Function',
|
|
10103
10208
|
'Scopable',
|
|
@@ -10123,12 +10228,13 @@ defineType$4('ClassMethod', {
|
|
|
10123
10228
|
'returnType',
|
|
10124
10229
|
'body',
|
|
10125
10230
|
],
|
|
10231
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
10126
10232
|
fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), {
|
|
10127
10233
|
body: {
|
|
10128
10234
|
validate: assertNodeType('BlockStatement'),
|
|
10129
10235
|
},
|
|
10130
10236
|
}),
|
|
10131
|
-
});
|
|
10237
|
+
}));
|
|
10132
10238
|
defineType$4('ObjectPattern', {
|
|
10133
10239
|
visitor: [
|
|
10134
10240
|
'decorators',
|
|
@@ -10356,7 +10462,7 @@ defineType$4('OptionalCallExpression', {
|
|
|
10356
10462
|
},
|
|
10357
10463
|
}, {}),
|
|
10358
10464
|
});
|
|
10359
|
-
defineType$4('ClassProperty', {
|
|
10465
|
+
defineType$4('ClassProperty', Object.assign({
|
|
10360
10466
|
visitor: [
|
|
10361
10467
|
'decorators',
|
|
10362
10468
|
'variance',
|
|
@@ -10373,6 +10479,7 @@ defineType$4('ClassProperty', {
|
|
|
10373
10479
|
'static',
|
|
10374
10480
|
],
|
|
10375
10481
|
aliases: ['Property'],
|
|
10482
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
10376
10483
|
fields: Object.assign({}, classMethodOrPropertyCommon(), {
|
|
10377
10484
|
value: {
|
|
10378
10485
|
validate: assertNodeType('Expression'),
|
|
@@ -10403,8 +10510,8 @@ defineType$4('ClassProperty', {
|
|
|
10403
10510
|
optional: true,
|
|
10404
10511
|
},
|
|
10405
10512
|
}),
|
|
10406
|
-
});
|
|
10407
|
-
defineType$4('ClassAccessorProperty', {
|
|
10513
|
+
}));
|
|
10514
|
+
defineType$4('ClassAccessorProperty', Object.assign({
|
|
10408
10515
|
visitor: [
|
|
10409
10516
|
'decorators',
|
|
10410
10517
|
'key',
|
|
@@ -10420,6 +10527,7 @@ defineType$4('ClassAccessorProperty', {
|
|
|
10420
10527
|
'static',
|
|
10421
10528
|
],
|
|
10422
10529
|
aliases: ['Property', 'Accessor'],
|
|
10530
|
+
}, classMethodOrPropertyUnionShapeCommon(true), {
|
|
10423
10531
|
fields: Object.assign({}, classMethodOrPropertyCommon(), {
|
|
10424
10532
|
key: {
|
|
10425
10533
|
validate: chain((function() {
|
|
@@ -10461,7 +10569,7 @@ defineType$4('ClassAccessorProperty', {
|
|
|
10461
10569
|
optional: true,
|
|
10462
10570
|
},
|
|
10463
10571
|
}),
|
|
10464
|
-
});
|
|
10572
|
+
}));
|
|
10465
10573
|
defineType$4('ClassPrivateProperty', {
|
|
10466
10574
|
visitor: [
|
|
10467
10575
|
'decorators',
|
|
@@ -11470,23 +11578,6 @@ defineType$5('ExportDefaultSpecifier', {
|
|
|
11470
11578
|
},
|
|
11471
11579
|
},
|
|
11472
11580
|
});
|
|
11473
|
-
defineType$5('RecordExpression', {
|
|
11474
|
-
visitor: ['properties'],
|
|
11475
|
-
aliases: ['Expression'],
|
|
11476
|
-
fields: {
|
|
11477
|
-
properties: validateArrayOfType('ObjectProperty', 'SpreadElement'),
|
|
11478
|
-
},
|
|
11479
|
-
});
|
|
11480
|
-
defineType$5('TupleExpression', {
|
|
11481
|
-
fields: {
|
|
11482
|
-
elements: {
|
|
11483
|
-
validate: arrayOfType('Expression', 'SpreadElement'),
|
|
11484
|
-
default: [],
|
|
11485
|
-
},
|
|
11486
|
-
},
|
|
11487
|
-
visitor: ['elements'],
|
|
11488
|
-
aliases: ['Expression'],
|
|
11489
|
-
});
|
|
11490
11581
|
defineType$5('ModuleExpression', {
|
|
11491
11582
|
visitor: ['body'],
|
|
11492
11583
|
fields: {
|
|
@@ -11578,7 +11669,7 @@ defineType('TSDeclareFunction', {
|
|
|
11578
11669
|
],
|
|
11579
11670
|
fields: Object.assign({}, functionDeclarationCommon(), tSFunctionTypeAnnotationCommon()),
|
|
11580
11671
|
});
|
|
11581
|
-
defineType('TSDeclareMethod', {
|
|
11672
|
+
defineType('TSDeclareMethod', Object.assign({
|
|
11582
11673
|
visitor: [
|
|
11583
11674
|
'decorators',
|
|
11584
11675
|
'key',
|
|
@@ -11586,8 +11677,9 @@ defineType('TSDeclareMethod', {
|
|
|
11586
11677
|
'params',
|
|
11587
11678
|
'returnType',
|
|
11588
11679
|
],
|
|
11680
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
11589
11681
|
fields: Object.assign({}, classMethodOrDeclareMethodCommon(), tSFunctionTypeAnnotationCommon()),
|
|
11590
|
-
});
|
|
11682
|
+
}));
|
|
11591
11683
|
defineType('TSQualifiedName', {
|
|
11592
11684
|
aliases: ['TSEntityName'],
|
|
11593
11685
|
visitor: ['left', 'right'],
|
|
@@ -11898,14 +11990,14 @@ defineType('TSLiteralType', {
|
|
|
11898
11990
|
const unaryOperator = assertOneOf('-');
|
|
11899
11991
|
const literal = assertNodeType('NumericLiteral', 'StringLiteral', 'BooleanLiteral', 'BigIntLiteral', 'TemplateLiteral');
|
|
11900
11992
|
|
|
11901
|
-
function
|
|
11993
|
+
const validator = function validator2(parent, key, node) {
|
|
11902
11994
|
if (is('UnaryExpression', node)) {
|
|
11903
11995
|
unaryOperator(node, 'operator', node.operator);
|
|
11904
11996
|
unaryExpression3(node, 'argument', node.argument);
|
|
11905
11997
|
} else {
|
|
11906
11998
|
literal(parent, key, node);
|
|
11907
11999
|
}
|
|
11908
|
-
}
|
|
12000
|
+
};
|
|
11909
12001
|
|
|
11910
12002
|
validator.oneOfNodeTypes = [
|
|
11911
12003
|
'NumericLiteral',
|
|
@@ -14467,28 +14559,6 @@ function exportDefaultSpecifier(exported) {
|
|
|
14467
14559
|
return node;
|
|
14468
14560
|
}
|
|
14469
14561
|
|
|
14470
|
-
function recordExpression(properties) {
|
|
14471
|
-
const node = {
|
|
14472
|
-
type: 'RecordExpression',
|
|
14473
|
-
properties,
|
|
14474
|
-
};
|
|
14475
|
-
|
|
14476
|
-
const defs = NODE_FIELDS.RecordExpression;
|
|
14477
|
-
validate(defs.properties, node, 'properties', properties, 1);
|
|
14478
|
-
return node;
|
|
14479
|
-
}
|
|
14480
|
-
|
|
14481
|
-
function tupleExpression(elements = []) {
|
|
14482
|
-
const node = {
|
|
14483
|
-
type: 'TupleExpression',
|
|
14484
|
-
elements,
|
|
14485
|
-
};
|
|
14486
|
-
|
|
14487
|
-
const defs = NODE_FIELDS.TupleExpression;
|
|
14488
|
-
validate(defs.elements, node, 'elements', elements, 1);
|
|
14489
|
-
return node;
|
|
14490
|
-
}
|
|
14491
|
-
|
|
14492
14562
|
function moduleExpression(body) {
|
|
14493
14563
|
const node = {
|
|
14494
14564
|
type: 'ModuleExpression',
|
|
@@ -15494,7 +15564,6 @@ var b = /* @__PURE__ */Object.freeze({
|
|
|
15494
15564
|
privateName,
|
|
15495
15565
|
program,
|
|
15496
15566
|
qualifiedTypeIdentifier,
|
|
15497
|
-
recordExpression,
|
|
15498
15567
|
regExpLiteral,
|
|
15499
15568
|
regexLiteral: RegexLiteral,
|
|
15500
15569
|
restElement,
|
|
@@ -15587,7 +15656,6 @@ var b = /* @__PURE__ */Object.freeze({
|
|
|
15587
15656
|
tsUnionType,
|
|
15588
15657
|
tsUnknownKeyword,
|
|
15589
15658
|
tsVoidKeyword,
|
|
15590
|
-
tupleExpression,
|
|
15591
15659
|
tupleTypeAnnotation,
|
|
15592
15660
|
typeAlias,
|
|
15593
15661
|
typeAnnotation,
|
|
@@ -15795,8 +15863,6 @@ var BindExpression = alias('bindExpression');
|
|
|
15795
15863
|
var Decorator = alias('decorator');
|
|
15796
15864
|
var DoExpression = alias('doExpression');
|
|
15797
15865
|
var ExportDefaultSpecifier = alias('exportDefaultSpecifier');
|
|
15798
|
-
var RecordExpression = alias('recordExpression');
|
|
15799
|
-
var TupleExpression = alias('tupleExpression');
|
|
15800
15866
|
var ModuleExpression = alias('moduleExpression');
|
|
15801
15867
|
var TopicReference = alias('topicReference');
|
|
15802
15868
|
var PipelineTopicExpression = alias('pipelineTopicExpression');
|
|
@@ -16656,14 +16722,6 @@ function assertExportDefaultSpecifier(node, opts) {
|
|
|
16656
16722
|
assert('ExportDefaultSpecifier', node, opts);
|
|
16657
16723
|
}
|
|
16658
16724
|
|
|
16659
|
-
function assertRecordExpression(node, opts) {
|
|
16660
|
-
assert('RecordExpression', node, opts);
|
|
16661
|
-
}
|
|
16662
|
-
|
|
16663
|
-
function assertTupleExpression(node, opts) {
|
|
16664
|
-
assert('TupleExpression', node, opts);
|
|
16665
|
-
}
|
|
16666
|
-
|
|
16667
16725
|
function assertModuleExpression(node, opts) {
|
|
16668
16726
|
assert('ModuleExpression', node, opts);
|
|
16669
16727
|
}
|
|
@@ -18460,7 +18518,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
18460
18518
|
return !!parent.computed;
|
|
18461
18519
|
}
|
|
18462
18520
|
|
|
18463
|
-
return
|
|
18521
|
+
return grandparent?.type !== 'ObjectPattern';
|
|
18464
18522
|
|
|
18465
18523
|
case 'ClassProperty':
|
|
18466
18524
|
case 'ClassAccessorProperty':
|
|
@@ -18607,7 +18665,7 @@ var react = {
|
|
|
18607
18665
|
buildChildren,
|
|
18608
18666
|
};
|
|
18609
18667
|
|
|
18610
|
-
//
|
|
18668
|
+
// ../babel-babel/packages/babel-parser/lib/index.js
|
|
18611
18669
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
18612
18670
|
if (null == r)
|
|
18613
18671
|
return {};
|
|
@@ -18996,7 +19054,7 @@ function createDefaultOptions() {
|
|
|
18996
19054
|
allowUndeclaredExports: false,
|
|
18997
19055
|
allowYieldOutsideFunction: false,
|
|
18998
19056
|
plugins: [],
|
|
18999
|
-
strictMode:
|
|
19057
|
+
strictMode: void 0,
|
|
19000
19058
|
ranges: false,
|
|
19001
19059
|
tokens: false,
|
|
19002
19060
|
createImportExpressions: true,
|
|
@@ -19225,8 +19283,6 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
|
|
|
19225
19283
|
|
|
19226
19284
|
convertPrivateNameToPrivateIdentifier(node) {
|
|
19227
19285
|
const name = super.getPrivateNameSV(node);
|
|
19228
|
-
|
|
19229
|
-
node = node;
|
|
19230
19286
|
delete node.id;
|
|
19231
19287
|
node.name = name;
|
|
19232
19288
|
return this.castNodeTo(node, 'PrivateIdentifier');
|
|
@@ -19356,8 +19412,8 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
|
|
|
19356
19412
|
return this.finishNode(node, 'Property');
|
|
19357
19413
|
}
|
|
19358
19414
|
|
|
19359
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
19360
|
-
return type === 'Property' ? 'value' : super.isValidLVal(type, isUnparenthesizedInAssign, binding);
|
|
19415
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
19416
|
+
return type === 'Property' ? 'value' : super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
19361
19417
|
}
|
|
19362
19418
|
|
|
19363
19419
|
isAssignable(node, isBinding3) {
|
|
@@ -20109,8 +20165,8 @@ function getExportedToken(token) {
|
|
|
20109
20165
|
return tokenTypes[token];
|
|
20110
20166
|
}
|
|
20111
20167
|
|
|
20112
|
-
var nonASCIIidentifierStartChars2 = '\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-\
|
|
20113
|
-
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-\
|
|
20168
|
+
var nonASCIIidentifierStartChars2 = '\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';
|
|
20169
|
+
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';
|
|
20114
20170
|
var nonASCIIidentifierStart2 = new RegExp('[' + nonASCIIidentifierStartChars2 + ']');
|
|
20115
20171
|
var nonASCIIidentifier2 = new RegExp('[' + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + ']');
|
|
20116
20172
|
|
|
@@ -20215,7 +20271,9 @@ var astralIdentifierStartCodes2 = [
|
|
|
20215
20271
|
21,
|
|
20216
20272
|
11,
|
|
20217
20273
|
25,
|
|
20218
|
-
|
|
20274
|
+
7,
|
|
20275
|
+
25,
|
|
20276
|
+
39,
|
|
20219
20277
|
55,
|
|
20220
20278
|
7,
|
|
20221
20279
|
1,
|
|
@@ -20260,8 +20318,8 @@ var astralIdentifierStartCodes2 = [
|
|
|
20260
20318
|
7,
|
|
20261
20319
|
1,
|
|
20262
20320
|
17,
|
|
20263
|
-
|
|
20264
|
-
|
|
20321
|
+
5,
|
|
20322
|
+
57,
|
|
20265
20323
|
28,
|
|
20266
20324
|
11,
|
|
20267
20325
|
0,
|
|
@@ -20445,7 +20503,9 @@ var astralIdentifierStartCodes2 = [
|
|
|
20445
20503
|
31,
|
|
20446
20504
|
15,
|
|
20447
20505
|
0,
|
|
20448
|
-
|
|
20506
|
+
24,
|
|
20507
|
+
43,
|
|
20508
|
+
261,
|
|
20449
20509
|
18,
|
|
20450
20510
|
16,
|
|
20451
20511
|
0,
|
|
@@ -20493,7 +20553,11 @@ var astralIdentifierStartCodes2 = [
|
|
|
20493
20553
|
44,
|
|
20494
20554
|
212,
|
|
20495
20555
|
63,
|
|
20496
|
-
|
|
20556
|
+
33,
|
|
20557
|
+
24,
|
|
20558
|
+
3,
|
|
20559
|
+
24,
|
|
20560
|
+
45,
|
|
20497
20561
|
74,
|
|
20498
20562
|
6,
|
|
20499
20563
|
0,
|
|
@@ -20503,13 +20567,15 @@ var astralIdentifierStartCodes2 = [
|
|
|
20503
20567
|
1,
|
|
20504
20568
|
2,
|
|
20505
20569
|
0,
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20570
|
+
15,
|
|
20571
|
+
4,
|
|
20572
|
+
10,
|
|
20573
|
+
7381,
|
|
20510
20574
|
42,
|
|
20511
|
-
|
|
20512
|
-
|
|
20575
|
+
31,
|
|
20576
|
+
98,
|
|
20577
|
+
114,
|
|
20578
|
+
8702,
|
|
20513
20579
|
3,
|
|
20514
20580
|
2,
|
|
20515
20581
|
6,
|
|
@@ -20617,7 +20683,19 @@ var astralIdentifierStartCodes2 = [
|
|
|
20617
20683
|
29,
|
|
20618
20684
|
3,
|
|
20619
20685
|
0,
|
|
20620
|
-
|
|
20686
|
+
208,
|
|
20687
|
+
30,
|
|
20688
|
+
2,
|
|
20689
|
+
2,
|
|
20690
|
+
2,
|
|
20691
|
+
1,
|
|
20692
|
+
2,
|
|
20693
|
+
6,
|
|
20694
|
+
3,
|
|
20695
|
+
4,
|
|
20696
|
+
10,
|
|
20697
|
+
1,
|
|
20698
|
+
225,
|
|
20621
20699
|
6,
|
|
20622
20700
|
2,
|
|
20623
20701
|
3,
|
|
@@ -20700,12 +20778,10 @@ var astralIdentifierStartCodes2 = [
|
|
|
20700
20778
|
4421,
|
|
20701
20779
|
42719,
|
|
20702
20780
|
33,
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20781
|
+
4381,
|
|
20782
|
+
3,
|
|
20783
|
+
5773,
|
|
20706
20784
|
3,
|
|
20707
|
-
5761,
|
|
20708
|
-
15,
|
|
20709
20785
|
7472,
|
|
20710
20786
|
16,
|
|
20711
20787
|
621,
|
|
@@ -20714,7 +20790,7 @@ var astralIdentifierStartCodes2 = [
|
|
|
20714
20790
|
1507,
|
|
20715
20791
|
4938,
|
|
20716
20792
|
6,
|
|
20717
|
-
|
|
20793
|
+
8489,
|
|
20718
20794
|
];
|
|
20719
20795
|
var astralIdentifierCodes2 = [
|
|
20720
20796
|
509,
|
|
@@ -20747,8 +20823,8 @@ var astralIdentifierCodes2 = [
|
|
|
20747
20823
|
4,
|
|
20748
20824
|
318,
|
|
20749
20825
|
1,
|
|
20750
|
-
|
|
20751
|
-
|
|
20826
|
+
78,
|
|
20827
|
+
5,
|
|
20752
20828
|
71,
|
|
20753
20829
|
10,
|
|
20754
20830
|
50,
|
|
@@ -20893,7 +20969,9 @@ var astralIdentifierCodes2 = [
|
|
|
20893
20969
|
10,
|
|
20894
20970
|
47,
|
|
20895
20971
|
15,
|
|
20896
|
-
|
|
20972
|
+
199,
|
|
20973
|
+
7,
|
|
20974
|
+
137,
|
|
20897
20975
|
9,
|
|
20898
20976
|
54,
|
|
20899
20977
|
7,
|
|
@@ -20925,7 +21003,9 @@ var astralIdentifierCodes2 = [
|
|
|
20925
21003
|
4,
|
|
20926
21004
|
9,
|
|
20927
21005
|
9,
|
|
20928
|
-
|
|
21006
|
+
55,
|
|
21007
|
+
9,
|
|
21008
|
+
266,
|
|
20929
21009
|
3,
|
|
20930
21010
|
10,
|
|
20931
21011
|
1,
|
|
@@ -21025,7 +21105,15 @@ var astralIdentifierCodes2 = [
|
|
|
21025
21105
|
1,
|
|
21026
21106
|
2,
|
|
21027
21107
|
9,
|
|
21028
|
-
|
|
21108
|
+
233,
|
|
21109
|
+
0,
|
|
21110
|
+
3,
|
|
21111
|
+
0,
|
|
21112
|
+
8,
|
|
21113
|
+
1,
|
|
21114
|
+
6,
|
|
21115
|
+
0,
|
|
21116
|
+
475,
|
|
21029
21117
|
6,
|
|
21030
21118
|
110,
|
|
21031
21119
|
6,
|
|
@@ -21388,7 +21476,7 @@ var ScopeHandler = class {
|
|
|
21388
21476
|
return scope2.names.has(name);
|
|
21389
21477
|
}
|
|
21390
21478
|
|
|
21391
|
-
const type = scope2.names.get(name);
|
|
21479
|
+
const type = scope2.names.get(name) || 0;
|
|
21392
21480
|
|
|
21393
21481
|
if (bindingType & 16) {
|
|
21394
21482
|
return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope2) && (type & 1) > 0;
|
|
@@ -22199,7 +22287,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
22199
22287
|
let closingElement = null;
|
|
22200
22288
|
|
|
22201
22289
|
if (!openingElement.selfClosing) {
|
|
22202
|
-
contents:
|
|
22290
|
+
contents: for (;;) {
|
|
22203
22291
|
switch(this.state.type) {
|
|
22204
22292
|
case 143:
|
|
22205
22293
|
startLoc = this.state.startLoc;
|
|
@@ -22691,7 +22779,8 @@ var CommentsParser = class extends BaseParser {
|
|
|
22691
22779
|
setLeadingComments(commentWS.trailingNode, comments);
|
|
22692
22780
|
}
|
|
22693
22781
|
} else {
|
|
22694
|
-
const
|
|
22782
|
+
const node = commentWS.containingNode;
|
|
22783
|
+
const commentStart = commentWS.start;
|
|
22695
22784
|
|
|
22696
22785
|
if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
|
|
22697
22786
|
switch(node.type) {
|
|
@@ -25105,6 +25194,11 @@ var UtilParser = class extends Tokenizer {
|
|
|
25105
25194
|
scopeFlags |= 512;
|
|
25106
25195
|
}
|
|
25107
25196
|
|
|
25197
|
+
{
|
|
25198
|
+
if (this.optionFlags & 16) {
|
|
25199
|
+
scopeFlags |= 16 | 32;
|
|
25200
|
+
}
|
|
25201
|
+
}
|
|
25108
25202
|
this.scope.enter(scopeFlags);
|
|
25109
25203
|
}
|
|
25110
25204
|
|
|
@@ -25264,7 +25358,7 @@ var LValParser = class extends NodeUtils {
|
|
|
25264
25358
|
if (isLHS) {
|
|
25265
25359
|
if (parenthesized.type === 'Identifier') {
|
|
25266
25360
|
this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node);
|
|
25267
|
-
} else if (parenthesized.type !== 'MemberExpression' && !this.isOptionalMemberExpression(parenthesized)) {
|
|
25361
|
+
} else if (parenthesized.type !== 'CallExpression' && parenthesized.type !== 'MemberExpression' && !this.isOptionalMemberExpression(parenthesized)) {
|
|
25268
25362
|
this.raise(Errors.InvalidParenthesizedAssignment, node);
|
|
25269
25363
|
}
|
|
25270
25364
|
} else {
|
|
@@ -25608,7 +25702,7 @@ var LValParser = class extends NodeUtils {
|
|
|
25608
25702
|
return this.finishNode(node, 'AssignmentPattern');
|
|
25609
25703
|
}
|
|
25610
25704
|
|
|
25611
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
25705
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
25612
25706
|
switch(type) {
|
|
25613
25707
|
case 'AssignmentPattern':
|
|
25614
25708
|
return 'left';
|
|
@@ -25630,6 +25724,11 @@ var LValParser = class extends NodeUtils {
|
|
|
25630
25724
|
|
|
25631
25725
|
case 'VoidPattern':
|
|
25632
25726
|
return true;
|
|
25727
|
+
|
|
25728
|
+
case 'CallExpression':
|
|
25729
|
+
if (!disallowCallExpression && !this.state.strict && this.optionFlags & 8192) {
|
|
25730
|
+
return true;
|
|
25731
|
+
}
|
|
25633
25732
|
}
|
|
25634
25733
|
|
|
25635
25734
|
return false;
|
|
@@ -25639,7 +25738,7 @@ var LValParser = class extends NodeUtils {
|
|
|
25639
25738
|
return expression2.type === 'OptionalMemberExpression';
|
|
25640
25739
|
}
|
|
25641
25740
|
|
|
25642
|
-
checkLVal(expression2, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) {
|
|
25741
|
+
checkLVal(expression2, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false, disallowCallExpression = false) {
|
|
25643
25742
|
const type = expression2.type;
|
|
25644
25743
|
|
|
25645
25744
|
if (this.isObjectMethod(expression2))
|
|
@@ -25682,7 +25781,9 @@ var LValParser = class extends NodeUtils {
|
|
|
25682
25781
|
this.raise(Errors.VoidPatternCatchClauseParam, expression2);
|
|
25683
25782
|
}
|
|
25684
25783
|
|
|
25685
|
-
const
|
|
25784
|
+
const unwrappedExpression = unwrapParenthesizedExpression(expression2);
|
|
25785
|
+
disallowCallExpression || (disallowCallExpression = unwrappedExpression.type === 'CallExpression' && (unwrappedExpression.callee.type === 'Import' || unwrappedExpression.callee.type === 'Super'));
|
|
25786
|
+
const validity = this.isValidLVal(type, disallowCallExpression, !(hasParenthesizedAncestor || expression2.extra?.parenthesized) && ancestor.type === 'AssignmentExpression', binding);
|
|
25686
25787
|
|
|
25687
25788
|
if (validity === true)
|
|
25688
25789
|
return;
|
|
@@ -25714,11 +25815,11 @@ var LValParser = class extends NodeUtils {
|
|
|
25714
25815
|
if (Array.isArray(val)) {
|
|
25715
25816
|
for (const child of val) {
|
|
25716
25817
|
if (child) {
|
|
25717
|
-
this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3);
|
|
25818
|
+
this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3, true);
|
|
25718
25819
|
}
|
|
25719
25820
|
}
|
|
25720
25821
|
} else if (val) {
|
|
25721
|
-
this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3);
|
|
25822
|
+
this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3, disallowCallExpression);
|
|
25722
25823
|
}
|
|
25723
25824
|
}
|
|
25724
25825
|
|
|
@@ -25779,6 +25880,8 @@ var LValParser = class extends NodeUtils {
|
|
|
25779
25880
|
}
|
|
25780
25881
|
};
|
|
25781
25882
|
|
|
25883
|
+
var keywordAndTSRelationalOperator = /in(?:stanceof)?|as|satisfies/y;
|
|
25884
|
+
|
|
25782
25885
|
function nonNull(x) {
|
|
25783
25886
|
if (x == null) {
|
|
25784
25887
|
throw new Error(`Unexpected ${x} value.`);
|
|
@@ -26932,7 +27035,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
26932
27035
|
}
|
|
26933
27036
|
}
|
|
26934
27037
|
|
|
26935
|
-
this.unexpected();
|
|
27038
|
+
throw this.unexpected();
|
|
26936
27039
|
}
|
|
26937
27040
|
|
|
26938
27041
|
tsParseArrayTypeOrHigher() {
|
|
@@ -27647,59 +27750,26 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27647
27750
|
|
|
27648
27751
|
default:
|
|
27649
27752
|
if (tokenIsIdentifier(startType)) {
|
|
27650
|
-
return this.tsParseDeclaration(node, this.state.
|
|
27753
|
+
return this.tsParseDeclaration(node, this.state.type, true, null);
|
|
27651
27754
|
}
|
|
27652
27755
|
}
|
|
27653
27756
|
});
|
|
27654
27757
|
}
|
|
27655
27758
|
|
|
27656
27759
|
tsTryParseExportDeclaration() {
|
|
27657
|
-
return this.tsParseDeclaration(this.startNode(), this.state.
|
|
27760
|
+
return this.tsParseDeclaration(this.startNode(), this.state.type, true, null);
|
|
27658
27761
|
}
|
|
27659
27762
|
|
|
27660
|
-
|
|
27661
|
-
switch(
|
|
27662
|
-
case
|
|
27663
|
-
const declaration = this.tsTryParseDeclare(node);
|
|
27664
|
-
|
|
27665
|
-
if (declaration) {
|
|
27666
|
-
declaration.declare = true;
|
|
27667
|
-
}
|
|
27668
|
-
|
|
27669
|
-
return declaration;
|
|
27670
|
-
}
|
|
27671
|
-
|
|
27672
|
-
case 'global':
|
|
27673
|
-
if (this.match(5)) {
|
|
27674
|
-
this.scope.enter(1024);
|
|
27675
|
-
this.prodParam.enter(0);
|
|
27676
|
-
const mod = node;
|
|
27677
|
-
|
|
27678
|
-
mod.kind = 'global';
|
|
27679
|
-
mod.id = expr;
|
|
27680
|
-
mod.body = this.tsParseModuleBlock();
|
|
27681
|
-
this.scope.exit();
|
|
27682
|
-
this.prodParam.exit();
|
|
27683
|
-
return this.finishNode(mod, 'TSModuleDeclaration');
|
|
27684
|
-
}
|
|
27685
|
-
|
|
27686
|
-
break;
|
|
27687
|
-
|
|
27688
|
-
default:
|
|
27689
|
-
return this.tsParseDeclaration(node, expr.name, false, decorators);
|
|
27690
|
-
}
|
|
27691
|
-
}
|
|
27692
|
-
|
|
27693
|
-
tsParseDeclaration(node, value, next, decorators) {
|
|
27694
|
-
switch(value) {
|
|
27695
|
-
case 'abstract':
|
|
27763
|
+
tsParseDeclaration(node, type, next, decorators) {
|
|
27764
|
+
switch(type) {
|
|
27765
|
+
case 124:
|
|
27696
27766
|
if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
|
|
27697
27767
|
return this.tsParseAbstractDeclaration(node, decorators);
|
|
27698
27768
|
}
|
|
27699
27769
|
|
|
27700
27770
|
break;
|
|
27701
27771
|
|
|
27702
|
-
case
|
|
27772
|
+
case 127:
|
|
27703
27773
|
if (this.tsCheckLineTerminator(next)) {
|
|
27704
27774
|
if (this.match(134)) {
|
|
27705
27775
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
@@ -27711,7 +27781,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27711
27781
|
|
|
27712
27782
|
break;
|
|
27713
27783
|
|
|
27714
|
-
case
|
|
27784
|
+
case 128:
|
|
27715
27785
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
27716
27786
|
node.kind = 'namespace';
|
|
27717
27787
|
return this.tsParseModuleOrNamespaceDeclaration(node);
|
|
@@ -27719,7 +27789,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27719
27789
|
|
|
27720
27790
|
break;
|
|
27721
27791
|
|
|
27722
|
-
case
|
|
27792
|
+
case 130:
|
|
27723
27793
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
27724
27794
|
return this.tsParseTypeAliasDeclaration(node);
|
|
27725
27795
|
}
|
|
@@ -27922,8 +27992,8 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27922
27992
|
return exprList;
|
|
27923
27993
|
}
|
|
27924
27994
|
|
|
27925
|
-
parseArrayLike(close,
|
|
27926
|
-
const node = super.parseArrayLike(close,
|
|
27995
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
27996
|
+
const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
|
|
27927
27997
|
|
|
27928
27998
|
if (node.type === 'ArrayExpression') {
|
|
27929
27999
|
this.tsCheckForInvalidTypeCasts(node.elements);
|
|
@@ -28242,23 +28312,97 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28242
28312
|
}
|
|
28243
28313
|
|
|
28244
28314
|
parseStatementContent(flags, decorators) {
|
|
28245
|
-
if (this.
|
|
28246
|
-
|
|
28247
|
-
|
|
28248
|
-
|
|
28249
|
-
|
|
28250
|
-
|
|
28251
|
-
|
|
28252
|
-
|
|
28253
|
-
|
|
28254
|
-
|
|
28255
|
-
|
|
28256
|
-
|
|
28257
|
-
|
|
28258
|
-
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
28315
|
+
if (!this.state.containsEsc) {
|
|
28316
|
+
switch(this.state.type) {
|
|
28317
|
+
case 75: {
|
|
28318
|
+
if (this.isLookaheadContextual('enum')) {
|
|
28319
|
+
const node = this.startNode();
|
|
28320
|
+
this.expect(75);
|
|
28321
|
+
return this.tsParseEnumDeclaration(node, {
|
|
28322
|
+
const: true,
|
|
28323
|
+
});
|
|
28324
|
+
}
|
|
28325
|
+
|
|
28326
|
+
break;
|
|
28327
|
+
}
|
|
28259
28328
|
|
|
28260
|
-
|
|
28261
|
-
|
|
28329
|
+
case 124:
|
|
28330
|
+
case 125: {
|
|
28331
|
+
if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
|
|
28332
|
+
const token = this.state.type;
|
|
28333
|
+
const node = this.startNode();
|
|
28334
|
+
this.next();
|
|
28335
|
+
const declaration = token === 125 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
|
|
28336
|
+
|
|
28337
|
+
if (declaration) {
|
|
28338
|
+
if (token === 125) {
|
|
28339
|
+
declaration.declare = true;
|
|
28340
|
+
}
|
|
28341
|
+
|
|
28342
|
+
return declaration;
|
|
28343
|
+
} else {
|
|
28344
|
+
node.expression = this.createIdentifier(this.startNodeAt(node.loc.start), token === 125 ? 'declare' : 'abstract');
|
|
28345
|
+
this.semicolon(false);
|
|
28346
|
+
return this.finishNode(node, 'ExpressionStatement');
|
|
28347
|
+
}
|
|
28348
|
+
}
|
|
28349
|
+
|
|
28350
|
+
break;
|
|
28351
|
+
}
|
|
28352
|
+
|
|
28353
|
+
case 126:
|
|
28354
|
+
return this.tsParseEnumDeclaration(this.startNode());
|
|
28355
|
+
|
|
28356
|
+
case 112: {
|
|
28357
|
+
const nextCh = this.lookaheadCharCode();
|
|
28358
|
+
|
|
28359
|
+
if (nextCh === 123) {
|
|
28360
|
+
const node = this.startNode();
|
|
28361
|
+
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
28362
|
+
}
|
|
28363
|
+
|
|
28364
|
+
break;
|
|
28365
|
+
}
|
|
28366
|
+
|
|
28367
|
+
case 129: {
|
|
28368
|
+
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
28369
|
+
|
|
28370
|
+
if (result)
|
|
28371
|
+
return result;
|
|
28372
|
+
|
|
28373
|
+
break;
|
|
28374
|
+
}
|
|
28375
|
+
|
|
28376
|
+
case 127: {
|
|
28377
|
+
if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) {
|
|
28378
|
+
const node = this.startNode();
|
|
28379
|
+
this.next();
|
|
28380
|
+
return this.tsParseDeclaration(node, 127, false, decorators);
|
|
28381
|
+
}
|
|
28382
|
+
|
|
28383
|
+
break;
|
|
28384
|
+
}
|
|
28385
|
+
|
|
28386
|
+
case 128: {
|
|
28387
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
28388
|
+
const node = this.startNode();
|
|
28389
|
+
this.next();
|
|
28390
|
+
return this.tsParseDeclaration(node, 128, false, decorators);
|
|
28391
|
+
}
|
|
28392
|
+
|
|
28393
|
+
break;
|
|
28394
|
+
}
|
|
28395
|
+
|
|
28396
|
+
case 130: {
|
|
28397
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
28398
|
+
const node = this.startNode();
|
|
28399
|
+
this.next();
|
|
28400
|
+
return this.tsParseTypeAliasDeclaration(node);
|
|
28401
|
+
}
|
|
28402
|
+
|
|
28403
|
+
break;
|
|
28404
|
+
}
|
|
28405
|
+
}
|
|
28262
28406
|
}
|
|
28263
28407
|
|
|
28264
28408
|
return super.parseStatementContent(flags, decorators);
|
|
@@ -28377,11 +28521,6 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28377
28521
|
}
|
|
28378
28522
|
}
|
|
28379
28523
|
|
|
28380
|
-
parseExpressionStatement(node, expr, decorators) {
|
|
28381
|
-
const decl = expr.type === 'Identifier' ? this.tsParseExpressionStatement(node, expr, decorators) : void 0;
|
|
28382
|
-
return decl || super.parseExpressionStatement(node, expr, decorators);
|
|
28383
|
-
}
|
|
28384
|
-
|
|
28385
28524
|
shouldParseExportDeclaration() {
|
|
28386
28525
|
if (this.tsIsDeclarationStart())
|
|
28387
28526
|
return true;
|
|
@@ -28839,7 +28978,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28839
28978
|
}
|
|
28840
28979
|
}
|
|
28841
28980
|
|
|
28842
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
28981
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
28843
28982
|
switch(type) {
|
|
28844
28983
|
case 'TSTypeCastExpression':
|
|
28845
28984
|
return true;
|
|
@@ -28859,7 +28998,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28859
28998
|
];
|
|
28860
28999
|
|
|
28861
29000
|
default:
|
|
28862
|
-
return super.isValidLVal(type, isUnparenthesizedInAssign, binding);
|
|
29001
|
+
return super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
28863
29002
|
}
|
|
28864
29003
|
}
|
|
28865
29004
|
|
|
@@ -29061,10 +29200,12 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
29061
29200
|
node.abstract = true;
|
|
29062
29201
|
this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
|
|
29063
29202
|
return this.tsParseInterfaceDeclaration(node);
|
|
29203
|
+
} else {
|
|
29204
|
+
return null;
|
|
29064
29205
|
}
|
|
29065
|
-
} else {
|
|
29066
|
-
this.unexpected(null, 80);
|
|
29067
29206
|
}
|
|
29207
|
+
|
|
29208
|
+
throw this.unexpected(null, 80);
|
|
29068
29209
|
}
|
|
29069
29210
|
|
|
29070
29211
|
parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
|
|
@@ -29330,6 +29471,40 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
29330
29471
|
return;
|
|
29331
29472
|
}
|
|
29332
29473
|
}
|
|
29474
|
+
|
|
29475
|
+
chStartsBindingIdentifierAndNotRelationalOperator(ch, pos) {
|
|
29476
|
+
if (isIdentifierStart2(ch)) {
|
|
29477
|
+
keywordAndTSRelationalOperator.lastIndex = pos;
|
|
29478
|
+
|
|
29479
|
+
if (keywordAndTSRelationalOperator.test(this.input)) {
|
|
29480
|
+
const endCh = this.codePointAtPos(keywordAndTSRelationalOperator.lastIndex);
|
|
29481
|
+
|
|
29482
|
+
if (!isIdentifierChar2(endCh) && endCh !== 92) {
|
|
29483
|
+
return false;
|
|
29484
|
+
}
|
|
29485
|
+
}
|
|
29486
|
+
|
|
29487
|
+
return true;
|
|
29488
|
+
} else if (ch === 92) {
|
|
29489
|
+
return true;
|
|
29490
|
+
} else {
|
|
29491
|
+
return false;
|
|
29492
|
+
}
|
|
29493
|
+
}
|
|
29494
|
+
|
|
29495
|
+
nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() {
|
|
29496
|
+
const next = this.nextTokenInLineStart();
|
|
29497
|
+
const nextCh = this.codePointAtPos(next);
|
|
29498
|
+
|
|
29499
|
+
return this.chStartsBindingIdentifierAndNotRelationalOperator(nextCh, next);
|
|
29500
|
+
}
|
|
29501
|
+
|
|
29502
|
+
nextTokenIsIdentifierOrStringLiteralOnSameLine() {
|
|
29503
|
+
const next = this.nextTokenInLineStart();
|
|
29504
|
+
const nextCh = this.codePointAtPos(next);
|
|
29505
|
+
|
|
29506
|
+
return this.chStartsBindingIdentifier(nextCh, next) || nextCh === 34 || nextCh === 39;
|
|
29507
|
+
}
|
|
29333
29508
|
};
|
|
29334
29509
|
|
|
29335
29510
|
function isPossiblyLiteralEnum(expression2) {
|
|
@@ -29485,8 +29660,8 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
29485
29660
|
return this.parsePlaceholder('Pattern') || super.parseBindingAtom();
|
|
29486
29661
|
}
|
|
29487
29662
|
|
|
29488
|
-
isValidLVal(type, isParenthesized, binding) {
|
|
29489
|
-
return type === 'Placeholder' || super.isValidLVal(type, isParenthesized, binding);
|
|
29663
|
+
isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
|
|
29664
|
+
return type === 'Placeholder' || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
|
|
29490
29665
|
}
|
|
29491
29666
|
|
|
29492
29667
|
toAssignable(node, isLHS) {
|
|
@@ -29512,7 +29687,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
29512
29687
|
}
|
|
29513
29688
|
|
|
29514
29689
|
verifyBreakContinue(node, isBreak) {
|
|
29515
|
-
if (node.label
|
|
29690
|
+
if (node.label?.type === 'Placeholder')
|
|
29516
29691
|
return;
|
|
29517
29692
|
|
|
29518
29693
|
super.verifyBreakContinue(node, isBreak);
|
|
@@ -30000,7 +30175,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
30000
30175
|
|
|
30001
30176
|
this.next();
|
|
30002
30177
|
node.right = this.parseMaybeAssign();
|
|
30003
|
-
this.checkLVal(left, this.finishNode(node, 'AssignmentExpression'));
|
|
30178
|
+
this.checkLVal(left, this.finishNode(node, 'AssignmentExpression'), void 0, void 0, void 0, void 0, operator === '||=' || operator === '&&=' || operator === '??=');
|
|
30004
30179
|
return node;
|
|
30005
30180
|
} else if (ownExpressionErrors) {
|
|
30006
30181
|
this.checkExpressionErrors(refExpressionErrors, true);
|
|
@@ -30589,7 +30764,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
30589
30764
|
}
|
|
30590
30765
|
|
|
30591
30766
|
case 0: {
|
|
30592
|
-
return this.parseArrayLike(3,
|
|
30767
|
+
return this.parseArrayLike(3, false, refExpressionErrors);
|
|
30593
30768
|
}
|
|
30594
30769
|
|
|
30595
30770
|
case 5: {
|
|
@@ -30654,20 +30829,17 @@ var ExpressionParser = class extends LValParser {
|
|
|
30654
30829
|
return this.parseTopicReference(pipeProposal);
|
|
30655
30830
|
}
|
|
30656
30831
|
|
|
30657
|
-
this.unexpected();
|
|
30658
|
-
break;
|
|
30832
|
+
throw this.unexpected();
|
|
30659
30833
|
}
|
|
30660
30834
|
|
|
30661
30835
|
case 47: {
|
|
30662
30836
|
const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
|
|
30663
30837
|
|
|
30664
30838
|
if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
|
|
30665
|
-
this.expectOnePlugin(['jsx', 'flow', 'typescript']);
|
|
30666
|
-
} else {
|
|
30667
|
-
this.unexpected();
|
|
30839
|
+
throw this.expectOnePlugin(['jsx', 'flow', 'typescript']);
|
|
30668
30840
|
}
|
|
30669
30841
|
|
|
30670
|
-
|
|
30842
|
+
throw this.unexpected();
|
|
30671
30843
|
}
|
|
30672
30844
|
|
|
30673
30845
|
default:
|
|
@@ -30707,7 +30879,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
30707
30879
|
|
|
30708
30880
|
return id;
|
|
30709
30881
|
} else {
|
|
30710
|
-
this.unexpected();
|
|
30882
|
+
throw this.unexpected();
|
|
30711
30883
|
}
|
|
30712
30884
|
}
|
|
30713
30885
|
}
|
|
@@ -30722,9 +30894,9 @@ var ExpressionParser = class extends LValParser {
|
|
|
30722
30894
|
this.state.end--;
|
|
30723
30895
|
this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
|
|
30724
30896
|
return this.parseTopicReference(pipeProposal);
|
|
30725
|
-
} else {
|
|
30726
|
-
this.unexpected();
|
|
30727
30897
|
}
|
|
30898
|
+
|
|
30899
|
+
throw this.unexpected();
|
|
30728
30900
|
}
|
|
30729
30901
|
|
|
30730
30902
|
parseTopicReference(pipeProposal) {
|
|
@@ -30813,10 +30985,14 @@ var ExpressionParser = class extends LValParser {
|
|
|
30813
30985
|
const node = this.startNode();
|
|
30814
30986
|
this.next();
|
|
30815
30987
|
|
|
30816
|
-
if (this.match(10) && !this.scope.allowDirectSuper
|
|
30817
|
-
|
|
30818
|
-
|
|
30819
|
-
|
|
30988
|
+
if (this.match(10) && !this.scope.allowDirectSuper) {
|
|
30989
|
+
{
|
|
30990
|
+
this.raise(Errors.SuperNotAllowed, node);
|
|
30991
|
+
}
|
|
30992
|
+
} else if (!this.scope.allowSuper) {
|
|
30993
|
+
{
|
|
30994
|
+
this.raise(Errors.UnexpectedSuper, node);
|
|
30995
|
+
}
|
|
30820
30996
|
}
|
|
30821
30997
|
|
|
30822
30998
|
if (!this.match(10) && !this.match(0) && !this.match(16)) {
|
|
@@ -31477,7 +31653,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
31477
31653
|
return finishedNode;
|
|
31478
31654
|
}
|
|
31479
31655
|
|
|
31480
|
-
parseArrayLike(close,
|
|
31656
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
31481
31657
|
if (isTuple) {
|
|
31482
31658
|
this.expectPlugin('recordAndTuple');
|
|
31483
31659
|
}
|
|
@@ -32134,10 +32310,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
32134
32310
|
return false;
|
|
32135
32311
|
}
|
|
32136
32312
|
|
|
32137
|
-
|
|
32138
|
-
const nextCh = this.codePointAtPos(next);
|
|
32139
|
-
|
|
32140
|
-
return this.chStartsBindingIdentifier(nextCh, next);
|
|
32313
|
+
return this.nextTokenIsIdentifierOnSameLine();
|
|
32141
32314
|
}
|
|
32142
32315
|
|
|
32143
32316
|
isForUsing() {
|
|
@@ -32163,6 +32336,13 @@ var StatementParser = class extends ExpressionParser {
|
|
|
32163
32336
|
return false;
|
|
32164
32337
|
}
|
|
32165
32338
|
|
|
32339
|
+
nextTokenIsIdentifierOnSameLine() {
|
|
32340
|
+
const next = this.nextTokenInLineStart();
|
|
32341
|
+
const nextCh = this.codePointAtPos(next);
|
|
32342
|
+
|
|
32343
|
+
return this.chStartsBindingIdentifier(nextCh, next);
|
|
32344
|
+
}
|
|
32345
|
+
|
|
32166
32346
|
isAwaitUsing() {
|
|
32167
32347
|
if (!this.isContextual(96)) {
|
|
32168
32348
|
return false;
|
|
@@ -33626,7 +33806,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
33626
33806
|
return this.finishNode(node2, 'ExportDefaultDeclaration');
|
|
33627
33807
|
}
|
|
33628
33808
|
|
|
33629
|
-
this.unexpected(null, 5);
|
|
33809
|
+
throw this.unexpected(null, 5);
|
|
33630
33810
|
}
|
|
33631
33811
|
|
|
33632
33812
|
eatExportStar(node) {
|
|
@@ -34336,68 +34516,68 @@ var StatementParser = class extends ExpressionParser {
|
|
|
34336
34516
|
|
|
34337
34517
|
var Parser = class extends StatementParser {
|
|
34338
34518
|
constructor(options, input, pluginsMap) {
|
|
34339
|
-
|
|
34340
|
-
super(
|
|
34341
|
-
this.options =
|
|
34519
|
+
const normalizedOptions = getOptions(options);
|
|
34520
|
+
super(normalizedOptions, input);
|
|
34521
|
+
this.options = normalizedOptions;
|
|
34342
34522
|
this.initializeScopes();
|
|
34343
34523
|
this.plugins = pluginsMap;
|
|
34344
|
-
this.filename =
|
|
34345
|
-
this.startIndex =
|
|
34524
|
+
this.filename = normalizedOptions.sourceFilename;
|
|
34525
|
+
this.startIndex = normalizedOptions.startIndex;
|
|
34346
34526
|
let optionFlags = 0;
|
|
34347
34527
|
|
|
34348
|
-
if (
|
|
34528
|
+
if (normalizedOptions.allowAwaitOutsideFunction) {
|
|
34349
34529
|
optionFlags |= 1;
|
|
34350
34530
|
}
|
|
34351
34531
|
|
|
34352
|
-
if (
|
|
34532
|
+
if (normalizedOptions.allowReturnOutsideFunction) {
|
|
34353
34533
|
optionFlags |= 2;
|
|
34354
34534
|
}
|
|
34355
34535
|
|
|
34356
|
-
if (
|
|
34536
|
+
if (normalizedOptions.allowImportExportEverywhere) {
|
|
34357
34537
|
optionFlags |= 8;
|
|
34358
34538
|
}
|
|
34359
34539
|
|
|
34360
|
-
if (
|
|
34540
|
+
if (normalizedOptions.allowSuperOutsideMethod) {
|
|
34361
34541
|
optionFlags |= 16;
|
|
34362
34542
|
}
|
|
34363
34543
|
|
|
34364
|
-
if (
|
|
34544
|
+
if (normalizedOptions.allowUndeclaredExports) {
|
|
34365
34545
|
optionFlags |= 64;
|
|
34366
34546
|
}
|
|
34367
34547
|
|
|
34368
|
-
if (
|
|
34548
|
+
if (normalizedOptions.allowNewTargetOutsideFunction) {
|
|
34369
34549
|
optionFlags |= 4;
|
|
34370
34550
|
}
|
|
34371
34551
|
|
|
34372
|
-
if (
|
|
34552
|
+
if (normalizedOptions.allowYieldOutsideFunction) {
|
|
34373
34553
|
optionFlags |= 32;
|
|
34374
34554
|
}
|
|
34375
34555
|
|
|
34376
|
-
if (
|
|
34556
|
+
if (normalizedOptions.ranges) {
|
|
34377
34557
|
optionFlags |= 128;
|
|
34378
34558
|
}
|
|
34379
34559
|
|
|
34380
|
-
if (
|
|
34560
|
+
if (normalizedOptions.tokens) {
|
|
34381
34561
|
optionFlags |= 256;
|
|
34382
34562
|
}
|
|
34383
34563
|
|
|
34384
|
-
if (
|
|
34564
|
+
if (normalizedOptions.createImportExpressions) {
|
|
34385
34565
|
optionFlags |= 512;
|
|
34386
34566
|
}
|
|
34387
34567
|
|
|
34388
|
-
if (
|
|
34568
|
+
if (normalizedOptions.createParenthesizedExpressions) {
|
|
34389
34569
|
optionFlags |= 1024;
|
|
34390
34570
|
}
|
|
34391
34571
|
|
|
34392
|
-
if (
|
|
34572
|
+
if (normalizedOptions.errorRecovery) {
|
|
34393
34573
|
optionFlags |= 2048;
|
|
34394
34574
|
}
|
|
34395
34575
|
|
|
34396
|
-
if (
|
|
34576
|
+
if (normalizedOptions.attachComment) {
|
|
34397
34577
|
optionFlags |= 4096;
|
|
34398
34578
|
}
|
|
34399
34579
|
|
|
34400
|
-
if (
|
|
34580
|
+
if (normalizedOptions.annexB) {
|
|
34401
34581
|
optionFlags |= 8192;
|
|
34402
34582
|
}
|
|
34403
34583
|
|
|
@@ -34415,10 +34595,11 @@ var Parser = class extends StatementParser {
|
|
|
34415
34595
|
|
|
34416
34596
|
this.nextToken();
|
|
34417
34597
|
file2.errors = null;
|
|
34418
|
-
this.parseTopLevel(file2, program3);
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34598
|
+
const result = this.parseTopLevel(file2, program3);
|
|
34599
|
+
|
|
34600
|
+
result.errors = this.state.errors;
|
|
34601
|
+
result.comments.length = this.state.commentsLen;
|
|
34602
|
+
return result;
|
|
34422
34603
|
}
|
|
34423
34604
|
};
|
|
34424
34605
|
|
|
@@ -34532,7 +34713,7 @@ function getParserClass(pluginsMap) {
|
|
|
34532
34713
|
return cls;
|
|
34533
34714
|
}
|
|
34534
34715
|
|
|
34535
|
-
//
|
|
34716
|
+
// ../babel-babel/packages/babel-code-frame/lib/index.js
|
|
34536
34717
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
34537
34718
|
var import_js_tokens = __toESM(require_js_tokens(), 1);
|
|
34538
34719
|
|
|
@@ -34845,7 +35026,7 @@ ${frame}`;
|
|
|
34845
35026
|
}
|
|
34846
35027
|
}
|
|
34847
35028
|
|
|
34848
|
-
//
|
|
35029
|
+
// ../babel-babel/packages/babel-template/lib/index.js
|
|
34849
35030
|
var {assertExpressionStatement: assertExpressionStatement2} = lib_exports;
|
|
34850
35031
|
|
|
34851
35032
|
function makeStatementFormatter(fn) {
|
|
@@ -35512,7 +35693,7 @@ var index = Object.assign(smart.bind(void 0), {
|
|
|
35512
35693
|
ast: smart.ast,
|
|
35513
35694
|
});
|
|
35514
35695
|
|
|
35515
|
-
// node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
35696
|
+
// ../babel-babel/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
35516
35697
|
var comma = ','.charCodeAt(0);
|
|
35517
35698
|
var semicolon = ';'.charCodeAt(0);
|
|
35518
35699
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
@@ -35761,7 +35942,7 @@ function encode(decoded) {
|
|
|
35761
35942
|
return writer.flush();
|
|
35762
35943
|
}
|
|
35763
35944
|
|
|
35764
|
-
// node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
|
|
35945
|
+
// ../babel-babel/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
|
|
35765
35946
|
var schemeRegex = /^[\w+.-]+:\/\//;
|
|
35766
35947
|
var urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
|
|
35767
35948
|
var fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
@@ -35981,7 +36162,7 @@ case 2:
|
|
|
35981
36162
|
}
|
|
35982
36163
|
}
|
|
35983
36164
|
|
|
35984
|
-
// node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
36165
|
+
// ../babel-babel/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
35985
36166
|
function stripFilename(path) {
|
|
35986
36167
|
if (!path)
|
|
35987
36168
|
return '';
|
|
@@ -36253,7 +36434,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
36253
36434
|
return index2;
|
|
36254
36435
|
}
|
|
36255
36436
|
|
|
36256
|
-
// node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
36437
|
+
// ../babel-babel/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
36257
36438
|
var SetArray = class {
|
|
36258
36439
|
constructor() {
|
|
36259
36440
|
this._indexes = {
|
|
@@ -36529,7 +36710,7 @@ function addMappingInternal(skipable, map, mapping) {
|
|
|
36529
36710
|
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
|
|
36530
36711
|
}
|
|
36531
36712
|
|
|
36532
|
-
//
|
|
36713
|
+
// ../babel-babel/packages/babel-generator/lib/index.js
|
|
36533
36714
|
var import_jsesc = __toESM(require_jsesc(), 1);
|
|
36534
36715
|
|
|
36535
36716
|
var SourceMap = class {
|
|
@@ -36540,7 +36721,7 @@ var SourceMap = class {
|
|
|
36540
36721
|
__publicField(this, '_lastGenLine', 0);
|
|
36541
36722
|
__publicField(this, '_lastSourceLine', 0);
|
|
36542
36723
|
__publicField(this, '_lastSourceColumn', 0);
|
|
36543
|
-
__publicField(this, '_inputMap');
|
|
36724
|
+
__publicField(this, '_inputMap', null);
|
|
36544
36725
|
const map = this._map = new GenMapping({
|
|
36545
36726
|
sourceRoot: opts.sourceRoot,
|
|
36546
36727
|
});
|
|
@@ -36600,6 +36781,7 @@ var SourceMap = class {
|
|
|
36600
36781
|
}
|
|
36601
36782
|
} else {
|
|
36602
36783
|
originalMapping = {
|
|
36784
|
+
name: null,
|
|
36603
36785
|
source: filename?.replace(/\\/g, '/') || this._sourceFileName,
|
|
36604
36786
|
line,
|
|
36605
36787
|
column,
|
|
@@ -36851,7 +37033,7 @@ var Buffer2 = class {
|
|
|
36851
37033
|
last2 = i + 1;
|
|
36852
37034
|
|
|
36853
37035
|
if (last2 < len && line !== void 0) {
|
|
36854
|
-
this._mark(++line, 0,
|
|
37036
|
+
this._mark(++line, 0, void 0, void 0, filename);
|
|
36855
37037
|
}
|
|
36856
37038
|
|
|
36857
37039
|
i = str.indexOf('\n', last2);
|
|
@@ -37094,6 +37276,8 @@ var nodes = {
|
|
|
37094
37276
|
if (state.hasCall && state.hasHelper || state.hasFunction) {
|
|
37095
37277
|
return state.hasFunction ? 1 | 2 : 2;
|
|
37096
37278
|
}
|
|
37279
|
+
|
|
37280
|
+
return 0;
|
|
37097
37281
|
},
|
|
37098
37282
|
SwitchCase(node, parent) {
|
|
37099
37283
|
return (!!node.consequent.length || parent.cases[0] === node ? 1 : 0) | (!node.consequent.length && parent.cases[parent.cases.length - 1] === node ? 2 : 0);
|
|
@@ -37102,21 +37286,29 @@ var nodes = {
|
|
|
37102
37286
|
if (isFunction$1(node.left) || isFunction$1(node.right)) {
|
|
37103
37287
|
return 2;
|
|
37104
37288
|
}
|
|
37289
|
+
|
|
37290
|
+
return 0;
|
|
37105
37291
|
},
|
|
37106
37292
|
Literal(node) {
|
|
37107
37293
|
if (isStringLiteral3(node) && node.value === 'use strict') {
|
|
37108
37294
|
return 2;
|
|
37109
37295
|
}
|
|
37296
|
+
|
|
37297
|
+
return 0;
|
|
37110
37298
|
},
|
|
37111
37299
|
CallExpression(node) {
|
|
37112
37300
|
if (isFunction$1(node.callee) || isHelper(node)) {
|
|
37113
37301
|
return 1 | 2;
|
|
37114
37302
|
}
|
|
37303
|
+
|
|
37304
|
+
return 0;
|
|
37115
37305
|
},
|
|
37116
37306
|
OptionalCallExpression(node) {
|
|
37117
37307
|
if (isFunction$1(node.callee)) {
|
|
37118
37308
|
return 1 | 2;
|
|
37119
37309
|
}
|
|
37310
|
+
|
|
37311
|
+
return 0;
|
|
37120
37312
|
},
|
|
37121
37313
|
VariableDeclaration(node) {
|
|
37122
37314
|
for (let i = 0; i < node.declarations.length; i++) {
|
|
@@ -37132,11 +37324,15 @@ var nodes = {
|
|
|
37132
37324
|
return 1 | 2;
|
|
37133
37325
|
}
|
|
37134
37326
|
}
|
|
37327
|
+
|
|
37328
|
+
return 0;
|
|
37135
37329
|
},
|
|
37136
37330
|
IfStatement(node) {
|
|
37137
37331
|
if (isBlockStatement2(node.consequent)) {
|
|
37138
37332
|
return 1 | 2;
|
|
37139
37333
|
}
|
|
37334
|
+
|
|
37335
|
+
return 0;
|
|
37140
37336
|
},
|
|
37141
37337
|
};
|
|
37142
37338
|
|
|
@@ -37146,21 +37342,29 @@ nodes.ObjectMethod = function(node, parent) {
|
|
|
37146
37342
|
if (parent.properties[0] === node) {
|
|
37147
37343
|
return 1;
|
|
37148
37344
|
}
|
|
37345
|
+
|
|
37346
|
+
return 0;
|
|
37149
37347
|
};
|
|
37150
37348
|
nodes.ObjectTypeCallProperty = function(node, parent) {
|
|
37151
37349
|
if (parent.callProperties[0] === node && !parent.properties?.length) {
|
|
37152
37350
|
return 1;
|
|
37153
37351
|
}
|
|
37352
|
+
|
|
37353
|
+
return 0;
|
|
37154
37354
|
};
|
|
37155
37355
|
nodes.ObjectTypeIndexer = function(node, parent) {
|
|
37156
37356
|
if (parent.indexers[0] === node && !parent.properties?.length && !parent.callProperties?.length) {
|
|
37157
37357
|
return 1;
|
|
37158
37358
|
}
|
|
37359
|
+
|
|
37360
|
+
return 0;
|
|
37159
37361
|
};
|
|
37160
37362
|
nodes.ObjectTypeInternalSlot = function(node, parent) {
|
|
37161
37363
|
if (parent.internalSlots[0] === node && !parent.properties?.length && !parent.callProperties?.length && !parent.indexers?.length) {
|
|
37162
37364
|
return 1;
|
|
37163
37365
|
}
|
|
37366
|
+
|
|
37367
|
+
return 0;
|
|
37164
37368
|
};
|
|
37165
37369
|
[
|
|
37166
37370
|
['Function', true],
|
|
@@ -37304,8 +37508,6 @@ function Binary(node, parent) {
|
|
|
37304
37508
|
return true;
|
|
37305
37509
|
}
|
|
37306
37510
|
}
|
|
37307
|
-
|
|
37308
|
-
return void 0;
|
|
37309
37511
|
}
|
|
37310
37512
|
|
|
37311
37513
|
function UnionTypeAnnotation$1(node, parent) {
|
|
@@ -37692,7 +37894,7 @@ function needsParens$1(node, parent, tokenContext, getRawIdentifier) {
|
|
|
37692
37894
|
return !isDecoratorMemberExpression(node) && !(isCallExpression$1(node) && isDecoratorMemberExpression(node.callee)) && !isParenthesizedExpression2(node);
|
|
37693
37895
|
}
|
|
37694
37896
|
|
|
37695
|
-
return expandedParens.get(node.type)?.(node, parent, tokenContext, getRawIdentifier);
|
|
37897
|
+
return expandedParens.get(node.type)?.(node, parent, tokenContext, getRawIdentifier) || false;
|
|
37696
37898
|
}
|
|
37697
37899
|
|
|
37698
37900
|
function isDecoratorMemberExpression(node) {
|
|
@@ -37758,7 +37960,7 @@ var TokenMap = class {
|
|
|
37758
37960
|
if (indexes.length > 0)
|
|
37759
37961
|
this._nodesToTokenIndexes.set(node, indexes);
|
|
37760
37962
|
});
|
|
37761
|
-
this._tokensCache
|
|
37963
|
+
this._tokensCache.clear();
|
|
37762
37964
|
}
|
|
37763
37965
|
|
|
37764
37966
|
has(node) {
|
|
@@ -37811,7 +38013,7 @@ var TokenMap = class {
|
|
|
37811
38013
|
if (count > 1) {
|
|
37812
38014
|
const cache2 = this._nodesOccurrencesCountCache.get(node);
|
|
37813
38015
|
|
|
37814
|
-
if (cache2
|
|
38016
|
+
if (cache2?.test === test && cache2.count < count) {
|
|
37815
38017
|
i = cache2.i + 1;
|
|
37816
38018
|
occurrenceCount -= cache2.count + 1;
|
|
37817
38019
|
}
|
|
@@ -37888,7 +38090,7 @@ var TokenMap = class {
|
|
|
37888
38090
|
let low = first;
|
|
37889
38091
|
const children = childrenIterator(node);
|
|
37890
38092
|
|
|
37891
|
-
if ((node.type === 'ExportNamedDeclaration' || node.type === 'ExportDefaultDeclaration') && node.declaration
|
|
38093
|
+
if ((node.type === 'ExportNamedDeclaration' || node.type === 'ExportDefaultDeclaration') && node.declaration?.type === 'ClassDeclaration') {
|
|
37892
38094
|
children.next();
|
|
37893
38095
|
}
|
|
37894
38096
|
|
|
@@ -38540,10 +38742,7 @@ function SwitchStatement2(node) {
|
|
|
38540
38742
|
this.tokenChar(41);
|
|
38541
38743
|
this.space();
|
|
38542
38744
|
this.tokenChar(123);
|
|
38543
|
-
this.printSequence(node.cases, true
|
|
38544
|
-
if (!leading && node.cases[node.cases.length - 1] === cas)
|
|
38545
|
-
return -1;
|
|
38546
|
-
});
|
|
38745
|
+
this.printSequence(node.cases, true);
|
|
38547
38746
|
this.rightBrace(node);
|
|
38548
38747
|
}
|
|
38549
38748
|
|
|
@@ -38909,7 +39108,7 @@ function _parameters(parameters, endToken) {
|
|
|
38909
39108
|
this._param(parameters[i]);
|
|
38910
39109
|
|
|
38911
39110
|
if (trailingComma || i < paramLength - 1) {
|
|
38912
|
-
this.token(',',
|
|
39111
|
+
this.token(',', void 0, i);
|
|
38913
39112
|
this.space();
|
|
38914
39113
|
}
|
|
38915
39114
|
}
|
|
@@ -38961,7 +39160,7 @@ function _methodHead(node) {
|
|
|
38961
39160
|
this.tokenChar(63);
|
|
38962
39161
|
}
|
|
38963
39162
|
|
|
38964
|
-
this._params(node, node.computed && node.key.type !== 'StringLiteral' ? void 0 : node.key
|
|
39163
|
+
this._params(node, node.computed && node.key.type !== 'StringLiteral' ? void 0 : node.key);
|
|
38965
39164
|
}
|
|
38966
39165
|
|
|
38967
39166
|
function _predicate(node, noLineTerminatorAfter) {
|
|
@@ -39184,11 +39383,11 @@ function _printAttributes(node, hasPreviousBrace) {
|
|
|
39184
39383
|
this.word(useAssertKeyword ? 'assert' : 'with');
|
|
39185
39384
|
this.space();
|
|
39186
39385
|
const occurrenceCount = hasPreviousBrace ? 1 : 0;
|
|
39187
|
-
this.token('{',
|
|
39386
|
+
this.token('{', void 0, occurrenceCount);
|
|
39188
39387
|
this.space();
|
|
39189
39388
|
this.printList(attributes || assertions, this.shouldPrintTrailingComma('}'));
|
|
39190
39389
|
this.space();
|
|
39191
|
-
this.token('}',
|
|
39390
|
+
this.token('}', void 0, occurrenceCount);
|
|
39192
39391
|
}
|
|
39193
39392
|
|
|
39194
39393
|
function ExportAllDeclaration2(node) {
|
|
@@ -39529,54 +39728,8 @@ function ArrayExpression2(node) {
|
|
|
39529
39728
|
this.tokenChar(93);
|
|
39530
39729
|
}
|
|
39531
39730
|
|
|
39532
|
-
|
|
39533
|
-
|
|
39534
|
-
let startToken;
|
|
39535
|
-
let endToken;
|
|
39536
|
-
|
|
39537
|
-
{
|
|
39538
|
-
startToken = '#{';
|
|
39539
|
-
endToken = '}';
|
|
39540
|
-
}
|
|
39541
|
-
this.token(startToken);
|
|
39542
|
-
|
|
39543
|
-
if (props.length) {
|
|
39544
|
-
this.space();
|
|
39545
|
-
this.printList(props, this.shouldPrintTrailingComma(endToken), true, true);
|
|
39546
|
-
this.space();
|
|
39547
|
-
}
|
|
39548
|
-
|
|
39549
|
-
this.token(endToken);
|
|
39550
|
-
}
|
|
39551
|
-
|
|
39552
|
-
function TupleExpression2(node) {
|
|
39553
|
-
const elems = node.elements;
|
|
39554
|
-
const len = elems.length;
|
|
39555
|
-
let startToken;
|
|
39556
|
-
let endToken;
|
|
39557
|
-
|
|
39558
|
-
{
|
|
39559
|
-
startToken = '#[';
|
|
39560
|
-
endToken = ']';
|
|
39561
|
-
}
|
|
39562
|
-
this.token(startToken);
|
|
39563
|
-
for (let i = 0; i < elems.length; i++) {
|
|
39564
|
-
const elem = elems[i];
|
|
39565
|
-
|
|
39566
|
-
if (elem) {
|
|
39567
|
-
if (i > 0)
|
|
39568
|
-
this.space();
|
|
39569
|
-
|
|
39570
|
-
this.print(elem);
|
|
39571
|
-
|
|
39572
|
-
if (i < len - 1 || this.shouldPrintTrailingComma(endToken)) {
|
|
39573
|
-
this.token(',', false, i);
|
|
39574
|
-
}
|
|
39575
|
-
}
|
|
39576
|
-
}
|
|
39577
|
-
|
|
39578
|
-
this.token(endToken);
|
|
39579
|
-
}
|
|
39731
|
+
var RecordExpression;
|
|
39732
|
+
var TupleExpression;
|
|
39580
39733
|
|
|
39581
39734
|
function RegExpLiteral2(node) {
|
|
39582
39735
|
this.word(`/${node.pattern}/${node.flags}`);
|
|
@@ -40165,10 +40318,7 @@ function ObjectTypeAnnotation2(node) {
|
|
|
40165
40318
|
if (props.length) {
|
|
40166
40319
|
this.newline();
|
|
40167
40320
|
this.space();
|
|
40168
|
-
this.printJoin(props, true, true, void 0, void 0,
|
|
40169
|
-
if (leading && !props[0])
|
|
40170
|
-
return 1;
|
|
40171
|
-
}, () => {
|
|
40321
|
+
this.printJoin(props, true, true, void 0, void 0, () => {
|
|
40172
40322
|
if (props.length !== 1 || node.inexact) {
|
|
40173
40323
|
this.tokenChar(44);
|
|
40174
40324
|
this.space();
|
|
@@ -40903,7 +41053,7 @@ function tsPrintUnionOrIntersectionType(printer, node, sep) {
|
|
|
40903
41053
|
|
|
40904
41054
|
printer.printJoin(node.types, void 0, void 0, function(i) {
|
|
40905
41055
|
this.space();
|
|
40906
|
-
this.token(sep,
|
|
41056
|
+
this.token(sep, void 0, i + hasLeadingToken);
|
|
40907
41057
|
this.space();
|
|
40908
41058
|
});
|
|
40909
41059
|
}
|
|
@@ -41311,6 +41461,8 @@ function printModifiersList(printer, node, modifiers) {
|
|
|
41311
41461
|
|
|
41312
41462
|
return modifiersSet.size === 0;
|
|
41313
41463
|
}
|
|
41464
|
+
|
|
41465
|
+
return false;
|
|
41314
41466
|
});
|
|
41315
41467
|
|
|
41316
41468
|
for (const modifier of modifiersSet) {
|
|
@@ -41462,7 +41614,7 @@ var generatorFunctions = /* @__PURE__ */Object.freeze({
|
|
|
41462
41614
|
PrivateName: PrivateName2,
|
|
41463
41615
|
Program: Program2,
|
|
41464
41616
|
QualifiedTypeIdentifier: QualifiedTypeIdentifier2,
|
|
41465
|
-
RecordExpression
|
|
41617
|
+
RecordExpression,
|
|
41466
41618
|
RegExpLiteral: RegExpLiteral2,
|
|
41467
41619
|
RestElement: RestElement2,
|
|
41468
41620
|
ReturnStatement: ReturnStatement2,
|
|
@@ -41552,7 +41704,7 @@ var generatorFunctions = /* @__PURE__ */Object.freeze({
|
|
|
41552
41704
|
ThrowStatement: ThrowStatement2,
|
|
41553
41705
|
TopicReference: TopicReference2,
|
|
41554
41706
|
TryStatement: TryStatement2,
|
|
41555
|
-
TupleExpression
|
|
41707
|
+
TupleExpression,
|
|
41556
41708
|
TupleTypeAnnotation: TupleTypeAnnotation2,
|
|
41557
41709
|
TypeAlias: TypeAlias2,
|
|
41558
41710
|
TypeAnnotation: TypeAnnotation2,
|
|
@@ -41614,7 +41766,7 @@ function commentIsNewline(c) {
|
|
|
41614
41766
|
var {needsParens} = n;
|
|
41615
41767
|
|
|
41616
41768
|
var Printer = class {
|
|
41617
|
-
constructor(format, map, tokens, originalCode) {
|
|
41769
|
+
constructor(format, map, tokens = null, originalCode = null) {
|
|
41618
41770
|
__publicField(this, 'tokenContext', TokenContext.normal);
|
|
41619
41771
|
__publicField(this, '_tokens', null);
|
|
41620
41772
|
__publicField(this, '_originalCode', null);
|
|
@@ -41640,7 +41792,7 @@ var Printer = class {
|
|
|
41640
41792
|
this._tokens = tokens;
|
|
41641
41793
|
this._originalCode = originalCode;
|
|
41642
41794
|
this._indentRepeat = format.indent.style.length;
|
|
41643
|
-
this._inputMap = map?._inputMap;
|
|
41795
|
+
this._inputMap = map?._inputMap || null;
|
|
41644
41796
|
this._buf = new Buffer2(map, format.indent.style[0]);
|
|
41645
41797
|
}
|
|
41646
41798
|
|
|
@@ -42028,7 +42180,7 @@ var Printer = class {
|
|
|
42028
42180
|
this.print(node);
|
|
42029
42181
|
}
|
|
42030
42182
|
|
|
42031
|
-
print(node, noLineTerminatorAfter, trailingCommentsLineOffset) {
|
|
42183
|
+
print(node, noLineTerminatorAfter = false, trailingCommentsLineOffset) {
|
|
42032
42184
|
if (!node)
|
|
42033
42185
|
return;
|
|
42034
42186
|
|
|
@@ -42099,7 +42251,7 @@ var Printer = class {
|
|
|
42099
42251
|
let oldTokenContext;
|
|
42100
42252
|
|
|
42101
42253
|
if (!shouldPrintParens) {
|
|
42102
|
-
noLineTerminatorAfter || (noLineTerminatorAfter = parent && this._noLineTerminatorAfterNode === parent && isLastChild(parent, node));
|
|
42254
|
+
noLineTerminatorAfter || (noLineTerminatorAfter = !!parent && this._noLineTerminatorAfterNode === parent && isLastChild(parent, node));
|
|
42103
42255
|
|
|
42104
42256
|
if (noLineTerminatorAfter) {
|
|
42105
42257
|
if (node.trailingComments?.some(commentIsNewline)) {
|
|
@@ -42211,7 +42363,7 @@ var Printer = class {
|
|
|
42211
42363
|
}
|
|
42212
42364
|
}
|
|
42213
42365
|
|
|
42214
|
-
printJoin(nodes2, statement2, indent, separator, printTrailingSeparator,
|
|
42366
|
+
printJoin(nodes2, statement2, indent, separator, printTrailingSeparator, iterator, trailingCommentsLineOffset) {
|
|
42215
42367
|
if (!nodes2?.length)
|
|
42216
42368
|
return;
|
|
42217
42369
|
|
|
@@ -42227,7 +42379,6 @@ var Printer = class {
|
|
|
42227
42379
|
this.indent();
|
|
42228
42380
|
|
|
42229
42381
|
const newlineOpts = {
|
|
42230
|
-
addNewlines,
|
|
42231
42382
|
nextNodeStartLine: 0,
|
|
42232
42383
|
};
|
|
42233
42384
|
|
|
@@ -42360,12 +42511,12 @@ var Printer = class {
|
|
|
42360
42511
|
this._indentInnerComments = false;
|
|
42361
42512
|
}
|
|
42362
42513
|
|
|
42363
|
-
printSequence(nodes2, indent, trailingCommentsLineOffset
|
|
42364
|
-
this.printJoin(nodes2, true, indent ?? false, void 0, void 0,
|
|
42514
|
+
printSequence(nodes2, indent, trailingCommentsLineOffset) {
|
|
42515
|
+
this.printJoin(nodes2, true, indent ?? false, void 0, void 0, void 0, trailingCommentsLineOffset);
|
|
42365
42516
|
}
|
|
42366
42517
|
|
|
42367
42518
|
printList(items, printTrailingSeparator, statement2, indent, separator, iterator) {
|
|
42368
|
-
this.printJoin(items, statement2, indent, separator ?? commaSeparator, printTrailingSeparator,
|
|
42519
|
+
this.printJoin(items, statement2, indent, separator ?? commaSeparator, printTrailingSeparator, iterator);
|
|
42369
42520
|
}
|
|
42370
42521
|
|
|
42371
42522
|
shouldPrintTrailingComma(listEnd) {
|
|
@@ -42723,10 +42874,10 @@ function generate(ast, opts = {}, code2) {
|
|
|
42723
42874
|
return printer.generate(ast);
|
|
42724
42875
|
}
|
|
42725
42876
|
|
|
42726
|
-
//
|
|
42877
|
+
// ../babel-babel/packages/babel-traverse/lib/index.js
|
|
42727
42878
|
var import_debug = __toESM(require_src(), 1);
|
|
42728
42879
|
|
|
42729
|
-
//
|
|
42880
|
+
// ../babel-babel/packages/babel-helper-globals/data/builtin-lower.json
|
|
42730
42881
|
var builtin_lower_default = [
|
|
42731
42882
|
'decodeURI',
|
|
42732
42883
|
'decodeURIComponent',
|
|
@@ -42743,7 +42894,7 @@ var builtin_lower_default = [
|
|
|
42743
42894
|
'unescape',
|
|
42744
42895
|
];
|
|
42745
42896
|
|
|
42746
|
-
//
|
|
42897
|
+
// ../babel-babel/packages/babel-helper-globals/data/builtin-upper.json
|
|
42747
42898
|
var builtin_upper_default = [
|
|
42748
42899
|
'AggregateError',
|
|
42749
42900
|
'Array',
|
|
@@ -42796,7 +42947,7 @@ var builtin_upper_default = [
|
|
|
42796
42947
|
'WeakSet',
|
|
42797
42948
|
];
|
|
42798
42949
|
|
|
42799
|
-
//
|
|
42950
|
+
// ../babel-babel/packages/babel-traverse/lib/index.js
|
|
42800
42951
|
var ReferencedIdentifier = [
|
|
42801
42952
|
'Identifier',
|
|
42802
42953
|
'JSXIdentifier',
|
|
@@ -42812,7 +42963,11 @@ var Scope$1 = [
|
|
|
42812
42963
|
'Pattern',
|
|
42813
42964
|
];
|
|
42814
42965
|
var Referenced = null;
|
|
42815
|
-
var BlockScoped =
|
|
42966
|
+
var BlockScoped = [
|
|
42967
|
+
'FunctionDeclaration',
|
|
42968
|
+
'ClassDeclaration',
|
|
42969
|
+
'VariableDeclaration',
|
|
42970
|
+
];
|
|
42816
42971
|
var Var = [
|
|
42817
42972
|
'VariableDeclaration',
|
|
42818
42973
|
];
|
|
@@ -42892,16 +43047,16 @@ var {isCompatTag: isCompatTag2} = react2;
|
|
|
42892
43047
|
function isReferencedIdentifier(opts) {
|
|
42893
43048
|
const {node, parent} = this;
|
|
42894
43049
|
|
|
42895
|
-
if (
|
|
42896
|
-
|
|
42897
|
-
|
|
42898
|
-
|
|
42899
|
-
} else {
|
|
43050
|
+
if (isIdentifier$6(node, opts)) {
|
|
43051
|
+
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
43052
|
+
} else if (isJSXIdentifier3(node, opts)) {
|
|
43053
|
+
if (!isJSXMemberExpression2(parent) && isCompatTag2(node.name))
|
|
42900
43054
|
return false;
|
|
42901
|
-
|
|
43055
|
+
|
|
43056
|
+
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
43057
|
+
} else {
|
|
43058
|
+
return false;
|
|
42902
43059
|
}
|
|
42903
|
-
|
|
42904
|
-
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
42905
43060
|
}
|
|
42906
43061
|
|
|
42907
43062
|
function isReferencedMemberExpression() {
|
|
@@ -42961,7 +43116,7 @@ function isVar2() {
|
|
|
42961
43116
|
}
|
|
42962
43117
|
|
|
42963
43118
|
function isUser() {
|
|
42964
|
-
return
|
|
43119
|
+
return !!this.node?.loc;
|
|
42965
43120
|
}
|
|
42966
43121
|
|
|
42967
43122
|
function isGenerated() {
|
|
@@ -43084,11 +43239,8 @@ function explode$1(visitor) {
|
|
|
43084
43239
|
|
|
43085
43240
|
if (types2 !== null) {
|
|
43086
43241
|
for (const type of types2) {
|
|
43087
|
-
|
|
43088
|
-
|
|
43089
|
-
} else {
|
|
43090
|
-
visitor[type] = fns;
|
|
43091
|
-
}
|
|
43242
|
+
visitor[type] ?? (visitor[type] = {});
|
|
43243
|
+
mergePair(visitor[type], fns);
|
|
43092
43244
|
}
|
|
43093
43245
|
} else {
|
|
43094
43246
|
mergePair(visitor, fns);
|
|
@@ -43154,7 +43306,7 @@ function verify$1(visitor) {
|
|
|
43154
43306
|
continue;
|
|
43155
43307
|
|
|
43156
43308
|
if (!TYPES2.includes(nodeType)) {
|
|
43157
|
-
throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${'8.0.0-beta.
|
|
43309
|
+
throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${'8.0.0-beta.3'}`);
|
|
43158
43310
|
}
|
|
43159
43311
|
|
|
43160
43312
|
const visitors2 = visitor[nodeType];
|
|
@@ -43471,6 +43623,73 @@ var Renamer = class {
|
|
|
43471
43623
|
}
|
|
43472
43624
|
};
|
|
43473
43625
|
|
|
43626
|
+
var {VISITOR_KEYS: VISITOR_KEYS$5} = lib_exports;
|
|
43627
|
+
|
|
43628
|
+
function traverseForScope(path, visitors2, state) {
|
|
43629
|
+
const exploded = explode$1(visitors2);
|
|
43630
|
+
|
|
43631
|
+
if (exploded.enter || exploded.exit) {
|
|
43632
|
+
throw new Error('Should not be used with enter/exit visitors.');
|
|
43633
|
+
}
|
|
43634
|
+
|
|
43635
|
+
_traverse2(path.parentPath, path.parent, path.node, path.container, path.key, path.listKey, path.hub, path);
|
|
43636
|
+
function _traverse2(parentPath, parent, node, container, key, listKey, hub, inPath) {
|
|
43637
|
+
if (!node) {
|
|
43638
|
+
return;
|
|
43639
|
+
}
|
|
43640
|
+
|
|
43641
|
+
const path2 = inPath || NodePath_Final.get({
|
|
43642
|
+
hub,
|
|
43643
|
+
parentPath,
|
|
43644
|
+
parent,
|
|
43645
|
+
container,
|
|
43646
|
+
listKey,
|
|
43647
|
+
key,
|
|
43648
|
+
});
|
|
43649
|
+
|
|
43650
|
+
_forceSetScope.call(path2);
|
|
43651
|
+
const visitor = exploded[node.type];
|
|
43652
|
+
|
|
43653
|
+
if (visitor?.enter) {
|
|
43654
|
+
for (const visit2 of visitor.enter) {
|
|
43655
|
+
visit2.call(state, path2, state);
|
|
43656
|
+
}
|
|
43657
|
+
}
|
|
43658
|
+
|
|
43659
|
+
if (path2.shouldSkip) {
|
|
43660
|
+
return;
|
|
43661
|
+
}
|
|
43662
|
+
|
|
43663
|
+
const keys2 = VISITOR_KEYS$5[node.type];
|
|
43664
|
+
|
|
43665
|
+
if (!keys2?.length) {
|
|
43666
|
+
return;
|
|
43667
|
+
}
|
|
43668
|
+
|
|
43669
|
+
for (const key2 of keys2) {
|
|
43670
|
+
const prop = node[key2];
|
|
43671
|
+
|
|
43672
|
+
if (!prop)
|
|
43673
|
+
continue;
|
|
43674
|
+
|
|
43675
|
+
if (Array.isArray(prop)) {
|
|
43676
|
+
for (let i = 0; i < prop.length; i++) {
|
|
43677
|
+
const value = prop[i];
|
|
43678
|
+
_traverse2(path2, node, value, prop, i, key2);
|
|
43679
|
+
}
|
|
43680
|
+
} else {
|
|
43681
|
+
_traverse2(path2, node, prop, node, key2, null);
|
|
43682
|
+
}
|
|
43683
|
+
}
|
|
43684
|
+
|
|
43685
|
+
if (visitor?.exit) {
|
|
43686
|
+
for (const visit2 of visitor.exit) {
|
|
43687
|
+
visit2.call(state, path2, state);
|
|
43688
|
+
}
|
|
43689
|
+
}
|
|
43690
|
+
}
|
|
43691
|
+
}
|
|
43692
|
+
|
|
43474
43693
|
var Binding = class {
|
|
43475
43694
|
constructor({identifier: identifier4, scope: scope2, path, kind}) {
|
|
43476
43695
|
__publicField(this, 'identifier');
|
|
@@ -43611,7 +43830,7 @@ var {
|
|
|
43611
43830
|
assignmentExpression: assignmentExpression$3,
|
|
43612
43831
|
callExpression: callExpression$3,
|
|
43613
43832
|
cloneNode: cloneNode$3,
|
|
43614
|
-
getBindingIdentifiers: getBindingIdentifiers$
|
|
43833
|
+
getBindingIdentifiers: getBindingIdentifiers$2,
|
|
43615
43834
|
identifier: identifier$3,
|
|
43616
43835
|
isArrayExpression: isArrayExpression3,
|
|
43617
43836
|
isBinary: isBinary3,
|
|
@@ -43647,8 +43866,6 @@ var {
|
|
|
43647
43866
|
toIdentifier: toIdentifier2,
|
|
43648
43867
|
variableDeclaration: variableDeclaration$1,
|
|
43649
43868
|
variableDeclarator: variableDeclarator$1,
|
|
43650
|
-
isRecordExpression: isRecordExpression2,
|
|
43651
|
-
isTupleExpression: isTupleExpression2,
|
|
43652
43869
|
isObjectProperty: isObjectProperty2,
|
|
43653
43870
|
isTopicReference: isTopicReference2,
|
|
43654
43871
|
isMetaProperty: isMetaProperty2,
|
|
@@ -43813,6 +44030,10 @@ function resetScope(scope2) {
|
|
|
43813
44030
|
scope2.globals = /* @__PURE__ */Object.create(null);
|
|
43814
44031
|
}
|
|
43815
44032
|
|
|
44033
|
+
function isAnonymousFunctionExpression(path) {
|
|
44034
|
+
return path.isFunctionExpression() && !path.node.id || path.isArrowFunctionExpression();
|
|
44035
|
+
}
|
|
44036
|
+
|
|
43816
44037
|
var collectorVisitor = {
|
|
43817
44038
|
ForStatement(path) {
|
|
43818
44039
|
const declar = path.get('init');
|
|
@@ -43886,7 +44107,7 @@ var collectorVisitor = {
|
|
|
43886
44107
|
binding?.reference(path);
|
|
43887
44108
|
} else if (isVariableDeclaration$1(declar)) {
|
|
43888
44109
|
for (const decl of declar.declarations) {
|
|
43889
|
-
for (const name of Object.keys(getBindingIdentifiers$
|
|
44110
|
+
for (const name of Object.keys(getBindingIdentifiers$2(decl))) {
|
|
43890
44111
|
const binding = scope2.getBinding(name);
|
|
43891
44112
|
binding?.reference(path);
|
|
43892
44113
|
}
|
|
@@ -44331,14 +44552,14 @@ var _Scope = class _Scope {
|
|
|
44331
44552
|
return true;
|
|
44332
44553
|
} else if (isBinary3(node)) {
|
|
44333
44554
|
return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
|
|
44334
|
-
} else if (isArrayExpression3(node)
|
|
44555
|
+
} else if (isArrayExpression3(node)) {
|
|
44335
44556
|
for (const elem of node.elements) {
|
|
44336
44557
|
if (elem !== null && !this.isPure(elem, constantsOnly))
|
|
44337
44558
|
return false;
|
|
44338
44559
|
}
|
|
44339
44560
|
|
|
44340
44561
|
return true;
|
|
44341
|
-
} else if (isObjectExpression3(node)
|
|
44562
|
+
} else if (isObjectExpression3(node)) {
|
|
44342
44563
|
for (const prop of node.properties) {
|
|
44343
44564
|
if (!this.isPure(prop, constantsOnly))
|
|
44344
44565
|
return false;
|
|
@@ -44479,10 +44700,6 @@ var _Scope = class _Scope {
|
|
|
44479
44700
|
collectorVisitor]));
|
|
44480
44701
|
|
|
44481
44702
|
if (path.type !== 'Program') {
|
|
44482
|
-
for (const visit2 of scopeVisitor.enter) {
|
|
44483
|
-
visit2.call(state, path, state);
|
|
44484
|
-
}
|
|
44485
|
-
|
|
44486
44703
|
const typeVisitors = scopeVisitor[path.type];
|
|
44487
44704
|
|
|
44488
44705
|
if (typeVisitors) {
|
|
@@ -44492,7 +44709,9 @@ collectorVisitor]));
|
|
|
44492
44709
|
}
|
|
44493
44710
|
}
|
|
44494
44711
|
|
|
44495
|
-
|
|
44712
|
+
{
|
|
44713
|
+
traverseForScope(path, scopeVisitor, state);
|
|
44714
|
+
}
|
|
44496
44715
|
this.crawling = false;
|
|
44497
44716
|
|
|
44498
44717
|
for (const path2 of state.assignments) {
|
|
@@ -44543,7 +44762,7 @@ collectorVisitor]));
|
|
|
44543
44762
|
id,
|
|
44544
44763
|
} = opts;
|
|
44545
44764
|
|
|
44546
|
-
if (!init && !unique && (kind === 'var' || kind === 'let') && path
|
|
44765
|
+
if (!init && !unique && (kind === 'var' || kind === 'let') && isAnonymousFunctionExpression(path) && isCallExpression$12(path.parent, {callee: path.node}) && path.parent.arguments.length <= path.node.params.length && isIdentifier$5(id)) {
|
|
44547
44766
|
path.pushContainer('params', id);
|
|
44548
44767
|
path.scope.registerBinding('param', path.get('params')[path.node.params.length - 1]);
|
|
44549
44768
|
return;
|
|
@@ -44777,14 +44996,14 @@ collectorVisitor]));
|
|
|
44777
44996
|
init.push(assignmentExpression$3('=', decl.id, decl.init));
|
|
44778
44997
|
}
|
|
44779
44998
|
|
|
44780
|
-
const ids = Object.keys(getBindingIdentifiers$
|
|
44999
|
+
const ids = Object.keys(getBindingIdentifiers$2(decl, false, true, true));
|
|
44781
45000
|
|
|
44782
45001
|
for (const name2 of ids) {
|
|
44783
45002
|
emit(identifier$3(name2), decl.init != null);
|
|
44784
45003
|
}
|
|
44785
45004
|
}
|
|
44786
45005
|
|
|
44787
|
-
if (parentPath.parentPath.
|
|
45006
|
+
if (parentPath.parentPath.isForXStatement({left: parent})) {
|
|
44788
45007
|
parentPath.replaceWith(firstId);
|
|
44789
45008
|
} else if (init.length === 0) {
|
|
44790
45009
|
parentPath.remove();
|
|
@@ -44914,7 +45133,7 @@ function getDeepestCommonAncestorFrom(paths, filter) {
|
|
|
44914
45133
|
|
|
44915
45134
|
const first = ancestries[0];
|
|
44916
45135
|
|
|
44917
|
-
depthLoop:
|
|
45136
|
+
depthLoop: for (let i = 0; i < minDepth; i++) {
|
|
44918
45137
|
const shouldMatch = first[i];
|
|
44919
45138
|
|
|
44920
45139
|
for (const ancestry of ancestries) {
|
|
@@ -45129,7 +45348,7 @@ function getParentConditionalPath(binding, path, name) {
|
|
|
45129
45348
|
}
|
|
45130
45349
|
|
|
45131
45350
|
if (parentPath.isFunction()) {
|
|
45132
|
-
if (parentPath.parentPath.scope.getBinding(name) !== binding)
|
|
45351
|
+
if (name == null || parentPath.parentPath.scope.getBinding(name) !== binding)
|
|
45133
45352
|
return;
|
|
45134
45353
|
}
|
|
45135
45354
|
|
|
@@ -45646,6 +45865,7 @@ var hooks = [
|
|
|
45646
45865
|
if (parent.isIfStatement() && self.key === 'consequent' || self.key === 'body' && (parent.isLoop() || parent.isArrowFunctionExpression())) {
|
|
45647
45866
|
self.replaceWith({
|
|
45648
45867
|
type: 'BlockStatement',
|
|
45868
|
+
directives: [],
|
|
45649
45869
|
body: [],
|
|
45650
45870
|
});
|
|
45651
45871
|
return true;
|
|
@@ -45653,8 +45873,6 @@ var hooks = [
|
|
|
45653
45873
|
},
|
|
45654
45874
|
];
|
|
45655
45875
|
|
|
45656
|
-
var {getBindingIdentifiers: getBindingIdentifiers$2} = lib_exports;
|
|
45657
|
-
|
|
45658
45876
|
function remove() {
|
|
45659
45877
|
_assertUnremoved.call(this);
|
|
45660
45878
|
resync.call(this);
|
|
@@ -45674,7 +45892,7 @@ function remove() {
|
|
|
45674
45892
|
}
|
|
45675
45893
|
|
|
45676
45894
|
function _removeFromScope() {
|
|
45677
|
-
const bindings = getBindingIdentifiers
|
|
45895
|
+
const bindings = getBindingIdentifiers(this.node, false, false, true);
|
|
45678
45896
|
Object
|
|
45679
45897
|
.keys(bindings)
|
|
45680
45898
|
.forEach((name) => this.scope.removeBinding(name));
|
|
@@ -46114,7 +46332,7 @@ function _replaceWith(node) {
|
|
|
46114
46332
|
|
|
46115
46333
|
this.debug(`Replace with ${node?.type}`);
|
|
46116
46334
|
getCachedPaths(this)?.set(node, this).delete(this.node);
|
|
46117
|
-
this.node =
|
|
46335
|
+
this.node = node;
|
|
46118
46336
|
this.container[this.key] = node;
|
|
46119
46337
|
}
|
|
46120
46338
|
|
|
@@ -47133,8 +47351,7 @@ function standardizeSuperProperty(superProp) {
|
|
|
47133
47351
|
|
|
47134
47352
|
if (superProp.node.computed) {
|
|
47135
47353
|
const tmp = superProp.scope.generateDeclaredUidIdentifier('tmp');
|
|
47136
|
-
const object = superProp.node
|
|
47137
|
-
const property = superProp.node.property;
|
|
47354
|
+
const {object, property} = superProp.node;
|
|
47138
47355
|
|
|
47139
47356
|
assignmentPath.get('left').replaceWith(memberExpression2(object, assignmentExpression2('=', tmp, property), true));
|
|
47140
47357
|
assignmentPath.get('right').replaceWith(rightExpression(isLogicalAssignment ? '=' : op, memberExpression2(object, identifier3(tmp.name), true), value));
|
|
@@ -47594,7 +47811,7 @@ function referencesImport(moduleSource, importName) {
|
|
|
47594
47811
|
|
|
47595
47812
|
const binding = this.scope.getBinding(this.node.name);
|
|
47596
47813
|
|
|
47597
|
-
if (
|
|
47814
|
+
if (binding?.kind !== 'module')
|
|
47598
47815
|
return false;
|
|
47599
47816
|
|
|
47600
47817
|
const path = binding.path;
|
|
@@ -48014,6 +48231,8 @@ function isInStrictMode() {
|
|
|
48014
48231
|
return true;
|
|
48015
48232
|
}
|
|
48016
48233
|
}
|
|
48234
|
+
|
|
48235
|
+
return false;
|
|
48017
48236
|
});
|
|
48018
48237
|
|
|
48019
48238
|
return !!strictParent;
|
|
@@ -48492,7 +48711,6 @@ var NodePath_Final = class NodePath {
|
|
|
48492
48711
|
constructor(hub, parent) {
|
|
48493
48712
|
__publicField(this, 'contexts', []);
|
|
48494
48713
|
__publicField(this, 'state', null);
|
|
48495
|
-
__publicField(this, 'opts', null);
|
|
48496
48714
|
__publicField(this, '_traverseFlags', 0);
|
|
48497
48715
|
__publicField(this, 'skipKeys', null);
|
|
48498
48716
|
__publicField(this, 'parentPath', null);
|
|
@@ -48841,13 +49059,13 @@ var TraversalContext = class {
|
|
|
48841
49059
|
visitIndex++;
|
|
48842
49060
|
resync.call(path);
|
|
48843
49061
|
|
|
49062
|
+
if (path.key === null)
|
|
49063
|
+
continue;
|
|
49064
|
+
|
|
48844
49065
|
if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
|
|
48845
49066
|
pushContext.call(path, this);
|
|
48846
49067
|
}
|
|
48847
49068
|
|
|
48848
|
-
if (path.key === null)
|
|
48849
|
-
continue;
|
|
48850
|
-
|
|
48851
49069
|
const {node} = path;
|
|
48852
49070
|
|
|
48853
49071
|
if (visited.has(node))
|
|
@@ -48872,6 +49090,9 @@ var TraversalContext = class {
|
|
|
48872
49090
|
}
|
|
48873
49091
|
|
|
48874
49092
|
for (let i = 0; i < visitIndex; i++) {
|
|
49093
|
+
if (queue[i].key === null)
|
|
49094
|
+
continue;
|
|
49095
|
+
|
|
48875
49096
|
popContext.call(queue[i]);
|
|
48876
49097
|
}
|
|
48877
49098
|
|
|
@@ -49158,6 +49379,24 @@ function stop() {
|
|
|
49158
49379
|
this._traverseFlags |= SHOULD_SKIP | SHOULD_STOP;
|
|
49159
49380
|
}
|
|
49160
49381
|
|
|
49382
|
+
function _forceSetScope() {
|
|
49383
|
+
let path = this.parentPath;
|
|
49384
|
+
|
|
49385
|
+
if ((this.key === 'key' || this.listKey === 'decorators') && path.isMethod() || this.key === 'discriminant' && path.isSwitchStatement()) {
|
|
49386
|
+
path = path.parentPath;
|
|
49387
|
+
}
|
|
49388
|
+
|
|
49389
|
+
let target;
|
|
49390
|
+
|
|
49391
|
+
while (path && !target) {
|
|
49392
|
+
target = path.scope;
|
|
49393
|
+
path = path.parentPath;
|
|
49394
|
+
}
|
|
49395
|
+
|
|
49396
|
+
this.scope = this.getScope(target);
|
|
49397
|
+
this.scope?.init();
|
|
49398
|
+
}
|
|
49399
|
+
|
|
49161
49400
|
function setScope() {
|
|
49162
49401
|
if (this.opts?.noScope)
|
|
49163
49402
|
return;
|
|
@@ -49350,7 +49589,7 @@ function traverse3(parent, opts = {}, scope2, state, parentPath, visitSelf) {
|
|
|
49350
49589
|
}
|
|
49351
49590
|
|
|
49352
49591
|
explode$1(opts);
|
|
49353
|
-
traverseNode(parent, opts, scope2, state, parentPath,
|
|
49592
|
+
traverseNode(parent, opts, scope2, state, parentPath, void 0, visitSelf);
|
|
49354
49593
|
}
|
|
49355
49594
|
|
|
49356
49595
|
traverse3.visitors = visitors;
|