isomorfeus-preact 10.5.7 → 10.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (869) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +28 -1
  3. data/lib/isomorfeus/preact/imports.rb +0 -7
  4. data/lib/isomorfeus-preact.rb +3 -0
  5. data/lib/lucid_app/context.rb +12 -12
  6. data/lib/nano_css.rb +464 -0
  7. data/lib/preact/version.rb +1 -1
  8. data/node_modules/.package-lock.json +0 -230
  9. data/package.json +0 -1
  10. metadata +5 -863
  11. data/node_modules/.bin/loose-envify +0 -12
  12. data/node_modules/.bin/loose-envify.cmd +0 -17
  13. data/node_modules/.bin/loose-envify.ps1 +0 -28
  14. data/node_modules/@babel/runtime/LICENSE +0 -22
  15. data/node_modules/@babel/runtime/README.md +0 -19
  16. data/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -99
  17. data/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -6
  18. data/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -31
  19. data/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -12
  20. data/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -6
  21. data/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -8
  22. data/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -10
  23. data/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -57
  24. data/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -16
  25. data/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -38
  26. data/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -8
  27. data/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -8
  28. data/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -23
  29. data/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -10
  30. data/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -14
  31. data/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -8
  32. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -8
  33. data/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -8
  34. data/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -10
  35. data/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -6
  36. data/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -11
  37. data/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -11
  38. data/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -9
  39. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -10
  40. data/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -8
  41. data/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -12
  42. data/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -10
  43. data/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -9
  44. data/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -6
  45. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -14
  46. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -14
  47. data/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -15
  48. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -9
  49. data/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -6
  50. data/node_modules/@babel/runtime/helpers/construct.js +0 -26
  51. data/node_modules/@babel/runtime/helpers/createClass.js +0 -18
  52. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -61
  53. data/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -25
  54. data/node_modules/@babel/runtime/helpers/createSuper.js +0 -25
  55. data/node_modules/@babel/runtime/helpers/decorate.js +0 -401
  56. data/node_modules/@babel/runtime/helpers/defaults.js +0 -17
  57. data/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -25
  58. data/node_modules/@babel/runtime/helpers/defineProperty.js +0 -17
  59. data/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -95
  60. data/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -3
  61. data/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -28
  62. data/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -9
  63. data/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -3
  64. data/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -4
  65. data/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
  66. data/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -54
  67. data/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -13
  68. data/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -35
  69. data/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -4
  70. data/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -5
  71. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -20
  72. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -7
  73. data/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -11
  74. data/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -5
  75. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  76. data/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -5
  77. data/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -7
  78. data/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -3
  79. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -6
  80. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -6
  81. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  82. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -7
  83. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -4
  84. data/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  85. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -7
  86. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  87. data/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -3
  88. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -8
  89. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -8
  90. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -9
  91. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  92. data/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -3
  93. data/node_modules/@babel/runtime/helpers/esm/construct.js +0 -18
  94. data/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  95. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -57
  96. data/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -21
  97. data/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -19
  98. data/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -396
  99. data/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -14
  100. data/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -22
  101. data/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -14
  102. data/node_modules/@babel/runtime/helpers/esm/extends.js +0 -17
  103. data/node_modules/@babel/runtime/helpers/esm/get.js +0 -20
  104. data/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
  105. data/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -15
  106. data/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -6
  107. data/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
  108. data/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -3
  109. data/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -7
  110. data/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -5
  111. data/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -51
  112. data/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -3
  113. data/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -12
  114. data/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -3
  115. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -29
  116. data/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -14
  117. data/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -46
  118. data/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
  119. data/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -5
  120. data/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -3
  121. data/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -3
  122. data/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -3
  123. data/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -19
  124. data/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -39
  125. data/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -19
  126. data/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -14
  127. data/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
  128. data/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -11
  129. data/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -3
  130. data/node_modules/@babel/runtime/helpers/esm/set.js +0 -51
  131. data/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  132. data/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
  133. data/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -7
  134. data/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -7
  135. data/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -9
  136. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -11
  137. data/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -8
  138. data/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -3
  139. data/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -5
  140. data/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -1
  141. data/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -7
  142. data/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -7
  143. data/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -13
  144. data/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -6
  145. data/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -15
  146. data/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
  147. data/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -6
  148. data/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -37
  149. data/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -65
  150. data/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -3
  151. data/node_modules/@babel/runtime/helpers/extends.js +0 -21
  152. data/node_modules/@babel/runtime/helpers/get.js +0 -27
  153. data/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -10
  154. data/node_modules/@babel/runtime/helpers/inherits.js +0 -19
  155. data/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -10
  156. data/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -12
  157. data/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -6
  158. data/node_modules/@babel/runtime/helpers/instanceof.js +0 -10
  159. data/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -8
  160. data/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -54
  161. data/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -6
  162. data/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -15
  163. data/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -6
  164. data/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -32
  165. data/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -17
  166. data/node_modules/@babel/runtime/helpers/jsx.js +0 -50
  167. data/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -13
  168. data/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -8
  169. data/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -6
  170. data/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -6
  171. data/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -6
  172. data/node_modules/@babel/runtime/helpers/objectSpread.js +0 -23
  173. data/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -42
  174. data/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -23
  175. data/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -17
  176. data/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -16
  177. data/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -6
  178. data/node_modules/@babel/runtime/helpers/set.js +0 -55
  179. data/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -12
  180. data/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -10
  181. data/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -14
  182. data/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -14
  183. data/node_modules/@babel/runtime/helpers/superPropBase.js +0 -13
  184. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -14
  185. data/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -11
  186. data/node_modules/@babel/runtime/helpers/tdz.js +0 -6
  187. data/node_modules/@babel/runtime/helpers/temporalRef.js +0 -10
  188. data/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -4
  189. data/node_modules/@babel/runtime/helpers/toArray.js +0 -14
  190. data/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -14
  191. data/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -17
  192. data/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -11
  193. data/node_modules/@babel/runtime/helpers/typeof.js +0 -22
  194. data/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -13
  195. data/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -10
  196. data/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -45
  197. data/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -72
  198. data/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -6
  199. data/node_modules/@babel/runtime/package.json +0 -848
  200. data/node_modules/@babel/runtime/regenerator/index.js +0 -1
  201. data/node_modules/css-in-js-utils/Changelog.md +0 -16
  202. data/node_modules/css-in-js-utils/LICENSE +0 -21
  203. data/node_modules/css-in-js-utils/README.md +0 -241
  204. data/node_modules/css-in-js-utils/lib/__tests__/assignStyle-test.js +0 -117
  205. data/node_modules/css-in-js-utils/lib/__tests__/camelCaseProperty-test.js +0 -15
  206. data/node_modules/css-in-js-utils/lib/__tests__/cssifyDeclaration-test.js +0 -15
  207. data/node_modules/css-in-js-utils/lib/__tests__/cssifyObject-test.js +0 -31
  208. data/node_modules/css-in-js-utils/lib/__tests__/isPrefixedProperty-test.js +0 -19
  209. data/node_modules/css-in-js-utils/lib/__tests__/isPrefixedValue-test.js +0 -19
  210. data/node_modules/css-in-js-utils/lib/__tests__/isUnitlessProperty-test.js +0 -43
  211. data/node_modules/css-in-js-utils/lib/__tests__/normalizeProperty-test.js +0 -21
  212. data/node_modules/css-in-js-utils/lib/__tests__/resolveArrayValue-test.js +0 -17
  213. data/node_modules/css-in-js-utils/lib/__tests__/unprefixProperty-test.js +0 -19
  214. data/node_modules/css-in-js-utils/lib/__tests__/unprefixValue-test.js +0 -20
  215. data/node_modules/css-in-js-utils/lib/assignStyle.js +0 -37
  216. data/node_modules/css-in-js-utils/lib/camelCaseProperty.js +0 -15
  217. data/node_modules/css-in-js-utils/lib/cssifyDeclaration.js +0 -17
  218. data/node_modules/css-in-js-utils/lib/cssifyObject.js +0 -34
  219. data/node_modules/css-in-js-utils/lib/hyphenateProperty.js +0 -17
  220. data/node_modules/css-in-js-utils/lib/index.js +0 -71
  221. data/node_modules/css-in-js-utils/lib/isPrefixedProperty.js +0 -12
  222. data/node_modules/css-in-js-utils/lib/isPrefixedValue.js +0 -12
  223. data/node_modules/css-in-js-utils/lib/isUnitlessProperty.js +0 -64
  224. data/node_modules/css-in-js-utils/lib/normalizeProperty.js +0 -21
  225. data/node_modules/css-in-js-utils/lib/resolveArrayValue.js +0 -19
  226. data/node_modules/css-in-js-utils/lib/unprefixProperty.js +0 -13
  227. data/node_modules/css-in-js-utils/lib/unprefixValue.js +0 -16
  228. data/node_modules/css-in-js-utils/package.json +0 -56
  229. data/node_modules/css-tree/CHANGELOG.md +0 -590
  230. data/node_modules/css-tree/LICENSE +0 -19
  231. data/node_modules/css-tree/README.md +0 -130
  232. data/node_modules/css-tree/data/index.js +0 -103
  233. data/node_modules/css-tree/data/patch.json +0 -721
  234. data/node_modules/css-tree/dist/csstree.js +0 -12606
  235. data/node_modules/css-tree/dist/csstree.min.js +0 -1
  236. data/node_modules/css-tree/lib/common/List.js +0 -576
  237. data/node_modules/css-tree/lib/common/OffsetToLocation.js +0 -91
  238. data/node_modules/css-tree/lib/common/SyntaxError.js +0 -82
  239. data/node_modules/css-tree/lib/common/TokenStream.js +0 -219
  240. data/node_modules/css-tree/lib/common/adopt-buffer.js +0 -10
  241. data/node_modules/css-tree/lib/convertor/create.js +0 -28
  242. data/node_modules/css-tree/lib/convertor/index.js +0 -3
  243. data/node_modules/css-tree/lib/definition-syntax/SyntaxError.js +0 -14
  244. data/node_modules/css-tree/lib/definition-syntax/generate.js +0 -129
  245. data/node_modules/css-tree/lib/definition-syntax/index.js +0 -6
  246. data/node_modules/css-tree/lib/definition-syntax/parse.js +0 -568
  247. data/node_modules/css-tree/lib/definition-syntax/tokenizer.js +0 -55
  248. data/node_modules/css-tree/lib/definition-syntax/walk.js +0 -52
  249. data/node_modules/css-tree/lib/generator/create.js +0 -66
  250. data/node_modules/css-tree/lib/generator/index.js +0 -4
  251. data/node_modules/css-tree/lib/generator/sourceMap.js +0 -95
  252. data/node_modules/css-tree/lib/index.js +0 -1
  253. data/node_modules/css-tree/lib/lexer/Lexer.js +0 -466
  254. data/node_modules/css-tree/lib/lexer/error.js +0 -127
  255. data/node_modules/css-tree/lib/lexer/generic-an-plus-b.js +0 -236
  256. data/node_modules/css-tree/lib/lexer/generic-urange.js +0 -159
  257. data/node_modules/css-tree/lib/lexer/generic.js +0 -585
  258. data/node_modules/css-tree/lib/lexer/index.js +0 -3
  259. data/node_modules/css-tree/lib/lexer/match-graph.js +0 -455
  260. data/node_modules/css-tree/lib/lexer/match.js +0 -639
  261. data/node_modules/css-tree/lib/lexer/prepare-tokens.js +0 -73
  262. data/node_modules/css-tree/lib/lexer/search.js +0 -65
  263. data/node_modules/css-tree/lib/lexer/structure.js +0 -163
  264. data/node_modules/css-tree/lib/lexer/trace.js +0 -79
  265. data/node_modules/css-tree/lib/parser/create.js +0 -304
  266. data/node_modules/css-tree/lib/parser/index.js +0 -4
  267. data/node_modules/css-tree/lib/parser/sequence.js +0 -54
  268. data/node_modules/css-tree/lib/syntax/atrule/font-face.js +0 -8
  269. data/node_modules/css-tree/lib/syntax/atrule/import.js +0 -40
  270. data/node_modules/css-tree/lib/syntax/atrule/index.js +0 -7
  271. data/node_modules/css-tree/lib/syntax/atrule/media.js +0 -12
  272. data/node_modules/css-tree/lib/syntax/atrule/page.js +0 -12
  273. data/node_modules/css-tree/lib/syntax/atrule/supports.js +0 -89
  274. data/node_modules/css-tree/lib/syntax/config/lexer.js +0 -9
  275. data/node_modules/css-tree/lib/syntax/config/mix.js +0 -140
  276. data/node_modules/css-tree/lib/syntax/config/parser.js +0 -25
  277. data/node_modules/css-tree/lib/syntax/config/walker.js +0 -3
  278. data/node_modules/css-tree/lib/syntax/create.js +0 -77
  279. data/node_modules/css-tree/lib/syntax/function/expression.js +0 -7
  280. data/node_modules/css-tree/lib/syntax/function/var.js +0 -43
  281. data/node_modules/css-tree/lib/syntax/index.js +0 -21
  282. data/node_modules/css-tree/lib/syntax/node/AnPlusB.js +0 -297
  283. data/node_modules/css-tree/lib/syntax/node/Atrule.js +0 -107
  284. data/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js +0 -51
  285. data/node_modules/css-tree/lib/syntax/node/AttributeSelector.js +0 -165
  286. data/node_modules/css-tree/lib/syntax/node/Block.js +0 -91
  287. data/node_modules/css-tree/lib/syntax/node/Brackets.js +0 -34
  288. data/node_modules/css-tree/lib/syntax/node/CDC.js +0 -19
  289. data/node_modules/css-tree/lib/syntax/node/CDO.js +0 -19
  290. data/node_modules/css-tree/lib/syntax/node/ClassSelector.js +0 -29
  291. data/node_modules/css-tree/lib/syntax/node/Combinator.js +0 -55
  292. data/node_modules/css-tree/lib/syntax/node/Comment.js +0 -36
  293. data/node_modules/css-tree/lib/syntax/node/Declaration.js +0 -169
  294. data/node_modules/css-tree/lib/syntax/node/DeclarationList.js +0 -49
  295. data/node_modules/css-tree/lib/syntax/node/Dimension.js +0 -29
  296. data/node_modules/css-tree/lib/syntax/node/Function.js +0 -40
  297. data/node_modules/css-tree/lib/syntax/node/Hash.js +0 -26
  298. data/node_modules/css-tree/lib/syntax/node/IdSelector.js +0 -27
  299. data/node_modules/css-tree/lib/syntax/node/Identifier.js +0 -20
  300. data/node_modules/css-tree/lib/syntax/node/MediaFeature.js +0 -76
  301. data/node_modules/css-tree/lib/syntax/node/MediaQuery.js +0 -68
  302. data/node_modules/css-tree/lib/syntax/node/MediaQueryList.js +0 -36
  303. data/node_modules/css-tree/lib/syntax/node/Nth.js +0 -51
  304. data/node_modules/css-tree/lib/syntax/node/Number.js +0 -18
  305. data/node_modules/css-tree/lib/syntax/node/Operator.js +0 -21
  306. data/node_modules/css-tree/lib/syntax/node/Parentheses.js +0 -34
  307. data/node_modules/css-tree/lib/syntax/node/Percentage.js +0 -27
  308. data/node_modules/css-tree/lib/syntax/node/PseudoClassSelector.js +0 -61
  309. data/node_modules/css-tree/lib/syntax/node/PseudoElementSelector.js +0 -62
  310. data/node_modules/css-tree/lib/syntax/node/Ratio.js +0 -66
  311. data/node_modules/css-tree/lib/syntax/node/Raw.js +0 -87
  312. data/node_modules/css-tree/lib/syntax/node/Rule.js +0 -54
  313. data/node_modules/css-tree/lib/syntax/node/Selector.js +0 -32
  314. data/node_modules/css-tree/lib/syntax/node/SelectorList.js +0 -39
  315. data/node_modules/css-tree/lib/syntax/node/String.js +0 -18
  316. data/node_modules/css-tree/lib/syntax/node/StyleSheet.js +0 -81
  317. data/node_modules/css-tree/lib/syntax/node/TypeSelector.js +0 -53
  318. data/node_modules/css-tree/lib/syntax/node/UnicodeRange.js +0 -173
  319. data/node_modules/css-tree/lib/syntax/node/Url.js +0 -69
  320. data/node_modules/css-tree/lib/syntax/node/Value.js +0 -19
  321. data/node_modules/css-tree/lib/syntax/node/WhiteSpace.js +0 -26
  322. data/node_modules/css-tree/lib/syntax/node/index.js +0 -42
  323. data/node_modules/css-tree/lib/syntax/pseudo/common/nth.js +0 -9
  324. data/node_modules/css-tree/lib/syntax/pseudo/common/nthWithOfClause.js +0 -9
  325. data/node_modules/css-tree/lib/syntax/pseudo/common/selectorList.js +0 -7
  326. data/node_modules/css-tree/lib/syntax/pseudo/dir.js +0 -7
  327. data/node_modules/css-tree/lib/syntax/pseudo/has.js +0 -7
  328. data/node_modules/css-tree/lib/syntax/pseudo/index.js +0 -12
  329. data/node_modules/css-tree/lib/syntax/pseudo/lang.js +0 -7
  330. data/node_modules/css-tree/lib/syntax/pseudo/matches.js +0 -1
  331. data/node_modules/css-tree/lib/syntax/pseudo/not.js +0 -1
  332. data/node_modules/css-tree/lib/syntax/pseudo/nth-child.js +0 -1
  333. data/node_modules/css-tree/lib/syntax/pseudo/nth-last-child.js +0 -1
  334. data/node_modules/css-tree/lib/syntax/pseudo/nth-last-of-type.js +0 -1
  335. data/node_modules/css-tree/lib/syntax/pseudo/nth-of-type.js +0 -1
  336. data/node_modules/css-tree/lib/syntax/pseudo/slotted.js +0 -7
  337. data/node_modules/css-tree/lib/syntax/scope/atrulePrelude.js +0 -3
  338. data/node_modules/css-tree/lib/syntax/scope/default.js +0 -87
  339. data/node_modules/css-tree/lib/syntax/scope/index.js +0 -5
  340. data/node_modules/css-tree/lib/syntax/scope/selector.js +0 -80
  341. data/node_modules/css-tree/lib/syntax/scope/value.js +0 -5
  342. data/node_modules/css-tree/lib/tokenizer/char-code-definitions.js +0 -249
  343. data/node_modules/css-tree/lib/tokenizer/const.js +0 -40
  344. data/node_modules/css-tree/lib/tokenizer/index.js +0 -591
  345. data/node_modules/css-tree/lib/tokenizer/utils.js +0 -243
  346. data/node_modules/css-tree/lib/utils/clone.js +0 -21
  347. data/node_modules/css-tree/lib/utils/createCustomError.js +0 -17
  348. data/node_modules/css-tree/lib/utils/names.js +0 -104
  349. data/node_modules/css-tree/lib/walker/create.js +0 -284
  350. data/node_modules/css-tree/lib/walker/index.js +0 -4
  351. data/node_modules/css-tree/package.json +0 -60
  352. data/node_modules/csstype/LICENSE +0 -19
  353. data/node_modules/csstype/README.md +0 -271
  354. data/node_modules/csstype/index.d.ts +0 -20496
  355. data/node_modules/csstype/index.js.flow +0 -6313
  356. data/node_modules/csstype/package.json +0 -64
  357. data/node_modules/error-stack-parser/CHANGELOG.md +0 -53
  358. data/node_modules/error-stack-parser/LICENSE +0 -19
  359. data/node_modules/error-stack-parser/README.md +0 -44
  360. data/node_modules/error-stack-parser/dist/error-stack-parser.js +0 -202
  361. data/node_modules/error-stack-parser/dist/error-stack-parser.min.js +0 -2
  362. data/node_modules/error-stack-parser/dist/error-stack-parser.min.js.map +0 -1
  363. data/node_modules/error-stack-parser/error-stack-parser.d.ts +0 -66
  364. data/node_modules/error-stack-parser/error-stack-parser.js +0 -202
  365. data/node_modules/error-stack-parser/package.json +0 -63
  366. data/node_modules/fastest-stable-stringify/.eslintrc.yml +0 -26
  367. data/node_modules/fastest-stable-stringify/.travis.yml +0 -7
  368. data/node_modules/fastest-stable-stringify/LICENSE +0 -18
  369. data/node_modules/fastest-stable-stringify/README.md +0 -44
  370. data/node_modules/fastest-stable-stringify/benchmark/index.js +0 -32
  371. data/node_modules/fastest-stable-stringify/benchmark/test.json +0 -215
  372. data/node_modules/fastest-stable-stringify/example/key_cmp.js +0 -7
  373. data/node_modules/fastest-stable-stringify/example/nested.js +0 -3
  374. data/node_modules/fastest-stable-stringify/example/str.js +0 -3
  375. data/node_modules/fastest-stable-stringify/example/value_cmp.js +0 -7
  376. data/node_modules/fastest-stable-stringify/index.js +0 -60
  377. data/node_modules/fastest-stable-stringify/package.json +0 -54
  378. data/node_modules/fastest-stable-stringify/test/bench.js +0 -20
  379. data/node_modules/fastest-stable-stringify/test/nested.js +0 -24
  380. data/node_modules/fastest-stable-stringify/test/str.js +0 -52
  381. data/node_modules/fastest-stable-stringify/test/to-json.js +0 -22
  382. data/node_modules/hyphenate-style-name/LICENSE +0 -28
  383. data/node_modules/hyphenate-style-name/README.md +0 -28
  384. data/node_modules/hyphenate-style-name/index.cjs.js +0 -21
  385. data/node_modules/hyphenate-style-name/index.js +0 -19
  386. data/node_modules/hyphenate-style-name/package.json +0 -42
  387. data/node_modules/inline-style-prefixer/CHANGELOG.md +0 -195
  388. data/node_modules/inline-style-prefixer/LICENSE +0 -22
  389. data/node_modules/inline-style-prefixer/README.md +0 -100
  390. data/node_modules/inline-style-prefixer/es/createPrefixer.js +0 -47
  391. data/node_modules/inline-style-prefixer/es/data.js +0 -12
  392. data/node_modules/inline-style-prefixer/es/generator/generatePluginList.js +0 -21
  393. data/node_modules/inline-style-prefixer/es/generator/generatePrefixMap.js +0 -75
  394. data/node_modules/inline-style-prefixer/es/generator/index.js +0 -69
  395. data/node_modules/inline-style-prefixer/es/generator/maps/pluginMap.js +0 -108
  396. data/node_modules/inline-style-prefixer/es/generator/maps/propertyMap.js +0 -38
  397. data/node_modules/inline-style-prefixer/es/index.js +0 -26
  398. data/node_modules/inline-style-prefixer/es/plugins/backgroundClip.js +0 -7
  399. data/node_modules/inline-style-prefixer/es/plugins/calc.js +0 -11
  400. data/node_modules/inline-style-prefixer/es/plugins/crossFade.js +0 -12
  401. data/node_modules/inline-style-prefixer/es/plugins/cursor.js +0 -16
  402. data/node_modules/inline-style-prefixer/es/plugins/filter.js +0 -12
  403. data/node_modules/inline-style-prefixer/es/plugins/flex.js +0 -10
  404. data/node_modules/inline-style-prefixer/es/plugins/flexboxIE.js +0 -67
  405. data/node_modules/inline-style-prefixer/es/plugins/flexboxOld.js +0 -33
  406. data/node_modules/inline-style-prefixer/es/plugins/gradient.js +0 -14
  407. data/node_modules/inline-style-prefixer/es/plugins/grid.js +0 -129
  408. data/node_modules/inline-style-prefixer/es/plugins/imageSet.js +0 -12
  409. data/node_modules/inline-style-prefixer/es/plugins/index.js +0 -17
  410. data/node_modules/inline-style-prefixer/es/plugins/logical.js +0 -35
  411. data/node_modules/inline-style-prefixer/es/plugins/position.js +0 -5
  412. data/node_modules/inline-style-prefixer/es/plugins/sizing.js +0 -26
  413. data/node_modules/inline-style-prefixer/es/plugins/transition.js +0 -75
  414. data/node_modules/inline-style-prefixer/es/utils/addNewValuesOnly.js +0 -15
  415. data/node_modules/inline-style-prefixer/es/utils/capitalizeString.js +0 -3
  416. data/node_modules/inline-style-prefixer/es/utils/isObject.js +0 -3
  417. data/node_modules/inline-style-prefixer/es/utils/prefixProperty.js +0 -22
  418. data/node_modules/inline-style-prefixer/es/utils/prefixValue.js +0 -11
  419. data/node_modules/inline-style-prefixer/lib/createPrefixer.js +0 -66
  420. data/node_modules/inline-style-prefixer/lib/data.js +0 -17
  421. data/node_modules/inline-style-prefixer/lib/generator/generatePluginList.js +0 -32
  422. data/node_modules/inline-style-prefixer/lib/generator/generatePrefixMap.js +0 -86
  423. data/node_modules/inline-style-prefixer/lib/generator/index.js +0 -85
  424. data/node_modules/inline-style-prefixer/lib/generator/maps/pluginMap.js +0 -113
  425. data/node_modules/inline-style-prefixer/lib/generator/maps/propertyMap.js +0 -43
  426. data/node_modules/inline-style-prefixer/lib/index.js +0 -78
  427. data/node_modules/inline-style-prefixer/lib/plugins/backgroundClip.js +0 -13
  428. data/node_modules/inline-style-prefixer/lib/plugins/calc.js +0 -21
  429. data/node_modules/inline-style-prefixer/lib/plugins/crossFade.js +0 -22
  430. data/node_modules/inline-style-prefixer/lib/plugins/cursor.js +0 -22
  431. data/node_modules/inline-style-prefixer/lib/plugins/filter.js +0 -22
  432. data/node_modules/inline-style-prefixer/lib/plugins/flex.js +0 -16
  433. data/node_modules/inline-style-prefixer/lib/plugins/flexboxIE.js +0 -73
  434. data/node_modules/inline-style-prefixer/lib/plugins/flexboxOld.js +0 -39
  435. data/node_modules/inline-style-prefixer/lib/plugins/gradient.js +0 -26
  436. data/node_modules/inline-style-prefixer/lib/plugins/grid.js +0 -136
  437. data/node_modules/inline-style-prefixer/lib/plugins/imageSet.js +0 -22
  438. data/node_modules/inline-style-prefixer/lib/plugins/index.js +0 -69
  439. data/node_modules/inline-style-prefixer/lib/plugins/logical.js +0 -41
  440. data/node_modules/inline-style-prefixer/lib/plugins/position.js +0 -11
  441. data/node_modules/inline-style-prefixer/lib/plugins/sizing.js +0 -32
  442. data/node_modules/inline-style-prefixer/lib/plugins/transition.js +0 -92
  443. data/node_modules/inline-style-prefixer/lib/utils/addNewValuesOnly.js +0 -21
  444. data/node_modules/inline-style-prefixer/lib/utils/capitalizeString.js +0 -9
  445. data/node_modules/inline-style-prefixer/lib/utils/isObject.js +0 -9
  446. data/node_modules/inline-style-prefixer/lib/utils/prefixProperty.js +0 -32
  447. data/node_modules/inline-style-prefixer/lib/utils/prefixValue.js +0 -17
  448. data/node_modules/inline-style-prefixer/package.json +0 -79
  449. data/node_modules/isobject/LICENSE +0 -21
  450. data/node_modules/isobject/README.md +0 -122
  451. data/node_modules/isobject/index.d.ts +0 -5
  452. data/node_modules/isobject/index.js +0 -12
  453. data/node_modules/isobject/package.json +0 -74
  454. data/node_modules/js-tokens/CHANGELOG.md +0 -151
  455. data/node_modules/js-tokens/LICENSE +0 -21
  456. data/node_modules/js-tokens/README.md +0 -240
  457. data/node_modules/js-tokens/index.js +0 -23
  458. data/node_modules/js-tokens/package.json +0 -30
  459. data/node_modules/loose-envify/LICENSE +0 -21
  460. data/node_modules/loose-envify/README.md +0 -45
  461. data/node_modules/loose-envify/cli.js +0 -16
  462. data/node_modules/loose-envify/custom.js +0 -4
  463. data/node_modules/loose-envify/index.js +0 -3
  464. data/node_modules/loose-envify/loose-envify.js +0 -36
  465. data/node_modules/loose-envify/package.json +0 -36
  466. data/node_modules/loose-envify/replace.js +0 -65
  467. data/node_modules/mdn-data/LICENSE +0 -116
  468. data/node_modules/mdn-data/README.md +0 -56
  469. data/node_modules/mdn-data/api/index.js +0 -3
  470. data/node_modules/mdn-data/api/inheritance.json +0 -2681
  471. data/node_modules/mdn-data/api/inheritance.schema.json +0 -31
  472. data/node_modules/mdn-data/css/at-rules.json +0 -560
  473. data/node_modules/mdn-data/css/at-rules.schema.json +0 -132
  474. data/node_modules/mdn-data/css/definitions.json +0 -77
  475. data/node_modules/mdn-data/css/index.js +0 -8
  476. data/node_modules/mdn-data/css/properties.json +0 -9163
  477. data/node_modules/mdn-data/css/properties.schema.json +0 -402
  478. data/node_modules/mdn-data/css/selectors.json +0 -927
  479. data/node_modules/mdn-data/css/selectors.schema.json +0 -36
  480. data/node_modules/mdn-data/css/syntaxes.json +0 -761
  481. data/node_modules/mdn-data/css/syntaxes.schema.json +0 -15
  482. data/node_modules/mdn-data/css/types.json +0 -265
  483. data/node_modules/mdn-data/css/types.schema.json +0 -32
  484. data/node_modules/mdn-data/css/units.json +0 -199
  485. data/node_modules/mdn-data/css/units.schema.json +0 -28
  486. data/node_modules/mdn-data/index.js +0 -5
  487. data/node_modules/mdn-data/l10n/css.json +0 -1567
  488. data/node_modules/mdn-data/l10n/index.js +0 -3
  489. data/node_modules/mdn-data/package.json +0 -39
  490. data/node_modules/nano-css/.circleci/config.yml +0 -85
  491. data/node_modules/nano-css/.eslintrc.yml +0 -27
  492. data/node_modules/nano-css/.github/FUNDING.yml +0 -3
  493. data/node_modules/nano-css/.github/workflows/nodejs.yml +0 -23
  494. data/node_modules/nano-css/CHANGELOG.md +0 -362
  495. data/node_modules/nano-css/LICENSE +0 -24
  496. data/node_modules/nano-css/README.md +0 -70
  497. data/node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js +0 -25
  498. data/node_modules/nano-css/addon/__tests__/__snapshots__/reset.test.js.snap +0 -407
  499. data/node_modules/nano-css/addon/__tests__/__snapshots__/tachyons.test.js.snap +0 -43
  500. data/node_modules/nano-css/addon/__tests__/amp.server.dev.test.js +0 -6
  501. data/node_modules/nano-css/addon/__tests__/amp.server.test.js +0 -223
  502. data/node_modules/nano-css/addon/__tests__/atoms.dev.test.js +0 -5
  503. data/node_modules/nano-css/addon/__tests__/atoms.server.dev.test.js +0 -8
  504. data/node_modules/nano-css/addon/__tests__/atoms.server.test.js +0 -6
  505. data/node_modules/nano-css/addon/__tests__/atoms.test.js +0 -49
  506. data/node_modules/nano-css/addon/__tests__/cssom.server.test.js +0 -12
  507. data/node_modules/nano-css/addon/__tests__/emmet/emmet.dev.test.js +0 -5
  508. data/node_modules/nano-css/addon/__tests__/emmet/emmet.server.dev.test.js +0 -8
  509. data/node_modules/nano-css/addon/__tests__/emmet/emmet.server.test.js +0 -6
  510. data/node_modules/nano-css/addon/__tests__/emmet/emmet.test.js +0 -219
  511. data/node_modules/nano-css/addon/__tests__/env.js +0 -6
  512. data/node_modules/nano-css/addon/__tests__/extract.server.test.js +0 -159
  513. data/node_modules/nano-css/addon/__tests__/index.server.dev.test.js +0 -6
  514. data/node_modules/nano-css/addon/__tests__/index.server.test.js +0 -4
  515. data/node_modules/nano-css/addon/__tests__/index.test.js +0 -257
  516. data/node_modules/nano-css/addon/__tests__/jsx.dev.test.js +0 -5
  517. data/node_modules/nano-css/addon/__tests__/jsx.server.dev.test.js +0 -6
  518. data/node_modules/nano-css/addon/__tests__/jsx.server.test.js +0 -4
  519. data/node_modules/nano-css/addon/__tests__/jsx.test.js +0 -33
  520. data/node_modules/nano-css/addon/__tests__/keyframes.dev.test.js +0 -5
  521. data/node_modules/nano-css/addon/__tests__/keyframes.server.dev.test.js +0 -6
  522. data/node_modules/nano-css/addon/__tests__/keyframes.server.test.js +0 -4
  523. data/node_modules/nano-css/addon/__tests__/keyframes.test.js +0 -131
  524. data/node_modules/nano-css/addon/__tests__/limit.server.test.js +0 -54
  525. data/node_modules/nano-css/addon/__tests__/nesting.test.js +0 -85
  526. data/node_modules/nano-css/addon/__tests__/prefixer.test.js +0 -121
  527. data/node_modules/nano-css/addon/__tests__/put.dev.test.js +0 -5
  528. data/node_modules/nano-css/addon/__tests__/put.server.dev.test.js +0 -6
  529. data/node_modules/nano-css/addon/__tests__/put.server.test.js +0 -4
  530. data/node_modules/nano-css/addon/__tests__/put.test.js +0 -75
  531. data/node_modules/nano-css/addon/__tests__/reset.test.js +0 -38
  532. data/node_modules/nano-css/addon/__tests__/rule.dev.test.js +0 -5
  533. data/node_modules/nano-css/addon/__tests__/rule.server.dev.test.js +0 -7
  534. data/node_modules/nano-css/addon/__tests__/rule.server.test.js +0 -5
  535. data/node_modules/nano-css/addon/__tests__/rule.test.js +0 -57
  536. data/node_modules/nano-css/addon/__tests__/setup.js +0 -7
  537. data/node_modules/nano-css/addon/__tests__/sheet.test.js +0 -74
  538. data/node_modules/nano-css/addon/__tests__/snake.test.js +0 -124
  539. data/node_modules/nano-css/addon/__tests__/tachyons.test.js +0 -45
  540. data/node_modules/nano-css/addon/__tests__/units.dev.test.js +0 -5
  541. data/node_modules/nano-css/addon/__tests__/units.server.dev.test.js +0 -6
  542. data/node_modules/nano-css/addon/__tests__/units.server.test.js +0 -4
  543. data/node_modules/nano-css/addon/__tests__/units.test.js +0 -41
  544. data/node_modules/nano-css/addon/__tests__/validate.dev.test.js +0 -5
  545. data/node_modules/nano-css/addon/__tests__/validate.test.js +0 -69
  546. data/node_modules/nano-css/addon/__tests__/vcssom.server.test.js +0 -14
  547. data/node_modules/nano-css/addon/__tests__/virtual.dev.test.js +0 -5
  548. data/node_modules/nano-css/addon/__tests__/virtual.server.dev.test.js +0 -6
  549. data/node_modules/nano-css/addon/__tests__/virtual.server.test.js +0 -4
  550. data/node_modules/nano-css/addon/__tests__/virtual.test.js +0 -225
  551. data/node_modules/nano-css/addon/amp.d.ts +0 -5
  552. data/node_modules/nano-css/addon/amp.js +0 -156
  553. data/node_modules/nano-css/addon/animate/fadeIn.js +0 -22
  554. data/node_modules/nano-css/addon/animate/fadeInDown.js +0 -25
  555. data/node_modules/nano-css/addon/animate/fadeInScale.js +0 -25
  556. data/node_modules/nano-css/addon/animate/fadeOut.js +0 -23
  557. data/node_modules/nano-css/addon/animate/fadeOutScale.js +0 -21
  558. data/node_modules/nano-css/addon/array.d.ts +0 -5
  559. data/node_modules/nano-css/addon/array.js +0 -33
  560. data/node_modules/nano-css/addon/atoms.d.ts +0 -243
  561. data/node_modules/nano-css/addon/atoms.js +0 -63
  562. data/node_modules/nano-css/addon/cache.d.ts +0 -8
  563. data/node_modules/nano-css/addon/cache.js +0 -17
  564. data/node_modules/nano-css/addon/component.d.ts +0 -7
  565. data/node_modules/nano-css/addon/component.js +0 -26
  566. data/node_modules/nano-css/addon/cssom.d.ts +0 -17
  567. data/node_modules/nano-css/addon/cssom.js +0 -36
  568. data/node_modules/nano-css/addon/decorator.d.ts +0 -7
  569. data/node_modules/nano-css/addon/decorator.js +0 -43
  570. data/node_modules/nano-css/addon/drule.d.ts +0 -8
  571. data/node_modules/nano-css/addon/drule.js +0 -27
  572. data/node_modules/nano-css/addon/dsheet.d.ts +0 -8
  573. data/node_modules/nano-css/addon/dsheet.js +0 -36
  574. data/node_modules/nano-css/addon/emmet.d.ts +0 -614
  575. data/node_modules/nano-css/addon/emmet.js +0 -177
  576. data/node_modules/nano-css/addon/extract.d.ts +0 -5
  577. data/node_modules/nano-css/addon/extract.js +0 -59
  578. data/node_modules/nano-css/addon/global.d.ts +0 -8
  579. data/node_modules/nano-css/addon/global.js +0 -19
  580. data/node_modules/nano-css/addon/googleFont.d.ts +0 -8
  581. data/node_modules/nano-css/addon/googleFont.js +0 -43
  582. data/node_modules/nano-css/addon/hydrate.d.ts +0 -7
  583. data/node_modules/nano-css/addon/hydrate.js +0 -28
  584. data/node_modules/nano-css/addon/hyperstyle.js +0 -27
  585. data/node_modules/nano-css/addon/important.js +0 -38
  586. data/node_modules/nano-css/addon/jsx.js +0 -60
  587. data/node_modules/nano-css/addon/keyframes.d.ts +0 -34
  588. data/node_modules/nano-css/addon/keyframes.js +0 -61
  589. data/node_modules/nano-css/addon/limit.js +0 -26
  590. data/node_modules/nano-css/addon/nesting.js +0 -37
  591. data/node_modules/nano-css/addon/pipe.js +0 -57
  592. data/node_modules/nano-css/addon/prefixer.js +0 -79
  593. data/node_modules/nano-css/addon/ref.js +0 -87
  594. data/node_modules/nano-css/addon/reset/EricMeyer.js +0 -48
  595. data/node_modules/nano-css/addon/reset/EricMeyerCondensed.js +0 -44
  596. data/node_modules/nano-css/addon/reset/Minimalistic.js +0 -16
  597. data/node_modules/nano-css/addon/reset/Minimalistic2.js +0 -17
  598. data/node_modules/nano-css/addon/reset/Minimalistic3.js +0 -18
  599. data/node_modules/nano-css/addon/reset/Normalize.js +0 -83
  600. data/node_modules/nano-css/addon/reset/PoorMan.js +0 -25
  601. data/node_modules/nano-css/addon/reset/ShaunInman.js +0 -42
  602. data/node_modules/nano-css/addon/reset/Siolon.js +0 -34
  603. data/node_modules/nano-css/addon/reset/Tantek.js +0 -31
  604. data/node_modules/nano-css/addon/reset/Tripoli.js +0 -75
  605. data/node_modules/nano-css/addon/reset/Universal.js +0 -23
  606. data/node_modules/nano-css/addon/reset/Yahoo.js +0 -43
  607. data/node_modules/nano-css/addon/reset-font.js +0 -24
  608. data/node_modules/nano-css/addon/rtl.js +0 -15
  609. data/node_modules/nano-css/addon/rule.d.ts +0 -26
  610. data/node_modules/nano-css/addon/rule.js +0 -39
  611. data/node_modules/nano-css/addon/sheet.d.ts +0 -22
  612. data/node_modules/nano-css/addon/sheet.js +0 -45
  613. data/node_modules/nano-css/addon/snake.js +0 -141
  614. data/node_modules/nano-css/addon/sourcemaps.js +0 -96
  615. data/node_modules/nano-css/addon/spread.js +0 -23
  616. data/node_modules/nano-css/addon/stable.js +0 -7
  617. data/node_modules/nano-css/addon/style.js +0 -33
  618. data/node_modules/nano-css/addon/styled.js +0 -161
  619. data/node_modules/nano-css/addon/stylis/plugin-onRule.js +0 -43
  620. data/node_modules/nano-css/addon/stylis.js +0 -28
  621. data/node_modules/nano-css/addon/tachyons.js +0 -215
  622. data/node_modules/nano-css/addon/unitless.js +0 -78
  623. data/node_modules/nano-css/addon/units.d.ts +0 -89
  624. data/node_modules/nano-css/addon/units.js +0 -27
  625. data/node_modules/nano-css/addon/useStyles.js +0 -24
  626. data/node_modules/nano-css/addon/util/cloneElement.js +0 -11
  627. data/node_modules/nano-css/addon/util/transformComponentDynamic.js +0 -50
  628. data/node_modules/nano-css/addon/util/transformComponentStatic.js +0 -26
  629. data/node_modules/nano-css/addon/validate.js +0 -82
  630. data/node_modules/nano-css/addon/vcssom/__tests__/cssToTree.test.js +0 -159
  631. data/node_modules/nano-css/addon/vcssom/cssToTree.d.ts +0 -15
  632. data/node_modules/nano-css/addon/vcssom/cssToTree.js +0 -42
  633. data/node_modules/nano-css/addon/vcssom/removeRule.d.ts +0 -3
  634. data/node_modules/nano-css/addon/vcssom/removeRule.js +0 -15
  635. data/node_modules/nano-css/addon/vcssom.d.ts +0 -72
  636. data/node_modules/nano-css/addon/vcssom.js +0 -97
  637. data/node_modules/nano-css/addon/virtual.js +0 -107
  638. data/node_modules/nano-css/addon/withStyles.js +0 -32
  639. data/node_modules/nano-css/index.d.ts +0 -4
  640. data/node_modules/nano-css/index.js +0 -138
  641. data/node_modules/nano-css/package.json +0 -145
  642. data/node_modules/nano-css/preset/react.js +0 -43
  643. data/node_modules/nano-css/preset/sheet.d.ts +0 -5
  644. data/node_modules/nano-css/preset/sheet.js +0 -27
  645. data/node_modules/nano-css/preset/vdom.js +0 -40
  646. data/node_modules/nano-css/prettier.config.js +0 -13
  647. data/node_modules/nano-css/renovate.json +0 -3
  648. data/node_modules/nano-css/types/common.d.ts +0 -14
  649. data/node_modules/nano-css/types/demo.ts +0 -7
  650. data/node_modules/nano-css/types/nano.d.ts +0 -171
  651. data/node_modules/object-assign/index.js +0 -90
  652. data/node_modules/object-assign/license +0 -21
  653. data/node_modules/object-assign/package.json +0 -42
  654. data/node_modules/object-assign/readme.md +0 -61
  655. data/node_modules/react/LICENSE +0 -21
  656. data/node_modules/react/README.md +0 -13
  657. data/node_modules/react/build-info.json +0 -8
  658. data/node_modules/react/cjs/react-jsx-dev-runtime.development.js +0 -1203
  659. data/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +0 -9
  660. data/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +0 -9
  661. data/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1221
  662. data/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -10
  663. data/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +0 -10
  664. data/node_modules/react/cjs/react.development.js +0 -2333
  665. data/node_modules/react/cjs/react.production.min.js +0 -23
  666. data/node_modules/react/index.js +0 -7
  667. data/node_modules/react/jsx-dev-runtime.js +0 -7
  668. data/node_modules/react/jsx-runtime.js +0 -7
  669. data/node_modules/react/package.json +0 -39
  670. data/node_modules/react/umd/react.development.js +0 -3357
  671. data/node_modules/react/umd/react.production.min.js +0 -31
  672. data/node_modules/react/umd/react.profiling.min.js +0 -36
  673. data/node_modules/react-dom/LICENSE +0 -21
  674. data/node_modules/react-dom/README.md +0 -54
  675. data/node_modules/react-dom/build-info.json +0 -8
  676. data/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -4342
  677. data/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +0 -51
  678. data/node_modules/react-dom/cjs/react-dom-server.node.development.js +0 -4383
  679. data/node_modules/react-dom/cjs/react-dom-server.node.production.min.js +0 -52
  680. data/node_modules/react-dom/cjs/react-dom-test-utils.development.js +0 -2118
  681. data/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js +0 -43
  682. data/node_modules/react-dom/cjs/react-dom.development.js +0 -26262
  683. data/node_modules/react-dom/cjs/react-dom.production.min.js +0 -297
  684. data/node_modules/react-dom/cjs/react-dom.profiling.min.js +0 -310
  685. data/node_modules/react-dom/index.js +0 -38
  686. data/node_modules/react-dom/package.json +0 -49
  687. data/node_modules/react-dom/profiling.js +0 -38
  688. data/node_modules/react-dom/server.browser.js +0 -7
  689. data/node_modules/react-dom/server.js +0 -3
  690. data/node_modules/react-dom/server.node.js +0 -7
  691. data/node_modules/react-dom/test-utils.js +0 -7
  692. data/node_modules/react-dom/umd/react-dom-server.browser.development.js +0 -4341
  693. data/node_modules/react-dom/umd/react-dom-server.browser.production.min.js +0 -46
  694. data/node_modules/react-dom/umd/react-dom-test-utils.development.js +0 -2136
  695. data/node_modules/react-dom/umd/react-dom-test-utils.production.min.js +0 -35
  696. data/node_modules/react-dom/umd/react-dom.development.js +0 -26292
  697. data/node_modules/react-dom/umd/react-dom.production.min.js +0 -245
  698. data/node_modules/react-dom/umd/react-dom.profiling.min.js +0 -252
  699. data/node_modules/regenerator-runtime/LICENSE +0 -21
  700. data/node_modules/regenerator-runtime/README.md +0 -31
  701. data/node_modules/regenerator-runtime/package.json +0 -19
  702. data/node_modules/regenerator-runtime/path.js +0 -11
  703. data/node_modules/regenerator-runtime/runtime.js +0 -754
  704. data/node_modules/rtl-css-js/CHANGELOG.md +0 -5
  705. data/node_modules/rtl-css-js/LICENSE +0 -20
  706. data/node_modules/rtl-css-js/README.md +0 -205
  707. data/node_modules/rtl-css-js/core/package.json +0 -6
  708. data/node_modules/rtl-css-js/core.d.ts +0 -163
  709. data/node_modules/rtl-css-js/core.esm.d.ts +0 -1
  710. data/node_modules/rtl-css-js/core.esm.js +0 -9
  711. data/node_modules/rtl-css-js/dist/cjs/convert-a10c80e3.js +0 -509
  712. data/node_modules/rtl-css-js/dist/cjs/core.js +0 -30
  713. data/node_modules/rtl-css-js/dist/cjs/index.js +0 -7
  714. data/node_modules/rtl-css-js/dist/esm/convert-09159978.js +0 -487
  715. data/node_modules/rtl-css-js/dist/esm/core.js +0 -1
  716. data/node_modules/rtl-css-js/dist/esm/index.js +0 -5
  717. data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.js +0 -519
  718. data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.js.map +0 -1
  719. data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.min.js +0 -2
  720. data/node_modules/rtl-css-js/dist/rtl-css-js.core.umd.min.js.map +0 -1
  721. data/node_modules/rtl-css-js/dist/rtl-css-js.umd.js +0 -496
  722. data/node_modules/rtl-css-js/dist/rtl-css-js.umd.js.map +0 -1
  723. data/node_modules/rtl-css-js/dist/rtl-css-js.umd.min.js +0 -2
  724. data/node_modules/rtl-css-js/dist/rtl-css-js.umd.min.js.map +0 -1
  725. data/node_modules/rtl-css-js/package.json +0 -66
  726. data/node_modules/rtl-css-js/types.d.ts +0 -8
  727. data/node_modules/scheduler/LICENSE +0 -21
  728. data/node_modules/scheduler/README.md +0 -9
  729. data/node_modules/scheduler/build-info.json +0 -8
  730. data/node_modules/scheduler/cjs/scheduler-tracing.development.js +0 -347
  731. data/node_modules/scheduler/cjs/scheduler-tracing.production.min.js +0 -9
  732. data/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js +0 -16
  733. data/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +0 -665
  734. data/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js +0 -19
  735. data/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +0 -206
  736. data/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.min.js +0 -13
  737. data/node_modules/scheduler/cjs/scheduler.development.js +0 -646
  738. data/node_modules/scheduler/cjs/scheduler.production.min.js +0 -20
  739. data/node_modules/scheduler/index.js +0 -7
  740. data/node_modules/scheduler/package.json +0 -40
  741. data/node_modules/scheduler/tracing-profiling.js +0 -7
  742. data/node_modules/scheduler/tracing.js +0 -7
  743. data/node_modules/scheduler/umd/scheduler-tracing.development.js +0 -80
  744. data/node_modules/scheduler/umd/scheduler-tracing.production.min.js +0 -80
  745. data/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js +0 -80
  746. data/node_modules/scheduler/umd/scheduler-unstable_mock.development.js +0 -664
  747. data/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js +0 -18
  748. data/node_modules/scheduler/umd/scheduler.development.js +0 -152
  749. data/node_modules/scheduler/umd/scheduler.production.min.js +0 -146
  750. data/node_modules/scheduler/umd/scheduler.profiling.min.js +0 -146
  751. data/node_modules/scheduler/unstable_mock.js +0 -7
  752. data/node_modules/scheduler/unstable_post_task.js +0 -7
  753. data/node_modules/source-map/CHANGELOG.md +0 -301
  754. data/node_modules/source-map/LICENSE +0 -28
  755. data/node_modules/source-map/README.md +0 -742
  756. data/node_modules/source-map/dist/source-map.debug.js +0 -3234
  757. data/node_modules/source-map/dist/source-map.js +0 -3233
  758. data/node_modules/source-map/dist/source-map.min.js +0 -2
  759. data/node_modules/source-map/dist/source-map.min.js.map +0 -1
  760. data/node_modules/source-map/lib/array-set.js +0 -121
  761. data/node_modules/source-map/lib/base64-vlq.js +0 -140
  762. data/node_modules/source-map/lib/base64.js +0 -67
  763. data/node_modules/source-map/lib/binary-search.js +0 -111
  764. data/node_modules/source-map/lib/mapping-list.js +0 -79
  765. data/node_modules/source-map/lib/quick-sort.js +0 -114
  766. data/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  767. data/node_modules/source-map/lib/source-map-generator.js +0 -425
  768. data/node_modules/source-map/lib/source-node.js +0 -413
  769. data/node_modules/source-map/lib/util.js +0 -488
  770. data/node_modules/source-map/package.json +0 -73
  771. data/node_modules/source-map/source-map.d.ts +0 -98
  772. data/node_modules/source-map/source-map.js +0 -8
  773. data/node_modules/sourcemap-codec/CHANGELOG.md +0 -64
  774. data/node_modules/sourcemap-codec/LICENSE +0 -21
  775. data/node_modules/sourcemap-codec/README.md +0 -63
  776. data/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js +0 -124
  777. data/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map +0 -1
  778. data/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js +0 -135
  779. data/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map +0 -1
  780. data/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +0 -5
  781. data/node_modules/sourcemap-codec/package.json +0 -53
  782. data/node_modules/stack-generator/.eslintrc.yml +0 -32
  783. data/node_modules/stack-generator/CHANGELOG.md +0 -18
  784. data/node_modules/stack-generator/CONTRIBUTING.md +0 -27
  785. data/node_modules/stack-generator/LICENSE +0 -19
  786. data/node_modules/stack-generator/README.md +0 -28
  787. data/node_modules/stack-generator/bower.json +0 -33
  788. data/node_modules/stack-generator/component.json +0 -17
  789. data/node_modules/stack-generator/dist/stack-generator.js +0 -45
  790. data/node_modules/stack-generator/dist/stack-generator.min.js +0 -2
  791. data/node_modules/stack-generator/dist/stack-generator.min.js.map +0 -1
  792. data/node_modules/stack-generator/karma.conf.ci.js +0 -108
  793. data/node_modules/stack-generator/karma.conf.js +0 -26
  794. data/node_modules/stack-generator/package.json +0 -53
  795. data/node_modules/stack-generator/stack-generator.js +0 -45
  796. data/node_modules/stackframe/.eslintrc.yml +0 -29
  797. data/node_modules/stackframe/CHANGELOG.md +0 -39
  798. data/node_modules/stackframe/CONTRIBUTING.md +0 -28
  799. data/node_modules/stackframe/LICENSE +0 -19
  800. data/node_modules/stackframe/README.md +0 -78
  801. data/node_modules/stackframe/bower.json +0 -31
  802. data/node_modules/stackframe/component.json +0 -16
  803. data/node_modules/stackframe/dist/stackframe.js +0 -143
  804. data/node_modules/stackframe/dist/stackframe.min.js +0 -2
  805. data/node_modules/stackframe/dist/stackframe.min.js.map +0 -1
  806. data/node_modules/stackframe/karma.conf.ci.js +0 -105
  807. data/node_modules/stackframe/karma.conf.js +0 -23
  808. data/node_modules/stackframe/package.json +0 -51
  809. data/node_modules/stackframe/stackframe-tests.ts +0 -47
  810. data/node_modules/stackframe/stackframe.d.ts +0 -74
  811. data/node_modules/stackframe/stackframe.js +0 -143
  812. data/node_modules/stacktrace-gps/CHANGELOG.md +0 -60
  813. data/node_modules/stacktrace-gps/LICENSE +0 -19
  814. data/node_modules/stacktrace-gps/README.md +0 -89
  815. data/node_modules/stacktrace-gps/dist/polyfills.js +0 -5
  816. data/node_modules/stacktrace-gps/dist/stacktrace-gps-with-polyfills.min.js +0 -2
  817. data/node_modules/stacktrace-gps/dist/stacktrace-gps-with-polyfills.min.js.map +0 -1
  818. data/node_modules/stacktrace-gps/dist/stacktrace-gps.js +0 -342
  819. data/node_modules/stacktrace-gps/dist/stacktrace-gps.min.js +0 -2
  820. data/node_modules/stacktrace-gps/dist/stacktrace-gps.min.js.map +0 -1
  821. data/node_modules/stacktrace-gps/node_modules/source-map/CHANGELOG.md +0 -301
  822. data/node_modules/stacktrace-gps/node_modules/source-map/LICENSE +0 -28
  823. data/node_modules/stacktrace-gps/node_modules/source-map/README.md +0 -729
  824. data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.debug.js +0 -3056
  825. data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.js +0 -3055
  826. data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.min.js +0 -2
  827. data/node_modules/stacktrace-gps/node_modules/source-map/dist/source-map.min.js.map +0 -1
  828. data/node_modules/stacktrace-gps/node_modules/source-map/lib/array-set.js +0 -104
  829. data/node_modules/stacktrace-gps/node_modules/source-map/lib/base64-vlq.js +0 -140
  830. data/node_modules/stacktrace-gps/node_modules/source-map/lib/base64.js +0 -67
  831. data/node_modules/stacktrace-gps/node_modules/source-map/lib/binary-search.js +0 -111
  832. data/node_modules/stacktrace-gps/node_modules/source-map/lib/mapping-list.js +0 -79
  833. data/node_modules/stacktrace-gps/node_modules/source-map/lib/quick-sort.js +0 -114
  834. data/node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-consumer.js +0 -1082
  835. data/node_modules/stacktrace-gps/node_modules/source-map/lib/source-map-generator.js +0 -404
  836. data/node_modules/stacktrace-gps/node_modules/source-map/lib/source-node.js +0 -407
  837. data/node_modules/stacktrace-gps/node_modules/source-map/lib/util.js +0 -417
  838. data/node_modules/stacktrace-gps/node_modules/source-map/package.json +0 -71
  839. data/node_modules/stacktrace-gps/node_modules/source-map/source-map.js +0 -8
  840. data/node_modules/stacktrace-gps/package.json +0 -66
  841. data/node_modules/stacktrace-gps/stacktrace-gps.js +0 -342
  842. data/node_modules/stacktrace-js/CHANGELOG.md +0 -97
  843. data/node_modules/stacktrace-js/LICENSE +0 -19
  844. data/node_modules/stacktrace-js/README.md +0 -186
  845. data/node_modules/stacktrace-js/dist/stacktrace-with-promises-and-json-polyfills.js +0 -5405
  846. data/node_modules/stacktrace-js/dist/stacktrace-with-promises-and-json-polyfills.min.js +0 -3
  847. data/node_modules/stacktrace-js/dist/stacktrace-with-promises-and-json-polyfills.min.js.map +0 -1
  848. data/node_modules/stacktrace-js/dist/stacktrace.js +0 -3025
  849. data/node_modules/stacktrace-js/dist/stacktrace.min.js +0 -2
  850. data/node_modules/stacktrace-js/dist/stacktrace.min.js.map +0 -1
  851. data/node_modules/stacktrace-js/package.json +0 -82
  852. data/node_modules/stacktrace-js/stacktrace-js.d.ts +0 -134
  853. data/node_modules/stacktrace-js/stacktrace.js +0 -227
  854. data/node_modules/stylis/LICENSE +0 -21
  855. data/node_modules/stylis/README.md +0 -152
  856. data/node_modules/stylis/dist/stylis.mjs +0 -2
  857. data/node_modules/stylis/dist/stylis.mjs.map +0 -1
  858. data/node_modules/stylis/dist/umd/package.json +0 -1
  859. data/node_modules/stylis/dist/umd/stylis.js +0 -2
  860. data/node_modules/stylis/dist/umd/stylis.js.map +0 -1
  861. data/node_modules/stylis/index.js +0 -7
  862. data/node_modules/stylis/package.json +0 -164
  863. data/node_modules/stylis/src/Enum.js +0 -20
  864. data/node_modules/stylis/src/Middleware.js +0 -107
  865. data/node_modules/stylis/src/Parser.js +0 -184
  866. data/node_modules/stylis/src/Prefixer.js +0 -119
  867. data/node_modules/stylis/src/Serializer.js +0 -34
  868. data/node_modules/stylis/src/Tokenizer.js +0 -244
  869. data/node_modules/stylis/src/Utility.js +0 -109
