@galadrim/galadmin 0.1.38 → 0.1.41

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 (511) hide show
  1. package/dist/tsconfig.tsbuildinfo +1 -1
  2. package/dist/types/config.d.ts +1 -0
  3. package/package.json +1 -1
  4. package/src/front/build/asset-manifest.json +3 -3
  5. package/src/front/build/index.html +1 -1
  6. package/src/front/build/static/js/{main.4ce5340d.chunk.js → main.6010b0e8.chunk.js} +2 -2
  7. package/src/front/build/static/js/main.6010b0e8.chunk.js.map +1 -0
  8. package/src/front/node_modules/.cache/.eslintcache +1 -1
  9. package/src/front/node_modules/.cache/babel-loader/6b6404ad16b4fb247c0dfe43c03f4a02.json +1 -0
  10. package/src/front/node_modules/.cache/babel-loader/e0d7182bb1587d3516bddc6e5995e4de.json +1 -0
  11. package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/3e/1f/8bb0086d6062c3f47f7b0b5ec83819f94cb4fbede3b188fa7e17a4abcc21fdb88f189c80f4202c4b2ca9d1d4b10584c75f117e5d929bed254fc25456e138 +1 -0
  12. package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{c2/e5/5451dd89bb0fd48f988bf27c7ee614c66eb91f7085c5b5c8cb33048d0c32 → 36/6b/7209102ab666b1484b1283f341a44aaefbdd015c78e198b49193da03be46} +1 -1
  13. package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/6c/19/fe86ba5d7c4062f185480ad22dd3b9fae9b30149827224339f9a633a9a94 +1 -1
  14. package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/87/08/421190bfe6e50816e059da6c33526c9943732ef856ebd2752d0cbfb4a852 +1 -1
  15. package/src/front/node_modules/.package-lock.json +84 -84
  16. package/src/front/node_modules/@babel/code-frame/lib/index.js +5 -4
  17. package/src/front/node_modules/@babel/code-frame/lib/index.js.map +1 -1
  18. package/src/front/node_modules/@babel/code-frame/package.json +3 -2
  19. package/src/front/node_modules/@babel/compat-data/data/plugins.json +1 -0
  20. package/src/front/node_modules/@babel/compat-data/package.json +1 -1
  21. package/src/front/node_modules/@babel/core/lib/config/cache-contexts.js.map +1 -1
  22. package/src/front/node_modules/@babel/core/lib/config/caching.js +2 -2
  23. package/src/front/node_modules/@babel/core/lib/config/caching.js.map +1 -1
  24. package/src/front/node_modules/@babel/core/lib/config/config-chain.js +13 -13
  25. package/src/front/node_modules/@babel/core/lib/config/config-chain.js.map +1 -1
  26. package/src/front/node_modules/@babel/core/lib/config/config-descriptors.js +6 -6
  27. package/src/front/node_modules/@babel/core/lib/config/config-descriptors.js.map +1 -1
  28. package/src/front/node_modules/@babel/core/lib/config/files/configuration.js +44 -41
  29. package/src/front/node_modules/@babel/core/lib/config/files/configuration.js.map +1 -1
  30. package/src/front/node_modules/@babel/core/lib/config/files/index-browser.js.map +1 -1
  31. package/src/front/node_modules/@babel/core/lib/config/files/index.js +3 -3
  32. package/src/front/node_modules/@babel/core/lib/config/files/index.js.map +1 -1
  33. package/src/front/node_modules/@babel/core/lib/config/files/module-types.js +27 -8
  34. package/src/front/node_modules/@babel/core/lib/config/files/module-types.js.map +1 -1
  35. package/src/front/node_modules/@babel/core/lib/config/files/package.js +2 -2
  36. package/src/front/node_modules/@babel/core/lib/config/files/package.js.map +1 -1
  37. package/src/front/node_modules/@babel/core/lib/config/files/plugins.js +4 -4
  38. package/src/front/node_modules/@babel/core/lib/config/files/plugins.js.map +1 -1
  39. package/src/front/node_modules/@babel/core/lib/config/files/types.js.map +1 -1
  40. package/src/front/node_modules/@babel/core/lib/config/files/utils.js +2 -2
  41. package/src/front/node_modules/@babel/core/lib/config/files/utils.js.map +1 -1
  42. package/src/front/node_modules/@babel/core/lib/config/full.js +13 -13
  43. package/src/front/node_modules/@babel/core/lib/config/full.js.map +1 -1
  44. package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js +6 -6
  45. package/src/front/node_modules/@babel/core/lib/config/helpers/config-api.js.map +1 -1
  46. package/src/front/node_modules/@babel/core/lib/config/index.js +60 -40
  47. package/src/front/node_modules/@babel/core/lib/config/index.js.map +1 -1
  48. package/src/front/node_modules/@babel/core/lib/config/item.js +1 -1
  49. package/src/front/node_modules/@babel/core/lib/config/item.js.map +1 -1
  50. package/src/front/node_modules/@babel/core/lib/config/partial.js +15 -23
  51. package/src/front/node_modules/@babel/core/lib/config/partial.js.map +1 -1
  52. package/src/front/node_modules/@babel/core/lib/config/plugin.js +1 -1
  53. package/src/front/node_modules/@babel/core/lib/config/plugin.js.map +1 -1
  54. package/src/front/node_modules/@babel/core/lib/config/printer.js.map +1 -1
  55. package/src/front/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +1 -1
  56. package/src/front/node_modules/@babel/core/lib/config/resolve-targets.js.map +1 -1
  57. package/src/front/node_modules/@babel/core/lib/config/util.js.map +1 -1
  58. package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js +1 -1
  59. package/src/front/node_modules/@babel/core/lib/config/validation/option-assertions.js.map +1 -1
  60. package/src/front/node_modules/@babel/core/lib/config/validation/options.js +3 -3
  61. package/src/front/node_modules/@babel/core/lib/config/validation/options.js.map +1 -1
  62. package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js +1 -1
  63. package/src/front/node_modules/@babel/core/lib/config/validation/plugins.js.map +1 -1
  64. package/src/front/node_modules/@babel/core/lib/errors/config-error.js +1 -1
  65. package/src/front/node_modules/@babel/core/lib/errors/config-error.js.map +1 -1
  66. package/src/front/node_modules/@babel/core/lib/gensync-utils/functional.js +1 -1
  67. package/src/front/node_modules/@babel/core/lib/gensync-utils/functional.js.map +1 -1
  68. package/src/front/node_modules/@babel/core/lib/index.js +30 -32
  69. package/src/front/node_modules/@babel/core/lib/index.js.map +1 -1
  70. package/src/front/node_modules/@babel/core/lib/parse.js +6 -6
  71. package/src/front/node_modules/@babel/core/lib/parse.js.map +1 -1
  72. package/src/front/node_modules/@babel/core/lib/parser/index.js +1 -1
  73. package/src/front/node_modules/@babel/core/lib/parser/index.js.map +1 -1
  74. package/src/front/node_modules/@babel/core/lib/tools/build-external-helpers.js +1 -1
  75. package/src/front/node_modules/@babel/core/lib/tools/build-external-helpers.js.map +1 -1
  76. package/src/front/node_modules/@babel/core/lib/transform-ast.js +5 -5
  77. package/src/front/node_modules/@babel/core/lib/transform-ast.js.map +1 -1
  78. package/src/front/node_modules/@babel/core/lib/transform-file.js +5 -5
  79. package/src/front/node_modules/@babel/core/lib/transform-file.js.map +1 -1
  80. package/src/front/node_modules/@babel/core/lib/transform.js +5 -5
  81. package/src/front/node_modules/@babel/core/lib/transform.js.map +1 -1
  82. package/src/front/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +1 -1
  83. package/src/front/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js.map +1 -1
  84. package/src/front/node_modules/@babel/core/lib/transformation/file/file.js.map +1 -1
  85. package/src/front/node_modules/@babel/core/lib/transformation/file/generate.js +1 -1
  86. package/src/front/node_modules/@babel/core/lib/transformation/file/generate.js.map +1 -1
  87. package/src/front/node_modules/@babel/core/lib/transformation/index.js +6 -6
  88. package/src/front/node_modules/@babel/core/lib/transformation/index.js.map +1 -1
  89. package/src/front/node_modules/@babel/core/lib/transformation/normalize-file.js +4 -4
  90. package/src/front/node_modules/@babel/core/lib/transformation/normalize-file.js.map +1 -1
  91. package/src/front/node_modules/@babel/core/lib/transformation/normalize-opts.js.map +1 -1
  92. package/src/front/node_modules/@babel/core/lib/transformation/plugin-pass.js.map +1 -1
  93. package/src/front/node_modules/@babel/core/lib/vendor/import-meta-resolve.js.map +1 -1
  94. package/src/front/node_modules/@babel/core/package.json +15 -15
  95. package/src/front/node_modules/@babel/core/src/config/files/index-browser.ts +2 -2
  96. package/src/front/node_modules/@babel/core/src/config/files/index.ts +4 -4
  97. package/src/front/node_modules/@babel/core/src/config/resolve-targets-browser.ts +1 -1
  98. package/src/front/node_modules/@babel/core/src/config/resolve-targets.ts +1 -1
  99. package/src/front/node_modules/@babel/core/src/transform-file.ts +5 -5
  100. package/src/front/node_modules/@babel/generator/lib/buffer.js.map +1 -1
  101. package/src/front/node_modules/@babel/generator/lib/generators/base.js.map +1 -1
  102. package/src/front/node_modules/@babel/generator/lib/generators/classes.js.map +1 -1
  103. package/src/front/node_modules/@babel/generator/lib/generators/expressions.js +1 -1
  104. package/src/front/node_modules/@babel/generator/lib/generators/expressions.js.map +1 -1
  105. package/src/front/node_modules/@babel/generator/lib/generators/flow.js +2 -2
  106. package/src/front/node_modules/@babel/generator/lib/generators/flow.js.map +1 -1
  107. package/src/front/node_modules/@babel/generator/lib/generators/index.js +11 -11
  108. package/src/front/node_modules/@babel/generator/lib/generators/index.js.map +1 -1
  109. package/src/front/node_modules/@babel/generator/lib/generators/jsx.js.map +1 -1
  110. package/src/front/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
  111. package/src/front/node_modules/@babel/generator/lib/generators/modules.js.map +1 -1
  112. package/src/front/node_modules/@babel/generator/lib/generators/statements.js.map +1 -1
  113. package/src/front/node_modules/@babel/generator/lib/generators/template-literals.js.map +1 -1
  114. package/src/front/node_modules/@babel/generator/lib/generators/types.js.map +1 -1
  115. package/src/front/node_modules/@babel/generator/lib/generators/typescript.js.map +1 -1
  116. package/src/front/node_modules/@babel/generator/lib/index.js +2 -2
  117. package/src/front/node_modules/@babel/generator/lib/index.js.map +1 -1
  118. package/src/front/node_modules/@babel/generator/lib/node/index.js +2 -2
  119. package/src/front/node_modules/@babel/generator/lib/node/index.js.map +1 -1
  120. package/src/front/node_modules/@babel/generator/lib/node/whitespace.js.map +1 -1
  121. package/src/front/node_modules/@babel/generator/lib/printer.js +3 -3
  122. package/src/front/node_modules/@babel/generator/lib/printer.js.map +1 -1
  123. package/src/front/node_modules/@babel/generator/package.json +4 -4
  124. package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js +2 -2
  125. package/src/front/node_modules/@babel/helper-compilation-targets/lib/debug.js.map +1 -1
  126. package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js +1 -1
  127. package/src/front/node_modules/@babel/helper-compilation-targets/lib/filter-items.js.map +1 -1
  128. package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js +6 -6
  129. package/src/front/node_modules/@babel/helper-compilation-targets/lib/index.js.map +1 -1
  130. package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js +1 -1
  131. package/src/front/node_modules/@babel/helper-compilation-targets/lib/pretty.js.map +1 -1
  132. package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js +1 -1
  133. package/src/front/node_modules/@babel/helper-compilation-targets/lib/utils.js.map +1 -1
  134. package/src/front/node_modules/@babel/helper-compilation-targets/package.json +2 -2
  135. package/src/front/node_modules/@babel/helper-environment-visitor/README.md +1 -1
  136. package/src/front/node_modules/@babel/helper-environment-visitor/lib/index.js +5 -9
  137. package/src/front/node_modules/@babel/helper-environment-visitor/lib/index.js.map +1 -1
  138. package/src/front/node_modules/@babel/helper-environment-visitor/package.json +3 -3
  139. package/src/front/node_modules/@babel/helper-module-imports/README.md +1 -1
  140. package/src/front/node_modules/@babel/helper-module-imports/lib/import-injector.js +2 -2
  141. package/src/front/node_modules/@babel/helper-module-imports/lib/import-injector.js.map +1 -1
  142. package/src/front/node_modules/@babel/helper-module-imports/lib/index.js +2 -2
  143. package/src/front/node_modules/@babel/helper-module-imports/lib/index.js.map +1 -1
  144. package/src/front/node_modules/@babel/helper-module-imports/package.json +4 -4
  145. package/src/front/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js +4 -8
  146. package/src/front/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js.map +1 -1
  147. package/src/front/node_modules/@babel/helper-module-transforms/lib/index.js +9 -13
  148. package/src/front/node_modules/@babel/helper-module-transforms/lib/index.js.map +1 -1
  149. package/src/front/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js +7 -2
  150. package/src/front/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js.map +1 -1
  151. package/src/front/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js.map +1 -1
  152. package/src/front/node_modules/@babel/helper-module-transforms/package.json +6 -6
  153. package/src/front/node_modules/@babel/helper-validator-identifier/README.md +1 -1
  154. package/src/front/node_modules/@babel/helper-validator-identifier/lib/identifier.js +2 -2
  155. package/src/front/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -1
  156. package/src/front/node_modules/@babel/helper-validator-identifier/lib/index.js +2 -2
  157. package/src/front/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -1
  158. package/src/front/node_modules/@babel/helper-validator-identifier/package.json +2 -2
  159. package/src/front/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js +9 -11
  160. package/src/front/node_modules/@babel/helper-validator-option/README.md +1 -1
  161. package/src/front/node_modules/@babel/helper-validator-option/lib/index.js +2 -2
  162. package/src/front/node_modules/@babel/helper-validator-option/lib/index.js.map +1 -1
  163. package/src/front/node_modules/@babel/helper-validator-option/lib/validator.js +1 -1
  164. package/src/front/node_modules/@babel/helper-validator-option/lib/validator.js.map +1 -1
  165. package/src/front/node_modules/@babel/helper-validator-option/package.json +1 -1
  166. package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js +21 -21
  167. package/src/front/node_modules/@babel/helpers/lib/helpers-generated.js.map +1 -1
  168. package/src/front/node_modules/@babel/helpers/lib/helpers.js +1 -1
  169. package/src/front/node_modules/@babel/helpers/lib/helpers.js.map +1 -1
  170. package/src/front/node_modules/@babel/helpers/lib/index.js +1 -1
  171. package/src/front/node_modules/@babel/helpers/lib/index.js.map +1 -1
  172. package/src/front/node_modules/@babel/helpers/package.json +7 -7
  173. package/src/front/node_modules/@babel/helpers/scripts/generate-helpers.js +1 -1
  174. package/src/front/node_modules/@babel/highlight/lib/index.js +7 -8
  175. package/src/front/node_modules/@babel/highlight/lib/index.js.map +1 -1
  176. package/src/front/node_modules/@babel/highlight/package.json +2 -2
  177. package/src/front/node_modules/@babel/parser/lib/index.js +52 -57
  178. package/src/front/node_modules/@babel/parser/lib/index.js.map +1 -1
  179. package/src/front/node_modules/@babel/parser/package.json +4 -4
  180. package/src/front/node_modules/@babel/template/README.md +1 -1
  181. package/src/front/node_modules/@babel/template/lib/builder.js +3 -3
  182. package/src/front/node_modules/@babel/template/lib/builder.js.map +1 -1
  183. package/src/front/node_modules/@babel/template/lib/index.js +2 -2
  184. package/src/front/node_modules/@babel/template/lib/index.js.map +1 -1
  185. package/src/front/node_modules/@babel/template/lib/literal.js +3 -3
  186. package/src/front/node_modules/@babel/template/lib/literal.js.map +1 -1
  187. package/src/front/node_modules/@babel/template/lib/parse.js.map +1 -1
  188. package/src/front/node_modules/@babel/template/lib/populate.js.map +1 -1
  189. package/src/front/node_modules/@babel/template/lib/string.js +3 -3
  190. package/src/front/node_modules/@babel/template/lib/string.js.map +1 -1
  191. package/src/front/node_modules/@babel/template/package.json +4 -4
  192. package/src/front/node_modules/@babel/traverse/lib/cache.js.map +1 -1
  193. package/src/front/node_modules/@babel/traverse/lib/context.js +2 -2
  194. package/src/front/node_modules/@babel/traverse/lib/context.js.map +1 -1
  195. package/src/front/node_modules/@babel/traverse/lib/hub.js.map +1 -1
  196. package/src/front/node_modules/@babel/traverse/lib/index.js +8 -8
  197. package/src/front/node_modules/@babel/traverse/lib/index.js.map +1 -1
  198. package/src/front/node_modules/@babel/traverse/lib/path/ancestry.js.map +1 -1
  199. package/src/front/node_modules/@babel/traverse/lib/path/comments.js.map +1 -1
  200. package/src/front/node_modules/@babel/traverse/lib/path/context.js +2 -2
  201. package/src/front/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
  202. package/src/front/node_modules/@babel/traverse/lib/path/conversion.js +5 -7
  203. package/src/front/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
  204. package/src/front/node_modules/@babel/traverse/lib/path/evaluation.js.map +1 -1
  205. package/src/front/node_modules/@babel/traverse/lib/path/family.js +1 -1
  206. package/src/front/node_modules/@babel/traverse/lib/path/family.js.map +1 -1
  207. package/src/front/node_modules/@babel/traverse/lib/path/index.js +17 -17
  208. package/src/front/node_modules/@babel/traverse/lib/path/index.js.map +1 -1
  209. package/src/front/node_modules/@babel/traverse/lib/path/inference/index.js +1 -1
  210. package/src/front/node_modules/@babel/traverse/lib/path/inference/index.js.map +1 -1
  211. package/src/front/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +1 -1
  212. package/src/front/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map +1 -1
  213. package/src/front/node_modules/@babel/traverse/lib/path/inference/inferers.js +2 -2
  214. package/src/front/node_modules/@babel/traverse/lib/path/inference/inferers.js.map +1 -1
  215. package/src/front/node_modules/@babel/traverse/lib/path/introspection.js.map +1 -1
  216. package/src/front/node_modules/@babel/traverse/lib/path/lib/hoister.js.map +1 -1
  217. package/src/front/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js.map +1 -1
  218. package/src/front/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js +6 -8
  219. package/src/front/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js.map +1 -1
  220. package/src/front/node_modules/@babel/traverse/lib/path/modification.js +3 -3
  221. package/src/front/node_modules/@babel/traverse/lib/path/modification.js.map +1 -1
  222. package/src/front/node_modules/@babel/traverse/lib/path/removal.js +3 -3
  223. package/src/front/node_modules/@babel/traverse/lib/path/removal.js.map +1 -1
  224. package/src/front/node_modules/@babel/traverse/lib/path/replacement.js +3 -3
  225. package/src/front/node_modules/@babel/traverse/lib/path/replacement.js.map +1 -1
  226. package/src/front/node_modules/@babel/traverse/lib/scope/binding.js +1 -3
  227. package/src/front/node_modules/@babel/traverse/lib/scope/binding.js.map +1 -1
  228. package/src/front/node_modules/@babel/traverse/lib/scope/index.js +5 -5
  229. package/src/front/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
  230. package/src/front/node_modules/@babel/traverse/lib/scope/lib/renamer.js +2 -2
  231. package/src/front/node_modules/@babel/traverse/lib/scope/lib/renamer.js.map +1 -1
  232. package/src/front/node_modules/@babel/traverse/lib/traverse-node.js +1 -1
  233. package/src/front/node_modules/@babel/traverse/lib/traverse-node.js.map +1 -1
  234. package/src/front/node_modules/@babel/traverse/lib/types.js.map +1 -1
  235. package/src/front/node_modules/@babel/traverse/lib/visitors.js +1 -1
  236. package/src/front/node_modules/@babel/traverse/lib/visitors.js.map +1 -1
  237. package/src/front/node_modules/@babel/traverse/package.json +7 -7
  238. package/src/front/node_modules/@babel/types/lib/asserts/assertNode.js +1 -1
  239. package/src/front/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -1
  240. package/src/front/node_modules/@babel/types/lib/asserts/generated/index.js +2 -2
  241. package/src/front/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -1
  242. package/src/front/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
  243. package/src/front/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +3 -3
  244. package/src/front/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -1
  245. package/src/front/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +9 -9
  246. package/src/front/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -1
  247. package/src/front/node_modules/@babel/types/lib/builders/generated/index.js +3 -3
  248. package/src/front/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -1
  249. package/src/front/node_modules/@babel/types/lib/builders/generated/uppercase.js +1 -1
  250. package/src/front/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -1
  251. package/src/front/node_modules/@babel/types/lib/builders/react/buildChildren.js +5 -5
  252. package/src/front/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -1
  253. package/src/front/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +5 -5
  254. package/src/front/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -1
  255. package/src/front/node_modules/@babel/types/lib/builders/validateNode.js +3 -3
  256. package/src/front/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -1
  257. package/src/front/node_modules/@babel/types/lib/clone/clone.js +1 -1
  258. package/src/front/node_modules/@babel/types/lib/clone/clone.js.map +1 -1
  259. package/src/front/node_modules/@babel/types/lib/clone/cloneDeep.js +1 -1
  260. package/src/front/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -1
  261. package/src/front/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +1 -1
  262. package/src/front/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -1
  263. package/src/front/node_modules/@babel/types/lib/clone/cloneNode.js +6 -6
  264. package/src/front/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
  265. package/src/front/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +1 -1
  266. package/src/front/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -1
  267. package/src/front/node_modules/@babel/types/lib/comments/addComment.js +1 -1
  268. package/src/front/node_modules/@babel/types/lib/comments/addComment.js.map +1 -1
  269. package/src/front/node_modules/@babel/types/lib/comments/addComments.js.map +1 -1
  270. package/src/front/node_modules/@babel/types/lib/comments/inheritInnerComments.js +1 -1
  271. package/src/front/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -1
  272. package/src/front/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +1 -1
  273. package/src/front/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -1
  274. package/src/front/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +1 -1
  275. package/src/front/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -1
  276. package/src/front/node_modules/@babel/types/lib/comments/inheritsComments.js +3 -3
  277. package/src/front/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -1
  278. package/src/front/node_modules/@babel/types/lib/comments/removeComments.js +2 -2
  279. package/src/front/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -1
  280. package/src/front/node_modules/@babel/types/lib/constants/generated/index.js +50 -50
  281. package/src/front/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -1
  282. package/src/front/node_modules/@babel/types/lib/converters/ensureBlock.js +1 -1
  283. package/src/front/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -1
  284. package/src/front/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +14 -14
  285. package/src/front/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -1
  286. package/src/front/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +1 -1
  287. package/src/front/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -1
  288. package/src/front/node_modules/@babel/types/lib/converters/toBlock.js +9 -9
  289. package/src/front/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -1
  290. package/src/front/node_modules/@babel/types/lib/converters/toComputedKey.js +3 -3
  291. package/src/front/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -1
  292. package/src/front/node_modules/@babel/types/lib/converters/toExpression.js +6 -6
  293. package/src/front/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -1
  294. package/src/front/node_modules/@babel/types/lib/converters/toIdentifier.js +1 -1
  295. package/src/front/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -1
  296. package/src/front/node_modules/@babel/types/lib/converters/toKeyAlias.js +5 -5
  297. package/src/front/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -1
  298. package/src/front/node_modules/@babel/types/lib/converters/toSequenceExpression.js +1 -1
  299. package/src/front/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -1
  300. package/src/front/node_modules/@babel/types/lib/converters/toStatement.js +7 -7
  301. package/src/front/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -1
  302. package/src/front/node_modules/@babel/types/lib/converters/valueToNode.js +17 -17
  303. package/src/front/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -1
  304. package/src/front/node_modules/@babel/types/lib/definitions/core.js +11 -10
  305. package/src/front/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
  306. package/src/front/node_modules/@babel/types/lib/definitions/experimental.js +1 -1
  307. package/src/front/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -1
  308. package/src/front/node_modules/@babel/types/lib/definitions/flow.js +1 -1
  309. package/src/front/node_modules/@babel/types/lib/definitions/flow.js.map +1 -1
  310. package/src/front/node_modules/@babel/types/lib/definitions/index.js +9 -9
  311. package/src/front/node_modules/@babel/types/lib/definitions/index.js.map +1 -1
  312. package/src/front/node_modules/@babel/types/lib/definitions/jsx.js +1 -1
  313. package/src/front/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -1
  314. package/src/front/node_modules/@babel/types/lib/definitions/misc.js +2 -2
  315. package/src/front/node_modules/@babel/types/lib/definitions/misc.js.map +1 -1
  316. package/src/front/node_modules/@babel/types/lib/definitions/placeholders.js +1 -1
  317. package/src/front/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -1
  318. package/src/front/node_modules/@babel/types/lib/definitions/typescript.js +4 -4
  319. package/src/front/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -1
  320. package/src/front/node_modules/@babel/types/lib/definitions/utils.js +2 -2
  321. package/src/front/node_modules/@babel/types/lib/definitions/utils.js.map +1 -1
  322. package/src/front/node_modules/@babel/types/lib/index-legacy.d.ts +12 -12
  323. package/src/front/node_modules/@babel/types/lib/index.d.ts +14 -14
  324. package/src/front/node_modules/@babel/types/lib/index.js +84 -84
  325. package/src/front/node_modules/@babel/types/lib/index.js.flow +12 -12
  326. package/src/front/node_modules/@babel/types/lib/index.js.map +1 -1
  327. package/src/front/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +2 -2
  328. package/src/front/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -1
  329. package/src/front/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +6 -6
  330. package/src/front/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -1
  331. package/src/front/node_modules/@babel/types/lib/modifications/inherits.js +4 -4
  332. package/src/front/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -1
  333. package/src/front/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +4 -4
  334. package/src/front/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -1
  335. package/src/front/node_modules/@babel/types/lib/modifications/removeProperties.js +2 -2
  336. package/src/front/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -1
  337. package/src/front/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +2 -2
  338. package/src/front/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -1
  339. package/src/front/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +6 -6
  340. package/src/front/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -1
  341. package/src/front/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +6 -6
  342. package/src/front/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -1
  343. package/src/front/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +1 -1
  344. package/src/front/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -1
  345. package/src/front/node_modules/@babel/types/lib/traverse/traverse.js +2 -2
  346. package/src/front/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -1
  347. package/src/front/node_modules/@babel/types/lib/traverse/traverseFast.js +2 -2
  348. package/src/front/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -1
  349. package/src/front/node_modules/@babel/types/lib/utils/inherit.js.map +1 -1
  350. package/src/front/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +3 -3
  351. package/src/front/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -1
  352. package/src/front/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +1 -1
  353. package/src/front/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -1
  354. package/src/front/node_modules/@babel/types/lib/validators/generated/index.js +2 -2
  355. package/src/front/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -1
  356. package/src/front/node_modules/@babel/types/lib/validators/is.js +5 -5
  357. package/src/front/node_modules/@babel/types/lib/validators/is.js.map +1 -1
  358. package/src/front/node_modules/@babel/types/lib/validators/isBinding.js +1 -1
  359. package/src/front/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -1
  360. package/src/front/node_modules/@babel/types/lib/validators/isBlockScoped.js +3 -3
  361. package/src/front/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -1
  362. package/src/front/node_modules/@babel/types/lib/validators/isImmutable.js +3 -3
  363. package/src/front/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -1
  364. package/src/front/node_modules/@babel/types/lib/validators/isLet.js +3 -3
  365. package/src/front/node_modules/@babel/types/lib/validators/isLet.js.map +1 -1
  366. package/src/front/node_modules/@babel/types/lib/validators/isNode.js +2 -2
  367. package/src/front/node_modules/@babel/types/lib/validators/isNode.js.map +1 -1
  368. package/src/front/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +3 -3
  369. package/src/front/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -1
  370. package/src/front/node_modules/@babel/types/lib/validators/isPlaceholderType.js +2 -2
  371. package/src/front/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -1
  372. package/src/front/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -1
  373. package/src/front/node_modules/@babel/types/lib/validators/isScope.js +4 -4
  374. package/src/front/node_modules/@babel/types/lib/validators/isScope.js.map +1 -1
  375. package/src/front/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +2 -2
  376. package/src/front/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
  377. package/src/front/node_modules/@babel/types/lib/validators/isType.js +3 -3
  378. package/src/front/node_modules/@babel/types/lib/validators/isType.js.map +1 -1
  379. package/src/front/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +1 -1
  380. package/src/front/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -1
  381. package/src/front/node_modules/@babel/types/lib/validators/isVar.js +4 -4
  382. package/src/front/node_modules/@babel/types/lib/validators/isVar.js.map +1 -1
  383. package/src/front/node_modules/@babel/types/lib/validators/matchesPattern.js +6 -6
  384. package/src/front/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -1
  385. package/src/front/node_modules/@babel/types/lib/validators/react/isReactComponent.js +1 -1
  386. package/src/front/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -1
  387. package/src/front/node_modules/@babel/types/lib/validators/validate.js +3 -3
  388. package/src/front/node_modules/@babel/types/lib/validators/validate.js.map +1 -1
  389. package/src/front/node_modules/@babel/types/package.json +4 -4
  390. package/src/front/node_modules/nan/CHANGELOG.md +5 -1
  391. package/src/front/node_modules/nan/CMakeLists.txt +138 -0
  392. package/src/front/node_modules/nan/README.md +4 -4
  393. package/src/front/node_modules/nan/doc/errors.md +1 -1
  394. package/src/front/node_modules/nan/doc/methods.md +21 -13
  395. package/src/front/node_modules/nan/doc/persistent.md +1 -1
  396. package/src/front/node_modules/nan/nan.h +3 -1
  397. package/src/front/node_modules/nan/nan_callbacks_12_inl.h +46 -40
  398. package/src/front/node_modules/nan/package.json +3 -2
  399. package/src/front/node_modules/nan/tools/1to2.js +1 -1
  400. package/src/front/node_modules/typescript/lib/lib.decorators.d.ts +17 -0
  401. package/src/front/node_modules/typescript/lib/lib.dom.d.ts +313 -90
  402. package/src/front/node_modules/typescript/lib/lib.es2015.collection.d.ts +9 -9
  403. package/src/front/node_modules/typescript/lib/lib.es2015.core.d.ts +2 -2
  404. package/src/front/node_modules/typescript/lib/lib.es2015.iterable.d.ts +4 -4
  405. package/src/front/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +2 -2
  406. package/src/front/node_modules/typescript/lib/lib.es2017.d.ts +1 -0
  407. package/src/front/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
  408. package/src/front/node_modules/typescript/lib/lib.es2020.bigint.d.ts +4 -4
  409. package/src/front/node_modules/typescript/lib/lib.es2021.weakref.d.ts +19 -16
  410. package/src/front/node_modules/typescript/lib/lib.es2023.array.d.ts +618 -36
  411. package/src/front/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
  412. package/src/front/node_modules/typescript/lib/lib.es2023.d.ts +1 -0
  413. package/src/front/node_modules/typescript/lib/lib.es5.d.ts +27 -18
  414. package/src/front/node_modules/typescript/lib/lib.esnext.d.ts +2 -0
  415. package/src/front/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
  416. package/src/front/node_modules/typescript/lib/lib.esnext.disposable.d.ts +185 -0
  417. package/src/front/node_modules/typescript/lib/lib.webworker.d.ts +172 -33
  418. package/src/front/node_modules/typescript/lib/tsc.js +8311 -6557
  419. package/src/front/node_modules/typescript/lib/tsserver.js +11796 -9281
  420. package/src/front/node_modules/typescript/lib/tsserverlibrary.d.ts +287 -249
  421. package/src/front/node_modules/typescript/lib/tsserverlibrary.js +11801 -9288
  422. package/src/front/node_modules/typescript/lib/typescript.d.ts +274 -248
  423. package/src/front/node_modules/typescript/lib/typescript.js +11678 -9231
  424. package/src/front/node_modules/typescript/lib/typingsInstaller.js +1852 -1645
  425. package/src/front/node_modules/typescript/package.json +7 -7
  426. package/src/front/package-lock.json +168 -168
  427. package/src/front/src/components/inputs/FileInput.js +1 -0
  428. package/src/front/src/pages/Records.js +5 -3
  429. package/src/types/config.ts +1 -0
  430. package/src/front/build/static/js/main.4ce5340d.chunk.js.map +0 -1
  431. package/src/front/node_modules/.cache/babel-loader/1dbf9b1b83cdf813e9dc5f561b9b97ac.json +0 -1
  432. package/src/front/node_modules/.cache/babel-loader/d88f947a76ac5f78797e69c737b6267e.json +0 -1
  433. package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/c3/3e/f2b5b90044b7bdbb4cff67b2c09e24bb506274240d920de24bb4b678f3f00b80f7e9f0900cd1de883484031488d8603e97ea6b4e39a9c6ab5160353d3be9 +0 -1
  434. package/src/front/node_modules/@babel/core/lib/config/files/import-meta-resolve.js +0 -17
  435. package/src/front/node_modules/@babel/core/lib/config/files/import-meta-resolve.js.map +0 -1
  436. package/src/front/node_modules/@babel/parser/lib/options.js +0 -44
  437. package/src/front/node_modules/@babel/parser/lib/options.js.map +0 -1
  438. package/src/front/node_modules/@babel/parser/lib/parse-error/credentials.js +0 -28
  439. package/src/front/node_modules/@babel/parser/lib/parse-error/credentials.js.map +0 -1
  440. package/src/front/node_modules/@babel/parser/lib/parse-error/module-errors.js +0 -20
  441. package/src/front/node_modules/@babel/parser/lib/parse-error/module-errors.js.map +0 -1
  442. package/src/front/node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js +0 -32
  443. package/src/front/node_modules/@babel/parser/lib/parse-error/pipeline-operator-errors.js.map +0 -1
  444. package/src/front/node_modules/@babel/parser/lib/parse-error/standard-errors.js +0 -220
  445. package/src/front/node_modules/@babel/parser/lib/parse-error/standard-errors.js.map +0 -1
  446. package/src/front/node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js +0 -22
  447. package/src/front/node_modules/@babel/parser/lib/parse-error/strict-mode-errors.js.map +0 -1
  448. package/src/front/node_modules/@babel/parser/lib/parse-error/to-node-description.js +0 -39
  449. package/src/front/node_modules/@babel/parser/lib/parse-error/to-node-description.js.map +0 -1
  450. package/src/front/node_modules/@babel/parser/lib/parse-error.js +0 -106
  451. package/src/front/node_modules/@babel/parser/lib/parse-error.js.map +0 -1
  452. package/src/front/node_modules/@babel/parser/lib/parser/base.js +0 -36
  453. package/src/front/node_modules/@babel/parser/lib/parser/base.js.map +0 -1
  454. package/src/front/node_modules/@babel/parser/lib/parser/comments.js +0 -190
  455. package/src/front/node_modules/@babel/parser/lib/parser/comments.js.map +0 -1
  456. package/src/front/node_modules/@babel/parser/lib/parser/expression.js +0 -1824
  457. package/src/front/node_modules/@babel/parser/lib/parser/expression.js.map +0 -1
  458. package/src/front/node_modules/@babel/parser/lib/parser/index.js +0 -43
  459. package/src/front/node_modules/@babel/parser/lib/parser/index.js.map +0 -1
  460. package/src/front/node_modules/@babel/parser/lib/parser/lval.js +0 -421
  461. package/src/front/node_modules/@babel/parser/lib/parser/lval.js.map +0 -1
  462. package/src/front/node_modules/@babel/parser/lib/parser/node.js +0 -127
  463. package/src/front/node_modules/@babel/parser/lib/parser/node.js.map +0 -1
  464. package/src/front/node_modules/@babel/parser/lib/parser/statement.js +0 -2033
  465. package/src/front/node_modules/@babel/parser/lib/parser/statement.js.map +0 -1
  466. package/src/front/node_modules/@babel/parser/lib/parser/util.js +0 -238
  467. package/src/front/node_modules/@babel/parser/lib/parser/util.js.map +0 -1
  468. package/src/front/node_modules/@babel/parser/lib/plugin-utils.js +0 -136
  469. package/src/front/node_modules/@babel/parser/lib/plugin-utils.js.map +0 -1
  470. package/src/front/node_modules/@babel/parser/lib/plugins/estree.js +0 -340
  471. package/src/front/node_modules/@babel/parser/lib/plugins/estree.js.map +0 -1
  472. package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js +0 -2474
  473. package/src/front/node_modules/@babel/parser/lib/plugins/flow/index.js.map +0 -1
  474. package/src/front/node_modules/@babel/parser/lib/plugins/flow/scope.js +0 -44
  475. package/src/front/node_modules/@babel/parser/lib/plugins/flow/scope.js.map +0 -1
  476. package/src/front/node_modules/@babel/parser/lib/plugins/jsx/index.js +0 -444
  477. package/src/front/node_modules/@babel/parser/lib/plugins/jsx/index.js.map +0 -1
  478. package/src/front/node_modules/@babel/parser/lib/plugins/jsx/xhtml.js +0 -266
  479. package/src/front/node_modules/@babel/parser/lib/plugins/jsx/xhtml.js.map +0 -1
  480. package/src/front/node_modules/@babel/parser/lib/plugins/placeholders.js +0 -198
  481. package/src/front/node_modules/@babel/parser/lib/plugins/placeholders.js.map +0 -1
  482. package/src/front/node_modules/@babel/parser/lib/plugins/typescript/index.js +0 -2656
  483. package/src/front/node_modules/@babel/parser/lib/plugins/typescript/index.js.map +0 -1
  484. package/src/front/node_modules/@babel/parser/lib/plugins/typescript/scope.js +0 -121
  485. package/src/front/node_modules/@babel/parser/lib/plugins/typescript/scope.js.map +0 -1
  486. package/src/front/node_modules/@babel/parser/lib/plugins/v8intrinsic.js +0 -31
  487. package/src/front/node_modules/@babel/parser/lib/plugins/v8intrinsic.js.map +0 -1
  488. package/src/front/node_modules/@babel/parser/lib/tokenizer/context.js +0 -27
  489. package/src/front/node_modules/@babel/parser/lib/tokenizer/context.js.map +0 -1
  490. package/src/front/node_modules/@babel/parser/lib/tokenizer/index.js +0 -1119
  491. package/src/front/node_modules/@babel/parser/lib/tokenizer/index.js.map +0 -1
  492. package/src/front/node_modules/@babel/parser/lib/tokenizer/state.js +0 -82
  493. package/src/front/node_modules/@babel/parser/lib/tokenizer/state.js.map +0 -1
  494. package/src/front/node_modules/@babel/parser/lib/tokenizer/types.js +0 -586
  495. package/src/front/node_modules/@babel/parser/lib/tokenizer/types.js.map +0 -1
  496. package/src/front/node_modules/@babel/parser/lib/util/class-scope.js +0 -92
  497. package/src/front/node_modules/@babel/parser/lib/util/class-scope.js.map +0 -1
  498. package/src/front/node_modules/@babel/parser/lib/util/expression-scope.js +0 -142
  499. package/src/front/node_modules/@babel/parser/lib/util/expression-scope.js.map +0 -1
  500. package/src/front/node_modules/@babel/parser/lib/util/identifier.js +0 -62
  501. package/src/front/node_modules/@babel/parser/lib/util/identifier.js.map +0 -1
  502. package/src/front/node_modules/@babel/parser/lib/util/location.js +0 -39
  503. package/src/front/node_modules/@babel/parser/lib/util/location.js.map +0 -1
  504. package/src/front/node_modules/@babel/parser/lib/util/production-parameter.js +0 -49
  505. package/src/front/node_modules/@babel/parser/lib/util/production-parameter.js.map +0 -1
  506. package/src/front/node_modules/@babel/parser/lib/util/scope.js +0 -161
  507. package/src/front/node_modules/@babel/parser/lib/util/scope.js.map +0 -1
  508. package/src/front/node_modules/@babel/parser/lib/util/scopeflags.js +0 -67
  509. package/src/front/node_modules/@babel/parser/lib/util/scopeflags.js.map +0 -1
  510. package/src/front/node_modules/@babel/parser/lib/util/whitespace.js +0 -59
  511. package/src/front/node_modules/@babel/parser/lib/util/whitespace.js.map +0 -1
