miniprogram-ci 1.5.1 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +71 -0
  3. package/dist/@types/ci/code-analyse.d.ts +4 -0
  4. package/dist/@types/ci/getLatestVersion.d.ts +7 -0
  5. package/dist/@types/ci/project.d.ts +4 -0
  6. package/dist/@types/cloud/cloudapi.d.ts +1 -1
  7. package/dist/@types/cloud/uploadContainer.d.ts +36 -7
  8. package/dist/@types/config.d.ts +3 -3
  9. package/dist/@types/core/js/enhance.d.ts +1 -0
  10. package/dist/@types/core/js/generateMap.d.ts +3 -0
  11. package/dist/@types/core/json/app/checkAppFields.d.ts +1 -0
  12. package/dist/@types/core/json/projectWithMockBuffer.d.ts +14 -0
  13. package/dist/@types/core/json/reactiveCache.d.ts +4 -0
  14. package/dist/@types/core/protect/uglifyfilenames.d.ts +2 -4
  15. package/dist/@types/core/worker_thread/task/minifywxml.d.ts +7 -0
  16. package/dist/@types/core.d.ts +1 -1
  17. package/dist/@types/index.d.ts +6 -0
  18. package/dist/@types/summer/ci.d.ts +3 -0
  19. package/dist/@types/summer/devtool.d.ts +9 -1
  20. package/dist/@types/summer/error.d.ts +14 -5
  21. package/dist/@types/summer/graph/appgraph.d.ts +1 -0
  22. package/dist/@types/summer/graph/basegraph.d.ts +4 -0
  23. package/dist/@types/summer/graph/plugingraph.d.ts +2 -1
  24. package/dist/@types/summer/initPlugin.d.ts +1 -1
  25. package/dist/@types/summer/module.d.ts +3 -2
  26. package/dist/@types/summer/plugins/base/es6module.d.ts +4 -2
  27. package/dist/@types/summer/plugins/base/wxss.d.ts +1 -1
  28. package/dist/@types/summer/plugins/enhance.d.ts +3 -1
  29. package/dist/@types/summer/plugins/index.d.ts +1 -16
  30. package/dist/@types/summer/project.d.ts +5 -3
  31. package/dist/@types/summer/summer.d.ts +2 -1
  32. package/dist/@types/summer/types.d.ts +1 -0
  33. package/dist/@types/types/index.d.ts +5 -0
  34. package/dist/@types/types/miniprogram-json/app.d.ts +2 -1
  35. package/dist/@types/types/miniprogram-json/page.d.ts +1 -0
  36. package/dist/@types/types/miniprogram-json/projectconfig.d.ts +2 -0
  37. package/dist/@types/utils/locales/locales.d.ts +4 -0
  38. package/dist/@types/utils/locales/zh.d.ts +4 -0
  39. package/dist/@types/utils/tools.d.ts +1 -0
  40. package/dist/@types/utils/url_config.d.ts +1 -0
  41. package/dist/@types/vendor/code-analyse/index.d.ts +4 -3
  42. package/dist/ci/code-analyse.js +3 -0
  43. package/dist/ci/cos-upload.js +3 -1
  44. package/dist/ci/getCompiledResult.js +3 -1
  45. package/dist/ci/getDevSourceMap.js +3 -1
  46. package/dist/ci/getLatestVersion.js +3 -0
  47. package/dist/ci/jsserver.js +3 -1
  48. package/dist/ci/preview.js +3 -1
  49. package/dist/ci/project.js +3 -1
  50. package/dist/ci/projectattr.js +3 -1
  51. package/dist/ci/upload.js +3 -1
  52. package/dist/ci/utils/pack.js +3 -1
  53. package/dist/ci/utils/packfile.js +3 -1
  54. package/dist/ci/utils/terminalQrcode.js +3 -1
  55. package/dist/cli.js +3 -1
  56. package/dist/cloud/cloudapi.js +3 -1
  57. package/dist/cloud/createTimeTrigger.js +3 -1
  58. package/dist/cloud/uploadContainer.js +3 -1
  59. package/dist/cloud/uploadFile.js +3 -1
  60. package/dist/cloud/uploadFunction.js +3 -1
  61. package/dist/cloud/utils.js +3 -1
  62. package/dist/config.js +3 -1
  63. package/dist/core/analyse/partial.js +3 -1
  64. package/dist/core/compile/common.js +3 -1
  65. package/dist/core/compile/game.js +3 -1
  66. package/dist/core/compile/game_plugin.js +3 -1
  67. package/dist/core/compile/handler/js.js +3 -1
  68. package/dist/core/compile/handler/mpjson.js +3 -1
  69. package/dist/core/compile/handler/wxml.js +3 -1
  70. package/dist/core/compile/handler/wxss.js +3 -1
  71. package/dist/core/compile/index.js +3 -1
  72. package/dist/core/compile/mini_program.js +3 -1
  73. package/dist/core/compile/mini_program_plugin.js +3 -1
  74. package/dist/core/js/enhance.js +1 -1
  75. package/dist/core/js/generateMap.js +1 -0
  76. package/dist/core/js/index.js +1 -1
  77. package/dist/core/js/minifyjs_after_wrap.js +1 -1
  78. package/dist/core/json/app/checkAppFields.js +3 -1
  79. package/dist/core/json/app/getAppJSON.js +3 -1
  80. package/dist/core/json/app/getExtJSON.js +3 -1
  81. package/dist/core/json/app/index.js +3 -1
  82. package/dist/core/json/common.js +3 -1
  83. package/dist/core/json/game.js +3 -1
  84. package/dist/core/json/page/checkPageJSON.js +3 -1
  85. package/dist/core/json/page/getPageJSON.js +3 -1
  86. package/dist/core/json/plugin/plugin.js +3 -1
  87. package/dist/core/json/plugin/plugin_page.js +3 -1
  88. package/dist/core/json/projectWithMockBuffer.js +3 -0
  89. package/dist/core/json/projectconfig.js +3 -1
  90. package/dist/core/json/reactiveCache.js +3 -1
  91. package/dist/core/json/signaturejson.js +3 -1
  92. package/dist/core/json/sitemap.js +3 -1
  93. package/dist/core/json/theme.js +3 -1
  94. package/dist/core/npm/filterdeps.js +3 -1
  95. package/dist/core/npm/packnpm.js +3 -1
  96. package/dist/core/protect/file_flatter.js +3 -1
  97. package/dist/core/protect/uglifyfilenames.js +3 -1
  98. package/dist/core/utils/env.js +3 -1
  99. package/dist/core/utils/logger.js +3 -1
  100. package/dist/core/validate/validate.js +1 -1
  101. package/dist/core/worker_thread/childprocess.js +1 -1
  102. package/dist/core/worker_thread/childprocess_manager.js +1 -1
  103. package/dist/core/worker_thread/fork.js +1 -1
  104. package/dist/core/worker_thread/index.js +1 -1
  105. package/dist/core/worker_thread/task/call_func.js +1 -1
  106. package/dist/core/worker_thread/task/compilejs.js +1 -1
  107. package/dist/core/worker_thread/task/compilewxss.js +1 -1
  108. package/dist/core/worker_thread/task/func.js +1 -1
  109. package/dist/core/worker_thread/task/minifywxml.js +1 -1
  110. package/dist/core/worker_thread/worker.js +1 -1
  111. package/dist/core/worker_thread/worker_manager.js +1 -1
  112. package/dist/core.js +3 -1
  113. package/dist/index.js +3 -1
  114. package/dist/manifest.json +3 -3
  115. package/dist/summer/ci.js +3 -0
  116. package/dist/summer/devtool.js +3 -1
  117. package/dist/summer/entry_process.js +1 -1
  118. package/dist/summer/error.js +3 -1
  119. package/dist/summer/graph/appconf.js +3 -1
  120. package/dist/summer/graph/appgraph.js +3 -1
  121. package/dist/summer/graph/basegraph.js +3 -1
  122. package/dist/summer/graph/pluginconf.js +3 -1
  123. package/dist/summer/graph/plugingraph.js +3 -1
  124. package/dist/summer/index.js +3 -1
  125. package/dist/summer/initPlugin.js +3 -1
  126. package/dist/summer/module.js +3 -1
  127. package/dist/summer/persist_cache.js +3 -1
  128. package/dist/summer/plugin_driver.js +3 -1
  129. package/dist/summer/plugins/base/es6module.js +1 -1
  130. package/dist/summer/plugins/base/javascript.js +1 -1
  131. package/dist/summer/plugins/base/wxss.js +1 -1
  132. package/dist/summer/plugins/enhance.js +1 -1
  133. package/dist/summer/plugins/index.js +1 -1
  134. package/dist/summer/plugins/less.js +1 -1
  135. package/dist/summer/plugins/sass.js +1 -1
  136. package/dist/summer/plugins/terser.js +1 -1
  137. package/dist/summer/plugins/typescript.js +1 -1
  138. package/dist/summer/project.js +3 -1
  139. package/dist/summer/recorder.js +3 -1
  140. package/dist/summer/resolver.js +3 -1
  141. package/dist/summer/summer.js +3 -1
  142. package/dist/summer/types.js +3 -1
  143. package/dist/summer/utils/async.js +3 -1
  144. package/dist/summer/utils/ensureArray.js +3 -1
  145. package/dist/summer/worker.js +3 -1
  146. package/dist/types/index.js +3 -1
  147. package/dist/types/miniprogram-json/app.js +3 -1
  148. package/dist/types/miniprogram-json/base.js +3 -1
  149. package/dist/types/miniprogram-json/ext.js +3 -1
  150. package/dist/types/miniprogram-json/game.js +3 -1
  151. package/dist/types/miniprogram-json/index.js +3 -1
  152. package/dist/types/miniprogram-json/page.js +3 -1
  153. package/dist/types/miniprogram-json/plugin.js +3 -1
  154. package/dist/types/miniprogram-json/projectconfig.js +3 -1
  155. package/dist/types/miniprogram-json/sitemap.js +3 -1
  156. package/dist/types/miniprogram-json/theme.js +3 -1
  157. package/dist/utils/babel_helper.js +3 -1
  158. package/dist/utils/babel_transform_plugin.js +3 -1
  159. package/dist/utils/cache.js +3 -1
  160. package/dist/utils/common.js +3 -1
  161. package/dist/utils/error.js +3 -1
  162. package/dist/utils/fs.js +3 -1
  163. package/dist/utils/fsagent.js +3 -1
  164. package/dist/utils/glob.js +3 -1
  165. package/dist/utils/interruptibletask.js +3 -1
  166. package/dist/utils/jsonParse.js +3 -1
  167. package/dist/utils/jsonlint.js +3 -1
  168. package/dist/utils/locales/en.js +3 -1
  169. package/dist/utils/locales/fomatable_string.js +3 -1
  170. package/dist/utils/locales/locales.js +3 -1
  171. package/dist/utils/locales/zh.js +3 -1
  172. package/dist/utils/log.js +3 -1
  173. package/dist/utils/report.js +3 -1
  174. package/dist/utils/request.js +3 -1
  175. package/dist/utils/sign.js +3 -1
  176. package/dist/utils/taskstatus.js +3 -1
  177. package/dist/utils/tools.js +3 -1
  178. package/dist/utils/url_config.js +3 -1
  179. package/dist/utils/white_ext_list.js +3 -1
  180. package/dist/utils/wxvpkgreader/wxvpkgreader.js +1 -1
  181. package/dist/vendor/cloud-api/src/apis/apis.js +3 -1
  182. package/dist/vendor/cloud-api/src/apis/cdn/cdn.apis.js +3 -1
  183. package/dist/vendor/cloud-api/src/apis/cdn/index.js +3 -1
  184. package/dist/vendor/cloud-api/src/apis/flexdb/flexdb.apis.js +3 -1
  185. package/dist/vendor/cloud-api/src/apis/flexdb/index.js +3 -1
  186. package/dist/vendor/cloud-api/src/apis/scf/index.js +3 -1
  187. package/dist/vendor/cloud-api/src/apis/scf/scf.apis.js +3 -1
  188. package/dist/vendor/cloud-api/src/apis/ssl/index.js +3 -1
  189. package/dist/vendor/cloud-api/src/apis/ssl/ssl.apis.js +3 -1
  190. package/dist/vendor/cloud-api/src/apis/tcb/general.apis.js +3 -1
  191. package/dist/vendor/cloud-api/src/apis/tcb/index.js +3 -1
  192. package/dist/vendor/cloud-api/src/apis/tcb/tcb.apis.js +3 -1
  193. package/dist/vendor/cloud-api/src/index.js +3 -1
  194. package/dist/vendor/cloud-api/src/transaction/contracts/cdn.contracts.js +3 -1
  195. package/dist/vendor/cloud-api/src/transaction/contracts/contracts.js +3 -1
  196. package/dist/vendor/cloud-api/src/transaction/contracts/factory.js +3 -1
  197. package/dist/vendor/cloud-api/src/transaction/contracts/flexdb.contracts.js +3 -1
  198. package/dist/vendor/cloud-api/src/transaction/contracts/scf.contracts.js +3 -1
  199. package/dist/vendor/cloud-api/src/transaction/contracts/ssl.contracts.js +3 -1
  200. package/dist/vendor/cloud-api/src/transaction/contracts/tcb.contracts.js +3 -1
  201. package/dist/vendor/cloud-api/src/transaction/transactor.js +3 -1
  202. package/dist/vendor/cloud-api/src/transaction/validations/cdn.validations.js +3 -1
  203. package/dist/vendor/cloud-api/src/transaction/validations/common.validations.js +3 -1
  204. package/dist/vendor/cloud-api/src/transaction/validations/flexdb.validations.js +3 -1
  205. package/dist/vendor/cloud-api/src/transaction/validations/scf.validations.js +3 -1
  206. package/dist/vendor/cloud-api/src/transaction/validations/ssl.validations.js +3 -1
  207. package/dist/vendor/cloud-api/src/transaction/validations/tcb.validations.js +3 -1
  208. package/dist/vendor/cloud-api/src/transaction/validations/validations.js +3 -1
  209. package/dist/vendor/cloud-api/src/utils/common.js +3 -1
  210. package/dist/vendor/cloud-api/src/utils/validator.js +3 -1
  211. package/dist/vendor/code-analyse/index.js +1 -1
  212. package/dist/vendor/schema/dist/app.js +26 -1
  213. package/dist/vendor/schema/dist/ext.js +21 -1
  214. package/dist/vendor/schema/dist/game.js +29 -1
  215. package/dist/vendor/schema/dist/page.js +18 -1
  216. package/dist/vendor/schema/dist/plugin.js +1 -1
  217. package/dist/vendor/schema/dist/pluginpage.js +1 -1
  218. package/dist/vendor/schema/dist/projectconfig.js +38 -1
  219. package/dist/vendor/schema/dist/sitemap.js +1 -1
  220. package/dist/vendor/schema/dist/theme.js +1 -1
  221. package/package.json +22 -24
  222. package/dist/@types/core/js/__tests__/minifyjs.spec.d.ts +0 -1
  223. package/dist/@types/summer/backup/appconf/index-old.d.ts +0 -0
  224. package/dist/@types/summer/backup/appconf/index.d.ts +0 -33
  225. package/dist/@types/summer/backup/detectors/es6/BasicEvaluatedExpression.d.ts +0 -51
  226. package/dist/@types/summer/backup/detectors/es6/ContextDependencyHelpers.d.ts +0 -4
  227. package/dist/@types/summer/backup/detectors/es6/Evaluator.d.ts +0 -29
  228. package/dist/@types/summer/backup/detectors/es6/Parser.d.ts +0 -134
  229. package/dist/@types/summer/backup/detectors/es6/StackedSetMap.d.ts +0 -17
  230. package/dist/@types/summer/backup/detectors/es6/acorn/acorn.d.ts +0 -0
  231. package/dist/@types/summer/backup/detectors/es6/types.d.ts +0 -37
  232. package/dist/@types/summer/backup/detectors/wxml/index.d.ts +0 -4
  233. package/dist/@types/summer/backup/detectors/wxss/index.d.ts +0 -5
  234. package/dist/@types/summer/backup/detectors/wxss/parse.d.ts +0 -1
  235. package/dist/@types/summer/backup/fslayer/fslayer.d.ts +0 -73
  236. package/dist/@types/summer/backup/graph.d.ts +0 -71
  237. package/dist/@types/summer/backup/module.d.ts +0 -34
  238. package/dist/@types/summer/backup/plugin_driver.d.ts +0 -41
  239. package/dist/@types/summer/backup/structs/app.d.ts +0 -0
  240. package/dist/@types/summer/backup/watcher.d.ts +0 -0
  241. package/dist/core/js/__tests__/minifyjs.spec.js +0 -1
  242. package/dist/summer/backup/appconf/index-old.js +0 -1
  243. package/dist/summer/backup/appconf/index.js +0 -1
  244. package/dist/summer/backup/detectors/es6/BasicEvaluatedExpression.js +0 -1
  245. package/dist/summer/backup/detectors/es6/ContextDependencyHelpers.js +0 -1
  246. package/dist/summer/backup/detectors/es6/Evaluator.js +0 -1
  247. package/dist/summer/backup/detectors/es6/Parser.js +0 -1
  248. package/dist/summer/backup/detectors/es6/StackedSetMap.js +0 -1
  249. package/dist/summer/backup/detectors/es6/acorn/acorn.js +0 -1
  250. package/dist/summer/backup/detectors/es6/types.js +0 -1
  251. package/dist/summer/backup/detectors/wxml/index.js +0 -1
  252. package/dist/summer/backup/detectors/wxss/index.js +0 -1
  253. package/dist/summer/backup/detectors/wxss/parse.js +0 -1
  254. package/dist/summer/backup/fslayer/fslayer.js +0 -1
  255. package/dist/summer/backup/graph.js +0 -1
  256. package/dist/summer/backup/module.js +0 -1
  257. package/dist/summer/backup/plugin_driver.js +0 -1
  258. package/dist/summer/backup/structs/app.js +0 -1
  259. package/dist/summer/backup/watcher.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).acorn={})}(this,(function(t){var e={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},i="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",s={5:i,"5module":i+" export import",6:i+" const class extends export import super"},a=/^in(stanceof)?$/,r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",n="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",o=new RegExp("["+r+"]"),h=new RegExp("["+r+n+"]");r=n=null;var p=[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,157,310,10,21,11,7,153,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,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,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,85,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,159,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,230,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,35,56,264,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,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,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,2357,44,11,6,17,0,370,43,1301,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,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],c=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,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,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function l(t,e){for(var i=65536,s=0;s<e.length;s+=2){if((i+=e[s])>t)return!1;if((i+=e[s+1])>=t)return!0}}function u(t,e){return t<65?36===t:t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&o.test(String.fromCharCode(t)):!1!==e&&l(t,p)))}function d(t,e){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||(t<=65535?t>=170&&h.test(String.fromCharCode(t)):!1!==e&&(l(t,p)||l(t,c)))))}var f=function(t,e){void 0===e&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function m(t,e){return new f(t,{beforeExpr:!0,binop:e})}var g={beforeExpr:!0},x={startsExpr:!0},v={};function y(t,e){return void 0===e&&(e={}),e.keyword=t,v[t]=new f(t,e)}var _={num:new f("num",x),regexp:new f("regexp",x),string:new f("string",x),name:new f("name",x),eof:new f("eof"),bracketL:new f("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new f("]"),braceL:new f("{",{beforeExpr:!0,startsExpr:!0}),braceR:new f("}"),parenL:new f("(",{beforeExpr:!0,startsExpr:!0}),parenR:new f(")"),comma:new f(",",g),semi:new f(";",g),colon:new f(":",g),dot:new f("."),question:new f("?",g),questionDot:new f("?."),arrow:new f("=>",g),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",g),backQuote:new f("`",x),dollarBraceL:new f("${",{beforeExpr:!0,startsExpr:!0}),eq:new f("=",{beforeExpr:!0,isAssign:!0}),assign:new f("_=",{beforeExpr:!0,isAssign:!0}),incDec:new f("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new f("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=/===/!==",6),relational:m("</>/<=/>=",7),bitShift:m("<</>>/>>>",8),plusMin:new f("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new f("**",{beforeExpr:!0}),coalesce:m("??",1),_break:y("break"),_case:y("case",g),_catch:y("catch"),_continue:y("continue"),_debugger:y("debugger"),_default:y("default",g),_do:y("do",{isLoop:!0,beforeExpr:!0}),_else:y("else",g),_finally:y("finally"),_for:y("for",{isLoop:!0}),_function:y("function",x),_if:y("if"),_return:y("return",g),_switch:y("switch"),_throw:y("throw",g),_try:y("try"),_var:y("var"),_const:y("const"),_while:y("while",{isLoop:!0}),_with:y("with"),_new:y("new",{beforeExpr:!0,startsExpr:!0}),_this:y("this",x),_super:y("super",x),_class:y("class",x),_extends:y("extends",g),_export:y("export"),_import:y("import",x),_null:y("null",x),_true:y("true",x),_false:y("false",x),_in:y("in",{beforeExpr:!0,binop:7}),_instanceof:y("instanceof",{beforeExpr:!0,binop:7}),_typeof:y("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:y("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:y("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},b=/\r\n?|\n|\u2028|\u2029/,k=new RegExp(b.source,"g");function S(t,e){return 10===t||13===t||!e&&(8232===t||8233===t)}var C=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,w=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,E=Object.prototype,A=E.hasOwnProperty,I=E.toString;function P(t,e){return A.call(t,e)}var T=Array.isArray||function(t){return"[object Array]"===I.call(t)};function L(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var N=function(t,e){this.line=t,this.column=e};N.prototype.offset=function(t){return new N(this.line,this.column+t)};var V=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function R(t,e){for(var i=1,s=0;;){k.lastIndex=s;var a=k.exec(t);if(!(a&&a.index<e))return new N(i,e-s);++i,s=a.index+a[0].length}}var M={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,skipStatementPos:Number.POSITIVE_INFINITY},B=!1;function O(t){var e={};for(var i in M)e[i]=t&&P(t,i)?t[i]:M[i];if("latest"===e.ecmaVersion?e.ecmaVersion=1e8:null==e.ecmaVersion?(!B&&"object"==typeof console&&console.warn&&(B=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),T(e.onToken)){var s=e.onToken;e.onToken=function(t){return s.push(t)}}return T(e.onComment)&&(e.onComment=function(t,e){return function(i,s,a,r,n,o){var h={type:i?"Block":"Line",value:s,start:a,end:r};t.locations&&(h.loc=new V(this,n,o)),t.ranges&&(h.range=[a,r]),e.push(h)}}(e,e.onComment)),e}function D(t,e){return 2|(t?4:0)|(e?8:0)}var U=function(t,i,a){this.options=t=O(t),this.sourceFile=t.sourceFile,this.keywords=L(s[t.ecmaVersion>=6?6:"module"===t.sourceType?"5module":5]);var r="";!0!==t.allowReserved&&(r=e[t.ecmaVersion>=6?6:5===t.ecmaVersion?5:3],"module"===t.sourceType&&(r+=" await")),this.reservedWords=L(r);var n=(r?r+" ":"")+e.strict;this.reservedWordsStrict=L(n),this.reservedWordsStrictBind=L(n+" "+e.strictBind),this.input=String(i),this.containsEsc=!1,a?(this.pos=a,this.lineStart=this.input.lastIndexOf("\n",a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(b).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=_.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},F={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},inNonArrowFunction:{configurable:!0}};U.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},F.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},F.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},F.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},F.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},F.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},F.inNonArrowFunction.get=function(){return(2&this.currentThisScope().flags)>0},U.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,s=0;s<t.length;s++)i=t[s](i);return i},U.parse=function(t,e){return new this(e,t).parse()},U.parseExpressionAt=function(t,e,i){var s=new this(i,t,e);return s.nextToken(),s.parseExpression()},U.tokenizer=function(t,e){return new this(e,t)},Object.defineProperties(U.prototype,F);var H=U.prototype,G=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function W(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}H.strictDirective=function(t){for(;;){w.lastIndex=t,t+=w.exec(this.input)[0].length;var e=G.exec(this.input.slice(t));if(!e)return!1;if("use strict"===(e[1]||e[2])){w.lastIndex=t+e[0].length;var i=w.exec(this.input),s=i.index+i[0].length,a=this.input.charAt(s);return";"===a||"}"===a||b.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(a)||"!"===a&&"="===this.input.charAt(s+1))}t+=e[0].length,w.lastIndex=t,t+=w.exec(this.input)[0].length,";"===this.input[t]&&t++}},H.eat=function(t){return this.type===t&&(this.next(),!0)},H.isContextual=function(t){return this.type===_.name&&this.value===t&&!this.containsEsc},H.eatContextual=function(t){return!!this.isContextual(t)&&(this.next(),!0)},H.expectContextual=function(t){this.eatContextual(t)||this.unexpected()},H.canInsertSemicolon=function(){return this.type===_.eof||this.type===_.braceR||b.test(this.input.slice(this.lastTokEnd,this.start))},H.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},H.semicolon=function(){this.eat(_.semi)||this.insertSemicolon()||this.unexpected()},H.afterTrailingComma=function(t,e){if(this.type===t)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),e||this.next(),!0},H.expect=function(t){this.eat(t)||this.unexpected()},H.unexpected=function(t){this.raise(null!=t?t:this.start,"Unexpected token")},H.checkPatternErrors=function(t,e){if(t){t.trailingComma>-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,"Parenthesized pattern")}},H.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,s=t.doubleProto;if(!e)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")},H.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},H.isSimpleAssignTarget=function(t){return"ParenthesizedExpression"===t.type?this.isSimpleAssignTarget(t.expression):"Identifier"===t.type||"MemberExpression"===t.type};var j=U.prototype;j.parseTopLevel=function(t){var e=Object.create(null);for(t.body||(t.body=[]);this.type!==_.eof&&this.start<=this.options.skipStatementPos;){var i=this.parseStatement(null,!0,e);t.body.push(i)}if(this.inModule)for(var s=0,a=Object.keys(this.undefinedExports);s<a.length;s+=1){var r=a[s];this.raiseRecoverable(this.undefinedExports[r].start,"Export '"+r+"' is not defined")}return this.adaptDirectivePrologue(t.body),this.next(),t.sourceType=this.options.sourceType,this.finishNode(t,"Program")};var q={kind:"loop"},K={kind:"switch"};j.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;w.lastIndex=this.pos;var e=w.exec(this.input),i=this.pos+e[0].length,s=this.input.charCodeAt(i);if(91===s)return!0;if(t)return!1;if(123===s)return!0;if(u(s,!0)){for(var r=i+1;d(this.input.charCodeAt(r),!0);)++r;var n=this.input.slice(i,r);if(!a.test(n))return!0}return!1},j.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;w.lastIndex=this.pos;var t=w.exec(this.input),e=this.pos+t[0].length;return!(b.test(this.input.slice(this.pos,e))||"function"!==this.input.slice(e,e+8)||e+8!==this.input.length&&d(this.input.charAt(e+8)))},j.parseStatement=function(t,e,i){var s,a=this.type,r=this.startNode();switch(this.isLet(t)&&(a=_._var,s="let"),a){case _._break:case _._continue:return this.parseBreakContinueStatement(r,a.keyword);case _._debugger:return this.parseDebuggerStatement(r);case _._do:return this.parseDoStatement(r);case _._for:return this.parseForStatement(r);case _._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!t);case _._class:return t&&this.unexpected(),this.parseClass(r,!0);case _._if:return this.parseIfStatement(r);case _._return:return this.parseReturnStatement(r);case _._switch:return this.parseSwitchStatement(r);case _._throw:return this.parseThrowStatement(r);case _._try:return this.parseTryStatement(r);case _._const:case _._var:return s=s||this.value,t&&"var"!==s&&this.unexpected(),this.parseVarStatement(r,s);case _._while:return this.parseWhileStatement(r);case _._with:return this.parseWithStatement(r);case _.braceL:return this.parseBlock(!0,r);case _.semi:return this.parseEmptyStatement(r);case _._export:case _._import:if(this.options.ecmaVersion>10&&a===_._import){w.lastIndex=this.pos;var n=w.exec(this.input),o=this.pos+n[0].length,h=this.input.charCodeAt(o);if(40===h||46===h)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===_._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!t);var p=this.value,c=this.parseExpression();return a===_.name&&"Identifier"===c.type&&this.eat(_.colon)?this.parseLabeledStatement(r,p,c,t):this.parseExpressionStatement(r,c)}},j.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(_.semi)||this.insertSemicolon()?t.label=null:this.type!==_.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var a=this.labels[s];if(null==t.label||a.name===t.label.name){if(null!=a.kind&&(i||"loop"===a.kind))break;if(t.label&&i)break}}return s===this.labels.length&&this.raise(t.start,"Unsyntactic "+e),this.finishNode(t,i?"BreakStatement":"ContinueStatement")},j.parseDebuggerStatement=function(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")},j.parseDoStatement=function(t){return this.next(),this.labels.push(q),t.body=this.parseStatement("do"),this.labels.pop(),this.expect(_._while),t.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(_.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},j.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(q),this.enterScope(0),this.expect(_.parenL),this.type===_.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===_._var||this.type===_._const||i){var s=this.startNode(),a=i?"let":this.value;return this.next(),this.parseVar(s,!0,a),this.finishNode(s,"VariableDeclaration"),(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===s.declarations.length?(this.options.ecmaVersion>=9&&(this.type===_._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,s)):(e>-1&&this.unexpected(e),this.parseFor(t,s))}var r=new W,n=this.parseExpression(!0,r);return this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===_._in?e>-1&&this.unexpected(e):t.await=e>-1),this.toAssignable(n,!1,r),this.checkLValPattern(n),this.parseForIn(t,n)):(this.checkExpressionErrors(r,!0),e>-1&&this.unexpected(e),this.parseFor(t,n))},j.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,Q|(i?0:X),!1,e)},j.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(_._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},j.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(_.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},j.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(_.braceL),this.labels.push(K),this.enterScope(0);for(var i=!1;this.type!==_.braceR;)if(this.type===_._case||this.type===_._default){var s=this.type===_._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),s?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(_.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},j.parseThrowStatement=function(t){return this.next(),b.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var z=[];j.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===_._catch){var e=this.startNode();if(this.next(),this.eat(_.parenL)){e.param=this.parseBindingAtom();var i="Identifier"===e.param.type;this.enterScope(i?32:0),this.checkLValPattern(e.param,i?4:2),this.expect(_.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(_._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},j.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},j.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(q),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},j.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},j.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},j.parseLabeledStatement=function(t,e,i,s){for(var a=0,r=this.labels;a<r.length;a+=1){r[a].name===e&&this.raise(i.start,"Label '"+e+"' is already declared")}for(var n=this.type.isLoop?"loop":this.type===_._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var h=this.labels[o];if(h.statementStart!==t.start)break;h.statementStart=this.start,h.kind=n}return this.labels.push({name:e,kind:n,statementStart:this.start}),t.body=this.parseStatement(s?-1===s.indexOf("label")?s+"label":s:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},j.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},j.parseBlock=function(t,e,i){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(_.braceL),t&&this.enterScope(0);this.type!==_.braceR;){var s=this.parseStatement(null);e.body.push(s)}return i&&(this.strict=!1),this.next(),t&&this.exitScope(),this.finishNode(e,"BlockStatement")},j.parseFor=function(t,e){return t.init=e,this.expect(_.semi),t.test=this.type===_.semi?null:this.parseExpression(),this.expect(_.semi),t.update=this.type===_.parenR?null:this.parseExpression(),this.expect(_.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},j.parseForIn=function(t,e){var i=this.type===_._in;return this.next(),"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(!i||this.options.ecmaVersion<8||this.strict||"var"!==e.kind||"Identifier"!==e.declarations[0].id.type)&&this.raise(e.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(_.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")},j.parseVar=function(t,e,i){for(t.declarations=[],t.kind=i;;){var s=this.startNode();if(this.parseVarId(s,i),this.eat(_.eq)?s.init=this.parseMaybeAssign(e):"const"!==i||this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===s.id.type||e&&(this.type===_._in||this.isContextual("of"))?s.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(_.comma))break}return t},j.parseVarId=function(t,e){t.id=this.parseBindingAtom(),this.checkLValPattern(t.id,"var"===e?1:2,!1)};var Q=1,X=2;j.parseFunction=function(t,e,i,s){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===_.star&&e&X&&this.unexpected(),t.generator=this.eat(_.star)),this.options.ecmaVersion>=8&&(t.async=!!s),e&Q&&(t.id=4&e&&this.type!==_.name?null:this.parseIdent(),!t.id||e&X||this.checkLValSimple(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,r=this.awaitPos,n=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(D(t.async,t.generator)),e&Q||(t.id=this.type===_.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1),this.yieldPos=a,this.awaitPos=r,this.awaitIdentPos=n,this.finishNode(t,e&Q?"FunctionDeclaration":"FunctionExpression")},j.parseFunctionParams=function(t){this.expect(_.parenL),t.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},j.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var s=this.startNode(),a=!1;for(s.body=[],this.expect(_.braceL);this.type!==_.braceR;){var r=this.parseClassElement(null!==t.superClass);r&&(s.body.push(r),"MethodDefinition"===r.type&&"constructor"===r.kind&&(a&&this.raise(r.start,"Duplicate constructor in the same class"),a=!0))}return this.strict=i,this.next(),t.body=this.finishNode(s,"ClassBody"),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},j.parseClassElement=function(t){var e=this;if(this.eat(_.semi))return null;var i=this.startNode(),s=function(t,s){void 0===s&&(s=!1);var a=e.start,r=e.startLoc;return!!e.eatContextual(t)&&(!(e.type===_.parenL||s&&e.canInsertSemicolon())||(i.key&&e.unexpected(),i.computed=!1,i.key=e.startNodeAt(a,r),i.key.name=t,e.finishNode(i.key,"Identifier"),!1))};i.kind="method",i.static=s("static");var a=this.eat(_.star),r=!1;a||(this.options.ecmaVersion>=8&&s("async",!0)?(r=!0,a=this.options.ecmaVersion>=9&&this.eat(_.star)):s("get")?i.kind="get":s("set")&&(i.kind="set")),i.key||this.parsePropertyName(i);var n=i.key,o=!1;return i.computed||i.static||!("Identifier"===n.type&&"constructor"===n.name||"Literal"===n.type&&"constructor"===n.value)?i.static&&"Identifier"===n.type&&"prototype"===n.name&&this.raise(n.start,"Classes may not have a static property named prototype"):("method"!==i.kind&&this.raise(n.start,"Constructor can't have get/set modifier"),a&&this.raise(n.start,"Constructor can't be a generator"),r&&this.raise(n.start,"Constructor can't be an async method"),i.kind="constructor",o=t),this.parseClassMethod(i,a,r,o),"get"===i.kind&&0!==i.value.params.length&&this.raiseRecoverable(i.value.start,"getter should have no params"),"set"===i.kind&&1!==i.value.params.length&&this.raiseRecoverable(i.value.start,"setter should have exactly one param"),"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params"),i},j.parseClassMethod=function(t,e,i,s){return t.value=this.parseMethod(e,i,s),this.finishNode(t,"MethodDefinition")},j.parseClassId=function(t,e){this.type===_.name?(t.id=this.parseIdent(),e&&this.checkLValSimple(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},j.parseClassSuper=function(t){t.superClass=this.eat(_._extends)?this.parseExprSubscripts():null},j.parseExport=function(t,e){if(this.next(),this.eat(_.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(t.exported=this.parseIdent(!0),this.checkExport(e,t.exported.name,this.lastTokStart)):t.exported=null),this.expectContextual("from"),this.type!==_.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(_._default)){var i;if(this.checkExport(e,"default",this.lastTokStart),this.type===_._function||(i=this.isAsyncFunction())){var s=this.startNode();this.next(),i&&this.next(),t.declaration=this.parseFunction(s,4|Q,!1,i)}else if(this.type===_._class){var a=this.startNode();t.declaration=this.parseClass(a,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==_.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var r=0,n=t.specifiers;r<n.length;r+=1){var o=n[r];this.checkUnreserved(o.local),this.checkLocalExport(o.local)}t.source=null}this.semicolon()}return this.finishNode(t,"ExportNamedDeclaration")},j.checkExport=function(t,e,i){t&&(P(t,e)&&this.raiseRecoverable(i,"Duplicate export '"+e+"'"),t[e]=!0)},j.checkPatternExport=function(t,e){var i=e.type;if("Identifier"===i)this.checkExport(t,e.name,e.start);else if("ObjectPattern"===i)for(var s=0,a=e.properties;s<a.length;s+=1){var r=a[s];this.checkPatternExport(t,r)}else if("ArrayPattern"===i)for(var n=0,o=e.elements;n<o.length;n+=1){var h=o[n];h&&this.checkPatternExport(t,h)}else"Property"===i?this.checkPatternExport(t,e.value):"AssignmentPattern"===i?this.checkPatternExport(t,e.left):"RestElement"===i?this.checkPatternExport(t,e.argument):"ParenthesizedExpression"===i&&this.checkPatternExport(t,e.expression)},j.checkVariableExport=function(t,e){if(t)for(var i=0,s=e;i<s.length;i+=1){var a=s[i];this.checkPatternExport(t,a.id)}},j.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},j.parseExportSpecifiers=function(t){var e=[],i=!0;for(this.expect(_.braceL);!this.eat(_.braceR);){if(i)i=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var s=this.startNode();s.local=this.parseIdent(!0),s.exported=this.eatContextual("as")?this.parseIdent(!0):s.local,this.checkExport(t,s.exported.name,s.exported.start),e.push(this.finishNode(s,"ExportSpecifier"))}return e},j.parseImport=function(t){return this.next(),this.type===_.string?(t.specifiers=z,t.source=this.parseExprAtom()):(t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.type===_.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(t,"ImportDeclaration")},j.parseImportSpecifiers=function(){var t=[],e=!0;if(this.type===_.name){var i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,2),t.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(_.comma))return t}if(this.type===_.star){var s=this.startNode();return this.next(),this.expectContextual("as"),s.local=this.parseIdent(),this.checkLValSimple(s.local,2),t.push(this.finishNode(s,"ImportNamespaceSpecifier")),t}for(this.expect(_.braceL);!this.eat(_.braceR);){if(e)e=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var a=this.startNode();a.imported=this.parseIdent(!0),this.eatContextual("as")?a.local=this.parseIdent():(this.checkUnreserved(a.imported),a.local=a.imported),this.checkLValSimple(a.local,2),t.push(this.finishNode(a,"ImportSpecifier"))}return t},j.adaptDirectivePrologue=function(t){for(var e=0;e<t.length&&this.isDirectiveCandidate(t[e]);++e)t[e].directive=t[e].expression.raw.slice(1,-1)},j.isDirectiveCandidate=function(t){return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&('"'===this.input[t.start]||"'"===this.input[t.start])};var Y=U.prototype;Y.toAssignable=function(t,e,i){if(this.options.ecmaVersion>=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,a=t.properties;s<a.length;s+=1){var r=a[s];this.toAssignable(r,e),"RestElement"!==r.type||"ArrayPattern"!==r.argument.type&&"ObjectPattern"!==r.argument.type||this.raise(r.argument.start,"Unexpected token")}break;case"Property":"init"!==t.kind&&this.raise(t.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(t.value,e);break;case"ArrayExpression":t.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(t.elements,e);break;case"SpreadElement":t.type="RestElement",this.toAssignable(t.argument,e),"AssignmentPattern"===t.argument.type&&this.raise(t.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==t.operator&&this.raise(t.left.end,"Only '=' operator can be used for specifying default value."),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(t.expression,e,i);break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!e)break;default:this.raise(t.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return t},Y.toAssignableList=function(t,e){for(var i=t.length,s=0;s<i;s++){var a=t[s];a&&this.toAssignable(a,e)}if(i){var r=t[i-1];6===this.options.ecmaVersion&&e&&r&&"RestElement"===r.type&&"Identifier"!==r.argument.type&&this.unexpected(r.argument.start)}return t},Y.parseSpread=function(t){var e=this.startNode();return this.next(),e.argument=this.parseMaybeAssign(!1,t),this.finishNode(e,"SpreadElement")},Y.parseRestBinding=function(){var t=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==_.name&&this.unexpected(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")},Y.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case _.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(_.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case _.braceL:return this.parseObj(!0)}return this.parseIdent()},Y.parseBindingList=function(t,e,i){for(var s=[],a=!0;!this.eat(t);)if(a?a=!1:this.expect(_.comma),e&&this.type===_.comma)s.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===_.ellipsis){var r=this.parseRestBinding();this.parseBindingListItem(r),s.push(r),this.type===_.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}var n=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(n),s.push(n)}return s},Y.parseBindingListItem=function(t){return t},Y.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(_.eq))return i;var s=this.startNodeAt(t,e);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},Y.checkLValSimple=function(t,e,i){void 0===e&&(e=0);var s=0!==e;switch(t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(s?"Binding ":"Assigning to ")+t.name+" in strict mode"),s&&(2===e&&"let"===t.name&&this.raiseRecoverable(t.start,"let is disallowed as a lexically bound name"),i&&(P(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),5!==e&&this.declareName(t.name,e,t.start));break;case"ChainExpression":this.raiseRecoverable(t.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(t.start,"Binding parenthesized expression"),this.checkLValSimple(t.expression,e,i);default:this.raise(t.start,(s?"Binding":"Assigning to")+" rvalue")}},Y.checkLValPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"ObjectPattern":for(var s=0,a=t.properties;s<a.length;s+=1){var r=a[s];this.checkLValInnerPattern(r,e,i)}break;case"ArrayPattern":for(var n=0,o=t.elements;n<o.length;n+=1){var h=o[n];h&&this.checkLValInnerPattern(h,e,i)}break;default:this.checkLValSimple(t,e,i)}},Y.checkLValInnerPattern=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Property":this.checkLValInnerPattern(t.value,e,i);break;case"AssignmentPattern":this.checkLValPattern(t.left,e,i);break;case"RestElement":this.checkLValPattern(t.argument,e,i);break;default:this.checkLValPattern(t,e,i)}};var Z=U.prototype;Z.checkPropClash=function(t,e,i){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var s,a=t.key;switch(a.type){case"Identifier":s=a.name;break;case"Literal":s=String(a.value);break;default:return}var r=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===s&&"init"===r&&(e.proto&&(i?i.doubleProto<0&&(i.doubleProto=a.start):this.raiseRecoverable(a.start,"Redefinition of __proto__ property")),e.proto=!0);else{var n=e[s="$"+s];if(n)("init"===r?this.strict&&n.init||n.get||n.set:n.init||n[r])&&this.raiseRecoverable(a.start,"Redefinition of property");else n=e[s]={init:!1,get:!1,set:!1};n[r]=!0}}},Z.parseExpression=function(t,e){var i=this.start,s=this.startLoc,a=this.parseMaybeAssign(t,e);if(this.type===_.comma){var r=this.startNodeAt(i,s);for(r.expressions=[a];this.eat(_.comma);)r.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(r,"SequenceExpression")}return a},Z.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var s=!1,a=-1,r=-1;e?(a=e.parenthesizedAssign,r=e.trailingComma,e.parenthesizedAssign=e.trailingComma=-1):(e=new W,s=!0);var n=this.start,o=this.startLoc;this.type!==_.parenL&&this.type!==_.name||(this.potentialArrowAt=this.start);var h=this.parseMaybeConditional(t,e);if(i&&(h=i.call(this,h,n,o)),this.type.isAssign){var p=this.startNodeAt(n,o);return p.operator=this.value,this.type===_.eq&&(h=this.toAssignable(h,!1,e)),s||(e.parenthesizedAssign=e.trailingComma=e.doubleProto=-1),e.shorthandAssign>=h.start&&(e.shorthandAssign=-1),this.type===_.eq?this.checkLValPattern(h):this.checkLValSimple(h),p.left=h,this.next(),p.right=this.parseMaybeAssign(t),this.finishNode(p,"AssignmentExpression")}return s&&this.checkExpressionErrors(e,!0),a>-1&&(e.parenthesizedAssign=a),r>-1&&(e.trailingComma=r),h},Z.parseMaybeConditional=function(t,e){var i=this.start,s=this.startLoc,a=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return a;if(this.eat(_.question)){var r=this.startNodeAt(i,s);return r.test=a,r.consequent=this.parseMaybeAssign(),this.expect(_.colon),r.alternate=this.parseMaybeAssign(t),this.finishNode(r,"ConditionalExpression")}return a},Z.parseExprOps=function(t,e){var i=this.start,s=this.startLoc,a=this.parseMaybeUnary(e,!1);return this.checkExpressionErrors(e)||a.start===i&&"ArrowFunctionExpression"===a.type?a:this.parseExprOp(a,i,s,-1,t)},Z.parseExprOp=function(t,e,i,s,a){var r=this.type.binop;if(null!=r&&(!a||this.type!==_._in)&&r>s){var n=this.type===_.logicalOR||this.type===_.logicalAND,o=this.type===_.coalesce;o&&(r=_.logicalAND.binop);var h=this.value;this.next();var p=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),p,c,r,a),u=this.buildBinary(e,i,t,l,h,n||o);return(n&&this.type===_.coalesce||o&&(this.type===_.logicalOR||this.type===_.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(u,e,i,s,a)}return t},Z.buildBinary=function(t,e,i,s,a,r){var n=this.startNodeAt(t,e);return n.left=i,n.operator=a,n.right=s,this.finishNode(n,r?"LogicalExpression":"BinaryExpression")},Z.parseMaybeUnary=function(t,e){var i,s=this.start,a=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))i=this.parseAwait(),e=!0;else if(this.type.prefix){var r=this.startNode(),n=this.type===_.incDec;r.operator=this.value,r.prefix=!0,this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),n?this.checkLValSimple(r.argument):this.strict&&"delete"===r.operator&&"Identifier"===r.argument.type?this.raiseRecoverable(r.start,"Deleting local variable in strict mode"):e=!0,i=this.finishNode(r,n?"UpdateExpression":"UnaryExpression")}else{if(i=this.parseExprSubscripts(t),this.checkExpressionErrors(t))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(s,a);o.operator=this.value,o.prefix=!1,o.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(o,"UpdateExpression")}}return!e&&this.eat(_.starstar)?this.buildBinary(s,a,i,this.parseMaybeUnary(null,!1),"**",!1):i},Z.parseExprSubscripts=function(t){var e=this.start,i=this.startLoc,s=this.parseExprAtom(t);if("ArrowFunctionExpression"===s.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return s;var a=this.parseSubscripts(s,e,i);return t&&"MemberExpression"===a.type&&(t.parenthesizedAssign>=a.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=a.start&&(t.parenthesizedBind=-1)),a},Z.parseSubscripts=function(t,e,i,s){for(var a=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.potentialArrowAt===t.start,r=!1;;){var n=this.parseSubscript(t,e,i,s,a,r);if(n.optional&&(r=!0),n===t||"ArrowFunctionExpression"===n.type){if(r){var o=this.startNodeAt(e,i);o.expression=n,n=this.finishNode(o,"ChainExpression")}return n}t=n}},Z.parseSubscript=function(t,e,i,s,a,r){var n=this.options.ecmaVersion>=11,o=n&&this.eat(_.questionDot);s&&o&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var h=this.eat(_.bracketL);if(h||o&&this.type!==_.parenL&&this.type!==_.backQuote||this.eat(_.dot)){var p=this.startNodeAt(e,i);p.object=t,p.property=h?this.parseExpression():this.parseIdent("never"!==this.options.allowReserved),p.computed=!!h,h&&this.expect(_.bracketR),n&&(p.optional=o),t=this.finishNode(p,"MemberExpression")}else if(!s&&this.eat(_.parenL)){var c=new W,l=this.yieldPos,u=this.awaitPos,d=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var f=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1,c);if(a&&!o&&!this.canInsertSemicolon()&&this.eat(_.arrow))return this.checkPatternErrors(c,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=l,this.awaitPos=u,this.awaitIdentPos=d,this.parseArrowExpression(this.startNodeAt(e,i),f,!0);this.checkExpressionErrors(c,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=u||this.awaitPos,this.awaitIdentPos=d||this.awaitIdentPos;var m=this.startNodeAt(e,i);m.callee=t,m.arguments=f,n&&(m.optional=o),t=this.finishNode(m,"CallExpression")}else if(this.type===_.backQuote){(o||r)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var g=this.startNodeAt(e,i);g.tag=t,g.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(g,"TaggedTemplateExpression")}return t},Z.parseExprAtom=function(t){this.type===_.slash&&this.readRegexp();var e,i=this.potentialArrowAt===this.start;switch(this.type){case _._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),e=this.startNode(),this.next(),this.type!==_.parenL||this.allowDirectSuper||this.raise(e.start,"super() call outside constructor of a subclass"),this.type!==_.dot&&this.type!==_.bracketL&&this.type!==_.parenL&&this.unexpected(),this.finishNode(e,"Super");case _._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case _.name:var s=this.start,a=this.startLoc,r=this.containsEsc,n=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!r&&"async"===n.name&&!this.canInsertSemicolon()&&this.eat(_._function))return this.parseFunction(this.startNodeAt(s,a),0,!1,!0);if(i&&!this.canInsertSemicolon()){if(this.eat(_.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[n],!1);if(this.options.ecmaVersion>=8&&"async"===n.name&&this.type===_.name&&!r)return n=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(_.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(s,a),[n],!0)}return n;case _.regexp:var o=this.value;return(e=this.parseLiteral(o.value)).regex={pattern:o.pattern,flags:o.flags},e;case _.num:case _.string:return this.parseLiteral(this.value);case _._null:case _._true:case _._false:return(e=this.startNode()).value=this.type===_._null?null:this.type===_._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case _.parenL:var h=this.start,p=this.parseParenAndDistinguishExpression(i);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(p)&&(t.parenthesizedAssign=h),t.parenthesizedBind<0&&(t.parenthesizedBind=h)),p;case _.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(_.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case _.braceL:return this.parseObj(!1,t);case _._function:return e=this.startNode(),this.next(),this.parseFunction(e,0);case _._class:return this.parseClass(this.startNode(),!1);case _._new:return this.parseNew();case _.backQuote:return this.parseTemplate();case _._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},Z.parseExprImport=function(){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var e=this.parseIdent(!0);switch(this.type){case _.parenL:return this.parseDynamicImport(t);case _.dot:return t.meta=e,this.parseImportMeta(t);default:this.unexpected()}},Z.parseDynamicImport=function(t){if(this.next(),t.source=this.parseMaybeAssign(),!this.eat(_.parenR)){var e=this.start;this.eat(_.comma)&&this.eat(_.parenR)?this.raiseRecoverable(e,"Trailing comma is not allowed in import()"):this.unexpected(e)}return this.finishNode(t,"ImportExpression")},Z.parseImportMeta=function(t){this.next();var e=this.containsEsc;return t.property=this.parseIdent(!0),"meta"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for import is 'import.meta'"),e&&this.raiseRecoverable(t.start,"'import.meta' must not contain escaped characters"),"module"!==this.options.sourceType&&this.raiseRecoverable(t.start,"Cannot use 'import.meta' outside a module"),this.finishNode(t,"MetaProperty")},Z.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),110===e.raw.charCodeAt(e.raw.length-1)&&(e.bigint=e.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(e,"Literal")},Z.parseParenExpression=function(){this.expect(_.parenL);var t=this.parseExpression();return this.expect(_.parenR),t},Z.parseParenAndDistinguishExpression=function(t){var e,i=this.start,s=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var r,n=this.start,o=this.startLoc,h=[],p=!0,c=!1,l=new W,u=this.yieldPos,d=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==_.parenR;){if(p?p=!1:this.expect(_.comma),a&&this.afterTrailingComma(_.parenR,!0)){c=!0;break}if(this.type===_.ellipsis){r=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===_.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}h.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var f=this.start,m=this.startLoc;if(this.expect(_.parenR),t&&!this.canInsertSemicolon()&&this.eat(_.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=u,this.awaitPos=d,this.parseParenArrowList(i,s,h);h.length&&!c||this.unexpected(this.lastTokStart),r&&this.unexpected(r),this.checkExpressionErrors(l,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=d||this.awaitPos,h.length>1?((e=this.startNodeAt(n,o)).expressions=h,this.finishNodeAt(e,"SequenceExpression",f,m)):e=h[0]}else e=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(i,s);return g.expression=e,this.finishNode(g,"ParenthesizedExpression")}return e},Z.parseParenItem=function(t){return t},Z.parseParenArrowList=function(t,e,i){return this.parseArrowExpression(this.startNodeAt(t,e),i)};var J=[];Z.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(_.dot)){t.meta=e;var i=this.containsEsc;return t.property=this.parseIdent(!0),"target"!==t.property.name&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(t.start,"'new.target' must not contain escaped characters"),this.inNonArrowFunction||this.raiseRecoverable(t.start,"'new.target' can only be used in functions"),this.finishNode(t,"MetaProperty")}var s=this.start,a=this.startLoc,r=this.type===_._import;return t.callee=this.parseSubscripts(this.parseExprAtom(),s,a,!0),r&&"ImportExpression"===t.callee.type&&this.raise(s,"Cannot use new with import()"),this.eat(_.parenL)?t.arguments=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1):t.arguments=J,this.finishNode(t,"NewExpression")},Z.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===_.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===_.backQuote,this.finishNode(i,"TemplateElement")},Z.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:e});for(i.quasis=[s];!s.tail;)this.type===_.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(_.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(_.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},Z.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===_.name||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===_.star)&&!b.test(this.input.slice(this.lastTokEnd,this.start))},Z.parseObj=function(t,e){var i=this.startNode(),s=!0,a={};for(i.properties=[],this.next();!this.eat(_.braceR);){if(s)s=!1;else if(this.expect(_.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(_.braceR))break;var r=this.parseProperty(t,e);t||this.checkPropClash(r,a,e),i.properties.push(r)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},Z.parseProperty=function(t,e){var i,s,a,r,n=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(_.ellipsis))return t?(n.argument=this.parseIdent(!1),this.type===_.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(this.type===_.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),n.argument=this.parseMaybeAssign(!1,e),this.type===_.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(t||e)&&(a=this.start,r=this.startLoc),t||(i=this.eat(_.star)));var o=this.containsEsc;return this.parsePropertyName(n),!t&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n)?(s=!0,i=this.options.ecmaVersion>=9&&this.eat(_.star),this.parsePropertyName(n,e)):s=!1,this.parsePropertyValue(n,t,i,s,a,r,e,o),this.finishNode(n,"Property")},Z.parsePropertyValue=function(t,e,i,s,a,r,n,o){if((i||s)&&this.type===_.colon&&this.unexpected(),this.eat(_.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,n),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===_.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(i,s);else if(e||o||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===_.comma||this.type===_.braceR||this.type===_.eq)this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||s)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=a),t.kind="init",e?t.value=this.parseMaybeDefault(a,r,this.copyNode(t.key)):this.type===_.eq&&n?(n.shorthandAssign<0&&(n.shorthandAssign=this.start),t.value=this.parseMaybeDefault(a,r,this.copyNode(t.key))):t.value=this.copyNode(t.key),t.shorthand=!0):this.unexpected();else{(i||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var h="get"===t.kind?0:1;if(t.value.params.length!==h){var p=t.value.start;"get"===t.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}},Z.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(_.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(_.bracketR),t.key;t.computed=!1}return t.key=this.type===_.num||this.type===_.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Z.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},Z.parseMethod=function(t,e,i){var s=this.startNode(),a=this.yieldPos,r=this.awaitPos,n=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=t),this.options.ecmaVersion>=8&&(s.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|D(e,s.generator)|(i?128:0)),this.expect(_.parenL),s.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0),this.yieldPos=a,this.awaitPos=r,this.awaitIdentPos=n,this.finishNode(s,"FunctionExpression")},Z.parseArrowExpression=function(t,e,i){var s=this.yieldPos,a=this.awaitPos,r=this.awaitIdentPos;return this.enterScope(16|D(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=r,this.finishNode(t,"ArrowFunctionExpression")},Z.parseFunctionBody=function(t,e,i){var s=e&&this.type!==_.braceL,a=this.strict,r=!1;if(s)t.body=this.parseMaybeAssign(),t.expression=!0,this.checkParams(t,!1);else{var n=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);a&&!n||(r=this.strictDirective(this.end))&&n&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],r&&(this.strict=!0),this.checkParams(t,!a&&!r&&!e&&!i&&this.isSimpleParamList(t.params)),this.strict&&t.id&&this.checkLValSimple(t.id,5),t.body=this.parseBlock(!1,void 0,r&&!a),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=o}this.exitScope()},Z.isSimpleParamList=function(t){for(var e=0,i=t;e<i.length;e+=1){if("Identifier"!==i[e].type)return!1}return!0},Z.checkParams=function(t,e){for(var i=Object.create(null),s=0,a=t.params;s<a.length;s+=1){var r=a[s];this.checkLValInnerPattern(r,1,e?null:i)}},Z.parseExprList=function(t,e,i,s){for(var a=[],r=!0;!this.eat(t);){if(r)r=!1;else if(this.expect(_.comma),e&&this.afterTrailingComma(t))break;var n=void 0;i&&this.type===_.comma?n=null:this.type===_.ellipsis?(n=this.parseSpread(s),s&&this.type===_.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):n=this.parseMaybeAssign(!1,s),a.push(n)}return a},Z.checkUnreserved=function(t){var e=t.start,i=t.end,s=t.name;(this.inGenerator&&"yield"===s&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===s&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(s)&&this.raise(e,"Unexpected keyword '"+s+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(e,i).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(s)&&(this.inAsync||"await"!==s||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,"The keyword '"+s+"' is reserved"))},Z.parseIdent=function(t,e){var i=this.startNode();return this.type===_.name?i.name=this.value:this.type.keyword?(i.name=this.type.keyword,"class"!==i.name&&"function"!==i.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!t),this.finishNode(i,"Identifier"),t||(this.checkUnreserved(i),"await"!==i.name||this.awaitIdentPos||(this.awaitIdentPos=i.start)),i},Z.parseYield=function(t){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type===_.semi||this.canInsertSemicolon()||this.type!==_.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(_.star),e.argument=this.parseMaybeAssign(t)),this.finishNode(e,"YieldExpression")},Z.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0),this.finishNode(t,"AwaitExpression")};var $=U.prototype;$.raise=function(t,e){var i=R(this.input,t);e+=" ("+i.line+":"+i.column+")";var s=new SyntaxError(e);throw s.pos=t,s.loc=i,s.raisedAt=this.pos,s},$.raiseRecoverable=$.raise,$.curPosition=function(){if(this.options.locations)return new N(this.curLine,this.pos-this.lineStart)};var tt=U.prototype,et=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};tt.enterScope=function(t){this.scopeStack.push(new et(t))},tt.exitScope=function(){this.scopeStack.pop()},tt.treatFunctionsAsVarInScope=function(t){return 2&t.flags||!this.inModule&&1&t.flags},tt.declareName=function(t,e,i){var s=!1;if(2===e){var a=this.currentScope();s=a.lexical.indexOf(t)>-1||a.functions.indexOf(t)>-1||a.var.indexOf(t)>-1,a.lexical.push(t),this.inModule&&1&a.flags&&delete this.undefinedExports[t]}else if(4===e){this.currentScope().lexical.push(t)}else if(3===e){var r=this.currentScope();s=this.treatFunctionsAsVar?r.lexical.indexOf(t)>-1:r.lexical.indexOf(t)>-1||r.var.indexOf(t)>-1,r.functions.push(t)}else for(var n=this.scopeStack.length-1;n>=0;--n){var o=this.scopeStack[n];if(o.lexical.indexOf(t)>-1&&!(32&o.flags&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){s=!0;break}if(o.var.push(t),this.inModule&&1&o.flags&&delete this.undefinedExports[t],3&o.flags)break}s&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},tt.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},tt.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},tt.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(3&e.flags)return e}},tt.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(3&e.flags&&!(16&e.flags))return e}};var it=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new V(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},st=U.prototype;function at(t,e,i,s){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=s),this.options.ranges&&(t.range[1]=i),t}st.startNode=function(){return new it(this,this.start,this.startLoc)},st.startNodeAt=function(t,e){return new it(this,t,e)},st.finishNode=function(t,e){return at.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},st.finishNodeAt=function(t,e,i,s){return at.call(this,t,e,i,s)},st.copyNode=function(t){var e=new it(this,t.start,this.startLoc);for(var i in t)e[i]=t[i];return e};var rt=function(t,e,i,s,a){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=s,this.generator=!!a},nt={b_stat:new rt("{",!1),b_expr:new rt("{",!0),b_tmpl:new rt("${",!1),p_stat:new rt("(",!1),p_expr:new rt("(",!0),q_tmpl:new rt("`",!0,!0,(function(t){return t.tryReadTemplateToken()})),f_stat:new rt("function",!1),f_expr:new rt("function",!0),f_expr_gen:new rt("function",!0,!1,null,!0),f_gen:new rt("function",!1,!1,null,!0)},ot=U.prototype;ot.initialContext=function(){return[nt.b_stat]},ot.braceIsBlock=function(t){var e=this.curContext();return e===nt.f_expr||e===nt.f_stat||(t!==_.colon||e!==nt.b_stat&&e!==nt.b_expr?t===_._return||t===_.name&&this.exprAllowed?b.test(this.input.slice(this.lastTokEnd,this.start)):t===_._else||t===_.semi||t===_.eof||t===_.parenR||t===_.arrow||(t===_.braceL?e===nt.b_stat:t!==_._var&&t!==_._const&&t!==_.name&&!this.exprAllowed):!e.isExpr)},ot.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},ot.updateContext=function(t){var e,i=this.type;i.keyword&&t===_.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},_.parenR.updateContext=_.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===nt.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},_.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?nt.b_stat:nt.b_expr),this.exprAllowed=!0},_.dollarBraceL.updateContext=function(){this.context.push(nt.b_tmpl),this.exprAllowed=!0},_.parenL.updateContext=function(t){var e=t===_._if||t===_._for||t===_._with||t===_._while;this.context.push(e?nt.p_stat:nt.p_expr),this.exprAllowed=!0},_.incDec.updateContext=function(){},_._function.updateContext=_._class.updateContext=function(t){!t.beforeExpr||t===_._else||t===_.semi&&this.curContext()!==nt.p_stat||t===_._return&&b.test(this.input.slice(this.lastTokEnd,this.start))||(t===_.colon||t===_.braceL)&&this.curContext()===nt.b_stat?this.context.push(nt.f_stat):this.context.push(nt.f_expr),this.exprAllowed=!1},_.backQuote.updateContext=function(){this.curContext()===nt.q_tmpl?this.context.pop():this.context.push(nt.q_tmpl),this.exprAllowed=!1},_.star.updateContext=function(t){if(t===_._function){var e=this.context.length-1;this.context[e]===nt.f_expr?this.context[e]=nt.f_expr_gen:this.context[e]=nt.f_gen}this.exprAllowed=!0},_.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==_.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var ht="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",pt=ht+" Extended_Pictographic",ct={9:ht,10:pt,11:pt,12:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic EBase EComp EMod EPres ExtPict"},lt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ut="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",dt=ut+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ft=dt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",mt={9:ut,10:dt,11:ft,12:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"},gt={};function xt(t){var e=gt[t]={binary:L(ct[t]+" "+lt),nonBinary:{General_Category:L(lt),Script:L(mt[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}xt(9),xt(10),xt(11),xt(12);var vt=U.prototype,yt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":""),this.unicodeProperties=gt[t.options.ecmaVersion>=12?12:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function _t(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function bt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function kt(t){return t>=65&&t<=90||t>=97&&t<=122}function St(t){return kt(t)||95===t}function Ct(t){return St(t)||wt(t)}function wt(t){return t>=48&&t<=57}function Et(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function At(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function It(t){return t>=48&&t<=55}yt.prototype.reset=function(t,e,i){var s=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,this.switchU=s&&this.parser.options.ecmaVersion>=6,this.switchN=s&&this.parser.options.ecmaVersion>=9},yt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},yt.prototype.at=function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return-1;var a=i.charCodeAt(t);if(!e&&!this.switchU||a<=55295||a>=57344||t+1>=s)return a;var r=i.charCodeAt(t+1);return r>=56320&&r<=57343?(a<<10)+r-56613888:a},yt.prototype.nextIndex=function(t,e){void 0===e&&(e=!1);var i=this.source,s=i.length;if(t>=s)return s;var a,r=i.charCodeAt(t);return!e&&!this.switchU||r<=55295||r>=57344||t+1>=s||(a=i.charCodeAt(t+1))<56320||a>57343?t+1:t+2},yt.prototype.current=function(t){return void 0===t&&(t=!1),this.at(this.pos,t)},yt.prototype.lookahead=function(t){return void 0===t&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},yt.prototype.advance=function(t){void 0===t&&(t=!1),this.pos=this.nextIndex(this.pos,t)},yt.prototype.eat=function(t,e){return void 0===e&&(e=!1),this.current(e)===t&&(this.advance(e),!0)},vt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,s=0;s<i.length;s++){var a=i.charAt(s);-1===e.indexOf(a)&&this.raise(t.start,"Invalid regular expression flag"),i.indexOf(a,s+1)>-1&&this.raise(t.start,"Duplicate regular expression flag")}},vt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&t.groupNames.length>0&&(t.switchN=!0,this.regexp_pattern(t))},vt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames.length=0,t.backReferenceNames.length=0,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e<i.length;e+=1){var s=i[e];-1===t.groupNames.indexOf(s)&&t.raise("Invalid named capture referenced")}},vt.regexp_disjunction=function(t){for(this.regexp_alternative(t);t.eat(124);)this.regexp_alternative(t);this.regexp_eatQuantifier(t,!0)&&t.raise("Nothing to repeat"),t.eat(123)&&t.raise("Lone quantifier brackets")},vt.regexp_alternative=function(t){for(;t.pos<t.source.length&&this.regexp_eatTerm(t););},vt.regexp_eatTerm=function(t){return this.regexp_eatAssertion(t)?(t.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(t)&&t.switchU&&t.raise("Invalid quantifier"),!0):!!(t.switchU?this.regexp_eatAtom(t):this.regexp_eatExtendedAtom(t))&&(this.regexp_eatQuantifier(t),!0)},vt.regexp_eatAssertion=function(t){var e=t.pos;if(t.lastAssertionIsQuantifiable=!1,t.eat(94)||t.eat(36))return!0;if(t.eat(92)){if(t.eat(66)||t.eat(98))return!0;t.pos=e}if(t.eat(40)&&t.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},vt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},vt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},vt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var s=0,a=-1;if(this.regexp_eatDecimalDigits(t)&&(s=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(a=t.lastIntValue),t.eat(125)))return-1!==a&&a<s&&!e&&t.raise("numbers out of order in {} quantifier"),!0;t.switchU&&!e&&t.raise("Incomplete quantifier"),t.pos=i}return!1},vt.regexp_eatAtom=function(t){return this.regexp_eatPatternCharacters(t)||t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)},vt.regexp_eatReverseSolidusAtomEscape=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatAtomEscape(t))return!0;t.pos=e}return!1},vt.regexp_eatUncapturingGroup=function(t){var e=t.pos;if(t.eat(40)){if(t.eat(63)&&t.eat(58)){if(this.regexp_disjunction(t),t.eat(41))return!0;t.raise("Unterminated group")}t.pos=e}return!1},vt.regexp_eatCapturingGroup=function(t){if(t.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},vt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},vt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},vt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!bt(e)&&(t.lastIntValue=e,t.advance(),!0)},vt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!bt(i);)t.advance();return t.pos!==e},vt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},vt.regexp_groupSpecifier=function(t){if(t.eat(63)){if(this.regexp_eatGroupName(t))return-1!==t.groupNames.indexOf(t.lastStringValue)&&t.raise("Duplicate capture group name"),void t.groupNames.push(t.lastStringValue);t.raise("Invalid group")}},vt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},vt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=_t(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=_t(t.lastIntValue);return!0}return!1},vt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),function(t){return u(t,!0)||36===t||95===t}(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},vt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=this.options.ecmaVersion>=11,s=t.current(i);return t.advance(i),92===s&&this.regexp_eatRegExpUnicodeEscapeSequence(t,i)&&(s=t.lastIntValue),function(t){return d(t,!0)||36===t||95===t||8204===t||8205===t}(s)?(t.lastIntValue=s,!0):(t.pos=e,!1)},vt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},vt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},vt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},vt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t,!1)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},vt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},vt.regexp_eatZero=function(t){return 48===t.current()&&!wt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},vt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},vt.regexp_eatControlLetter=function(t){var e=t.current();return!!kt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},vt.regexp_eatRegExpUnicodeEscapeSequence=function(t,e){void 0===e&&(e=!1);var i,s=t.pos,a=e||t.switchU;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var r=t.lastIntValue;if(a&&r>=55296&&r<=56319){var n=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var o=t.lastIntValue;if(o>=56320&&o<=57343)return t.lastIntValue=1024*(r-55296)+(o-56320)+65536,!0}t.pos=n,t.lastIntValue=r}return!0}if(a&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&((i=t.lastIntValue)>=0&&i<=1114111))return!0;a&&t.raise("Invalid unicode escape"),t.pos=s}return!1},vt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},vt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1},vt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),!0;if(t.switchU&&this.options.ecmaVersion>=9&&(80===e||112===e)){if(t.lastIntValue=-1,t.advance(),t.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(t)&&t.eat(125))return!0;t.raise("Invalid property name")}return!1},vt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var s=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,s),!0}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var a=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,a),!0}return!1},vt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){P(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},vt.regexp_validateUnicodePropertyNameOrValue=function(t,e){t.unicodeProperties.binary.test(e)||t.raise("Invalid property name")},vt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";St(e=t.current());)t.lastStringValue+=_t(e),t.advance();return""!==t.lastStringValue},vt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Ct(e=t.current());)t.lastStringValue+=_t(e),t.advance();return""!==t.lastStringValue},vt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},vt.regexp_eatCharacterClass=function(t){if(t.eat(91)){if(t.eat(94),this.regexp_classRanges(t),t.eat(93))return!0;t.raise("Unterminated character class")}return!1},vt.regexp_classRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},vt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||It(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var s=t.current();return 93!==s&&(t.lastIntValue=s,t.advance(),!0)},vt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},vt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!wt(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},vt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},vt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;wt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},vt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Et(i=t.current());)t.lastIntValue=16*t.lastIntValue+At(i),t.advance();return t.pos!==e},vt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*i+t.lastIntValue:t.lastIntValue=8*e+i}else t.lastIntValue=e;return!0}return!1},vt.regexp_eatOctalDigit=function(t){var e=t.current();return It(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},vt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var s=0;s<e;++s){var a=t.current();if(!Et(a))return t.pos=i,!1;t.lastIntValue=16*t.lastIntValue+At(a),t.advance()}return!0};var Pt=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new V(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Tt=U.prototype;function Lt(t){return"function"!=typeof BigInt?null:BigInt(t.replace(/_/g,""))}function Nt(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}Tt.next=function(t){!t&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Pt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Tt.getToken=function(){return this.next(),new Pt(this)},"undefined"!=typeof Symbol&&(Tt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===_.eof,value:e}}}}),Tt.curContext=function(){return this.context[this.context.length-1]},Tt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(_.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},Tt.readToken=function(t){return u(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},Tt.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);return t<=55295||t>=57344?t:(t<<10)+this.input.charCodeAt(this.pos+1)-56613888},Tt.skipBlockComment=function(){var t,e=this.options.onComment&&this.curPosition(),i=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(k.lastIndex=i;(t=k.exec(this.input))&&t.index<this.pos;)++this.curLine,this.lineStart=t.index+t[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(i+2,s),i,this.pos,e,this.curPosition())},Tt.skipLineComment=function(t){for(var e=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=t);this.pos<this.input.length&&!S(s);)s=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(e+t,this.pos),e,this.pos,i,this.curPosition())},Tt.skipSpace=function(){t:for(;this.pos<this.input.length;){var t=this.input.charCodeAt(this.pos);switch(t){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break t}break;default:if(!(t>8&&t<14||t>=5760&&C.test(String.fromCharCode(t))))break t;++this.pos}}},Tt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},Tt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(_.ellipsis)):(++this.pos,this.finishToken(_.dot))},Tt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(_.assign,2):this.finishOp(_.slash,1)},Tt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,s=42===t?_.star:_.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,s=_.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(_.assign,i+1):this.finishOp(s,i)},Tt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);if(e===t){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(_.assign,3);return this.finishOp(124===t?_.logicalOR:_.logicalAND,2)}return 61===e?this.finishOp(_.assign,2):this.finishOp(124===t?_.bitwiseOR:_.bitwiseAND,1)},Tt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(_.assign,2):this.finishOp(_.bitwiseXOR,1)},Tt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!b.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(_.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(_.assign,2):this.finishOp(_.plusMin,1)},Tt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(_.assign,i+1):this.finishOp(_.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(_.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Tt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(_.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(_.arrow)):this.finishOp(61===t?_.eq:_.prefix,1)},Tt.readToken_question=function(){var t=this.options.ecmaVersion;if(t>=11){var e=this.input.charCodeAt(this.pos+1);if(46===e){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(_.questionDot,2)}if(63===e){if(t>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(_.assign,3);return this.finishOp(_.coalesce,2)}}return this.finishOp(_.question,1)},Tt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(_.parenL);case 41:return++this.pos,this.finishToken(_.parenR);case 59:return++this.pos,this.finishToken(_.semi);case 44:return++this.pos,this.finishToken(_.comma);case 91:return++this.pos,this.finishToken(_.bracketL);case 93:return++this.pos,this.finishToken(_.bracketR);case 123:return++this.pos,this.finishToken(_.braceL);case 125:return++this.pos,this.finishToken(_.braceR);case 58:return++this.pos,this.finishToken(_.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(_.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 63:return this.readToken_question();case 126:return this.finishOp(_.prefix,1)}this.raise(this.pos,"Unexpected character '"+Nt(t)+"'")},Tt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},Tt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(b.test(s)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===s)e=!0;else if("]"===s&&e)e=!1;else if("/"===s&&!e)break;t="\\"===s}++this.pos}var a=this.input.slice(i,this.pos);++this.pos;var r=this.pos,n=this.readWord1();this.containsEsc&&this.unexpected(r);var o=this.regexpState||(this.regexpState=new yt(this));o.reset(i,a,n),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var h=null;try{h=new RegExp(a,n)}catch(t){}return this.finishToken(_.regexp,{pattern:a,flags:n,value:h})},Tt.readInt=function(t,e,i){for(var s=this.options.ecmaVersion>=12&&void 0===e,a=i&&48===this.input.charCodeAt(this.pos),r=this.pos,n=0,o=0,h=0,p=null==e?1/0:e;h<p;++h,++this.pos){var c=this.input.charCodeAt(this.pos),l=void 0;if(s&&95===c)a&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===h&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;else{if((l=c>=97?c-97+10:c>=65?c-65+10:c>=48&&c<=57?c-48:1/0)>=t)break;o=c,n=n*t+l}}return s&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=e&&this.pos-r!==e?null:n},Tt.readRadixNumber=function(t){var e=this.pos;this.pos+=2;var i=this.readInt(t);return null==i&&this.raise(this.start+2,"Expected number in radix "+t),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(i=Lt(this.input.slice(e,this.pos)),++this.pos):u(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,i)},Tt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10,void 0,!0)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!t&&this.options.ecmaVersion>=11&&110===s){var a=Lt(this.input.slice(e,this.pos));return++this.pos,u(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,a)}i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1),46!==s||i||(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),u(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,n=(r=this.input.slice(e,this.pos),i?parseInt(r,8):parseFloat(r.replace(/_/g,"")));return this.finishToken(_.num,n)},Tt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},Tt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===t)break;92===s?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):(S(s,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(_.string,e)};var Vt={};Tt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==Vt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Tt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Vt;this.raise(t,e)},Tt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==_.template&&this.type!==_.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(_.template,t)):36===i?(this.pos+=2,this.finishToken(_.dollarBraceL)):(++this.pos,this.finishToken(_.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(S(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},Tt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(_.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Tt.readEscapedChar=function(t){var e=this.input.charCodeAt(++this.pos);switch(++this.pos,e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Nt(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),t){var i=this.pos-1;return this.invalidStringToken(i,"Invalid escape sequence in template string"),null}default:if(e>=48&&e<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(s,8);return a>255&&(s=s.slice(0,-1),a=parseInt(s,8)),this.pos+=s.length-1,e=this.input.charCodeAt(this.pos),"0"===s&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-s.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return S(e)?"":String.fromCharCode(e)}},Tt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},Tt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if(d(a,s))this.pos+=a<=65535?1:2;else{if(92!==a)break;this.containsEsc=!0,t+=this.input.slice(i,this.pos);var r=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var n=this.readCodePoint();(e?u:d)(n,s)||this.invalidStringToken(r,"Invalid Unicode escape"),t+=Nt(n),i=this.pos}e=!1}return t+this.input.slice(i,this.pos)},Tt.readWord=function(){var t=this.readWord1(),e=_.name;return this.keywords.test(t)&&(e=v[t]),this.finishToken(e,t)};U.acorn={Parser:U,version:"8.0.4",defaultOptions:M,Position:N,SourceLocation:V,getLineInfo:R,Node:it,TokenType:f,tokTypes:_,keywordTypes:v,TokContext:rt,tokContexts:nt,isIdentifierChar:d,isIdentifierStart:u,Token:Pt,isNewLine:S,lineBreak:b,lineBreakG:k,nonASCIIwhitespace:C},t.Node=it,t.Parser=U,t.Position=N,t.SourceLocation=V,t.TokContext=rt,t.Token=Pt,t.TokenType=f,t.defaultOptions=M,t.getLineInfo=R,t.isIdentifierChar=d,t.isIdentifierStart=u,t.isNewLine=S,t.keywordTypes=v,t.lineBreak=b,t.lineBreakG=k,t.nonASCIIwhitespace=C,t.parse=function(t,e){return U.parse(t,e)},t.parseExpressionAt=function(t,e,i){return U.parseExpressionAt(t,e,i)},t.tokContexts=nt,t.tokTypes=_,t.tokenizer=function(t,e){return U.tokenizer(t,e)},t.version="8.0.4",Object.defineProperty(t,"__esModule",{value:!0})}));
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});
@@ -1 +0,0 @@
1
- "use strict";function detectWxmlDeps(e){e=e.replace(/<!--([\s\S]*?)-->/g,"");const t=/<(import|include|wxs)[^>]*src\s*=\s*['"]([^'"]*)['"][^>]*>/gi,s=[];let r=null;for(;r=t.exec(e);)s.push({type:"wxs"===r[1]?"wxs":"wxml",route:r[2]});return s}Object.defineProperty(exports,"__esModule",{value:!0}),exports.detectWxmlDeps=void 0,exports.detectWxmlDeps=detectWxmlDeps;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.detectWxssDeps=void 0;const tslib_1=require("tslib"),parse_1=tslib_1.__importDefault(require("./parse"));function isImportRule(e){return"import"===e.type}function findLastImportRuleLineno(e){const t=e.lastIndexOf("@import");if(t>=0){let s=1;const r=e.slice(0,t).match(/\n/g);return r&&(s+=r.length),s}return 0}function detectWxssDeps(e,t){const s=findLastImportRuleLineno(e);if(s<=0)return[];const r=parse_1.default(e,{source:t.path,skipRuleLineno:s}),n=[];return(r.stylesheet?r.stylesheet.rules:[]).forEach(e=>{if(isImportRule(e)&&e.import){const t=e.import.replace(/'|"/g,"");n.push(t)}}),n}exports.detectWxssDeps=detectWxssDeps;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var commentre=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function default_1(r,e){e=e||{};var n=1,t=1;function i(r){var e=r.match(/\n/g);e&&(n+=e.length);var i=r.lastIndexOf("\n");t=~i?r.length-i:t+r.length}function a(){var r={line:n,column:t};return function(e){return e.position=new s(r),l(),e}}function s(r){this.start=r,this.end={line:n,column:t},this.source=e.source}s.prototype.content=r;var u=[];function o(i){var a=new Error(e.source+":"+n+":"+t+": "+i);if(a.reason=i,a.filename=e.source,a.line=n,a.column=t,a.source=r,!e.silent)throw a;u.push(a)}function c(){return p(/^{\s*/)}function f(){return p(/^}/)}function m(){var t,i=[];for(l(),v(i);n<=(e.skipRuleLineno||Number.MAX_SAFE_INTEGER)&&r.length&&"}"!=r.charAt(0)&&(t=P()||x());)!1!==t&&(i.push(t),v(i));return i}function p(e){var n=e.exec(r);if(n){var t=n[0];return i(t),r=r.slice(t.length),n}}function l(){p(/^\s*/)}function v(r){var e;for(r=r||[];e=d();)!1!==e&&r.push(e);return r}function d(){var e=a();if("/"==r.charAt(0)&&"*"==r.charAt(1)){for(var n=2;""!=r.charAt(n)&&("*"!=r.charAt(n)||"/"!=r.charAt(n+1));)++n;if(n+=2,""===r.charAt(n-1))return o("End of comment missing");var s=r.slice(2,n-2);return t+=2,i(s),r=r.slice(n),t+=2,e({type:"comment",comment:s})}}function g(){var r=p(/^([^{]+)/);if(r)return trim(r[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(r){return r.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(r){return r.replace(/\u200C/g,",")}))}function h(){var r=a(),e=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(e){if(e=trim(e[0]),!p(/^:\s*/))return o("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),t=r({type:"declaration",property:e.replace(commentre,""),value:n?trim(n[0]).replace(commentre,""):""});return p(/^[;\s]*/),t}}function y(){var r,e=[];if(!c())return o("missing '{'");for(v(e);r=h();)!1!==r&&(e.push(r),v(e));return f()?e:o("missing '}'")}function A(){for(var r,e=[],n=a();r=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(r[1]),p(/^,\s*/);if(e.length)return n({type:"keyframe",values:e,declarations:y()})}var w,k=_("import"),E=_("charset"),b=_("namespace");function _(r){var e=new RegExp("^@"+r+"\\s*([^;]+);");return function(){var n=a(),t=p(e);if(t){var i={type:r};return i[r]=t[1].trim(),n(i)}}}function P(){if("@"==r[0])return function(){var r=a();if(e=p(/^@([-\w]+)?keyframes\s*/)){var e,n=e[1];if(!(e=p(/^([-\w]+)\s*/)))return o("@keyframes missing name");var t,i=e[1];if(!c())return o("@keyframes missing '{'");for(var s=v();t=A();)s.push(t),s=s.concat(v());return f()?r({type:"keyframes",name:i,vendor:n,keyframes:s}):o("@keyframes missing '}'")}}()||function(){var r=a(),e=p(/^@media *([^{]+)/);if(e){var n=trim(e[1]);if(!c())return o("@media missing '{'");var t=v().concat(m());return f()?r({type:"media",media:n,rules:t}):o("@media missing '}'")}}()||function(){var r=a(),e=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(e)return r({type:"custom-media",name:trim(e[1]),media:trim(e[2])})}()||function(){var r=a(),e=p(/^@supports *([^{]+)/);if(e){var n=trim(e[1]);if(!c())return o("@supports missing '{'");var t=v().concat(m());return f()?r({type:"supports",supports:n,rules:t}):o("@supports missing '}'")}}()||k()||E()||b()||function(){var r=a(),e=p(/^@([-\w]+)?document *([^{]+)/);if(e){var n=trim(e[1]),t=trim(e[2]);if(!c())return o("@document missing '{'");var i=v().concat(m());return f()?r({type:"document",document:t,vendor:n,rules:i}):o("@document missing '}'")}}()||function(){var r=a();if(p(/^@page */)){var e=g()||[];if(!c())return o("@page missing '{'");for(var n,t=v();n=h();)t.push(n),t=t.concat(v());return f()?r({type:"page",selectors:e,declarations:t}):o("@page missing '}'")}}()||function(){var r=a();if(p(/^@host\s*/)){if(!c())return o("@host missing '{'");var e=v().concat(m());return f()?r({type:"host",rules:e}):o("@host missing '}'")}}()||function(){var r=a();if(p(/^@font-face\s*/)){if(!c())return o("@font-face missing '{'");for(var e,n=v();e=h();)n.push(e),n=n.concat(v());return f()?r({type:"font-face",declarations:n}):o("@font-face missing '}'")}}()}function x(){var r=a(),e=g();return e?(v(),r({type:"rule",selectors:e,declarations:y()})):o("selector missing")}return addParent((w=m(),{type:"stylesheet",stylesheet:{source:e.source,rules:w,parsingErrors:u}}))}function trim(r){return r?r.replace(/^\s+|\s+$/g,""):""}function addParent(r,e){var n=r&&"string"==typeof r.type,t=n?r:e;for(var i in r){var a=r[i];Array.isArray(a)?a.forEach((function(r){addParent(r,t)})):a&&"object"==typeof a&&addParent(a,t)}return n&&Object.defineProperty(r,"parent",{configurable:!0,writable:!0,enumerable:!1,value:e||null}),r}exports.default=default_1;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MergeFSLayer=exports.FilterFSLayer=exports.MemoryFSLayer=exports.LocalFSLayer=exports.AbstractFSLayer=exports.normalizePath=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),MemoryFileSystem=require("memory-fs");function normalizePath(r=""){const e=path_1.default.posix.normalize(r.replace(/\\/g,"/"));return!r.startsWith("//")&&!r.startsWith("\\\\")||e.startsWith("//")?e:"/"+e}exports.normalizePath=normalizePath;const log=console;class AbstractFSLayer{constructor(r){this.fs=r}stat(r){return r=normalizePath(r),new Promise((e,t)=>{log.debug("FSAgent use fs.stat for "+r),this.fs.stat(r,(r,s)=>{if(r)return t(r);e(s)})})}exists(r){return r=normalizePath(r),new Promise((e,t)=>{log.debug("FSAgent use fs.exists for "+r),this.fs.exists(r,r=>{e(r)})})}readFile(r){return r=normalizePath(r),new Promise((e,t)=>{log.debug("FSAgent use fs.readFile for "+r),this.fs.readFile(r,null,(r,s)=>{if(r)return t(r);e(s)})})}writeFile(r,e,t=null){return r=normalizePath(r),new Promise((s,a)=>{log.debug("FSAgent use fs.writeFile for "+r),this.fs.writeFile(r,e,t,r=>{if(r)return a(r);s()})})}readdir(r){return r=normalizePath(r),new Promise((e,t)=>{this.fs.readdir(r,(r,s)=>{if(r)return t(r);e(s)})})}}exports.AbstractFSLayer=AbstractFSLayer;class LocalFSLayer extends AbstractFSLayer{constructor(){super(fs_1.default)}}exports.LocalFSLayer=LocalFSLayer;class MemoryFSLayer extends AbstractFSLayer{constructor(){super(new MemoryFileSystem)}}exports.MemoryFSLayer=MemoryFSLayer;class FilterFSLayer{constructor(r,e){this.fslayer=r,this.filter=e}stat(r){if(this.filter(r))return this.fslayer.stat(r);throw new Error(`FilterFSLayer Error, the path '${r}' has been filtered`)}readFile(r){if(this.filter(r))return this.fslayer.readFile(r);throw new Error(`FilterFSLayer Error, the path '${r}' has been filtered`)}exists(r){if(this.filter(r))return this.fslayer.exists(r);throw new Error(`FilterFSLayer Error, the path '${r}' has been filtered`)}writeFile(r,e,t){if(this.filter(r))return this.fslayer.writeFile(r,e,t);throw new Error(`FilterFSLayer Error, the path '${r}' has been filtered`)}readdir(r){if(this.filter(r))return this.fslayer.readdir(r);throw new Error(`FilterFSLayer Error, the path '${r}' has been filtered`)}}exports.FilterFSLayer=FilterFSLayer;class MergeFSLayer{constructor(r){this.fslayers=r}async stat(r){for(const e of this.fslayers)try{return await e.stat(r)}catch(r){}throw new Error(`MergeFSLayer Error, the path '${r}' doesn't exist in any fslayer`)}async readFile(r){for(const e of this.fslayers)try{return await e.readFile(r)}catch(r){}throw new Error(`MergeFSLayer Error, the path '${r}' doesn't exist in any fslayer`)}async exists(r){for(const e of this.fslayers)try{return await e.exists(r)}catch(r){}throw new Error(`MergeFSLayer Error, the path '${r}' doesn't exist in any fslayer`)}writeFile(r,e,t){throw new Error("MergeFSLayer Error, doesn't support writeFile")}async readdir(r){let e=!1,t=[];for(const s of this.fslayers)try{const a=await s.readdir(r);t=t.concat(a),e=!0}catch(r){}if(e)return t;throw new Error(`MergeFSLayer Error, the path '${r}' doesn't exist in any fslayer`)}}exports.MergeFSLayer=MergeFSLayer;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Graph=void 0;const tslib_1=require("tslib"),plugin_1=require("./plugin"),types_1=require("./types"),module_1=tslib_1.__importDefault(require("./module")),path_1=tslib_1.__importDefault(require("path")),fs_1=tslib_1.__importDefault(require("fs")),appconf_1=require("./appconf"),devtool_1=require("./devtool"),resolver_1=require("./resolver"),white_ext_list_1=require("../utils/white_ext_list"),common_1=require("../core/compile/common"),tools_1=require("../utils/tools"),babel_helper_1=require("../utils/babel_helper");function calcSize(e){let t=0;for(const i in e)t+=e[i].length;return t}function getFileType(e){let t=path_1.default.extname(e);if(t.startsWith(".")){if(t=t.slice(1),t===types_1.FileType.JS)return types_1.FileType.JS;if(t===types_1.FileType.WXML)return types_1.FileType.WXML;if(t===types_1.FileType.WXSS)return types_1.FileType.WXSS;if(t===types_1.FileType.WXS)return types_1.FileType.WXS;if(t===types_1.FileType.JSON)return types_1.FileType.JSON}throw Error("unknown the filetype of "+e)}class Graph{constructor(e){this.invalidated=!0,this.running=!1,this.onFileChange=(e,t)=>{console.log("onFileChange",t,this.root),t.startsWith(this.root)&&(t=t.replace(new RegExp("^"+this.root),""),this.appConf.onFileChange(e,t),this.resolver.onFileChange(e,t),"change"===e&&this.invalidateModules(t))},this.type=e.type,this.root=e.root,this.compiler=e.compiler,this.project=this.compiler.project,this.cachedModules=new Map,this.pluginDriver=new plugin_1.PluginDriver(this,e),this.modulesByPath=new Map,this.resolver=new resolver_1.Resolver(this,this.root,this.pluginDriver.resolveExtConf),this.appConf=new appconf_1.AppConf(this.compiler,this),this.project.event.on("fileChange",this.onFileChange)}async getPluginConf(){if("plugin"!==this.type)throw new Error("Couldn't call getPluginConf without plugin type");return await this.appConf.build(),{app:this.appConf.app,packages:Object.fromEntries(this.appConf.packages.entries()),pages:Object.fromEntries(this.appConf.pages.entries()),comps:Object.fromEntries(this.appConf.comps.entries()),sitemap:this.appConf.sitemap,theme:this.appConf.theme}}async getAppConf(){if("miniprogram"!==this.type)throw new Error("Couldn't call getAppConf without miniprogram type");return await this.appConf.build(),{app:this.appConf.app,packages:Object.fromEntries(this.appConf.packages.entries()),pages:Object.fromEntries(this.appConf.pages.entries()),comps:Object.fromEntries(this.appConf.comps.entries()),sitemap:this.appConf.sitemap,theme:this.appConf.theme}}async getAppCode(e){let t=this.getPackgeFile(e.package);t=t.filter(e=>!e.path.endsWith("json"));const i=await Promise.all(t.map(e=>this.loadModuleFromFile(e))),o={};for(const e of i)o[e.path]=e.toCodeFile();return o}async loadModuleFromFile(e){let t=this.modulesByPath.get(e.path);if(!t||t.sourcePath!==e.source||t.error){const i=getFileType(e.path);t=new module_1.default(this,e.path,e.source,i),this.modulesByPath.set(e.path,t);try{await this.loadSourceForModule(t)}catch(e){throw t.setError(e),e}}return t}async loadSourceForModule(e){var t;const i=path_1.default.posix.join(this.project.projectPath,this.root,e.sourcePath),o=t=>Object.assign(Object.assign({},t),{addWatchFile(t){e.addWatchFile(t)}}),s=null!==(t=await this.pluginDriver.hookFirst("load",[e.path,i],o))&&void 0!==t?t:await this.readFile(i),r="string"==typeof s?{code:s}:s,a=await this.tranform(r,e,o);e.setSource(a)}getPackgeFile(e){const t=[];for(const[i,o]of this.resolver.resolveInfoMap.entries())e!==devtool_1.FullPkg&&this.checkFilePackage(i)!==e||t.push(o);return t}checkFilePackage(e){for(const t of this.appConf.packages.keys())if(e.startsWith(t))return t;return devtool_1.MainPkg}invalidateModules(e){const t=this.resolver.resolve(e);t.length>0&&t.forEach(e=>{this.modulesByPath.delete(e.path)})}async readFile(e){return fs_1.default.promises.readFile(e,{encoding:"utf-8"})}async tranform(e,t,i){return await this.pluginDriver.hookReduceArg0("transform",[e,t.path],(function(e,t){return"string"==typeof t?{code:t}:t}),i)}async compile(){const e=await this.getAppConf(),t=this.compileJSON(e),i=await this.compileCodeWithoutJSON();console.log("[summer-compiler] before optimize, size: ",calcSize(i));const o=await this.pluginDriver.hookReduceArg0("optimize",[i,e],(function(e,t){return t}),e=>e);console.log("[summer-compiler] after optimize, size: ",calcSize(o));const s=await this.compileOther(),r=Object.assign(Object.assign(Object.assign({},t),o),s);console.log("[summer-compiler] before compress, size: ",calcSize(r));const a=await this.pluginDriver.hookReduceArg0("compress",[r],(e,t)=>t,e=>e);return console.log("[summer-compiler] after compress, size: ",calcSize(a)),await this.pluginDriver.hookParallel("sealed",[a]),a}async compileOther(){const e=new Set(this.resolver.allExts.map(e=>"."+e)),{MiniProgramWhiteList:t}=await white_ext_list_1.getWhiteExtList(),i=this.project.getFileList(this.root,"").filter(i=>{const o=path_1.default.posix.extname(i);return t.has(o)&&!e.has(o)}),o=await common_1.compileOther(this.project,i,{onProgressUpdate:()=>{}}),s={};for(const e in o)s[path_1.default.posix.relative(this.root,e)]=o[e];return s}async compileCodeWithoutJSON(){var e;const t={},i=await this.getAppCode({package:devtool_1.FullPkg}),o=new Set;for(const s in i){const r=i[s];if(r.path.endsWith(".js")){((null===(e=r.jsTag)||void 0===e?void 0:e.helpers)||[]).forEach(e=>{o.add(e)}),t[s]=r.code;const i=r.map&&tools_1.formatSourceMap(r.map);i&&(t[s+".map"]=i)}else t[s]=r.code}return await babel_helper_1.appendBabelHelpers(o,"","@babel/runtime",t),t}compileJSON(e){const t={};t["app.json"]=JSON.stringify(e.app);for(const i in e.pages)t[i+".json"]=JSON.stringify(e.pages[i]);for(const i in e.comps)t[i+".json"]=JSON.stringify(e.comps[i]);return t}}exports.Graph=Graph;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const types_1=require("./types"),tools_1=require("../utils/tools");class JsTag{constructor(){this.isLargeFile=!1,this.isBabelIgnore=!1,this.helpers=[]}addHelpers(e){for(const s of e)this.helpers.includes(s)||this.helpers.push(s)}toJSON(){return{isLargeFile:this.isBabelIgnore,isBabelIgnore:this.isBabelIgnore,helpers:this.helpers}}}class Module{constructor(e,s,t,i){this.graph=e,this.path=s,this.sourcePath=t,this.fileType=i,this.code="",this.md5="",this.depFileIds=[],i===types_1.FileType.JS&&(this.jsTag=new JsTag)}setError(e){this.error=e}setSource(e){this.code=e.code,this.map=e.map,this.fileType===types_1.FileType.JSON&&(this.json=JSON.parse(this.code)),this.md5=tools_1.generateMD5(this.code)}toCodeFile(){var e;return{path:this.path,md5:this.md5,code:this.code,map:this.map,jsTag:null===(e=this.jsTag)||void 0===e?void 0:e.toJSON()}}toJSON(){return{code:this.code,map:this.map,path:this.path,sourcePath:this.sourcePath,depFileIds:this.depFileIds}}addWatchFile(e){-1===this.depFileIds.indexOf(e)&&this.depFileIds.push(e)}}exports.default=Module;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PluginDriver=exports.getPluginContext=void 0;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path")),fs=tslib_1.__importStar(require("fs")),error_1=require("./error"),worker_thread_1=require("../core/worker_thread");function genResovleExtConf(r){const e={json:["json"],wxml:["wxml"],wxss:["wxss"],js:["js"],wxs:["wxs"]};for(const o of r)if(o.resolveExt)for(const r of["json","wxml","wxss","js","wxs"]){const t=o.resolveExt[r];if("string"==typeof t)e[r].includes(t)||e[r].push(t);else if(Array.isArray(t))for(const o of t)e[r].includes(o)||e[r].push(o)}return e}function throwInvalidHookError(r,e){return error_1.error({code:"INVALID_PLUGIN_HOOK",message:`Error running plugin hook ${r} for ${e}, expected a function hook.`})}function throwPluginError(r,e,{hook:o,id:t}={}){return"string"==typeof r&&(r={message:r}),r.code&&r.code!==error_1.Errors.PLUGIN_ERROR&&(r.pluginCode=r.code),r.code=error_1.Errors.PLUGIN_ERROR,r.plugin=e,o&&(r.hook=o),t&&(r.id=t),error_1.error(r)}function getPluginContext(r,e){return{addWatchFile(){throw new Error("addWatchFile should be implemented by replaceContext")},runWorkerMethod(){throw new Error("runWorkerMethod should be implemented by replaceContext")},error:e=>throwPluginError(e,r.name),meta:{summerVersion:"1.0.0"}}}exports.getPluginContext=getPluginContext;class PluginDriver{constructor(r,e){this.graph=r,this.options=e,this.pluginContexts=new Map,this.plugins=e.plugins,this.resolveExtConf=genResovleExtConf(e.plugins);for(const e of this.plugins)this.pluginContexts.set(e,getPluginContext(e,r))}runHook(r,e,o,t,n){const s=o[r];if(!s)return;let i=this.pluginContexts.get(o);n&&(i=n(i,o));const l=new Proxy(i,{get:(r,e)=>"runWorkerMethod"===e?function(r,...e){const t={command:"runMethod",plugin:o.name,pluginOption:{},method:r,args:e};return worker_thread_1.runTask(worker_thread_1.TASK_NAME.SUMMER_HOOK,t)}:Reflect.get(r,e)});return Promise.resolve().then(()=>"function"!=typeof s?t?s:throwInvalidHookError(r,o.name):s.apply(l,e)).catch(e=>throwPluginError(e,o.name,{hook:r}))}resolveId(r,e,o){if(o){if(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")){let t=path.posix.join(path.dirname(o),r);path.extname(t)||(t+="."+e);const n=path.posix.join(this.graph.root,t),s=this.findPossibleFile(n,e);if(s)return{resolveId:t,fileId:s};throw new Error(`couldn't resolve ${r} relative to ${o}`)}throw new Error(`no support resolve ${r} relative to ${o}`)}{const o=path.posix.join(this.graph.root,r),t=this.findPossibleFile(o,e);if(t)return{resolveId:r,fileId:t};throw new Error("couldn't resolve the "+r)}}findPossibleFile(r,e){for(const o of this.resolveExtConf[e]){let e;if(e=path.extname(r)?r.replace(path.extname(r),"."+o):`${r}.${o}`,fs.existsSync(e))return e}}hookFirst(r,e,o){let t=Promise.resolve(void 0);for(const n of this.plugins)t=t.then(t=>null!=t?t:this.runHook(r,e,n,!1,o));return t}hookParallel(r,e,o){const t=[];for(const n of this.plugins){const s=this.runHook(r,e,n,!1,o);s&&t.push(s)}return Promise.all(t).then(()=>{})}hookReduceArg0(r,[e,...o],t,n){let s=Promise.resolve(e);for(const e of this.plugins)s=s.then(s=>{const i=[s,...o],l=this.runHook(r,i,e,!1,n);return l?l.then(r=>t.call(this.pluginContexts.get(e),s,r,e)):s});return s}}exports.PluginDriver=PluginDriver;
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";