@@ -1,2136 +0,0 @@
1
- /** @license React v17.0.2
2
- * react-dom-test-utils.development.js
3
- *
4
- * Copyright (c) Facebook, Inc. and its affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
9
- (function (global, factory) {
10
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) :
11
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) :
12
- (global = global || self, factory(global.ReactTestUtils = {}, global.React, global.ReactDOM));
13
- }(this, (function (exports, React, ReactDOM) { 'use strict';
14
-
15
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
16
- var _assign = ReactInternals.assign;
17
-
18
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
19
-
20
- // by calls to these methods by a Babel plugin.
21
- //
22
- // In PROD (or in packages without access to React internals),
23
- // they are left as they are instead.
24
-
25
- function warn(format) {
26
- {
27
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
28
- args[_key - 1] = arguments[_key];
29
- }
30
-
31
- printWarning('warn', format, args);
32
- }
33
- }
34
- function error(format) {
35
- {
36
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
37
- args[_key2 - 1] = arguments[_key2];
38
- }
39
-
40
- printWarning('error', format, args);
41
- }
42
- }
43
-
44
- function printWarning(level, format, args) {
45
- // When changing this logic, you might want to also
46
- // update consoleWithStackDev.www.js as well.
47
- {
48
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
49
- var stack = ReactDebugCurrentFrame.getStackAddendum();
50
-
51
- if (stack !== '') {
52
- format += '%s';
53
- args = args.concat([stack]);
54
- }
55
-
56
- var argsWithFormat = args.map(function (item) {
57
- return '' + item;
58
- }); // Careful: RN currently depends on this prefix
59
-
60
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
61
- // breaks IE9: https://github.com/facebook/react/issues/13610
62
- // eslint-disable-next-line react-internal/no-production-logging
63
-
64
- Function.prototype.apply.call(console[level], console, argsWithFormat);
65
- }
66
- }
67
-
68
- /**
69
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
70
- * instance (key) and the internal representation (value). This allows public
71
- * methods to accept the user facing instance as an argument and map them back
72
- * to internal methods.
73
- *
74
- * Note that this module is currently shared and assumed to be stateless.
75
- * If this becomes an actual Map, that will break.
76
- */
77
- function get(key) {
78
- return key._reactInternals;
79
- }
80
-
81
- // ATTENTION
82
- // When adding new symbols to this file,
83
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
84
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
85
- // nor polyfill, then a plain number is used for performance.
86
- var REACT_ELEMENT_TYPE = 0xeac7;
87
- var REACT_PORTAL_TYPE = 0xeaca;
88
- var REACT_FRAGMENT_TYPE = 0xeacb;
89
- var REACT_STRICT_MODE_TYPE = 0xeacc;
90
- var REACT_PROFILER_TYPE = 0xead2;
91
- var REACT_PROVIDER_TYPE = 0xeacd;
92
- var REACT_CONTEXT_TYPE = 0xeace;
93
- var REACT_FORWARD_REF_TYPE = 0xead0;
94
- var REACT_SUSPENSE_TYPE = 0xead1;
95
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
96
- var REACT_MEMO_TYPE = 0xead3;
97
- var REACT_LAZY_TYPE = 0xead4;
98
- var REACT_BLOCK_TYPE = 0xead9;
99
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
100
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
101
- var REACT_SCOPE_TYPE = 0xead7;
102
- var REACT_OPAQUE_ID_TYPE = 0xeae0;
103
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
104
- var REACT_OFFSCREEN_TYPE = 0xeae2;
105
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
106
-
107
- if (typeof Symbol === 'function' && Symbol.for) {
108
- var symbolFor = Symbol.for;
109
- REACT_ELEMENT_TYPE = symbolFor('react.element');
110
- REACT_PORTAL_TYPE = symbolFor('react.portal');
111
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
112
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
113
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
114
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
115
- REACT_CONTEXT_TYPE = symbolFor('react.context');
116
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
117
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
118
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
119
- REACT_MEMO_TYPE = symbolFor('react.memo');
120
- REACT_LAZY_TYPE = symbolFor('react.lazy');
121
- REACT_BLOCK_TYPE = symbolFor('react.block');
122
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
123
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
124
- REACT_SCOPE_TYPE = symbolFor('react.scope');
125
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
126
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
127
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
128
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
129
- }
130
-
131
- var FunctionComponent = 0;
132
- var ClassComponent = 1;
133
-
134
- var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
135
-
136
- var HostComponent = 5;
137
- var HostText = 6;
138
-
139
- // Don't change these two values. They're used by React Dev Tools.
140
- var NoFlags =
141
- /* */
142
- 0;
143
-
144
- var Placement =
145
- /* */
146
- 2;
147
- var Hydrating =
148
- /* */
149
- 1024;
150
-
151
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
152
- function getNearestMountedFiber(fiber) {
153
- var node = fiber;
154
- var nearestMounted = fiber;
155
-
156
- if (!fiber.alternate) {
157
- // If there is no alternate, this might be a new tree that isn't inserted
158
- // yet. If it is, then it will have a pending insertion effect on it.
159
- var nextNode = node;
160
-
161
- do {
162
- node = nextNode;
163
-
164
- if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
165
- // This is an insertion or in-progress hydration. The nearest possible
166
- // mounted fiber is the parent but we need to continue to figure out
167
- // if that one is still mounted.
168
- nearestMounted = node.return;
169
- }
170
-
171
- nextNode = node.return;
172
- } while (nextNode);
173
- } else {
174
- while (node.return) {
175
- node = node.return;
176
- }
177
- }
178
-
179
- if (node.tag === HostRoot) {
180
- // TODO: Check if this was a nested HostRoot when used with
181
- // renderContainerIntoSubtree.
182
- return nearestMounted;
183
- } // If we didn't hit the root, that means that we're in an disconnected tree
184
- // that has been unmounted.
185
-
186
-
187
- return null;
188
- }
189
-
190
- function assertIsMounted(fiber) {
191
- if (!(getNearestMountedFiber(fiber) === fiber)) {
192
- {
193
- throw Error( "Unable to find node on an unmounted component." );
194
- }
195
- }
196
- }
197
-
198
- function findCurrentFiberUsingSlowPath(fiber) {
199
- var alternate = fiber.alternate;
200
-
201
- if (!alternate) {
202
- // If there is no alternate, then we only need to check if it is mounted.
203
- var nearestMounted = getNearestMountedFiber(fiber);
204
-
205
- if (!(nearestMounted !== null)) {
206
- {
207
- throw Error( "Unable to find node on an unmounted component." );
208
- }
209
- }
210
-
211
- if (nearestMounted !== fiber) {
212
- return null;
213
- }
214
-
215
- return fiber;
216
- } // If we have two possible branches, we'll walk backwards up to the root
217
- // to see what path the root points to. On the way we may hit one of the
218
- // special cases and we'll deal with them.
219
-
220
-
221
- var a = fiber;
222
- var b = alternate;
223
-
224
- while (true) {
225
- var parentA = a.return;
226
-
227
- if (parentA === null) {
228
- // We're at the root.
229
- break;
230
- }
231
-
232
- var parentB = parentA.alternate;
233
-
234
- if (parentB === null) {
235
- // There is no alternate. This is an unusual case. Currently, it only
236
- // happens when a Suspense component is hidden. An extra fragment fiber
237
- // is inserted in between the Suspense fiber and its children. Skip
238
- // over this extra fragment fiber and proceed to the next parent.
239
- var nextParent = parentA.return;
240
-
241
- if (nextParent !== null) {
242
- a = b = nextParent;
243
- continue;
244
- } // If there's no parent, we're at the root.
245
-
246
-
247
- break;
248
- } // If both copies of the parent fiber point to the same child, we can
249
- // assume that the child is current. This happens when we bailout on low
250
- // priority: the bailed out fiber's child reuses the current child.
251
-
252
-
253
- if (parentA.child === parentB.child) {
254
- var child = parentA.child;
255
-
256
- while (child) {
257
- if (child === a) {
258
- // We've determined that A is the current branch.
259
- assertIsMounted(parentA);
260
- return fiber;
261
- }
262
-
263
- if (child === b) {
264
- // We've determined that B is the current branch.
265
- assertIsMounted(parentA);
266
- return alternate;
267
- }
268
-
269
- child = child.sibling;
270
- } // We should never have an alternate for any mounting node. So the only
271
- // way this could possibly happen is if this was unmounted, if at all.
272
-
273
-
274
- {
275
- {
276
- throw Error( "Unable to find node on an unmounted component." );
277
- }
278
- }
279
- }
280
-
281
- if (a.return !== b.return) {
282
- // The return pointer of A and the return pointer of B point to different
283
- // fibers. We assume that return pointers never criss-cross, so A must
284
- // belong to the child set of A.return, and B must belong to the child
285
- // set of B.return.
286
- a = parentA;
287
- b = parentB;
288
- } else {
289
- // The return pointers point to the same fiber. We'll have to use the
290
- // default, slow path: scan the child sets of each parent alternate to see
291
- // which child belongs to which set.
292
- //
293
- // Search parent A's child set
294
- var didFindChild = false;
295
- var _child = parentA.child;
296
-
297
- while (_child) {
298
- if (_child === a) {
299
- didFindChild = true;
300
- a = parentA;
301
- b = parentB;
302
- break;
303
- }
304
-
305
- if (_child === b) {
306
- didFindChild = true;
307
- b = parentA;
308
- a = parentB;
309
- break;
310
- }
311
-
312
- _child = _child.sibling;
313
- }
314
-
315
- if (!didFindChild) {
316
- // Search parent B's child set
317
- _child = parentB.child;
318
-
319
- while (_child) {
320
- if (_child === a) {
321
- didFindChild = true;
322
- a = parentB;
323
- b = parentA;
324
- break;
325
- }
326
-
327
- if (_child === b) {
328
- didFindChild = true;
329
- b = parentB;
330
- a = parentA;
331
- break;
332
- }
333
-
334
- _child = _child.sibling;
335
- }
336
-
337
- if (!didFindChild) {
338
- {
339
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
340
- }
341
- }
342
- }
343
- }
344
-
345
- if (!(a.alternate === b)) {
346
- {
347
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
348
- }
349
- }
350
- } // If the root is not a host container, we're in a disconnected tree. I.e.
351
- // unmounted.
352
-
353
-
354
- if (!(a.tag === HostRoot)) {
355
- {
356
- throw Error( "Unable to find node on an unmounted component." );
357
- }
358
- }
359
-
360
- if (a.stateNode.current === a) {
361
- // We've determined that A is the current branch.
362
- return fiber;
363
- } // Otherwise B has to be current branch.
364
-
365
-
366
- return alternate;
367
- }
368
-
369
- /**
370
- * `charCode` represents the actual "character code" and is safe to use with
371
- * `String.fromCharCode`. As such, only keys that correspond to printable
372
- * characters produce a valid `charCode`, the only exception to this is Enter.
373
- * The Tab-key is considered non-printable and does not have a `charCode`,
374
- * presumably because it does not produce a tab-character in browsers.
375
- *
376
- * @param {object} nativeEvent Native browser event.
377
- * @return {number} Normalized `charCode` property.
378
- */
379
- function getEventCharCode(nativeEvent) {
380
- var charCode;
381
- var keyCode = nativeEvent.keyCode;
382
-
383
- if ('charCode' in nativeEvent) {
384
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
385
-
386
- if (charCode === 0 && keyCode === 13) {
387
- charCode = 13;
388
- }
389
- } else {
390
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
391
- charCode = keyCode;
392
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
393
- // report Enter as charCode 10 when ctrl is pressed.
394
-
395
-
396
- if (charCode === 10) {
397
- charCode = 13;
398
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
399
- // Must not discard the (non-)printable Enter-key.
400
-
401
-
402
- if (charCode >= 32 || charCode === 13) {
403
- return charCode;
404
- }
405
-
406
- return 0;
407
- }
408
-
409
- function functionThatReturnsTrue() {
410
- return true;
411
- }
412
-
413
- function functionThatReturnsFalse() {
414
- return false;
415
- } // This is intentionally a factory so that we have different returned constructors.
416
- // If we had a single constructor, it would be megamorphic and engines would deopt.
417
-
418
-
419
- function createSyntheticEvent(Interface) {
420
- /**
421
- * Synthetic events are dispatched by event plugins, typically in response to a
422
- * top-level event delegation handler.
423
- *
424
- * These systems should generally use pooling to reduce the frequency of garbage
425
- * collection. The system should check `isPersistent` to determine whether the
426
- * event should be released into the pool after being dispatched. Users that
427
- * need a persisted event should invoke `persist`.
428
- *
429
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
430
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
431
- * DOM interface; custom application-specific events can also subclass this.
432
- */
433
- function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
434
- this._reactName = reactName;
435
- this._targetInst = targetInst;
436
- this.type = reactEventType;
437
- this.nativeEvent = nativeEvent;
438
- this.target = nativeEventTarget;
439
- this.currentTarget = null;
440
-
441
- for (var _propName in Interface) {
442
- if (!Interface.hasOwnProperty(_propName)) {
443
- continue;
444
- }
445
-
446
- var normalize = Interface[_propName];
447
-
448
- if (normalize) {
449
- this[_propName] = normalize(nativeEvent);
450
- } else {
451
- this[_propName] = nativeEvent[_propName];
452
- }
453
- }
454
-
455
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
456
-
457
- if (defaultPrevented) {
458
- this.isDefaultPrevented = functionThatReturnsTrue;
459
- } else {
460
- this.isDefaultPrevented = functionThatReturnsFalse;
461
- }
462
-
463
- this.isPropagationStopped = functionThatReturnsFalse;
464
- return this;
465
- }
466
-
467
- _assign(SyntheticBaseEvent.prototype, {
468
- preventDefault: function () {
469
- this.defaultPrevented = true;
470
- var event = this.nativeEvent;
471
-
472
- if (!event) {
473
- return;
474
- }
475
-
476
- if (event.preventDefault) {
477
- event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
478
- } else if (typeof event.returnValue !== 'unknown') {
479
- event.returnValue = false;
480
- }
481
-
482
- this.isDefaultPrevented = functionThatReturnsTrue;
483
- },
484
- stopPropagation: function () {
485
- var event = this.nativeEvent;
486
-
487
- if (!event) {
488
- return;
489
- }
490
-
491
- if (event.stopPropagation) {
492
- event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
493
- } else if (typeof event.cancelBubble !== 'unknown') {
494
- // The ChangeEventPlugin registers a "propertychange" event for
495
- // IE. This event does not support bubbling or cancelling, and
496
- // any references to cancelBubble throw "Member not found". A
497
- // typeof check of "unknown" circumvents this issue (and is also
498
- // IE specific).
499
- event.cancelBubble = true;
500
- }
501
-
502
- this.isPropagationStopped = functionThatReturnsTrue;
503
- },
504
-
505
- /**
506
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
507
- * them back into the pool. This allows a way to hold onto a reference that
508
- * won't be added back into the pool.
509
- */
510
- persist: function () {// Modern event system doesn't use pooling.
511
- },
512
-
513
- /**
514
- * Checks if this event should be released back into the pool.
515
- *
516
- * @return {boolean} True if this should not be released, false otherwise.
517
- */
518
- isPersistent: functionThatReturnsTrue
519
- });
520
-
521
- return SyntheticBaseEvent;
522
- }
523
- /**
524
- * @interface Event
525
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
526
- */
527
-
528
-
529
- var EventInterface = {
530
- eventPhase: 0,
531
- bubbles: 0,
532
- cancelable: 0,
533
- timeStamp: function (event) {
534
- return event.timeStamp || Date.now();
535
- },
536
- defaultPrevented: 0,
537
- isTrusted: 0
538
- };
539
- var SyntheticEvent = createSyntheticEvent(EventInterface);
540
-
541
- var UIEventInterface = _assign({}, EventInterface, {
542
- view: 0,
543
- detail: 0
544
- });
545
-
546
- var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
547
- var lastMovementX;
548
- var lastMovementY;
549
- var lastMouseEvent;
550
-
551
- function updateMouseMovementPolyfillState(event) {
552
- if (event !== lastMouseEvent) {
553
- if (lastMouseEvent && event.type === 'mousemove') {
554
- lastMovementX = event.screenX - lastMouseEvent.screenX;
555
- lastMovementY = event.screenY - lastMouseEvent.screenY;
556
- } else {
557
- lastMovementX = 0;
558
- lastMovementY = 0;
559
- }
560
-
561
- lastMouseEvent = event;
562
- }
563
- }
564
- /**
565
- * @interface MouseEvent
566
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
567
- */
568
-
569
-
570
- var MouseEventInterface = _assign({}, UIEventInterface, {
571
- screenX: 0,
572
- screenY: 0,
573
- clientX: 0,
574
- clientY: 0,
575
- pageX: 0,
576
- pageY: 0,
577
- ctrlKey: 0,
578
- shiftKey: 0,
579
- altKey: 0,
580
- metaKey: 0,
581
- getModifierState: getEventModifierState,
582
- button: 0,
583
- buttons: 0,
584
- relatedTarget: function (event) {
585
- if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
586
- return event.relatedTarget;
587
- },
588
- movementX: function (event) {
589
- if ('movementX' in event) {
590
- return event.movementX;
591
- }
592
-
593
- updateMouseMovementPolyfillState(event);
594
- return lastMovementX;
595
- },
596
- movementY: function (event) {
597
- if ('movementY' in event) {
598
- return event.movementY;
599
- } // Don't need to call updateMouseMovementPolyfillState() here
600
- // because it's guaranteed to have already run when movementX
601
- // was copied.
602
-
603
-
604
- return lastMovementY;
605
- }
606
- });
607
-
608
- var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
609
- /**
610
- * @interface DragEvent
611
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
612
- */
613
-
614
- var DragEventInterface = _assign({}, MouseEventInterface, {
615
- dataTransfer: 0
616
- });
617
-
618
- var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
619
- /**
620
- * @interface FocusEvent
621
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
622
- */
623
-
624
- var FocusEventInterface = _assign({}, UIEventInterface, {
625
- relatedTarget: 0
626
- });
627
-
628
- var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
629
- /**
630
- * @interface Event
631
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
632
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
633
- */
634
-
635
- var AnimationEventInterface = _assign({}, EventInterface, {
636
- animationName: 0,
637
- elapsedTime: 0,
638
- pseudoElement: 0
639
- });
640
-
641
- var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
642
- /**
643
- * @interface Event
644
- * @see http://www.w3.org/TR/clipboard-apis/
645
- */
646
-
647
- var ClipboardEventInterface = _assign({}, EventInterface, {
648
- clipboardData: function (event) {
649
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
650
- }
651
- });
652
-
653
- var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
654
- /**
655
- * @interface Event
656
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
657
- */
658
-
659
- var CompositionEventInterface = _assign({}, EventInterface, {
660
- data: 0
661
- });
662
-
663
- var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
664
- /**
665
- * Normalization of deprecated HTML5 `key` values
666
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
667
- */
668
-
669
- var normalizeKey = {
670
- Esc: 'Escape',
671
- Spacebar: ' ',
672
- Left: 'ArrowLeft',
673
- Up: 'ArrowUp',
674
- Right: 'ArrowRight',
675
- Down: 'ArrowDown',
676
- Del: 'Delete',
677
- Win: 'OS',
678
- Menu: 'ContextMenu',
679
- Apps: 'ContextMenu',
680
- Scroll: 'ScrollLock',
681
- MozPrintableKey: 'Unidentified'
682
- };
683
- /**
684
- * Translation from legacy `keyCode` to HTML5 `key`
685
- * Only special keys supported, all others depend on keyboard layout or browser
686
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
687
- */
688
-
689
- var translateToKey = {
690
- '8': 'Backspace',
691
- '9': 'Tab',
692
- '12': 'Clear',
693
- '13': 'Enter',
694
- '16': 'Shift',
695
- '17': 'Control',
696
- '18': 'Alt',
697
- '19': 'Pause',
698
- '20': 'CapsLock',
699
- '27': 'Escape',
700
- '32': ' ',
701
- '33': 'PageUp',
702
- '34': 'PageDown',
703
- '35': 'End',
704
- '36': 'Home',
705
- '37': 'ArrowLeft',
706
- '38': 'ArrowUp',
707
- '39': 'ArrowRight',
708
- '40': 'ArrowDown',
709
- '45': 'Insert',
710
- '46': 'Delete',
711
- '112': 'F1',
712
- '113': 'F2',
713
- '114': 'F3',
714
- '115': 'F4',
715
- '116': 'F5',
716
- '117': 'F6',
717
- '118': 'F7',
718
- '119': 'F8',
719
- '120': 'F9',
720
- '121': 'F10',
721
- '122': 'F11',
722
- '123': 'F12',
723
- '144': 'NumLock',
724
- '145': 'ScrollLock',
725
- '224': 'Meta'
726
- };
727
- /**
728
- * @param {object} nativeEvent Native browser event.
729
- * @return {string} Normalized `key` property.
730
- */
731
-
732
- function getEventKey(nativeEvent) {
733
- if (nativeEvent.key) {
734
- // Normalize inconsistent values reported by browsers due to
735
- // implementations of a working draft specification.
736
- // FireFox implements `key` but returns `MozPrintableKey` for all
737
- // printable characters (normalized to `Unidentified`), ignore it.
738
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
739
-
740
- if (key !== 'Unidentified') {
741
- return key;
742
- }
743
- } // Browser does not implement `key`, polyfill as much of it as we can.
744
-
745
-
746
- if (nativeEvent.type === 'keypress') {
747
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
748
- // thus be captured by `keypress`, no other non-printable key should.
749
-
750
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
751
- }
752
-
753
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
754
- // While user keyboard layout determines the actual meaning of each
755
- // `keyCode` value, almost all function keys have a universal value.
756
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
757
- }
758
-
759
- return '';
760
- }
761
- /**
762
- * Translation from modifier key to the associated property in the event.
763
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
764
- */
765
-
766
-
767
- var modifierKeyToProp = {
768
- Alt: 'altKey',
769
- Control: 'ctrlKey',
770
- Meta: 'metaKey',
771
- Shift: 'shiftKey'
772
- }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
773
- // getModifierState. If getModifierState is not supported, we map it to a set of
774
- // modifier keys exposed by the event. In this case, Lock-keys are not supported.
775
-
776
- function modifierStateGetter(keyArg) {
777
- var syntheticEvent = this;
778
- var nativeEvent = syntheticEvent.nativeEvent;
779
-
780
- if (nativeEvent.getModifierState) {
781
- return nativeEvent.getModifierState(keyArg);
782
- }
783
-
784
- var keyProp = modifierKeyToProp[keyArg];
785
- return keyProp ? !!nativeEvent[keyProp] : false;
786
- }
787
-
788
- function getEventModifierState(nativeEvent) {
789
- return modifierStateGetter;
790
- }
791
- /**
792
- * @interface KeyboardEvent
793
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
794
- */
795
-
796
-
797
- var KeyboardEventInterface = _assign({}, UIEventInterface, {
798
- key: getEventKey,
799
- code: 0,
800
- location: 0,
801
- ctrlKey: 0,
802
- shiftKey: 0,
803
- altKey: 0,
804
- metaKey: 0,
805
- repeat: 0,
806
- locale: 0,
807
- getModifierState: getEventModifierState,
808
- // Legacy Interface
809
- charCode: function (event) {
810
- // `charCode` is the result of a KeyPress event and represents the value of
811
- // the actual printable character.
812
- // KeyPress is deprecated, but its replacement is not yet final and not
813
- // implemented in any major browser. Only KeyPress has charCode.
814
- if (event.type === 'keypress') {
815
- return getEventCharCode(event);
816
- }
817
-
818
- return 0;
819
- },
820
- keyCode: function (event) {
821
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
822
- // physical keyboard key.
823
- // The actual meaning of the value depends on the users' keyboard layout
824
- // which cannot be detected. Assuming that it is a US keyboard layout
825
- // provides a surprisingly accurate mapping for US and European users.
826
- // Due to this, it is left to the user to implement at this time.
827
- if (event.type === 'keydown' || event.type === 'keyup') {
828
- return event.keyCode;
829
- }
830
-
831
- return 0;
832
- },
833
- which: function (event) {
834
- // `which` is an alias for either `keyCode` or `charCode` depending on the
835
- // type of the event.
836
- if (event.type === 'keypress') {
837
- return getEventCharCode(event);
838
- }
839
-
840
- if (event.type === 'keydown' || event.type === 'keyup') {
841
- return event.keyCode;
842
- }
843
-
844
- return 0;
845
- }
846
- });
847
-
848
- var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
849
- /**
850
- * @interface PointerEvent
851
- * @see http://www.w3.org/TR/pointerevents/
852
- */
853
-
854
- var PointerEventInterface = _assign({}, MouseEventInterface, {
855
- pointerId: 0,
856
- width: 0,
857
- height: 0,
858
- pressure: 0,
859
- tangentialPressure: 0,
860
- tiltX: 0,
861
- tiltY: 0,
862
- twist: 0,
863
- pointerType: 0,
864
- isPrimary: 0
865
- });
866
-
867
- var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
868
- /**
869
- * @interface TouchEvent
870
- * @see http://www.w3.org/TR/touch-events/
871
- */
872
-
873
- var TouchEventInterface = _assign({}, UIEventInterface, {
874
- touches: 0,
875
- targetTouches: 0,
876
- changedTouches: 0,
877
- altKey: 0,
878
- metaKey: 0,
879
- ctrlKey: 0,
880
- shiftKey: 0,
881
- getModifierState: getEventModifierState
882
- });
883
-
884
- var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
885
- /**
886
- * @interface Event
887
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
888
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
889
- */
890
-
891
- var TransitionEventInterface = _assign({}, EventInterface, {
892
- propertyName: 0,
893
- elapsedTime: 0,
894
- pseudoElement: 0
895
- });
896
-
897
- var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
898
- /**
899
- * @interface WheelEvent
900
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
901
- */
902
-
903
- var WheelEventInterface = _assign({}, MouseEventInterface, {
904
- deltaX: function (event) {
905
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
906
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
907
- },
908
- deltaY: function (event) {
909
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
910
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
911
- 'wheelDelta' in event ? -event.wheelDelta : 0;
912
- },
913
- deltaZ: 0,
914
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
915
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
916
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
917
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
918
- deltaMode: 0
919
- });
920
-
921
- var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
922
-
923
- /**
924
- * HTML nodeType values that represent the type of the node
925
- */
926
- var ELEMENT_NODE = 1;
927
-
928
- var didWarnAboutMessageChannel = false;
929
- var enqueueTaskImpl = null;
930
- function enqueueTask(task) {
931
- if (enqueueTaskImpl === null) {
932
- try {
933
- // read require off the module object to get around the bundlers.
934
- // we don't want them to detect a require and bundle a Node polyfill.
935
- var requireString = ('require' + Math.random()).slice(0, 7);
936
- var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
937
- // version of setImmediate, bypassing fake timers if any.
938
-
939
- enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
940
- } catch (_err) {
941
- // we're in a browser
942
- // we can't use regular timers because they may still be faked
943
- // so we try MessageChannel+postMessage instead
944
- enqueueTaskImpl = function (callback) {
945
- {
946
- if (didWarnAboutMessageChannel === false) {
947
- didWarnAboutMessageChannel = true;
948
-
949
- if (typeof MessageChannel === 'undefined') {
950
- error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
951
- }
952
- }
953
- }
954
-
955
- var channel = new MessageChannel();
956
- channel.port1.onmessage = callback;
957
- channel.port2.postMessage(undefined);
958
- };
959
- }
960
- }
961
-
962
- return enqueueTaskImpl(task);
963
- }
964
-
965
- var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
966
- var _ReactInternals$Sched = ReactInternals$1.Scheduler,
967
- unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
968
- unstable_now = _ReactInternals$Sched.unstable_now,
969
- unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
970
- unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
971
- unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
972
- unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
973
- unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
974
- unstable_next = _ReactInternals$Sched.unstable_next,
975
- unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
976
- unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
977
- unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
978
- unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
979
- unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
980
- unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
981
- unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
982
- unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
983
- unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
984
- unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
985
-
986
- var EventInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
987
- // const getNodeFromInstance = EventInternals[1];
988
- // const getFiberCurrentPropsFromNode = EventInternals[2];
989
- // const enqueueStateRestore = EventInternals[3];
990
- // const restoreStateIfNeeded = EventInternals[4];
991
-
992
- var flushPassiveEffects = EventInternals[5];
993
- var IsThisRendererActing = EventInternals[6];
994
- var batchedUpdates = ReactDOM.unstable_batchedUpdates;
995
- var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // This is the public version of `ReactTestUtils.act`. It is implemented in
996
- // "userspace" (i.e. not the reconciler), so that it doesn't add to the
997
- // production bundle size.
998
- // TODO: Remove this implementation of `act` in favor of the one exported by
999
- // the reconciler. To do this, we must first drop support for `act` in
1000
- // production mode.
1001
- // TODO: Remove support for the mock scheduler build, which was only added for
1002
- // the purposes of internal testing. Internal tests should use
1003
- // `unstable_concurrentAct` instead.
1004
-
1005
- var isSchedulerMocked = typeof unstable_flushAllWithoutAsserting === 'function';
1006
-
1007
- var flushWork = unstable_flushAllWithoutAsserting || function () {
1008
- var didFlushWork = false;
1009
-
1010
- while (flushPassiveEffects()) {
1011
- didFlushWork = true;
1012
- }
1013
-
1014
- return didFlushWork;
1015
- };
1016
-
1017
- function flushWorkAndMicroTasks(onDone) {
1018
- try {
1019
- flushWork();
1020
- enqueueTask(function () {
1021
- if (flushWork()) {
1022
- flushWorkAndMicroTasks(onDone);
1023
- } else {
1024
- onDone();
1025
- }
1026
- });
1027
- } catch (err) {
1028
- onDone(err);
1029
- }
1030
- } // we track the 'depth' of the act() calls with this counter,
1031
- // so we can tell if any async act() calls try to run in parallel.
1032
-
1033
-
1034
- var actingUpdatesScopeDepth = 0;
1035
- function act(callback) {
1036
-
1037
- var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth;
1038
- actingUpdatesScopeDepth++;
1039
- var previousIsSomeRendererActing = IsSomeRendererActing.current;
1040
- var previousIsThisRendererActing = IsThisRendererActing.current;
1041
- IsSomeRendererActing.current = true;
1042
- IsThisRendererActing.current = true;
1043
-
1044
- function onDone() {
1045
- actingUpdatesScopeDepth--;
1046
- IsSomeRendererActing.current = previousIsSomeRendererActing;
1047
- IsThisRendererActing.current = previousIsThisRendererActing;
1048
-
1049
- {
1050
- if (actingUpdatesScopeDepth > previousActingUpdatesScopeDepth) {
1051
- // if it's _less than_ previousActingUpdatesScopeDepth, then we can assume the 'other' one has warned
1052
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
1053
- }
1054
- }
1055
- }
1056
-
1057
- var result;
1058
-
1059
- try {
1060
- result = batchedUpdates(callback);
1061
- } catch (error) {
1062
- // on sync errors, we still want to 'cleanup' and decrement actingUpdatesScopeDepth
1063
- onDone();
1064
- throw error;
1065
- }
1066
-
1067
- if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
1068
- // setup a boolean that gets set to true only
1069
- // once this act() call is await-ed
1070
- var called = false;
1071
-
1072
- {
1073
- if (typeof Promise !== 'undefined') {
1074
- //eslint-disable-next-line no-undef
1075
- Promise.resolve().then(function () {}).then(function () {
1076
- if (called === false) {
1077
- error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, interleaving multiple act ' + 'calls and mixing their scopes. You should - await act(async () => ...);');
1078
- }
1079
- });
1080
- }
1081
- } // in the async case, the returned thenable runs the callback, flushes
1082
- // effects and microtasks in a loop until flushPassiveEffects() === false,
1083
- // and cleans up
1084
-
1085
-
1086
- return {
1087
- then: function (resolve, reject) {
1088
- called = true;
1089
- result.then(function () {
1090
- if (actingUpdatesScopeDepth > 1 || isSchedulerMocked === true && previousIsSomeRendererActing === true) {
1091
- onDone();
1092
- resolve();
1093
- return;
1094
- } // we're about to exit the act() scope,
1095
- // now's the time to flush tasks/effects
1096
-
1097
-
1098
- flushWorkAndMicroTasks(function (err) {
1099
- onDone();
1100
-
1101
- if (err) {
1102
- reject(err);
1103
- } else {
1104
- resolve();
1105
- }
1106
- });
1107
- }, function (err) {
1108
- onDone();
1109
- reject(err);
1110
- });
1111
- }
1112
- };
1113
- } else {
1114
- {
1115
- if (result !== undefined) {
1116
- error('The callback passed to act(...) function ' + 'must return undefined, or a Promise. You returned %s', result);
1117
- }
1118
- } // flush effects until none remain, and cleanup
1119
-
1120
-
1121
- try {
1122
- if (actingUpdatesScopeDepth === 1 && (isSchedulerMocked === false || previousIsSomeRendererActing === false)) {
1123
- // we're about to exit the act() scope,
1124
- // now's the time to flush effects
1125
- flushWork();
1126
- }
1127
-
1128
- onDone();
1129
- } catch (err) {
1130
- onDone();
1131
- throw err;
1132
- } // in the sync case, the returned thenable only warns *if* await-ed
1133
-
1134
-
1135
- return {
1136
- then: function (resolve) {
1137
- {
1138
- error('Do not await the result of calling act(...) with sync logic, it is not a Promise.');
1139
- }
1140
-
1141
- resolve();
1142
- }
1143
- };
1144
- }
1145
- }
1146
-
1147
- var EventInternals$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
1148
- // const getNodeFromInstance = EventInternals[1];
1149
- // const getFiberCurrentPropsFromNode = EventInternals[2];
1150
- // const enqueueStateRestore = EventInternals[3];
1151
- // const restoreStateIfNeeded = EventInternals[4];
1152
- // const flushPassiveEffects = EventInternals[5];
1153
-
1154
- var IsThisRendererActing$1 = EventInternals$1[6];
1155
- var batchedUpdates$1 = ReactDOM.unstable_batchedUpdates;
1156
- var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing; // This version of `act` is only used by our tests. Unlike the public version
1157
- // of `act`, it's designed to work identically in both production and
1158
- // development. It may have slightly different behavior from the public
1159
- // version, too, since our constraints in our test suite are not the same as
1160
- // those of developers using React — we're testing React itself, as opposed to
1161
- // building an app with React.
1162
-
1163
- var actingUpdatesScopeDepth$1 = 0;
1164
- function unstable_concurrentAct(scope) {
1165
- if (unstable_flushAllWithoutAsserting === undefined) {
1166
- throw Error('This version of `act` requires a special mock build of Scheduler.');
1167
- }
1168
-
1169
- if (setTimeout._isMockFunction !== true) {
1170
- throw Error("This version of `act` requires Jest's timer mocks " + '(i.e. jest.useFakeTimers).');
1171
- }
1172
-
1173
- var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth$1;
1174
- var previousIsSomeRendererActing = IsSomeRendererActing$1.current;
1175
- var previousIsThisRendererActing = IsThisRendererActing$1.current;
1176
- IsSomeRendererActing$1.current = true;
1177
- IsThisRendererActing$1.current = true;
1178
- actingUpdatesScopeDepth$1++;
1179
-
1180
- var unwind = function () {
1181
- actingUpdatesScopeDepth$1--;
1182
- IsSomeRendererActing$1.current = previousIsSomeRendererActing;
1183
- IsThisRendererActing$1.current = previousIsThisRendererActing;
1184
-
1185
- {
1186
- if (actingUpdatesScopeDepth$1 > previousActingUpdatesScopeDepth) {
1187
- // if it's _less than_ previousActingUpdatesScopeDepth, then we can
1188
- // assume the 'other' one has warned
1189
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
1190
- }
1191
- }
1192
- }; // TODO: This would be way simpler if 1) we required a promise to be
1193
- // returned and 2) we could use async/await. Since it's only our used in
1194
- // our test suite, we should be able to.
1195
-
1196
-
1197
- try {
1198
- var thenable = batchedUpdates$1(scope);
1199
-
1200
- if (typeof thenable === 'object' && thenable !== null && typeof thenable.then === 'function') {
1201
- return {
1202
- then: function (resolve, reject) {
1203
- thenable.then(function () {
1204
- flushActWork(function () {
1205
- unwind();
1206
- resolve();
1207
- }, function (error) {
1208
- unwind();
1209
- reject(error);
1210
- });
1211
- }, function (error) {
1212
- unwind();
1213
- reject(error);
1214
- });
1215
- }
1216
- };
1217
- } else {
1218
- try {
1219
- // TODO: Let's not support non-async scopes at all in our tests. Need to
1220
- // migrate existing tests.
1221
- var didFlushWork;
1222
-
1223
- do {
1224
- didFlushWork = unstable_flushAllWithoutAsserting();
1225
- } while (didFlushWork);
1226
- } finally {
1227
- unwind();
1228
- }
1229
- }
1230
- } catch (error) {
1231
- unwind();
1232
- throw error;
1233
- }
1234
- }
1235
-
1236
- function flushActWork(resolve, reject) {
1237
- // Flush suspended fallbacks
1238
- // $FlowFixMe: Flow doesn't know about global Jest object
1239
- jest.runOnlyPendingTimers();
1240
- enqueueTask(function () {
1241
- try {
1242
- var didFlushWork = unstable_flushAllWithoutAsserting();
1243
-
1244
- if (didFlushWork) {
1245
- flushActWork(resolve, reject);
1246
- } else {
1247
- resolve();
1248
- }
1249
- } catch (error) {
1250
- reject(error);
1251
- }
1252
- });
1253
- }
1254
-
1255
- function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
1256
- var funcArgs = Array.prototype.slice.call(arguments, 3);
1257
-
1258
- try {
1259
- func.apply(context, funcArgs);
1260
- } catch (error) {
1261
- this.onError(error);
1262
- }
1263
- }
1264
-
1265
- var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
1266
-
1267
- {
1268
- // In DEV mode, we swap out invokeGuardedCallback for a special version
1269
- // that plays more nicely with the browser's DevTools. The idea is to preserve
1270
- // "Pause on exceptions" behavior. Because React wraps all user-provided
1271
- // functions in invokeGuardedCallback, and the production version of
1272
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
1273
- // like caught exceptions, and the DevTools won't pause unless the developer
1274
- // takes the extra step of enabling pause on caught exceptions. This is
1275
- // unintuitive, though, because even though React has caught the error, from
1276
- // the developer's perspective, the error is uncaught.
1277
- //
1278
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
1279
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
1280
- // DOM node, and call the user-provided callback from inside an event handler
1281
- // for that fake event. If the callback throws, the error is "captured" using
1282
- // a global event handler. But because the error happens in a different
1283
- // event loop context, it does not interrupt the normal program flow.
1284
- // Effectively, this gives us try-catch behavior without actually using
1285
- // try-catch. Neat!
1286
- // Check that the browser supports the APIs we need to implement our special
1287
- // DEV version of invokeGuardedCallback
1288
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
1289
- var fakeNode = document.createElement('react');
1290
-
1291
- invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
1292
- // If document doesn't exist we know for sure we will crash in this method
1293
- // when we call document.createEvent(). However this can cause confusing
1294
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
1295
- // So we preemptively throw with a better message instead.
1296
- if (!(typeof document !== 'undefined')) {
1297
- {
1298
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
1299
- }
1300
- }
1301
-
1302
- var evt = document.createEvent('Event');
1303
- var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
1304
- // set this to true at the beginning, then set it to false right after
1305
- // calling the function. If the function errors, `didError` will never be
1306
- // set to false. This strategy works even if the browser is flaky and
1307
- // fails to call our global error handler, because it doesn't rely on
1308
- // the error event at all.
1309
-
1310
- var didError = true; // Keeps track of the value of window.event so that we can reset it
1311
- // during the callback to let user code access window.event in the
1312
- // browsers that support it.
1313
-
1314
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
1315
- // dispatching: https://github.com/facebook/react/issues/13688
1316
-
1317
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
1318
-
1319
- function restoreAfterDispatch() {
1320
- // We immediately remove the callback from event listeners so that
1321
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
1322
- // nested call would trigger the fake event handlers of any call higher
1323
- // in the stack.
1324
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
1325
- // window.event assignment in both IE <= 10 as they throw an error
1326
- // "Member not found" in strict mode, and in Firefox which does not
1327
- // support window.event.
1328
-
1329
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
1330
- window.event = windowEvent;
1331
- }
1332
- } // Create an event handler for our fake event. We will synchronously
1333
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
1334
- // call the user-provided callback.
1335
-
1336
-
1337
- var funcArgs = Array.prototype.slice.call(arguments, 3);
1338
-
1339
- function callCallback() {
1340
- didCall = true;
1341
- restoreAfterDispatch();
1342
- func.apply(context, funcArgs);
1343
- didError = false;
1344
- } // Create a global error event handler. We use this to capture the value
1345
- // that was thrown. It's possible that this error handler will fire more
1346
- // than once; for example, if non-React code also calls `dispatchEvent`
1347
- // and a handler for that event throws. We should be resilient to most of
1348
- // those cases. Even if our error event handler fires more than once, the
1349
- // last error event is always used. If the callback actually does error,
1350
- // we know that the last error event is the correct one, because it's not
1351
- // possible for anything else to have happened in between our callback
1352
- // erroring and the code that follows the `dispatchEvent` call below. If
1353
- // the callback doesn't error, but the error event was fired, we know to
1354
- // ignore it because `didError` will be false, as described above.
1355
-
1356
-
1357
- var error; // Use this to track whether the error event is ever called.
1358
-
1359
- var didSetError = false;
1360
- var isCrossOriginError = false;
1361
-
1362
- function handleWindowError(event) {
1363
- error = event.error;
1364
- didSetError = true;
1365
-
1366
- if (error === null && event.colno === 0 && event.lineno === 0) {
1367
- isCrossOriginError = true;
1368
- }
1369
-
1370
- if (event.defaultPrevented) {
1371
- // Some other error handler has prevented default.
1372
- // Browsers silence the error report if this happens.
1373
- // We'll remember this to later decide whether to log it or not.
1374
- if (error != null && typeof error === 'object') {
1375
- try {
1376
- error._suppressLogging = true;
1377
- } catch (inner) {// Ignore.
1378
- }
1379
- }
1380
- }
1381
- } // Create a fake event type.
1382
-
1383
-
1384
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
1385
-
1386
- window.addEventListener('error', handleWindowError);
1387
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
1388
- // errors, it will trigger our global error handler.
1389
-
1390
- evt.initEvent(evtType, false, false);
1391
- fakeNode.dispatchEvent(evt);
1392
-
1393
- if (windowEventDescriptor) {
1394
- Object.defineProperty(window, 'event', windowEventDescriptor);
1395
- }
1396
-
1397
- if (didCall && didError) {
1398
- if (!didSetError) {
1399
- // The callback errored, but the error event never fired.
1400
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
1401
- } else if (isCrossOriginError) {
1402
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
1403
- }
1404
-
1405
- this.onError(error);
1406
- } // Remove our event listeners
1407
-
1408
-
1409
- window.removeEventListener('error', handleWindowError);
1410
-
1411
- if (!didCall) {
1412
- // Something went really wrong, and our event was not dispatched.
1413
- // https://github.com/facebook/react/issues/16734
1414
- // https://github.com/facebook/react/issues/16585
1415
- // Fall back to the production implementation.
1416
- restoreAfterDispatch();
1417
- return invokeGuardedCallbackProd.apply(this, arguments);
1418
- }
1419
- };
1420
- }
1421
- }
1422
-
1423
- var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
1424
-
1425
- var hasError = false;
1426
- var caughtError = null; // Used by event system to capture/rethrow the first error.
1427
-
1428
- var hasRethrowError = false;
1429
- var rethrowError = null;
1430
- var reporter = {
1431
- onError: function (error) {
1432
- hasError = true;
1433
- caughtError = error;
1434
- }
1435
- };
1436
- /**
1437
- * Call a function while guarding against errors that happens within it.
1438
- * Returns an error if it throws, otherwise null.
1439
- *
1440
- * In production, this is implemented using a try-catch. The reason we don't
1441
- * use a try-catch directly is so that we can swap out a different
1442
- * implementation in DEV mode.
1443
- *
1444
- * @param {String} name of the guard to use for logging or debugging
1445
- * @param {Function} func The function to invoke
1446
- * @param {*} context The context to use when calling the function
1447
- * @param {...*} args Arguments for function
1448
- */
1449
-
1450
- function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
1451
- hasError = false;
1452
- caughtError = null;
1453
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
1454
- }
1455
- /**
1456
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
1457
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
1458
- * TODO: See if caughtError and rethrowError can be unified.
1459
- *
1460
- * @param {String} name of the guard to use for logging or debugging
1461
- * @param {Function} func The function to invoke
1462
- * @param {*} context The context to use when calling the function
1463
- * @param {...*} args Arguments for function
1464
- */
1465
-
1466
- function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
1467
- invokeGuardedCallback.apply(this, arguments);
1468
-
1469
- if (hasError) {
1470
- var error = clearCaughtError();
1471
-
1472
- if (!hasRethrowError) {
1473
- hasRethrowError = true;
1474
- rethrowError = error;
1475
- }
1476
- }
1477
- }
1478
- /**
1479
- * During execution of guarded functions we will capture the first error which
1480
- * we will rethrow to be handled by the top level error handler.
1481
- */
1482
-
1483
- function rethrowCaughtError() {
1484
- if (hasRethrowError) {
1485
- var error = rethrowError;
1486
- hasRethrowError = false;
1487
- rethrowError = null;
1488
- throw error;
1489
- }
1490
- }
1491
- function clearCaughtError() {
1492
- if (hasError) {
1493
- var error = caughtError;
1494
- hasError = false;
1495
- caughtError = null;
1496
- return error;
1497
- } else {
1498
- {
1499
- {
1500
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
1501
- }
1502
- }
1503
- }
1504
- }
1505
-
1506
- var EventInternals$2 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
1507
- var getInstanceFromNode = EventInternals$2[0];
1508
- var getNodeFromInstance = EventInternals$2[1];
1509
- var getFiberCurrentPropsFromNode = EventInternals$2[2];
1510
- var enqueueStateRestore = EventInternals$2[3];
1511
- var restoreStateIfNeeded = EventInternals$2[4]; // const flushPassiveEffects = EventInternals[5];
1512
- // TODO: This is related to `act`, not events. Move to separate key?
1513
- // const IsThisRendererActing = EventInternals[6];
1514
-
1515
- function Event(suffix) {}
1516
-
1517
- var hasWarnedAboutDeprecatedMockComponent = false;
1518
- /**
1519
- * @class ReactTestUtils
1520
- */
1521
-
1522
- function findAllInRenderedFiberTreeInternal(fiber, test) {
1523
- if (!fiber) {
1524
- return [];
1525
- }
1526
-
1527
- var currentParent = findCurrentFiberUsingSlowPath(fiber);
1528
-
1529
- if (!currentParent) {
1530
- return [];
1531
- }
1532
-
1533
- var node = currentParent;
1534
- var ret = [];
1535
-
1536
- while (true) {
1537
- if (node.tag === HostComponent || node.tag === HostText || node.tag === ClassComponent || node.tag === FunctionComponent) {
1538
- var publicInst = node.stateNode;
1539
-
1540
- if (test(publicInst)) {
1541
- ret.push(publicInst);
1542
- }
1543
- }
1544
-
1545
- if (node.child) {
1546
- node.child.return = node;
1547
- node = node.child;
1548
- continue;
1549
- }
1550
-
1551
- if (node === currentParent) {
1552
- return ret;
1553
- }
1554
-
1555
- while (!node.sibling) {
1556
- if (!node.return || node.return === currentParent) {
1557
- return ret;
1558
- }
1559
-
1560
- node = node.return;
1561
- }
1562
-
1563
- node.sibling.return = node.return;
1564
- node = node.sibling;
1565
- }
1566
- }
1567
-
1568
- function validateClassInstance(inst, methodName) {
1569
- if (!inst) {
1570
- // This is probably too relaxed but it's existing behavior.
1571
- return;
1572
- }
1573
-
1574
- if (get(inst)) {
1575
- // This is a public instance indeed.
1576
- return;
1577
- }
1578
-
1579
- var received;
1580
- var stringified = '' + inst;
1581
-
1582
- if (Array.isArray(inst)) {
1583
- received = 'an array';
1584
- } else if (inst && inst.nodeType === ELEMENT_NODE && inst.tagName) {
1585
- received = 'a DOM node';
1586
- } else if (stringified === '[object Object]') {
1587
- received = 'object with keys {' + Object.keys(inst).join(', ') + '}';
1588
- } else {
1589
- received = stringified;
1590
- }
1591
-
1592
- {
1593
- {
1594
- throw Error( methodName + "(...): the first argument must be a React class instance. Instead received: " + received + "." );
1595
- }
1596
- }
1597
- }
1598
- /**
1599
- * Utilities for making it easy to test React components.
1600
- *
1601
- * See https://reactjs.org/docs/test-utils.html
1602
- *
1603
- * Todo: Support the entire DOM.scry query syntax. For now, these simple
1604
- * utilities will suffice for testing purposes.
1605
- * @lends ReactTestUtils
1606
- */
1607
-
1608
-
1609
- function renderIntoDocument(element) {
1610
- var div = document.createElement('div'); // None of our tests actually require attaching the container to the
1611
- // DOM, and doing so creates a mess that we rely on test isolation to
1612
- // clean up, so we're going to stop honoring the name of this method
1613
- // (and probably rename it eventually) if no problems arise.
1614
- // document.documentElement.appendChild(div);
1615
-
1616
- return ReactDOM.render(element, div);
1617
- }
1618
-
1619
- function isElement(element) {
1620
- return React.isValidElement(element);
1621
- }
1622
-
1623
- function isElementOfType(inst, convenienceConstructor) {
1624
- return React.isValidElement(inst) && inst.type === convenienceConstructor;
1625
- }
1626
-
1627
- function isDOMComponent(inst) {
1628
- return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
1629
- }
1630
-
1631
- function isDOMComponentElement(inst) {
1632
- return !!(inst && React.isValidElement(inst) && !!inst.tagName);
1633
- }
1634
-
1635
- function isCompositeComponent(inst) {
1636
- if (isDOMComponent(inst)) {
1637
- // Accessing inst.setState warns; just return false as that'll be what
1638
- // this returns when we have DOM nodes as refs directly
1639
- return false;
1640
- }
1641
-
1642
- return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
1643
- }
1644
-
1645
- function isCompositeComponentWithType(inst, type) {
1646
- if (!isCompositeComponent(inst)) {
1647
- return false;
1648
- }
1649
-
1650
- var internalInstance = get(inst);
1651
- var constructor = internalInstance.type;
1652
- return constructor === type;
1653
- }
1654
-
1655
- function findAllInRenderedTree(inst, test) {
1656
- validateClassInstance(inst, 'findAllInRenderedTree');
1657
-
1658
- if (!inst) {
1659
- return [];
1660
- }
1661
-
1662
- var internalInstance = get(inst);
1663
- return findAllInRenderedFiberTreeInternal(internalInstance, test);
1664
- }
1665
- /**
1666
- * Finds all instance of components in the rendered tree that are DOM
1667
- * components with the class name matching `className`.
1668
- * @return {array} an array of all the matches.
1669
- */
1670
-
1671
-
1672
- function scryRenderedDOMComponentsWithClass(root, classNames) {
1673
- validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
1674
- return findAllInRenderedTree(root, function (inst) {
1675
- if (isDOMComponent(inst)) {
1676
- var className = inst.className;
1677
-
1678
- if (typeof className !== 'string') {
1679
- // SVG, probably.
1680
- className = inst.getAttribute('class') || '';
1681
- }
1682
-
1683
- var classList = className.split(/\s+/);
1684
-
1685
- if (!Array.isArray(classNames)) {
1686
- if (!(classNames !== undefined)) {
1687
- {
1688
- throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
1689
- }
1690
- }
1691
-
1692
- classNames = classNames.split(/\s+/);
1693
- }
1694
-
1695
- return classNames.every(function (name) {
1696
- return classList.indexOf(name) !== -1;
1697
- });
1698
- }
1699
-
1700
- return false;
1701
- });
1702
- }
1703
- /**
1704
- * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
1705
- * and returns that one result, or throws exception if there is any other
1706
- * number of matches besides one.
1707
- * @return {!ReactDOMComponent} The one match.
1708
- */
1709
-
1710
-
1711
- function findRenderedDOMComponentWithClass(root, className) {
1712
- validateClassInstance(root, 'findRenderedDOMComponentWithClass');
1713
- var all = scryRenderedDOMComponentsWithClass(root, className);
1714
-
1715
- if (all.length !== 1) {
1716
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
1717
- }
1718
-
1719
- return all[0];
1720
- }
1721
- /**
1722
- * Finds all instance of components in the rendered tree that are DOM
1723
- * components with the tag name matching `tagName`.
1724
- * @return {array} an array of all the matches.
1725
- */
1726
-
1727
-
1728
- function scryRenderedDOMComponentsWithTag(root, tagName) {
1729
- validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
1730
- return findAllInRenderedTree(root, function (inst) {
1731
- return isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
1732
- });
1733
- }
1734
- /**
1735
- * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
1736
- * and returns that one result, or throws exception if there is any other
1737
- * number of matches besides one.
1738
- * @return {!ReactDOMComponent} The one match.
1739
- */
1740
-
1741
-
1742
- function findRenderedDOMComponentWithTag(root, tagName) {
1743
- validateClassInstance(root, 'findRenderedDOMComponentWithTag');
1744
- var all = scryRenderedDOMComponentsWithTag(root, tagName);
1745
-
1746
- if (all.length !== 1) {
1747
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
1748
- }
1749
-
1750
- return all[0];
1751
- }
1752
- /**
1753
- * Finds all instances of components with type equal to `componentType`.
1754
- * @return {array} an array of all the matches.
1755
- */
1756
-
1757
-
1758
- function scryRenderedComponentsWithType(root, componentType) {
1759
- validateClassInstance(root, 'scryRenderedComponentsWithType');
1760
- return findAllInRenderedTree(root, function (inst) {
1761
- return isCompositeComponentWithType(inst, componentType);
1762
- });
1763
- }
1764
- /**
1765
- * Same as `scryRenderedComponentsWithType` but expects there to be one result
1766
- * and returns that one result, or throws exception if there is any other
1767
- * number of matches besides one.
1768
- * @return {!ReactComponent} The one match.
1769
- */
1770
-
1771
-
1772
- function findRenderedComponentWithType(root, componentType) {
1773
- validateClassInstance(root, 'findRenderedComponentWithType');
1774
- var all = scryRenderedComponentsWithType(root, componentType);
1775
-
1776
- if (all.length !== 1) {
1777
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
1778
- }
1779
-
1780
- return all[0];
1781
- }
1782
- /**
1783
- * Pass a mocked component module to this method to augment it with
1784
- * useful methods that allow it to be used as a dummy React component.
1785
- * Instead of rendering as usual, the component will become a simple
1786
- * <div> containing any provided children.
1787
- *
1788
- * @param {object} module the mock function object exported from a
1789
- * module that defines the component to be mocked
1790
- * @param {?string} mockTagName optional dummy root tag name to return
1791
- * from render method (overrides
1792
- * module.mockTagName if provided)
1793
- * @return {object} the ReactTestUtils object (for chaining)
1794
- */
1795
-
1796
-
1797
- function mockComponent(module, mockTagName) {
1798
- {
1799
- if (!hasWarnedAboutDeprecatedMockComponent) {
1800
- hasWarnedAboutDeprecatedMockComponent = true;
1801
-
1802
- warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://reactjs.org/link/test-utils-mock-component for more information.');
1803
- }
1804
- }
1805
-
1806
- mockTagName = mockTagName || module.mockTagName || 'div';
1807
- module.prototype.render.mockImplementation(function () {
1808
- return React.createElement(mockTagName, null, this.props.children);
1809
- });
1810
- return this;
1811
- }
1812
-
1813
- function nativeTouchData(x, y) {
1814
- return {
1815
- touches: [{
1816
- pageX: x,
1817
- pageY: y
1818
- }]
1819
- };
1820
- } // Start of inline: the below functions were inlined from
1821
- // EventPropagator.js, as they deviated from ReactDOM's newer
1822
- // implementations.
1823
-
1824
- /**
1825
- * Dispatch the event to the listener.
1826
- * @param {SyntheticEvent} event SyntheticEvent to handle
1827
- * @param {function} listener Application-level callback
1828
- * @param {*} inst Internal component instance
1829
- */
1830
-
1831
-
1832
- function executeDispatch(event, listener, inst) {
1833
- var type = event.type || 'unknown-event';
1834
- event.currentTarget = getNodeFromInstance(inst);
1835
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
1836
- event.currentTarget = null;
1837
- }
1838
- /**
1839
- * Standard/simple iteration through an event's collected dispatches.
1840
- */
1841
-
1842
-
1843
- function executeDispatchesInOrder(event) {
1844
- var dispatchListeners = event._dispatchListeners;
1845
- var dispatchInstances = event._dispatchInstances;
1846
-
1847
- if (Array.isArray(dispatchListeners)) {
1848
- for (var i = 0; i < dispatchListeners.length; i++) {
1849
- if (event.isPropagationStopped()) {
1850
- break;
1851
- } // Listeners and Instances are two parallel arrays that are always in sync.
1852
-
1853
-
1854
- executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
1855
- }
1856
- } else if (dispatchListeners) {
1857
- executeDispatch(event, dispatchListeners, dispatchInstances);
1858
- }
1859
-
1860
- event._dispatchListeners = null;
1861
- event._dispatchInstances = null;
1862
- }
1863
- /**
1864
- * Dispatches an event and releases it back into the pool, unless persistent.
1865
- *
1866
- * @param {?object} event Synthetic event to be dispatched.
1867
- * @private
1868
- */
1869
-
1870
-
1871
- var executeDispatchesAndRelease = function (event) {
1872
- if (event) {
1873
- executeDispatchesInOrder(event);
1874
-
1875
- if (!event.isPersistent()) {
1876
- event.constructor.release(event);
1877
- }
1878
- }
1879
- };
1880
-
1881
- function isInteractive(tag) {
1882
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
1883
- }
1884
-
1885
- function getParent(inst) {
1886
- do {
1887
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
1888
- // That is depending on if we want nested subtrees (layers) to bubble
1889
- // events to their parent. We could also go through parentNode on the
1890
- // host node but that wouldn't work for React Native and doesn't let us
1891
- // do the portal feature.
1892
- } while (inst && inst.tag !== HostComponent);
1893
-
1894
- if (inst) {
1895
- return inst;
1896
- }
1897
-
1898
- return null;
1899
- }
1900
- /**
1901
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
1902
- */
1903
-
1904
-
1905
- function traverseTwoPhase(inst, fn, arg) {
1906
- var path = [];
1907
-
1908
- while (inst) {
1909
- path.push(inst);
1910
- inst = getParent(inst);
1911
- }
1912
-
1913
- var i;
1914
-
1915
- for (i = path.length; i-- > 0;) {
1916
- fn(path[i], 'captured', arg);
1917
- }
1918
-
1919
- for (i = 0; i < path.length; i++) {
1920
- fn(path[i], 'bubbled', arg);
1921
- }
1922
- }
1923
-
1924
- function shouldPreventMouseEvent(name, type, props) {
1925
- switch (name) {
1926
- case 'onClick':
1927
- case 'onClickCapture':
1928
- case 'onDoubleClick':
1929
- case 'onDoubleClickCapture':
1930
- case 'onMouseDown':
1931
- case 'onMouseDownCapture':
1932
- case 'onMouseMove':
1933
- case 'onMouseMoveCapture':
1934
- case 'onMouseUp':
1935
- case 'onMouseUpCapture':
1936
- case 'onMouseEnter':
1937
- return !!(props.disabled && isInteractive(type));
1938
-
1939
- default:
1940
- return false;
1941
- }
1942
- }
1943
- /**
1944
- * @param {object} inst The instance, which is the source of events.
1945
- * @param {string} registrationName Name of listener (e.g. `onClick`).
1946
- * @return {?function} The stored callback.
1947
- */
1948
-
1949
-
1950
- function getListener(inst, registrationName) {
1951
- // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
1952
- // live here; needs to be moved to a better place soon
1953
- var stateNode = inst.stateNode;
1954
-
1955
- if (!stateNode) {
1956
- // Work in progress (ex: onload events in incremental mode).
1957
- return null;
1958
- }
1959
-
1960
- var props = getFiberCurrentPropsFromNode(stateNode);
1961
-
1962
- if (!props) {
1963
- // Work in progress.
1964
- return null;
1965
- }
1966
-
1967
- var listener = props[registrationName];
1968
-
1969
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
1970
- return null;
1971
- }
1972
-
1973
- if (!(!listener || typeof listener === 'function')) {
1974
- {
1975
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
1976
- }
1977
- }
1978
-
1979
- return listener;
1980
- }
1981
-
1982
- function listenerAtPhase(inst, event, propagationPhase) {
1983
- var registrationName = event._reactName;
1984
-
1985
- if (propagationPhase === 'captured') {
1986
- registrationName += 'Capture';
1987
- }
1988
-
1989
- return getListener(inst, registrationName);
1990
- }
1991
-
1992
- function accumulateDispatches(inst, ignoredDirection, event) {
1993
- if (inst && event && event._reactName) {
1994
- var registrationName = event._reactName;
1995
- var listener = getListener(inst, registrationName);
1996
-
1997
- if (listener) {
1998
- if (event._dispatchListeners == null) {
1999
- event._dispatchListeners = [];
2000
- }
2001
-
2002
- if (event._dispatchInstances == null) {
2003
- event._dispatchInstances = [];
2004
- }
2005
-
2006
- event._dispatchListeners.push(listener);
2007
-
2008
- event._dispatchInstances.push(inst);
2009
- }
2010
- }
2011
- }
2012
-
2013
- function accumulateDirectionalDispatches(inst, phase, event) {
2014
- {
2015
- if (!inst) {
2016
- error('Dispatching inst must not be null');
2017
- }
2018
- }
2019
-
2020
- var listener = listenerAtPhase(inst, event, phase);
2021
-
2022
- if (listener) {
2023
- if (event._dispatchListeners == null) {
2024
- event._dispatchListeners = [];
2025
- }
2026
-
2027
- if (event._dispatchInstances == null) {
2028
- event._dispatchInstances = [];
2029
- }
2030
-
2031
- event._dispatchListeners.push(listener);
2032
-
2033
- event._dispatchInstances.push(inst);
2034
- }
2035
- }
2036
-
2037
- function accumulateDirectDispatchesSingle(event) {
2038
- if (event && event._reactName) {
2039
- accumulateDispatches(event._targetInst, null, event);
2040
- }
2041
- }
2042
-
2043
- function accumulateTwoPhaseDispatchesSingle(event) {
2044
- if (event && event._reactName) {
2045
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
2046
- }
2047
- } // End of inline
2048
-
2049
-
2050
- var Simulate = {};
2051
- var directDispatchEventTypes = new Set(['mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave']);
2052
- /**
2053
- * Exports:
2054
- *
2055
- * - `Simulate.click(Element)`
2056
- * - `Simulate.mouseMove(Element)`
2057
- * - `Simulate.change(Element)`
2058
- * - ... (All keys from event plugin `eventTypes` objects)
2059
- */
2060
-
2061
- function makeSimulator(eventType) {
2062
- return function (domNode, eventData) {
2063
- if (!!React.isValidElement(domNode)) {
2064
- {
2065
- throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering." );
2066
- }
2067
- }
2068
-
2069
- if (!!isCompositeComponent(domNode)) {
2070
- {
2071
- throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead." );
2072
- }
2073
- }
2074
-
2075
- var reactName = 'on' + eventType[0].toUpperCase() + eventType.slice(1);
2076
- var fakeNativeEvent = new Event();
2077
- fakeNativeEvent.target = domNode;
2078
- fakeNativeEvent.type = eventType.toLowerCase();
2079
- var targetInst = getInstanceFromNode(domNode);
2080
- var event = new SyntheticEvent(reactName, fakeNativeEvent.type, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
2081
- // sure it's marked and won't warn when setting additional properties.
2082
-
2083
- event.persist();
2084
-
2085
- _assign(event, eventData);
2086
-
2087
- if (directDispatchEventTypes.has(eventType)) {
2088
- accumulateDirectDispatchesSingle(event);
2089
- } else {
2090
- accumulateTwoPhaseDispatchesSingle(event);
2091
- }
2092
-
2093
- ReactDOM.unstable_batchedUpdates(function () {
2094
- // Normally extractEvent enqueues a state restore, but we'll just always
2095
- // do that since we're by-passing it here.
2096
- enqueueStateRestore(domNode);
2097
- executeDispatchesAndRelease(event);
2098
- rethrowCaughtError();
2099
- });
2100
- restoreStateIfNeeded();
2101
- };
2102
- } // A one-time snapshot with no plans to update. We'll probably want to deprecate Simulate API.
2103
-
2104
-
2105
- var simulatedEventTypes = ['blur', 'cancel', 'click', 'close', 'contextMenu', 'copy', 'cut', 'auxClick', 'doubleClick', 'dragEnd', 'dragStart', 'drop', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'mouseDown', 'mouseUp', 'paste', 'pause', 'play', 'pointerCancel', 'pointerDown', 'pointerUp', 'rateChange', 'reset', 'seeked', 'submit', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'drag', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'mouseMove', 'mouseOut', 'mouseOver', 'pointerMove', 'pointerOut', 'pointerOver', 'scroll', 'toggle', 'touchMove', 'wheel', 'abort', 'animationEnd', 'animationIteration', 'animationStart', 'canPlay', 'canPlayThrough', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'playing', 'progress', 'seeking', 'stalled', 'suspend', 'timeUpdate', 'transitionEnd', 'waiting', 'mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave', 'change', 'select', 'beforeInput', 'compositionEnd', 'compositionStart', 'compositionUpdate'];
2106
-
2107
- function buildSimulators() {
2108
- simulatedEventTypes.forEach(function (eventType) {
2109
- Simulate[eventType] = makeSimulator(eventType);
2110
- });
2111
- }
2112
-
2113
- buildSimulators();
2114
-
2115
- exports.Simulate = Simulate;
2116
- exports.act = act;
2117
- exports.findAllInRenderedTree = findAllInRenderedTree;
2118
- exports.findRenderedComponentWithType = findRenderedComponentWithType;
2119
- exports.findRenderedDOMComponentWithClass = findRenderedDOMComponentWithClass;
2120
- exports.findRenderedDOMComponentWithTag = findRenderedDOMComponentWithTag;
2121
- exports.isCompositeComponent = isCompositeComponent;
2122
- exports.isCompositeComponentWithType = isCompositeComponentWithType;
2123
- exports.isDOMComponent = isDOMComponent;
2124
- exports.isDOMComponentElement = isDOMComponentElement;
2125
- exports.isElement = isElement;
2126
- exports.isElementOfType = isElementOfType;
2127
- exports.mockComponent = mockComponent;
2128
- exports.nativeTouchData = nativeTouchData;
2129
- exports.renderIntoDocument = renderIntoDocument;
2130
- exports.scryRenderedComponentsWithType = scryRenderedComponentsWithType;
2131
- exports.scryRenderedDOMComponentsWithClass = scryRenderedDOMComponentsWithClass;
2132
- exports.scryRenderedDOMComponentsWithTag = scryRenderedDOMComponentsWithTag;
2133
- exports.traverseTwoPhase = traverseTwoPhase;
2134
- exports.unstable_concurrentAct = unstable_concurrentAct;
2135
-
2136
- })));