@@ -1,1824 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _types = require("../tokenizer/types");
8
- var _lval = require("./lval");
9
- var _identifier = require("../util/identifier");
10
- var _location = require("../util/location");
11
- var _scopeflags = require("../util/scopeflags");
12
- var _util = require("./util");
13
- var _productionParameter = require("../util/production-parameter");
14
- var _expressionScope = require("../util/expression-scope");
15
- var _parseError = require("../parse-error");
16
- var _pipelineOperatorErrors = require("../parse-error/pipeline-operator-errors");
17
- var _comments = require("./comments");
18
- var _node = require("./node");
19
- class ExpressionParser extends _lval.default {
20
- checkProto(prop, isRecord, protoRef, refExpressionErrors) {
21
- if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
22
- return;
23
- }
24
- const key = prop.key;
25
- const name = key.type === "Identifier" ? key.name : key.value;
26
- if (name === "__proto__") {
27
- if (isRecord) {
28
- this.raise(_parseError.Errors.RecordNoProto, {
29
- at: key
30
- });
31
- return;
32
- }
33
- if (protoRef.used) {
34
- if (refExpressionErrors) {
35
- if (refExpressionErrors.doubleProtoLoc === null) {
36
- refExpressionErrors.doubleProtoLoc = key.loc.start;
37
- }
38
- } else {
39
- this.raise(_parseError.Errors.DuplicateProto, {
40
- at: key
41
- });
42
- }
43
- }
44
- protoRef.used = true;
45
- }
46
- }
47
- shouldExitDescending(expr, potentialArrowAt) {
48
- return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
49
- }
50
- getExpression() {
51
- this.enterInitialScopes();
52
- this.nextToken();
53
- const expr = this.parseExpression();
54
- if (!this.match(137)) {
55
- this.unexpected();
56
- }
57
- this.finalizeRemainingComments();
58
- expr.comments = this.state.comments;
59
- expr.errors = this.state.errors;
60
- if (this.options.tokens) {
61
- expr.tokens = this.tokens;
62
- }
63
- return expr;
64
- }
65
- parseExpression(disallowIn, refExpressionErrors) {
66
- if (disallowIn) {
67
- return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
68
- }
69
- return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
70
- }
71
- parseExpressionBase(refExpressionErrors) {
72
- const startLoc = this.state.startLoc;
73
- const expr = this.parseMaybeAssign(refExpressionErrors);
74
- if (this.match(12)) {
75
- const node = this.startNodeAt(startLoc);
76
- node.expressions = [expr];
77
- while (this.eat(12)) {
78
- node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
79
- }
80
- this.toReferencedList(node.expressions);
81
- return this.finishNode(node, "SequenceExpression");
82
- }
83
- return expr;
84
- }
85
- parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) {
86
- return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
87
- }
88
- parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) {
89
- return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
90
- }
91
- setOptionalParametersError(refExpressionErrors, resultError) {
92
- var _resultError$loc;
93
- refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc;
94
- }
95
- parseMaybeAssign(refExpressionErrors, afterLeftParse) {
96
- const startLoc = this.state.startLoc;
97
- if (this.isContextual(106)) {
98
- if (this.prodParam.hasYield) {
99
- let left = this.parseYield();
100
- if (afterLeftParse) {
101
- left = afterLeftParse.call(this, left, startLoc);
102
- }
103
- return left;
104
- }
105
- }
106
- let ownExpressionErrors;
107
- if (refExpressionErrors) {
108
- ownExpressionErrors = false;
109
- } else {
110
- refExpressionErrors = new _util.ExpressionErrors();
111
- ownExpressionErrors = true;
112
- }
113
- const {
114
- type
115
- } = this.state;
116
- if (type === 10 || (0, _types.tokenIsIdentifier)(type)) {
117
- this.state.potentialArrowAt = this.state.start;
118
- }
119
- let left = this.parseMaybeConditional(refExpressionErrors);
120
- if (afterLeftParse) {
121
- left = afterLeftParse.call(this, left, startLoc);
122
- }
123
- if ((0, _types.tokenIsAssignment)(this.state.type)) {
124
- const node = this.startNodeAt(startLoc);
125
- const operator = this.state.value;
126
- node.operator = operator;
127
- if (this.match(29)) {
128
- this.toAssignable(left, true);
129
- node.left = left;
130
- const startIndex = startLoc.index;
131
- if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) {
132
- refExpressionErrors.doubleProtoLoc = null;
133
- }
134
- if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) {
135
- refExpressionErrors.shorthandAssignLoc = null;
136
- }
137
- if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) {
138
- this.checkDestructuringPrivate(refExpressionErrors);
139
- refExpressionErrors.privateKeyLoc = null;
140
- }
141
- } else {
142
- node.left = left;
143
- }
144
- this.next();
145
- node.right = this.parseMaybeAssign();
146
- this.checkLVal(left, {
147
- in: this.finishNode(node, "AssignmentExpression")
148
- });
149
- return node;
150
- } else if (ownExpressionErrors) {
151
- this.checkExpressionErrors(refExpressionErrors, true);
152
- }
153
- return left;
154
- }
155
- parseMaybeConditional(refExpressionErrors) {
156
- const startLoc = this.state.startLoc;
157
- const potentialArrowAt = this.state.potentialArrowAt;
158
- const expr = this.parseExprOps(refExpressionErrors);
159
- if (this.shouldExitDescending(expr, potentialArrowAt)) {
160
- return expr;
161
- }
162
- return this.parseConditional(expr, startLoc, refExpressionErrors);
163
- }
164
- parseConditional(expr, startLoc, refExpressionErrors) {
165
- if (this.eat(17)) {
166
- const node = this.startNodeAt(startLoc);
167
- node.test = expr;
168
- node.consequent = this.parseMaybeAssignAllowIn();
169
- this.expect(14);
170
- node.alternate = this.parseMaybeAssign();
171
- return this.finishNode(node, "ConditionalExpression");
172
- }
173
- return expr;
174
- }
175
- parseMaybeUnaryOrPrivate(refExpressionErrors) {
176
- return this.match(136) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
177
- }
178
- parseExprOps(refExpressionErrors) {
179
- const startLoc = this.state.startLoc;
180
- const potentialArrowAt = this.state.potentialArrowAt;
181
- const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors);
182
- if (this.shouldExitDescending(expr, potentialArrowAt)) {
183
- return expr;
184
- }
185
- return this.parseExprOp(expr, startLoc, -1);
186
- }
187
- parseExprOp(left, leftStartLoc, minPrec) {
188
- if (this.isPrivateName(left)) {
189
- const value = this.getPrivateNameSV(left);
190
- if (minPrec >= (0, _types.tokenOperatorPrecedence)(58) || !this.prodParam.hasIn || !this.match(58)) {
191
- this.raise(_parseError.Errors.PrivateInExpectedIn, {
192
- at: left,
193
- identifierName: value
194
- });
195
- }
196
- this.classScope.usePrivateName(value, left.loc.start);
197
- }
198
- const op = this.state.type;
199
- if ((0, _types.tokenIsOperator)(op) && (this.prodParam.hasIn || !this.match(58))) {
200
- let prec = (0, _types.tokenOperatorPrecedence)(op);
201
- if (prec > minPrec) {
202
- if (op === 39) {
203
- this.expectPlugin("pipelineOperator");
204
- if (this.state.inFSharpPipelineDirectBody) {
205
- return left;
206
- }
207
- this.checkPipelineAtInfixOperator(left, leftStartLoc);
208
- }
209
- const node = this.startNodeAt(leftStartLoc);
210
- node.left = left;
211
- node.operator = this.state.value;
212
- const logical = op === 41 || op === 42;
213
- const coalesce = op === 40;
214
- if (coalesce) {
215
- prec = (0, _types.tokenOperatorPrecedence)(42);
216
- }
217
- this.next();
218
- if (op === 39 && this.hasPlugin(["pipelineOperator", {
219
- proposal: "minimal"
220
- }])) {
221
- if (this.state.type === 96 && this.prodParam.hasAwait) {
222
- throw this.raise(_parseError.Errors.UnexpectedAwaitAfterPipelineBody, {
223
- at: this.state.startLoc
224
- });
225
- }
226
- }
227
- node.right = this.parseExprOpRightExpr(op, prec);
228
- const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
229
- const nextOp = this.state.type;
230
- if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) {
231
- throw this.raise(_parseError.Errors.MixingCoalesceWithLogical, {
232
- at: this.state.startLoc
233
- });
234
- }
235
- return this.parseExprOp(finishedNode, leftStartLoc, minPrec);
236
- }
237
- }
238
- return left;
239
- }
240
- parseExprOpRightExpr(op, prec) {
241
- const startLoc = this.state.startLoc;
242
- switch (op) {
243
- case 39:
244
- switch (this.getPluginOption("pipelineOperator", "proposal")) {
245
- case "hack":
246
- return this.withTopicBindingContext(() => {
247
- return this.parseHackPipeBody();
248
- });
249
- case "smart":
250
- return this.withTopicBindingContext(() => {
251
- if (this.prodParam.hasYield && this.isContextual(106)) {
252
- throw this.raise(_parseError.Errors.PipeBodyIsTighter, {
253
- at: this.state.startLoc
254
- });
255
- }
256
- return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc);
257
- });
258
- case "fsharp":
259
- return this.withSoloAwaitPermittingContext(() => {
260
- return this.parseFSharpPipelineBody(prec);
261
- });
262
- }
263
- default:
264
- return this.parseExprOpBaseRightExpr(op, prec);
265
- }
266
- }
267
- parseExprOpBaseRightExpr(op, prec) {
268
- const startLoc = this.state.startLoc;
269
- return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, (0, _types.tokenIsRightAssociative)(op) ? prec - 1 : prec);
270
- }
271
- parseHackPipeBody() {
272
- var _body$extra;
273
- const {
274
- startLoc
275
- } = this.state;
276
- const body = this.parseMaybeAssign();
277
- const requiredParentheses = _pipelineOperatorErrors.UnparenthesizedPipeBodyDescriptions.has(body.type);
278
- if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) {
279
- this.raise(_parseError.Errors.PipeUnparenthesizedBody, {
280
- at: startLoc,
281
- type: body.type
282
- });
283
- }
284
- if (!this.topicReferenceWasUsedInCurrentContext()) {
285
- this.raise(_parseError.Errors.PipeTopicUnused, {
286
- at: startLoc
287
- });
288
- }
289
- return body;
290
- }
291
- checkExponentialAfterUnary(node) {
292
- if (this.match(57)) {
293
- this.raise(_parseError.Errors.UnexpectedTokenUnaryExponentiation, {
294
- at: node.argument
295
- });
296
- }
297
- }
298
- parseMaybeUnary(refExpressionErrors, sawUnary) {
299
- const startLoc = this.state.startLoc;
300
- const isAwait = this.isContextual(96);
301
- if (isAwait && this.isAwaitAllowed()) {
302
- this.next();
303
- const expr = this.parseAwait(startLoc);
304
- if (!sawUnary) this.checkExponentialAfterUnary(expr);
305
- return expr;
306
- }
307
- const update = this.match(34);
308
- const node = this.startNode();
309
- if ((0, _types.tokenIsPrefix)(this.state.type)) {
310
- node.operator = this.state.value;
311
- node.prefix = true;
312
- if (this.match(72)) {
313
- this.expectPlugin("throwExpressions");
314
- }
315
- const isDelete = this.match(89);
316
- this.next();
317
- node.argument = this.parseMaybeUnary(null, true);
318
- this.checkExpressionErrors(refExpressionErrors, true);
319
- if (this.state.strict && isDelete) {
320
- const arg = node.argument;
321
- if (arg.type === "Identifier") {
322
- this.raise(_parseError.Errors.StrictDelete, {
323
- at: node
324
- });
325
- } else if (this.hasPropertyAsPrivateName(arg)) {
326
- this.raise(_parseError.Errors.DeletePrivateField, {
327
- at: node
328
- });
329
- }
330
- }
331
- if (!update) {
332
- if (!sawUnary) {
333
- this.checkExponentialAfterUnary(node);
334
- }
335
- return this.finishNode(node, "UnaryExpression");
336
- }
337
- }
338
- const expr = this.parseUpdate(node, update, refExpressionErrors);
339
- if (isAwait) {
340
- const {
341
- type
342
- } = this.state;
343
- const startsExpr = this.hasPlugin("v8intrinsic") ? (0, _types.tokenCanStartExpression)(type) : (0, _types.tokenCanStartExpression)(type) && !this.match(54);
344
- if (startsExpr && !this.isAmbiguousAwait()) {
345
- this.raiseOverwrite(_parseError.Errors.AwaitNotInAsyncContext, {
346
- at: startLoc
347
- });
348
- return this.parseAwait(startLoc);
349
- }
350
- }
351
- return expr;
352
- }
353
- parseUpdate(node, update, refExpressionErrors) {
354
- if (update) {
355
- const updateExpressionNode = node;
356
- this.checkLVal(updateExpressionNode.argument, {
357
- in: this.finishNode(updateExpressionNode, "UpdateExpression")
358
- });
359
- return node;
360
- }
361
- const startLoc = this.state.startLoc;
362
- let expr = this.parseExprSubscripts(refExpressionErrors);
363
- if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;
364
- while ((0, _types.tokenIsPostfix)(this.state.type) && !this.canInsertSemicolon()) {
365
- const node = this.startNodeAt(startLoc);
366
- node.operator = this.state.value;
367
- node.prefix = false;
368
- node.argument = expr;
369
- this.next();
370
- this.checkLVal(expr, {
371
- in: expr = this.finishNode(node, "UpdateExpression")
372
- });
373
- }
374
- return expr;
375
- }
376
- parseExprSubscripts(refExpressionErrors) {
377
- const startLoc = this.state.startLoc;
378
- const potentialArrowAt = this.state.potentialArrowAt;
379
- const expr = this.parseExprAtom(refExpressionErrors);
380
- if (this.shouldExitDescending(expr, potentialArrowAt)) {
381
- return expr;
382
- }
383
- return this.parseSubscripts(expr, startLoc);
384
- }
385
- parseSubscripts(base, startLoc, noCalls) {
386
- const state = {
387
- optionalChainMember: false,
388
- maybeAsyncArrow: this.atPossibleAsyncArrow(base),
389
- stop: false
390
- };
391
- do {
392
- base = this.parseSubscript(base, startLoc, noCalls, state);
393
- state.maybeAsyncArrow = false;
394
- } while (!state.stop);
395
- return base;
396
- }
397
- parseSubscript(base, startLoc, noCalls, state) {
398
- const {
399
- type
400
- } = this.state;
401
- if (!noCalls && type === 15) {
402
- return this.parseBind(base, startLoc, noCalls, state);
403
- } else if ((0, _types.tokenIsTemplate)(type)) {
404
- return this.parseTaggedTemplateExpression(base, startLoc, state);
405
- }
406
- let optional = false;
407
- if (type === 18) {
408
- if (noCalls) {
409
- this.raise(_parseError.Errors.OptionalChainingNoNew, {
410
- at: this.state.startLoc
411
- });
412
- if (this.lookaheadCharCode() === 40) {
413
- state.stop = true;
414
- return base;
415
- }
416
- }
417
- state.optionalChainMember = optional = true;
418
- this.next();
419
- }
420
- if (!noCalls && this.match(10)) {
421
- return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional);
422
- } else {
423
- const computed = this.eat(0);
424
- if (computed || optional || this.eat(16)) {
425
- return this.parseMember(base, startLoc, state, computed, optional);
426
- } else {
427
- state.stop = true;
428
- return base;
429
- }
430
- }
431
- }
432
- parseMember(base, startLoc, state, computed, optional) {
433
- const node = this.startNodeAt(startLoc);
434
- node.object = base;
435
- node.computed = computed;
436
- if (computed) {
437
- node.property = this.parseExpression();
438
- this.expect(3);
439
- } else if (this.match(136)) {
440
- if (base.type === "Super") {
441
- this.raise(_parseError.Errors.SuperPrivateField, {
442
- at: startLoc
443
- });
444
- }
445
- this.classScope.usePrivateName(this.state.value, this.state.startLoc);
446
- node.property = this.parsePrivateName();
447
- } else {
448
- node.property = this.parseIdentifier(true);
449
- }
450
- if (state.optionalChainMember) {
451
- node.optional = optional;
452
- return this.finishNode(node, "OptionalMemberExpression");
453
- } else {
454
- return this.finishNode(node, "MemberExpression");
455
- }
456
- }
457
- parseBind(base, startLoc, noCalls, state) {
458
- const node = this.startNodeAt(startLoc);
459
- node.object = base;
460
- this.next();
461
- node.callee = this.parseNoCallExpr();
462
- state.stop = true;
463
- return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls);
464
- }
465
- parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) {
466
- const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
467
- let refExpressionErrors = null;
468
- this.state.maybeInArrowParameters = true;
469
- this.next();
470
- const node = this.startNodeAt(startLoc);
471
- node.callee = base;
472
- const {
473
- maybeAsyncArrow,
474
- optionalChainMember
475
- } = state;
476
- if (maybeAsyncArrow) {
477
- this.expressionScope.enter((0, _expressionScope.newAsyncArrowScope)());
478
- refExpressionErrors = new _util.ExpressionErrors();
479
- }
480
- if (optionalChainMember) {
481
- node.optional = optional;
482
- }
483
- if (optional) {
484
- node.arguments = this.parseCallExpressionArguments(11);
485
- } else {
486
- node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors);
487
- }
488
- let finishedNode = this.finishCallExpression(node, optionalChainMember);
489
- if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
490
- state.stop = true;
491
- this.checkDestructuringPrivate(refExpressionErrors);
492
- this.expressionScope.validateAsPattern();
493
- this.expressionScope.exit();
494
- finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode);
495
- } else {
496
- if (maybeAsyncArrow) {
497
- this.checkExpressionErrors(refExpressionErrors, true);
498
- this.expressionScope.exit();
499
- }
500
- this.toReferencedArguments(finishedNode);
501
- }
502
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
503
- return finishedNode;
504
- }
505
- toReferencedArguments(node, isParenthesizedExpr) {
506
- this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
507
- }
508
- parseTaggedTemplateExpression(base, startLoc, state) {
509
- const node = this.startNodeAt(startLoc);
510
- node.tag = base;
511
- node.quasi = this.parseTemplate(true);
512
- if (state.optionalChainMember) {
513
- this.raise(_parseError.Errors.OptionalChainingNoTemplate, {
514
- at: startLoc
515
- });
516
- }
517
- return this.finishNode(node, "TaggedTemplateExpression");
518
- }
519
- atPossibleAsyncArrow(base) {
520
- return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt;
521
- }
522
- expectImportAttributesPlugin() {
523
- if (!this.hasPlugin("importAssertions")) {
524
- this.expectPlugin("importAttributes");
525
- }
526
- }
527
- finishCallExpression(node, optional) {
528
- if (node.callee.type === "Import") {
529
- if (node.arguments.length === 2) {
530
- {
531
- if (!this.hasPlugin("moduleAttributes")) {
532
- this.expectImportAttributesPlugin();
533
- }
534
- }
535
- }
536
- if (node.arguments.length === 0 || node.arguments.length > 2) {
537
- this.raise(_parseError.Errors.ImportCallArity, {
538
- at: node,
539
- maxArgumentCount: this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? 2 : 1
540
- });
541
- } else {
542
- for (const arg of node.arguments) {
543
- if (arg.type === "SpreadElement") {
544
- this.raise(_parseError.Errors.ImportCallSpreadArgument, {
545
- at: arg
546
- });
547
- }
548
- }
549
- }
550
- }
551
- return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
552
- }
553
- parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
554
- const elts = [];
555
- let first = true;
556
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
557
- this.state.inFSharpPipelineDirectBody = false;
558
- while (!this.eat(close)) {
559
- if (first) {
560
- first = false;
561
- } else {
562
- this.expect(12);
563
- if (this.match(close)) {
564
- if (dynamicImport && !this.hasPlugin("importAttributes") && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
565
- this.raise(_parseError.Errors.ImportCallArgumentTrailingComma, {
566
- at: this.state.lastTokStartLoc
567
- });
568
- }
569
- if (nodeForExtra) {
570
- this.addTrailingCommaExtraToNode(nodeForExtra);
571
- }
572
- this.next();
573
- break;
574
- }
575
- }
576
- elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder));
577
- }
578
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
579
- return elts;
580
- }
581
- shouldParseAsyncArrow() {
582
- return this.match(19) && !this.canInsertSemicolon();
583
- }
584
- parseAsyncArrowFromCallExpression(node, call) {
585
- var _call$extra;
586
- this.resetPreviousNodeTrailingComments(call);
587
- this.expect(19);
588
- this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc);
589
- if (call.innerComments) {
590
- (0, _comments.setInnerComments)(node, call.innerComments);
591
- }
592
- if (call.callee.trailingComments) {
593
- (0, _comments.setInnerComments)(node, call.callee.trailingComments);
594
- }
595
- return node;
596
- }
597
- parseNoCallExpr() {
598
- const startLoc = this.state.startLoc;
599
- return this.parseSubscripts(this.parseExprAtom(), startLoc, true);
600
- }
601
- parseExprAtom(refExpressionErrors) {
602
- let node;
603
- let decorators = null;
604
- const {
605
- type
606
- } = this.state;
607
- switch (type) {
608
- case 79:
609
- return this.parseSuper();
610
- case 83:
611
- node = this.startNode();
612
- this.next();
613
- if (this.match(16)) {
614
- return this.parseImportMetaProperty(node);
615
- }
616
- if (!this.match(10)) {
617
- this.raise(_parseError.Errors.UnsupportedImport, {
618
- at: this.state.lastTokStartLoc
619
- });
620
- }
621
- return this.finishNode(node, "Import");
622
- case 78:
623
- node = this.startNode();
624
- this.next();
625
- return this.finishNode(node, "ThisExpression");
626
- case 90:
627
- {
628
- return this.parseDo(this.startNode(), false);
629
- }
630
- case 56:
631
- case 31:
632
- {
633
- this.readRegexp();
634
- return this.parseRegExpLiteral(this.state.value);
635
- }
636
- case 132:
637
- return this.parseNumericLiteral(this.state.value);
638
- case 133:
639
- return this.parseBigIntLiteral(this.state.value);
640
- case 134:
641
- return this.parseDecimalLiteral(this.state.value);
642
- case 131:
643
- return this.parseStringLiteral(this.state.value);
644
- case 84:
645
- return this.parseNullLiteral();
646
- case 85:
647
- return this.parseBooleanLiteral(true);
648
- case 86:
649
- return this.parseBooleanLiteral(false);
650
- case 10:
651
- {
652
- const canBeArrow = this.state.potentialArrowAt === this.state.start;
653
- return this.parseParenAndDistinguishExpression(canBeArrow);
654
- }
655
- case 2:
656
- case 1:
657
- {
658
- return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true);
659
- }
660
- case 0:
661
- {
662
- return this.parseArrayLike(3, true, false, refExpressionErrors);
663
- }
664
- case 6:
665
- case 7:
666
- {
667
- return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
668
- }
669
- case 5:
670
- {
671
- return this.parseObjectLike(8, false, false, refExpressionErrors);
672
- }
673
- case 68:
674
- return this.parseFunctionOrFunctionSent();
675
- case 26:
676
- decorators = this.parseDecorators();
677
- case 80:
678
- return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false);
679
- case 77:
680
- return this.parseNewOrNewTarget();
681
- case 25:
682
- case 24:
683
- return this.parseTemplate(false);
684
- case 15:
685
- {
686
- node = this.startNode();
687
- this.next();
688
- node.object = null;
689
- const callee = node.callee = this.parseNoCallExpr();
690
- if (callee.type === "MemberExpression") {
691
- return this.finishNode(node, "BindExpression");
692
- } else {
693
- throw this.raise(_parseError.Errors.UnsupportedBind, {
694
- at: callee
695
- });
696
- }
697
- }
698
- case 136:
699
- {
700
- this.raise(_parseError.Errors.PrivateInExpectedIn, {
701
- at: this.state.startLoc,
702
- identifierName: this.state.value
703
- });
704
- return this.parsePrivateName();
705
- }
706
- case 33:
707
- {
708
- return this.parseTopicReferenceThenEqualsSign(54, "%");
709
- }
710
- case 32:
711
- {
712
- return this.parseTopicReferenceThenEqualsSign(44, "^");
713
- }
714
- case 37:
715
- case 38:
716
- {
717
- return this.parseTopicReference("hack");
718
- }
719
- case 44:
720
- case 54:
721
- case 27:
722
- {
723
- const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
724
- if (pipeProposal) {
725
- return this.parseTopicReference(pipeProposal);
726
- }
727
- this.unexpected();
728
- break;
729
- }
730
- case 47:
731
- {
732
- const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
733
- if ((0, _identifier.isIdentifierStart)(lookaheadCh) || lookaheadCh === 62) {
734
- this.expectOnePlugin(["jsx", "flow", "typescript"]);
735
- } else {
736
- this.unexpected();
737
- }
738
- break;
739
- }
740
- default:
741
- if ((0, _types.tokenIsIdentifier)(type)) {
742
- if (this.isContextual(125) && this.lookaheadInLineCharCode() === 123) {
743
- return this.parseModuleExpression();
744
- }
745
- const canBeArrow = this.state.potentialArrowAt === this.state.start;
746
- const containsEsc = this.state.containsEsc;
747
- const id = this.parseIdentifier();
748
- if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
749
- const {
750
- type
751
- } = this.state;
752
- if (type === 68) {
753
- this.resetPreviousNodeTrailingComments(id);
754
- this.next();
755
- return this.parseAsyncFunctionExpression(this.startNodeAtNode(id));
756
- } else if ((0, _types.tokenIsIdentifier)(type)) {
757
- if (this.lookaheadCharCode() === 61) {
758
- return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
759
- } else {
760
- return id;
761
- }
762
- } else if (type === 90) {
763
- this.resetPreviousNodeTrailingComments(id);
764
- return this.parseDo(this.startNodeAtNode(id), true);
765
- }
766
- }
767
- if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) {
768
- this.next();
769
- return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
770
- }
771
- return id;
772
- } else {
773
- this.unexpected();
774
- }
775
- }
776
- }
777
- parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) {
778
- const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
779
- if (pipeProposal) {
780
- this.state.type = topicTokenType;
781
- this.state.value = topicTokenValue;
782
- this.state.pos--;
783
- this.state.end--;
784
- this.state.endLoc = (0, _location.createPositionWithColumnOffset)(this.state.endLoc, -1);
785
- return this.parseTopicReference(pipeProposal);
786
- } else {
787
- this.unexpected();
788
- }
789
- }
790
- parseTopicReference(pipeProposal) {
791
- const node = this.startNode();
792
- const startLoc = this.state.startLoc;
793
- const tokenType = this.state.type;
794
- this.next();
795
- return this.finishTopicReference(node, startLoc, pipeProposal, tokenType);
796
- }
797
- finishTopicReference(node, startLoc, pipeProposal, tokenType) {
798
- if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) {
799
- const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference";
800
- if (!this.topicReferenceIsAllowedInCurrentContext()) {
801
- this.raise(pipeProposal === "smart" ? _parseError.Errors.PrimaryTopicNotAllowed : _parseError.Errors.PipeTopicUnbound, {
802
- at: startLoc
803
- });
804
- }
805
- this.registerTopicReference();
806
- return this.finishNode(node, nodeType);
807
- } else {
808
- throw this.raise(_parseError.Errors.PipeTopicUnconfiguredToken, {
809
- at: startLoc,
810
- token: (0, _types.tokenLabelName)(tokenType)
811
- });
812
- }
813
- }
814
- testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) {
815
- switch (pipeProposal) {
816
- case "hack":
817
- {
818
- return this.hasPlugin(["pipelineOperator", {
819
- topicToken: (0, _types.tokenLabelName)(tokenType)
820
- }]);
821
- }
822
- case "smart":
823
- return tokenType === 27;
824
- default:
825
- throw this.raise(_parseError.Errors.PipeTopicRequiresHackPipes, {
826
- at: startLoc
827
- });
828
- }
829
- }
830
- parseAsyncArrowUnaryFunction(node) {
831
- this.prodParam.enter((0, _productionParameter.functionFlags)(true, this.prodParam.hasYield));
832
- const params = [this.parseIdentifier()];
833
- this.prodParam.exit();
834
- if (this.hasPrecedingLineBreak()) {
835
- this.raise(_parseError.Errors.LineTerminatorBeforeArrow, {
836
- at: this.state.curPosition()
837
- });
838
- }
839
- this.expect(19);
840
- return this.parseArrowExpression(node, params, true);
841
- }
842
- parseDo(node, isAsync) {
843
- this.expectPlugin("doExpressions");
844
- if (isAsync) {
845
- this.expectPlugin("asyncDoExpressions");
846
- }
847
- node.async = isAsync;
848
- this.next();
849
- const oldLabels = this.state.labels;
850
- this.state.labels = [];
851
- if (isAsync) {
852
- this.prodParam.enter(_productionParameter.PARAM_AWAIT);
853
- node.body = this.parseBlock();
854
- this.prodParam.exit();
855
- } else {
856
- node.body = this.parseBlock();
857
- }
858
- this.state.labels = oldLabels;
859
- return this.finishNode(node, "DoExpression");
860
- }
861
- parseSuper() {
862
- const node = this.startNode();
863
- this.next();
864
- if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
865
- this.raise(_parseError.Errors.SuperNotAllowed, {
866
- at: node
867
- });
868
- } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
869
- this.raise(_parseError.Errors.UnexpectedSuper, {
870
- at: node
871
- });
872
- }
873
- if (!this.match(10) && !this.match(0) && !this.match(16)) {
874
- this.raise(_parseError.Errors.UnsupportedSuper, {
875
- at: node
876
- });
877
- }
878
- return this.finishNode(node, "Super");
879
- }
880
- parsePrivateName() {
881
- const node = this.startNode();
882
- const id = this.startNodeAt((0, _location.createPositionWithColumnOffset)(this.state.startLoc, 1));
883
- const name = this.state.value;
884
- this.next();
885
- node.id = this.createIdentifier(id, name);
886
- return this.finishNode(node, "PrivateName");
887
- }
888
- parseFunctionOrFunctionSent() {
889
- const node = this.startNode();
890
- this.next();
891
- if (this.prodParam.hasYield && this.match(16)) {
892
- const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
893
- this.next();
894
- if (this.match(102)) {
895
- this.expectPlugin("functionSent");
896
- } else if (!this.hasPlugin("functionSent")) {
897
- this.unexpected();
898
- }
899
- return this.parseMetaProperty(node, meta, "sent");
900
- }
901
- return this.parseFunction(node);
902
- }
903
- parseMetaProperty(node, meta, propertyName) {
904
- node.meta = meta;
905
- const containsEsc = this.state.containsEsc;
906
- node.property = this.parseIdentifier(true);
907
- if (node.property.name !== propertyName || containsEsc) {
908
- this.raise(_parseError.Errors.UnsupportedMetaProperty, {
909
- at: node.property,
910
- target: meta.name,
911
- onlyValidPropertyName: propertyName
912
- });
913
- }
914
- return this.finishNode(node, "MetaProperty");
915
- }
916
- parseImportMetaProperty(node) {
917
- const id = this.createIdentifier(this.startNodeAtNode(node), "import");
918
- this.next();
919
- if (this.isContextual(100)) {
920
- if (!this.inModule) {
921
- this.raise(_parseError.Errors.ImportMetaOutsideModule, {
922
- at: id
923
- });
924
- }
925
- this.sawUnambiguousESM = true;
926
- }
927
- return this.parseMetaProperty(node, id, "meta");
928
- }
929
- parseLiteralAtNode(value, type, node) {
930
- this.addExtra(node, "rawValue", value);
931
- this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
932
- node.value = value;
933
- this.next();
934
- return this.finishNode(node, type);
935
- }
936
- parseLiteral(value, type) {
937
- const node = this.startNode();
938
- return this.parseLiteralAtNode(value, type, node);
939
- }
940
- parseStringLiteral(value) {
941
- return this.parseLiteral(value, "StringLiteral");
942
- }
943
- parseNumericLiteral(value) {
944
- return this.parseLiteral(value, "NumericLiteral");
945
- }
946
- parseBigIntLiteral(value) {
947
- return this.parseLiteral(value, "BigIntLiteral");
948
- }
949
- parseDecimalLiteral(value) {
950
- return this.parseLiteral(value, "DecimalLiteral");
951
- }
952
- parseRegExpLiteral(value) {
953
- const node = this.parseLiteral(value.value, "RegExpLiteral");
954
- node.pattern = value.pattern;
955
- node.flags = value.flags;
956
- return node;
957
- }
958
- parseBooleanLiteral(value) {
959
- const node = this.startNode();
960
- node.value = value;
961
- this.next();
962
- return this.finishNode(node, "BooleanLiteral");
963
- }
964
- parseNullLiteral() {
965
- const node = this.startNode();
966
- this.next();
967
- return this.finishNode(node, "NullLiteral");
968
- }
969
- parseParenAndDistinguishExpression(canBeArrow) {
970
- const startLoc = this.state.startLoc;
971
- let val;
972
- this.next();
973
- this.expressionScope.enter((0, _expressionScope.newArrowHeadScope)());
974
- const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
975
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
976
- this.state.maybeInArrowParameters = true;
977
- this.state.inFSharpPipelineDirectBody = false;
978
- const innerStartLoc = this.state.startLoc;
979
- const exprList = [];
980
- const refExpressionErrors = new _util.ExpressionErrors();
981
- let first = true;
982
- let spreadStartLoc;
983
- let optionalCommaStartLoc;
984
- while (!this.match(11)) {
985
- if (first) {
986
- first = false;
987
- } else {
988
- this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc);
989
- if (this.match(11)) {
990
- optionalCommaStartLoc = this.state.startLoc;
991
- break;
992
- }
993
- }
994
- if (this.match(21)) {
995
- const spreadNodeStartLoc = this.state.startLoc;
996
- spreadStartLoc = this.state.startLoc;
997
- exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc));
998
- if (!this.checkCommaAfterRest(41)) {
999
- break;
1000
- }
1001
- } else {
1002
- exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem));
1003
- }
1004
- }
1005
- const innerEndLoc = this.state.lastTokEndLoc;
1006
- this.expect(11);
1007
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
1008
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
1009
- let arrowNode = this.startNodeAt(startLoc);
1010
- if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) {
1011
- this.checkDestructuringPrivate(refExpressionErrors);
1012
- this.expressionScope.validateAsPattern();
1013
- this.expressionScope.exit();
1014
- this.parseArrowExpression(arrowNode, exprList, false);
1015
- return arrowNode;
1016
- }
1017
- this.expressionScope.exit();
1018
- if (!exprList.length) {
1019
- this.unexpected(this.state.lastTokStartLoc);
1020
- }
1021
- if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc);
1022
- if (spreadStartLoc) this.unexpected(spreadStartLoc);
1023
- this.checkExpressionErrors(refExpressionErrors, true);
1024
- this.toReferencedListDeep(exprList, true);
1025
- if (exprList.length > 1) {
1026
- val = this.startNodeAt(innerStartLoc);
1027
- val.expressions = exprList;
1028
- this.finishNode(val, "SequenceExpression");
1029
- this.resetEndLocation(val, innerEndLoc);
1030
- } else {
1031
- val = exprList[0];
1032
- }
1033
- return this.wrapParenthesis(startLoc, val);
1034
- }
1035
- wrapParenthesis(startLoc, expression) {
1036
- if (!this.options.createParenthesizedExpressions) {
1037
- this.addExtra(expression, "parenthesized", true);
1038
- this.addExtra(expression, "parenStart", startLoc.index);
1039
- this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index);
1040
- return expression;
1041
- }
1042
- const parenExpression = this.startNodeAt(startLoc);
1043
- parenExpression.expression = expression;
1044
- return this.finishNode(parenExpression, "ParenthesizedExpression");
1045
- }
1046
- shouldParseArrow(params) {
1047
- return !this.canInsertSemicolon();
1048
- }
1049
- parseArrow(node) {
1050
- if (this.eat(19)) {
1051
- return node;
1052
- }
1053
- }
1054
- parseParenItem(node, startLoc) {
1055
- return node;
1056
- }
1057
- parseNewOrNewTarget() {
1058
- const node = this.startNode();
1059
- this.next();
1060
- if (this.match(16)) {
1061
- const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
1062
- this.next();
1063
- const metaProp = this.parseMetaProperty(node, meta, "target");
1064
- if (!this.scope.inNonArrowFunction && !this.scope.inClass && !this.options.allowNewTargetOutsideFunction) {
1065
- this.raise(_parseError.Errors.UnexpectedNewTarget, {
1066
- at: metaProp
1067
- });
1068
- }
1069
- return metaProp;
1070
- }
1071
- return this.parseNew(node);
1072
- }
1073
- parseNew(node) {
1074
- this.parseNewCallee(node);
1075
- if (this.eat(10)) {
1076
- const args = this.parseExprList(11);
1077
- this.toReferencedList(args);
1078
- node.arguments = args;
1079
- } else {
1080
- node.arguments = [];
1081
- }
1082
- return this.finishNode(node, "NewExpression");
1083
- }
1084
- parseNewCallee(node) {
1085
- node.callee = this.parseNoCallExpr();
1086
- if (node.callee.type === "Import") {
1087
- this.raise(_parseError.Errors.ImportCallNotNewExpression, {
1088
- at: node.callee
1089
- });
1090
- }
1091
- }
1092
- parseTemplateElement(isTagged) {
1093
- const {
1094
- start,
1095
- startLoc,
1096
- end,
1097
- value
1098
- } = this.state;
1099
- const elemStart = start + 1;
1100
- const elem = this.startNodeAt((0, _location.createPositionWithColumnOffset)(startLoc, 1));
1101
- if (value === null) {
1102
- if (!isTagged) {
1103
- this.raise(_parseError.Errors.InvalidEscapeSequenceTemplate, {
1104
- at: (0, _location.createPositionWithColumnOffset)(this.state.firstInvalidTemplateEscapePos, 1)
1105
- });
1106
- }
1107
- }
1108
- const isTail = this.match(24);
1109
- const endOffset = isTail ? -1 : -2;
1110
- const elemEnd = end + endOffset;
1111
- elem.value = {
1112
- raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"),
1113
- cooked: value === null ? null : value.slice(1, endOffset)
1114
- };
1115
- elem.tail = isTail;
1116
- this.next();
1117
- const finishedNode = this.finishNode(elem, "TemplateElement");
1118
- this.resetEndLocation(finishedNode, (0, _location.createPositionWithColumnOffset)(this.state.lastTokEndLoc, endOffset));
1119
- return finishedNode;
1120
- }
1121
- parseTemplate(isTagged) {
1122
- const node = this.startNode();
1123
- node.expressions = [];
1124
- let curElt = this.parseTemplateElement(isTagged);
1125
- node.quasis = [curElt];
1126
- while (!curElt.tail) {
1127
- node.expressions.push(this.parseTemplateSubstitution());
1128
- this.readTemplateContinuation();
1129
- node.quasis.push(curElt = this.parseTemplateElement(isTagged));
1130
- }
1131
- return this.finishNode(node, "TemplateLiteral");
1132
- }
1133
- parseTemplateSubstitution() {
1134
- return this.parseExpression();
1135
- }
1136
- parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
1137
- if (isRecord) {
1138
- this.expectPlugin("recordAndTuple");
1139
- }
1140
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
1141
- this.state.inFSharpPipelineDirectBody = false;
1142
- const propHash = Object.create(null);
1143
- let first = true;
1144
- const node = this.startNode();
1145
- node.properties = [];
1146
- this.next();
1147
- while (!this.match(close)) {
1148
- if (first) {
1149
- first = false;
1150
- } else {
1151
- this.expect(12);
1152
- if (this.match(close)) {
1153
- this.addTrailingCommaExtraToNode(node);
1154
- break;
1155
- }
1156
- }
1157
- let prop;
1158
- if (isPattern) {
1159
- prop = this.parseBindingProperty();
1160
- } else {
1161
- prop = this.parsePropertyDefinition(refExpressionErrors);
1162
- this.checkProto(prop, isRecord, propHash, refExpressionErrors);
1163
- }
1164
- if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
1165
- this.raise(_parseError.Errors.InvalidRecordProperty, {
1166
- at: prop
1167
- });
1168
- }
1169
- if (prop.shorthand) {
1170
- this.addExtra(prop, "shorthand", true);
1171
- }
1172
- node.properties.push(prop);
1173
- }
1174
- this.next();
1175
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
1176
- let type = "ObjectExpression";
1177
- if (isPattern) {
1178
- type = "ObjectPattern";
1179
- } else if (isRecord) {
1180
- type = "RecordExpression";
1181
- }
1182
- return this.finishNode(node, type);
1183
- }
1184
- addTrailingCommaExtraToNode(node) {
1185
- this.addExtra(node, "trailingComma", this.state.lastTokStart);
1186
- this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false);
1187
- }
1188
- maybeAsyncOrAccessorProp(prop) {
1189
- return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55));
1190
- }
1191
- parsePropertyDefinition(refExpressionErrors) {
1192
- let decorators = [];
1193
- if (this.match(26)) {
1194
- if (this.hasPlugin("decorators")) {
1195
- this.raise(_parseError.Errors.UnsupportedPropertyDecorator, {
1196
- at: this.state.startLoc
1197
- });
1198
- }
1199
- while (this.match(26)) {
1200
- decorators.push(this.parseDecorator());
1201
- }
1202
- }
1203
- const prop = this.startNode();
1204
- let isAsync = false;
1205
- let isAccessor = false;
1206
- let startLoc;
1207
- if (this.match(21)) {
1208
- if (decorators.length) this.unexpected();
1209
- return this.parseSpread();
1210
- }
1211
- if (decorators.length) {
1212
- prop.decorators = decorators;
1213
- decorators = [];
1214
- }
1215
- prop.method = false;
1216
- if (refExpressionErrors) {
1217
- startLoc = this.state.startLoc;
1218
- }
1219
- let isGenerator = this.eat(55);
1220
- this.parsePropertyNamePrefixOperator(prop);
1221
- const containsEsc = this.state.containsEsc;
1222
- const key = this.parsePropertyName(prop, refExpressionErrors);
1223
- if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
1224
- const keyName = key.name;
1225
- if (keyName === "async" && !this.hasPrecedingLineBreak()) {
1226
- isAsync = true;
1227
- this.resetPreviousNodeTrailingComments(key);
1228
- isGenerator = this.eat(55);
1229
- this.parsePropertyName(prop);
1230
- }
1231
- if (keyName === "get" || keyName === "set") {
1232
- isAccessor = true;
1233
- this.resetPreviousNodeTrailingComments(key);
1234
- prop.kind = keyName;
1235
- if (this.match(55)) {
1236
- isGenerator = true;
1237
- this.raise(_parseError.Errors.AccessorIsGenerator, {
1238
- at: this.state.curPosition(),
1239
- kind: keyName
1240
- });
1241
- this.next();
1242
- }
1243
- this.parsePropertyName(prop);
1244
- }
1245
- }
1246
- return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors);
1247
- }
1248
- getGetterSetterExpectedParamCount(method) {
1249
- return method.kind === "get" ? 0 : 1;
1250
- }
1251
- getObjectOrClassMethodParams(method) {
1252
- return method.params;
1253
- }
1254
- checkGetterSetterParams(method) {
1255
- var _params;
1256
- const paramCount = this.getGetterSetterExpectedParamCount(method);
1257
- const params = this.getObjectOrClassMethodParams(method);
1258
- if (params.length !== paramCount) {
1259
- this.raise(method.kind === "get" ? _parseError.Errors.BadGetterArity : _parseError.Errors.BadSetterArity, {
1260
- at: method
1261
- });
1262
- }
1263
- if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
1264
- this.raise(_parseError.Errors.BadSetterRestParameter, {
1265
- at: method
1266
- });
1267
- }
1268
- }
1269
- parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
1270
- if (isAccessor) {
1271
- const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
1272
- this.checkGetterSetterParams(finishedProp);
1273
- return finishedProp;
1274
- }
1275
- if (isAsync || isGenerator || this.match(10)) {
1276
- if (isPattern) this.unexpected();
1277
- prop.kind = "method";
1278
- prop.method = true;
1279
- return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
1280
- }
1281
- }
1282
- parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) {
1283
- prop.shorthand = false;
1284
- if (this.eat(14)) {
1285
- prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
1286
- return this.finishNode(prop, "ObjectProperty");
1287
- }
1288
- if (!prop.computed && prop.key.type === "Identifier") {
1289
- this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false);
1290
- if (isPattern) {
1291
- prop.value = this.parseMaybeDefault(startLoc, (0, _node.cloneIdentifier)(prop.key));
1292
- } else if (this.match(29)) {
1293
- const shorthandAssignLoc = this.state.startLoc;
1294
- if (refExpressionErrors != null) {
1295
- if (refExpressionErrors.shorthandAssignLoc === null) {
1296
- refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc;
1297
- }
1298
- } else {
1299
- this.raise(_parseError.Errors.InvalidCoverInitializedName, {
1300
- at: shorthandAssignLoc
1301
- });
1302
- }
1303
- prop.value = this.parseMaybeDefault(startLoc, (0, _node.cloneIdentifier)(prop.key));
1304
- } else {
1305
- prop.value = (0, _node.cloneIdentifier)(prop.key);
1306
- }
1307
- prop.shorthand = true;
1308
- return this.finishNode(prop, "ObjectProperty");
1309
- }
1310
- }
1311
- parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
1312
- const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors);
1313
- if (!node) this.unexpected();
1314
- return node;
1315
- }
1316
- parsePropertyName(prop, refExpressionErrors) {
1317
- if (this.eat(0)) {
1318
- prop.computed = true;
1319
- prop.key = this.parseMaybeAssignAllowIn();
1320
- this.expect(3);
1321
- } else {
1322
- const {
1323
- type,
1324
- value
1325
- } = this.state;
1326
- let key;
1327
- if ((0, _types.tokenIsKeywordOrIdentifier)(type)) {
1328
- key = this.parseIdentifier(true);
1329
- } else {
1330
- switch (type) {
1331
- case 132:
1332
- key = this.parseNumericLiteral(value);
1333
- break;
1334
- case 131:
1335
- key = this.parseStringLiteral(value);
1336
- break;
1337
- case 133:
1338
- key = this.parseBigIntLiteral(value);
1339
- break;
1340
- case 134:
1341
- key = this.parseDecimalLiteral(value);
1342
- break;
1343
- case 136:
1344
- {
1345
- const privateKeyLoc = this.state.startLoc;
1346
- if (refExpressionErrors != null) {
1347
- if (refExpressionErrors.privateKeyLoc === null) {
1348
- refExpressionErrors.privateKeyLoc = privateKeyLoc;
1349
- }
1350
- } else {
1351
- this.raise(_parseError.Errors.UnexpectedPrivateField, {
1352
- at: privateKeyLoc
1353
- });
1354
- }
1355
- key = this.parsePrivateName();
1356
- break;
1357
- }
1358
- default:
1359
- this.unexpected();
1360
- }
1361
- }
1362
- prop.key = key;
1363
- if (type !== 136) {
1364
- prop.computed = false;
1365
- }
1366
- }
1367
- return prop.key;
1368
- }
1369
- initFunction(node, isAsync) {
1370
- node.id = null;
1371
- node.generator = false;
1372
- node.async = isAsync;
1373
- }
1374
- parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
1375
- this.initFunction(node, isAsync);
1376
- node.generator = isGenerator;
1377
- this.scope.enter(_scopeflags.ScopeFlag.FUNCTION | _scopeflags.ScopeFlag.SUPER | (inClassScope ? _scopeflags.ScopeFlag.CLASS : 0) | (allowDirectSuper ? _scopeflags.ScopeFlag.DIRECT_SUPER : 0));
1378
- this.prodParam.enter((0, _productionParameter.functionFlags)(isAsync, node.generator));
1379
- this.parseFunctionParams(node, isConstructor);
1380
- const finishedNode = this.parseFunctionBodyAndFinish(node, type, true);
1381
- this.prodParam.exit();
1382
- this.scope.exit();
1383
- return finishedNode;
1384
- }
1385
- parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
1386
- if (isTuple) {
1387
- this.expectPlugin("recordAndTuple");
1388
- }
1389
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
1390
- this.state.inFSharpPipelineDirectBody = false;
1391
- const node = this.startNode();
1392
- this.next();
1393
- node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
1394
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
1395
- return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
1396
- }
1397
- parseArrowExpression(node, params, isAsync, trailingCommaLoc) {
1398
- this.scope.enter(_scopeflags.ScopeFlag.FUNCTION | _scopeflags.ScopeFlag.ARROW);
1399
- let flags = (0, _productionParameter.functionFlags)(isAsync, false);
1400
- if (!this.match(5) && this.prodParam.hasIn) {
1401
- flags |= _productionParameter.PARAM_IN;
1402
- }
1403
- this.prodParam.enter(flags);
1404
- this.initFunction(node, isAsync);
1405
- const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
1406
- if (params) {
1407
- this.state.maybeInArrowParameters = true;
1408
- this.setArrowFunctionParameters(node, params, trailingCommaLoc);
1409
- }
1410
- this.state.maybeInArrowParameters = false;
1411
- this.parseFunctionBody(node, true);
1412
- this.prodParam.exit();
1413
- this.scope.exit();
1414
- this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
1415
- return this.finishNode(node, "ArrowFunctionExpression");
1416
- }
1417
- setArrowFunctionParameters(node, params, trailingCommaLoc) {
1418
- this.toAssignableList(params, trailingCommaLoc, false);
1419
- node.params = params;
1420
- }
1421
- parseFunctionBodyAndFinish(node, type, isMethod = false) {
1422
- this.parseFunctionBody(node, false, isMethod);
1423
- return this.finishNode(node, type);
1424
- }
1425
- parseFunctionBody(node, allowExpression, isMethod = false) {
1426
- const isExpression = allowExpression && !this.match(5);
1427
- this.expressionScope.enter((0, _expressionScope.newExpressionScope)());
1428
- if (isExpression) {
1429
- node.body = this.parseMaybeAssign();
1430
- this.checkParams(node, false, allowExpression, false);
1431
- } else {
1432
- const oldStrict = this.state.strict;
1433
- const oldLabels = this.state.labels;
1434
- this.state.labels = [];
1435
- this.prodParam.enter(this.prodParam.currentFlags() | _productionParameter.PARAM_RETURN);
1436
- node.body = this.parseBlock(true, false, hasStrictModeDirective => {
1437
- const nonSimple = !this.isSimpleParamList(node.params);
1438
- if (hasStrictModeDirective && nonSimple) {
1439
- this.raise(_parseError.Errors.IllegalLanguageModeDirective, {
1440
- at: (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node
1441
- });
1442
- }
1443
- const strictModeChanged = !oldStrict && this.state.strict;
1444
- this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
1445
- if (this.state.strict && node.id) {
1446
- this.checkIdentifier(node.id, _scopeflags.BindingFlag.TYPE_OUTSIDE, strictModeChanged);
1447
- }
1448
- });
1449
- this.prodParam.exit();
1450
- this.state.labels = oldLabels;
1451
- }
1452
- this.expressionScope.exit();
1453
- }
1454
- isSimpleParameter(node) {
1455
- return node.type === "Identifier";
1456
- }
1457
- isSimpleParamList(params) {
1458
- for (let i = 0, len = params.length; i < len; i++) {
1459
- if (!this.isSimpleParameter(params[i])) return false;
1460
- }
1461
- return true;
1462
- }
1463
- checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
1464
- const checkClashes = !allowDuplicates && new Set();
1465
- const formalParameters = {
1466
- type: "FormalParameters"
1467
- };
1468
- for (const param of node.params) {
1469
- this.checkLVal(param, {
1470
- in: formalParameters,
1471
- binding: _scopeflags.BindingFlag.TYPE_VAR,
1472
- checkClashes,
1473
- strictModeChanged
1474
- });
1475
- }
1476
- }
1477
- parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
1478
- const elts = [];
1479
- let first = true;
1480
- while (!this.eat(close)) {
1481
- if (first) {
1482
- first = false;
1483
- } else {
1484
- this.expect(12);
1485
- if (this.match(close)) {
1486
- if (nodeForExtra) {
1487
- this.addTrailingCommaExtraToNode(nodeForExtra);
1488
- }
1489
- this.next();
1490
- break;
1491
- }
1492
- }
1493
- elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
1494
- }
1495
- return elts;
1496
- }
1497
- parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) {
1498
- let elt;
1499
- if (this.match(12)) {
1500
- if (!allowEmpty) {
1501
- this.raise(_parseError.Errors.UnexpectedToken, {
1502
- at: this.state.curPosition(),
1503
- unexpected: ","
1504
- });
1505
- }
1506
- elt = null;
1507
- } else if (this.match(21)) {
1508
- const spreadNodeStartLoc = this.state.startLoc;
1509
- elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc);
1510
- } else if (this.match(17)) {
1511
- this.expectPlugin("partialApplication");
1512
- if (!allowPlaceholder) {
1513
- this.raise(_parseError.Errors.UnexpectedArgumentPlaceholder, {
1514
- at: this.state.startLoc
1515
- });
1516
- }
1517
- const node = this.startNode();
1518
- this.next();
1519
- elt = this.finishNode(node, "ArgumentPlaceholder");
1520
- } else {
1521
- elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem);
1522
- }
1523
- return elt;
1524
- }
1525
- parseIdentifier(liberal) {
1526
- const node = this.startNode();
1527
- const name = this.parseIdentifierName(liberal);
1528
- return this.createIdentifier(node, name);
1529
- }
1530
- createIdentifier(node, name) {
1531
- node.name = name;
1532
- node.loc.identifierName = name;
1533
- return this.finishNode(node, "Identifier");
1534
- }
1535
- parseIdentifierName(liberal) {
1536
- let name;
1537
- const {
1538
- startLoc,
1539
- type
1540
- } = this.state;
1541
- if ((0, _types.tokenIsKeywordOrIdentifier)(type)) {
1542
- name = this.state.value;
1543
- } else {
1544
- this.unexpected();
1545
- }
1546
- const tokenIsKeyword = (0, _types.tokenKeywordOrIdentifierIsKeyword)(type);
1547
- if (liberal) {
1548
- if (tokenIsKeyword) {
1549
- this.replaceToken(130);
1550
- }
1551
- } else {
1552
- this.checkReservedWord(name, startLoc, tokenIsKeyword, false);
1553
- }
1554
- this.next();
1555
- return name;
1556
- }
1557
- checkReservedWord(word, startLoc, checkKeywords, isBinding) {
1558
- if (word.length > 10) {
1559
- return;
1560
- }
1561
- if (!(0, _identifier.canBeReservedWord)(word)) {
1562
- return;
1563
- }
1564
- if (checkKeywords && (0, _identifier.isKeyword)(word)) {
1565
- this.raise(_parseError.Errors.UnexpectedKeyword, {
1566
- at: startLoc,
1567
- keyword: word
1568
- });
1569
- return;
1570
- }
1571
- const reservedTest = !this.state.strict ? _identifier.isReservedWord : isBinding ? _identifier.isStrictBindReservedWord : _identifier.isStrictReservedWord;
1572
- if (reservedTest(word, this.inModule)) {
1573
- this.raise(_parseError.Errors.UnexpectedReservedWord, {
1574
- at: startLoc,
1575
- reservedWord: word
1576
- });
1577
- return;
1578
- } else if (word === "yield") {
1579
- if (this.prodParam.hasYield) {
1580
- this.raise(_parseError.Errors.YieldBindingIdentifier, {
1581
- at: startLoc
1582
- });
1583
- return;
1584
- }
1585
- } else if (word === "await") {
1586
- if (this.prodParam.hasAwait) {
1587
- this.raise(_parseError.Errors.AwaitBindingIdentifier, {
1588
- at: startLoc
1589
- });
1590
- return;
1591
- }
1592
- if (this.scope.inStaticBlock) {
1593
- this.raise(_parseError.Errors.AwaitBindingIdentifierInStaticBlock, {
1594
- at: startLoc
1595
- });
1596
- return;
1597
- }
1598
- this.expressionScope.recordAsyncArrowParametersError({
1599
- at: startLoc
1600
- });
1601
- } else if (word === "arguments") {
1602
- if (this.scope.inClassAndNotInNonArrowFunction) {
1603
- this.raise(_parseError.Errors.ArgumentsInClass, {
1604
- at: startLoc
1605
- });
1606
- return;
1607
- }
1608
- }
1609
- }
1610
- isAwaitAllowed() {
1611
- if (this.prodParam.hasAwait) return true;
1612
- if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
1613
- return true;
1614
- }
1615
- return false;
1616
- }
1617
- parseAwait(startLoc) {
1618
- const node = this.startNodeAt(startLoc);
1619
- this.expressionScope.recordParameterInitializerError(_parseError.Errors.AwaitExpressionFormalParameter, {
1620
- at: node
1621
- });
1622
- if (this.eat(55)) {
1623
- this.raise(_parseError.Errors.ObsoleteAwaitStar, {
1624
- at: node
1625
- });
1626
- }
1627
- if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
1628
- if (this.isAmbiguousAwait()) {
1629
- this.ambiguousScriptDifferentAst = true;
1630
- } else {
1631
- this.sawUnambiguousESM = true;
1632
- }
1633
- }
1634
- if (!this.state.soloAwait) {
1635
- node.argument = this.parseMaybeUnary(null, true);
1636
- }
1637
- return this.finishNode(node, "AwaitExpression");
1638
- }
1639
- isAmbiguousAwait() {
1640
- if (this.hasPrecedingLineBreak()) return true;
1641
- const {
1642
- type
1643
- } = this.state;
1644
- return type === 53 || type === 10 || type === 0 || (0, _types.tokenIsTemplate)(type) || type === 101 && !this.state.containsEsc || type === 135 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
1645
- }
1646
- parseYield() {
1647
- const node = this.startNode();
1648
- this.expressionScope.recordParameterInitializerError(_parseError.Errors.YieldInParameter, {
1649
- at: node
1650
- });
1651
- this.next();
1652
- let delegating = false;
1653
- let argument = null;
1654
- if (!this.hasPrecedingLineBreak()) {
1655
- delegating = this.eat(55);
1656
- switch (this.state.type) {
1657
- case 13:
1658
- case 137:
1659
- case 8:
1660
- case 11:
1661
- case 3:
1662
- case 9:
1663
- case 14:
1664
- case 12:
1665
- if (!delegating) break;
1666
- default:
1667
- argument = this.parseMaybeAssign();
1668
- }
1669
- }
1670
- node.delegate = delegating;
1671
- node.argument = argument;
1672
- return this.finishNode(node, "YieldExpression");
1673
- }
1674
- checkPipelineAtInfixOperator(left, leftStartLoc) {
1675
- if (this.hasPlugin(["pipelineOperator", {
1676
- proposal: "smart"
1677
- }])) {
1678
- if (left.type === "SequenceExpression") {
1679
- this.raise(_parseError.Errors.PipelineHeadSequenceExpression, {
1680
- at: leftStartLoc
1681
- });
1682
- }
1683
- }
1684
- }
1685
- parseSmartPipelineBodyInStyle(childExpr, startLoc) {
1686
- if (this.isSimpleReference(childExpr)) {
1687
- const bodyNode = this.startNodeAt(startLoc);
1688
- bodyNode.callee = childExpr;
1689
- return this.finishNode(bodyNode, "PipelineBareFunction");
1690
- } else {
1691
- const bodyNode = this.startNodeAt(startLoc);
1692
- this.checkSmartPipeTopicBodyEarlyErrors(startLoc);
1693
- bodyNode.expression = childExpr;
1694
- return this.finishNode(bodyNode, "PipelineTopicExpression");
1695
- }
1696
- }
1697
- isSimpleReference(expression) {
1698
- switch (expression.type) {
1699
- case "MemberExpression":
1700
- return !expression.computed && this.isSimpleReference(expression.object);
1701
- case "Identifier":
1702
- return true;
1703
- default:
1704
- return false;
1705
- }
1706
- }
1707
- checkSmartPipeTopicBodyEarlyErrors(startLoc) {
1708
- if (this.match(19)) {
1709
- throw this.raise(_parseError.Errors.PipelineBodyNoArrow, {
1710
- at: this.state.startLoc
1711
- });
1712
- }
1713
- if (!this.topicReferenceWasUsedInCurrentContext()) {
1714
- this.raise(_parseError.Errors.PipelineTopicUnused, {
1715
- at: startLoc
1716
- });
1717
- }
1718
- }
1719
- withTopicBindingContext(callback) {
1720
- const outerContextTopicState = this.state.topicContext;
1721
- this.state.topicContext = {
1722
- maxNumOfResolvableTopics: 1,
1723
- maxTopicIndex: null
1724
- };
1725
- try {
1726
- return callback();
1727
- } finally {
1728
- this.state.topicContext = outerContextTopicState;
1729
- }
1730
- }
1731
- withSmartMixTopicForbiddingContext(callback) {
1732
- if (this.hasPlugin(["pipelineOperator", {
1733
- proposal: "smart"
1734
- }])) {
1735
- const outerContextTopicState = this.state.topicContext;
1736
- this.state.topicContext = {
1737
- maxNumOfResolvableTopics: 0,
1738
- maxTopicIndex: null
1739
- };
1740
- try {
1741
- return callback();
1742
- } finally {
1743
- this.state.topicContext = outerContextTopicState;
1744
- }
1745
- } else {
1746
- return callback();
1747
- }
1748
- }
1749
- withSoloAwaitPermittingContext(callback) {
1750
- const outerContextSoloAwaitState = this.state.soloAwait;
1751
- this.state.soloAwait = true;
1752
- try {
1753
- return callback();
1754
- } finally {
1755
- this.state.soloAwait = outerContextSoloAwaitState;
1756
- }
1757
- }
1758
- allowInAnd(callback) {
1759
- const flags = this.prodParam.currentFlags();
1760
- const prodParamToSet = _productionParameter.PARAM_IN & ~flags;
1761
- if (prodParamToSet) {
1762
- this.prodParam.enter(flags | _productionParameter.PARAM_IN);
1763
- try {
1764
- return callback();
1765
- } finally {
1766
- this.prodParam.exit();
1767
- }
1768
- }
1769
- return callback();
1770
- }
1771
- disallowInAnd(callback) {
1772
- const flags = this.prodParam.currentFlags();
1773
- const prodParamToClear = _productionParameter.PARAM_IN & flags;
1774
- if (prodParamToClear) {
1775
- this.prodParam.enter(flags & ~_productionParameter.PARAM_IN);
1776
- try {
1777
- return callback();
1778
- } finally {
1779
- this.prodParam.exit();
1780
- }
1781
- }
1782
- return callback();
1783
- }
1784
- registerTopicReference() {
1785
- this.state.topicContext.maxTopicIndex = 0;
1786
- }
1787
- topicReferenceIsAllowedInCurrentContext() {
1788
- return this.state.topicContext.maxNumOfResolvableTopics >= 1;
1789
- }
1790
- topicReferenceWasUsedInCurrentContext() {
1791
- return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
1792
- }
1793
- parseFSharpPipelineBody(prec) {
1794
- const startLoc = this.state.startLoc;
1795
- this.state.potentialArrowAt = this.state.start;
1796
- const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
1797
- this.state.inFSharpPipelineDirectBody = true;
1798
- const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec);
1799
- this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
1800
- return ret;
1801
- }
1802
- parseModuleExpression() {
1803
- this.expectPlugin("moduleBlocks");
1804
- const node = this.startNode();
1805
- this.next();
1806
- if (!this.match(5)) {
1807
- this.unexpected(null, 5);
1808
- }
1809
- const program = this.startNodeAt(this.state.endLoc);
1810
- this.next();
1811
- const revertScopes = this.initializeScopes(true);
1812
- this.enterInitialScopes();
1813
- try {
1814
- node.body = this.parseProgram(program, 8, "module");
1815
- } finally {
1816
- revertScopes();
1817
- }
1818
- return this.finishNode(node, "ModuleExpression");
1819
- }
1820
- parsePropertyNamePrefixOperator(prop) {}
1821
- }
1822
- exports.default = ExpressionParser;
1823
-
1824
- //# sourceMappingURL=expression.js.map