@vue/compiler-sfc 3.6.0-alpha.2 → 3.6.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,8 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.6.0-alpha.2
2
+ * @vue/compiler-sfc v3.6.0-alpha.3
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- /*! #__NO_SIDE_EFFECTS__ */
7
6
  // @__NO_SIDE_EFFECTS__
8
7
  function makeMap(str) {
9
8
  const map = /* @__PURE__ */ Object.create(null);
@@ -45,10 +44,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
45
44
  );
46
45
  const cacheStringFunction = (fn) => {
47
46
  const cache = /* @__PURE__ */ Object.create(null);
48
- return (str) => {
47
+ return ((str) => {
49
48
  const hit = cache[str];
50
49
  return hit || (cache[str] = fn(str));
51
- };
50
+ });
52
51
  };
53
52
  const camelizeRE = /-(\w)/g;
54
53
  const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
@@ -271,6 +270,9 @@ function shouldSetAsAttr(tagName, key) {
271
270
  if ((key === "width" || key === "height") && (tagName === "IMG" || tagName === "VIDEO" || tagName === "CANVAS" || tagName === "SOURCE")) {
272
271
  return true;
273
272
  }
273
+ if (key === "sandbox" && tagName === "IFRAME") {
274
+ return true;
275
+ }
274
276
  return false;
275
277
  }
276
278
 
