@putout/babel 4.4.2 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundle/index.d.ts +264 -1
- package/bundle/index.js +735 -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,26 @@ 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_BABEL_8_BREAKING_false = () => {};
|
|
644
|
+
|
|
645
|
+
// ../babel-babel/node_modules/js-tokens/index.js
|
|
646
|
+
var require_js_tokens = __commonJS({
|
|
647
|
+
'../babel-babel/node_modules/js-tokens/index.js'(exports2, module2) {
|
|
648
|
+
function bool2(value) {
|
|
649
|
+
if (value == null)
|
|
650
|
+
return false;
|
|
651
|
+
|
|
652
|
+
return value && value !== 'false' && value !== '0';
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
module2.exports = require_js_tokens_BABEL_8_BREAKING_true();
|
|
656
|
+
},
|
|
657
|
+
});
|
|
658
|
+
|
|
659
|
+
// ../babel-babel/node_modules/jsesc/jsesc.js
|
|
643
660
|
var require_jsesc = __commonJS({
|
|
644
|
-
'node_modules/jsesc/jsesc.js'(exports2, module2) {
|
|
661
|
+
'../babel-babel/node_modules/jsesc/jsesc.js'(exports2, module2) {
|
|
645
662
|
"use strict";
|
|
646
663
|
|
|
647
664
|
var object = {};
|
|
@@ -706,10 +723,6 @@ var require_jsesc = __commonJS({
|
|
|
706
723
|
return typeof value == 'number' || toString.call(value) == '[object Number]';
|
|
707
724
|
};
|
|
708
725
|
|
|
709
|
-
var isBigInt = (value) => {
|
|
710
|
-
return typeof value == 'bigint';
|
|
711
|
-
};
|
|
712
|
-
|
|
713
726
|
var isFunction5 = (value) => {
|
|
714
727
|
return typeof value == 'function';
|
|
715
728
|
};
|
|
@@ -858,41 +871,32 @@ var require_jsesc = __commonJS({
|
|
|
858
871
|
}
|
|
859
872
|
|
|
860
873
|
return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
|
|
861
|
-
} else if (isNumber2(argument)
|
|
874
|
+
} else if (isNumber2(argument)) {
|
|
862
875
|
if (json) {
|
|
863
|
-
return JSON.stringify(
|
|
876
|
+
return JSON.stringify(argument);
|
|
864
877
|
}
|
|
865
878
|
|
|
866
|
-
let result2;
|
|
867
|
-
|
|
868
879
|
if (useDecNumbers) {
|
|
869
|
-
|
|
870
|
-
}
|
|
880
|
+
return String(argument);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
if (useHexNumbers) {
|
|
871
884
|
let hexadecimal2 = argument.toString(16);
|
|
872
885
|
|
|
873
886
|
if (!lowercaseHex) {
|
|
874
887
|
hexadecimal2 = hexadecimal2.toUpperCase();
|
|
875
888
|
}
|
|
876
889
|
|
|
877
|
-
|
|
878
|
-
} else if (useBinNumbers) {
|
|
879
|
-
result2 = '0b' + argument.toString(2);
|
|
880
|
-
} else if (useOctNumbers) {
|
|
881
|
-
result2 = '0o' + argument.toString(8);
|
|
890
|
+
return '0x' + hexadecimal2;
|
|
882
891
|
}
|
|
883
|
-
|
|
884
892
|
|
|
885
|
-
if (
|
|
886
|
-
return
|
|
893
|
+
if (useBinNumbers) {
|
|
894
|
+
return '0b' + argument.toString(2);
|
|
887
895
|
}
|
|
888
896
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
if (json) {
|
|
892
|
-
return JSON.stringify(Number(argument));
|
|
897
|
+
if (useOctNumbers) {
|
|
898
|
+
return '0o' + argument.toString(8);
|
|
893
899
|
}
|
|
894
|
-
|
|
895
|
-
return argument + 'n';
|
|
896
900
|
} else if (!isObject(argument)) {
|
|
897
901
|
if (json) {
|
|
898
902
|
return JSON.stringify(argument) || 'null';
|
|
@@ -915,7 +919,6 @@ var require_jsesc = __commonJS({
|
|
|
915
919
|
return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
|
|
916
920
|
}
|
|
917
921
|
|
|
918
|
-
|
|
919
922
|
}
|
|
920
923
|
|
|
921
924
|
const regex = options.escapeEverything ? escapeEverythingRegex : escapeNonAsciiRegex;
|
|
@@ -1002,53 +1005,63 @@ var require_jsesc = __commonJS({
|
|
|
1002
1005
|
},
|
|
1003
1006
|
});
|
|
1004
1007
|
|
|
1005
|
-
// node_modules/ms/index.js
|
|
1008
|
+
// ../babel-babel/node_modules/ms/index.js
|
|
1006
1009
|
var require_ms = () => () => {};
|
|
1007
1010
|
|
|
1008
|
-
// node_modules/debug/src/common.js
|
|
1011
|
+
// ../babel-babel/node_modules/debug/src/common.js
|
|
1009
1012
|
var require_common = () => () => ({
|
|
1010
1013
|
enabled: false,
|
|
1011
1014
|
});
|
|
1012
1015
|
|
|
1013
|
-
// node_modules/debug/src/browser.js
|
|
1016
|
+
// ../babel-babel/node_modules/debug/src/browser.js
|
|
1014
1017
|
var require_browser = () => () => ({
|
|
1015
1018
|
enabled: false,
|
|
1016
1019
|
});
|
|
1017
1020
|
|
|
1018
|
-
// node_modules/has-flag/index.js
|
|
1021
|
+
// ../babel-babel/node_modules/has-flag/index.js
|
|
1019
1022
|
var require_has_flag = __commonJS({
|
|
1020
|
-
'node_modules/has-flag/index.js'(exports2, module2) {
|
|
1023
|
+
'../babel-babel/node_modules/has-flag/index.js'(exports2, module2) {
|
|
1021
1024
|
"use strict";
|
|
1022
1025
|
|
|
1023
|
-
module2.exports = (flag, argv) => {
|
|
1024
|
-
argv = argv || process.argv;
|
|
1026
|
+
module2.exports = (flag, argv = process.argv) => {
|
|
1025
1027
|
const prefix2 = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--';
|
|
1026
|
-
const
|
|
1027
|
-
const
|
|
1028
|
+
const position = argv.indexOf(prefix2 + flag);
|
|
1029
|
+
const terminatorPosition = argv.indexOf('--');
|
|
1028
1030
|
|
|
1029
|
-
return
|
|
1031
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
1030
1032
|
};
|
|
1031
1033
|
},
|
|
1032
1034
|
});
|
|
1033
1035
|
|
|
1034
|
-
// node_modules/supports-color/index.js
|
|
1036
|
+
// ../babel-babel/node_modules/supports-color/index.js
|
|
1035
1037
|
var require_supports_color = __commonJS({
|
|
1036
|
-
'node_modules/supports-color/index.js'(exports2, module2) {
|
|
1038
|
+
'../babel-babel/node_modules/supports-color/index.js'(exports2, module2) {
|
|
1037
1039
|
"use strict";
|
|
1038
1040
|
|
|
1039
1041
|
var os = require('os');
|
|
1042
|
+
var tty = require('tty');
|
|
1040
1043
|
var hasFlag = require_has_flag();
|
|
1041
|
-
var env = process
|
|
1042
|
-
var
|
|
1044
|
+
var {env} = process;
|
|
1045
|
+
var flagForceColor;
|
|
1043
1046
|
|
|
1044
|
-
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
|
|
1045
|
-
|
|
1047
|
+
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false') || hasFlag('color=never')) {
|
|
1048
|
+
flagForceColor = 0;
|
|
1046
1049
|
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
1047
|
-
|
|
1050
|
+
flagForceColor = 1;
|
|
1048
1051
|
}
|
|
1049
1052
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1053
|
+
function envForceColor() {
|
|
1054
|
+
if ('FORCE_COLOR' in env) {
|
|
1055
|
+
if (env.FORCE_COLOR === 'true') {
|
|
1056
|
+
return 1;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
if (env.FORCE_COLOR === 'false') {
|
|
1060
|
+
return 0;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
1064
|
+
}
|
|
1052
1065
|
}
|
|
1053
1066
|
|
|
1054
1067
|
function translateLevel(level) {
|
|
@@ -1064,31 +1077,45 @@ var require_supports_color = __commonJS({
|
|
|
1064
1077
|
};
|
|
1065
1078
|
}
|
|
1066
1079
|
|
|
1067
|
-
function supportsColor(
|
|
1068
|
-
|
|
1069
|
-
|
|
1080
|
+
function supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
|
|
1081
|
+
const noFlagForceColor = envForceColor();
|
|
1082
|
+
|
|
1083
|
+
if (noFlagForceColor !== void 0) {
|
|
1084
|
+
flagForceColor = noFlagForceColor;
|
|
1070
1085
|
}
|
|
1071
1086
|
|
|
1072
|
-
|
|
1073
|
-
|
|
1087
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
1088
|
+
|
|
1089
|
+
if (forceColor === 0) {
|
|
1090
|
+
return 0;
|
|
1074
1091
|
}
|
|
1075
1092
|
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1093
|
+
if (sniffFlags) {
|
|
1094
|
+
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
1095
|
+
return 3;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
if (hasFlag('color=256')) {
|
|
1099
|
+
return 2;
|
|
1100
|
+
}
|
|
1078
1101
|
}
|
|
1079
1102
|
|
|
1080
|
-
if (
|
|
1103
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
1081
1104
|
return 0;
|
|
1082
1105
|
}
|
|
1083
1106
|
|
|
1084
|
-
const min = forceColor
|
|
1107
|
+
const min = forceColor || 0;
|
|
1108
|
+
|
|
1109
|
+
if (env.TERM === 'dumb') {
|
|
1110
|
+
return min;
|
|
1111
|
+
}
|
|
1085
1112
|
|
|
1086
1113
|
if (process.platform === 'win32') {
|
|
1087
1114
|
const osRelease = os
|
|
1088
1115
|
.release()
|
|
1089
1116
|
.split('.');
|
|
1090
1117
|
|
|
1091
|
-
if (Number(
|
|
1118
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
1092
1119
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
1093
1120
|
}
|
|
1094
1121
|
|
|
@@ -1101,6 +1128,9 @@ var require_supports_color = __commonJS({
|
|
|
1101
1128
|
'CIRCLECI',
|
|
1102
1129
|
'APPVEYOR',
|
|
1103
1130
|
'GITLAB_CI',
|
|
1131
|
+
'GITHUB_ACTIONS',
|
|
1132
|
+
'BUILDKITE',
|
|
1133
|
+
'DRONE',
|
|
1104
1134
|
].some((sign) => sign in env) || env.CI_NAME === 'codeship') {
|
|
1105
1135
|
return 1;
|
|
1106
1136
|
}
|
|
@@ -1117,7 +1147,7 @@ var require_supports_color = __commonJS({
|
|
|
1117
1147
|
}
|
|
1118
1148
|
|
|
1119
1149
|
if ('TERM_PROGRAM' in env) {
|
|
1120
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || '')
|
|
1150
|
+
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '')
|
|
1121
1151
|
.split('.')[0], 10);
|
|
1122
1152
|
|
|
1123
1153
|
switch(env.TERM_PROGRAM) {
|
|
@@ -1141,34 +1171,38 @@ var require_supports_color = __commonJS({
|
|
|
1141
1171
|
return 1;
|
|
1142
1172
|
}
|
|
1143
1173
|
|
|
1144
|
-
if (env.TERM === 'dumb') {
|
|
1145
|
-
return min;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
1174
|
return min;
|
|
1149
1175
|
}
|
|
1150
1176
|
|
|
1151
|
-
function getSupportLevel(stream) {
|
|
1152
|
-
const level = supportsColor(stream
|
|
1177
|
+
function getSupportLevel(stream, options = {}) {
|
|
1178
|
+
const level = supportsColor(stream, {
|
|
1179
|
+
streamIsTTY: stream && stream.isTTY,
|
|
1180
|
+
...options,
|
|
1181
|
+
});
|
|
1182
|
+
|
|
1153
1183
|
return translateLevel(level);
|
|
1154
1184
|
}
|
|
1155
1185
|
|
|
1156
1186
|
module2.exports = {
|
|
1157
1187
|
supportsColor: getSupportLevel,
|
|
1158
|
-
stdout: getSupportLevel(
|
|
1159
|
-
|
|
1188
|
+
stdout: getSupportLevel({
|
|
1189
|
+
isTTY: tty.isatty(1),
|
|
1190
|
+
}),
|
|
1191
|
+
stderr: getSupportLevel({
|
|
1192
|
+
isTTY: tty.isatty(2),
|
|
1193
|
+
}),
|
|
1160
1194
|
};
|
|
1161
1195
|
},
|
|
1162
1196
|
});
|
|
1163
1197
|
|
|
1164
|
-
// node_modules/debug/src/node.js
|
|
1198
|
+
// ../babel-babel/node_modules/debug/src/node.js
|
|
1165
1199
|
var require_node = () => () => ({
|
|
1166
1200
|
enabled: false,
|
|
1167
1201
|
});
|
|
1168
1202
|
|
|
1169
|
-
// node_modules/debug/src/index.js
|
|
1203
|
+
// ../babel-babel/node_modules/debug/src/index.js
|
|
1170
1204
|
var require_src = __commonJS({
|
|
1171
|
-
'node_modules/debug/src/index.js'(exports2, module2) {
|
|
1205
|
+
'../babel-babel/node_modules/debug/src/index.js'(exports2, module2) {
|
|
1172
1206
|
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
|
1173
1207
|
module2.exports = require_browser();
|
|
1174
1208
|
} else {
|
|
@@ -1191,7 +1225,7 @@ __export(index_exports, {
|
|
|
1191
1225
|
types: () => lib_exports,
|
|
1192
1226
|
});
|
|
1193
1227
|
module.exports = __toCommonJS(index_exports);
|
|
1194
|
-
//
|
|
1228
|
+
// ../babel-babel/packages/babel-types/lib/index.js
|
|
1195
1229
|
var lib_exports = {};
|
|
1196
1230
|
|
|
1197
1231
|
__export(lib_exports, {
|
|
@@ -1359,6 +1393,7 @@ __export(lib_exports, {
|
|
|
1359
1393
|
ModuleExpression: () => ModuleExpression,
|
|
1360
1394
|
NODE_FIELDS: () => NODE_FIELDS$1,
|
|
1361
1395
|
NODE_PARENT_VALIDATIONS: () => NODE_PARENT_VALIDATIONS,
|
|
1396
|
+
NODE_UNION_SHAPES__PRIVATE: () => NODE_UNION_SHAPES__PRIVATE,
|
|
1362
1397
|
NUMBER_BINARY_OPERATORS: () => NUMBER_BINARY_OPERATORS,
|
|
1363
1398
|
NUMBER_UNARY_OPERATORS: () => NUMBER_UNARY_OPERATORS,
|
|
1364
1399
|
NewExpression: () => NewExpression,
|
|
@@ -1399,7 +1434,6 @@ __export(lib_exports, {
|
|
|
1399
1434
|
PrivateName: () => PrivateName,
|
|
1400
1435
|
Program: () => Program,
|
|
1401
1436
|
QualifiedTypeIdentifier: () => QualifiedTypeIdentifier,
|
|
1402
|
-
RecordExpression: () => RecordExpression,
|
|
1403
1437
|
RegExpLiteral: () => RegExpLiteral,
|
|
1404
1438
|
RestElement: () => RestElement,
|
|
1405
1439
|
ReturnStatement: () => ReturnStatement,
|
|
@@ -1501,7 +1535,6 @@ __export(lib_exports, {
|
|
|
1501
1535
|
ThrowStatement: () => ThrowStatement,
|
|
1502
1536
|
TopicReference: () => TopicReference,
|
|
1503
1537
|
TryStatement: () => TryStatement,
|
|
1504
|
-
TupleExpression: () => TupleExpression,
|
|
1505
1538
|
TupleTypeAnnotation: () => TupleTypeAnnotation,
|
|
1506
1539
|
TypeAlias: () => TypeAlias,
|
|
1507
1540
|
TypeAnnotation: () => TypeAnnotation,
|
|
@@ -1720,7 +1753,6 @@ __export(lib_exports, {
|
|
|
1720
1753
|
assertProperty: () => assertProperty,
|
|
1721
1754
|
assertPureish: () => assertPureish,
|
|
1722
1755
|
assertQualifiedTypeIdentifier: () => assertQualifiedTypeIdentifier,
|
|
1723
|
-
assertRecordExpression: () => assertRecordExpression,
|
|
1724
1756
|
assertRegExpLiteral: () => assertRegExpLiteral,
|
|
1725
1757
|
assertRegexLiteral: () => assertRegexLiteral,
|
|
1726
1758
|
assertRestElement: () => assertRestElement,
|
|
@@ -1821,7 +1853,6 @@ __export(lib_exports, {
|
|
|
1821
1853
|
assertThrowStatement: () => assertThrowStatement,
|
|
1822
1854
|
assertTopicReference: () => assertTopicReference,
|
|
1823
1855
|
assertTryStatement: () => assertTryStatement,
|
|
1824
|
-
assertTupleExpression: () => assertTupleExpression,
|
|
1825
1856
|
assertTupleTypeAnnotation: () => assertTupleTypeAnnotation,
|
|
1826
1857
|
assertTypeAlias: () => assertTypeAlias,
|
|
1827
1858
|
assertTypeAnnotation: () => assertTypeAnnotation,
|
|
@@ -2140,7 +2171,6 @@ __export(lib_exports, {
|
|
|
2140
2171
|
isProperty: () => isProperty,
|
|
2141
2172
|
isPureish: () => isPureish,
|
|
2142
2173
|
isQualifiedTypeIdentifier: () => isQualifiedTypeIdentifier,
|
|
2143
|
-
isRecordExpression: () => isRecordExpression,
|
|
2144
2174
|
isReferenced: () => isReferenced,
|
|
2145
2175
|
isRegExpLiteral: () => isRegExpLiteral,
|
|
2146
2176
|
isRegexLiteral: () => isRegexLiteral,
|
|
@@ -2244,7 +2274,6 @@ __export(lib_exports, {
|
|
|
2244
2274
|
isThrowStatement: () => isThrowStatement,
|
|
2245
2275
|
isTopicReference: () => isTopicReference,
|
|
2246
2276
|
isTryStatement: () => isTryStatement,
|
|
2247
|
-
isTupleExpression: () => isTupleExpression,
|
|
2248
2277
|
isTupleTypeAnnotation: () => isTupleTypeAnnotation,
|
|
2249
2278
|
isType: () => isType,
|
|
2250
2279
|
isTypeAlias: () => isTypeAlias,
|
|
@@ -2327,7 +2356,6 @@ __export(lib_exports, {
|
|
|
2327
2356
|
program: () => program,
|
|
2328
2357
|
qualifiedTypeIdentifier: () => qualifiedTypeIdentifier,
|
|
2329
2358
|
react: () => react,
|
|
2330
|
-
recordExpression: () => recordExpression,
|
|
2331
2359
|
regExpLiteral: () => regExpLiteral,
|
|
2332
2360
|
regexLiteral: () => RegexLiteral,
|
|
2333
2361
|
removeComments: () => removeComments,
|
|
@@ -2434,7 +2462,6 @@ __export(lib_exports, {
|
|
|
2434
2462
|
tsUnionType: () => tsUnionType,
|
|
2435
2463
|
tsUnknownKeyword: () => tsUnknownKeyword,
|
|
2436
2464
|
tsVoidKeyword: () => tsVoidKeyword,
|
|
2437
|
-
tupleExpression: () => tupleExpression,
|
|
2438
2465
|
tupleTypeAnnotation: () => tupleTypeAnnotation,
|
|
2439
2466
|
typeAlias: () => typeAlias,
|
|
2440
2467
|
typeAnnotation: () => typeAnnotation,
|
|
@@ -2459,9 +2486,9 @@ __export(lib_exports, {
|
|
|
2459
2486
|
yieldExpression: () => yieldExpression,
|
|
2460
2487
|
});
|
|
2461
2488
|
|
|
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-\
|
|
2489
|
+
// ../babel-babel/packages/babel-helper-validator-identifier/lib/index.js
|
|
2490
|
+
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';
|
|
2491
|
+
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
2492
|
var nonASCIIidentifierStart = new RegExp('[' + nonASCIIidentifierStartChars + ']');
|
|
2466
2493
|
var nonASCIIidentifier = new RegExp('[' + nonASCIIidentifierStartChars + nonASCIIidentifierChars + ']');
|
|
2467
2494
|
|
|
@@ -2566,7 +2593,9 @@ var astralIdentifierStartCodes = [
|
|
|
2566
2593
|
21,
|
|
2567
2594
|
11,
|
|
2568
2595
|
25,
|
|
2569
|
-
|
|
2596
|
+
7,
|
|
2597
|
+
25,
|
|
2598
|
+
39,
|
|
2570
2599
|
55,
|
|
2571
2600
|
7,
|
|
2572
2601
|
1,
|
|
@@ -2611,8 +2640,8 @@ var astralIdentifierStartCodes = [
|
|
|
2611
2640
|
7,
|
|
2612
2641
|
1,
|
|
2613
2642
|
17,
|
|
2614
|
-
|
|
2615
|
-
|
|
2643
|
+
5,
|
|
2644
|
+
57,
|
|
2616
2645
|
28,
|
|
2617
2646
|
11,
|
|
2618
2647
|
0,
|
|
@@ -2796,7 +2825,9 @@ var astralIdentifierStartCodes = [
|
|
|
2796
2825
|
31,
|
|
2797
2826
|
15,
|
|
2798
2827
|
0,
|
|
2799
|
-
|
|
2828
|
+
24,
|
|
2829
|
+
43,
|
|
2830
|
+
261,
|
|
2800
2831
|
18,
|
|
2801
2832
|
16,
|
|
2802
2833
|
0,
|
|
@@ -2844,7 +2875,11 @@ var astralIdentifierStartCodes = [
|
|
|
2844
2875
|
44,
|
|
2845
2876
|
212,
|
|
2846
2877
|
63,
|
|
2847
|
-
|
|
2878
|
+
33,
|
|
2879
|
+
24,
|
|
2880
|
+
3,
|
|
2881
|
+
24,
|
|
2882
|
+
45,
|
|
2848
2883
|
74,
|
|
2849
2884
|
6,
|
|
2850
2885
|
0,
|
|
@@ -2854,13 +2889,15 @@ var astralIdentifierStartCodes = [
|
|
|
2854
2889
|
1,
|
|
2855
2890
|
2,
|
|
2856
2891
|
0,
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2892
|
+
15,
|
|
2893
|
+
4,
|
|
2894
|
+
10,
|
|
2895
|
+
7381,
|
|
2861
2896
|
42,
|
|
2862
|
-
|
|
2863
|
-
|
|
2897
|
+
31,
|
|
2898
|
+
98,
|
|
2899
|
+
114,
|
|
2900
|
+
8702,
|
|
2864
2901
|
3,
|
|
2865
2902
|
2,
|
|
2866
2903
|
6,
|
|
@@ -2968,7 +3005,19 @@ var astralIdentifierStartCodes = [
|
|
|
2968
3005
|
29,
|
|
2969
3006
|
3,
|
|
2970
3007
|
0,
|
|
2971
|
-
|
|
3008
|
+
208,
|
|
3009
|
+
30,
|
|
3010
|
+
2,
|
|
3011
|
+
2,
|
|
3012
|
+
2,
|
|
3013
|
+
1,
|
|
3014
|
+
2,
|
|
3015
|
+
6,
|
|
3016
|
+
3,
|
|
3017
|
+
4,
|
|
3018
|
+
10,
|
|
3019
|
+
1,
|
|
3020
|
+
225,
|
|
2972
3021
|
6,
|
|
2973
3022
|
2,
|
|
2974
3023
|
3,
|
|
@@ -3051,12 +3100,10 @@ var astralIdentifierStartCodes = [
|
|
|
3051
3100
|
4421,
|
|
3052
3101
|
42719,
|
|
3053
3102
|
33,
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3103
|
+
4381,
|
|
3104
|
+
3,
|
|
3105
|
+
5773,
|
|
3057
3106
|
3,
|
|
3058
|
-
5761,
|
|
3059
|
-
15,
|
|
3060
3107
|
7472,
|
|
3061
3108
|
16,
|
|
3062
3109
|
621,
|
|
@@ -3065,7 +3112,7 @@ var astralIdentifierStartCodes = [
|
|
|
3065
3112
|
1507,
|
|
3066
3113
|
4938,
|
|
3067
3114
|
6,
|
|
3068
|
-
|
|
3115
|
+
8489,
|
|
3069
3116
|
];
|
|
3070
3117
|
var astralIdentifierCodes = [
|
|
3071
3118
|
509,
|
|
@@ -3098,8 +3145,8 @@ var astralIdentifierCodes = [
|
|
|
3098
3145
|
4,
|
|
3099
3146
|
318,
|
|
3100
3147
|
1,
|
|
3101
|
-
|
|
3102
|
-
|
|
3148
|
+
78,
|
|
3149
|
+
5,
|
|
3103
3150
|
71,
|
|
3104
3151
|
10,
|
|
3105
3152
|
50,
|
|
@@ -3244,7 +3291,9 @@ var astralIdentifierCodes = [
|
|
|
3244
3291
|
10,
|
|
3245
3292
|
47,
|
|
3246
3293
|
15,
|
|
3247
|
-
|
|
3294
|
+
199,
|
|
3295
|
+
7,
|
|
3296
|
+
137,
|
|
3248
3297
|
9,
|
|
3249
3298
|
54,
|
|
3250
3299
|
7,
|
|
@@ -3276,7 +3325,9 @@ var astralIdentifierCodes = [
|
|
|
3276
3325
|
4,
|
|
3277
3326
|
9,
|
|
3278
3327
|
9,
|
|
3279
|
-
|
|
3328
|
+
55,
|
|
3329
|
+
9,
|
|
3330
|
+
266,
|
|
3280
3331
|
3,
|
|
3281
3332
|
10,
|
|
3282
3333
|
1,
|
|
@@ -3376,7 +3427,15 @@ var astralIdentifierCodes = [
|
|
|
3376
3427
|
1,
|
|
3377
3428
|
2,
|
|
3378
3429
|
9,
|
|
3379
|
-
|
|
3430
|
+
233,
|
|
3431
|
+
0,
|
|
3432
|
+
3,
|
|
3433
|
+
0,
|
|
3434
|
+
8,
|
|
3435
|
+
1,
|
|
3436
|
+
6,
|
|
3437
|
+
0,
|
|
3438
|
+
475,
|
|
3380
3439
|
6,
|
|
3381
3440
|
110,
|
|
3382
3441
|
6,
|
|
@@ -3548,7 +3607,7 @@ function isKeyword(word) {
|
|
|
3548
3607
|
return keywords.has(word);
|
|
3549
3608
|
}
|
|
3550
3609
|
|
|
3551
|
-
//
|
|
3610
|
+
// ../babel-babel/packages/babel-helper-string-parser/lib/index.js
|
|
3552
3611
|
var _isDigit = function isDigit(code2) {
|
|
3553
3612
|
return code2 >= 48 && code2 <= 57;
|
|
3554
3613
|
};
|
|
@@ -3903,7 +3962,7 @@ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
|
|
|
3903
3962
|
};
|
|
3904
3963
|
}
|
|
3905
3964
|
|
|
3906
|
-
//
|
|
3965
|
+
// ../babel-babel/packages/babel-types/lib/index.js
|
|
3907
3966
|
function shallowEqual(actual, expected) {
|
|
3908
3967
|
const keys2 = Object.keys(expected);
|
|
3909
3968
|
|
|
@@ -5725,26 +5784,6 @@ function isExportDefaultSpecifier(node, opts) {
|
|
|
5725
5784
|
return opts == null || shallowEqual(node, opts);
|
|
5726
5785
|
}
|
|
5727
5786
|
|
|
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
5787
|
function isModuleExpression(node, opts) {
|
|
5749
5788
|
if (!node)
|
|
5750
5789
|
return false;
|
|
@@ -6646,8 +6685,6 @@ function isExpression(node, opts) {
|
|
|
6646
6685
|
case 'JSXFragment':
|
|
6647
6686
|
case 'BindExpression':
|
|
6648
6687
|
case 'DoExpression':
|
|
6649
|
-
case 'RecordExpression':
|
|
6650
|
-
case 'TupleExpression':
|
|
6651
6688
|
case 'ModuleExpression':
|
|
6652
6689
|
case 'TopicReference':
|
|
6653
6690
|
case 'PipelineTopicExpression':
|
|
@@ -8073,6 +8110,7 @@ var NODE_FIELDS$1 = {};
|
|
|
8073
8110
|
var BUILDER_KEYS = {};
|
|
8074
8111
|
var DEPRECATED_KEYS = {};
|
|
8075
8112
|
var NODE_PARENT_VALIDATIONS = {};
|
|
8113
|
+
var NODE_UNION_SHAPES__PRIVATE = {};
|
|
8076
8114
|
|
|
8077
8115
|
function getType(val) {
|
|
8078
8116
|
if (Array.isArray(val)) {
|
|
@@ -8311,6 +8349,7 @@ var validTypeOpts = /* @__PURE__ */new Set([
|
|
|
8311
8349
|
'inherits',
|
|
8312
8350
|
'visitor',
|
|
8313
8351
|
'validate',
|
|
8352
|
+
'unionShape',
|
|
8314
8353
|
]);
|
|
8315
8354
|
var validFieldKeys = /* @__PURE__ */new Set([
|
|
8316
8355
|
'default',
|
|
@@ -8424,6 +8463,10 @@ function defineType$5(type, opts = {}) {
|
|
|
8424
8463
|
NODE_PARENT_VALIDATIONS[type] = opts.validate;
|
|
8425
8464
|
}
|
|
8426
8465
|
|
|
8466
|
+
if (opts.unionShape) {
|
|
8467
|
+
NODE_UNION_SHAPES__PRIVATE[type] = opts.unionShape;
|
|
8468
|
+
}
|
|
8469
|
+
|
|
8427
8470
|
store[type] = opts;
|
|
8428
8471
|
}
|
|
8429
8472
|
|
|
@@ -8435,6 +8478,7 @@ var utils = /* @__PURE__ */Object.freeze({
|
|
|
8435
8478
|
FLIPPED_ALIAS_KEYS,
|
|
8436
8479
|
NODE_FIELDS: NODE_FIELDS$1,
|
|
8437
8480
|
NODE_PARENT_VALIDATIONS,
|
|
8481
|
+
NODE_UNION_SHAPES__PRIVATE,
|
|
8438
8482
|
VISITOR_KEYS,
|
|
8439
8483
|
allExpandedTypes,
|
|
8440
8484
|
arrayOf,
|
|
@@ -8456,6 +8500,29 @@ var utils = /* @__PURE__ */Object.freeze({
|
|
|
8456
8500
|
validateType,
|
|
8457
8501
|
});
|
|
8458
8502
|
|
|
8503
|
+
var classMethodOrPropertyUnionShapeCommon = (allowPrivateName = false) => ({
|
|
8504
|
+
unionShape: {
|
|
8505
|
+
discriminator: 'computed',
|
|
8506
|
+
shapes: [{
|
|
8507
|
+
name: 'computed',
|
|
8508
|
+
value: [true],
|
|
8509
|
+
properties: {
|
|
8510
|
+
key: {
|
|
8511
|
+
validate: assertNodeType('Expression'),
|
|
8512
|
+
},
|
|
8513
|
+
},
|
|
8514
|
+
}, {
|
|
8515
|
+
name: 'nonComputed',
|
|
8516
|
+
value: [false],
|
|
8517
|
+
properties: {
|
|
8518
|
+
key: {
|
|
8519
|
+
validate: allowPrivateName ? assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName') : assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral'),
|
|
8520
|
+
},
|
|
8521
|
+
},
|
|
8522
|
+
}],
|
|
8523
|
+
},
|
|
8524
|
+
});
|
|
8525
|
+
|
|
8459
8526
|
var defineType$4 = defineAliasedType('Standardized');
|
|
8460
8527
|
|
|
8461
8528
|
defineType$4('ArrayExpression', {
|
|
@@ -9098,6 +9165,26 @@ defineType$4('MemberExpression', {
|
|
|
9098
9165
|
'LVal',
|
|
9099
9166
|
'PatternLike',
|
|
9100
9167
|
],
|
|
9168
|
+
unionShape: {
|
|
9169
|
+
discriminator: 'computed',
|
|
9170
|
+
shapes: [{
|
|
9171
|
+
name: 'computed',
|
|
9172
|
+
value: [true],
|
|
9173
|
+
properties: {
|
|
9174
|
+
property: {
|
|
9175
|
+
validate: assertNodeType('Expression'),
|
|
9176
|
+
},
|
|
9177
|
+
},
|
|
9178
|
+
}, {
|
|
9179
|
+
name: 'nonComputed',
|
|
9180
|
+
value: [false],
|
|
9181
|
+
properties: {
|
|
9182
|
+
property: {
|
|
9183
|
+
validate: assertNodeType('Identifier', 'PrivateName'),
|
|
9184
|
+
},
|
|
9185
|
+
},
|
|
9186
|
+
}],
|
|
9187
|
+
},
|
|
9101
9188
|
fields: Object.assign({
|
|
9102
9189
|
object: {
|
|
9103
9190
|
validate: assertNodeType('Expression', 'Super'),
|
|
@@ -9164,7 +9251,7 @@ defineType$4('ObjectExpression', {
|
|
|
9164
9251
|
properties: validateArrayOfType('ObjectMethod', 'ObjectProperty', 'SpreadElement'),
|
|
9165
9252
|
},
|
|
9166
9253
|
});
|
|
9167
|
-
defineType$4('ObjectMethod', {
|
|
9254
|
+
defineType$4('ObjectMethod', Object.assign({
|
|
9168
9255
|
builder: [
|
|
9169
9256
|
'kind',
|
|
9170
9257
|
'key',
|
|
@@ -9182,6 +9269,7 @@ defineType$4('ObjectMethod', {
|
|
|
9182
9269
|
'returnType',
|
|
9183
9270
|
'body',
|
|
9184
9271
|
],
|
|
9272
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
9185
9273
|
fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
|
|
9186
9274
|
kind: Object.assign({
|
|
9187
9275
|
validate: assertOneOf('method', 'get', 'set'),
|
|
@@ -9225,7 +9313,7 @@ defineType$4('ObjectMethod', {
|
|
|
9225
9313
|
'Method',
|
|
9226
9314
|
'ObjectMember',
|
|
9227
9315
|
],
|
|
9228
|
-
});
|
|
9316
|
+
}));
|
|
9229
9317
|
defineType$4('ObjectProperty', {
|
|
9230
9318
|
builder: [
|
|
9231
9319
|
'key',
|
|
@@ -9234,6 +9322,26 @@ defineType$4('ObjectProperty', {
|
|
|
9234
9322
|
'shorthand',
|
|
9235
9323
|
...[],
|
|
9236
9324
|
],
|
|
9325
|
+
unionShape: {
|
|
9326
|
+
discriminator: 'computed',
|
|
9327
|
+
shapes: [{
|
|
9328
|
+
name: 'computed',
|
|
9329
|
+
value: [true],
|
|
9330
|
+
properties: {
|
|
9331
|
+
key: {
|
|
9332
|
+
validate: assertNodeType('Expression'),
|
|
9333
|
+
},
|
|
9334
|
+
},
|
|
9335
|
+
}, {
|
|
9336
|
+
name: 'nonComputed',
|
|
9337
|
+
value: [false],
|
|
9338
|
+
properties: {
|
|
9339
|
+
key: {
|
|
9340
|
+
validate: assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName'),
|
|
9341
|
+
},
|
|
9342
|
+
},
|
|
9343
|
+
}],
|
|
9344
|
+
},
|
|
9237
9345
|
fields: {
|
|
9238
9346
|
computed: {
|
|
9239
9347
|
default: false,
|
|
@@ -10097,7 +10205,7 @@ var classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(),
|
|
|
10097
10205
|
},
|
|
10098
10206
|
});
|
|
10099
10207
|
|
|
10100
|
-
defineType$4('ClassMethod', {
|
|
10208
|
+
defineType$4('ClassMethod', Object.assign({
|
|
10101
10209
|
aliases: [
|
|
10102
10210
|
'Function',
|
|
10103
10211
|
'Scopable',
|
|
@@ -10123,12 +10231,13 @@ defineType$4('ClassMethod', {
|
|
|
10123
10231
|
'returnType',
|
|
10124
10232
|
'body',
|
|
10125
10233
|
],
|
|
10234
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
10126
10235
|
fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), {
|
|
10127
10236
|
body: {
|
|
10128
10237
|
validate: assertNodeType('BlockStatement'),
|
|
10129
10238
|
},
|
|
10130
10239
|
}),
|
|
10131
|
-
});
|
|
10240
|
+
}));
|
|
10132
10241
|
defineType$4('ObjectPattern', {
|
|
10133
10242
|
visitor: [
|
|
10134
10243
|
'decorators',
|
|
@@ -10356,7 +10465,7 @@ defineType$4('OptionalCallExpression', {
|
|
|
10356
10465
|
},
|
|
10357
10466
|
}, {}),
|
|
10358
10467
|
});
|
|
10359
|
-
defineType$4('ClassProperty', {
|
|
10468
|
+
defineType$4('ClassProperty', Object.assign({
|
|
10360
10469
|
visitor: [
|
|
10361
10470
|
'decorators',
|
|
10362
10471
|
'variance',
|
|
@@ -10373,6 +10482,7 @@ defineType$4('ClassProperty', {
|
|
|
10373
10482
|
'static',
|
|
10374
10483
|
],
|
|
10375
10484
|
aliases: ['Property'],
|
|
10485
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
10376
10486
|
fields: Object.assign({}, classMethodOrPropertyCommon(), {
|
|
10377
10487
|
value: {
|
|
10378
10488
|
validate: assertNodeType('Expression'),
|
|
@@ -10403,8 +10513,8 @@ defineType$4('ClassProperty', {
|
|
|
10403
10513
|
optional: true,
|
|
10404
10514
|
},
|
|
10405
10515
|
}),
|
|
10406
|
-
});
|
|
10407
|
-
defineType$4('ClassAccessorProperty', {
|
|
10516
|
+
}));
|
|
10517
|
+
defineType$4('ClassAccessorProperty', Object.assign({
|
|
10408
10518
|
visitor: [
|
|
10409
10519
|
'decorators',
|
|
10410
10520
|
'key',
|
|
@@ -10420,6 +10530,7 @@ defineType$4('ClassAccessorProperty', {
|
|
|
10420
10530
|
'static',
|
|
10421
10531
|
],
|
|
10422
10532
|
aliases: ['Property', 'Accessor'],
|
|
10533
|
+
}, classMethodOrPropertyUnionShapeCommon(true), {
|
|
10423
10534
|
fields: Object.assign({}, classMethodOrPropertyCommon(), {
|
|
10424
10535
|
key: {
|
|
10425
10536
|
validate: chain((function() {
|
|
@@ -10461,7 +10572,7 @@ defineType$4('ClassAccessorProperty', {
|
|
|
10461
10572
|
optional: true,
|
|
10462
10573
|
},
|
|
10463
10574
|
}),
|
|
10464
|
-
});
|
|
10575
|
+
}));
|
|
10465
10576
|
defineType$4('ClassPrivateProperty', {
|
|
10466
10577
|
visitor: [
|
|
10467
10578
|
'decorators',
|
|
@@ -11470,23 +11581,6 @@ defineType$5('ExportDefaultSpecifier', {
|
|
|
11470
11581
|
},
|
|
11471
11582
|
},
|
|
11472
11583
|
});
|
|
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
11584
|
defineType$5('ModuleExpression', {
|
|
11491
11585
|
visitor: ['body'],
|
|
11492
11586
|
fields: {
|
|
@@ -11578,7 +11672,7 @@ defineType('TSDeclareFunction', {
|
|
|
11578
11672
|
],
|
|
11579
11673
|
fields: Object.assign({}, functionDeclarationCommon(), tSFunctionTypeAnnotationCommon()),
|
|
11580
11674
|
});
|
|
11581
|
-
defineType('TSDeclareMethod', {
|
|
11675
|
+
defineType('TSDeclareMethod', Object.assign({
|
|
11582
11676
|
visitor: [
|
|
11583
11677
|
'decorators',
|
|
11584
11678
|
'key',
|
|
@@ -11586,8 +11680,9 @@ defineType('TSDeclareMethod', {
|
|
|
11586
11680
|
'params',
|
|
11587
11681
|
'returnType',
|
|
11588
11682
|
],
|
|
11683
|
+
}, classMethodOrPropertyUnionShapeCommon(), {
|
|
11589
11684
|
fields: Object.assign({}, classMethodOrDeclareMethodCommon(), tSFunctionTypeAnnotationCommon()),
|
|
11590
|
-
});
|
|
11685
|
+
}));
|
|
11591
11686
|
defineType('TSQualifiedName', {
|
|
11592
11687
|
aliases: ['TSEntityName'],
|
|
11593
11688
|
visitor: ['left', 'right'],
|
|
@@ -11898,14 +11993,14 @@ defineType('TSLiteralType', {
|
|
|
11898
11993
|
const unaryOperator = assertOneOf('-');
|
|
11899
11994
|
const literal = assertNodeType('NumericLiteral', 'StringLiteral', 'BooleanLiteral', 'BigIntLiteral', 'TemplateLiteral');
|
|
11900
11995
|
|
|
11901
|
-
function
|
|
11996
|
+
const validator = function validator2(parent, key, node) {
|
|
11902
11997
|
if (is('UnaryExpression', node)) {
|
|
11903
11998
|
unaryOperator(node, 'operator', node.operator);
|
|
11904
11999
|
unaryExpression3(node, 'argument', node.argument);
|
|
11905
12000
|
} else {
|
|
11906
12001
|
literal(parent, key, node);
|
|
11907
12002
|
}
|
|
11908
|
-
}
|
|
12003
|
+
};
|
|
11909
12004
|
|
|
11910
12005
|
validator.oneOfNodeTypes = [
|
|
11911
12006
|
'NumericLiteral',
|
|
@@ -14467,28 +14562,6 @@ function exportDefaultSpecifier(exported) {
|
|
|
14467
14562
|
return node;
|
|
14468
14563
|
}
|
|
14469
14564
|
|
|
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
14565
|
function moduleExpression(body) {
|
|
14493
14566
|
const node = {
|
|
14494
14567
|
type: 'ModuleExpression',
|
|
@@ -15494,7 +15567,6 @@ var b = /* @__PURE__ */Object.freeze({
|
|
|
15494
15567
|
privateName,
|
|
15495
15568
|
program,
|
|
15496
15569
|
qualifiedTypeIdentifier,
|
|
15497
|
-
recordExpression,
|
|
15498
15570
|
regExpLiteral,
|
|
15499
15571
|
regexLiteral: RegexLiteral,
|
|
15500
15572
|
restElement,
|
|
@@ -15587,7 +15659,6 @@ var b = /* @__PURE__ */Object.freeze({
|
|
|
15587
15659
|
tsUnionType,
|
|
15588
15660
|
tsUnknownKeyword,
|
|
15589
15661
|
tsVoidKeyword,
|
|
15590
|
-
tupleExpression,
|
|
15591
15662
|
tupleTypeAnnotation,
|
|
15592
15663
|
typeAlias,
|
|
15593
15664
|
typeAnnotation,
|
|
@@ -15795,8 +15866,6 @@ var BindExpression = alias('bindExpression');
|
|
|
15795
15866
|
var Decorator = alias('decorator');
|
|
15796
15867
|
var DoExpression = alias('doExpression');
|
|
15797
15868
|
var ExportDefaultSpecifier = alias('exportDefaultSpecifier');
|
|
15798
|
-
var RecordExpression = alias('recordExpression');
|
|
15799
|
-
var TupleExpression = alias('tupleExpression');
|
|
15800
15869
|
var ModuleExpression = alias('moduleExpression');
|
|
15801
15870
|
var TopicReference = alias('topicReference');
|
|
15802
15871
|
var PipelineTopicExpression = alias('pipelineTopicExpression');
|
|
@@ -16656,14 +16725,6 @@ function assertExportDefaultSpecifier(node, opts) {
|
|
|
16656
16725
|
assert('ExportDefaultSpecifier', node, opts);
|
|
16657
16726
|
}
|
|
16658
16727
|
|
|
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
16728
|
function assertModuleExpression(node, opts) {
|
|
16668
16729
|
assert('ModuleExpression', node, opts);
|
|
16669
16730
|
}
|
|
@@ -18460,7 +18521,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
18460
18521
|
return !!parent.computed;
|
|
18461
18522
|
}
|
|
18462
18523
|
|
|
18463
|
-
return
|
|
18524
|
+
return grandparent?.type !== 'ObjectPattern';
|
|
18464
18525
|
|
|
18465
18526
|
case 'ClassProperty':
|
|
18466
18527
|
case 'ClassAccessorProperty':
|
|
@@ -18607,7 +18668,7 @@ var react = {
|
|
|
18607
18668
|
buildChildren,
|
|
18608
18669
|
};
|
|
18609
18670
|
|
|
18610
|
-
//
|
|
18671
|
+
// ../babel-babel/packages/babel-parser/lib/index.js
|
|
18611
18672
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
18612
18673
|
if (null == r)
|
|
18613
18674
|
return {};
|
|
@@ -18996,7 +19057,7 @@ function createDefaultOptions() {
|
|
|
18996
19057
|
allowUndeclaredExports: false,
|
|
18997
19058
|
allowYieldOutsideFunction: false,
|
|
18998
19059
|
plugins: [],
|
|
18999
|
-
strictMode:
|
|
19060
|
+
strictMode: void 0,
|
|
19000
19061
|
ranges: false,
|
|
19001
19062
|
tokens: false,
|
|
19002
19063
|
createImportExpressions: true,
|
|
@@ -19225,8 +19286,6 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
|
|
|
19225
19286
|
|
|
19226
19287
|
convertPrivateNameToPrivateIdentifier(node) {
|
|
19227
19288
|
const name = super.getPrivateNameSV(node);
|
|
19228
|
-
|
|
19229
|
-
node = node;
|
|
19230
19289
|
delete node.id;
|
|
19231
19290
|
node.name = name;
|
|
19232
19291
|
return this.castNodeTo(node, 'PrivateIdentifier');
|
|
@@ -19356,8 +19415,8 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
|
|
|
19356
19415
|
return this.finishNode(node, 'Property');
|
|
19357
19416
|
}
|
|
19358
19417
|
|
|
19359
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
19360
|
-
return type === 'Property' ? 'value' : super.isValidLVal(type, isUnparenthesizedInAssign, binding);
|
|
19418
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
19419
|
+
return type === 'Property' ? 'value' : super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
19361
19420
|
}
|
|
19362
19421
|
|
|
19363
19422
|
isAssignable(node, isBinding3) {
|
|
@@ -20109,8 +20168,8 @@ function getExportedToken(token) {
|
|
|
20109
20168
|
return tokenTypes[token];
|
|
20110
20169
|
}
|
|
20111
20170
|
|
|
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-\
|
|
20171
|
+
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';
|
|
20172
|
+
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
20173
|
var nonASCIIidentifierStart2 = new RegExp('[' + nonASCIIidentifierStartChars2 + ']');
|
|
20115
20174
|
var nonASCIIidentifier2 = new RegExp('[' + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + ']');
|
|
20116
20175
|
|
|
@@ -20215,7 +20274,9 @@ var astralIdentifierStartCodes2 = [
|
|
|
20215
20274
|
21,
|
|
20216
20275
|
11,
|
|
20217
20276
|
25,
|
|
20218
|
-
|
|
20277
|
+
7,
|
|
20278
|
+
25,
|
|
20279
|
+
39,
|
|
20219
20280
|
55,
|
|
20220
20281
|
7,
|
|
20221
20282
|
1,
|
|
@@ -20260,8 +20321,8 @@ var astralIdentifierStartCodes2 = [
|
|
|
20260
20321
|
7,
|
|
20261
20322
|
1,
|
|
20262
20323
|
17,
|
|
20263
|
-
|
|
20264
|
-
|
|
20324
|
+
5,
|
|
20325
|
+
57,
|
|
20265
20326
|
28,
|
|
20266
20327
|
11,
|
|
20267
20328
|
0,
|
|
@@ -20445,7 +20506,9 @@ var astralIdentifierStartCodes2 = [
|
|
|
20445
20506
|
31,
|
|
20446
20507
|
15,
|
|
20447
20508
|
0,
|
|
20448
|
-
|
|
20509
|
+
24,
|
|
20510
|
+
43,
|
|
20511
|
+
261,
|
|
20449
20512
|
18,
|
|
20450
20513
|
16,
|
|
20451
20514
|
0,
|
|
@@ -20493,7 +20556,11 @@ var astralIdentifierStartCodes2 = [
|
|
|
20493
20556
|
44,
|
|
20494
20557
|
212,
|
|
20495
20558
|
63,
|
|
20496
|
-
|
|
20559
|
+
33,
|
|
20560
|
+
24,
|
|
20561
|
+
3,
|
|
20562
|
+
24,
|
|
20563
|
+
45,
|
|
20497
20564
|
74,
|
|
20498
20565
|
6,
|
|
20499
20566
|
0,
|
|
@@ -20503,13 +20570,15 @@ var astralIdentifierStartCodes2 = [
|
|
|
20503
20570
|
1,
|
|
20504
20571
|
2,
|
|
20505
20572
|
0,
|
|
20506
|
-
|
|
20507
|
-
|
|
20508
|
-
|
|
20509
|
-
|
|
20573
|
+
15,
|
|
20574
|
+
4,
|
|
20575
|
+
10,
|
|
20576
|
+
7381,
|
|
20510
20577
|
42,
|
|
20511
|
-
|
|
20512
|
-
|
|
20578
|
+
31,
|
|
20579
|
+
98,
|
|
20580
|
+
114,
|
|
20581
|
+
8702,
|
|
20513
20582
|
3,
|
|
20514
20583
|
2,
|
|
20515
20584
|
6,
|
|
@@ -20617,7 +20686,19 @@ var astralIdentifierStartCodes2 = [
|
|
|
20617
20686
|
29,
|
|
20618
20687
|
3,
|
|
20619
20688
|
0,
|
|
20620
|
-
|
|
20689
|
+
208,
|
|
20690
|
+
30,
|
|
20691
|
+
2,
|
|
20692
|
+
2,
|
|
20693
|
+
2,
|
|
20694
|
+
1,
|
|
20695
|
+
2,
|
|
20696
|
+
6,
|
|
20697
|
+
3,
|
|
20698
|
+
4,
|
|
20699
|
+
10,
|
|
20700
|
+
1,
|
|
20701
|
+
225,
|
|
20621
20702
|
6,
|
|
20622
20703
|
2,
|
|
20623
20704
|
3,
|
|
@@ -20700,12 +20781,10 @@ var astralIdentifierStartCodes2 = [
|
|
|
20700
20781
|
4421,
|
|
20701
20782
|
42719,
|
|
20702
20783
|
33,
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20784
|
+
4381,
|
|
20785
|
+
3,
|
|
20786
|
+
5773,
|
|
20706
20787
|
3,
|
|
20707
|
-
5761,
|
|
20708
|
-
15,
|
|
20709
20788
|
7472,
|
|
20710
20789
|
16,
|
|
20711
20790
|
621,
|
|
@@ -20714,7 +20793,7 @@ var astralIdentifierStartCodes2 = [
|
|
|
20714
20793
|
1507,
|
|
20715
20794
|
4938,
|
|
20716
20795
|
6,
|
|
20717
|
-
|
|
20796
|
+
8489,
|
|
20718
20797
|
];
|
|
20719
20798
|
var astralIdentifierCodes2 = [
|
|
20720
20799
|
509,
|
|
@@ -20747,8 +20826,8 @@ var astralIdentifierCodes2 = [
|
|
|
20747
20826
|
4,
|
|
20748
20827
|
318,
|
|
20749
20828
|
1,
|
|
20750
|
-
|
|
20751
|
-
|
|
20829
|
+
78,
|
|
20830
|
+
5,
|
|
20752
20831
|
71,
|
|
20753
20832
|
10,
|
|
20754
20833
|
50,
|
|
@@ -20893,7 +20972,9 @@ var astralIdentifierCodes2 = [
|
|
|
20893
20972
|
10,
|
|
20894
20973
|
47,
|
|
20895
20974
|
15,
|
|
20896
|
-
|
|
20975
|
+
199,
|
|
20976
|
+
7,
|
|
20977
|
+
137,
|
|
20897
20978
|
9,
|
|
20898
20979
|
54,
|
|
20899
20980
|
7,
|
|
@@ -20925,7 +21006,9 @@ var astralIdentifierCodes2 = [
|
|
|
20925
21006
|
4,
|
|
20926
21007
|
9,
|
|
20927
21008
|
9,
|
|
20928
|
-
|
|
21009
|
+
55,
|
|
21010
|
+
9,
|
|
21011
|
+
266,
|
|
20929
21012
|
3,
|
|
20930
21013
|
10,
|
|
20931
21014
|
1,
|
|
@@ -21025,7 +21108,15 @@ var astralIdentifierCodes2 = [
|
|
|
21025
21108
|
1,
|
|
21026
21109
|
2,
|
|
21027
21110
|
9,
|
|
21028
|
-
|
|
21111
|
+
233,
|
|
21112
|
+
0,
|
|
21113
|
+
3,
|
|
21114
|
+
0,
|
|
21115
|
+
8,
|
|
21116
|
+
1,
|
|
21117
|
+
6,
|
|
21118
|
+
0,
|
|
21119
|
+
475,
|
|
21029
21120
|
6,
|
|
21030
21121
|
110,
|
|
21031
21122
|
6,
|
|
@@ -21388,7 +21479,7 @@ var ScopeHandler = class {
|
|
|
21388
21479
|
return scope2.names.has(name);
|
|
21389
21480
|
}
|
|
21390
21481
|
|
|
21391
|
-
const type = scope2.names.get(name);
|
|
21482
|
+
const type = scope2.names.get(name) || 0;
|
|
21392
21483
|
|
|
21393
21484
|
if (bindingType & 16) {
|
|
21394
21485
|
return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope2) && (type & 1) > 0;
|
|
@@ -22199,7 +22290,7 @@ var jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
22199
22290
|
let closingElement = null;
|
|
22200
22291
|
|
|
22201
22292
|
if (!openingElement.selfClosing) {
|
|
22202
|
-
contents:
|
|
22293
|
+
contents: for (;;) {
|
|
22203
22294
|
switch(this.state.type) {
|
|
22204
22295
|
case 143:
|
|
22205
22296
|
startLoc = this.state.startLoc;
|
|
@@ -22691,7 +22782,8 @@ var CommentsParser = class extends BaseParser {
|
|
|
22691
22782
|
setLeadingComments(commentWS.trailingNode, comments);
|
|
22692
22783
|
}
|
|
22693
22784
|
} else {
|
|
22694
|
-
const
|
|
22785
|
+
const node = commentWS.containingNode;
|
|
22786
|
+
const commentStart = commentWS.start;
|
|
22695
22787
|
|
|
22696
22788
|
if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
|
|
22697
22789
|
switch(node.type) {
|
|
@@ -25105,6 +25197,11 @@ var UtilParser = class extends Tokenizer {
|
|
|
25105
25197
|
scopeFlags |= 512;
|
|
25106
25198
|
}
|
|
25107
25199
|
|
|
25200
|
+
{
|
|
25201
|
+
if (this.optionFlags & 16) {
|
|
25202
|
+
scopeFlags |= 16 | 32;
|
|
25203
|
+
}
|
|
25204
|
+
}
|
|
25108
25205
|
this.scope.enter(scopeFlags);
|
|
25109
25206
|
}
|
|
25110
25207
|
|
|
@@ -25264,7 +25361,7 @@ var LValParser = class extends NodeUtils {
|
|
|
25264
25361
|
if (isLHS) {
|
|
25265
25362
|
if (parenthesized.type === 'Identifier') {
|
|
25266
25363
|
this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node);
|
|
25267
|
-
} else if (parenthesized.type !== 'MemberExpression' && !this.isOptionalMemberExpression(parenthesized)) {
|
|
25364
|
+
} else if (parenthesized.type !== 'CallExpression' && parenthesized.type !== 'MemberExpression' && !this.isOptionalMemberExpression(parenthesized)) {
|
|
25268
25365
|
this.raise(Errors.InvalidParenthesizedAssignment, node);
|
|
25269
25366
|
}
|
|
25270
25367
|
} else {
|
|
@@ -25608,7 +25705,7 @@ var LValParser = class extends NodeUtils {
|
|
|
25608
25705
|
return this.finishNode(node, 'AssignmentPattern');
|
|
25609
25706
|
}
|
|
25610
25707
|
|
|
25611
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
25708
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
25612
25709
|
switch(type) {
|
|
25613
25710
|
case 'AssignmentPattern':
|
|
25614
25711
|
return 'left';
|
|
@@ -25630,6 +25727,11 @@ var LValParser = class extends NodeUtils {
|
|
|
25630
25727
|
|
|
25631
25728
|
case 'VoidPattern':
|
|
25632
25729
|
return true;
|
|
25730
|
+
|
|
25731
|
+
case 'CallExpression':
|
|
25732
|
+
if (!disallowCallExpression && !this.state.strict && this.optionFlags & 8192) {
|
|
25733
|
+
return true;
|
|
25734
|
+
}
|
|
25633
25735
|
}
|
|
25634
25736
|
|
|
25635
25737
|
return false;
|
|
@@ -25639,7 +25741,7 @@ var LValParser = class extends NodeUtils {
|
|
|
25639
25741
|
return expression2.type === 'OptionalMemberExpression';
|
|
25640
25742
|
}
|
|
25641
25743
|
|
|
25642
|
-
checkLVal(expression2, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) {
|
|
25744
|
+
checkLVal(expression2, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false, disallowCallExpression = false) {
|
|
25643
25745
|
const type = expression2.type;
|
|
25644
25746
|
|
|
25645
25747
|
if (this.isObjectMethod(expression2))
|
|
@@ -25682,7 +25784,9 @@ var LValParser = class extends NodeUtils {
|
|
|
25682
25784
|
this.raise(Errors.VoidPatternCatchClauseParam, expression2);
|
|
25683
25785
|
}
|
|
25684
25786
|
|
|
25685
|
-
const
|
|
25787
|
+
const unwrappedExpression = unwrapParenthesizedExpression(expression2);
|
|
25788
|
+
disallowCallExpression || (disallowCallExpression = unwrappedExpression.type === 'CallExpression' && (unwrappedExpression.callee.type === 'Import' || unwrappedExpression.callee.type === 'Super'));
|
|
25789
|
+
const validity = this.isValidLVal(type, disallowCallExpression, !(hasParenthesizedAncestor || expression2.extra?.parenthesized) && ancestor.type === 'AssignmentExpression', binding);
|
|
25686
25790
|
|
|
25687
25791
|
if (validity === true)
|
|
25688
25792
|
return;
|
|
@@ -25714,11 +25818,11 @@ var LValParser = class extends NodeUtils {
|
|
|
25714
25818
|
if (Array.isArray(val)) {
|
|
25715
25819
|
for (const child of val) {
|
|
25716
25820
|
if (child) {
|
|
25717
|
-
this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3);
|
|
25821
|
+
this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3, true);
|
|
25718
25822
|
}
|
|
25719
25823
|
}
|
|
25720
25824
|
} else if (val) {
|
|
25721
|
-
this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3);
|
|
25825
|
+
this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression3, disallowCallExpression);
|
|
25722
25826
|
}
|
|
25723
25827
|
}
|
|
25724
25828
|
|
|
@@ -25779,6 +25883,8 @@ var LValParser = class extends NodeUtils {
|
|
|
25779
25883
|
}
|
|
25780
25884
|
};
|
|
25781
25885
|
|
|
25886
|
+
var keywordAndTSRelationalOperator = /in(?:stanceof)?|as|satisfies/y;
|
|
25887
|
+
|
|
25782
25888
|
function nonNull(x) {
|
|
25783
25889
|
if (x == null) {
|
|
25784
25890
|
throw new Error(`Unexpected ${x} value.`);
|
|
@@ -26932,7 +27038,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
26932
27038
|
}
|
|
26933
27039
|
}
|
|
26934
27040
|
|
|
26935
|
-
this.unexpected();
|
|
27041
|
+
throw this.unexpected();
|
|
26936
27042
|
}
|
|
26937
27043
|
|
|
26938
27044
|
tsParseArrayTypeOrHigher() {
|
|
@@ -27647,59 +27753,26 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27647
27753
|
|
|
27648
27754
|
default:
|
|
27649
27755
|
if (tokenIsIdentifier(startType)) {
|
|
27650
|
-
return this.tsParseDeclaration(node, this.state.
|
|
27756
|
+
return this.tsParseDeclaration(node, this.state.type, true, null);
|
|
27651
27757
|
}
|
|
27652
27758
|
}
|
|
27653
27759
|
});
|
|
27654
27760
|
}
|
|
27655
27761
|
|
|
27656
27762
|
tsTryParseExportDeclaration() {
|
|
27657
|
-
return this.tsParseDeclaration(this.startNode(), this.state.
|
|
27763
|
+
return this.tsParseDeclaration(this.startNode(), this.state.type, true, null);
|
|
27658
27764
|
}
|
|
27659
27765
|
|
|
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':
|
|
27766
|
+
tsParseDeclaration(node, type, next, decorators) {
|
|
27767
|
+
switch(type) {
|
|
27768
|
+
case 124:
|
|
27696
27769
|
if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
|
|
27697
27770
|
return this.tsParseAbstractDeclaration(node, decorators);
|
|
27698
27771
|
}
|
|
27699
27772
|
|
|
27700
27773
|
break;
|
|
27701
27774
|
|
|
27702
|
-
case
|
|
27775
|
+
case 127:
|
|
27703
27776
|
if (this.tsCheckLineTerminator(next)) {
|
|
27704
27777
|
if (this.match(134)) {
|
|
27705
27778
|
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
@@ -27711,7 +27784,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27711
27784
|
|
|
27712
27785
|
break;
|
|
27713
27786
|
|
|
27714
|
-
case
|
|
27787
|
+
case 128:
|
|
27715
27788
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
27716
27789
|
node.kind = 'namespace';
|
|
27717
27790
|
return this.tsParseModuleOrNamespaceDeclaration(node);
|
|
@@ -27719,7 +27792,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27719
27792
|
|
|
27720
27793
|
break;
|
|
27721
27794
|
|
|
27722
|
-
case
|
|
27795
|
+
case 130:
|
|
27723
27796
|
if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
|
|
27724
27797
|
return this.tsParseTypeAliasDeclaration(node);
|
|
27725
27798
|
}
|
|
@@ -27922,8 +27995,8 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27922
27995
|
return exprList;
|
|
27923
27996
|
}
|
|
27924
27997
|
|
|
27925
|
-
parseArrayLike(close,
|
|
27926
|
-
const node = super.parseArrayLike(close,
|
|
27998
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
27999
|
+
const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
|
|
27927
28000
|
|
|
27928
28001
|
if (node.type === 'ArrayExpression') {
|
|
27929
28002
|
this.tsCheckForInvalidTypeCasts(node.elements);
|
|
@@ -28242,23 +28315,97 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28242
28315
|
}
|
|
28243
28316
|
|
|
28244
28317
|
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());
|
|
28318
|
+
if (!this.state.containsEsc) {
|
|
28319
|
+
switch(this.state.type) {
|
|
28320
|
+
case 75: {
|
|
28321
|
+
if (this.isLookaheadContextual('enum')) {
|
|
28322
|
+
const node = this.startNode();
|
|
28323
|
+
this.expect(75);
|
|
28324
|
+
return this.tsParseEnumDeclaration(node, {
|
|
28325
|
+
const: true,
|
|
28326
|
+
});
|
|
28327
|
+
}
|
|
28328
|
+
|
|
28329
|
+
break;
|
|
28330
|
+
}
|
|
28259
28331
|
|
|
28260
|
-
|
|
28261
|
-
|
|
28332
|
+
case 124:
|
|
28333
|
+
case 125: {
|
|
28334
|
+
if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
|
|
28335
|
+
const token = this.state.type;
|
|
28336
|
+
const node = this.startNode();
|
|
28337
|
+
this.next();
|
|
28338
|
+
const declaration = token === 125 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
|
|
28339
|
+
|
|
28340
|
+
if (declaration) {
|
|
28341
|
+
if (token === 125) {
|
|
28342
|
+
declaration.declare = true;
|
|
28343
|
+
}
|
|
28344
|
+
|
|
28345
|
+
return declaration;
|
|
28346
|
+
} else {
|
|
28347
|
+
node.expression = this.createIdentifier(this.startNodeAt(node.loc.start), token === 125 ? 'declare' : 'abstract');
|
|
28348
|
+
this.semicolon(false);
|
|
28349
|
+
return this.finishNode(node, 'ExpressionStatement');
|
|
28350
|
+
}
|
|
28351
|
+
}
|
|
28352
|
+
|
|
28353
|
+
break;
|
|
28354
|
+
}
|
|
28355
|
+
|
|
28356
|
+
case 126:
|
|
28357
|
+
return this.tsParseEnumDeclaration(this.startNode());
|
|
28358
|
+
|
|
28359
|
+
case 112: {
|
|
28360
|
+
const nextCh = this.lookaheadCharCode();
|
|
28361
|
+
|
|
28362
|
+
if (nextCh === 123) {
|
|
28363
|
+
const node = this.startNode();
|
|
28364
|
+
return this.tsParseAmbientExternalModuleDeclaration(node);
|
|
28365
|
+
}
|
|
28366
|
+
|
|
28367
|
+
break;
|
|
28368
|
+
}
|
|
28369
|
+
|
|
28370
|
+
case 129: {
|
|
28371
|
+
const result = this.tsParseInterfaceDeclaration(this.startNode());
|
|
28372
|
+
|
|
28373
|
+
if (result)
|
|
28374
|
+
return result;
|
|
28375
|
+
|
|
28376
|
+
break;
|
|
28377
|
+
}
|
|
28378
|
+
|
|
28379
|
+
case 127: {
|
|
28380
|
+
if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) {
|
|
28381
|
+
const node = this.startNode();
|
|
28382
|
+
this.next();
|
|
28383
|
+
return this.tsParseDeclaration(node, 127, false, decorators);
|
|
28384
|
+
}
|
|
28385
|
+
|
|
28386
|
+
break;
|
|
28387
|
+
}
|
|
28388
|
+
|
|
28389
|
+
case 128: {
|
|
28390
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
28391
|
+
const node = this.startNode();
|
|
28392
|
+
this.next();
|
|
28393
|
+
return this.tsParseDeclaration(node, 128, false, decorators);
|
|
28394
|
+
}
|
|
28395
|
+
|
|
28396
|
+
break;
|
|
28397
|
+
}
|
|
28398
|
+
|
|
28399
|
+
case 130: {
|
|
28400
|
+
if (this.nextTokenIsIdentifierOnSameLine()) {
|
|
28401
|
+
const node = this.startNode();
|
|
28402
|
+
this.next();
|
|
28403
|
+
return this.tsParseTypeAliasDeclaration(node);
|
|
28404
|
+
}
|
|
28405
|
+
|
|
28406
|
+
break;
|
|
28407
|
+
}
|
|
28408
|
+
}
|
|
28262
28409
|
}
|
|
28263
28410
|
|
|
28264
28411
|
return super.parseStatementContent(flags, decorators);
|
|
@@ -28377,11 +28524,6 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28377
28524
|
}
|
|
28378
28525
|
}
|
|
28379
28526
|
|
|
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
28527
|
shouldParseExportDeclaration() {
|
|
28386
28528
|
if (this.tsIsDeclarationStart())
|
|
28387
28529
|
return true;
|
|
@@ -28839,7 +28981,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28839
28981
|
}
|
|
28840
28982
|
}
|
|
28841
28983
|
|
|
28842
|
-
isValidLVal(type, isUnparenthesizedInAssign, binding) {
|
|
28984
|
+
isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
|
|
28843
28985
|
switch(type) {
|
|
28844
28986
|
case 'TSTypeCastExpression':
|
|
28845
28987
|
return true;
|
|
@@ -28859,7 +29001,7 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28859
29001
|
];
|
|
28860
29002
|
|
|
28861
29003
|
default:
|
|
28862
|
-
return super.isValidLVal(type, isUnparenthesizedInAssign, binding);
|
|
29004
|
+
return super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
|
|
28863
29005
|
}
|
|
28864
29006
|
}
|
|
28865
29007
|
|
|
@@ -29061,10 +29203,12 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
29061
29203
|
node.abstract = true;
|
|
29062
29204
|
this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
|
|
29063
29205
|
return this.tsParseInterfaceDeclaration(node);
|
|
29206
|
+
} else {
|
|
29207
|
+
return null;
|
|
29064
29208
|
}
|
|
29065
|
-
} else {
|
|
29066
|
-
this.unexpected(null, 80);
|
|
29067
29209
|
}
|
|
29210
|
+
|
|
29211
|
+
throw this.unexpected(null, 80);
|
|
29068
29212
|
}
|
|
29069
29213
|
|
|
29070
29214
|
parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
|
|
@@ -29330,6 +29474,40 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
29330
29474
|
return;
|
|
29331
29475
|
}
|
|
29332
29476
|
}
|
|
29477
|
+
|
|
29478
|
+
chStartsBindingIdentifierAndNotRelationalOperator(ch, pos) {
|
|
29479
|
+
if (isIdentifierStart2(ch)) {
|
|
29480
|
+
keywordAndTSRelationalOperator.lastIndex = pos;
|
|
29481
|
+
|
|
29482
|
+
if (keywordAndTSRelationalOperator.test(this.input)) {
|
|
29483
|
+
const endCh = this.codePointAtPos(keywordAndTSRelationalOperator.lastIndex);
|
|
29484
|
+
|
|
29485
|
+
if (!isIdentifierChar2(endCh) && endCh !== 92) {
|
|
29486
|
+
return false;
|
|
29487
|
+
}
|
|
29488
|
+
}
|
|
29489
|
+
|
|
29490
|
+
return true;
|
|
29491
|
+
} else if (ch === 92) {
|
|
29492
|
+
return true;
|
|
29493
|
+
} else {
|
|
29494
|
+
return false;
|
|
29495
|
+
}
|
|
29496
|
+
}
|
|
29497
|
+
|
|
29498
|
+
nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() {
|
|
29499
|
+
const next = this.nextTokenInLineStart();
|
|
29500
|
+
const nextCh = this.codePointAtPos(next);
|
|
29501
|
+
|
|
29502
|
+
return this.chStartsBindingIdentifierAndNotRelationalOperator(nextCh, next);
|
|
29503
|
+
}
|
|
29504
|
+
|
|
29505
|
+
nextTokenIsIdentifierOrStringLiteralOnSameLine() {
|
|
29506
|
+
const next = this.nextTokenInLineStart();
|
|
29507
|
+
const nextCh = this.codePointAtPos(next);
|
|
29508
|
+
|
|
29509
|
+
return this.chStartsBindingIdentifier(nextCh, next) || nextCh === 34 || nextCh === 39;
|
|
29510
|
+
}
|
|
29333
29511
|
};
|
|
29334
29512
|
|
|
29335
29513
|
function isPossiblyLiteralEnum(expression2) {
|
|
@@ -29485,8 +29663,8 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
29485
29663
|
return this.parsePlaceholder('Pattern') || super.parseBindingAtom();
|
|
29486
29664
|
}
|
|
29487
29665
|
|
|
29488
|
-
isValidLVal(type, isParenthesized, binding) {
|
|
29489
|
-
return type === 'Placeholder' || super.isValidLVal(type, isParenthesized, binding);
|
|
29666
|
+
isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
|
|
29667
|
+
return type === 'Placeholder' || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
|
|
29490
29668
|
}
|
|
29491
29669
|
|
|
29492
29670
|
toAssignable(node, isLHS) {
|
|
@@ -29512,7 +29690,7 @@ var placeholders = (superClass) => class PlaceholdersParserMixin extends superCl
|
|
|
29512
29690
|
}
|
|
29513
29691
|
|
|
29514
29692
|
verifyBreakContinue(node, isBreak) {
|
|
29515
|
-
if (node.label
|
|
29693
|
+
if (node.label?.type === 'Placeholder')
|
|
29516
29694
|
return;
|
|
29517
29695
|
|
|
29518
29696
|
super.verifyBreakContinue(node, isBreak);
|
|
@@ -30000,7 +30178,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
30000
30178
|
|
|
30001
30179
|
this.next();
|
|
30002
30180
|
node.right = this.parseMaybeAssign();
|
|
30003
|
-
this.checkLVal(left, this.finishNode(node, 'AssignmentExpression'));
|
|
30181
|
+
this.checkLVal(left, this.finishNode(node, 'AssignmentExpression'), void 0, void 0, void 0, void 0, operator === '||=' || operator === '&&=' || operator === '??=');
|
|
30004
30182
|
return node;
|
|
30005
30183
|
} else if (ownExpressionErrors) {
|
|
30006
30184
|
this.checkExpressionErrors(refExpressionErrors, true);
|
|
@@ -30589,7 +30767,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
30589
30767
|
}
|
|
30590
30768
|
|
|
30591
30769
|
case 0: {
|
|
30592
|
-
return this.parseArrayLike(3,
|
|
30770
|
+
return this.parseArrayLike(3, false, refExpressionErrors);
|
|
30593
30771
|
}
|
|
30594
30772
|
|
|
30595
30773
|
case 5: {
|
|
@@ -30654,20 +30832,17 @@ var ExpressionParser = class extends LValParser {
|
|
|
30654
30832
|
return this.parseTopicReference(pipeProposal);
|
|
30655
30833
|
}
|
|
30656
30834
|
|
|
30657
|
-
this.unexpected();
|
|
30658
|
-
break;
|
|
30835
|
+
throw this.unexpected();
|
|
30659
30836
|
}
|
|
30660
30837
|
|
|
30661
30838
|
case 47: {
|
|
30662
30839
|
const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
|
|
30663
30840
|
|
|
30664
30841
|
if (isIdentifierStart2(lookaheadCh) || lookaheadCh === 62) {
|
|
30665
|
-
this.expectOnePlugin(['jsx', 'flow', 'typescript']);
|
|
30666
|
-
} else {
|
|
30667
|
-
this.unexpected();
|
|
30842
|
+
throw this.expectOnePlugin(['jsx', 'flow', 'typescript']);
|
|
30668
30843
|
}
|
|
30669
30844
|
|
|
30670
|
-
|
|
30845
|
+
throw this.unexpected();
|
|
30671
30846
|
}
|
|
30672
30847
|
|
|
30673
30848
|
default:
|
|
@@ -30707,7 +30882,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
30707
30882
|
|
|
30708
30883
|
return id;
|
|
30709
30884
|
} else {
|
|
30710
|
-
this.unexpected();
|
|
30885
|
+
throw this.unexpected();
|
|
30711
30886
|
}
|
|
30712
30887
|
}
|
|
30713
30888
|
}
|
|
@@ -30722,9 +30897,9 @@ var ExpressionParser = class extends LValParser {
|
|
|
30722
30897
|
this.state.end--;
|
|
30723
30898
|
this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
|
|
30724
30899
|
return this.parseTopicReference(pipeProposal);
|
|
30725
|
-
} else {
|
|
30726
|
-
this.unexpected();
|
|
30727
30900
|
}
|
|
30901
|
+
|
|
30902
|
+
throw this.unexpected();
|
|
30728
30903
|
}
|
|
30729
30904
|
|
|
30730
30905
|
parseTopicReference(pipeProposal) {
|
|
@@ -30813,10 +30988,14 @@ var ExpressionParser = class extends LValParser {
|
|
|
30813
30988
|
const node = this.startNode();
|
|
30814
30989
|
this.next();
|
|
30815
30990
|
|
|
30816
|
-
if (this.match(10) && !this.scope.allowDirectSuper
|
|
30817
|
-
|
|
30818
|
-
|
|
30819
|
-
|
|
30991
|
+
if (this.match(10) && !this.scope.allowDirectSuper) {
|
|
30992
|
+
{
|
|
30993
|
+
this.raise(Errors.SuperNotAllowed, node);
|
|
30994
|
+
}
|
|
30995
|
+
} else if (!this.scope.allowSuper) {
|
|
30996
|
+
{
|
|
30997
|
+
this.raise(Errors.UnexpectedSuper, node);
|
|
30998
|
+
}
|
|
30820
30999
|
}
|
|
30821
31000
|
|
|
30822
31001
|
if (!this.match(10) && !this.match(0) && !this.match(16)) {
|
|
@@ -31477,7 +31656,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
31477
31656
|
return finishedNode;
|
|
31478
31657
|
}
|
|
31479
31658
|
|
|
31480
|
-
parseArrayLike(close,
|
|
31659
|
+
parseArrayLike(close, isTuple, refExpressionErrors) {
|
|
31481
31660
|
if (isTuple) {
|
|
31482
31661
|
this.expectPlugin('recordAndTuple');
|
|
31483
31662
|
}
|
|
@@ -32134,10 +32313,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
32134
32313
|
return false;
|
|
32135
32314
|
}
|
|
32136
32315
|
|
|
32137
|
-
|
|
32138
|
-
const nextCh = this.codePointAtPos(next);
|
|
32139
|
-
|
|
32140
|
-
return this.chStartsBindingIdentifier(nextCh, next);
|
|
32316
|
+
return this.nextTokenIsIdentifierOnSameLine();
|
|
32141
32317
|
}
|
|
32142
32318
|
|
|
32143
32319
|
isForUsing() {
|
|
@@ -32163,6 +32339,13 @@ var StatementParser = class extends ExpressionParser {
|
|
|
32163
32339
|
return false;
|
|
32164
32340
|
}
|
|
32165
32341
|
|
|
32342
|
+
nextTokenIsIdentifierOnSameLine() {
|
|
32343
|
+
const next = this.nextTokenInLineStart();
|
|
32344
|
+
const nextCh = this.codePointAtPos(next);
|
|
32345
|
+
|
|
32346
|
+
return this.chStartsBindingIdentifier(nextCh, next);
|
|
32347
|
+
}
|
|
32348
|
+
|
|
32166
32349
|
isAwaitUsing() {
|
|
32167
32350
|
if (!this.isContextual(96)) {
|
|
32168
32351
|
return false;
|
|
@@ -33626,7 +33809,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
33626
33809
|
return this.finishNode(node2, 'ExportDefaultDeclaration');
|
|
33627
33810
|
}
|
|
33628
33811
|
|
|
33629
|
-
this.unexpected(null, 5);
|
|
33812
|
+
throw this.unexpected(null, 5);
|
|
33630
33813
|
}
|
|
33631
33814
|
|
|
33632
33815
|
eatExportStar(node) {
|
|
@@ -34336,68 +34519,68 @@ var StatementParser = class extends ExpressionParser {
|
|
|
34336
34519
|
|
|
34337
34520
|
var Parser = class extends StatementParser {
|
|
34338
34521
|
constructor(options, input, pluginsMap) {
|
|
34339
|
-
|
|
34340
|
-
super(
|
|
34341
|
-
this.options =
|
|
34522
|
+
const normalizedOptions = getOptions(options);
|
|
34523
|
+
super(normalizedOptions, input);
|
|
34524
|
+
this.options = normalizedOptions;
|
|
34342
34525
|
this.initializeScopes();
|
|
34343
34526
|
this.plugins = pluginsMap;
|
|
34344
|
-
this.filename =
|
|
34345
|
-
this.startIndex =
|
|
34527
|
+
this.filename = normalizedOptions.sourceFilename;
|
|
34528
|
+
this.startIndex = normalizedOptions.startIndex;
|
|
34346
34529
|
let optionFlags = 0;
|
|
34347
34530
|
|
|
34348
|
-
if (
|
|
34531
|
+
if (normalizedOptions.allowAwaitOutsideFunction) {
|
|
34349
34532
|
optionFlags |= 1;
|
|
34350
34533
|
}
|
|
34351
34534
|
|
|
34352
|
-
if (
|
|
34535
|
+
if (normalizedOptions.allowReturnOutsideFunction) {
|
|
34353
34536
|
optionFlags |= 2;
|
|
34354
34537
|
}
|
|
34355
34538
|
|
|
34356
|
-
if (
|
|
34539
|
+
if (normalizedOptions.allowImportExportEverywhere) {
|
|
34357
34540
|
optionFlags |= 8;
|
|
34358
34541
|
}
|
|
34359
34542
|
|
|
34360
|
-
if (
|
|
34543
|
+
if (normalizedOptions.allowSuperOutsideMethod) {
|
|
34361
34544
|
optionFlags |= 16;
|
|
34362
34545
|
}
|
|
34363
34546
|
|
|
34364
|
-
if (
|
|
34547
|
+
if (normalizedOptions.allowUndeclaredExports) {
|
|
34365
34548
|
optionFlags |= 64;
|
|
34366
34549
|
}
|
|
34367
34550
|
|
|
34368
|
-
if (
|
|
34551
|
+
if (normalizedOptions.allowNewTargetOutsideFunction) {
|
|
34369
34552
|
optionFlags |= 4;
|
|
34370
34553
|
}
|
|
34371
34554
|
|
|
34372
|
-
if (
|
|
34555
|
+
if (normalizedOptions.allowYieldOutsideFunction) {
|
|
34373
34556
|
optionFlags |= 32;
|
|
34374
34557
|
}
|
|
34375
34558
|
|
|
34376
|
-
if (
|
|
34559
|
+
if (normalizedOptions.ranges) {
|
|
34377
34560
|
optionFlags |= 128;
|
|
34378
34561
|
}
|
|
34379
34562
|
|
|
34380
|
-
if (
|
|
34563
|
+
if (normalizedOptions.tokens) {
|
|
34381
34564
|
optionFlags |= 256;
|
|
34382
34565
|
}
|
|
34383
34566
|
|
|
34384
|
-
if (
|
|
34567
|
+
if (normalizedOptions.createImportExpressions) {
|
|
34385
34568
|
optionFlags |= 512;
|
|
34386
34569
|
}
|
|
34387
34570
|
|
|
34388
|
-
if (
|
|
34571
|
+
if (normalizedOptions.createParenthesizedExpressions) {
|
|
34389
34572
|
optionFlags |= 1024;
|
|
34390
34573
|
}
|
|
34391
34574
|
|
|
34392
|
-
if (
|
|
34575
|
+
if (normalizedOptions.errorRecovery) {
|
|
34393
34576
|
optionFlags |= 2048;
|
|
34394
34577
|
}
|
|
34395
34578
|
|
|
34396
|
-
if (
|
|
34579
|
+
if (normalizedOptions.attachComment) {
|
|
34397
34580
|
optionFlags |= 4096;
|
|
34398
34581
|
}
|
|
34399
34582
|
|
|
34400
|
-
if (
|
|
34583
|
+
if (normalizedOptions.annexB) {
|
|
34401
34584
|
optionFlags |= 8192;
|
|
34402
34585
|
}
|
|
34403
34586
|
|
|
@@ -34415,10 +34598,11 @@ var Parser = class extends StatementParser {
|
|
|
34415
34598
|
|
|
34416
34599
|
this.nextToken();
|
|
34417
34600
|
file2.errors = null;
|
|
34418
|
-
this.parseTopLevel(file2, program3);
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34601
|
+
const result = this.parseTopLevel(file2, program3);
|
|
34602
|
+
|
|
34603
|
+
result.errors = this.state.errors;
|
|
34604
|
+
result.comments.length = this.state.commentsLen;
|
|
34605
|
+
return result;
|
|
34422
34606
|
}
|
|
34423
34607
|
};
|
|
34424
34608
|
|
|
@@ -34532,7 +34716,7 @@ function getParserClass(pluginsMap) {
|
|
|
34532
34716
|
return cls;
|
|
34533
34717
|
}
|
|
34534
34718
|
|
|
34535
|
-
//
|
|
34719
|
+
// ../babel-babel/packages/babel-code-frame/lib/index.js
|
|
34536
34720
|
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
34537
34721
|
var import_js_tokens = __toESM(require_js_tokens(), 1);
|
|
34538
34722
|
|
|
@@ -34845,7 +35029,7 @@ ${frame}`;
|
|
|
34845
35029
|
}
|
|
34846
35030
|
}
|
|
34847
35031
|
|
|
34848
|
-
//
|
|
35032
|
+
// ../babel-babel/packages/babel-template/lib/index.js
|
|
34849
35033
|
var {assertExpressionStatement: assertExpressionStatement2} = lib_exports;
|
|
34850
35034
|
|
|
34851
35035
|
function makeStatementFormatter(fn) {
|
|
@@ -35512,7 +35696,7 @@ var index = Object.assign(smart.bind(void 0), {
|
|
|
35512
35696
|
ast: smart.ast,
|
|
35513
35697
|
});
|
|
35514
35698
|
|
|
35515
|
-
// node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
35699
|
+
// ../babel-babel/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
35516
35700
|
var comma = ','.charCodeAt(0);
|
|
35517
35701
|
var semicolon = ';'.charCodeAt(0);
|
|
35518
35702
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
@@ -35761,7 +35945,7 @@ function encode(decoded) {
|
|
|
35761
35945
|
return writer.flush();
|
|
35762
35946
|
}
|
|
35763
35947
|
|
|
35764
|
-
// node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
|
|
35948
|
+
// ../babel-babel/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
|
|
35765
35949
|
var schemeRegex = /^[\w+.-]+:\/\//;
|
|
35766
35950
|
var urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
|
|
35767
35951
|
var fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
@@ -35981,7 +36165,7 @@ case 2:
|
|
|
35981
36165
|
}
|
|
35982
36166
|
}
|
|
35983
36167
|
|
|
35984
|
-
// node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
36168
|
+
// ../babel-babel/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
35985
36169
|
function stripFilename(path) {
|
|
35986
36170
|
if (!path)
|
|
35987
36171
|
return '';
|
|
@@ -36253,7 +36437,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
36253
36437
|
return index2;
|
|
36254
36438
|
}
|
|
36255
36439
|
|
|
36256
|
-
// node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
36440
|
+
// ../babel-babel/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
36257
36441
|
var SetArray = class {
|
|
36258
36442
|
constructor() {
|
|
36259
36443
|
this._indexes = {
|
|
@@ -36529,7 +36713,7 @@ function addMappingInternal(skipable, map, mapping) {
|
|
|
36529
36713
|
return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
|
|
36530
36714
|
}
|
|
36531
36715
|
|
|
36532
|
-
//
|
|
36716
|
+
// ../babel-babel/packages/babel-generator/lib/index.js
|
|
36533
36717
|
var import_jsesc = __toESM(require_jsesc(), 1);
|
|
36534
36718
|
|
|
36535
36719
|
var SourceMap = class {
|
|
@@ -36540,7 +36724,7 @@ var SourceMap = class {
|
|
|
36540
36724
|
__publicField(this, '_lastGenLine', 0);
|
|
36541
36725
|
__publicField(this, '_lastSourceLine', 0);
|
|
36542
36726
|
__publicField(this, '_lastSourceColumn', 0);
|
|
36543
|
-
__publicField(this, '_inputMap');
|
|
36727
|
+
__publicField(this, '_inputMap', null);
|
|
36544
36728
|
const map = this._map = new GenMapping({
|
|
36545
36729
|
sourceRoot: opts.sourceRoot,
|
|
36546
36730
|
});
|
|
@@ -36600,6 +36784,7 @@ var SourceMap = class {
|
|
|
36600
36784
|
}
|
|
36601
36785
|
} else {
|
|
36602
36786
|
originalMapping = {
|
|
36787
|
+
name: null,
|
|
36603
36788
|
source: filename?.replace(/\\/g, '/') || this._sourceFileName,
|
|
36604
36789
|
line,
|
|
36605
36790
|
column,
|
|
@@ -36851,7 +37036,7 @@ var Buffer2 = class {
|
|
|
36851
37036
|
last2 = i + 1;
|
|
36852
37037
|
|
|
36853
37038
|
if (last2 < len && line !== void 0) {
|
|
36854
|
-
this._mark(++line, 0,
|
|
37039
|
+
this._mark(++line, 0, void 0, void 0, filename);
|
|
36855
37040
|
}
|
|
36856
37041
|
|
|
36857
37042
|
i = str.indexOf('\n', last2);
|
|
@@ -37094,6 +37279,8 @@ var nodes = {
|
|
|
37094
37279
|
if (state.hasCall && state.hasHelper || state.hasFunction) {
|
|
37095
37280
|
return state.hasFunction ? 1 | 2 : 2;
|
|
37096
37281
|
}
|
|
37282
|
+
|
|
37283
|
+
return 0;
|
|
37097
37284
|
},
|
|
37098
37285
|
SwitchCase(node, parent) {
|
|
37099
37286
|
return (!!node.consequent.length || parent.cases[0] === node ? 1 : 0) | (!node.consequent.length && parent.cases[parent.cases.length - 1] === node ? 2 : 0);
|
|
@@ -37102,21 +37289,29 @@ var nodes = {
|
|
|
37102
37289
|
if (isFunction$1(node.left) || isFunction$1(node.right)) {
|
|
37103
37290
|
return 2;
|
|
37104
37291
|
}
|
|
37292
|
+
|
|
37293
|
+
return 0;
|
|
37105
37294
|
},
|
|
37106
37295
|
Literal(node) {
|
|
37107
37296
|
if (isStringLiteral3(node) && node.value === 'use strict') {
|
|
37108
37297
|
return 2;
|
|
37109
37298
|
}
|
|
37299
|
+
|
|
37300
|
+
return 0;
|
|
37110
37301
|
},
|
|
37111
37302
|
CallExpression(node) {
|
|
37112
37303
|
if (isFunction$1(node.callee) || isHelper(node)) {
|
|
37113
37304
|
return 1 | 2;
|
|
37114
37305
|
}
|
|
37306
|
+
|
|
37307
|
+
return 0;
|
|
37115
37308
|
},
|
|
37116
37309
|
OptionalCallExpression(node) {
|
|
37117
37310
|
if (isFunction$1(node.callee)) {
|
|
37118
37311
|
return 1 | 2;
|
|
37119
37312
|
}
|
|
37313
|
+
|
|
37314
|
+
return 0;
|
|
37120
37315
|
},
|
|
37121
37316
|
VariableDeclaration(node) {
|
|
37122
37317
|
for (let i = 0; i < node.declarations.length; i++) {
|
|
@@ -37132,11 +37327,15 @@ var nodes = {
|
|
|
37132
37327
|
return 1 | 2;
|
|
37133
37328
|
}
|
|
37134
37329
|
}
|
|
37330
|
+
|
|
37331
|
+
return 0;
|
|
37135
37332
|
},
|
|
37136
37333
|
IfStatement(node) {
|
|
37137
37334
|
if (isBlockStatement2(node.consequent)) {
|
|
37138
37335
|
return 1 | 2;
|
|
37139
37336
|
}
|
|
37337
|
+
|
|
37338
|
+
return 0;
|
|
37140
37339
|
},
|
|
37141
37340
|
};
|
|
37142
37341
|
|
|
@@ -37146,21 +37345,29 @@ nodes.ObjectMethod = function(node, parent) {
|
|
|
37146
37345
|
if (parent.properties[0] === node) {
|
|
37147
37346
|
return 1;
|
|
37148
37347
|
}
|
|
37348
|
+
|
|
37349
|
+
return 0;
|
|
37149
37350
|
};
|
|
37150
37351
|
nodes.ObjectTypeCallProperty = function(node, parent) {
|
|
37151
37352
|
if (parent.callProperties[0] === node && !parent.properties?.length) {
|
|
37152
37353
|
return 1;
|
|
37153
37354
|
}
|
|
37355
|
+
|
|
37356
|
+
return 0;
|
|
37154
37357
|
};
|
|
37155
37358
|
nodes.ObjectTypeIndexer = function(node, parent) {
|
|
37156
37359
|
if (parent.indexers[0] === node && !parent.properties?.length && !parent.callProperties?.length) {
|
|
37157
37360
|
return 1;
|
|
37158
37361
|
}
|
|
37362
|
+
|
|
37363
|
+
return 0;
|
|
37159
37364
|
};
|
|
37160
37365
|
nodes.ObjectTypeInternalSlot = function(node, parent) {
|
|
37161
37366
|
if (parent.internalSlots[0] === node && !parent.properties?.length && !parent.callProperties?.length && !parent.indexers?.length) {
|
|
37162
37367
|
return 1;
|
|
37163
37368
|
}
|
|
37369
|
+
|
|
37370
|
+
return 0;
|
|
37164
37371
|
};
|
|
37165
37372
|
[
|
|
37166
37373
|
['Function', true],
|
|
@@ -37304,8 +37511,6 @@ function Binary(node, parent) {
|
|
|
37304
37511
|
return true;
|
|
37305
37512
|
}
|
|
37306
37513
|
}
|
|
37307
|
-
|
|
37308
|
-
return void 0;
|
|
37309
37514
|
}
|
|
37310
37515
|
|
|
37311
37516
|
function UnionTypeAnnotation$1(node, parent) {
|
|
@@ -37692,7 +37897,7 @@ function needsParens$1(node, parent, tokenContext, getRawIdentifier) {
|
|
|
37692
37897
|
return !isDecoratorMemberExpression(node) && !(isCallExpression$1(node) && isDecoratorMemberExpression(node.callee)) && !isParenthesizedExpression2(node);
|
|
37693
37898
|
}
|
|
37694
37899
|
|
|
37695
|
-
return expandedParens.get(node.type)?.(node, parent, tokenContext, getRawIdentifier);
|
|
37900
|
+
return expandedParens.get(node.type)?.(node, parent, tokenContext, getRawIdentifier) || false;
|
|
37696
37901
|
}
|
|
37697
37902
|
|
|
37698
37903
|
function isDecoratorMemberExpression(node) {
|
|
@@ -37758,7 +37963,7 @@ var TokenMap = class {
|
|
|
37758
37963
|
if (indexes.length > 0)
|
|
37759
37964
|
this._nodesToTokenIndexes.set(node, indexes);
|
|
37760
37965
|
});
|
|
37761
|
-
this._tokensCache
|
|
37966
|
+
this._tokensCache.clear();
|
|
37762
37967
|
}
|
|
37763
37968
|
|
|
37764
37969
|
has(node) {
|
|
@@ -37811,7 +38016,7 @@ var TokenMap = class {
|
|
|
37811
38016
|
if (count > 1) {
|
|
37812
38017
|
const cache2 = this._nodesOccurrencesCountCache.get(node);
|
|
37813
38018
|
|
|
37814
|
-
if (cache2
|
|
38019
|
+
if (cache2?.test === test && cache2.count < count) {
|
|
37815
38020
|
i = cache2.i + 1;
|
|
37816
38021
|
occurrenceCount -= cache2.count + 1;
|
|
37817
38022
|
}
|
|
@@ -37888,7 +38093,7 @@ var TokenMap = class {
|
|
|
37888
38093
|
let low = first;
|
|
37889
38094
|
const children = childrenIterator(node);
|
|
37890
38095
|
|
|
37891
|
-
if ((node.type === 'ExportNamedDeclaration' || node.type === 'ExportDefaultDeclaration') && node.declaration
|
|
38096
|
+
if ((node.type === 'ExportNamedDeclaration' || node.type === 'ExportDefaultDeclaration') && node.declaration?.type === 'ClassDeclaration') {
|
|
37892
38097
|
children.next();
|
|
37893
38098
|
}
|
|
37894
38099
|
|
|
@@ -38540,10 +38745,7 @@ function SwitchStatement2(node) {
|
|
|
38540
38745
|
this.tokenChar(41);
|
|
38541
38746
|
this.space();
|
|
38542
38747
|
this.tokenChar(123);
|
|
38543
|
-
this.printSequence(node.cases, true
|
|
38544
|
-
if (!leading && node.cases[node.cases.length - 1] === cas)
|
|
38545
|
-
return -1;
|
|
38546
|
-
});
|
|
38748
|
+
this.printSequence(node.cases, true);
|
|
38547
38749
|
this.rightBrace(node);
|
|
38548
38750
|
}
|
|
38549
38751
|
|
|
@@ -38909,7 +39111,7 @@ function _parameters(parameters, endToken) {
|
|
|
38909
39111
|
this._param(parameters[i]);
|
|
38910
39112
|
|
|
38911
39113
|
if (trailingComma || i < paramLength - 1) {
|
|
38912
|
-
this.token(',',
|
|
39114
|
+
this.token(',', void 0, i);
|
|
38913
39115
|
this.space();
|
|
38914
39116
|
}
|
|
38915
39117
|
}
|
|
@@ -38961,7 +39163,7 @@ function _methodHead(node) {
|
|
|
38961
39163
|
this.tokenChar(63);
|
|
38962
39164
|
}
|
|
38963
39165
|
|
|
38964
|
-
this._params(node, node.computed && node.key.type !== 'StringLiteral' ? void 0 : node.key
|
|
39166
|
+
this._params(node, node.computed && node.key.type !== 'StringLiteral' ? void 0 : node.key);
|
|
38965
39167
|
}
|
|
38966
39168
|
|
|
38967
39169
|
function _predicate(node, noLineTerminatorAfter) {
|
|
@@ -39184,11 +39386,11 @@ function _printAttributes(node, hasPreviousBrace) {
|
|
|
39184
39386
|
this.word(useAssertKeyword ? 'assert' : 'with');
|
|
39185
39387
|
this.space();
|
|
39186
39388
|
const occurrenceCount = hasPreviousBrace ? 1 : 0;
|
|
39187
|
-
this.token('{',
|
|
39389
|
+
this.token('{', void 0, occurrenceCount);
|
|
39188
39390
|
this.space();
|
|
39189
39391
|
this.printList(attributes || assertions, this.shouldPrintTrailingComma('}'));
|
|
39190
39392
|
this.space();
|
|
39191
|
-
this.token('}',
|
|
39393
|
+
this.token('}', void 0, occurrenceCount);
|
|
39192
39394
|
}
|
|
39193
39395
|
|
|
39194
39396
|
function ExportAllDeclaration2(node) {
|
|
@@ -39529,54 +39731,8 @@ function ArrayExpression2(node) {
|
|
|
39529
39731
|
this.tokenChar(93);
|
|
39530
39732
|
}
|
|
39531
39733
|
|
|
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
|
-
}
|
|
39734
|
+
var RecordExpression;
|
|
39735
|
+
var TupleExpression;
|
|
39580
39736
|
|
|
39581
39737
|
function RegExpLiteral2(node) {
|
|
39582
39738
|
this.word(`/${node.pattern}/${node.flags}`);
|
|
@@ -40165,10 +40321,7 @@ function ObjectTypeAnnotation2(node) {
|
|
|
40165
40321
|
if (props.length) {
|
|
40166
40322
|
this.newline();
|
|
40167
40323
|
this.space();
|
|
40168
|
-
this.printJoin(props, true, true, void 0, void 0,
|
|
40169
|
-
if (leading && !props[0])
|
|
40170
|
-
return 1;
|
|
40171
|
-
}, () => {
|
|
40324
|
+
this.printJoin(props, true, true, void 0, void 0, () => {
|
|
40172
40325
|
if (props.length !== 1 || node.inexact) {
|
|
40173
40326
|
this.tokenChar(44);
|
|
40174
40327
|
this.space();
|
|
@@ -40903,7 +41056,7 @@ function tsPrintUnionOrIntersectionType(printer, node, sep) {
|
|
|
40903
41056
|
|
|
40904
41057
|
printer.printJoin(node.types, void 0, void 0, function(i) {
|
|
40905
41058
|
this.space();
|
|
40906
|
-
this.token(sep,
|
|
41059
|
+
this.token(sep, void 0, i + hasLeadingToken);
|
|
40907
41060
|
this.space();
|
|
40908
41061
|
});
|
|
40909
41062
|
}
|
|
@@ -41311,6 +41464,8 @@ function printModifiersList(printer, node, modifiers) {
|
|
|
41311
41464
|
|
|
41312
41465
|
return modifiersSet.size === 0;
|
|
41313
41466
|
}
|
|
41467
|
+
|
|
41468
|
+
return false;
|
|
41314
41469
|
});
|
|
41315
41470
|
|
|
41316
41471
|
for (const modifier of modifiersSet) {
|
|
@@ -41462,7 +41617,7 @@ var generatorFunctions = /* @__PURE__ */Object.freeze({
|
|
|
41462
41617
|
PrivateName: PrivateName2,
|
|
41463
41618
|
Program: Program2,
|
|
41464
41619
|
QualifiedTypeIdentifier: QualifiedTypeIdentifier2,
|
|
41465
|
-
RecordExpression
|
|
41620
|
+
RecordExpression,
|
|
41466
41621
|
RegExpLiteral: RegExpLiteral2,
|
|
41467
41622
|
RestElement: RestElement2,
|
|
41468
41623
|
ReturnStatement: ReturnStatement2,
|
|
@@ -41552,7 +41707,7 @@ var generatorFunctions = /* @__PURE__ */Object.freeze({
|
|
|
41552
41707
|
ThrowStatement: ThrowStatement2,
|
|
41553
41708
|
TopicReference: TopicReference2,
|
|
41554
41709
|
TryStatement: TryStatement2,
|
|
41555
|
-
TupleExpression
|
|
41710
|
+
TupleExpression,
|
|
41556
41711
|
TupleTypeAnnotation: TupleTypeAnnotation2,
|
|
41557
41712
|
TypeAlias: TypeAlias2,
|
|
41558
41713
|
TypeAnnotation: TypeAnnotation2,
|
|
@@ -41614,7 +41769,7 @@ function commentIsNewline(c) {
|
|
|
41614
41769
|
var {needsParens} = n;
|
|
41615
41770
|
|
|
41616
41771
|
var Printer = class {
|
|
41617
|
-
constructor(format, map, tokens, originalCode) {
|
|
41772
|
+
constructor(format, map, tokens = null, originalCode = null) {
|
|
41618
41773
|
__publicField(this, 'tokenContext', TokenContext.normal);
|
|
41619
41774
|
__publicField(this, '_tokens', null);
|
|
41620
41775
|
__publicField(this, '_originalCode', null);
|
|
@@ -41640,7 +41795,7 @@ var Printer = class {
|
|
|
41640
41795
|
this._tokens = tokens;
|
|
41641
41796
|
this._originalCode = originalCode;
|
|
41642
41797
|
this._indentRepeat = format.indent.style.length;
|
|
41643
|
-
this._inputMap = map?._inputMap;
|
|
41798
|
+
this._inputMap = map?._inputMap || null;
|
|
41644
41799
|
this._buf = new Buffer2(map, format.indent.style[0]);
|
|
41645
41800
|
}
|
|
41646
41801
|
|
|
@@ -42028,7 +42183,7 @@ var Printer = class {
|
|
|
42028
42183
|
this.print(node);
|
|
42029
42184
|
}
|
|
42030
42185
|
|
|
42031
|
-
print(node, noLineTerminatorAfter, trailingCommentsLineOffset) {
|
|
42186
|
+
print(node, noLineTerminatorAfter = false, trailingCommentsLineOffset) {
|
|
42032
42187
|
if (!node)
|
|
42033
42188
|
return;
|
|
42034
42189
|
|
|
@@ -42099,7 +42254,7 @@ var Printer = class {
|
|
|
42099
42254
|
let oldTokenContext;
|
|
42100
42255
|
|
|
42101
42256
|
if (!shouldPrintParens) {
|
|
42102
|
-
noLineTerminatorAfter || (noLineTerminatorAfter = parent && this._noLineTerminatorAfterNode === parent && isLastChild(parent, node));
|
|
42257
|
+
noLineTerminatorAfter || (noLineTerminatorAfter = !!parent && this._noLineTerminatorAfterNode === parent && isLastChild(parent, node));
|
|
42103
42258
|
|
|
42104
42259
|
if (noLineTerminatorAfter) {
|
|
42105
42260
|
if (node.trailingComments?.some(commentIsNewline)) {
|
|
@@ -42211,7 +42366,7 @@ var Printer = class {
|
|
|
42211
42366
|
}
|
|
42212
42367
|
}
|
|
42213
42368
|
|
|
42214
|
-
printJoin(nodes2, statement2, indent, separator, printTrailingSeparator,
|
|
42369
|
+
printJoin(nodes2, statement2, indent, separator, printTrailingSeparator, iterator, trailingCommentsLineOffset) {
|
|
42215
42370
|
if (!nodes2?.length)
|
|
42216
42371
|
return;
|
|
42217
42372
|
|
|
@@ -42227,7 +42382,6 @@ var Printer = class {
|
|
|
42227
42382
|
this.indent();
|
|
42228
42383
|
|
|
42229
42384
|
const newlineOpts = {
|
|
42230
|
-
addNewlines,
|
|
42231
42385
|
nextNodeStartLine: 0,
|
|
42232
42386
|
};
|
|
42233
42387
|
|
|
@@ -42360,12 +42514,12 @@ var Printer = class {
|
|
|
42360
42514
|
this._indentInnerComments = false;
|
|
42361
42515
|
}
|
|
42362
42516
|
|
|
42363
|
-
printSequence(nodes2, indent, trailingCommentsLineOffset
|
|
42364
|
-
this.printJoin(nodes2, true, indent ?? false, void 0, void 0,
|
|
42517
|
+
printSequence(nodes2, indent, trailingCommentsLineOffset) {
|
|
42518
|
+
this.printJoin(nodes2, true, indent ?? false, void 0, void 0, void 0, trailingCommentsLineOffset);
|
|
42365
42519
|
}
|
|
42366
42520
|
|
|
42367
42521
|
printList(items, printTrailingSeparator, statement2, indent, separator, iterator) {
|
|
42368
|
-
this.printJoin(items, statement2, indent, separator ?? commaSeparator, printTrailingSeparator,
|
|
42522
|
+
this.printJoin(items, statement2, indent, separator ?? commaSeparator, printTrailingSeparator, iterator);
|
|
42369
42523
|
}
|
|
42370
42524
|
|
|
42371
42525
|
shouldPrintTrailingComma(listEnd) {
|
|
@@ -42723,10 +42877,10 @@ function generate(ast, opts = {}, code2) {
|
|
|
42723
42877
|
return printer.generate(ast);
|
|
42724
42878
|
}
|
|
42725
42879
|
|
|
42726
|
-
//
|
|
42880
|
+
// ../babel-babel/packages/babel-traverse/lib/index.js
|
|
42727
42881
|
var import_debug = __toESM(require_src(), 1);
|
|
42728
42882
|
|
|
42729
|
-
//
|
|
42883
|
+
// ../babel-babel/packages/babel-helper-globals/data/builtin-lower.json
|
|
42730
42884
|
var builtin_lower_default = [
|
|
42731
42885
|
'decodeURI',
|
|
42732
42886
|
'decodeURIComponent',
|
|
@@ -42743,7 +42897,7 @@ var builtin_lower_default = [
|
|
|
42743
42897
|
'unescape',
|
|
42744
42898
|
];
|
|
42745
42899
|
|
|
42746
|
-
//
|
|
42900
|
+
// ../babel-babel/packages/babel-helper-globals/data/builtin-upper.json
|
|
42747
42901
|
var builtin_upper_default = [
|
|
42748
42902
|
'AggregateError',
|
|
42749
42903
|
'Array',
|
|
@@ -42796,7 +42950,7 @@ var builtin_upper_default = [
|
|
|
42796
42950
|
'WeakSet',
|
|
42797
42951
|
];
|
|
42798
42952
|
|
|
42799
|
-
//
|
|
42953
|
+
// ../babel-babel/packages/babel-traverse/lib/index.js
|
|
42800
42954
|
var ReferencedIdentifier = [
|
|
42801
42955
|
'Identifier',
|
|
42802
42956
|
'JSXIdentifier',
|
|
@@ -42812,7 +42966,11 @@ var Scope$1 = [
|
|
|
42812
42966
|
'Pattern',
|
|
42813
42967
|
];
|
|
42814
42968
|
var Referenced = null;
|
|
42815
|
-
var BlockScoped =
|
|
42969
|
+
var BlockScoped = [
|
|
42970
|
+
'FunctionDeclaration',
|
|
42971
|
+
'ClassDeclaration',
|
|
42972
|
+
'VariableDeclaration',
|
|
42973
|
+
];
|
|
42816
42974
|
var Var = [
|
|
42817
42975
|
'VariableDeclaration',
|
|
42818
42976
|
];
|
|
@@ -42892,16 +43050,16 @@ var {isCompatTag: isCompatTag2} = react2;
|
|
|
42892
43050
|
function isReferencedIdentifier(opts) {
|
|
42893
43051
|
const {node, parent} = this;
|
|
42894
43052
|
|
|
42895
|
-
if (
|
|
42896
|
-
|
|
42897
|
-
|
|
42898
|
-
|
|
42899
|
-
} else {
|
|
43053
|
+
if (isIdentifier$6(node, opts)) {
|
|
43054
|
+
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
43055
|
+
} else if (isJSXIdentifier3(node, opts)) {
|
|
43056
|
+
if (!isJSXMemberExpression2(parent) && isCompatTag2(node.name))
|
|
42900
43057
|
return false;
|
|
42901
|
-
|
|
43058
|
+
|
|
43059
|
+
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
43060
|
+
} else {
|
|
43061
|
+
return false;
|
|
42902
43062
|
}
|
|
42903
|
-
|
|
42904
|
-
return nodeIsReferenced(node, parent, this.parentPath.parent);
|
|
42905
43063
|
}
|
|
42906
43064
|
|
|
42907
43065
|
function isReferencedMemberExpression() {
|
|
@@ -42961,7 +43119,7 @@ function isVar2() {
|
|
|
42961
43119
|
}
|
|
42962
43120
|
|
|
42963
43121
|
function isUser() {
|
|
42964
|
-
return
|
|
43122
|
+
return !!this.node?.loc;
|
|
42965
43123
|
}
|
|
42966
43124
|
|
|
42967
43125
|
function isGenerated() {
|
|
@@ -43084,11 +43242,8 @@ function explode$1(visitor) {
|
|
|
43084
43242
|
|
|
43085
43243
|
if (types2 !== null) {
|
|
43086
43244
|
for (const type of types2) {
|
|
43087
|
-
|
|
43088
|
-
|
|
43089
|
-
} else {
|
|
43090
|
-
visitor[type] = fns;
|
|
43091
|
-
}
|
|
43245
|
+
visitor[type] ?? (visitor[type] = {});
|
|
43246
|
+
mergePair(visitor[type], fns);
|
|
43092
43247
|
}
|
|
43093
43248
|
} else {
|
|
43094
43249
|
mergePair(visitor, fns);
|
|
@@ -43154,7 +43309,7 @@ function verify$1(visitor) {
|
|
|
43154
43309
|
continue;
|
|
43155
43310
|
|
|
43156
43311
|
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.
|
|
43312
|
+
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
43313
|
}
|
|
43159
43314
|
|
|
43160
43315
|
const visitors2 = visitor[nodeType];
|
|
@@ -43471,6 +43626,73 @@ var Renamer = class {
|
|
|
43471
43626
|
}
|
|
43472
43627
|
};
|
|
43473
43628
|
|
|
43629
|
+
var {VISITOR_KEYS: VISITOR_KEYS$5} = lib_exports;
|
|
43630
|
+
|
|
43631
|
+
function traverseForScope(path, visitors2, state) {
|
|
43632
|
+
const exploded = explode$1(visitors2);
|
|
43633
|
+
|
|
43634
|
+
if (exploded.enter || exploded.exit) {
|
|
43635
|
+
throw new Error('Should not be used with enter/exit visitors.');
|
|
43636
|
+
}
|
|
43637
|
+
|
|
43638
|
+
_traverse2(path.parentPath, path.parent, path.node, path.container, path.key, path.listKey, path.hub, path);
|
|
43639
|
+
function _traverse2(parentPath, parent, node, container, key, listKey, hub, inPath) {
|
|
43640
|
+
if (!node) {
|
|
43641
|
+
return;
|
|
43642
|
+
}
|
|
43643
|
+
|
|
43644
|
+
const path2 = inPath || NodePath_Final.get({
|
|
43645
|
+
hub,
|
|
43646
|
+
parentPath,
|
|
43647
|
+
parent,
|
|
43648
|
+
container,
|
|
43649
|
+
listKey,
|
|
43650
|
+
key,
|
|
43651
|
+
});
|
|
43652
|
+
|
|
43653
|
+
_forceSetScope.call(path2);
|
|
43654
|
+
const visitor = exploded[node.type];
|
|
43655
|
+
|
|
43656
|
+
if (visitor?.enter) {
|
|
43657
|
+
for (const visit2 of visitor.enter) {
|
|
43658
|
+
visit2.call(state, path2, state);
|
|
43659
|
+
}
|
|
43660
|
+
}
|
|
43661
|
+
|
|
43662
|
+
if (path2.shouldSkip) {
|
|
43663
|
+
return;
|
|
43664
|
+
}
|
|
43665
|
+
|
|
43666
|
+
const keys2 = VISITOR_KEYS$5[node.type];
|
|
43667
|
+
|
|
43668
|
+
if (!keys2?.length) {
|
|
43669
|
+
return;
|
|
43670
|
+
}
|
|
43671
|
+
|
|
43672
|
+
for (const key2 of keys2) {
|
|
43673
|
+
const prop = node[key2];
|
|
43674
|
+
|
|
43675
|
+
if (!prop)
|
|
43676
|
+
continue;
|
|
43677
|
+
|
|
43678
|
+
if (Array.isArray(prop)) {
|
|
43679
|
+
for (let i = 0; i < prop.length; i++) {
|
|
43680
|
+
const value = prop[i];
|
|
43681
|
+
_traverse2(path2, node, value, prop, i, key2);
|
|
43682
|
+
}
|
|
43683
|
+
} else {
|
|
43684
|
+
_traverse2(path2, node, prop, node, key2, null);
|
|
43685
|
+
}
|
|
43686
|
+
}
|
|
43687
|
+
|
|
43688
|
+
if (visitor?.exit) {
|
|
43689
|
+
for (const visit2 of visitor.exit) {
|
|
43690
|
+
visit2.call(state, path2, state);
|
|
43691
|
+
}
|
|
43692
|
+
}
|
|
43693
|
+
}
|
|
43694
|
+
}
|
|
43695
|
+
|
|
43474
43696
|
var Binding = class {
|
|
43475
43697
|
constructor({identifier: identifier4, scope: scope2, path, kind}) {
|
|
43476
43698
|
__publicField(this, 'identifier');
|
|
@@ -43611,7 +43833,7 @@ var {
|
|
|
43611
43833
|
assignmentExpression: assignmentExpression$3,
|
|
43612
43834
|
callExpression: callExpression$3,
|
|
43613
43835
|
cloneNode: cloneNode$3,
|
|
43614
|
-
getBindingIdentifiers: getBindingIdentifiers$
|
|
43836
|
+
getBindingIdentifiers: getBindingIdentifiers$2,
|
|
43615
43837
|
identifier: identifier$3,
|
|
43616
43838
|
isArrayExpression: isArrayExpression3,
|
|
43617
43839
|
isBinary: isBinary3,
|
|
@@ -43647,8 +43869,6 @@ var {
|
|
|
43647
43869
|
toIdentifier: toIdentifier2,
|
|
43648
43870
|
variableDeclaration: variableDeclaration$1,
|
|
43649
43871
|
variableDeclarator: variableDeclarator$1,
|
|
43650
|
-
isRecordExpression: isRecordExpression2,
|
|
43651
|
-
isTupleExpression: isTupleExpression2,
|
|
43652
43872
|
isObjectProperty: isObjectProperty2,
|
|
43653
43873
|
isTopicReference: isTopicReference2,
|
|
43654
43874
|
isMetaProperty: isMetaProperty2,
|
|
@@ -43813,6 +44033,10 @@ function resetScope(scope2) {
|
|
|
43813
44033
|
scope2.globals = /* @__PURE__ */Object.create(null);
|
|
43814
44034
|
}
|
|
43815
44035
|
|
|
44036
|
+
function isAnonymousFunctionExpression(path) {
|
|
44037
|
+
return path.isFunctionExpression() && !path.node.id || path.isArrowFunctionExpression();
|
|
44038
|
+
}
|
|
44039
|
+
|
|
43816
44040
|
var collectorVisitor = {
|
|
43817
44041
|
ForStatement(path) {
|
|
43818
44042
|
const declar = path.get('init');
|
|
@@ -43886,7 +44110,7 @@ var collectorVisitor = {
|
|
|
43886
44110
|
binding?.reference(path);
|
|
43887
44111
|
} else if (isVariableDeclaration$1(declar)) {
|
|
43888
44112
|
for (const decl of declar.declarations) {
|
|
43889
|
-
for (const name of Object.keys(getBindingIdentifiers$
|
|
44113
|
+
for (const name of Object.keys(getBindingIdentifiers$2(decl))) {
|
|
43890
44114
|
const binding = scope2.getBinding(name);
|
|
43891
44115
|
binding?.reference(path);
|
|
43892
44116
|
}
|
|
@@ -44331,14 +44555,14 @@ var _Scope = class _Scope {
|
|
|
44331
44555
|
return true;
|
|
44332
44556
|
} else if (isBinary3(node)) {
|
|
44333
44557
|
return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
|
|
44334
|
-
} else if (isArrayExpression3(node)
|
|
44558
|
+
} else if (isArrayExpression3(node)) {
|
|
44335
44559
|
for (const elem of node.elements) {
|
|
44336
44560
|
if (elem !== null && !this.isPure(elem, constantsOnly))
|
|
44337
44561
|
return false;
|
|
44338
44562
|
}
|
|
44339
44563
|
|
|
44340
44564
|
return true;
|
|
44341
|
-
} else if (isObjectExpression3(node)
|
|
44565
|
+
} else if (isObjectExpression3(node)) {
|
|
44342
44566
|
for (const prop of node.properties) {
|
|
44343
44567
|
if (!this.isPure(prop, constantsOnly))
|
|
44344
44568
|
return false;
|
|
@@ -44479,10 +44703,6 @@ var _Scope = class _Scope {
|
|
|
44479
44703
|
collectorVisitor]));
|
|
44480
44704
|
|
|
44481
44705
|
if (path.type !== 'Program') {
|
|
44482
|
-
for (const visit2 of scopeVisitor.enter) {
|
|
44483
|
-
visit2.call(state, path, state);
|
|
44484
|
-
}
|
|
44485
|
-
|
|
44486
44706
|
const typeVisitors = scopeVisitor[path.type];
|
|
44487
44707
|
|
|
44488
44708
|
if (typeVisitors) {
|
|
@@ -44492,7 +44712,9 @@ collectorVisitor]));
|
|
|
44492
44712
|
}
|
|
44493
44713
|
}
|
|
44494
44714
|
|
|
44495
|
-
|
|
44715
|
+
{
|
|
44716
|
+
traverseForScope(path, scopeVisitor, state);
|
|
44717
|
+
}
|
|
44496
44718
|
this.crawling = false;
|
|
44497
44719
|
|
|
44498
44720
|
for (const path2 of state.assignments) {
|
|
@@ -44543,7 +44765,7 @@ collectorVisitor]));
|
|
|
44543
44765
|
id,
|
|
44544
44766
|
} = opts;
|
|
44545
44767
|
|
|
44546
|
-
if (!init && !unique && (kind === 'var' || kind === 'let') && path
|
|
44768
|
+
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
44769
|
path.pushContainer('params', id);
|
|
44548
44770
|
path.scope.registerBinding('param', path.get('params')[path.node.params.length - 1]);
|
|
44549
44771
|
return;
|
|
@@ -44777,14 +44999,14 @@ collectorVisitor]));
|
|
|
44777
44999
|
init.push(assignmentExpression$3('=', decl.id, decl.init));
|
|
44778
45000
|
}
|
|
44779
45001
|
|
|
44780
|
-
const ids = Object.keys(getBindingIdentifiers$
|
|
45002
|
+
const ids = Object.keys(getBindingIdentifiers$2(decl, false, true, true));
|
|
44781
45003
|
|
|
44782
45004
|
for (const name2 of ids) {
|
|
44783
45005
|
emit(identifier$3(name2), decl.init != null);
|
|
44784
45006
|
}
|
|
44785
45007
|
}
|
|
44786
45008
|
|
|
44787
|
-
if (parentPath.parentPath.
|
|
45009
|
+
if (parentPath.parentPath.isForXStatement({left: parent})) {
|
|
44788
45010
|
parentPath.replaceWith(firstId);
|
|
44789
45011
|
} else if (init.length === 0) {
|
|
44790
45012
|
parentPath.remove();
|
|
@@ -44914,7 +45136,7 @@ function getDeepestCommonAncestorFrom(paths, filter) {
|
|
|
44914
45136
|
|
|
44915
45137
|
const first = ancestries[0];
|
|
44916
45138
|
|
|
44917
|
-
depthLoop:
|
|
45139
|
+
depthLoop: for (let i = 0; i < minDepth; i++) {
|
|
44918
45140
|
const shouldMatch = first[i];
|
|
44919
45141
|
|
|
44920
45142
|
for (const ancestry of ancestries) {
|
|
@@ -45129,7 +45351,7 @@ function getParentConditionalPath(binding, path, name) {
|
|
|
45129
45351
|
}
|
|
45130
45352
|
|
|
45131
45353
|
if (parentPath.isFunction()) {
|
|
45132
|
-
if (parentPath.parentPath.scope.getBinding(name) !== binding)
|
|
45354
|
+
if (name == null || parentPath.parentPath.scope.getBinding(name) !== binding)
|
|
45133
45355
|
return;
|
|
45134
45356
|
}
|
|
45135
45357
|
|
|
@@ -45646,6 +45868,7 @@ var hooks = [
|
|
|
45646
45868
|
if (parent.isIfStatement() && self.key === 'consequent' || self.key === 'body' && (parent.isLoop() || parent.isArrowFunctionExpression())) {
|
|
45647
45869
|
self.replaceWith({
|
|
45648
45870
|
type: 'BlockStatement',
|
|
45871
|
+
directives: [],
|
|
45649
45872
|
body: [],
|
|
45650
45873
|
});
|
|
45651
45874
|
return true;
|
|
@@ -45653,8 +45876,6 @@ var hooks = [
|
|
|
45653
45876
|
},
|
|
45654
45877
|
];
|
|
45655
45878
|
|
|
45656
|
-
var {getBindingIdentifiers: getBindingIdentifiers$2} = lib_exports;
|
|
45657
|
-
|
|
45658
45879
|
function remove() {
|
|
45659
45880
|
_assertUnremoved.call(this);
|
|
45660
45881
|
resync.call(this);
|
|
@@ -45674,7 +45895,7 @@ function remove() {
|
|
|
45674
45895
|
}
|
|
45675
45896
|
|
|
45676
45897
|
function _removeFromScope() {
|
|
45677
|
-
const bindings = getBindingIdentifiers
|
|
45898
|
+
const bindings = getBindingIdentifiers(this.node, false, false, true);
|
|
45678
45899
|
Object
|
|
45679
45900
|
.keys(bindings)
|
|
45680
45901
|
.forEach((name) => this.scope.removeBinding(name));
|
|
@@ -46114,7 +46335,7 @@ function _replaceWith(node) {
|
|
|
46114
46335
|
|
|
46115
46336
|
this.debug(`Replace with ${node?.type}`);
|
|
46116
46337
|
getCachedPaths(this)?.set(node, this).delete(this.node);
|
|
46117
|
-
this.node =
|
|
46338
|
+
this.node = node;
|
|
46118
46339
|
this.container[this.key] = node;
|
|
46119
46340
|
}
|
|
46120
46341
|
|
|
@@ -47133,8 +47354,7 @@ function standardizeSuperProperty(superProp) {
|
|
|
47133
47354
|
|
|
47134
47355
|
if (superProp.node.computed) {
|
|
47135
47356
|
const tmp = superProp.scope.generateDeclaredUidIdentifier('tmp');
|
|
47136
|
-
const object = superProp.node
|
|
47137
|
-
const property = superProp.node.property;
|
|
47357
|
+
const {object, property} = superProp.node;
|
|
47138
47358
|
|
|
47139
47359
|
assignmentPath.get('left').replaceWith(memberExpression2(object, assignmentExpression2('=', tmp, property), true));
|
|
47140
47360
|
assignmentPath.get('right').replaceWith(rightExpression(isLogicalAssignment ? '=' : op, memberExpression2(object, identifier3(tmp.name), true), value));
|
|
@@ -47594,7 +47814,7 @@ function referencesImport(moduleSource, importName) {
|
|
|
47594
47814
|
|
|
47595
47815
|
const binding = this.scope.getBinding(this.node.name);
|
|
47596
47816
|
|
|
47597
|
-
if (
|
|
47817
|
+
if (binding?.kind !== 'module')
|
|
47598
47818
|
return false;
|
|
47599
47819
|
|
|
47600
47820
|
const path = binding.path;
|
|
@@ -48014,6 +48234,8 @@ function isInStrictMode() {
|
|
|
48014
48234
|
return true;
|
|
48015
48235
|
}
|
|
48016
48236
|
}
|
|
48237
|
+
|
|
48238
|
+
return false;
|
|
48017
48239
|
});
|
|
48018
48240
|
|
|
48019
48241
|
return !!strictParent;
|
|
@@ -48492,7 +48714,6 @@ var NodePath_Final = class NodePath {
|
|
|
48492
48714
|
constructor(hub, parent) {
|
|
48493
48715
|
__publicField(this, 'contexts', []);
|
|
48494
48716
|
__publicField(this, 'state', null);
|
|
48495
|
-
__publicField(this, 'opts', null);
|
|
48496
48717
|
__publicField(this, '_traverseFlags', 0);
|
|
48497
48718
|
__publicField(this, 'skipKeys', null);
|
|
48498
48719
|
__publicField(this, 'parentPath', null);
|
|
@@ -48841,13 +49062,13 @@ var TraversalContext = class {
|
|
|
48841
49062
|
visitIndex++;
|
|
48842
49063
|
resync.call(path);
|
|
48843
49064
|
|
|
49065
|
+
if (path.key === null)
|
|
49066
|
+
continue;
|
|
49067
|
+
|
|
48844
49068
|
if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
|
|
48845
49069
|
pushContext.call(path, this);
|
|
48846
49070
|
}
|
|
48847
49071
|
|
|
48848
|
-
if (path.key === null)
|
|
48849
|
-
continue;
|
|
48850
|
-
|
|
48851
49072
|
const {node} = path;
|
|
48852
49073
|
|
|
48853
49074
|
if (visited.has(node))
|
|
@@ -48872,6 +49093,9 @@ var TraversalContext = class {
|
|
|
48872
49093
|
}
|
|
48873
49094
|
|
|
48874
49095
|
for (let i = 0; i < visitIndex; i++) {
|
|
49096
|
+
if (queue[i].key === null)
|
|
49097
|
+
continue;
|
|
49098
|
+
|
|
48875
49099
|
popContext.call(queue[i]);
|
|
48876
49100
|
}
|
|
48877
49101
|
|
|
@@ -49158,6 +49382,24 @@ function stop() {
|
|
|
49158
49382
|
this._traverseFlags |= SHOULD_SKIP | SHOULD_STOP;
|
|
49159
49383
|
}
|
|
49160
49384
|
|
|
49385
|
+
function _forceSetScope() {
|
|
49386
|
+
let path = this.parentPath;
|
|
49387
|
+
|
|
49388
|
+
if ((this.key === 'key' || this.listKey === 'decorators') && path.isMethod() || this.key === 'discriminant' && path.isSwitchStatement()) {
|
|
49389
|
+
path = path.parentPath;
|
|
49390
|
+
}
|
|
49391
|
+
|
|
49392
|
+
let target;
|
|
49393
|
+
|
|
49394
|
+
while (path && !target) {
|
|
49395
|
+
target = path.scope;
|
|
49396
|
+
path = path.parentPath;
|
|
49397
|
+
}
|
|
49398
|
+
|
|
49399
|
+
this.scope = this.getScope(target);
|
|
49400
|
+
this.scope?.init();
|
|
49401
|
+
}
|
|
49402
|
+
|
|
49161
49403
|
function setScope() {
|
|
49162
49404
|
if (this.opts?.noScope)
|
|
49163
49405
|
return;
|
|
@@ -49350,7 +49592,7 @@ function traverse3(parent, opts = {}, scope2, state, parentPath, visitSelf) {
|
|
|
49350
49592
|
}
|
|
49351
49593
|
|
|
49352
49594
|
explode$1(opts);
|
|
49353
|
-
traverseNode(parent, opts, scope2, state, parentPath,
|
|
49595
|
+
traverseNode(parent, opts, scope2, state, parentPath, void 0, visitSelf);
|
|
49354
49596
|
}
|
|
49355
49597
|
|
|
49356
49598
|
traverse3.visitors = visitors;
|