@@ -2921,7 +2923,7 @@ function requireLib$2 () {
2921
2923
  allowUndeclaredExports: false,
2922
2924
  allowYieldOutsideFunction: false,
2923
2925
  plugins: [],
2924
- strictMode: null,
2926
+ strictMode: undefined,
2925
2927
  ranges: false,
2926
2928
  tokens: false,
2927
2929
  createImportExpressions: false,
@@ -3109,7 +3111,6 @@ function requireLib$2 () {
3109
3111
  }
3110
3112
  convertPrivateNameToPrivateIdentifier(node) {
3111
3113
  const name = super.getPrivateNameSV(node);
3112
- node = node;
3113
3114
  delete node.id;
3114
3115
  node.name = name;
3115
3116
  return this.castNodeTo(node, "PrivateIdentifier");
@@ -3224,8 +3225,8 @@ function requireLib$2 () {
3224
3225
  node.kind = "init";
3225
3226
  return this.finishNode(node, "Property");
3226
3227
  }
3227
- isValidLVal(type, isUnparenthesizedInAssign, binding) {
3228
- return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding);
3228
+ isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
3229
+ return type === "Property" ? "value" : super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
3229
3230
  }
3230
3231
  isAssignable(node, isBinding) {
3231
3232
  if (node != null && this.isObjectProperty(node)) {
@@ -3259,11 +3260,14 @@ function requireLib$2 () {
3259
3260
  finishCallExpression(unfinished, optional) {
3260
3261
  const node = super.finishCallExpression(unfinished, optional);
3261
3262
  if (node.callee.type === "Import") {
3262
- var _ref, _ref2;
3263
+ var _ref;
3263
3264
  this.castNodeTo(node, "ImportExpression");
3264
3265
  node.source = node.arguments[0];
3265
3266
  node.options = (_ref = node.arguments[1]) != null ? _ref : null;
3266
- node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
3267
+ {
3268
+ var _ref2;
3269
+ node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
3270
+ }
3267
3271
  delete node.arguments;
3268
3272
  delete node.callee;
3269
3273
  } else if (node.type === "OptionalCallExpression") {
@@ -3939,13 +3943,13 @@ function requireLib$2 () {
3939
3943
  context.push(types.j_expr, types.j_oTag);
3940
3944
  };
3941
3945
  }
3942
- let 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-\u088e\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\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\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-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\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";
3943
- let 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-\u1ace\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";
3946
+ let 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";
3947
+ let 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";
3944
3948
  const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
3945
3949
  const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
3946
3950
  nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
3947
- const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
3948
- const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
3951
+ const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
3952
+ const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
3949
3953
  function isInAstralSet(code, set) {
3950
3954
  let pos = 0x10000;
3951
3955
  for (let i = 0, length = set.length; i < length; i += 2) {
@@ -4129,7 +4133,7 @@ function requireLib$2 () {
4129
4133
  if (bindingType & 8) {
4130
4134
  return scope.names.has(name);
4131
4135
  }
4132
- const type = scope.names.get(name);
4136
+ const type = scope.names.get(name) || 0;
4133
4137
  if (bindingType & 16) {
4134
4138
  return (type & 2) > 0 || !this.treatFunctionsAsVarInScope(scope) && (type & 1) > 0;
4135
4139
  }
@@ -4444,9 +4448,8 @@ function requireLib$2 () {
4444
4448
  return this.flowParseDeclareInterface(node);
4445
4449
  } else if (this.match(82)) {
4446
4450
  return this.flowParseDeclareExportDeclaration(node, insideModule);
4447
- } else {
4448
- this.unexpected();
4449
4451
  }
4452
+ throw this.unexpected();
4450
4453
  }
4451
4454
  flowParseDeclareVariable(node) {
4452
4455
  this.next();
@@ -4466,18 +4469,17 @@ function requireLib$2 () {
4466
4469
  const body = bodyNode.body = [];
4467
4470
  this.expect(5);
4468
4471
  while (!this.match(8)) {
4469
- let bodyNode = this.startNode();
4472
+ const bodyNode = this.startNode();
4470
4473
  if (this.match(83)) {
4471
4474
  this.next();
4472
4475
  if (!this.isContextual(130) && !this.match(87)) {
4473
4476
  this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, this.state.lastTokStartLoc);
4474
4477
  }
4475
- super.parseImport(bodyNode);
4478
+ body.push(super.parseImport(bodyNode));
4476
4479
  } else {
4477
4480
  this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule);
4478
- bodyNode = this.flowParseDeclare(bodyNode, true);
4481
+ body.push(this.flowParseDeclare(bodyNode, true));
4479
4482
  }
4480
- body.push(bodyNode);
4481
4483
  }
4482
4484
  this.scope.exit();
4483
4485
  this.expect(8);
@@ -4538,7 +4540,7 @@ function requireLib$2 () {
4538
4540
  }
4539
4541
  }
4540
4542
  }
4541
- this.unexpected();
4543
+ throw this.unexpected();
4542
4544
  }
4543
4545
  flowParseDeclareModuleExports(node) {
4544
4546
  this.next();
@@ -4746,7 +4748,7 @@ function requireLib$2 () {
4746
4748
  return this.finishNode(node, "TypeParameterInstantiation");
4747
4749
  }
4748
4750
  flowParseTypeParameterInstantiationCallOrNew() {
4749
- if (this.reScan_lt() !== 47) return;
4751
+ if (this.reScan_lt() !== 47) return null;
4750
4752
  const node = this.startNode();
4751
4753
  const oldInType = this.state.inType;
4752
4754
  node.params = [];
@@ -5242,8 +5244,7 @@ function requireLib$2 () {
5242
5244
  }
5243
5245
  throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
5244
5246
  }
5245
- this.unexpected();
5246
- return;
5247
+ throw this.unexpected();
5247
5248
  case 135:
5248
5249
  return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
5249
5250
  case 136:
@@ -5274,7 +5275,7 @@ function requireLib$2 () {
5274
5275
  return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier());
5275
5276
  }
5276
5277
  }
5277
- this.unexpected();
5278
+ throw this.unexpected();
5278
5279
  }
5279
5280
  flowParsePostfixType() {
5280
5281
  const startLoc = this.state.startLoc;
@@ -5735,15 +5736,15 @@ function requireLib$2 () {
5735
5736
  }
5736
5737
  return exprList;
5737
5738
  }
5738
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
5739
- const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
5740
- if (canBePattern && !this.state.maybeInArrowParameters) {
5739
+ parseArrayLike(close, isTuple, refExpressionErrors) {
5740
+ const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
5741
+ if (refExpressionErrors != null && !this.state.maybeInArrowParameters) {
5741
5742
  this.toReferencedList(node.elements);
5742
5743
  }
5743
5744
  return node;
5744
5745
  }
5745
- isValidLVal(type, isParenthesized, binding) {
5746
- return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding);
5746
+ isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
5747
+ return type === "TypeCastExpression" || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
5747
5748
  }
5748
5749
  parseClassProperty(node) {
5749
5750
  if (this.match(14)) {
@@ -7592,10 +7593,8 @@ function requireLib$2 () {
7592
7593
  setLeadingComments(commentWS.trailingNode, comments);
7593
7594
  }
7594
7595
  } else {
7595
- const {
7596
- containingNode: node,
7597
- start: commentStart
7598
- } = commentWS;
7596
+ const node = commentWS.containingNode;
7597
+ const commentStart = commentWS.start;
7599
7598
  if (this.input.charCodeAt(this.offsetToSourcePos(commentStart) - 1) === 44) {
7600
7599
  switch (node.type) {
7601
7600
  case "ObjectExpression":
@@ -8416,7 +8415,7 @@ function requireLib$2 () {
8416
8415
  const commentWhitespace = {
8417
8416
  start: this.sourceToOffsetPos(spaceStart),
8418
8417
  end: this.sourceToOffsetPos(end),
8419
- comments,
8418
+ comments: comments,
8420
8419
  leadingNode: null,
8421
8420
  trailingNode: null,
8422
8421
  containingNode: null
@@ -9427,7 +9426,7 @@ function requireLib$2 () {
9427
9426
  };
9428
9427
  }
9429
9428
  return {
9430
- node,
9429
+ node: node,
9431
9430
  error: null,
9432
9431
  thrown: false,
9433
9432
  aborted: false,
@@ -9683,7 +9682,7 @@ function requireLib$2 () {
9683
9682
  if (isLHS) {
9684
9683
  if (parenthesized.type === "Identifier") {
9685
9684
  this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, node);
9686
- } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) {
9685
+ } else if (parenthesized.type !== "CallExpression" && parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) {
9687
9686
  this.raise(Errors.InvalidParenthesizedAssignment, node);
9688
9687
  }
9689
9688
  } else {
@@ -9959,7 +9958,7 @@ function requireLib$2 () {
9959
9958
  node.right = this.parseMaybeAssignAllowIn();
9960
9959
  return this.finishNode(node, "AssignmentPattern");
9961
9960
  }
9962
- isValidLVal(type, isUnparenthesizedInAssign, binding) {
9961
+ isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
9963
9962
  switch (type) {
9964
9963
  case "AssignmentPattern":
9965
9964
  return "left";
@@ -9975,13 +9974,17 @@ function requireLib$2 () {
9975
9974
  return "properties";
9976
9975
  case "VoidPattern":
9977
9976
  return true;
9977
+ case "CallExpression":
9978
+ if (!disallowCallExpression && !this.state.strict && this.optionFlags & 8192) {
9979
+ return true;
9980
+ }
9978
9981
  }
9979
9982
  return false;
9980
9983
  }
9981
9984
  isOptionalMemberExpression(expression) {
9982
9985
  return expression.type === "OptionalMemberExpression";
9983
9986
  }
9984
- checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false) {
9987
+ checkLVal(expression, ancestor, binding = 64, checkClashes = false, strictModeChanged = false, hasParenthesizedAncestor = false, disallowCallExpression = false) {
9985
9988
  var _expression$extra;
9986
9989
  const type = expression.type;
9987
9990
  if (this.isObjectMethod(expression)) return;
@@ -10016,7 +10019,9 @@ function requireLib$2 () {
10016
10019
  } else if (type === "VoidPattern" && ancestor.type === "CatchClause") {
10017
10020
  this.raise(Errors.VoidPatternCatchClauseParam, expression);
10018
10021
  }
10019
- const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
10022
+ const unwrappedExpression = unwrapParenthesizedExpression(expression);
10023
+ disallowCallExpression || (disallowCallExpression = unwrappedExpression.type === "CallExpression" && (unwrappedExpression.callee.type === "Import" || unwrappedExpression.callee.type === "Super"));
10024
+ const validity = this.isValidLVal(type, disallowCallExpression, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding);
10020
10025
  if (validity === true) return;
10021
10026
  if (validity === false) {
10022
10027
  const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding;
@@ -10039,11 +10044,11 @@ function requireLib$2 () {
10039
10044
  if (Array.isArray(val)) {
10040
10045
  for (const child of val) {
10041
10046
  if (child) {
10042
- this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
10047
+ this.checkLVal(child, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, true);
10043
10048
  }
10044
10049
  }
10045
10050
  } else if (val) {
10046
- this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression);
10051
+ this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, disallowCallExpression);
10047
10052
  }
10048
10053
  }
10049
10054
  checkIdentifier(at, bindingType, strictModeChanged = false) {
@@ -10091,6 +10096,7 @@ function requireLib$2 () {
10091
10096
  return true;
10092
10097
  }
10093
10098
  }
10099
+ const keywordAndTSRelationalOperator = /in(?:stanceof)?|as|satisfies/y;
10094
10100
  function nonNull(x) {
10095
10101
  if (x == null) {
10096
10102
  throw new Error(`Unexpected ${x} value.`);
@@ -10474,6 +10480,7 @@ function requireLib$2 () {
10474
10480
  this.expect(14);
10475
10481
  withProperty.value = this.tsParseImportTypeWithPropertyValue();
10476
10482
  node.properties = [this.finishObjectProperty(withProperty)];
10483
+ this.eat(12);
10477
10484
  this.expect(8);
10478
10485
  return this.finishNode(node, "ObjectExpression");
10479
10486
  }
@@ -10977,7 +10984,7 @@ function requireLib$2 () {
10977
10984
  }
10978
10985
  }
10979
10986
  }
10980
- this.unexpected();
10987
+ throw this.unexpected();
10981
10988
  }
10982
10989
  tsParseArrayTypeOrHigher() {
10983
10990
  const {
@@ -11541,52 +11548,22 @@ function requireLib$2 () {
11541
11548
  }
11542
11549
  default:
11543
11550
  if (tokenIsIdentifier(startType)) {
11544
- return this.tsParseDeclaration(node, this.state.value, true, null);
11551
+ return this.tsParseDeclaration(node, this.state.type, true, null);
11545
11552
  }
11546
11553
  }
11547
11554
  });
11548
11555
  }
11549
11556
  tsTryParseExportDeclaration() {
11550
- return this.tsParseDeclaration(this.startNode(), this.state.value, true, null);
11557
+ return this.tsParseDeclaration(this.startNode(), this.state.type, true, null);
11551
11558
  }
11552
- tsParseExpressionStatement(node, expr, decorators) {
11553
- switch (expr.name) {
11554
- case "declare":
11555
- {
11556
- const declaration = this.tsTryParseDeclare(node);
11557
- if (declaration) {
11558
- declaration.declare = true;
11559
- }
11560
- return declaration;
11561
- }
11562
- case "global":
11563
- if (this.match(5)) {
11564
- this.scope.enter(1024);
11565
- this.prodParam.enter(0);
11566
- const mod = node;
11567
- mod.kind = "global";
11568
- {
11569
- node.global = true;
11570
- }
11571
- mod.id = expr;
11572
- mod.body = this.tsParseModuleBlock();
11573
- this.scope.exit();
11574
- this.prodParam.exit();
11575
- return this.finishNode(mod, "TSModuleDeclaration");
11576
- }
11577
- break;
11578
- default:
11579
- return this.tsParseDeclaration(node, expr.name, false, decorators);
11580
- }
11581
- }
11582
- tsParseDeclaration(node, value, next, decorators) {
11583
- switch (value) {
11584
- case "abstract":
11559
+ tsParseDeclaration(node, type, next, decorators) {
11560
+ switch (type) {
11561
+ case 124:
11585
11562
  if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
11586
11563
  return this.tsParseAbstractDeclaration(node, decorators);
11587
11564
  }
11588
11565
  break;
11589
- case "module":
11566
+ case 127:
11590
11567
  if (this.tsCheckLineTerminator(next)) {
11591
11568
  if (this.match(134)) {
11592
11569
  return this.tsParseAmbientExternalModuleDeclaration(node);
@@ -11596,13 +11573,13 @@ function requireLib$2 () {
11596
11573
  }
11597
11574
  }
11598
11575
  break;
11599
- case "namespace":
11576
+ case 128:
11600
11577
  if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
11601
11578
  node.kind = "namespace";
11602
11579
  return this.tsParseModuleOrNamespaceDeclaration(node);
11603
11580
  }
11604
11581
  break;
11605
- case "type":
11582
+ case 130:
11606
11583
  if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
11607
11584
  return this.tsParseTypeAliasDeclaration(node);
11608
11585
  }
@@ -11743,8 +11720,8 @@ function requireLib$2 () {
11743
11720
  this.tsCheckForInvalidTypeCasts(exprList);
11744
11721
  return exprList;
11745
11722
  }
11746
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
11747
- const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
11723
+ parseArrayLike(close, isTuple, refExpressionErrors) {
11724
+ const node = super.parseArrayLike(close, isTuple, refExpressionErrors);
11748
11725
  if (node.type === "ArrayExpression") {
11749
11726
  this.tsCheckForInvalidTypeCasts(node.elements);
11750
11727
  }
@@ -11773,6 +11750,7 @@ function requireLib$2 () {
11773
11750
  if (!noCalls && this.atPossibleAsyncArrow(base)) {
11774
11751
  const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc);
11775
11752
  if (asyncArrowFn) {
11753
+ state.stop = true;
11776
11754
  return asyncArrowFn;
11777
11755
  }
11778
11756
  }
@@ -11988,19 +11966,85 @@ function requireLib$2 () {
11988
11966
  return declaration;
11989
11967
  }
11990
11968
  parseStatementContent(flags, decorators) {
11991
- if (this.match(75) && this.isLookaheadContextual("enum")) {
11992
- const node = this.startNode();
11993
- this.expect(75);
11994
- return this.tsParseEnumDeclaration(node, {
11995
- const: true
11996
- });
11997
- }
11998
- if (this.isContextual(126)) {
11999
- return this.tsParseEnumDeclaration(this.startNode());
12000
- }
12001
- if (this.isContextual(129)) {
12002
- const result = this.tsParseInterfaceDeclaration(this.startNode());
12003
- if (result) return result;
11969
+ if (!this.state.containsEsc) {
11970
+ switch (this.state.type) {
11971
+ case 75:
11972
+ {
11973
+ if (this.isLookaheadContextual("enum")) {
11974
+ const node = this.startNode();
11975
+ this.expect(75);
11976
+ return this.tsParseEnumDeclaration(node, {
11977
+ const: true
11978
+ });
11979
+ }
11980
+ break;
11981
+ }
11982
+ case 124:
11983
+ case 125:
11984
+ {
11985
+ if (this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()) {
11986
+ const token = this.state.type;
11987
+ const node = this.startNode();
11988
+ this.next();
11989
+ const declaration = token === 125 ? this.tsTryParseDeclare(node) : this.tsParseAbstractDeclaration(node, decorators);
11990
+ if (declaration) {
11991
+ if (token === 125) {
11992
+ declaration.declare = true;
11993
+ }
11994
+ return declaration;
11995
+ } else {
11996
+ node.expression = this.createIdentifier(this.startNodeAt(node.loc.start), token === 125 ? "declare" : "abstract");
11997
+ this.semicolon(false);
11998
+ return this.finishNode(node, "ExpressionStatement");
11999
+ }
12000
+ }
12001
+ break;
12002
+ }
12003
+ case 126:
12004
+ return this.tsParseEnumDeclaration(this.startNode());
12005
+ case 112:
12006
+ {
12007
+ const nextCh = this.lookaheadCharCode();
12008
+ if (nextCh === 123) {
12009
+ const node = this.startNode();
12010
+ return this.tsParseAmbientExternalModuleDeclaration(node);
12011
+ }
12012
+ break;
12013
+ }
12014
+ case 129:
12015
+ {
12016
+ const result = this.tsParseInterfaceDeclaration(this.startNode());
12017
+ if (result) return result;
12018
+ break;
12019
+ }
12020
+ case 127:
12021
+ {
12022
+ if (this.nextTokenIsIdentifierOrStringLiteralOnSameLine()) {
12023
+ const node = this.startNode();
12024
+ this.next();
12025
+ return this.tsParseDeclaration(node, 127, false, decorators);
12026
+ }
12027
+ break;
12028
+ }
12029
+ case 128:
12030
+ {
12031
+ if (this.nextTokenIsIdentifierOnSameLine()) {
12032
+ const node = this.startNode();
12033
+ this.next();
12034
+ return this.tsParseDeclaration(node, 128, false, decorators);
12035
+ }
12036
+ break;
12037
+ }
12038
+ case 130:
12039
+ {
12040
+ if (this.nextTokenIsIdentifierOnSameLine()) {
12041
+ const node = this.startNode();
12042
+ this.next();
12043
+ return this.tsParseTypeAliasDeclaration(node);
12044
+ }
12045
+ break;
12046
+ }
12047
+ }
12004
12048
  }
12005
12049
  return super.parseStatementContent(flags, decorators);
12006
12050
  }
@@ -12084,10 +12128,6 @@ function requireLib$2 () {
12084
12128
  this.raise(TSErrors.ClassMethodHasDeclare, methodOrProp);
12085
12129
  }
12086
12130
  }
12087
- parseExpressionStatement(node, expr, decorators) {
12088
- const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined;
12089
- return decl || super.parseExpressionStatement(node, expr, decorators);
12090
- }
12091
12131
  shouldParseExportDeclaration() {
12092
12132
  if (this.tsIsDeclarationStart()) return true;
12093
12133
  return super.shouldParseExportDeclaration();
@@ -12412,7 +12452,7 @@ function requireLib$2 () {
12412
12452
  super.checkToRestConversion(node, allowPattern);
12413
12453
  }
12414
12454
  }
12415
- isValidLVal(type, isUnparenthesizedInAssign, binding) {
12455
+ isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding) {
12416
12456
  switch (type) {
12417
12457
  case "TSTypeCastExpression":
12418
12458
  return true;
@@ -12425,7 +12465,7 @@ function requireLib$2 () {
12425
12465
  case "TSTypeAssertion":
12426
12466
  return (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true];
12427
12467
  default:
12428
- return super.isValidLVal(type, isUnparenthesizedInAssign, binding);
12468
+ return super.isValidLVal(type, disallowCallExpression, isUnparenthesizedInAssign, binding);
12429
12469
  }
12430
12470
  }
12431
12471
  parseBindingAtom() {
@@ -12587,10 +12627,11 @@ function requireLib$2 () {
12587
12627
  node.abstract = true;
12588
12628
  this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
12589
12629
  return this.tsParseInterfaceDeclaration(node);
12630
+ } else {
12631
+ return null;
12590
12632
  }
12591
- } else {
12592
- this.unexpected(null, 80);
12593
12633
  }
12634
+ throw this.unexpected(null, 80);
12594
12635
  }
12595
12636
  parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
12596
12637
  const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
@@ -12700,7 +12741,7 @@ function requireLib$2 () {
12700
12741
  }
12701
12742
  }
12702
12743
  fillOptionalPropertiesForTSESLint(node) {
12703
- var _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
12744
+ var _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$optional5, _node$readonly4, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
12704
12745
  switch (node.type) {
12705
12746
  case "ExpressionStatement":
12706
12747
  (_node$directive = node.directive) != null ? _node$directive : node.directive = undefined;
@@ -12791,6 +12832,10 @@ function requireLib$2 () {
12791
12832
  (_node$declare6 = node.declare) != null ? _node$declare6 : node.declare = false;
12792
12833
  (_node$extends = node.extends) != null ? _node$extends : node.extends = [];
12793
12834
  return;
12835
+ case "TSMappedType":
12836
+ (_node$optional5 = node.optional) != null ? _node$optional5 : node.optional = false;
12837
+ (_node$readonly4 = node.readonly) != null ? _node$readonly4 : node.readonly = undefined;
12838
+ return;
12794
12839
  case "TSModuleDeclaration":
12795
12840
  (_node$declare7 = node.declare) != null ? _node$declare7 : node.declare = false;
12796
12841
  (_node$global = node.global) != null ? _node$global : node.global = node.kind === "global";
@@ -12802,6 +12847,32 @@ function requireLib$2 () {
12802
12847
  return;
12803
12848
  }
12804
12849
  }
12850
+ chStartsBindingIdentifierAndNotRelationalOperator(ch, pos) {
12851
+ if (isIdentifierStart(ch)) {
12852
+ keywordAndTSRelationalOperator.lastIndex = pos;
12853
+ if (keywordAndTSRelationalOperator.test(this.input)) {
12854
+ const endCh = this.codePointAtPos(keywordAndTSRelationalOperator.lastIndex);
12855
+ if (!isIdentifierChar(endCh) && endCh !== 92) {
12856
+ return false;
12857
+ }
12858
+ }
12859
+ return true;
12860
+ } else if (ch === 92) {
12861
+ return true;
12862
+ } else {
12863
+ return false;
12864
+ }
12865
+ }
12866
+ nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine() {
12867
+ const next = this.nextTokenInLineStart();
12868
+ const nextCh = this.codePointAtPos(next);
12869
+ return this.chStartsBindingIdentifierAndNotRelationalOperator(nextCh, next);
12870
+ }
12871
+ nextTokenIsIdentifierOrStringLiteralOnSameLine() {
12872
+ const next = this.nextTokenInLineStart();
12873
+ const nextCh = this.codePointAtPos(next);
12874
+ return this.chStartsBindingIdentifier(nextCh, next) || nextCh === 34 || nextCh === 39;
12875
+ }
12805
12876
  };
12806
12877
  function isPossiblyLiteralEnum(expression) {
12807
12878
  if (expression.type !== "MemberExpression") return false;
@@ -12930,8 +13001,8 @@ function requireLib$2 () {
12930
13001
  parseBindingAtom() {
12931
13002
  return this.parsePlaceholder("Pattern") || super.parseBindingAtom();
12932
13003
  }
12933
- isValidLVal(type, isParenthesized, binding) {
12934
- return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding);
13004
+ isValidLVal(type, disallowCallExpression, isParenthesized, binding) {
13005
+ return type === "Placeholder" || super.isValidLVal(type, disallowCallExpression, isParenthesized, binding);
12935
13006
  }
12936
13007
  toAssignable(node, isLHS) {
12937
13008
  if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
@@ -13331,7 +13402,7 @@ function requireLib$2 () {
13331
13402
  }
13332
13403
  this.next();
13333
13404
  node.right = this.parseMaybeAssign();
13334
- this.checkLVal(left, this.finishNode(node, "AssignmentExpression"));
13405
+ this.checkLVal(left, this.finishNode(node, "AssignmentExpression"), undefined, undefined, undefined, undefined, operator === "||=" || operator === "&&=" || operator === "??=");
13335
13406
  return node;
13336
13407
  } else if (ownExpressionErrors) {
13337
13408
  this.checkExpressionErrors(refExpressionErrors, true);
@@ -13805,7 +13876,7 @@ function requireLib$2 () {
13805
13876
  }
13806
13877
  case 0:
13807
13878
  {
13808
- return this.parseArrayLike(3, true, false, refExpressionErrors);
13879
+ return this.parseArrayLike(3, false, refExpressionErrors);
13809
13880
  }
13810
13881
  case 5:
13811
13882
  {
@@ -13862,25 +13933,22 @@ function requireLib$2 () {
13862
13933
  if (pipeProposal) {
13863
13934
  return this.parseTopicReference(pipeProposal);
13864
13935
  }
13865
- this.unexpected();
13866
- break;
13936
+ throw this.unexpected();
13867
13937
  }
13868
13938
  case 47:
13869
13939
  {
13870
13940
  const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
13871
13941
  if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) {
13872
- this.expectOnePlugin(["jsx", "flow", "typescript"]);
13873
- } else {
13874
- this.unexpected();
13942
+ throw this.expectOnePlugin(["jsx", "flow", "typescript"]);
13875
13943
  }
13876
- break;
13944
+ throw this.unexpected();
13877
13945
  }
13878
13946
  default:
13879
13947
  {
13880
13948
  if (type === 137) {
13881
13949
  return this.parseDecimalLiteral(this.state.value);
13882
13950
  } else if (type === 2 || type === 1) {
13883
- return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true);
13951
+ return this.parseArrayLike(this.state.type === 2 ? 4 : 3, true);
13884
13952
  } else if (type === 6 || type === 7) {
13885
13953
  return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
13886
13954
  }
@@ -13917,7 +13985,7 @@ function requireLib$2 () {
13917
13985
  }
13918
13986
  return id;
13919
13987
  } else {
13920
- this.unexpected();
13988
+ throw this.unexpected();
13921
13989
  }
13922
13990
  }
13923
13991
  }
@@ -13930,9 +13998,8 @@ function requireLib$2 () {
13930
13998
  this.state.end--;
13931
13999
  this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
13932
14000
  return this.parseTopicReference(pipeProposal);
13933
- } else {
13934
- this.unexpected();
13935
14001
  }
14002
+ throw this.unexpected();
13936
14003
  }
13937
14004
  parseTopicReference(pipeProposal) {
13938
14005
  const node = this.startNode();
@@ -14008,10 +14075,18 @@ function requireLib$2 () {
14008
14075
  parseSuper() {
14009
14076
  const node = this.startNode();
14010
14077
  this.next();
14011
- if (this.match(10) && !this.scope.allowDirectSuper && !(this.optionFlags & 16)) {
14012
- this.raise(Errors.SuperNotAllowed, node);
14013
- } else if (!this.scope.allowSuper && !(this.optionFlags & 16)) {
14014
- this.raise(Errors.UnexpectedSuper, node);
14078
+ if (this.match(10) && !this.scope.allowDirectSuper) {
14079
+ {
14080
+ if (!(this.optionFlags & 16)) {
14081
+ this.raise(Errors.SuperNotAllowed, node);
14082
+ }
14083
+ }
14084
+ } else if (!this.scope.allowSuper) {
14085
+ {
14086
+ if (!(this.optionFlags & 16)) {
14087
+ this.raise(Errors.UnexpectedSuper, node);
14088
+ }
14089
+ }
14015
14090
  }
14016
14091
  if (!this.match(10) && !this.match(0) && !this.match(16)) {
14017
14092
  this.raise(Errors.UnsupportedSuper, node);
@@ -14525,7 +14600,7 @@ function requireLib$2 () {
14525
14600
  this.scope.exit();
14526
14601
  return finishedNode;
14527
14602
  }
14528
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
14603
+ parseArrayLike(close, isTuple, refExpressionErrors) {
14529
14604
  if (isTuple) {
14530
14605
  this.expectPlugin("recordAndTuple");
14531
14606
  }
@@ -15151,9 +15226,7 @@ function requireLib$2 () {
15151
15226
  if (!this.isContextual(107)) {
15152
15227
  return false;
15153
15228
  }
15154
- const next = this.nextTokenInLineStart();
15155
- const nextCh = this.codePointAtPos(next);
15156
- return this.chStartsBindingIdentifier(nextCh, next);
15229
+ return this.nextTokenIsIdentifierOnSameLine();
15157
15230
  }
15158
15231
  isForUsing() {
15159
15232
  if (!this.isContextual(107)) {
@@ -15172,6 +15245,11 @@ function requireLib$2 () {
15172
15245
  }
15173
15246
  return false;
15174
15247
  }
15248
+ nextTokenIsIdentifierOnSameLine() {
15249
+ const next = this.nextTokenInLineStart();
15250
+ const nextCh = this.codePointAtPos(next);
15251
+ return this.chStartsBindingIdentifier(nextCh, next);
15252
+ }
15175
15253
  isAwaitUsing() {
15176
15254
  if (!this.isContextual(96)) {
15177
15255
  return false;
@@ -16314,7 +16392,7 @@ function requireLib$2 () {
16314
16392
  this.sawUnambiguousESM = true;
16315
16393
  return this.finishNode(node2, "ExportDefaultDeclaration");
16316
16394
  }
16317
- this.unexpected(null, 5);
16395
+ throw this.unexpected(null, 5);
16318
16396
  }
16319
16397
  eatExportStar(node) {
16320
16398
  return this.eat(55);
@@ -16906,54 +16984,54 @@ function requireLib$2 () {
16906
16984
  }
16907
16985
  class Parser extends StatementParser {
16908
16986
  constructor(options, input, pluginsMap) {
16909
- options = getOptions(options);
16910
- super(options, input);
16911
- this.options = options;
16987
+ const normalizedOptions = getOptions(options);
16988
+ super(normalizedOptions, input);
16989
+ this.options = normalizedOptions;
16912
16990
  this.initializeScopes();
16913
16991
  this.plugins = pluginsMap;
16914
- this.filename = options.sourceFilename;
16915
- this.startIndex = options.startIndex;
16992
+ this.filename = normalizedOptions.sourceFilename;
16993
+ this.startIndex = normalizedOptions.startIndex;
16916
16994
  let optionFlags = 0;
16917
- if (options.allowAwaitOutsideFunction) {
16995
+ if (normalizedOptions.allowAwaitOutsideFunction) {
16918
16996
  optionFlags |= 1;
16919
16997
  }
16920
- if (options.allowReturnOutsideFunction) {
16998
+ if (normalizedOptions.allowReturnOutsideFunction) {
16921
16999
  optionFlags |= 2;
16922
17000
  }
16923
- if (options.allowImportExportEverywhere) {
17001
+ if (normalizedOptions.allowImportExportEverywhere) {
16924
17002
  optionFlags |= 8;
16925
17003
  }
16926
- if (options.allowSuperOutsideMethod) {
17004
+ if (normalizedOptions.allowSuperOutsideMethod) {
16927
17005
  optionFlags |= 16;
16928
17006
  }
16929
- if (options.allowUndeclaredExports) {
17007
+ if (normalizedOptions.allowUndeclaredExports) {
16930
17008
  optionFlags |= 64;
16931
17009
  }
16932
- if (options.allowNewTargetOutsideFunction) {
17010
+ if (normalizedOptions.allowNewTargetOutsideFunction) {
16933
17011
  optionFlags |= 4;
16934
17012
  }
16935
- if (options.allowYieldOutsideFunction) {
17013
+ if (normalizedOptions.allowYieldOutsideFunction) {
16936
17014
  optionFlags |= 32;
16937
17015
  }
16938
- if (options.ranges) {
17016
+ if (normalizedOptions.ranges) {
16939
17017
  optionFlags |= 128;
16940
17018
  }
16941
- if (options.tokens) {
17019
+ if (normalizedOptions.tokens) {
16942
17020
  optionFlags |= 256;
16943
17021
  }
16944
- if (options.createImportExpressions) {
17022
+ if (normalizedOptions.createImportExpressions) {
16945
17023
  optionFlags |= 512;
16946
17024
  }
16947
- if (options.createParenthesizedExpressions) {
17025
+ if (normalizedOptions.createParenthesizedExpressions) {
16948
17026
  optionFlags |= 1024;
16949
17027
  }
16950
- if (options.errorRecovery) {
17028
+ if (normalizedOptions.errorRecovery) {
16951
17029
  optionFlags |= 2048;
16952
17030
  }
16953
- if (options.attachComment) {
17031
+ if (normalizedOptions.attachComment) {
16954
17032
  optionFlags |= 4096;
16955
17033
  }
16956
- if (options.annexB) {
17034
+ if (normalizedOptions.annexB) {
16957
17035
  optionFlags |= 8192;
16958
17036
  }
16959
17037
  this.optionFlags = optionFlags;
@@ -16967,10 +17045,10 @@ function requireLib$2 () {
16967
17045
  const program = this.startNode();
16968
17046
  this.nextToken();
16969
17047
  file.errors = null;
16970
- this.parseTopLevel(file, program);
16971
- file.errors = this.state.errors;
16972
- file.comments.length = this.state.commentsLen;
16973
- return file;
17048
+ const result = this.parseTopLevel(file, program);
17049
+ result.errors = this.state.errors;
17050
+ result.comments.length = this.state.commentsLen;
17051
+ return result;
16974
17052
  }
16975
17053
  }
16976
17054
  function parse(input, options) {
@@ -17302,16 +17380,34 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
17302
17380
  (id) => markScopeIdentifier(node, id, knownIds)
17303
17381
  );
17304
17382
  }
17383
+ } else if (node.type === "SwitchStatement") {
17384
+ if (node.scopeIds) {
17385
+ node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
17386
+ } else {
17387
+ walkSwitchStatement(
17388
+ node,
17389
+ false,
17390
+ (id) => markScopeIdentifier(node, id, knownIds)
17391
+ );
17392
+ }
17305
17393
  } else if (node.type === "CatchClause" && node.param) {
17306
- for (const id of extractIdentifiers$1(node.param)) {
17307
- markScopeIdentifier(node, id, knownIds);
17394
+ if (node.scopeIds) {
17395
+ node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
17396
+ } else {
17397
+ for (const id of extractIdentifiers$1(node.param)) {
17398
+ markScopeIdentifier(node, id, knownIds);
17399
+ }
17308
17400
  }
17309
17401
  } else if (isForStatement(node)) {
17310
- walkForStatement(
17311
- node,
17312
- false,
17313
- (id) => markScopeIdentifier(node, id, knownIds)
17314
- );
17402
+ if (node.scopeIds) {
17403
+ node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
17404
+ } else {
17405
+ walkForStatement(
17406
+ node,
17407
+ false,
17408
+ (id) => markScopeIdentifier(node, id, knownIds)
17409
+ );
17410
+ }
17315
17411
  }
17316
17412
  },
17317
17413
  leave(node, parent) {
@@ -17334,14 +17430,15 @@ function isReferencedIdentifier(id, parent, parentStack) {
17334
17430
  if (id.name === "arguments") {
17335
17431
  return false;
17336
17432
  }
17337
- if (isReferenced$1(id, parent)) {
17433
+ if (isReferenced$1(id, parent, parentStack[parentStack.length - 2])) {
17338
17434
  return true;
17339
17435
  }
17340
17436
  switch (parent.type) {
17341
17437
  case "AssignmentExpression":
17342
17438
  case "AssignmentPattern":
17343
17439
  return true;
17344
- case "ObjectPattern":
17440
+ case "ObjectProperty":
17441
+ return parent.key !== id && isInDestructureAssignment(parent, parentStack);
17345
17442
  case "ArrayPattern":
17346
17443
  return isInDestructureAssignment(parent, parentStack);
17347
17444
  }
@@ -17381,7 +17478,8 @@ function walkFunctionParams(node, onIdent) {
17381
17478
  }
17382
17479
  }
17383
17480
  function walkBlockDeclarations(block, onIdent) {
17384
- for (const stmt of block.body) {
17481
+ const body = block.type === "SwitchCase" ? block.consequent : block.body;
17482
+ for (const stmt of body) {
17385
17483
  if (stmt.type === "VariableDeclaration") {
17386
17484
  if (stmt.declare) continue;
17387
17485
  for (const decl of stmt.declarations) {
@@ -17394,6 +17492,8 @@ function walkBlockDeclarations(block, onIdent) {
17394
17492
  onIdent(stmt.id);
17395
17493
  } else if (isForStatement(stmt)) {
17396
17494
  walkForStatement(stmt, true, onIdent);
17495
+ } else if (stmt.type === "SwitchStatement") {
17496
+ walkSwitchStatement(stmt, true, onIdent);
17397
17497
  }
17398
17498
  }
17399
17499
  }
@@ -17410,6 +17510,20 @@ function walkForStatement(stmt, isVar, onIdent) {
17410
17510
  }
17411
17511
  }
17412
17512
  }
17513
+ function walkSwitchStatement(stmt, isVar, onIdent) {
17514
+ for (const cs of stmt.cases) {
17515
+ for (const stmt2 of cs.consequent) {
17516
+ if (stmt2.type === "VariableDeclaration" && (stmt2.kind === "var" ? isVar : !isVar)) {
17517
+ for (const decl of stmt2.declarations) {
17518
+ for (const id of extractIdentifiers$1(decl.id)) {
17519
+ onIdent(id);
17520
+ }
17521
+ }
17522
+ }
17523
+ }
17524
+ walkBlockDeclarations(cs, onIdent);
17525
+ }
17526
+ }
17413
17527
  function extractIdentifiers$1(param, nodes = []) {
17414
17528
  switch (param.type) {
17415
17529
  case "Identifier":
@@ -17510,7 +17624,7 @@ function isReferenced$1(node, parent, grandparent) {
17510
17624
  if (parent.key === node) {
17511
17625
  return !!parent.computed;
17512
17626
  }
17513
- return true;
17627
+ return !grandparent || grandparent.type !== "ObjectPattern";
17514
17628
  // no: class { NODE = value; }
17515
17629
  // yes: class { [NODE] = value; }
17516
17630
  // yes: class { key = NODE; }
@@ -17560,6 +17674,9 @@ function isReferenced$1(node, parent, grandparent) {
17560
17674
  // yes: export { NODE as foo };
17561
17675
  // no: export { NODE as foo } from "foo";
17562
17676
  case "ExportSpecifier":
17677
+ if (grandparent == null ? void 0 : grandparent.source) {
17678
+ return false;
17679
+ }
17563
17680
  return parent.local === node;
17564
17681
  // no: import NODE from "foo";
17565
17682
  // no: import * as NODE from "foo";
@@ -17693,7 +17810,7 @@ function isCoreComponent(tag) {
17693
17810
  return BASE_TRANSITION;
17694
17811
  }
17695
17812
  }
17696
- const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/;
17813
+ const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
17697
17814
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
17698
17815
  const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
17699
17816
  const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
@@ -17773,7 +17890,7 @@ const isMemberExpressionNode = (exp, context) => {
17773
17890
  }
17774
17891
  };
17775
17892
  const isMemberExpression$1 = isMemberExpressionNode;
17776
- const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
17893
+ const fnExpRE = /^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/;
17777
17894
  const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
17778
17895
  const isFnExpressionNode = (exp, context) => {
17779
17896
  try {
@@ -17858,6 +17975,9 @@ function hasDynamicKeyVBind(node) {
17858
17975
  function isText$1(node) {
17859
17976
  return node.type === 5 || node.type === 2;
17860
17977
  }
17978
+ function isVPre(p) {
17979
+ return p.type === 7 && p.name === "pre";
17980
+ }
17861
17981
  function isVSlot(p) {
17862
17982
  return p.type === 7 && p.name === "slot";
17863
17983
  }
@@ -18156,7 +18276,7 @@ const tokenizer = new Tokenizer(stack, {
18156
18276
  ondirarg(start, end) {
18157
18277
  if (start === end) return;
18158
18278
  const arg = getSlice(start, end);
18159
- if (inVPre) {
18279
+ if (inVPre && !isVPre(currentProp)) {
18160
18280
  currentProp.name += arg;
18161
18281
  setLocEnd(currentProp.nameLoc, end);
18162
18282
  } else {
@@ -18171,7 +18291,7 @@ const tokenizer = new Tokenizer(stack, {
18171
18291
  },
18172
18292
  ondirmodifier(start, end) {
18173
18293
  const mod = getSlice(start, end);
18174
- if (inVPre) {
18294
+ if (inVPre && !isVPre(currentProp)) {
18175
18295
  currentProp.name += "." + mod;
18176
18296
  setLocEnd(currentProp.nameLoc, end);
18177
18297
  } else if (currentProp.name === "slot") {
@@ -18735,6 +18855,11 @@ function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) {
18735
18855
  } else if (child.type === 12) {
18736
18856
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
18737
18857
  if (constantType >= 2) {
18858
+ if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
18859
+ child.codegenNode.arguments.push(
18860
+ -1 + (` /* ${PatchFlagNames[-1]} */` )
18861
+ );
18862
+ }
18738
18863
  toCache.push(child);
18739
18864
  continue;
18740
18865
  }
@@ -18763,7 +18888,6 @@ function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) {
18763
18888
  }
18764
18889
  }
18765
18890
  let cachedAsArray = false;
18766
- const slotCacheKeys = [];
18767
18891
  if (toCache.length === children.length && node.type === 1) {
18768
18892
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray$3(node.codegenNode.children)) {
18769
18893
  node.codegenNode.children = getCacheExpression(
@@ -18773,7 +18897,6 @@ function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) {
18773
18897
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray$3(node.codegenNode.children) && node.codegenNode.children.type === 15) {
18774
18898
  const slot = getSlotNode(node.codegenNode, "default");
18775
18899
  if (slot) {
18776
- slotCacheKeys.push(context.cached.length);
18777
18900
  slot.returns = getCacheExpression(
18778
18901
  createArrayExpression(slot.returns)
18779
18902
  );
@@ -18783,7 +18906,6 @@ function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) {
18783
18906
  const slotName = findDir$1(node, "slot", true);
18784
18907
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
18785
18908
  if (slot) {
18786
- slotCacheKeys.push(context.cached.length);
18787
18909
  slot.returns = getCacheExpression(
18788
18910
  createArrayExpression(slot.returns)
18789
18911
  );
@@ -18793,23 +18915,12 @@ function walk$1(node, parent, context, doNotHoistNode = false, inFor = false) {
18793
18915
  }
18794
18916
  if (!cachedAsArray) {
18795
18917
  for (const child of toCache) {
18796
- slotCacheKeys.push(context.cached.length);
18797
18918
  child.codegenNode = context.cache(child.codegenNode);
18798
18919
  }
18799
18920
  }
18800
- if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray$3(node.codegenNode.children) && node.codegenNode.children.type === 15) {
18801
- node.codegenNode.children.properties.push(
18802
- createObjectProperty(
18803
- `__`,
18804
- createSimpleExpression(JSON.stringify(slotCacheKeys), false)
18805
- )
18806
- );
18807
- }
18808
18921
  function getCacheExpression(value) {
18809
18922
  const exp = context.cache(value);
18810
- if (inFor && context.hmr) {
18811
- exp.needArraySpread = true;
18812
- }
18923
+ exp.needArraySpread = true;
18813
18924
  return exp;
18814
18925
  }
18815
18926
  function getSlotNode(node2, name) {
@@ -23680,14 +23791,17 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
23680
23791
  knownIds
23681
23792
  );
23682
23793
  const children = [];
23794
+ const isTSNode = TS_NODE_TYPES.includes(ast.type);
23683
23795
  ids.sort((a, b) => a.start - b.start);
23684
23796
  ids.forEach((id, i) => {
23685
23797
  const start = id.start - 1;
23686
23798
  const end = id.end - 1;
23687
23799
  const last = ids[i - 1];
23688
- const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
23689
- if (leadingText.length || id.prefix) {
23690
- children.push(leadingText + (id.prefix || ``));
23800
+ if (!(isTSNode && i === 0)) {
23801
+ const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
23802
+ if (leadingText.length || id.prefix) {
23803
+ children.push(leadingText + (id.prefix || ``));
23804
+ }
23691
23805
  }
23692
23806
  const source = rawExp.slice(start, end);
23693
23807
  children.push(
@@ -23702,7 +23816,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
23702
23816
  id.isConstant ? 3 : 0
23703
23817
  )
23704
23818
  );
23705
- if (i === ids.length - 1 && end < rawExp.length) {
23819
+ if (i === ids.length - 1 && end < rawExp.length && !isTSNode) {
23706
23820
  children.push(rawExp.slice(end));
23707
23821
  }
23708
23822
  });
@@ -23740,7 +23854,7 @@ function isConst(type) {
23740
23854
  }
23741
23855
 
23742
23856
  const transformIf = createStructuralDirectiveTransform$1(
23743
- /^(if|else|else-if)$/,
23857
+ /^(?:if|else|else-if)$/,
23744
23858
  (node, dir, context) => {
23745
23859
  return processIf$1(node, dir, context, (ifNode, branch, isRoot) => {
23746
23860
  const siblings = context.parent.children;
@@ -23809,7 +23923,7 @@ function processIf$1(node, dir, context, processCodegen) {
23809
23923
  continue;
23810
23924
  }
23811
23925
  if (sibling && sibling.type === 9) {
23812
- if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
23926
+ if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
23813
23927
  context.onError(
23814
23928
  createCompilerError(30, node.loc)
23815
23929
  );
@@ -23958,90 +24072,6 @@ function getParentCondition(node) {
23958
24072
  }
23959
24073
  }
23960
24074
 
23961
- const transformBind = (dir, _node, context) => {
23962
- const { modifiers, loc } = dir;
23963
- const arg = dir.arg;
23964
- let { exp } = dir;
23965
- if (exp && exp.type === 4 && !exp.content.trim()) {
23966
- {
23967
- context.onError(
23968
- createCompilerError(34, loc)
23969
- );
23970
- return {
23971
- props: [
23972
- createObjectProperty(arg, createSimpleExpression("", true, loc))
23973
- ]
23974
- };
23975
- }
23976
- }
23977
- if (!exp) {
23978
- if (arg.type !== 4 || !arg.isStatic) {
23979
- context.onError(
23980
- createCompilerError(
23981
- 52,
23982
- arg.loc
23983
- )
23984
- );
23985
- return {
23986
- props: [
23987
- createObjectProperty(arg, createSimpleExpression("", true, loc))
23988
- ]
23989
- };
23990
- }
23991
- transformBindShorthand(dir, context);
23992
- exp = dir.exp;
23993
- }
23994
- if (arg.type !== 4) {
23995
- arg.children.unshift(`(`);
23996
- arg.children.push(`) || ""`);
23997
- } else if (!arg.isStatic) {
23998
- arg.content = `${arg.content} || ""`;
23999
- }
24000
- if (modifiers.some((mod) => mod.content === "camel")) {
24001
- if (arg.type === 4) {
24002
- if (arg.isStatic) {
24003
- arg.content = camelize(arg.content);
24004
- } else {
24005
- arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
24006
- }
24007
- } else {
24008
- arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
24009
- arg.children.push(`)`);
24010
- }
24011
- }
24012
- if (!context.inSSR) {
24013
- if (modifiers.some((mod) => mod.content === "prop")) {
24014
- injectPrefix(arg, ".");
24015
- }
24016
- if (modifiers.some((mod) => mod.content === "attr")) {
24017
- injectPrefix(arg, "^");
24018
- }
24019
- }
24020
- return {
24021
- props: [createObjectProperty(arg, exp)]
24022
- };
24023
- };
24024
- const transformBindShorthand = (dir, context) => {
24025
- const arg = dir.arg;
24026
- const propName = camelize(arg.content);
24027
- dir.exp = createSimpleExpression(propName, false, arg.loc);
24028
- {
24029
- dir.exp = processExpression(dir.exp, context);
24030
- }
24031
- };
24032
- const injectPrefix = (arg, prefix) => {
24033
- if (arg.type === 4) {
24034
- if (arg.isStatic) {
24035
- arg.content = prefix + arg.content;
24036
- } else {
24037
- arg.content = `\`${prefix}\${${arg.content}}\``;
24038
- }
24039
- } else {
24040
- arg.children.unshift(`'${prefix}' + (`);
24041
- arg.children.push(`)`);
24042
- }
24043
- };
24044
-
24045
24075
  const transformFor = createStructuralDirectiveTransform$1(
24046
24076
  "for",
24047
24077
  (node, dir, context) => {
@@ -24054,9 +24084,6 @@ const transformFor = createStructuralDirectiveTransform$1(
24054
24084
  const memo = findDir$1(node, "memo");
24055
24085
  const keyProp = findProp$1(node, `key`, false, true);
24056
24086
  const isDirKey = keyProp && keyProp.type === 7;
24057
- if (isDirKey && !keyProp.exp) {
24058
- transformBindShorthand(keyProp, context);
24059
- }
24060
24087
  let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
24061
24088
  if (memo && keyExp && isDirKey) {
24062
24089
  {
@@ -24337,7 +24364,9 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
24337
24364
  const dynamicSlots = [];
24338
24365
  let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
24339
24366
  if (!context.ssr && context.prefixIdentifiers) {
24340
- hasDynamicSlots = hasScopeRef(node, context.identifiers);
24367
+ hasDynamicSlots = node.props.some(
24368
+ (prop) => isVSlot(prop) && (hasScopeRef(prop.arg, context.identifiers) || hasScopeRef(prop.exp, context.identifiers))
24369
+ ) || children.some((child) => hasScopeRef(child, context.identifiers));
24341
24370
  }
24342
24371
  const onComponentSlot = findDir$1(node, "slot", true);
24343
24372
  if (onComponentSlot) {
@@ -24400,7 +24429,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
24400
24429
  );
24401
24430
  } else if (vElse = findDir$1(
24402
24431
  slotElement,
24403
- /^else(-if)?$/,
24432
+ /^else(?:-if)?$/,
24404
24433
  true
24405
24434
  /* allowEmpty */
24406
24435
  )) {
@@ -24412,7 +24441,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
24412
24441
  break;
24413
24442
  }
24414
24443
  }
24415
- if (prev && isTemplateNode(prev) && findDir$1(prev, /^(else-)?if$/)) {
24444
+ if (prev && isTemplateNode(prev) && findDir$1(prev, /^(?:else-)?if$/)) {
24416
24445
  let conditional = dynamicSlots[dynamicSlots.length - 1];
24417
24446
  while (conditional.alternate.type === 19) {
24418
24447
  conditional = conditional.alternate;
@@ -25327,6 +25356,65 @@ const transformOn$1 = (dir, node, context, augmentor) => {
25327
25356
  return ret;
25328
25357
  };
25329
25358
 
25359
+ const transformBind = (dir, _node, context) => {
25360
+ const { modifiers, loc } = dir;
25361
+ const arg = dir.arg;
25362
+ let { exp } = dir;
25363
+ if (exp && exp.type === 4 && !exp.content.trim()) {
25364
+ {
25365
+ context.onError(
25366
+ createCompilerError(34, loc)
25367
+ );
25368
+ return {
25369
+ props: [
25370
+ createObjectProperty(arg, createSimpleExpression("", true, loc))
25371
+ ]
25372
+ };
25373
+ }
25374
+ }
25375
+ if (arg.type !== 4) {
25376
+ arg.children.unshift(`(`);
25377
+ arg.children.push(`) || ""`);
25378
+ } else if (!arg.isStatic) {
25379
+ arg.content = arg.content ? `${arg.content} || ""` : `""`;
25380
+ }
25381
+ if (modifiers.some((mod) => mod.content === "camel")) {
25382
+ if (arg.type === 4) {
25383
+ if (arg.isStatic) {
25384
+ arg.content = camelize(arg.content);
25385
+ } else {
25386
+ arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
25387
+ }
25388
+ } else {
25389
+ arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
25390
+ arg.children.push(`)`);
25391
+ }
25392
+ }
25393
+ if (!context.inSSR) {
25394
+ if (modifiers.some((mod) => mod.content === "prop")) {
25395
+ injectPrefix(arg, ".");
25396
+ }
25397
+ if (modifiers.some((mod) => mod.content === "attr")) {
25398
+ injectPrefix(arg, "^");
25399
+ }
25400
+ }
25401
+ return {
25402
+ props: [createObjectProperty(arg, exp)]
25403
+ };
25404
+ };
25405
+ const injectPrefix = (arg, prefix) => {
25406
+ if (arg.type === 4) {
25407
+ if (arg.isStatic) {
25408
+ arg.content = prefix + arg.content;
25409
+ } else {
25410
+ arg.content = `\`${prefix}\${${arg.content}}\``;
25411
+ }
25412
+ } else {
25413
+ arg.children.unshift(`'${prefix}' + (`);
25414
+ arg.children.push(`)`);
25415
+ }
25416
+ };
25417
+
25330
25418
  const transformText$1 = (node, context) => {
25331
25419
  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
25332
25420
  return () => {
@@ -25511,7 +25599,7 @@ const seen$1 = /* @__PURE__ */ new WeakSet();
25511
25599
  const transformMemo = (node, context) => {
25512
25600
  if (node.type === 1) {
25513
25601
  const dir = findDir$1(node, "memo");
25514
- if (!dir || seen$1.has(node)) {
25602
+ if (!dir || seen$1.has(node) || context.inSSR) {
25515
25603
  return;
25516
25604
  }
25517
25605
  seen$1.add(node);
@@ -25533,9 +25621,36 @@ const transformMemo = (node, context) => {
25533
25621
  }
25534
25622
  };
25535
25623
 
25624
+ const transformVBindShorthand = (node, context) => {
25625
+ if (node.type === 1) {
25626
+ for (const prop of node.props) {
25627
+ if (prop.type === 7 && prop.name === "bind" && (!prop.exp || // #13930 :foo in in-DOM templates will be parsed into :foo="" by browser
25628
+ false) && prop.arg) {
25629
+ const arg = prop.arg;
25630
+ if (arg.type !== 4 || !arg.isStatic) {
25631
+ context.onError(
25632
+ createCompilerError(
25633
+ 52,
25634
+ arg.loc
25635
+ )
25636
+ );
25637
+ prop.exp = createSimpleExpression("", true, arg.loc);
25638
+ } else {
25639
+ const propName = camelize(arg.content);
25640
+ if (validFirstIdentCharRE.test(propName[0]) || // allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
25641
+ propName[0] === "-") {
25642
+ prop.exp = createSimpleExpression(propName, false, arg.loc);
25643
+ }
25644
+ }
25645
+ }
25646
+ }
25647
+ }
25648
+ };
25649
+
25536
25650
  function getBaseTransformPreset$1(prefixIdentifiers) {
25537
25651
  return [
25538
25652
  [
25653
+ transformVBindShorthand,
25539
25654
  transformOnce,
25540
25655
  transformIf,
25541
25656
  transformMemo,
@@ -26004,50 +26119,50 @@ const transformShow = (dir, node, context) => {
26004
26119
  };
26005
26120
  };
26006
26121
 
26007
- const transformTransition = (node, context) => {
26122
+ const transformTransition$1 = (node, context) => {
26008
26123
  if (node.type === 1 && node.tagType === 1) {
26009
26124
  const component = context.isBuiltInComponent(node.tag);
26010
26125
  if (component === TRANSITION) {
26011
- return () => {
26012
- if (!node.children.length) {
26013
- return;
26014
- }
26015
- if (hasMultipleChildren(node)) {
26016
- context.onError(
26017
- createDOMCompilerError(
26018
- 62,
26019
- {
26020
- start: node.children[0].loc.start,
26021
- end: node.children[node.children.length - 1].loc.end,
26022
- source: ""
26023
- }
26024
- )
26025
- );
26026
- }
26027
- const child = node.children[0];
26028
- if (child.type === 1) {
26029
- for (const p of child.props) {
26030
- if (p.type === 7 && p.name === "show") {
26031
- node.props.push({
26032
- type: 6,
26033
- name: "persisted",
26034
- nameLoc: node.loc,
26035
- value: void 0,
26036
- loc: node.loc
26037
- });
26038
- }
26039
- }
26040
- }
26041
- };
26126
+ return postTransformTransition(node, context.onError);
26042
26127
  }
26043
26128
  }
26044
26129
  };
26045
- function hasMultipleChildren(node) {
26130
+ function postTransformTransition(node, onError, hasMultipleChildren = defaultHasMultipleChildren) {
26131
+ return () => {
26132
+ if (!node.children.length) {
26133
+ return;
26134
+ }
26135
+ if (hasMultipleChildren(node)) {
26136
+ onError(
26137
+ createDOMCompilerError(62, {
26138
+ start: node.children[0].loc.start,
26139
+ end: node.children[node.children.length - 1].loc.end,
26140
+ source: ""
26141
+ })
26142
+ );
26143
+ }
26144
+ const child = node.children[0];
26145
+ if (child.type === 1) {
26146
+ for (const p of child.props) {
26147
+ if (p.type === 7 && p.name === "show") {
26148
+ node.props.push({
26149
+ type: 6,
26150
+ name: "persisted",
26151
+ nameLoc: node.loc,
26152
+ value: void 0,
26153
+ loc: node.loc
26154
+ });
26155
+ }
26156
+ }
26157
+ }
26158
+ };
26159
+ }
26160
+ function defaultHasMultipleChildren(node) {
26046
26161
  const children = node.children = node.children.filter(
26047
26162
  (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
26048
26163
  );
26049
26164
  const child = children[0];
26050
- return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
26165
+ return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
26051
26166
  }
26052
26167
 
26053
26168
  const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g;
@@ -26122,7 +26237,7 @@ const getCachedNode = (node) => {
26122
26237
  return node.codegenNode;
26123
26238
  }
26124
26239
  };
26125
- const dataAriaRE = /^(data|aria)-/;
26240
+ const dataAriaRE = /^(?:data|aria)-/;
26126
26241
  const isStringifiableAttr = (name, ns) => {
26127
26242
  return (ns === 0 ? isKnownHtmlAttr(name) : ns === 1 ? isKnownSvgAttr(name) : ns === 2 ? isKnownMathMLAttr(name) : false) || dataAriaRE.test(name);
26128
26243
  };
@@ -26133,6 +26248,9 @@ function analyzeNode(node) {
26133
26248
  if (node.type === 1 && isNonStringifiable(node.tag)) {
26134
26249
  return false;
26135
26250
  }
26251
+ if (node.type === 1 && findDir$1(node, "once", true)) {
26252
+ return false;
26253
+ }
26136
26254
  if (node.type === 12) {
26137
26255
  return [1, 0];
26138
26256
  }
@@ -26470,7 +26588,7 @@ const validateHtmlNesting = (node, context) => {
26470
26588
 
26471
26589
  const DOMNodeTransforms = [
26472
26590
  transformStyle,
26473
- ...[transformTransition, validateHtmlNesting]
26591
+ ...[transformTransition$1, validateHtmlNesting]
26474
26592
  ];
26475
26593
  const DOMDirectiveTransforms = {
26476
26594
  cloak: noopDirectiveTransform,
@@ -26646,12 +26764,14 @@ var CompilerDOM = /*#__PURE__*/Object.freeze({
26646
26764
  isStaticPropertyKey: isStaticPropertyKey,
26647
26765
  isTemplateNode: isTemplateNode,
26648
26766
  isText: isText$1,
26767
+ isVPre: isVPre,
26649
26768
  isVSlot: isVSlot,
26650
26769
  isValidHTMLNesting: isValidHTMLNesting,
26651
26770
  locStub: locStub,
26652
26771
  noopDirectiveTransform: noopDirectiveTransform,
26653
26772
  parse: parse$3,
26654
26773
  parserOptions: parserOptions,
26774
+ postTransformTransition: postTransformTransition,
26655
26775
  processExpression: processExpression,
26656
26776
  processFor: processFor$1,
26657
26777
  processIf: processIf$1,
@@ -26670,8 +26790,10 @@ var CompilerDOM = /*#__PURE__*/Object.freeze({
26670
26790
  transformModel: transformModel$1,
26671
26791
  transformOn: transformOn$1,
26672
26792
  transformStyle: transformStyle,
26793
+ transformVBindShorthand: transformVBindShorthand,
26673
26794
  traverseNode: traverseNode,
26674
26795
  unwrapTSNode: unwrapTSNode,
26796
+ validFirstIdentCharRE: validFirstIdentCharRE,
26675
26797
  walkBlockDeclarations: walkBlockDeclarations,
26676
26798
  walkFunctionParams: walkFunctionParams,
26677
26799
  walkIdentifiers: walkIdentifiers,
@@ -26775,7 +26897,7 @@ function genCssVarsFromList(vars, id, isProd, isSSR = false) {
26775
26897
  }
26776
26898
  function genVarName$1(id, raw, isProd, isSSR = false) {
26777
26899
  if (isProd) {
26778
- return hash(id + raw);
26900
+ return hash(id + raw).replace(/^\d/, (r) => `v${r}`);
26779
26901
  } else {
26780
26902
  return `${id}-${getEscapedCssVarName(raw, isSSR)}`;
26781
26903
  }
@@ -27130,8 +27252,8 @@ function createCache(max = 500) {
27130
27252
  }
27131
27253
  }
27132
27254
 
27133
- function isImportUsed(local, sfc) {
27134
- return resolveTemplateUsedIdentifiers(sfc).has(local);
27255
+ function isUsedInTemplate(identifier, sfc) {
27256
+ return resolveTemplateUsedIdentifiers(sfc).has(identifier);
27135
27257
  }
27136
27258
  const templateUsageCheckCache = createCache();
27137
27259
  function resolveTemplateUsedIdentifiers(sfc) {
@@ -27474,7 +27596,7 @@ function hmrShouldReload(prevImports, next) {
27474
27596
  return false;
27475
27597
  }
27476
27598
  for (const key in prevImports) {
27477
- if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) {
27599
+ if (!prevImports[key].isUsedInTemplate && isUsedInTemplate(key, next)) {
27478
27600
  return true;
27479
27601
  }
27480
27602
  }
@@ -31645,7 +31767,7 @@ function isRelativeUrl(url) {
31645
31767
  const firstChar = url.charAt(0);
31646
31768
  return firstChar === "." || firstChar === "~" || firstChar === "@";
31647
31769
  }
31648
- const externalRE = /^(https?:)?\/\//;
31770
+ const externalRE = /^(?:https?:)?\/\//;
31649
31771
  function isExternalUrl(url) {
31650
31772
  return externalRE.test(url);
31651
31773
  }
@@ -31819,7 +31941,7 @@ const transformSrcset = (node, context, options = defaultAssetUrlOptions) => {
31819
31941
  }
31820
31942
  }
31821
31943
  const shouldProcessUrl = (url) => {
31822
- return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url));
31944
+ return url && !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url));
31823
31945
  };
31824
31946
  if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) {
31825
31947
  return;
@@ -31920,7 +32042,8 @@ const newBlock = (node) => ({
31920
32042
  effect: [],
31921
32043
  operation: [],
31922
32044
  returns: [],
31923
- tempId: 0
32045
+ tempId: 0,
32046
+ hasDeferredVShow: false
31924
32047
  });
31925
32048
  function wrapTemplate(node, dirs) {
31926
32049
  if (node.tagType === 3) {
@@ -31984,6 +32107,40 @@ function getLiteralExpressionValue(exp) {
31984
32107
  }
31985
32108
  return exp.isStatic ? exp.content : null;
31986
32109
  }
32110
+ function isInTransition(context) {
32111
+ const parentNode = context.parent && context.parent.node;
32112
+ return !!(parentNode && isTransitionNode(parentNode));
32113
+ }
32114
+ function isTransitionNode(node) {
32115
+ return node.type === 1 && isTransitionTag(node.tag);
32116
+ }
32117
+ function isTransitionTag(tag) {
32118
+ tag = tag.toLowerCase();
32119
+ return tag === "transition" || tag === "vaportransition";
32120
+ }
32121
+ function isTransitionGroupTag(tag) {
32122
+ tag = tag.toLowerCase().replace(/-/g, "");
32123
+ return tag === "transitiongroup" || tag === "vaportransitiongroup";
32124
+ }
32125
+ function isKeepAliveTag(tag) {
32126
+ tag = tag.toLowerCase();
32127
+ return tag === "keepalive" || tag === "vaporkeepalive";
32128
+ }
32129
+ function isTeleportTag(tag) {
32130
+ tag = tag.toLowerCase();
32131
+ return tag === "teleport" || tag === "vaporteleport";
32132
+ }
32133
+ function isBuiltInComponent(tag) {
32134
+ if (isTeleportTag(tag)) {
32135
+ return "VaporTeleport";
32136
+ } else if (isKeepAliveTag(tag)) {
32137
+ return "VaporKeepAlive";
32138
+ } else if (isTransitionTag(tag)) {
32139
+ return "VaporTransition";
32140
+ } else if (isTransitionGroupTag(tag)) {
32141
+ return "VaporTransitionGroup";
32142
+ }
32143
+ }
31987
32144
 
31988
32145
  class TransformContext {
31989
32146
  constructor(ir, node, options = {}) {
@@ -32196,13 +32353,13 @@ const DELIMITERS_ARRAY = ["[", "]", ", "];
32196
32353
  const DELIMITERS_ARRAY_NEWLINE = [
32197
32354
  ["[", INDENT_START, NEWLINE],
32198
32355
  [INDENT_END, NEWLINE, "]"],
32199
- [", ", NEWLINE]
32356
+ [",", NEWLINE]
32200
32357
  ];
32201
32358
  const DELIMITERS_OBJECT = ["{ ", " }", ", "];
32202
32359
  const DELIMITERS_OBJECT_NEWLINE = [
32203
32360
  ["{", INDENT_START, NEWLINE],
32204
32361
  [INDENT_END, NEWLINE, "}"],
32205
- [", ", NEWLINE]
32362
+ [",", NEWLINE]
32206
32363
  ];
32207
32364
  function genCall(name, ...frags) {
32208
32365
  const hasPlaceholder = isArray$3(name);
@@ -35165,7 +35322,6 @@ function requireGenerated$3 () {
35165
35322
  case "AssignmentPattern":
35166
35323
  case "ArrayPattern":
35167
35324
  case "ObjectPattern":
35168
- case "OptionalMemberExpression":
35169
35325
  case "TSParameterProperty":
35170
35326
  case "TSAsExpression":
35171
35327
  case "TSSatisfiesExpression":
@@ -36037,13 +36193,13 @@ function requireIdentifier () {
36037
36193
  identifier.isIdentifierChar = isIdentifierChar;
36038
36194
  identifier.isIdentifierName = isIdentifierName;
36039
36195
  identifier.isIdentifierStart = isIdentifierStart;
36040
- let 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-\u088e\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\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\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-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\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";
36041
- let 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-\u1ace\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";
36196
+ let 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";
36197
+ let 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";
36042
36198
  const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
36043
36199
  const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
36044
36200
  nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
36045
- const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
36046
- const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
36201
+ const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489];
36202
+ const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
36047
36203
  function isInAstralSet(code, set) {
36048
36204
  let pos = 0x10000;
36049
36205
  for (let i = 0, length = set.length; i < length; i += 2) {
@@ -36290,7 +36446,7 @@ function requireUtils () {
36290
36446
  Object.defineProperty(utils, "__esModule", {
36291
36447
  value: true
36292
36448
  });
36293
- utils.allExpandedTypes = utils.VISITOR_KEYS = utils.NODE_PARENT_VALIDATIONS = utils.NODE_FIELDS = utils.FLIPPED_ALIAS_KEYS = utils.DEPRECATED_KEYS = utils.BUILDER_KEYS = utils.ALIAS_KEYS = void 0;
36449
+ utils.allExpandedTypes = utils.VISITOR_KEYS = utils.NODE_UNION_SHAPES__PRIVATE = utils.NODE_PARENT_VALIDATIONS = utils.NODE_FIELDS = utils.FLIPPED_ALIAS_KEYS = utils.DEPRECATED_KEYS = utils.BUILDER_KEYS = utils.ALIAS_KEYS = void 0;
36294
36450
  utils.arrayOf = arrayOf;
36295
36451
  utils.arrayOfType = arrayOfType;
36296
36452
  utils.assertEach = assertEach;
@@ -36317,6 +36473,7 @@ function requireUtils () {
36317
36473
  const BUILDER_KEYS = utils.BUILDER_KEYS = {};
36318
36474
  const DEPRECATED_KEYS = utils.DEPRECATED_KEYS = {};
36319
36475
  const NODE_PARENT_VALIDATIONS = utils.NODE_PARENT_VALIDATIONS = {};
36476
+ const NODE_UNION_SHAPES__PRIVATE = utils.NODE_UNION_SHAPES__PRIVATE = {};
36320
36477
  function getType(val) {
36321
36478
  if (Array.isArray(val)) {
36322
36479
  return "array";
@@ -36493,7 +36650,7 @@ function requireUtils () {
36493
36650
  }
36494
36651
  return validate;
36495
36652
  }
36496
- const validTypeOpts = new Set(["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]);
36653
+ const validTypeOpts = new Set(["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate", "unionShape"]);
36497
36654
  const validFieldKeys = new Set(["default", "optional", "deprecated", "validate"]);
36498
36655
  const store = {};
36499
36656
  function defineAliasedType(...aliases) {
@@ -36573,6 +36730,9 @@ function requireUtils () {
36573
36730
  if (opts.validate) {
36574
36731
  NODE_PARENT_VALIDATIONS[type] = opts.validate;
36575
36732
  }
36733
+ if (opts.unionShape) {
36734
+ NODE_UNION_SHAPES__PRIVATE[type] = opts.unionShape;
36735
+ }
36576
36736
  store[type] = opts;
36577
36737
  }
36578
36738
 
@@ -36688,6 +36848,12 @@ function requireDefinitions () {
36688
36848
  return _utils.NODE_PARENT_VALIDATIONS;
36689
36849
  }
36690
36850
  });
36851
+ Object.defineProperty(exports, "NODE_UNION_SHAPES__PRIVATE", {
36852
+ enumerable: true,
36853
+ get: function () {
36854
+ return _utils.NODE_UNION_SHAPES__PRIVATE;
36855
+ }
36856
+ });
36691
36857
  Object.defineProperty(exports, "PLACEHOLDERS", {
36692
36858
  enumerable: true,
36693
36859
  get: function () {
@@ -39370,7 +39536,7 @@ function requireLowercase () {
39370
39536
  validate(defs.typeAnnotation, node, "typeAnnotation", typeAnnotation, 1);
39371
39537
  return node;
39372
39538
  }
39373
- function tsTypeOperator(typeAnnotation, operator) {
39539
+ function tsTypeOperator(typeAnnotation, operator = "keyof") {
39374
39540
  const node = {
39375
39541
  type: "TSTypeOperator",
39376
39542
  typeAnnotation,
@@ -44486,10 +44652,15 @@ function isKeyOnlyBinding(expr, keyAst) {
44486
44652
 
44487
44653
  function genSetHtml(oper, context) {
44488
44654
  const { helper } = context;
44489
- const { value, element } = oper;
44655
+ const { value, element, isComponent } = oper;
44490
44656
  return [
44491
44657
  NEWLINE,
44492
- ...genCall(helper("setHtml"), `n${element}`, genExpression(value, context))
44658
+ ...genCall(
44659
+ // use setBlockHtml for component
44660
+ isComponent ? helper("setBlockHtml") : helper("setHtml"),
44661
+ `n${element}`,
44662
+ genExpression(value, context)
44663
+ )
44493
44664
  ];
44494
44665
  }
44495
44666
 
@@ -44578,7 +44749,7 @@ function genLiteralObjectProps(props, context) {
44578
44749
  }
44579
44750
  function genPropKey({ key: node, modifier, runtimeCamelize, handler, handlerModifiers }, context) {
44580
44751
  const { helper } = context;
44581
- const handlerModifierPostfix = handlerModifiers ? handlerModifiers.map(capitalize).join("") : "";
44752
+ const handlerModifierPostfix = handlerModifiers && handlerModifiers.options ? handlerModifiers.options.map(capitalize).join("") : "";
44582
44753
  if (node.isStatic) {
44583
44754
  const keyName = (handler ? toHandlerKey(node.content) : node.content) + handlerModifierPostfix;
44584
44755
  return [
@@ -44653,6 +44824,7 @@ function getSpecialHelper(keyName, tagName) {
44653
44824
 
44654
44825
  const setTemplateRefIdent = `_setTemplateRef`;
44655
44826
  function genSetTemplateRef(oper, context) {
44827
+ const [refValue, refKey] = genRefValue(oper.value, context);
44656
44828
  return [
44657
44829
  NEWLINE,
44658
44830
  oper.effect && `r${oper.element} = `,
@@ -44660,9 +44832,10 @@ function genSetTemplateRef(oper, context) {
44660
44832
  setTemplateRefIdent,
44661
44833
  // will be generated in root scope
44662
44834
  `n${oper.element}`,
44663
- genRefValue(oper.value, context),
44835
+ refValue,
44664
44836
  oper.effect ? `r${oper.element}` : oper.refFor ? "void 0" : void 0,
44665
- oper.refFor && "true"
44837
+ oper.refFor && "true",
44838
+ refKey
44666
44839
  )
44667
44840
  ];
44668
44841
  }
@@ -44673,19 +44846,24 @@ function genRefValue(value, context) {
44673
44846
  if (value && context.options.inline) {
44674
44847
  const binding = context.options.bindingMetadata[value.content];
44675
44848
  if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
44676
- return [value.content];
44849
+ return [[value.content], JSON.stringify(value.content)];
44677
44850
  }
44678
44851
  }
44679
- return genExpression(value, context);
44852
+ return [genExpression(value, context)];
44680
44853
  }
44681
44854
 
44682
44855
  function genSetText(oper, context) {
44683
44856
  const { helper } = context;
44684
- const { element, values, generated, jsx } = oper;
44857
+ const { element, values, generated, jsx, isComponent } = oper;
44685
44858
  const texts = combineValues(values, context, jsx);
44686
44859
  return [
44687
44860
  NEWLINE,
44688
- ...genCall(helper("setText"), `${generated ? "x" : "n"}${element}`, texts)
44861
+ ...genCall(
44862
+ // use setBlockText for component
44863
+ isComponent ? helper("setBlockText") : helper("setText"),
44864
+ `${generated && !isComponent ? "x" : "n"}${element}`,
44865
+ texts
44866
+ )
44689
44867
  ];
44690
44868
  }
44691
44869
  function combineValues(values, context, jsx) {
@@ -44703,18 +44881,21 @@ function combineValues(values, context, jsx) {
44703
44881
  function genGetTextChild(oper, context) {
44704
44882
  return [
44705
44883
  NEWLINE,
44706
- `const x${oper.parent} = ${context.helper("child")}(n${oper.parent})`
44884
+ `const x${oper.parent} = ${context.helper("txt")}(n${oper.parent})`
44707
44885
  ];
44708
44886
  }
44709
44887
 
44710
44888
  function genVShow(oper, context) {
44889
+ const { deferred, element } = oper;
44711
44890
  return [
44712
44891
  NEWLINE,
44713
- ...genCall(context.helper("applyVShow"), `n${oper.element}`, [
44892
+ deferred ? `deferredApplyVShows.push(() => ` : void 0,
44893
+ ...genCall(context.helper("applyVShow"), `n${element}`, [
44714
44894
  `() => (`,
44715
44895
  ...genExpression(oper.dir.exp, context),
44716
44896
  `)`
44717
- ])
44897
+ ]),
44898
+ deferred ? `)` : void 0
44718
44899
  ];
44719
44900
  }
44720
44901
 
@@ -44853,8 +45034,14 @@ function genCreateComponent(operation, context) {
44853
45034
  } else if (operation.asset) {
44854
45035
  return toValidAssetId(operation.tag, "component");
44855
45036
  } else {
45037
+ const { tag: tag2 } = operation;
45038
+ const builtInTag = isBuiltInComponent(tag2);
45039
+ if (builtInTag) {
45040
+ helper(builtInTag);
45041
+ return `_${builtInTag}`;
45042
+ }
44856
45043
  return genExpression(
44857
- extend(createSimpleExpression(operation.tag, false), { ast: null }),
45044
+ extend(createSimpleExpression(tag2, false), { ast: null }),
44858
45045
  context
44859
45046
  );
44860
45047
  }
@@ -44878,7 +45065,10 @@ function processInlineHandlers(props, context) {
44878
45065
  prop.values.forEach((value, i2) => {
44879
45066
  const isMemberExp = isMemberExpression$1(value, context.options);
44880
45067
  if (!isMemberExp) {
44881
- const name = getUniqueHandlerName(context, `_on_${prop.key.content}`);
45068
+ const name = getUniqueHandlerName(
45069
+ context,
45070
+ `_on_${prop.key.content.replace(/-/g, "_")}`
45071
+ );
44882
45072
  handlers.push({ name, value });
44883
45073
  ids[name] = null;
44884
45074
  prop.values[i2] = extend({ ast: null }, createSimpleExpression(name));
@@ -44945,7 +45135,7 @@ function genProp(prop, context, isStatic) {
44945
45135
  ...prop.handler ? genEventHandler(
44946
45136
  context,
44947
45137
  prop.values[0],
44948
- void 0,
45138
+ prop.handlerModifiers,
44949
45139
  true
44950
45140
  ) : isStatic ? ["() => (", ...values, ")"] : values,
44951
45141
  ...prop.model ? [...genModelEvent(prop, context), ...genModelModifiers(prop, context)] : []
@@ -45077,7 +45267,7 @@ function genSlotBlockWithProps(oper, context) {
45077
45267
  let propsName;
45078
45268
  let exitScope;
45079
45269
  let depth;
45080
- const { props } = oper;
45270
+ const { props, key, node } = oper;
45081
45271
  const idsOfProps = /* @__PURE__ */ new Set();
45082
45272
  if (props) {
45083
45273
  rawProps = props.content;
@@ -45099,17 +45289,39 @@ function genSlotBlockWithProps(oper, context) {
45099
45289
  idsOfProps.forEach(
45100
45290
  (id) => idMap[id] = isDestructureAssignment ? `${propsName}[${JSON.stringify(id)}]` : null
45101
45291
  );
45102
- const blockFn = context.withId(
45292
+ let blockFn = context.withId(
45103
45293
  () => genBlock(oper, context, [propsName]),
45104
45294
  idMap
45105
45295
  );
45106
45296
  exitScope && exitScope();
45297
+ if (key) {
45298
+ blockFn = [
45299
+ `() => {`,
45300
+ INDENT_START,
45301
+ NEWLINE,
45302
+ `return `,
45303
+ ...genCall(
45304
+ context.helper("createKeyedFragment"),
45305
+ [`() => `, ...genExpression(key, context)],
45306
+ blockFn
45307
+ ),
45308
+ INDENT_END,
45309
+ NEWLINE,
45310
+ `}`
45311
+ ];
45312
+ }
45313
+ if (node.type === 1 && // Not a real component
45314
+ !isTeleportTag(node.tag) && // Needs to determine whether to activate/deactivate based on instance.parent being KeepAlive
45315
+ !isKeepAliveTag(node.tag) && // Slot updates need to trigger TransitionGroup's onBeforeUpdate/onUpdated hook
45316
+ !isTransitionGroupTag(node.tag)) {
45317
+ blockFn = [`${context.helper("withVaporCtx")}(`, ...blockFn, `)`];
45318
+ }
45107
45319
  return blockFn;
45108
45320
  }
45109
45321
 
45110
45322
  function genSlotOutlet(oper, context) {
45111
45323
  const { helper } = context;
45112
- const { id, name, fallback } = oper;
45324
+ const { id, name, fallback, noSlotted } = oper;
45113
45325
  const [frag, push] = buildCodeFragment();
45114
45326
  const nameExpr = name.isStatic ? genExpression(name, context) : ["() => (", ...genExpression(name, context), ")"];
45115
45327
  let fallbackArg;
@@ -45123,7 +45335,11 @@ function genSlotOutlet(oper, context) {
45123
45335
  helper("createSlot"),
45124
45336
  nameExpr,
45125
45337
  genRawProps(oper.props, context) || "null",
45126
- fallbackArg
45338
+ fallbackArg,
45339
+ noSlotted && "undefined",
45340
+ // instance
45341
+ noSlotted && "true"
45342
+ // noSlotted
45127
45343
  )
45128
45344
  );
45129
45345
  return frag;
@@ -45239,12 +45455,18 @@ function genEffect({ operations }, context) {
45239
45455
  return frag;
45240
45456
  }
45241
45457
  function genInsertionState(operation, context) {
45458
+ const { parent, anchor, append, last } = operation;
45242
45459
  return [
45243
45460
  NEWLINE,
45244
45461
  ...genCall(
45245
45462
  context.helper("setInsertionState"),
45246
- `n${operation.parent}`,
45247
- operation.anchor == null ? void 0 : operation.anchor === -1 ? `0` : `n${operation.anchor}`
45463
+ `n${parent}`,
45464
+ anchor == null ? void 0 : anchor === -1 ? `0` : append ? (
45465
+ // null or anchor > 0 for append
45466
+ // anchor > 0 is the logical index of append node - used for locate node during hydration
45467
+ anchor === 0 ? "null" : `${anchor}`
45468
+ ) : `n${anchor}`,
45469
+ last && "true"
45248
45470
  )
45249
45471
  ];
45250
45472
  }
@@ -45259,7 +45481,7 @@ function genTemplates(templates, rootIndex, { helper }) {
45259
45481
  }
45260
45482
  function genSelf(dynamic, context) {
45261
45483
  const [frag, push] = buildCodeFragment();
45262
- const { id, template, operation } = dynamic;
45484
+ const { id, template, operation, hasDynamicChild } = dynamic;
45263
45485
  if (id !== void 0 && template !== void 0) {
45264
45486
  push(NEWLINE, `const n${id} = t${template}()`);
45265
45487
  push(...genDirectivesForElement(id, context));
@@ -45267,6 +45489,9 @@ function genSelf(dynamic, context) {
45267
45489
  if (operation) {
45268
45490
  push(...genOperationWithInsertionState(operation, context));
45269
45491
  }
45492
+ if (hasDynamicChild) {
45493
+ push(...genChildren(dynamic, context, push, `n${id}`));
45494
+ }
45270
45495
  return frag;
45271
45496
  }
45272
45497
  function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`) {
@@ -45275,51 +45500,65 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`) {
45275
45500
  const { children } = dynamic;
45276
45501
  let offset = 0;
45277
45502
  let prev;
45278
- const childrenToGen = [];
45503
+ let ifBranchCount = 0;
45504
+ let prependCount = 0;
45279
45505
  for (const [index, child] of children.entries()) {
45506
+ if (child.operation && child.operation.anchor === -1) {
45507
+ prependCount++;
45508
+ }
45280
45509
  if (child.flags & 2) {
45281
45510
  offset--;
45511
+ } else if (child.ifBranch) {
45512
+ ifBranchCount++;
45282
45513
  }
45283
45514
  const id = child.flags & 1 ? child.flags & 4 ? child.anchor : child.id : void 0;
45284
45515
  if (id === void 0 && !child.hasDynamicChild) {
45285
45516
  push(...genSelf(child, context));
45286
45517
  continue;
45287
45518
  }
45288
- const elementIndex = Number(index) + offset;
45519
+ const elementIndex = index + offset;
45520
+ const logicalIndex = elementIndex - ifBranchCount + prependCount;
45289
45521
  const variable = id === void 0 ? `p${context.block.tempId++}` : `n${id}`;
45290
45522
  pushBlock(NEWLINE, `const ${variable} = `);
45291
45523
  if (prev) {
45292
45524
  if (elementIndex - prev[1] === 1) {
45293
- pushBlock(...genCall(helper("next"), prev[0]));
45525
+ pushBlock(...genCall(helper("next"), prev[0], String(logicalIndex)));
45294
45526
  } else {
45295
- pushBlock(...genCall(helper("nthChild"), from, String(elementIndex)));
45527
+ pushBlock(
45528
+ ...genCall(
45529
+ helper("nthChild"),
45530
+ from,
45531
+ String(elementIndex),
45532
+ String(logicalIndex)
45533
+ )
45534
+ );
45296
45535
  }
45297
45536
  } else {
45298
45537
  if (elementIndex === 0) {
45299
- pushBlock(...genCall(helper("child"), from));
45538
+ pushBlock(...genCall(helper("child"), from, String(logicalIndex)));
45300
45539
  } else {
45301
45540
  let init = genCall(helper("child"), from);
45302
45541
  if (elementIndex === 1) {
45303
- init = genCall(helper("next"), init);
45542
+ init = genCall(helper("next"), init, String(logicalIndex));
45304
45543
  } else if (elementIndex > 1) {
45305
- init = genCall(helper("nthChild"), from, String(elementIndex));
45544
+ init = genCall(
45545
+ helper("nthChild"),
45546
+ from,
45547
+ String(elementIndex),
45548
+ String(logicalIndex)
45549
+ );
45306
45550
  }
45307
45551
  pushBlock(...init);
45308
45552
  }
45309
45553
  }
45310
- if (id === child.anchor) {
45554
+ if (id === child.anchor && !child.hasDynamicChild) {
45311
45555
  push(...genSelf(child, context));
45312
45556
  }
45313
45557
  if (id !== void 0) {
45314
45558
  push(...genDirectivesForElement(id, context));
45315
45559
  }
45316
45560
  prev = [variable, elementIndex];
45317
- childrenToGen.push([child, variable]);
45318
- }
45319
- if (childrenToGen.length) {
45320
- for (const [child, from2] of childrenToGen) {
45321
- push(...genChildren(child, context, pushBlock, from2));
45322
- }
45561
+ push(...genChildren(child, context, pushBlock, variable));
45323
45562
  }
45324
45563
  return frag;
45325
45564
  }
@@ -45338,8 +45577,11 @@ function genBlock(oper, context, args = [], root) {
45338
45577
  }
45339
45578
  function genBlockContent(block, context, root, genEffectsExtraFrag) {
45340
45579
  const [frag, push] = buildCodeFragment();
45341
- const { dynamic, effect, operation, returns } = block;
45580
+ const { dynamic, effect, operation, returns, key } = block;
45342
45581
  const resetBlock = context.enterBlock(block);
45582
+ if (block.hasDeferredVShow) {
45583
+ push(NEWLINE, `const deferredApplyVShows = []`);
45584
+ }
45343
45585
  if (root) {
45344
45586
  for (let name of context.ir.component) {
45345
45587
  const id = toValidAssetId(name, "component");
@@ -45362,10 +45604,21 @@ function genBlockContent(block, context, root, genEffectsExtraFrag) {
45362
45604
  push(...genSelf(child, context));
45363
45605
  }
45364
45606
  for (const child of dynamic.children) {
45365
- push(...genChildren(child, context, push, `n${child.id}`));
45607
+ if (!child.hasDynamicChild) {
45608
+ push(...genChildren(child, context, push, `n${child.id}`));
45609
+ }
45366
45610
  }
45367
45611
  push(...genOperations(operation, context));
45368
45612
  push(...genEffects(effect, context, genEffectsExtraFrag));
45613
+ if (block.hasDeferredVShow) {
45614
+ push(NEWLINE, `deferredApplyVShows.forEach(fn => fn())`);
45615
+ }
45616
+ if (dynamic.needsKey) {
45617
+ for (const child of dynamic.children) {
45618
+ const keyValue = key ? genExpression(key, context) : JSON.stringify(child.id);
45619
+ push(NEWLINE, `n${child.id}.$key = `, ...keyValue);
45620
+ }
45621
+ }
45369
45622
  push(NEWLINE, `return `);
45370
45623
  const returnNodes = returns.map((n) => `n${n}`);
45371
45624
  const returnsCode = returnNodes.length > 1 ? genMulti(DELIMITERS_ARRAY, ...returnNodes) : [returnNodes[0] || "null"];
@@ -45524,15 +45777,17 @@ const transformChildren = (node, context) => {
45524
45777
  };
45525
45778
  function processDynamicChildren(context) {
45526
45779
  let prevDynamics = [];
45527
- let hasStaticTemplate = false;
45780
+ let staticCount = 0;
45781
+ let dynamicCount = 0;
45782
+ let lastInsertionChild;
45528
45783
  const children = context.dynamic.children;
45529
45784
  for (const [index, child] of children.entries()) {
45530
45785
  if (child.flags & 4) {
45531
- prevDynamics.push(child);
45786
+ prevDynamics.push(lastInsertionChild = child);
45532
45787
  }
45533
45788
  if (!(child.flags & 2)) {
45534
45789
  if (prevDynamics.length) {
45535
- if (hasStaticTemplate) {
45790
+ if (staticCount) {
45536
45791
  context.childrenTemplate[index - prevDynamics.length] = `<!>`;
45537
45792
  prevDynamics[0].flags -= 2;
45538
45793
  const anchor = prevDynamics[0].anchor = context.increaseId();
@@ -45545,27 +45800,38 @@ function processDynamicChildren(context) {
45545
45800
  /* prepend */
45546
45801
  );
45547
45802
  }
45803
+ dynamicCount += prevDynamics.length;
45548
45804
  prevDynamics = [];
45549
45805
  }
45550
- hasStaticTemplate = true;
45806
+ staticCount++;
45551
45807
  }
45552
45808
  }
45553
45809
  if (prevDynamics.length) {
45554
- registerInsertion(prevDynamics, context);
45810
+ registerInsertion(
45811
+ prevDynamics,
45812
+ context,
45813
+ // the logical index of append child
45814
+ dynamicCount + staticCount,
45815
+ true
45816
+ );
45817
+ }
45818
+ if (lastInsertionChild && lastInsertionChild.operation) {
45819
+ lastInsertionChild.operation.last = true;
45555
45820
  }
45556
45821
  }
45557
- function registerInsertion(dynamics, context, anchor) {
45822
+ function registerInsertion(dynamics, context, anchor, append) {
45558
45823
  for (const child of dynamics) {
45559
45824
  if (child.template != null) {
45560
45825
  context.registerOperation({
45561
45826
  type: 9,
45562
45827
  elements: dynamics.map((child2) => child2.id),
45563
45828
  parent: context.reference(),
45564
- anchor
45829
+ anchor: append ? void 0 : anchor
45565
45830
  });
45566
45831
  } else if (child.operation && isBlockOperation(child.operation)) {
45567
45832
  child.operation.parent = context.reference();
45568
45833
  child.operation.anchor = anchor;
45834
+ child.operation.append = append;
45569
45835
  }
45570
45836
  }
45571
45837
  }
@@ -45633,6 +45899,11 @@ function transformComponentElement(node, propsResult, singleRoot, context, isDyn
45633
45899
  tag = fromSetup;
45634
45900
  asset = false;
45635
45901
  }
45902
+ const builtInTag = isBuiltInComponent(tag);
45903
+ if (builtInTag) {
45904
+ tag = builtInTag;
45905
+ asset = false;
45906
+ }
45636
45907
  const dotIndex = tag.indexOf(".");
45637
45908
  if (dotIndex > 0) {
45638
45909
  const ns = resolveSetupReference(tag.slice(0, dotIndex), context);
@@ -45689,6 +45960,7 @@ function resolveSetupReference(name, context) {
45689
45960
  const PascalName = capitalize(camelName);
45690
45961
  return bindings[name] ? name : bindings[camelName] ? camelName : bindings[PascalName] ? PascalName : void 0;
45691
45962
  }
45963
+ const dynamicKeys = ["indeterminate"];
45692
45964
  function transformNativeElement(node, propsResult, singleRoot, context, getEffectIndex) {
45693
45965
  const { tag } = node;
45694
45966
  const { scopeId } = context.options;
@@ -45711,7 +45983,7 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
45711
45983
  } else {
45712
45984
  for (const prop of propsResult[1]) {
45713
45985
  const { key, values } = prop;
45714
- if (key.isStatic && values.length === 1 && values[0].isStatic) {
45986
+ if (key.isStatic && values.length === 1 && values[0].isStatic && !dynamicKeys.includes(key.content)) {
45715
45987
  template += ` ${key.content}`;
45716
45988
  if (values[0].content) template += `="${values[0].content}"`;
45717
45989
  } else {
@@ -45867,7 +46139,7 @@ function dedupeProperties(results) {
45867
46139
  }
45868
46140
  const name = prop.key.content;
45869
46141
  const existing = knownProps.get(name);
45870
- if (existing) {
46142
+ if (existing && existing.handler === prop.handler) {
45871
46143
  if (name === "style" || name === "class") {
45872
46144
  mergePropValues(existing, prop);
45873
46145
  }
@@ -45909,7 +46181,8 @@ const transformVHtml = (dir, node, context) => {
45909
46181
  context.registerEffect([exp], {
45910
46182
  type: 7,
45911
46183
  element: context.reference(),
45912
- value: exp
46184
+ value: exp,
46185
+ isComponent: node.tagType === 1
45913
46186
  });
45914
46187
  };
45915
46188
 
@@ -45935,15 +46208,19 @@ const transformVText = (dir, node, context) => {
45935
46208
  context.childrenTemplate = [String(literal)];
45936
46209
  } else {
45937
46210
  context.childrenTemplate = [" "];
45938
- context.registerOperation({
45939
- type: 17,
45940
- parent: context.reference()
45941
- });
46211
+ const isComponent = node.tagType === 1;
46212
+ if (!isComponent) {
46213
+ context.registerOperation({
46214
+ type: 17,
46215
+ parent: context.reference()
46216
+ });
46217
+ }
45942
46218
  context.registerEffect([exp], {
45943
46219
  type: 4,
45944
46220
  element: context.reference(),
45945
46221
  values: [exp],
45946
- generated: true
46222
+ generated: true,
46223
+ isComponent
45947
46224
  });
45948
46225
  }
45949
46226
  };
@@ -46033,7 +46310,11 @@ const transformVOn = (dir, node, context) => {
46033
46310
  key: arg,
46034
46311
  value: handler,
46035
46312
  handler: true,
46036
- handlerModifiers: eventOptionModifiers
46313
+ handlerModifiers: {
46314
+ keys: keyModifiers,
46315
+ nonKeys: nonKeyModifiers,
46316
+ options: eventOptionModifiers
46317
+ }
46037
46318
  };
46038
46319
  }
46039
46320
  const delegate = arg.isStatic && !eventOptionModifiers.length && delegatedEvents(arg.content);
@@ -46071,12 +46352,21 @@ const transformVShow = (dir, node, context) => {
46071
46352
  );
46072
46353
  return;
46073
46354
  }
46355
+ let shouldDeferred = false;
46356
+ const parentNode = context.parent && context.parent.node;
46357
+ if (parentNode && parentNode.type === 1) {
46358
+ shouldDeferred = !!(isTransitionTag(parentNode.tag) && findProp(parentNode, "appear", false, true));
46359
+ if (shouldDeferred) {
46360
+ context.parent.parent.block.hasDeferredVShow = true;
46361
+ }
46362
+ }
46074
46363
  context.registerOperation({
46075
46364
  type: 13,
46076
46365
  element: context.reference(),
46077
46366
  dir,
46078
46367
  name: "show",
46079
- builtin: true
46368
+ builtin: true,
46369
+ deferred: shouldDeferred
46080
46370
  });
46081
46371
  };
46082
46372
 
@@ -46146,7 +46436,7 @@ const transformText = (node, context) => {
46146
46436
  } else if (node.type === 5) {
46147
46437
  processInterpolation(context);
46148
46438
  } else if (node.type === 2) {
46149
- context.template += node.content;
46439
+ context.template += escapeHtml(node.content);
46150
46440
  }
46151
46441
  };
46152
46442
  function processInterpolation(context) {
@@ -46190,7 +46480,7 @@ function processTextContainer(children, context) {
46190
46480
  const values = processTextLikeChildren(children, context);
46191
46481
  const literals = values.map(getLiteralExpressionValue);
46192
46482
  if (literals.every((l) => l != null)) {
46193
- context.childrenTemplate = literals.map((l) => String(l));
46483
+ context.childrenTemplate = literals.map((l) => escapeHtml(String(l)));
46194
46484
  } else {
46195
46485
  context.childrenTemplate = [" "];
46196
46486
  context.registerOperation({
@@ -46341,7 +46631,7 @@ const transformComment = (node, context) => {
46341
46631
  context.comment.push(node);
46342
46632
  context.dynamic.flags |= 2;
46343
46633
  } else {
46344
- context.template += `<!--${node.content}-->`;
46634
+ context.template += `<!--${escapeHtml(node.content)}-->`;
46345
46635
  }
46346
46636
  };
46347
46637
  function getSiblingIf(context, reverse) {
@@ -46395,6 +46685,7 @@ function processIf(node, dir, context) {
46395
46685
  };
46396
46686
  } else {
46397
46687
  const siblingIf = getSiblingIf(context, true);
46688
+ context.dynamic.ifBranch = true;
46398
46689
  const siblings = context.parent && context.parent.dynamic.children;
46399
46690
  let lastIfNode;
46400
46691
  if (siblings) {
@@ -46451,6 +46742,7 @@ function createIfBranch(node, context) {
46451
46742
  const branch = newBlock(node);
46452
46743
  const exitBlock = context.enterBlock(branch);
46453
46744
  context.reference();
46745
+ branch.dynamic.needsKey = isInTransition(context);
46454
46746
  return [branch, exitBlock];
46455
46747
  }
46456
46748
 
@@ -46475,7 +46767,8 @@ function processFor(node, dir, context) {
46475
46767
  const { source, value, key, index } = parseResult;
46476
46768
  const keyProp = findProp(node, "key");
46477
46769
  const keyProperty = keyProp && propToExpression(keyProp);
46478
- const isComponent = node.tagType === 1;
46770
+ const isComponent = node.tagType === 1 || // template v-for with a single component child
46771
+ isTemplateWithSingleComponent(node);
46479
46772
  context.node = node = wrapTemplate(node, ["for"]);
46480
46773
  context.dynamic.flags |= 2 | 4;
46481
46774
  const id = context.reference();
@@ -46504,6 +46797,13 @@ function processFor(node, dir, context) {
46504
46797
  };
46505
46798
  };
46506
46799
  }
46800
+ function isTemplateWithSingleComponent(node) {
46801
+ if (node.tag !== "template") return false;
46802
+ const nonCommentChildren = node.children.filter(
46803
+ (c) => c.type !== 3
46804
+ );
46805
+ return nonCommentChildren.length === 1 && nonCommentChildren[0].type === 1 && nonCommentChildren[0].tagType === 1;
46806
+ }
46507
46807
 
46508
46808
  const transformSlotOutlet = (node, context) => {
46509
46809
  if (node.type !== 1 || node.tag !== "slot") {
@@ -46577,7 +46877,8 @@ const transformSlotOutlet = (node, context) => {
46577
46877
  id,
46578
46878
  name: slotName,
46579
46879
  props: irProps,
46580
- fallback
46880
+ fallback,
46881
+ noSlotted: !!(context.options.scopeId && !context.options.slotted)
46581
46882
  };
46582
46883
  };
46583
46884
  };
@@ -46639,7 +46940,22 @@ function transformComponentSlot(node, dir, context) {
46639
46940
  markNonTemplate(n, context);
46640
46941
  });
46641
46942
  }
46642
- const [block, onExit] = createSlotBlock(node, dir, context);
46943
+ let slotKey;
46944
+ if (isTransitionNode(node) && nonSlotTemplateChildren.length) {
46945
+ const nonCommentChild = nonSlotTemplateChildren.find(
46946
+ (n) => n.type !== 3
46947
+ );
46948
+ if (nonCommentChild) {
46949
+ const keyProp = findProp(
46950
+ nonCommentChild,
46951
+ "key"
46952
+ );
46953
+ if (keyProp) {
46954
+ slotKey = keyProp.exp;
46955
+ }
46956
+ }
46957
+ }
46958
+ const [block, onExit] = createSlotBlock(node, dir, context, slotKey);
46643
46959
  const { slots } = context;
46644
46960
  return () => {
46645
46961
  onExit();
@@ -46773,9 +47089,13 @@ function hasStaticSlot(slots, name) {
46773
47089
  if (slot.slotType === 0) return !!slot.slots[name];
46774
47090
  });
46775
47091
  }
46776
- function createSlotBlock(slotNode, dir, context) {
47092
+ function createSlotBlock(slotNode, dir, context, key = void 0) {
46777
47093
  const block = newBlock(slotNode);
46778
47094
  block.props = dir && dir.exp;
47095
+ if (key) {
47096
+ block.key = key;
47097
+ block.dynamic.needsKey = true;
47098
+ }
46779
47099
  const exitBlock = context.enterBlock(block);
46780
47100
  return [block, exitBlock];
46781
47101
  }
@@ -46784,6 +47104,37 @@ function isNonWhitespaceContent(node) {
46784
47104
  return !!node.content.trim();
46785
47105
  }
46786
47106
 
47107
+ const transformTransition = (node, context) => {
47108
+ if (node.type === 1 && node.tagType === 1) {
47109
+ if (isTransitionTag(node.tag)) {
47110
+ return postTransformTransition(
47111
+ node,
47112
+ context.options.onError,
47113
+ hasMultipleChildren
47114
+ );
47115
+ }
47116
+ }
47117
+ };
47118
+ function hasMultipleChildren(node) {
47119
+ const children = node.children = node.children.filter(
47120
+ (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
47121
+ );
47122
+ const first = children[0];
47123
+ if (children.length === 1 && first.type === 1 && (findDir(first, "for") || isTemplateNode(first))) {
47124
+ return true;
47125
+ }
47126
+ const hasElse = (node2) => findDir(node2, "else-if") || findDir(node2, "else", true);
47127
+ if (children.every(
47128
+ (c, index) => c.type === 1 && // not template
47129
+ !isTemplateNode(c) && // not has v-for
47130
+ !findDir(c, "for") && // if the first child has v-if, the rest should also have v-else-if/v-else
47131
+ (index === 0 ? findDir(c, "if") : hasElse(c)) && !hasMultipleChildren(c)
47132
+ )) {
47133
+ return false;
47134
+ }
47135
+ return children.length > 1;
47136
+ }
47137
+
46787
47138
  function compile$1(source, options = {}) {
46788
47139
  const resolvedOptions = extend({}, options);
46789
47140
  const ast = isString$1(source) ? parse$3(source, resolvedOptions) : source;
@@ -46802,6 +47153,7 @@ function compile$1(source, options = {}) {
46802
47153
  extend({}, resolvedOptions, {
46803
47154
  nodeTransforms: [
46804
47155
  ...nodeTransforms,
47156
+ ...[transformTransition] ,
46805
47157
  ...options.nodeTransforms || []
46806
47158
  // user transforms
46807
47159
  ],
@@ -46947,7 +47299,7 @@ const ssrHelpers = {
46947
47299
  registerRuntimeHelpers(ssrHelpers);
46948
47300
 
46949
47301
  const ssrTransformIf = createStructuralDirectiveTransform$1(
46950
- /^(if|else|else-if)$/,
47302
+ /^(?:if|else|else-if)$/,
46951
47303
  processIf$1
46952
47304
  );
46953
47305
  function ssrProcessIf(node, context, disableNestedFragments = false, disableComment = false) {
@@ -47186,6 +47538,14 @@ const ssrTransformElement = (node, context) => {
47186
47538
  const hasCustomDir = node.props.some(
47187
47539
  (p) => p.type === 7 && !isBuiltInDirective(p.name)
47188
47540
  );
47541
+ const vShowPropIndex = node.props.findIndex(
47542
+ (i) => i.type === 7 && i.name === "show"
47543
+ );
47544
+ if (vShowPropIndex !== -1) {
47545
+ const vShowProp = node.props[vShowPropIndex];
47546
+ node.props.splice(vShowPropIndex, 1);
47547
+ node.props.push(vShowProp);
47548
+ }
47189
47549
  const needMergeProps = hasDynamicVBind || hasCustomDir;
47190
47550
  if (needMergeProps) {
47191
47551
  const { props, directives } = buildProps$1(
@@ -47204,7 +47564,7 @@ const ssrTransformElement = (node, context) => {
47204
47564
  );
47205
47565
  if (node.tag === "textarea") {
47206
47566
  const existingText = node.children[0];
47207
- if (!existingText || existingText.type !== 5) {
47567
+ if (!hasContentOverrideDirective(node) && (!existingText || existingText.type !== 5)) {
47208
47568
  const tempId = `_temp${context.temps++}`;
47209
47569
  propsExp.arguments = [
47210
47570
  createAssignmentExpression(
@@ -47251,8 +47611,7 @@ const ssrTransformElement = (node, context) => {
47251
47611
  ];
47252
47612
  }
47253
47613
  } else if (directives.length && !node.children.length) {
47254
- const vText = findDir$1(node, "text");
47255
- if (!vText) {
47614
+ if (!hasContentOverrideDirective(node)) {
47256
47615
  const tempId = `_temp${context.temps++}`;
47257
47616
  propsExp.arguments = [
47258
47617
  createAssignmentExpression(
@@ -47466,6 +47825,9 @@ function findVModel(node) {
47466
47825
  (p) => p.type === 7 && p.name === "model" && p.exp
47467
47826
  );
47468
47827
  }
47828
+ function hasContentOverrideDirective(node) {
47829
+ return !!findDir$1(node, "text") || !!findDir$1(node, "html");
47830
+ }
47469
47831
  function ssrProcessElement(node, context) {
47470
47832
  const isVoidTag = context.options.isVoidTag || NO;
47471
47833
  const elementsToAdd = node.ssrCodegenNode.elements;
@@ -48281,6 +48643,7 @@ function compile(source, options = {}) {
48281
48643
  transform$1(ast, __spreadProps$6(__spreadValues$7({}, options), {
48282
48644
  hoistStatic: false,
48283
48645
  nodeTransforms: [
48646
+ transformVBindShorthand,
48284
48647
  ssrTransformIf,
48285
48648
  ssrTransformFor,
48286
48649
  trackVForSlotScopes,
@@ -57017,8 +57380,9 @@ function requireDist () {
57017
57380
  var distExports = /*@__PURE__*/ requireDist();
57018
57381
  var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(distExports);
57019
57382
 
57020
- const animationNameRE = /^(-\w+-)?animation-name$/;
57021
- const animationRE = /^(-\w+-)?animation$/;
57383
+ const animationNameRE = /^(?:-\w+-)?animation-name$/;
57384
+ const animationRE = /^(?:-\w+-)?animation$/;
57385
+ const keyframesRE = /^(?:-\w+-)?keyframes$/;
57022
57386
  const scopedPlugin = (id = "") => {
57023
57387
  const keyframes = /* @__PURE__ */ Object.create(null);
57024
57388
  const shortId = id.replace(/^data-v-/, "");
@@ -57028,7 +57392,7 @@ const scopedPlugin = (id = "") => {
57028
57392
  processRule(id, rule);
57029
57393
  },
57030
57394
  AtRule(node) {
57031
- if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) {
57395
+ if (keyframesRE.test(node.name) && !node.params.endsWith(`-${shortId}`)) {
57032
57396
  keyframes[node.params] = node.params = node.params + "-" + shortId;
57033
57397
  }
57034
57398
  },
@@ -57057,7 +57421,7 @@ const scopedPlugin = (id = "") => {
57057
57421
  };
57058
57422
  const processedRules = /* @__PURE__ */ new WeakSet();
57059
57423
  function processRule(id, rule) {
57060
- if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) {
57424
+ if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && keyframesRE.test(rule.parent.name)) {
57061
57425
  return;
57062
57426
  }
57063
57427
  processedRules.add(rule);
@@ -60847,6 +61211,9 @@ function getImportedName(specifier) {
60847
61211
  function getId(node) {
60848
61212
  return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null;
60849
61213
  }
61214
+ function getStringLiteralKey(node) {
61215
+ return node.computed ? node.key.type === "TemplateLiteral" && !node.key.expressions.length ? node.key.quasis.map((q) => q.value.cooked).join("") : null : node.key.type === "Identifier" ? node.key.name : node.key.type === "StringLiteral" ? node.key.value : node.key.type === "NumericLiteral" ? String(node.key.value) : null;
61216
+ }
60850
61217
  const normalize = (path.posix || path).normalize;
60851
61218
  const windowsSlashRE = /\\/g;
60852
61219
  function normalizePath(p) {
@@ -60857,6 +61224,8 @@ const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/;
60857
61224
  function getEscapedPropName(key) {
60858
61225
  return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key;
60859
61226
  }
61227
+ const isJS = (...langs) => langs.some((lang) => lang === "js" || lang === "jsx");
61228
+ const isTS = (...langs) => langs.some((lang) => lang === "ts" || lang === "tsx");
60860
61229
 
60861
61230
  function analyzeScriptBindings(ast) {
60862
61231
  for (const node of ast) {
@@ -61582,6 +61951,10 @@ class MagicString {
61582
61951
  if (chunk.outro.length) mappings.advance(chunk.outro);
61583
61952
  });
61584
61953
 
61954
+ if (this.outro) {
61955
+ mappings.advance(this.outro);
61956
+ }
61957
+
61585
61958
  return {
61586
61959
  file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
61587
61960
  sources: [
@@ -62048,12 +62421,18 @@ class MagicString {
62048
62421
  if (this.byStart[index] || this.byEnd[index]) return;
62049
62422
 
62050
62423
  let chunk = this.lastSearchedChunk;
62424
+ let previousChunk = chunk;
62051
62425
  const searchForward = index > chunk.end;
62052
62426
 
62053
62427
  while (chunk) {
62054
62428
  if (chunk.contains(index)) return this._splitChunk(chunk, index);
62055
62429
 
62056
62430
  chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
62431
+
62432
+ // Prevent infinite loop (e.g. via empty chunks, where start === end)
62433
+ if (chunk === previousChunk) return;
62434
+
62435
+ previousChunk = chunk;
62057
62436
  }
62058
62437
  }
62059
62438
 
@@ -62241,7 +62620,12 @@ class MagicString {
62241
62620
  const index = original.indexOf(string);
62242
62621
 
62243
62622
  if (index !== -1) {
62244
- this.overwrite(index, index + string.length, replacement);
62623
+ if (typeof replacement === 'function') {
62624
+ replacement = replacement(string, index, original);
62625
+ }
62626
+ if (string !== replacement) {
62627
+ this.overwrite(index, index + string.length, replacement);
62628
+ }
62245
62629
  }
62246
62630
 
62247
62631
  return this;
@@ -62264,7 +62648,11 @@ class MagicString {
62264
62648
  index = original.indexOf(string, index + stringLength)
62265
62649
  ) {
62266
62650
  const previous = original.slice(index, index + stringLength);
62267
- if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
62651
+ let _replacement = replacement;
62652
+ if (typeof replacement === 'function') {
62653
+ _replacement = replacement(previous, index, original);
62654
+ }
62655
+ if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
62268
62656
  }
62269
62657
 
62270
62658
  return this;
@@ -62315,8 +62703,8 @@ class ScriptCompileContext {
62315
62703
  const { script, scriptSetup } = descriptor;
62316
62704
  const scriptLang = script && script.lang;
62317
62705
  const scriptSetupLang = scriptSetup && scriptSetup.lang;
62318
- this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx";
62319
- this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx";
62706
+ this.isJS = isJS(scriptLang, scriptSetupLang);
62707
+ this.isTS = isTS(scriptLang, scriptSetupLang);
62320
62708
  const customElement = options.customElement;
62321
62709
  const filename = this.descriptor.filename;
62322
62710
  if (customElement) {
@@ -62514,9 +62902,6 @@ const normalScriptDefaultVar = `__default__`;
62514
62902
  function processNormalScript(ctx, scopeId) {
62515
62903
  var _a;
62516
62904
  const script = ctx.descriptor.script;
62517
- if (script.lang && !ctx.isJS && !ctx.isTS) {
62518
- return script;
62519
- }
62520
62905
  try {
62521
62906
  let content = script.content;
62522
62907
  let map = script.map;
@@ -62748,13 +63133,9 @@ function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameter
62748
63133
  Object.assign(scope.types, typeParameters);
62749
63134
  }
62750
63135
  e._ownerScope = scope;
62751
- const name = getId(e.key);
62752
- if (name && !e.computed) {
63136
+ const name = getStringLiteralKey(e);
63137
+ if (name !== null) {
62753
63138
  res.props[name] = e;
62754
- } else if (e.key.type === "TemplateLiteral") {
62755
- for (const key of resolveTemplateKeys(ctx, e.key, scope)) {
62756
- res.props[key] = e;
62757
- }
62758
63139
  } else {
62759
63140
  ctx.error(
62760
63141
  `Unsupported computed key in type referenced by a macro`,
@@ -63152,7 +63533,7 @@ function registerTS(_loadTS) {
63152
63533
  } catch (err) {
63153
63534
  if (typeof err.message === "string" && err.message.includes("Cannot find module")) {
63154
63535
  throw new Error(
63155
- 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.'
63536
+ 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "TypeScript" is installed as a project dependency.'
63156
63537
  );
63157
63538
  } else {
63158
63539
  throw new Error(
@@ -63366,7 +63747,11 @@ function recordTypes(ctx, body, scope, asGlobal = false) {
63366
63747
  }
63367
63748
  } else if (stmt.type === "TSModuleDeclaration" && stmt.global) {
63368
63749
  for (const s of stmt.body.body) {
63369
- recordType(s, types, declares);
63750
+ if (s.type === "ExportNamedDeclaration" && s.declaration) {
63751
+ recordType(s.declaration, types, declares);
63752
+ } else {
63753
+ recordType(s, types, declares);
63754
+ }
63370
63755
  }
63371
63756
  }
63372
63757
  } else {
@@ -63540,7 +63925,10 @@ function recordImport(node, imports) {
63540
63925
  };
63541
63926
  }
63542
63927
  }
63543
- function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx), isKeyOf = false) {
63928
+ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx), isKeyOf = false, typeParameters) {
63929
+ if (node.leadingComments && node.leadingComments.some((c) => c.value.includes("@vue-ignore"))) {
63930
+ return [UNKNOWN_TYPE];
63931
+ }
63544
63932
  try {
63545
63933
  switch (node.type) {
63546
63934
  case "TSStringKeyword":
@@ -63613,12 +64001,38 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
63613
64001
  case "TSTypeReference": {
63614
64002
  const resolved = resolveTypeReference(ctx, node, scope);
63615
64003
  if (resolved) {
63616
- if (resolved.type === "TSTypeAliasDeclaration" && resolved.typeAnnotation.type === "TSFunctionType") {
63617
- return ["Function"];
64004
+ if (resolved.type === "TSTypeAliasDeclaration") {
64005
+ if (resolved.typeAnnotation.type === "TSFunctionType") {
64006
+ return ["Function"];
64007
+ }
64008
+ if (node.typeParameters) {
64009
+ const typeParams = /* @__PURE__ */ Object.create(null);
64010
+ if (resolved.typeParameters) {
64011
+ resolved.typeParameters.params.forEach((p, i) => {
64012
+ typeParams[p.name] = node.typeParameters.params[i];
64013
+ });
64014
+ }
64015
+ return inferRuntimeType(
64016
+ ctx,
64017
+ resolved.typeAnnotation,
64018
+ resolved._ownerScope,
64019
+ isKeyOf,
64020
+ typeParams
64021
+ );
64022
+ }
63618
64023
  }
63619
64024
  return inferRuntimeType(ctx, resolved, resolved._ownerScope, isKeyOf);
63620
64025
  }
63621
64026
  if (node.typeName.type === "Identifier") {
64027
+ if (typeParameters && typeParameters[node.typeName.name]) {
64028
+ return inferRuntimeType(
64029
+ ctx,
64030
+ typeParameters[node.typeName.name],
64031
+ scope,
64032
+ isKeyOf,
64033
+ typeParameters
64034
+ );
64035
+ }
63622
64036
  if (isKeyOf) {
63623
64037
  switch (node.typeName.name) {
63624
64038
  case "String":
@@ -63741,11 +64155,33 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
63741
64155
  case "TSParenthesizedType":
63742
64156
  return inferRuntimeType(ctx, node.typeAnnotation, scope);
63743
64157
  case "TSUnionType":
63744
- return flattenTypes(ctx, node.types, scope, isKeyOf);
64158
+ return flattenTypes(ctx, node.types, scope, isKeyOf, typeParameters);
63745
64159
  case "TSIntersectionType": {
63746
- return flattenTypes(ctx, node.types, scope, isKeyOf).filter(
63747
- (t) => t !== UNKNOWN_TYPE
63748
- );
64160
+ return flattenTypes(
64161
+ ctx,
64162
+ node.types,
64163
+ scope,
64164
+ isKeyOf,
64165
+ typeParameters
64166
+ ).filter((t) => t !== UNKNOWN_TYPE);
64167
+ }
64168
+ case "TSMappedType": {
64169
+ const { typeAnnotation, typeParameter } = node;
64170
+ if (typeAnnotation && typeAnnotation.type === "TSIndexedAccessType" && typeParameter && typeParameter.constraint && typeParameters) {
64171
+ const constraint = typeParameter.constraint;
64172
+ if (constraint.type === "TSTypeOperator" && constraint.operator === "keyof" && constraint.typeAnnotation && constraint.typeAnnotation.type === "TSTypeReference" && constraint.typeAnnotation.typeName.type === "Identifier") {
64173
+ const typeName = constraint.typeAnnotation.typeName.name;
64174
+ const index = typeAnnotation.indexType;
64175
+ const obj = typeAnnotation.objectType;
64176
+ if (obj && obj.type === "TSTypeReference" && obj.typeName.type === "Identifier" && obj.typeName.name === typeName && index && index.type === "TSTypeReference" && index.typeName.type === "Identifier" && index.typeName.name === typeParameter.name) {
64177
+ const targetType = typeParameters[typeName];
64178
+ if (targetType) {
64179
+ return inferRuntimeType(ctx, targetType, scope);
64180
+ }
64181
+ }
64182
+ }
64183
+ }
64184
+ return [UNKNOWN_TYPE];
63749
64185
  }
63750
64186
  case "TSEnumDeclaration":
63751
64187
  return inferEnumType(node);
@@ -63800,14 +64236,16 @@ function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)
63800
64236
  }
63801
64237
  return [UNKNOWN_TYPE];
63802
64238
  }
63803
- function flattenTypes(ctx, types, scope, isKeyOf = false) {
64239
+ function flattenTypes(ctx, types, scope, isKeyOf = false, typeParameters = void 0) {
63804
64240
  if (types.length === 1) {
63805
- return inferRuntimeType(ctx, types[0], scope, isKeyOf);
64241
+ return inferRuntimeType(ctx, types[0], scope, isKeyOf, typeParameters);
63806
64242
  }
63807
64243
  return [
63808
64244
  ...new Set(
63809
64245
  [].concat(
63810
- ...types.map((t) => inferRuntimeType(ctx, t, scope, isKeyOf))
64246
+ ...types.map(
64247
+ (t) => inferRuntimeType(ctx, t, scope, isKeyOf, typeParameters)
64248
+ )
63811
64249
  )
63812
64250
  )
63813
64251
  ];
@@ -63893,7 +64331,7 @@ function ctorToType(ctorType) {
63893
64331
  }
63894
64332
  function findStaticPropertyType(node, key) {
63895
64333
  const prop = node.members.find(
63896
- (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation
64334
+ (m) => m.type === "TSPropertySignature" && getStringLiteralKey(m) === key && m.typeAnnotation
63897
64335
  );
63898
64336
  return prop && prop.typeAnnotation.typeAnnotation;
63899
64337
  }
@@ -64716,7 +65154,6 @@ function compileScript(sfc, options) {
64716
65154
  Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.`
64717
65155
  );
64718
65156
  }
64719
- const ctx = new ScriptCompileContext(sfc, options);
64720
65157
  const { script, scriptSetup, source, filename } = sfc;
64721
65158
  const hoistStatic = options.hoistStatic !== false && !script;
64722
65159
  const scopeId = options.id ? options.id.replace(/^data-v-/, "") : "";
@@ -64724,20 +65161,27 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64724
65161
  const scriptSetupLang = scriptSetup && scriptSetup.lang;
64725
65162
  const vapor = sfc.vapor || options.vapor;
64726
65163
  const ssr = (_a = options.templateOptions) == null ? void 0 : _a.ssr;
65164
+ const setupPreambleLines = [];
65165
+ const isJSOrTS = isJS(scriptLang, scriptSetupLang) || isTS(scriptLang, scriptSetupLang);
65166
+ if (script && scriptSetup && scriptLang !== scriptSetupLang) {
65167
+ throw new Error(
65168
+ `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.`
65169
+ );
65170
+ }
64727
65171
  if (!scriptSetup) {
64728
65172
  if (!script) {
64729
65173
  throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`);
64730
65174
  }
64731
- return processNormalScript(ctx, scopeId);
64732
- }
64733
- if (script && scriptLang !== scriptSetupLang) {
64734
- throw new Error(
64735
- `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.`
64736
- );
65175
+ if (script.lang && !isJSOrTS) {
65176
+ return script;
65177
+ }
65178
+ const ctx2 = new ScriptCompileContext(sfc, options);
65179
+ return processNormalScript(ctx2, scopeId);
64737
65180
  }
64738
- if (scriptSetupLang && !ctx.isJS && !ctx.isTS) {
65181
+ if (scriptSetupLang && !isJSOrTS) {
64739
65182
  return scriptSetup;
64740
65183
  }
65184
+ const ctx = new ScriptCompileContext(sfc, options);
64741
65185
  const scriptBindings = /* @__PURE__ */ Object.create(null);
64742
65186
  const setupBindings = /* @__PURE__ */ Object.create(null);
64743
65187
  let defaultExport;
@@ -64763,9 +65207,9 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64763
65207
  ctx.s.move(start, end, 0);
64764
65208
  }
64765
65209
  function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) {
64766
- let isUsedInTemplate = needTemplateUsageCheck;
65210
+ let isImportUsed = needTemplateUsageCheck;
64767
65211
  if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) {
64768
- isUsedInTemplate = isImportUsed(local, sfc);
65212
+ isImportUsed = isUsedInTemplate(local, sfc);
64769
65213
  }
64770
65214
  ctx.userImports[local] = {
64771
65215
  isType,
@@ -64773,7 +65217,7 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64773
65217
  local,
64774
65218
  source: source2,
64775
65219
  isFromSetup,
64776
- isUsedInTemplate
65220
+ isUsedInTemplate: isImportUsed
64777
65221
  };
64778
65222
  }
64779
65223
  function checkInvalidScopeReference(node, method) {
@@ -64788,8 +65232,36 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64788
65232
  }
64789
65233
  });
64790
65234
  }
65235
+ function buildDestructureElements() {
65236
+ if (!sfc.template || !sfc.template.ast) return;
65237
+ const builtins = {
65238
+ $props: {
65239
+ bindingType: "setup-reactive-const",
65240
+ setup: () => setupPreambleLines.push(`const $props = __props`)
65241
+ },
65242
+ $emit: {
65243
+ bindingType: "setup-const",
65244
+ setup: () => ctx.emitDecl ? setupPreambleLines.push(`const $emit = __emit`) : destructureElements.push("emit: $emit")
65245
+ },
65246
+ $attrs: {
65247
+ bindingType: "setup-reactive-const",
65248
+ setup: () => destructureElements.push("attrs: $attrs")
65249
+ },
65250
+ $slots: {
65251
+ bindingType: "setup-reactive-const",
65252
+ setup: () => destructureElements.push("slots: $slots")
65253
+ }
65254
+ };
65255
+ for (const [name, config] of Object.entries(builtins)) {
65256
+ if (isUsedInTemplate(name, sfc) && !ctx.bindingMetadata[name]) {
65257
+ config.setup();
65258
+ ctx.bindingMetadata[name] = config.bindingType;
65259
+ }
65260
+ }
65261
+ }
64791
65262
  const scriptAst = ctx.scriptAst;
64792
65263
  const scriptSetupAst = ctx.scriptSetupAst;
65264
+ const inlineMode = options.inlineTemplate;
64793
65265
  if (scriptAst) {
64794
65266
  for (const node of scriptAst.body) {
64795
65267
  if (node.type === "ImportDeclaration") {
@@ -64801,7 +65273,7 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64801
65273
  imported,
64802
65274
  node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type",
64803
65275
  false,
64804
- !options.inlineTemplate
65276
+ !inlineMode
64805
65277
  );
64806
65278
  }
64807
65279
  }
@@ -64826,6 +65298,13 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64826
65298
  const local = specifier.local.name;
64827
65299
  const imported = getImportedName(specifier);
64828
65300
  const source2 = node.source.value;
65301
+ if (vapor && ssr && specifier.type === "ImportSpecifier" && source2 === "vue" && imported === "defineVaporAsyncComponent") {
65302
+ ctx.s.overwrite(
65303
+ specifier.start + startOffset,
65304
+ specifier.end + startOffset,
65305
+ `defineAsyncComponent as ${local}`
65306
+ );
65307
+ }
64829
65308
  const existing = ctx.userImports[local];
64830
65309
  if (source2 === "vue" && MACROS.includes(imported)) {
64831
65310
  if (local === imported) {
@@ -64855,7 +65334,7 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
64855
65334
  imported,
64856
65335
  node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type",
64857
65336
  true,
64858
- !options.inlineTemplate
65337
+ !inlineMode
64859
65338
  );
64860
65339
  }
64861
65340
  }
@@ -65159,16 +65638,20 @@ ${genCssVarsCode(
65159
65638
  let __temp${any}, __restore${any}
65160
65639
  `);
65161
65640
  }
65162
- const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : [];
65641
+ const destructureElements = ctx.hasDefineExposeCall || !inlineMode ? [`expose: __expose`] : [];
65163
65642
  if (ctx.emitDecl) {
65164
65643
  destructureElements.push(`emit: __emit`);
65165
65644
  }
65645
+ if (inlineMode) {
65646
+ buildDestructureElements();
65647
+ }
65166
65648
  if (destructureElements.length) {
65167
65649
  args += `, { ${destructureElements.join(", ")} }`;
65168
65650
  }
65169
65651
  let templateMap;
65170
65652
  let returned;
65171
- if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) {
65653
+ const propsDecl = genRuntimeProps(ctx);
65654
+ if (!inlineMode || !sfc.template && ctx.hasDefaultExportRender) {
65172
65655
  const allBindings = __spreadValues$1(__spreadValues$1({}, scriptBindings), setupBindings);
65173
65656
  for (const key in ctx.userImports) {
65174
65657
  if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) {
@@ -65240,7 +65723,7 @@ let __temp${any}, __restore${any}
65240
65723
  returned = `() => {}`;
65241
65724
  }
65242
65725
  }
65243
- if (!options.inlineTemplate && true) {
65726
+ if (!inlineMode && true) {
65244
65727
  ctx.s.appendRight(
65245
65728
  endOffset,
65246
65729
  `
@@ -65275,7 +65758,6 @@ ${vapor && !ssr ? `` : `return `}${returned}
65275
65758
  runtimeOptions += `
65276
65759
  __ssrInlineRender: true,`;
65277
65760
  }
65278
- const propsDecl = genRuntimeProps(ctx);
65279
65761
  if (propsDecl) runtimeOptions += `
65280
65762
  props: ${propsDecl},`;
65281
65763
  const emitsDecl = genRuntimeEmits(ctx);
@@ -65285,9 +65767,15 @@ ${vapor && !ssr ? `` : `return `}${returned}
65285
65767
  if (ctx.optionsRuntimeDecl) {
65286
65768
  definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim();
65287
65769
  }
65288
- const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose();
65289
- `;
65770
+ if (!ctx.hasDefineExposeCall && !inlineMode)
65771
+ setupPreambleLines.push(`__expose();`);
65772
+ const setupPreamble = setupPreambleLines.length ? ` ${setupPreambleLines.join("\n ")}
65773
+ ` : "";
65290
65774
  if (ctx.isTS) {
65775
+ if (ssr && vapor) {
65776
+ runtimeOptions += `
65777
+ __vapor: true,`;
65778
+ }
65291
65779
  const def = (defaultExport ? `
65292
65780
  ...${normalScriptDefaultVar},` : ``) + (definedOptions ? `
65293
65781
  ...${definedOptions},` : "");
@@ -65298,7 +65786,7 @@ ${genDefaultAs} /*@__PURE__*/${ctx.helper(
65298
65786
  vapor && !ssr ? `defineVaporComponent` : `defineComponent`
65299
65787
  )}({${def}${runtimeOptions}
65300
65788
  ${hasAwait ? `async ` : ``}setup(${args}) {
65301
- ${exposeCall}`
65789
+ ${setupPreamble}`
65302
65790
  );
65303
65791
  ctx.s.appendRight(endOffset, `})`);
65304
65792
  } else {
@@ -65312,7 +65800,7 @@ ${exposeCall}`
65312
65800
  `
65313
65801
  ${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions}
65314
65802
  ${hasAwait ? `async ` : ``}setup(${args}) {
65315
- ${exposeCall}`
65803
+ ${setupPreamble}`
65316
65804
  );
65317
65805
  ctx.s.appendRight(endOffset, `})`);
65318
65806
  } else {
@@ -65321,7 +65809,7 @@ ${exposeCall}`
65321
65809
  `
65322
65810
  ${genDefaultAs} {${runtimeOptions}
65323
65811
  ${hasAwait ? `async ` : ``}setup(${args}) {
65324
- ${exposeCall}`
65812
+ ${setupPreamble}`
65325
65813
  );
65326
65814
  ctx.s.appendRight(endOffset, `}`);
65327
65815
  }
@@ -65535,7 +66023,7 @@ var __spreadValues = (a, b) => {
65535
66023
  }
65536
66024
  return a;
65537
66025
  };
65538
- const version = "3.6.0-alpha.2";
66026
+ const version = "3.6.0-alpha.3";
65539
66027
  const parseCache = parseCache$1;
65540
66028
  const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
65541
66029
  const walk = walk$2;