@envive-ai/react-widgets 0.1.2-arthur-3 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/dist/SearchResults/SearchResults.cjs +86 -0
  2. package/dist/SearchResults/SearchResults.js +84 -0
  3. package/dist/SearchResults/SearchResultsWidget.cjs +34 -0
  4. package/dist/SearchResults/SearchResultsWidget.js +33 -0
  5. package/dist/SearchResults/index.cjs +2 -122
  6. package/dist/SearchResults/index.d.cts +2 -0
  7. package/dist/SearchResults/index.d.ts +2 -0
  8. package/dist/SearchResults/index.js +1 -119
  9. package/dist/SearchResults/withSearchResults.cjs +18 -0
  10. package/dist/SearchResults/withSearchResults.js +17 -0
  11. package/dist/SearchZeroState/SearchIcon.cjs +48 -0
  12. package/dist/SearchZeroState/SearchIcon.js +45 -0
  13. package/dist/SearchZeroState/SearchOverlay.cjs +42 -0
  14. package/dist/SearchZeroState/SearchOverlay.js +39 -0
  15. package/dist/SearchZeroState/SearchZeroState.cjs +173 -0
  16. package/dist/SearchZeroState/SearchZeroState.d.cts +7 -0
  17. package/dist/SearchZeroState/SearchZeroState.d.ts +7 -0
  18. package/dist/SearchZeroState/SearchZeroState.js +171 -0
  19. package/dist/SearchZeroState/SearchZeroStateWidget.cjs +23 -0
  20. package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +15 -0
  21. package/dist/SearchZeroState/SearchZeroStateWidget.d.ts +15 -0
  22. package/dist/SearchZeroState/SearchZeroStateWidget.js +22 -0
  23. package/dist/SearchZeroState/components/RecommendedProducts.cjs +74 -0
  24. package/dist/SearchZeroState/components/RecommendedProducts.js +72 -0
  25. package/dist/SearchZeroState/index.cjs +4 -2996
  26. package/dist/SearchZeroState/index.d.cts +4 -0
  27. package/dist/SearchZeroState/index.d.ts +4 -0
  28. package/dist/SearchZeroState/index.js +2 -2991
  29. package/dist/SearchZeroState/overlay/overlayHostLocator.cjs +21 -0
  30. package/dist/SearchZeroState/overlay/overlayHostLocator.js +20 -0
  31. package/dist/SearchZeroState/types.d.cts +10 -0
  32. package/dist/SearchZeroState/types.d.ts +10 -0
  33. package/dist/SearchZeroState/zeroStateSearchVariants.cjs +21 -0
  34. package/dist/SearchZeroState/zeroStateSearchVariants.js +20 -0
  35. package/dist/SuggestionBar/SuggestionBar.cjs +74 -0
  36. package/dist/SuggestionBar/{index-DZU9kbWS.d.cts → SuggestionBar.d.cts} +4 -9
  37. package/dist/SuggestionBar/{index-DyXd4-b7.d.ts → SuggestionBar.d.ts} +6 -11
  38. package/dist/SuggestionBar/SuggestionBar.js +72 -0
  39. package/dist/SuggestionBar/index.cjs +3 -3
  40. package/dist/SuggestionBar/index.d.cts +3 -0
  41. package/dist/SuggestionBar/index.d.ts +3 -0
  42. package/dist/SuggestionBar/index.js +2 -2
  43. package/dist/SuggestionBar/types.cjs +10 -0
  44. package/dist/SuggestionBar/types.d.cts +7 -0
  45. package/dist/SuggestionBar/types.d.ts +7 -0
  46. package/dist/SuggestionBar/types.js +9 -0
  47. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +76 -0
  48. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +6 -0
  49. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +6 -0
  50. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +75 -0
  51. package/dist/SuggestionButtonContainer/index.cjs +1 -1
  52. package/dist/SuggestionButtonContainer/index.d.cts +3 -0
  53. package/dist/SuggestionButtonContainer/index.d.ts +3 -0
  54. package/dist/SuggestionButtonContainer/index.js +1 -1
  55. package/dist/SuggestionButtonContainer/{index-B_X537jw.d.cts → types.d.cts} +1 -4
  56. package/dist/SuggestionButtonContainer/{index-vwelzDzM.d.ts → types.d.ts} +1 -4
  57. package/dist/_virtual/rolldown_runtime.cjs +33 -0
  58. package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
  59. package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
  60. package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
  61. package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
  62. package/dist/node_modules/react-icons/md/index.cjs +35 -0
  63. package/dist/node_modules/react-icons/md/index.js +35 -0
  64. package/dist/{SuggestionBar-BOThXJvJ.cjs → node_modules/react-indiana-drag-scroll/dist/index.cjs} +6 -139
  65. package/dist/node_modules/uuid/dist/native.js +6 -0
  66. package/dist/node_modules/uuid/dist/rng.js +13 -0
  67. package/dist/node_modules/uuid/dist/stringify.js +9 -0
  68. package/dist/node_modules/uuid/dist/v4.js +27 -0
  69. package/dist/node_modules/uuid/dist-node/native.cjs +8 -0
  70. package/dist/node_modules/uuid/dist-node/rng.cjs +16 -0
  71. package/dist/node_modules/uuid/dist-node/stringify.cjs +10 -0
  72. package/dist/node_modules/uuid/dist-node/v4.cjs +27 -0
  73. package/dist/packages/components/dist/components/Accordion/Accordion.cjs +80 -0
  74. package/dist/packages/components/dist/components/Accordion/Accordion.js +78 -0
  75. package/dist/packages/components/dist/components/Accordion/index.cjs +1 -0
  76. package/dist/packages/components/dist/components/Accordion/index.js +1 -0
  77. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.cjs +30 -0
  78. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.js +29 -0
  79. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.cjs +56 -0
  80. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.js +54 -0
  81. package/dist/packages/components/dist/components/ButtonBase/index.cjs +2 -0
  82. package/dist/packages/components/dist/components/ButtonBase/index.js +2 -0
  83. package/dist/packages/components/dist/components/ButtonBase/types.cjs +11 -0
  84. package/dist/packages/components/dist/components/ButtonBase/types.js +10 -0
  85. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.cjs +45 -0
  86. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.js +42 -0
  87. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +33 -0
  88. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +30 -0
  89. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.cjs +45 -0
  90. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.js +42 -0
  91. package/dist/packages/components/dist/components/ImageWithFallback/index.cjs +1 -0
  92. package/dist/packages/components/dist/components/ImageWithFallback/index.js +1 -0
  93. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.cjs +30 -0
  94. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.js +29 -0
  95. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.cjs +26 -0
  96. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.js +24 -0
  97. package/dist/packages/components/dist/components/ModalSheet/desktop/index.cjs +122 -0
  98. package/dist/packages/components/dist/components/ModalSheet/desktop/index.js +120 -0
  99. package/dist/packages/components/dist/components/ModalSheet/index.cjs +1 -0
  100. package/dist/packages/components/dist/components/ModalSheet/index.js +1 -0
  101. package/dist/packages/components/dist/components/ModalSheet/mobile/index.cjs +116 -0
  102. package/dist/packages/components/dist/components/ModalSheet/mobile/index.js +114 -0
  103. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.cjs +38 -0
  104. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.js +36 -0
  105. package/dist/packages/components/dist/components/ProductCard/ProductCard.cjs +153 -0
  106. package/dist/packages/components/dist/components/ProductCard/ProductCard.js +149 -0
  107. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.cjs +33 -0
  108. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.js +31 -0
  109. package/dist/packages/components/dist/components/ProductCard/index.cjs +4 -0
  110. package/dist/packages/components/dist/components/ProductCard/index.js +4 -0
  111. package/dist/packages/components/dist/components/ProductCard/productCardVariants.cjs +49 -0
  112. package/dist/packages/components/dist/components/ProductCard/productCardVariants.js +45 -0
  113. package/dist/packages/components/dist/components/ProductCard/types.cjs +10 -0
  114. package/dist/packages/components/dist/components/ProductCard/types.js +9 -0
  115. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.cjs +43 -0
  116. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.js +41 -0
  117. package/dist/packages/components/dist/components/ProductGrid/index.cjs +2 -0
  118. package/dist/packages/components/dist/components/ProductGrid/index.js +2 -0
  119. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.cjs +21 -0
  120. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.js +20 -0
  121. package/dist/packages/components/dist/components/RadioButton/RadioButton.cjs +74 -0
  122. package/dist/packages/components/dist/components/RadioButton/RadioButton.js +72 -0
  123. package/dist/packages/components/dist/components/RadioButton/index.cjs +1 -0
  124. package/dist/packages/components/dist/components/RadioButton/index.js +1 -0
  125. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.cjs +42 -0
  126. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.js +39 -0
  127. package/dist/packages/components/dist/components/RadioButtonGroup/index.cjs +1 -0
  128. package/dist/packages/components/dist/components/RadioButtonGroup/index.js +1 -0
  129. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.cjs +53 -0
  130. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.js +51 -0
  131. package/dist/packages/components/dist/components/RecommendedProducts/index.cjs +3 -0
  132. package/dist/packages/components/dist/components/RecommendedProducts/index.js +3 -0
  133. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +72 -0
  134. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.js +69 -0
  135. package/dist/packages/components/dist/components/SearchAutocomplete/index.cjs +1 -0
  136. package/dist/packages/components/dist/components/SearchAutocomplete/index.js +1 -0
  137. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.cjs +134 -0
  138. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.js +132 -0
  139. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.cjs +48 -0
  140. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.js +46 -0
  141. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.cjs +42 -0
  142. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.js +40 -0
  143. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.cjs +6 -0
  144. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.js +4 -0
  145. package/dist/packages/components/dist/components/SearchFilter/index.cjs +5 -0
  146. package/dist/packages/components/dist/components/SearchFilter/index.js +5 -0
  147. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.cjs +27 -0
  148. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.js +26 -0
  149. package/dist/packages/components/dist/components/SearchFilter/utils.cjs +11 -0
  150. package/dist/packages/components/dist/components/SearchFilter/utils.js +9 -0
  151. package/dist/packages/components/dist/components/SearchInput/SearchInput.cjs +81 -0
  152. package/dist/packages/components/dist/components/SearchInput/SearchInput.js +78 -0
  153. package/dist/packages/components/dist/components/SearchInput/index.cjs +2 -0
  154. package/dist/packages/components/dist/components/SearchInput/index.js +2 -0
  155. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.cjs +15 -0
  156. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.js +15 -0
  157. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.cjs +57 -0
  158. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.js +55 -0
  159. package/dist/packages/components/dist/components/SearchInputForm/index.cjs +1 -0
  160. package/dist/packages/components/dist/components/SearchInputForm/index.js +1 -0
  161. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
  162. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
  163. package/dist/packages/components/dist/components/SearchResultsContent/index.cjs +1 -0
  164. package/dist/packages/components/dist/components/SearchResultsContent/index.js +1 -0
  165. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +24 -0
  166. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +23 -0
  167. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.cjs +3 -0
  168. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.js +3 -0
  169. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
  170. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
  171. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.cjs +3 -0
  172. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.js +3 -0
  173. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +9 -0
  174. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.js +9 -0
  175. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.cjs +2 -0
  176. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.js +2 -0
  177. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs +34 -0
  178. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +34 -0
  179. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +56 -0
  180. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.js +54 -0
  181. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.cjs +53 -0
  182. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.js +51 -0
  183. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
  184. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +51 -0
  185. package/dist/packages/components/dist/components/SearchResultsStates/index.cjs +3 -0
  186. package/dist/packages/components/dist/components/SearchResultsStates/index.js +3 -0
  187. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
  188. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
  189. package/dist/packages/components/dist/components/SearchResultsToolbar/index.cjs +3 -0
  190. package/dist/packages/components/dist/components/SearchResultsToolbar/index.js +3 -0
  191. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.cjs +77 -0
  192. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.js +75 -0
  193. package/dist/packages/components/dist/components/SparkleAnimation/index.cjs +2 -0
  194. package/dist/packages/components/dist/components/SparkleAnimation/index.js +2 -0
  195. package/dist/packages/components/dist/components/SparkleAnimation/types.cjs +12 -0
  196. package/dist/packages/components/dist/components/SparkleAnimation/types.js +11 -0
  197. package/dist/packages/components/dist/components/Spinner/Spinner.cjs +40 -0
  198. package/dist/packages/components/dist/components/Spinner/Spinner.js +38 -0
  199. package/dist/packages/components/dist/components/Spinner/index.cjs +1 -0
  200. package/dist/packages/components/dist/components/Spinner/index.js +1 -0
  201. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.cjs +193 -0
  202. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.js +188 -0
  203. package/dist/packages/components/dist/components/SuggestionButton/index.cjs +1 -0
  204. package/dist/packages/components/dist/components/SuggestionButton/index.js +1 -0
  205. package/dist/packages/components/dist/components/TextInput/TextInput.cjs +34 -0
  206. package/dist/packages/components/dist/components/TextInput/TextInput.js +31 -0
  207. package/dist/packages/components/dist/components/TextInput/index.cjs +1 -0
  208. package/dist/packages/components/dist/components/TextInput/index.js +1 -0
  209. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.cjs +63 -0
  210. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.js +61 -0
  211. package/dist/packages/components/dist/components/ToggleButton/index.cjs +1 -0
  212. package/dist/packages/components/dist/components/ToggleButton/index.js +1 -0
  213. package/dist/packages/components/dist/components/Typography/Typography.cjs +53 -0
  214. package/dist/packages/components/dist/components/Typography/Typography.js +50 -0
  215. package/dist/packages/components/dist/components/Typography/index.cjs +2 -0
  216. package/dist/packages/components/dist/components/Typography/index.js +2 -0
  217. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.cjs +99 -0
  218. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.js +96 -0
  219. package/dist/packages/components/dist/components/Typography/util.cjs +10 -0
  220. package/dist/packages/components/dist/components/Typography/util.js +10 -0
  221. package/dist/packages/components/dist/logging/logger.cjs +20 -0
  222. package/dist/packages/components/dist/logging/logger.js +19 -0
  223. package/dist/packages/components/dist/models/colorsConfig.cjs +28 -0
  224. package/dist/packages/components/dist/models/colorsConfig.js +26 -0
  225. package/dist/packages/components/dist/util/formatPrice.cjs +14 -0
  226. package/dist/packages/components/dist/util/formatPrice.js +13 -0
  227. package/dist/packages/components/dist/util/index.cjs +3 -0
  228. package/dist/packages/components/dist/util/index.js +3 -0
  229. package/dist/packages/components/dist/util/useScrollDirection.cjs +39 -0
  230. package/dist/packages/components/dist/util/useScrollDirection.js +38 -0
  231. package/dist/packages/components/dist/util/useStickyVisibility.cjs +38 -0
  232. package/dist/packages/components/dist/util/useStickyVisibility.js +37 -0
  233. package/dist/packages/icons/dist/AiSearchBold.cjs +38 -0
  234. package/dist/packages/icons/dist/AiSearchBold.js +38 -0
  235. package/dist/packages/icons/dist/AiSearchThin.cjs +35 -0
  236. package/dist/packages/icons/dist/AiSearchThin.js +35 -0
  237. package/dist/packages/icons/dist/ChevronDown.cjs +23 -0
  238. package/dist/packages/icons/dist/ChevronDown.js +23 -0
  239. package/dist/packages/icons/dist/FourPointStar.cjs +22 -0
  240. package/dist/packages/icons/dist/FourPointStar.js +22 -0
  241. package/dist/packages/icons/dist/IconClose.cjs +26 -0
  242. package/dist/packages/icons/dist/IconClose.js +26 -0
  243. package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
  244. package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
  245. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.cjs +39 -0
  246. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.js +39 -0
  247. package/dist/packages/icons/dist/OutlinedStar.cjs +22 -0
  248. package/dist/packages/icons/dist/OutlinedStar.js +22 -0
  249. package/dist/packages/icons/dist/SettingsVariant.cjs +72 -0
  250. package/dist/packages/icons/dist/SettingsVariant.js +72 -0
  251. package/dist/packages/icons/dist/Sparkles.cjs +43 -0
  252. package/dist/packages/icons/dist/Sparkles.js +43 -0
  253. package/dist/{chunk-DWy1uDak.cjs → packages/icons/dist/_virtual/rolldown_runtime.cjs} +4 -14
  254. package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +27 -0
  255. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
  256. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
  257. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
  258. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
  259. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
  260. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
  261. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
  262. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
  263. package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
  264. package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
  265. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
  266. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
  267. package/dist/util/useHorizontalScrollAnimation.cjs +88 -0
  268. package/dist/util/useHorizontalScrollAnimation.js +87 -0
  269. package/dist/util/useReducedMotionWithOverride.cjs +15 -0
  270. package/dist/util/useReducedMotionWithOverride.js +14 -0
  271. package/package.json +14 -8
  272. package/src/SearchResults/SearchResults.tsx +2 -4
  273. package/src/SearchResults/SearchResultsWidget.tsx +1 -1
  274. package/src/SearchResults/types.ts +0 -3
  275. package/src/SearchZeroState/SearchIcon.tsx +16 -9
  276. package/src/SearchZeroState/SearchOverlay.tsx +3 -2
  277. package/src/SearchZeroState/SearchZeroState.tsx +15 -18
  278. package/src/SearchZeroState/SearchZeroStateWidget.tsx +17 -8
  279. package/src/SearchZeroState/components/RecommendedProducts.tsx +8 -3
  280. package/src/SearchZeroState/overlay/overlayHostLocator.ts +2 -4
  281. package/src/SearchZeroState/types.ts +4 -1
  282. package/src/SearchZeroState/zeroStateSearchVariants.ts +14 -5
  283. package/src/SuggestionBar/SuggestionBar.tsx +12 -20
  284. package/src/SuggestionBar/types.ts +3 -3
  285. package/src/SuggestionButtonContainer/SuggestionButtonContainer.tsx +8 -17
  286. package/src/SuggestionButtonContainer/types.ts +3 -4
  287. package/src/stories/SearchResults.stories.tsx +1 -1
  288. package/src/stories/SearchZeroState.stories.tsx +10 -2
  289. package/src/stories/SuggestionBar.stories.tsx +1 -2
  290. package/src/util/useHorizontalScrollAnimation.ts +1 -1
  291. package/dist/SearchZeroState/index-19CiYvee.d.cts +0 -27
  292. package/dist/SearchZeroState/index-6EaGWYP4.d.ts +0 -27
  293. package/dist/SuggestionBar-DeMmAK4M.js +0 -131
  294. package/dist/SuggestionButtonContainer-BeWPpeQk.cjs +0 -173
  295. package/dist/SuggestionButtonContainer-CZhOkZaJ.js +0 -167
  296. /package/dist/SearchResults/{index-D8nrHueo.d.ts → SearchResultsWidget.d.cts} +0 -0
  297. /package/dist/SearchResults/{index-D52sX_I2.d.cts → SearchResultsWidget.d.ts} +0 -0
@@ -1,2993 +1,4 @@
1
- import { t as SuggestionBar } from "../SuggestionBar-DeMmAK4M.js";
2
- import "../SuggestionButtonContainer-CZhOkZaJ.js";
3
- import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
- import { useNewOrgConfig } from "@envive-ai/react-hooks/hooks/NewOrgConfig";
5
- import classNames from "classnames";
6
- import { useSearch } from "@envive-ai/react-hooks/hooks/Search";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { AnimatePresence, motion } from "framer-motion";
9
- import { useAmplitudeTracking } from "@envive-ai/react-hooks/hooks/AmplitudeOperations";
10
- import { SuggestionBarLocationForMetrics } from "@envive-ai/react-hooks/types";
11
- import { ChatElementDisplayLocation, MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
12
- import { SpiffyMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
13
- import { SearchInputForm } from "@envive-ai/react-toolkit/SearchInputForm";
14
- import { SearchInput, searchInputVariantClasses } from "@envive-ai/react-toolkit/SearchInput";
15
- import { Typography } from "@envive-ai/react-toolkit/Typography";
16
- import { createPortal } from "react-dom";
17
- import { ColorNames, colorVar } from "@envive-ai/react-hooks/contexts/types";
18
- import { ProductGrid } from "@envive-ai/react-toolkit/ProductGrid";
1
+ import { SearchZeroState } from "./SearchZeroState.js";
2
+ import { SearchZeroStateWidget } from "./SearchZeroStateWidget.js";
19
3
 
20
- //#region node_modules/@envive-ai/react-icons/dist/jsx-runtime-WKqb-nOR.js
21
- var __create = Object.create;
22
- var __defProp = Object.defineProperty;
23
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
24
- var __getOwnPropNames = Object.getOwnPropertyNames;
25
- var __getProtoOf = Object.getPrototypeOf;
26
- var __hasOwnProp = Object.prototype.hasOwnProperty;
27
- var __commonJS = (cb, mod) => function() {
28
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
29
- };
30
- var __copyProps = (to, from, except, desc) => {
31
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n$2 = keys.length, key; i < n$2; i++) {
32
- key = keys[i];
33
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
34
- get: ((k$1) => from[k$1]).bind(null, key),
35
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
36
- });
37
- }
38
- return to;
39
- };
40
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
41
- value: mod,
42
- enumerable: true
43
- }) : target, mod));
44
- var require_react_production_min = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react.production.min.js": ((exports) => {
45
- var l$1 = Symbol.for("react.element"), n$1 = Symbol.for("react.portal"), p$1 = Symbol.for("react.fragment"), q$1 = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator;
46
- function A(a) {
47
- if (null === a || "object" !== typeof a) return null;
48
- a = z && a[z] || a["@@iterator"];
49
- return "function" === typeof a ? a : null;
50
- }
51
- var B = {
52
- isMounted: function() {
53
- return !1;
54
- },
55
- enqueueForceUpdate: function() {},
56
- enqueueReplaceState: function() {},
57
- enqueueSetState: function() {}
58
- }, C = Object.assign, D = {};
59
- function E(a, b, e) {
60
- this.props = a;
61
- this.context = b;
62
- this.refs = D;
63
- this.updater = e || B;
64
- }
65
- E.prototype.isReactComponent = {};
66
- E.prototype.setState = function(a, b) {
67
- if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
68
- this.updater.enqueueSetState(this, a, b, "setState");
69
- };
70
- E.prototype.forceUpdate = function(a) {
71
- this.updater.enqueueForceUpdate(this, a, "forceUpdate");
72
- };
73
- function F() {}
74
- F.prototype = E.prototype;
75
- function G(a, b, e) {
76
- this.props = a;
77
- this.context = b;
78
- this.refs = D;
79
- this.updater = e || B;
80
- }
81
- var H = G.prototype = new F();
82
- H.constructor = G;
83
- C(H, E.prototype);
84
- H.isPureReactComponent = !0;
85
- var I = Array.isArray, J = Object.prototype.hasOwnProperty, K = { current: null }, L = {
86
- key: !0,
87
- ref: !0,
88
- __self: !0,
89
- __source: !0
90
- };
91
- function M(a, b, e) {
92
- var d, c = {}, k$1 = null, h = null;
93
- if (null != b) for (d in void 0 !== b.ref && (h = b.ref), void 0 !== b.key && (k$1 = "" + b.key), b) J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
94
- var g = arguments.length - 2;
95
- if (1 === g) c.children = e;
96
- else if (1 < g) {
97
- for (var f$1 = Array(g), m$1 = 0; m$1 < g; m$1++) f$1[m$1] = arguments[m$1 + 2];
98
- c.children = f$1;
99
- }
100
- if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
101
- return {
102
- $$typeof: l$1,
103
- type: a,
104
- key: k$1,
105
- ref: h,
106
- props: c,
107
- _owner: K.current
108
- };
109
- }
110
- function N(a, b) {
111
- return {
112
- $$typeof: l$1,
113
- type: a.type,
114
- key: b,
115
- ref: a.ref,
116
- props: a.props,
117
- _owner: a._owner
118
- };
119
- }
120
- function O(a) {
121
- return "object" === typeof a && null !== a && a.$$typeof === l$1;
122
- }
123
- function escape(a) {
124
- var b = {
125
- "=": "=0",
126
- ":": "=2"
127
- };
128
- return "$" + a.replace(/[=:]/g, function(a$1) {
129
- return b[a$1];
130
- });
131
- }
132
- var P = /\/+/g;
133
- function Q(a, b) {
134
- return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
135
- }
136
- function R(a, b, e, d, c) {
137
- var k$1 = typeof a;
138
- if ("undefined" === k$1 || "boolean" === k$1) a = null;
139
- var h = !1;
140
- if (null === a) h = !0;
141
- else switch (k$1) {
142
- case "string":
143
- case "number":
144
- h = !0;
145
- break;
146
- case "object": switch (a.$$typeof) {
147
- case l$1:
148
- case n$1: h = !0;
149
- }
150
- }
151
- if (h) return h = a, c = c(h), a = "" === d ? "." + Q(h, 0) : d, I(c) ? (e = "", null != a && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a$1) {
152
- return a$1;
153
- })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
154
- h = 0;
155
- d = "" === d ? "." : d + ":";
156
- if (I(a)) for (var g = 0; g < a.length; g++) {
157
- k$1 = a[g];
158
- var f$1 = d + Q(k$1, g);
159
- h += R(k$1, b, e, f$1, c);
160
- }
161
- else if (f$1 = A(a), "function" === typeof f$1) for (a = f$1.call(a), g = 0; !(k$1 = a.next()).done;) k$1 = k$1.value, f$1 = d + Q(k$1, g++), h += R(k$1, b, e, f$1, c);
162
- else if ("object" === k$1) throw b = String(a), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
163
- return h;
164
- }
165
- function S(a, b, e) {
166
- if (null == a) return a;
167
- var d = [], c = 0;
168
- R(a, d, "", "", function(a$1) {
169
- return b.call(e, a$1, c++);
170
- });
171
- return d;
172
- }
173
- function T(a) {
174
- if (-1 === a._status) {
175
- var b = a._result;
176
- b = b();
177
- b.then(function(b$1) {
178
- if (0 === a._status || -1 === a._status) a._status = 1, a._result = b$1;
179
- }, function(b$1) {
180
- if (0 === a._status || -1 === a._status) a._status = 2, a._result = b$1;
181
- });
182
- -1 === a._status && (a._status = 0, a._result = b);
183
- }
184
- if (1 === a._status) return a._result.default;
185
- throw a._result;
186
- }
187
- var U = { current: null }, V = { transition: null }, W = {
188
- ReactCurrentDispatcher: U,
189
- ReactCurrentBatchConfig: V,
190
- ReactCurrentOwner: K
191
- };
192
- function X() {
193
- throw Error("act(...) is not supported in production builds of React.");
194
- }
195
- exports.Children = {
196
- map: S,
197
- forEach: function(a, b, e) {
198
- S(a, function() {
199
- b.apply(this, arguments);
200
- }, e);
201
- },
202
- count: function(a) {
203
- var b = 0;
204
- S(a, function() {
205
- b++;
206
- });
207
- return b;
208
- },
209
- toArray: function(a) {
210
- return S(a, function(a$1) {
211
- return a$1;
212
- }) || [];
213
- },
214
- only: function(a) {
215
- if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
216
- return a;
217
- }
218
- };
219
- exports.Component = E;
220
- exports.Fragment = p$1;
221
- exports.Profiler = r;
222
- exports.PureComponent = G;
223
- exports.StrictMode = q$1;
224
- exports.Suspense = w;
225
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
226
- exports.act = X;
227
- exports.cloneElement = function(a, b, e) {
228
- if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
229
- var d = C({}, a.props), c = a.key, k$1 = a.ref, h = a._owner;
230
- if (null != b) {
231
- void 0 !== b.ref && (k$1 = b.ref, h = K.current);
232
- void 0 !== b.key && (c = "" + b.key);
233
- if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
234
- for (f$1 in b) J.call(b, f$1) && !L.hasOwnProperty(f$1) && (d[f$1] = void 0 === b[f$1] && void 0 !== g ? g[f$1] : b[f$1]);
235
- }
236
- var f$1 = arguments.length - 2;
237
- if (1 === f$1) d.children = e;
238
- else if (1 < f$1) {
239
- g = Array(f$1);
240
- for (var m$1 = 0; m$1 < f$1; m$1++) g[m$1] = arguments[m$1 + 2];
241
- d.children = g;
242
- }
243
- return {
244
- $$typeof: l$1,
245
- type: a.type,
246
- key: c,
247
- ref: k$1,
248
- props: d,
249
- _owner: h
250
- };
251
- };
252
- exports.createContext = function(a) {
253
- a = {
254
- $$typeof: u,
255
- _currentValue: a,
256
- _currentValue2: a,
257
- _threadCount: 0,
258
- Provider: null,
259
- Consumer: null,
260
- _defaultValue: null,
261
- _globalName: null
262
- };
263
- a.Provider = {
264
- $$typeof: t,
265
- _context: a
266
- };
267
- return a.Consumer = a;
268
- };
269
- exports.createElement = M;
270
- exports.createFactory = function(a) {
271
- var b = M.bind(null, a);
272
- b.type = a;
273
- return b;
274
- };
275
- exports.createRef = function() {
276
- return { current: null };
277
- };
278
- exports.forwardRef = function(a) {
279
- return {
280
- $$typeof: v,
281
- render: a
282
- };
283
- };
284
- exports.isValidElement = O;
285
- exports.lazy = function(a) {
286
- return {
287
- $$typeof: y,
288
- _payload: {
289
- _status: -1,
290
- _result: a
291
- },
292
- _init: T
293
- };
294
- };
295
- exports.memo = function(a, b) {
296
- return {
297
- $$typeof: x,
298
- type: a,
299
- compare: void 0 === b ? null : b
300
- };
301
- };
302
- exports.startTransition = function(a) {
303
- var b = V.transition;
304
- V.transition = {};
305
- try {
306
- a();
307
- } finally {
308
- V.transition = b;
309
- }
310
- };
311
- exports.unstable_act = X;
312
- exports.useCallback = function(a, b) {
313
- return U.current.useCallback(a, b);
314
- };
315
- exports.useContext = function(a) {
316
- return U.current.useContext(a);
317
- };
318
- exports.useDebugValue = function() {};
319
- exports.useDeferredValue = function(a) {
320
- return U.current.useDeferredValue(a);
321
- };
322
- exports.useEffect = function(a, b) {
323
- return U.current.useEffect(a, b);
324
- };
325
- exports.useId = function() {
326
- return U.current.useId();
327
- };
328
- exports.useImperativeHandle = function(a, b, e) {
329
- return U.current.useImperativeHandle(a, b, e);
330
- };
331
- exports.useInsertionEffect = function(a, b) {
332
- return U.current.useInsertionEffect(a, b);
333
- };
334
- exports.useLayoutEffect = function(a, b) {
335
- return U.current.useLayoutEffect(a, b);
336
- };
337
- exports.useMemo = function(a, b) {
338
- return U.current.useMemo(a, b);
339
- };
340
- exports.useReducer = function(a, b, e) {
341
- return U.current.useReducer(a, b, e);
342
- };
343
- exports.useRef = function(a) {
344
- return U.current.useRef(a);
345
- };
346
- exports.useState = function(a) {
347
- return U.current.useState(a);
348
- };
349
- exports.useSyncExternalStore = function(a, b, e) {
350
- return U.current.useSyncExternalStore(a, b, e);
351
- };
352
- exports.useTransition = function() {
353
- return U.current.useTransition();
354
- };
355
- exports.version = "18.3.1";
356
- }) });
357
- var require_react_development = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react.development.js": ((exports, module) => {
358
- if (process.env.NODE_ENV !== "production") (function() {
359
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(/* @__PURE__ */ new Error());
360
- var ReactVersion = "18.3.1";
361
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
362
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
363
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
364
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
365
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
366
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
367
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
368
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
369
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
370
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
371
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
372
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
373
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
374
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
375
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
376
- function getIteratorFn(maybeIterable) {
377
- if (maybeIterable === null || typeof maybeIterable !== "object") return null;
378
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
379
- if (typeof maybeIterator === "function") return maybeIterator;
380
- return null;
381
- }
382
- /**
383
- * Keeps track of the current dispatcher.
384
- */
385
- var ReactCurrentDispatcher = { current: null };
386
- /**
387
- * Keeps track of the current batch's configuration such as how long an update
388
- * should suspend for if it needs to.
389
- */
390
- var ReactCurrentBatchConfig = { transition: null };
391
- var ReactCurrentActQueue = {
392
- current: null,
393
- isBatchingLegacy: false,
394
- didScheduleLegacyUpdate: false
395
- };
396
- /**
397
- * Keeps track of the current owner.
398
- *
399
- * The current owner is the component who should own any components that are
400
- * currently being constructed.
401
- */
402
- var ReactCurrentOwner = { current: null };
403
- var ReactDebugCurrentFrame = {};
404
- var currentExtraStackFrame = null;
405
- function setExtraStackFrame(stack) {
406
- currentExtraStackFrame = stack;
407
- }
408
- ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
409
- currentExtraStackFrame = stack;
410
- };
411
- ReactDebugCurrentFrame.getCurrentStack = null;
412
- ReactDebugCurrentFrame.getStackAddendum = function() {
413
- var stack = "";
414
- if (currentExtraStackFrame) stack += currentExtraStackFrame;
415
- var impl = ReactDebugCurrentFrame.getCurrentStack;
416
- if (impl) stack += impl() || "";
417
- return stack;
418
- };
419
- var enableScopeAPI = false;
420
- var enableCacheElement = false;
421
- var enableTransitionTracing = false;
422
- var enableLegacyHidden = false;
423
- var enableDebugTracing = false;
424
- var ReactSharedInternals = {
425
- ReactCurrentDispatcher,
426
- ReactCurrentBatchConfig,
427
- ReactCurrentOwner
428
- };
429
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
430
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
431
- function warn(format) {
432
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
433
- printWarning("warn", format, args);
434
- }
435
- function error(format) {
436
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
437
- printWarning("error", format, args);
438
- }
439
- function printWarning(level, format, args) {
440
- var stack = ReactSharedInternals.ReactDebugCurrentFrame.getStackAddendum();
441
- if (stack !== "") {
442
- format += "%s";
443
- args = args.concat([stack]);
444
- }
445
- var argsWithFormat = args.map(function(item) {
446
- return String(item);
447
- });
448
- argsWithFormat.unshift("Warning: " + format);
449
- Function.prototype.apply.call(console[level], console, argsWithFormat);
450
- }
451
- var didWarnStateUpdateForUnmountedComponent = {};
452
- function warnNoop(publicInstance, callerName) {
453
- var _constructor = publicInstance.constructor;
454
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
455
- var warningKey = componentName + "." + callerName;
456
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) return;
457
- error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
458
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
459
- }
460
- /**
461
- * This is the abstract API for an update queue.
462
- */
463
- var ReactNoopUpdateQueue = {
464
- isMounted: function(publicInstance) {
465
- return false;
466
- },
467
- enqueueForceUpdate: function(publicInstance, callback, callerName) {
468
- warnNoop(publicInstance, "forceUpdate");
469
- },
470
- enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
471
- warnNoop(publicInstance, "replaceState");
472
- },
473
- enqueueSetState: function(publicInstance, partialState, callback, callerName) {
474
- warnNoop(publicInstance, "setState");
475
- }
476
- };
477
- var assign = Object.assign;
478
- var emptyObject = {};
479
- Object.freeze(emptyObject);
480
- /**
481
- * Base class helpers for the updating state of a component.
482
- */
483
- function Component(props, context, updater) {
484
- this.props = props;
485
- this.context = context;
486
- this.refs = emptyObject;
487
- this.updater = updater || ReactNoopUpdateQueue;
488
- }
489
- Component.prototype.isReactComponent = {};
490
- /**
491
- * Sets a subset of the state. Always use this to mutate
492
- * state. You should treat `this.state` as immutable.
493
- *
494
- * There is no guarantee that `this.state` will be immediately updated, so
495
- * accessing `this.state` after calling this method may return the old value.
496
- *
497
- * There is no guarantee that calls to `setState` will run synchronously,
498
- * as they may eventually be batched together. You can provide an optional
499
- * callback that will be executed when the call to setState is actually
500
- * completed.
501
- *
502
- * When a function is provided to setState, it will be called at some point in
503
- * the future (not synchronously). It will be called with the up to date
504
- * component arguments (state, props, context). These values can be different
505
- * from this.* because your function may be called after receiveProps but before
506
- * shouldComponentUpdate, and this new state, props, and context will not yet be
507
- * assigned to this.
508
- *
509
- * @param {object|function} partialState Next partial state or function to
510
- * produce next partial state to be merged with current state.
511
- * @param {?function} callback Called after state is updated.
512
- * @final
513
- * @protected
514
- */
515
- Component.prototype.setState = function(partialState, callback) {
516
- if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
517
- this.updater.enqueueSetState(this, partialState, callback, "setState");
518
- };
519
- /**
520
- * Forces an update. This should only be invoked when it is known with
521
- * certainty that we are **not** in a DOM transaction.
522
- *
523
- * You may want to call this when you know that some deeper aspect of the
524
- * component's state has changed but `setState` was not called.
525
- *
526
- * This will not invoke `shouldComponentUpdate`, but it will invoke
527
- * `componentWillUpdate` and `componentDidUpdate`.
528
- *
529
- * @param {?function} callback Called after update is complete.
530
- * @final
531
- * @protected
532
- */
533
- Component.prototype.forceUpdate = function(callback) {
534
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
535
- };
536
- var deprecatedAPIs = {
537
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
538
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
539
- };
540
- var defineDeprecationWarning = function(methodName, info) {
541
- Object.defineProperty(Component.prototype, methodName, { get: function() {
542
- warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
543
- } });
544
- };
545
- for (var fnName in deprecatedAPIs) if (deprecatedAPIs.hasOwnProperty(fnName)) defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
546
- function ComponentDummy() {}
547
- ComponentDummy.prototype = Component.prototype;
548
- /**
549
- * Convenience component with default shallow equality check for sCU.
550
- */
551
- function PureComponent(props, context, updater) {
552
- this.props = props;
553
- this.context = context;
554
- this.refs = emptyObject;
555
- this.updater = updater || ReactNoopUpdateQueue;
556
- }
557
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
558
- pureComponentPrototype.constructor = PureComponent;
559
- assign(pureComponentPrototype, Component.prototype);
560
- pureComponentPrototype.isPureReactComponent = true;
561
- function createRef() {
562
- var refObject = { current: null };
563
- Object.seal(refObject);
564
- return refObject;
565
- }
566
- var isArrayImpl = Array.isArray;
567
- function isArray(a) {
568
- return isArrayImpl(a);
569
- }
570
- function typeName(value) {
571
- return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
572
- }
573
- function willCoercionThrow(value) {
574
- try {
575
- testStringCoercion(value);
576
- return false;
577
- } catch (e) {
578
- return true;
579
- }
580
- }
581
- function testStringCoercion(value) {
582
- return "" + value;
583
- }
584
- function checkKeyStringCoercion(value) {
585
- if (willCoercionThrow(value)) {
586
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
587
- return testStringCoercion(value);
588
- }
589
- }
590
- function getWrappedName(outerType, innerType, wrapperName) {
591
- var displayName = outerType.displayName;
592
- if (displayName) return displayName;
593
- var functionName = innerType.displayName || innerType.name || "";
594
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
595
- }
596
- function getContextName(type) {
597
- return type.displayName || "Context";
598
- }
599
- function getComponentNameFromType(type) {
600
- if (type == null) return null;
601
- if (typeof type.tag === "number") error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
602
- if (typeof type === "function") return type.displayName || type.name || null;
603
- if (typeof type === "string") return type;
604
- switch (type) {
605
- case REACT_FRAGMENT_TYPE: return "Fragment";
606
- case REACT_PORTAL_TYPE: return "Portal";
607
- case REACT_PROFILER_TYPE: return "Profiler";
608
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
609
- case REACT_SUSPENSE_TYPE: return "Suspense";
610
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
611
- }
612
- if (typeof type === "object") switch (type.$$typeof) {
613
- case REACT_CONTEXT_TYPE: return getContextName(type) + ".Consumer";
614
- case REACT_PROVIDER_TYPE: return getContextName(type._context) + ".Provider";
615
- case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef");
616
- case REACT_MEMO_TYPE:
617
- var outerName = type.displayName || null;
618
- if (outerName !== null) return outerName;
619
- return getComponentNameFromType(type.type) || "Memo";
620
- case REACT_LAZY_TYPE:
621
- var lazyComponent = type;
622
- var payload = lazyComponent._payload;
623
- var init = lazyComponent._init;
624
- try {
625
- return getComponentNameFromType(init(payload));
626
- } catch (x$1) {
627
- return null;
628
- }
629
- }
630
- return null;
631
- }
632
- var hasOwnProperty = Object.prototype.hasOwnProperty;
633
- var RESERVED_PROPS = {
634
- key: true,
635
- ref: true,
636
- __self: true,
637
- __source: true
638
- };
639
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs = {};
640
- function hasValidRef(config) {
641
- if (hasOwnProperty.call(config, "ref")) {
642
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
643
- if (getter && getter.isReactWarning) return false;
644
- }
645
- return config.ref !== void 0;
646
- }
647
- function hasValidKey(config) {
648
- if (hasOwnProperty.call(config, "key")) {
649
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
650
- if (getter && getter.isReactWarning) return false;
651
- }
652
- return config.key !== void 0;
653
- }
654
- function defineKeyPropWarningGetter(props, displayName) {
655
- var warnAboutAccessingKey = function() {
656
- if (!specialPropKeyWarningShown) {
657
- specialPropKeyWarningShown = true;
658
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
659
- }
660
- };
661
- warnAboutAccessingKey.isReactWarning = true;
662
- Object.defineProperty(props, "key", {
663
- get: warnAboutAccessingKey,
664
- configurable: true
665
- });
666
- }
667
- function defineRefPropWarningGetter(props, displayName) {
668
- var warnAboutAccessingRef = function() {
669
- if (!specialPropRefWarningShown) {
670
- specialPropRefWarningShown = true;
671
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
672
- }
673
- };
674
- warnAboutAccessingRef.isReactWarning = true;
675
- Object.defineProperty(props, "ref", {
676
- get: warnAboutAccessingRef,
677
- configurable: true
678
- });
679
- }
680
- function warnIfStringRefCannotBeAutoConverted(config) {
681
- if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
682
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
683
- if (!didWarnAboutStringRefs[componentName]) {
684
- error("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", componentName, config.ref);
685
- didWarnAboutStringRefs[componentName] = true;
686
- }
687
- }
688
- }
689
- /**
690
- * Factory method to create a new React element. This no longer adheres to
691
- * the class pattern, so do not use new to call it. Also, instanceof check
692
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
693
- * if something is a React Element.
694
- *
695
- * @param {*} type
696
- * @param {*} props
697
- * @param {*} key
698
- * @param {string|object} ref
699
- * @param {*} owner
700
- * @param {*} self A *temporary* helper to detect places where `this` is
701
- * different from the `owner` when React.createElement is called, so that we
702
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
703
- * functions, and as long as `this` and owner are the same, there will be no
704
- * change in behavior.
705
- * @param {*} source An annotation object (added by a transpiler or otherwise)
706
- * indicating filename, line number, and/or other information.
707
- * @internal
708
- */
709
- var ReactElement = function(type, key, ref, self, source, owner, props) {
710
- var element = {
711
- $$typeof: REACT_ELEMENT_TYPE,
712
- type,
713
- key,
714
- ref,
715
- props,
716
- _owner: owner
717
- };
718
- element._store = {};
719
- Object.defineProperty(element._store, "validated", {
720
- configurable: false,
721
- enumerable: false,
722
- writable: true,
723
- value: false
724
- });
725
- Object.defineProperty(element, "_self", {
726
- configurable: false,
727
- enumerable: false,
728
- writable: false,
729
- value: self
730
- });
731
- Object.defineProperty(element, "_source", {
732
- configurable: false,
733
- enumerable: false,
734
- writable: false,
735
- value: source
736
- });
737
- if (Object.freeze) {
738
- Object.freeze(element.props);
739
- Object.freeze(element);
740
- }
741
- return element;
742
- };
743
- /**
744
- * Create and return a new ReactElement of the given type.
745
- * See https://reactjs.org/docs/react-api.html#createelement
746
- */
747
- function createElement(type, config, children) {
748
- var propName;
749
- var props = {};
750
- var key = null;
751
- var ref = null;
752
- var self = null;
753
- var source = null;
754
- if (config != null) {
755
- if (hasValidRef(config)) {
756
- ref = config.ref;
757
- warnIfStringRefCannotBeAutoConverted(config);
758
- }
759
- if (hasValidKey(config)) {
760
- checkKeyStringCoercion(config.key);
761
- key = "" + config.key;
762
- }
763
- self = config.__self === void 0 ? null : config.__self;
764
- source = config.__source === void 0 ? null : config.__source;
765
- for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];
766
- }
767
- var childrenLength = arguments.length - 2;
768
- if (childrenLength === 1) props.children = children;
769
- else if (childrenLength > 1) {
770
- var childArray = Array(childrenLength);
771
- for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
772
- if (Object.freeze) Object.freeze(childArray);
773
- props.children = childArray;
774
- }
775
- if (type && type.defaultProps) {
776
- var defaultProps = type.defaultProps;
777
- for (propName in defaultProps) if (props[propName] === void 0) props[propName] = defaultProps[propName];
778
- }
779
- if (key || ref) {
780
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
781
- if (key) defineKeyPropWarningGetter(props, displayName);
782
- if (ref) defineRefPropWarningGetter(props, displayName);
783
- }
784
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
785
- }
786
- function cloneAndReplaceKey(oldElement, newKey) {
787
- return ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
788
- }
789
- /**
790
- * Clone and return a new ReactElement using element as the starting point.
791
- * See https://reactjs.org/docs/react-api.html#cloneelement
792
- */
793
- function cloneElement(element, config, children) {
794
- if (element === null || element === void 0) throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
795
- var propName;
796
- var props = assign({}, element.props);
797
- var key = element.key;
798
- var ref = element.ref;
799
- var self = element._self;
800
- var source = element._source;
801
- var owner = element._owner;
802
- if (config != null) {
803
- if (hasValidRef(config)) {
804
- ref = config.ref;
805
- owner = ReactCurrentOwner.current;
806
- }
807
- if (hasValidKey(config)) {
808
- checkKeyStringCoercion(config.key);
809
- key = "" + config.key;
810
- }
811
- var defaultProps;
812
- if (element.type && element.type.defaultProps) defaultProps = element.type.defaultProps;
813
- for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) if (config[propName] === void 0 && defaultProps !== void 0) props[propName] = defaultProps[propName];
814
- else props[propName] = config[propName];
815
- }
816
- var childrenLength = arguments.length - 2;
817
- if (childrenLength === 1) props.children = children;
818
- else if (childrenLength > 1) {
819
- var childArray = Array(childrenLength);
820
- for (var i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
821
- props.children = childArray;
822
- }
823
- return ReactElement(element.type, key, ref, self, source, owner, props);
824
- }
825
- /**
826
- * Verifies the object is a ReactElement.
827
- * See https://reactjs.org/docs/react-api.html#isvalidelement
828
- * @param {?object} object
829
- * @return {boolean} True if `object` is a ReactElement.
830
- * @final
831
- */
832
- function isValidElement(object) {
833
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
834
- }
835
- var SEPARATOR = ".";
836
- var SUBSEPARATOR = ":";
837
- /**
838
- * Escape and wrap key so it is safe to use as a reactid
839
- *
840
- * @param {string} key to be escaped.
841
- * @return {string} the escaped key.
842
- */
843
- function escape$1(key) {
844
- var escapeRegex = /[=:]/g;
845
- var escaperLookup = {
846
- "=": "=0",
847
- ":": "=2"
848
- };
849
- return "$" + key.replace(escapeRegex, function(match) {
850
- return escaperLookup[match];
851
- });
852
- }
853
- /**
854
- * TODO: Test that a single child and an array with one item have the same key
855
- * pattern.
856
- */
857
- var didWarnAboutMaps = false;
858
- var userProvidedKeyEscapeRegex = /\/+/g;
859
- function escapeUserProvidedKey(text) {
860
- return text.replace(userProvidedKeyEscapeRegex, "$&/");
861
- }
862
- /**
863
- * Generate a key string that identifies a element within a set.
864
- *
865
- * @param {*} element A element that could contain a manual key.
866
- * @param {number} index Index that is used if a manual key is not provided.
867
- * @return {string}
868
- */
869
- function getElementKey(element, index) {
870
- if (typeof element === "object" && element !== null && element.key != null) {
871
- checkKeyStringCoercion(element.key);
872
- return escape$1("" + element.key);
873
- }
874
- return index.toString(36);
875
- }
876
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
877
- var type = typeof children;
878
- if (type === "undefined" || type === "boolean") children = null;
879
- var invokeCallback = false;
880
- if (children === null) invokeCallback = true;
881
- else switch (type) {
882
- case "string":
883
- case "number":
884
- invokeCallback = true;
885
- break;
886
- case "object": switch (children.$$typeof) {
887
- case REACT_ELEMENT_TYPE:
888
- case REACT_PORTAL_TYPE: invokeCallback = true;
889
- }
890
- }
891
- if (invokeCallback) {
892
- var _child = children;
893
- var mappedChild = callback(_child);
894
- var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
895
- if (isArray(mappedChild)) {
896
- var escapedChildKey = "";
897
- if (childKey != null) escapedChildKey = escapeUserProvidedKey(childKey) + "/";
898
- mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
899
- return c;
900
- });
901
- } else if (mappedChild != null) {
902
- if (isValidElement(mappedChild)) {
903
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) checkKeyStringCoercion(mappedChild.key);
904
- mappedChild = cloneAndReplaceKey(mappedChild, escapedPrefix + (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? escapeUserProvidedKey("" + mappedChild.key) + "/" : "") + childKey);
905
- }
906
- array.push(mappedChild);
907
- }
908
- return 1;
909
- }
910
- var child;
911
- var nextName;
912
- var subtreeCount = 0;
913
- var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
914
- if (isArray(children)) for (var i = 0; i < children.length; i++) {
915
- child = children[i];
916
- nextName = nextNamePrefix + getElementKey(child, i);
917
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
918
- }
919
- else {
920
- var iteratorFn = getIteratorFn(children);
921
- if (typeof iteratorFn === "function") {
922
- var iterableChildren = children;
923
- if (iteratorFn === iterableChildren.entries) {
924
- if (!didWarnAboutMaps) warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
925
- didWarnAboutMaps = true;
926
- }
927
- var iterator = iteratorFn.call(iterableChildren);
928
- var step;
929
- var ii = 0;
930
- while (!(step = iterator.next()).done) {
931
- child = step.value;
932
- nextName = nextNamePrefix + getElementKey(child, ii++);
933
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
934
- }
935
- } else if (type === "object") {
936
- var childrenString = String(children);
937
- throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
938
- }
939
- }
940
- return subtreeCount;
941
- }
942
- /**
943
- * Maps children that are typically specified as `props.children`.
944
- *
945
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
946
- *
947
- * The provided mapFunction(child, index) will be called for each
948
- * leaf child.
949
- *
950
- * @param {?*} children Children tree container.
951
- * @param {function(*, int)} func The map function.
952
- * @param {*} context Context for mapFunction.
953
- * @return {object} Object containing the ordered map of results.
954
- */
955
- function mapChildren(children, func, context) {
956
- if (children == null) return children;
957
- var result = [];
958
- var count = 0;
959
- mapIntoArray(children, result, "", "", function(child) {
960
- return func.call(context, child, count++);
961
- });
962
- return result;
963
- }
964
- /**
965
- * Count the number of children that are typically specified as
966
- * `props.children`.
967
- *
968
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
969
- *
970
- * @param {?*} children Children tree container.
971
- * @return {number} The number of children.
972
- */
973
- function countChildren(children) {
974
- var n$2 = 0;
975
- mapChildren(children, function() {
976
- n$2++;
977
- });
978
- return n$2;
979
- }
980
- /**
981
- * Iterates through children that are typically specified as `props.children`.
982
- *
983
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
984
- *
985
- * The provided forEachFunc(child, index) will be called for each
986
- * leaf child.
987
- *
988
- * @param {?*} children Children tree container.
989
- * @param {function(*, int)} forEachFunc
990
- * @param {*} forEachContext Context for forEachContext.
991
- */
992
- function forEachChildren(children, forEachFunc, forEachContext) {
993
- mapChildren(children, function() {
994
- forEachFunc.apply(this, arguments);
995
- }, forEachContext);
996
- }
997
- /**
998
- * Flatten a children object (typically specified as `props.children`) and
999
- * return an array with appropriately re-keyed children.
1000
- *
1001
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1002
- */
1003
- function toArray(children) {
1004
- return mapChildren(children, function(child) {
1005
- return child;
1006
- }) || [];
1007
- }
1008
- /**
1009
- * Returns the first child in a collection of children and verifies that there
1010
- * is only one child in the collection.
1011
- *
1012
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1013
- *
1014
- * The current implementation of this function assumes that a single child gets
1015
- * passed without a wrapper, but the purpose of this helper function is to
1016
- * abstract away the particular structure of children.
1017
- *
1018
- * @param {?object} children Child collection structure.
1019
- * @return {ReactElement} The first and only `ReactElement` contained in the
1020
- * structure.
1021
- */
1022
- function onlyChild(children) {
1023
- if (!isValidElement(children)) throw new Error("React.Children.only expected to receive a single React element child.");
1024
- return children;
1025
- }
1026
- function createContext(defaultValue) {
1027
- var context = {
1028
- $$typeof: REACT_CONTEXT_TYPE,
1029
- _currentValue: defaultValue,
1030
- _currentValue2: defaultValue,
1031
- _threadCount: 0,
1032
- Provider: null,
1033
- Consumer: null,
1034
- _defaultValue: null,
1035
- _globalName: null
1036
- };
1037
- context.Provider = {
1038
- $$typeof: REACT_PROVIDER_TYPE,
1039
- _context: context
1040
- };
1041
- var hasWarnedAboutUsingNestedContextConsumers = false;
1042
- var hasWarnedAboutUsingConsumerProvider = false;
1043
- var hasWarnedAboutDisplayNameOnConsumer = false;
1044
- var Consumer = {
1045
- $$typeof: REACT_CONTEXT_TYPE,
1046
- _context: context
1047
- };
1048
- Object.defineProperties(Consumer, {
1049
- Provider: {
1050
- get: function() {
1051
- if (!hasWarnedAboutUsingConsumerProvider) {
1052
- hasWarnedAboutUsingConsumerProvider = true;
1053
- error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
1054
- }
1055
- return context.Provider;
1056
- },
1057
- set: function(_Provider) {
1058
- context.Provider = _Provider;
1059
- }
1060
- },
1061
- _currentValue: {
1062
- get: function() {
1063
- return context._currentValue;
1064
- },
1065
- set: function(_currentValue) {
1066
- context._currentValue = _currentValue;
1067
- }
1068
- },
1069
- _currentValue2: {
1070
- get: function() {
1071
- return context._currentValue2;
1072
- },
1073
- set: function(_currentValue2) {
1074
- context._currentValue2 = _currentValue2;
1075
- }
1076
- },
1077
- _threadCount: {
1078
- get: function() {
1079
- return context._threadCount;
1080
- },
1081
- set: function(_threadCount) {
1082
- context._threadCount = _threadCount;
1083
- }
1084
- },
1085
- Consumer: { get: function() {
1086
- if (!hasWarnedAboutUsingNestedContextConsumers) {
1087
- hasWarnedAboutUsingNestedContextConsumers = true;
1088
- error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
1089
- }
1090
- return context.Consumer;
1091
- } },
1092
- displayName: {
1093
- get: function() {
1094
- return context.displayName;
1095
- },
1096
- set: function(displayName) {
1097
- if (!hasWarnedAboutDisplayNameOnConsumer) {
1098
- warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
1099
- hasWarnedAboutDisplayNameOnConsumer = true;
1100
- }
1101
- }
1102
- }
1103
- });
1104
- context.Consumer = Consumer;
1105
- context._currentRenderer = null;
1106
- context._currentRenderer2 = null;
1107
- return context;
1108
- }
1109
- var Uninitialized = -1;
1110
- var Pending = 0;
1111
- var Resolved = 1;
1112
- var Rejected = 2;
1113
- function lazyInitializer(payload) {
1114
- if (payload._status === Uninitialized) {
1115
- var ctor = payload._result;
1116
- var thenable = ctor();
1117
- thenable.then(function(moduleObject$1) {
1118
- if (payload._status === Pending || payload._status === Uninitialized) {
1119
- var resolved = payload;
1120
- resolved._status = Resolved;
1121
- resolved._result = moduleObject$1;
1122
- }
1123
- }, function(error$1) {
1124
- if (payload._status === Pending || payload._status === Uninitialized) {
1125
- var rejected = payload;
1126
- rejected._status = Rejected;
1127
- rejected._result = error$1;
1128
- }
1129
- });
1130
- if (payload._status === Uninitialized) {
1131
- var pending = payload;
1132
- pending._status = Pending;
1133
- pending._result = thenable;
1134
- }
1135
- }
1136
- if (payload._status === Resolved) {
1137
- var moduleObject = payload._result;
1138
- if (moduleObject === void 0) error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
1139
- if (!("default" in moduleObject)) error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
1140
- return moduleObject.default;
1141
- } else throw payload._result;
1142
- }
1143
- function lazy(ctor) {
1144
- var lazyType = {
1145
- $$typeof: REACT_LAZY_TYPE,
1146
- _payload: {
1147
- _status: Uninitialized,
1148
- _result: ctor
1149
- },
1150
- _init: lazyInitializer
1151
- };
1152
- var defaultProps;
1153
- var propTypes;
1154
- Object.defineProperties(lazyType, {
1155
- defaultProps: {
1156
- configurable: true,
1157
- get: function() {
1158
- return defaultProps;
1159
- },
1160
- set: function(newDefaultProps) {
1161
- error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
1162
- defaultProps = newDefaultProps;
1163
- Object.defineProperty(lazyType, "defaultProps", { enumerable: true });
1164
- }
1165
- },
1166
- propTypes: {
1167
- configurable: true,
1168
- get: function() {
1169
- return propTypes;
1170
- },
1171
- set: function(newPropTypes) {
1172
- error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
1173
- propTypes = newPropTypes;
1174
- Object.defineProperty(lazyType, "propTypes", { enumerable: true });
1175
- }
1176
- }
1177
- });
1178
- return lazyType;
1179
- }
1180
- function forwardRef(render) {
1181
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
1182
- else if (typeof render !== "function") error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
1183
- else if (render.length !== 0 && render.length !== 2) error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
1184
- if (render != null) {
1185
- if (render.defaultProps != null || render.propTypes != null) error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
1186
- }
1187
- var elementType = {
1188
- $$typeof: REACT_FORWARD_REF_TYPE,
1189
- render
1190
- };
1191
- var ownName;
1192
- Object.defineProperty(elementType, "displayName", {
1193
- enumerable: false,
1194
- configurable: true,
1195
- get: function() {
1196
- return ownName;
1197
- },
1198
- set: function(name) {
1199
- ownName = name;
1200
- if (!render.name && !render.displayName) render.displayName = name;
1201
- }
1202
- });
1203
- return elementType;
1204
- }
1205
- var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1206
- function isValidElementType(type) {
1207
- if (typeof type === "string" || typeof type === "function") return true;
1208
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) return true;
1209
- if (typeof type === "object" && type !== null) {
1210
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) return true;
1211
- }
1212
- return false;
1213
- }
1214
- function memo(type, compare) {
1215
- if (!isValidElementType(type)) error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1216
- var elementType = {
1217
- $$typeof: REACT_MEMO_TYPE,
1218
- type,
1219
- compare: compare === void 0 ? null : compare
1220
- };
1221
- var ownName;
1222
- Object.defineProperty(elementType, "displayName", {
1223
- enumerable: false,
1224
- configurable: true,
1225
- get: function() {
1226
- return ownName;
1227
- },
1228
- set: function(name) {
1229
- ownName = name;
1230
- if (!type.name && !type.displayName) type.displayName = name;
1231
- }
1232
- });
1233
- return elementType;
1234
- }
1235
- function resolveDispatcher() {
1236
- var dispatcher = ReactCurrentDispatcher.current;
1237
- if (dispatcher === null) error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1238
- return dispatcher;
1239
- }
1240
- function useContext(Context) {
1241
- var dispatcher = resolveDispatcher();
1242
- if (Context._context !== void 0) {
1243
- var realContext = Context._context;
1244
- if (realContext.Consumer === Context) error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
1245
- else if (realContext.Provider === Context) error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1246
- }
1247
- return dispatcher.useContext(Context);
1248
- }
1249
- function useState$1(initialState) {
1250
- return resolveDispatcher().useState(initialState);
1251
- }
1252
- function useReducer(reducer, initialArg, init) {
1253
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1254
- }
1255
- function useRef$1(initialValue) {
1256
- return resolveDispatcher().useRef(initialValue);
1257
- }
1258
- function useEffect$1(create, deps) {
1259
- return resolveDispatcher().useEffect(create, deps);
1260
- }
1261
- function useInsertionEffect(create, deps) {
1262
- return resolveDispatcher().useInsertionEffect(create, deps);
1263
- }
1264
- function useLayoutEffect(create, deps) {
1265
- return resolveDispatcher().useLayoutEffect(create, deps);
1266
- }
1267
- function useCallback$1(callback, deps) {
1268
- return resolveDispatcher().useCallback(callback, deps);
1269
- }
1270
- function useMemo$1(create, deps) {
1271
- return resolveDispatcher().useMemo(create, deps);
1272
- }
1273
- function useImperativeHandle(ref, create, deps) {
1274
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1275
- }
1276
- function useDebugValue(value, formatterFn) {
1277
- return resolveDispatcher().useDebugValue(value, formatterFn);
1278
- }
1279
- function useTransition() {
1280
- return resolveDispatcher().useTransition();
1281
- }
1282
- function useDeferredValue(value) {
1283
- return resolveDispatcher().useDeferredValue(value);
1284
- }
1285
- function useId() {
1286
- return resolveDispatcher().useId();
1287
- }
1288
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1289
- return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1290
- }
1291
- var disabledDepth = 0;
1292
- var prevLog;
1293
- var prevInfo;
1294
- var prevWarn;
1295
- var prevError;
1296
- var prevGroup;
1297
- var prevGroupCollapsed;
1298
- var prevGroupEnd;
1299
- function disabledLog() {}
1300
- disabledLog.__reactDisabledLog = true;
1301
- function disableLogs() {
1302
- if (disabledDepth === 0) {
1303
- prevLog = console.log;
1304
- prevInfo = console.info;
1305
- prevWarn = console.warn;
1306
- prevError = console.error;
1307
- prevGroup = console.group;
1308
- prevGroupCollapsed = console.groupCollapsed;
1309
- prevGroupEnd = console.groupEnd;
1310
- var props = {
1311
- configurable: true,
1312
- enumerable: true,
1313
- value: disabledLog,
1314
- writable: true
1315
- };
1316
- Object.defineProperties(console, {
1317
- info: props,
1318
- log: props,
1319
- warn: props,
1320
- error: props,
1321
- group: props,
1322
- groupCollapsed: props,
1323
- groupEnd: props
1324
- });
1325
- }
1326
- disabledDepth++;
1327
- }
1328
- function reenableLogs() {
1329
- disabledDepth--;
1330
- if (disabledDepth === 0) {
1331
- var props = {
1332
- configurable: true,
1333
- enumerable: true,
1334
- writable: true
1335
- };
1336
- Object.defineProperties(console, {
1337
- log: assign({}, props, { value: prevLog }),
1338
- info: assign({}, props, { value: prevInfo }),
1339
- warn: assign({}, props, { value: prevWarn }),
1340
- error: assign({}, props, { value: prevError }),
1341
- group: assign({}, props, { value: prevGroup }),
1342
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
1343
- groupEnd: assign({}, props, { value: prevGroupEnd })
1344
- });
1345
- }
1346
- if (disabledDepth < 0) error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1347
- }
1348
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1349
- var prefix;
1350
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1351
- if (prefix === void 0) try {
1352
- throw Error();
1353
- } catch (x$1) {
1354
- var match = x$1.stack.trim().match(/\n( *(at )?)/);
1355
- prefix = match && match[1] || "";
1356
- }
1357
- return "\n" + prefix + name;
1358
- }
1359
- var reentry = false;
1360
- var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map)();
1361
- function describeNativeComponentFrame(fn, construct) {
1362
- if (!fn || reentry) return "";
1363
- var frame = componentFrameCache.get(fn);
1364
- if (frame !== void 0) return frame;
1365
- var control;
1366
- reentry = true;
1367
- var previousPrepareStackTrace = Error.prepareStackTrace;
1368
- Error.prepareStackTrace = void 0;
1369
- var previousDispatcher = ReactCurrentDispatcher$1.current;
1370
- ReactCurrentDispatcher$1.current = null;
1371
- disableLogs();
1372
- try {
1373
- if (construct) {
1374
- var Fake = function() {
1375
- throw Error();
1376
- };
1377
- Object.defineProperty(Fake.prototype, "props", { set: function() {
1378
- throw Error();
1379
- } });
1380
- if (typeof Reflect === "object" && Reflect.construct) {
1381
- try {
1382
- Reflect.construct(Fake, []);
1383
- } catch (x$1) {
1384
- control = x$1;
1385
- }
1386
- Reflect.construct(fn, [], Fake);
1387
- } else {
1388
- try {
1389
- Fake.call();
1390
- } catch (x$1) {
1391
- control = x$1;
1392
- }
1393
- fn.call(Fake.prototype);
1394
- }
1395
- } else {
1396
- try {
1397
- throw Error();
1398
- } catch (x$1) {
1399
- control = x$1;
1400
- }
1401
- fn();
1402
- }
1403
- } catch (sample) {
1404
- if (sample && control && typeof sample.stack === "string") {
1405
- var sampleLines = sample.stack.split("\n");
1406
- var controlLines = control.stack.split("\n");
1407
- var s = sampleLines.length - 1;
1408
- var c = controlLines.length - 1;
1409
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) c--;
1410
- for (; s >= 1 && c >= 0; s--, c--) if (sampleLines[s] !== controlLines[c]) {
1411
- if (s !== 1 || c !== 1) do {
1412
- s--;
1413
- c--;
1414
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1415
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1416
- if (fn.displayName && _frame.includes("<anonymous>")) _frame = _frame.replace("<anonymous>", fn.displayName);
1417
- if (typeof fn === "function") componentFrameCache.set(fn, _frame);
1418
- return _frame;
1419
- }
1420
- } while (s >= 1 && c >= 0);
1421
- break;
1422
- }
1423
- }
1424
- } finally {
1425
- reentry = false;
1426
- ReactCurrentDispatcher$1.current = previousDispatcher;
1427
- reenableLogs();
1428
- Error.prepareStackTrace = previousPrepareStackTrace;
1429
- }
1430
- var name = fn ? fn.displayName || fn.name : "";
1431
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1432
- if (typeof fn === "function") componentFrameCache.set(fn, syntheticFrame);
1433
- return syntheticFrame;
1434
- }
1435
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1436
- return describeNativeComponentFrame(fn, false);
1437
- }
1438
- function shouldConstruct(Component$1) {
1439
- var prototype = Component$1.prototype;
1440
- return !!(prototype && prototype.isReactComponent);
1441
- }
1442
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1443
- if (type == null) return "";
1444
- if (typeof type === "function") return describeNativeComponentFrame(type, shouldConstruct(type));
1445
- if (typeof type === "string") return describeBuiltInComponentFrame(type);
1446
- switch (type) {
1447
- case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense");
1448
- case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList");
1449
- }
1450
- if (typeof type === "object") switch (type.$$typeof) {
1451
- case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render);
1452
- case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1453
- case REACT_LAZY_TYPE:
1454
- var lazyComponent = type;
1455
- var payload = lazyComponent._payload;
1456
- var init = lazyComponent._init;
1457
- try {
1458
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1459
- } catch (x$1) {}
1460
- }
1461
- return "";
1462
- }
1463
- var loggedTypeFailures = {};
1464
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1465
- function setCurrentlyValidatingElement(element) {
1466
- if (element) {
1467
- var owner = element._owner;
1468
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1469
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1470
- } else ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1471
- }
1472
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
1473
- var has = Function.call.bind(hasOwnProperty);
1474
- for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
1475
- var error$1 = void 0;
1476
- try {
1477
- if (typeof typeSpecs[typeSpecName] !== "function") {
1478
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1479
- err.name = "Invariant Violation";
1480
- throw err;
1481
- }
1482
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1483
- } catch (ex) {
1484
- error$1 = ex;
1485
- }
1486
- if (error$1 && !(error$1 instanceof Error)) {
1487
- setCurrentlyValidatingElement(element);
1488
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
1489
- setCurrentlyValidatingElement(null);
1490
- }
1491
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1492
- loggedTypeFailures[error$1.message] = true;
1493
- setCurrentlyValidatingElement(element);
1494
- error("Failed %s type: %s", location, error$1.message);
1495
- setCurrentlyValidatingElement(null);
1496
- }
1497
- }
1498
- }
1499
- function setCurrentlyValidatingElement$1(element) {
1500
- if (element) {
1501
- var owner = element._owner;
1502
- setExtraStackFrame(describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null));
1503
- } else setExtraStackFrame(null);
1504
- }
1505
- var propTypesMisspellWarningShown = false;
1506
- function getDeclarationErrorAddendum() {
1507
- if (ReactCurrentOwner.current) {
1508
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1509
- if (name) return "\n\nCheck the render method of `" + name + "`.";
1510
- }
1511
- return "";
1512
- }
1513
- function getSourceInfoErrorAddendum(source) {
1514
- if (source !== void 0) {
1515
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1516
- var lineNumber = source.lineNumber;
1517
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1518
- }
1519
- return "";
1520
- }
1521
- function getSourceInfoErrorAddendumForProps(elementProps) {
1522
- if (elementProps !== null && elementProps !== void 0) return getSourceInfoErrorAddendum(elementProps.__source);
1523
- return "";
1524
- }
1525
- /**
1526
- * Warn if there's no key explicitly set on dynamic arrays of children or
1527
- * object keys are not valid. This allows us to keep track of children between
1528
- * updates.
1529
- */
1530
- var ownerHasKeyUseWarning = {};
1531
- function getCurrentComponentErrorInfo(parentType) {
1532
- var info = getDeclarationErrorAddendum();
1533
- if (!info) {
1534
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1535
- if (parentName) info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1536
- }
1537
- return info;
1538
- }
1539
- /**
1540
- * Warn if the element doesn't have an explicit key assigned to it.
1541
- * This element is in an array. The array could grow and shrink or be
1542
- * reordered. All children that haven't already been validated are required to
1543
- * have a "key" property assigned to it. Error statuses are cached so a warning
1544
- * will only be shown once.
1545
- *
1546
- * @internal
1547
- * @param {ReactElement} element Element that requires a key.
1548
- * @param {*} parentType element's parent's type.
1549
- */
1550
- function validateExplicitKey(element, parentType) {
1551
- if (!element._store || element._store.validated || element.key != null) return;
1552
- element._store.validated = true;
1553
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1554
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) return;
1555
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1556
- var childOwner = "";
1557
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1558
- setCurrentlyValidatingElement$1(element);
1559
- error("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", currentComponentErrorInfo, childOwner);
1560
- setCurrentlyValidatingElement$1(null);
1561
- }
1562
- /**
1563
- * Ensure that every element either is passed in a static location, in an
1564
- * array with an explicit keys property defined, or in an object literal
1565
- * with valid key property.
1566
- *
1567
- * @internal
1568
- * @param {ReactNode} node Statically passed child of any type.
1569
- * @param {*} parentType node's parent's type.
1570
- */
1571
- function validateChildKeys(node, parentType) {
1572
- if (typeof node !== "object") return;
1573
- if (isArray(node)) for (var i = 0; i < node.length; i++) {
1574
- var child = node[i];
1575
- if (isValidElement(child)) validateExplicitKey(child, parentType);
1576
- }
1577
- else if (isValidElement(node)) {
1578
- if (node._store) node._store.validated = true;
1579
- } else if (node) {
1580
- var iteratorFn = getIteratorFn(node);
1581
- if (typeof iteratorFn === "function") {
1582
- if (iteratorFn !== node.entries) {
1583
- var iterator = iteratorFn.call(node);
1584
- var step;
1585
- while (!(step = iterator.next()).done) if (isValidElement(step.value)) validateExplicitKey(step.value, parentType);
1586
- }
1587
- }
1588
- }
1589
- }
1590
- /**
1591
- * Given an element, validate that its props follow the propTypes definition,
1592
- * provided by the type.
1593
- *
1594
- * @param {ReactElement} element
1595
- */
1596
- function validatePropTypes(element) {
1597
- var type = element.type;
1598
- if (type === null || type === void 0 || typeof type === "string") return;
1599
- var propTypes;
1600
- if (typeof type === "function") propTypes = type.propTypes;
1601
- else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) propTypes = type.propTypes;
1602
- else return;
1603
- if (propTypes) {
1604
- var name = getComponentNameFromType(type);
1605
- checkPropTypes(propTypes, element.props, "prop", name, element);
1606
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1607
- propTypesMisspellWarningShown = true;
1608
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", getComponentNameFromType(type) || "Unknown");
1609
- }
1610
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1611
- }
1612
- /**
1613
- * Given a fragment, validate that it can only be provided with fragment props
1614
- * @param {ReactElement} fragment
1615
- */
1616
- function validateFragmentProps(fragment) {
1617
- var keys = Object.keys(fragment.props);
1618
- for (var i = 0; i < keys.length; i++) {
1619
- var key = keys[i];
1620
- if (key !== "children" && key !== "key") {
1621
- setCurrentlyValidatingElement$1(fragment);
1622
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1623
- setCurrentlyValidatingElement$1(null);
1624
- break;
1625
- }
1626
- }
1627
- if (fragment.ref !== null) {
1628
- setCurrentlyValidatingElement$1(fragment);
1629
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
1630
- setCurrentlyValidatingElement$1(null);
1631
- }
1632
- }
1633
- function createElementWithValidation(type, props, children) {
1634
- var validType = isValidElementType(type);
1635
- if (!validType) {
1636
- var info = "";
1637
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
1638
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1639
- if (sourceInfo) info += sourceInfo;
1640
- else info += getDeclarationErrorAddendum();
1641
- var typeString;
1642
- if (type === null) typeString = "null";
1643
- else if (isArray(type)) typeString = "array";
1644
- else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1645
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1646
- info = " Did you accidentally export a JSX literal instead of a component?";
1647
- } else typeString = typeof type;
1648
- error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1649
- }
1650
- var element = createElement.apply(this, arguments);
1651
- if (element == null) return element;
1652
- if (validType) for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i], type);
1653
- if (type === REACT_FRAGMENT_TYPE) validateFragmentProps(element);
1654
- else validatePropTypes(element);
1655
- return element;
1656
- }
1657
- var didWarnAboutDeprecatedCreateFactory = false;
1658
- function createFactoryWithValidation(type) {
1659
- var validatedFactory = createElementWithValidation.bind(null, type);
1660
- validatedFactory.type = type;
1661
- if (!didWarnAboutDeprecatedCreateFactory) {
1662
- didWarnAboutDeprecatedCreateFactory = true;
1663
- warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1664
- }
1665
- Object.defineProperty(validatedFactory, "type", {
1666
- enumerable: false,
1667
- get: function() {
1668
- warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1669
- Object.defineProperty(this, "type", { value: type });
1670
- return type;
1671
- }
1672
- });
1673
- return validatedFactory;
1674
- }
1675
- function cloneElementWithValidation(element, props, children) {
1676
- var newElement = cloneElement.apply(this, arguments);
1677
- for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i], newElement.type);
1678
- validatePropTypes(newElement);
1679
- return newElement;
1680
- }
1681
- function startTransition(scope, options) {
1682
- var prevTransition = ReactCurrentBatchConfig.transition;
1683
- ReactCurrentBatchConfig.transition = {};
1684
- var currentTransition = ReactCurrentBatchConfig.transition;
1685
- ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1686
- try {
1687
- scope();
1688
- } finally {
1689
- ReactCurrentBatchConfig.transition = prevTransition;
1690
- if (prevTransition === null && currentTransition._updatedFibers) {
1691
- if (currentTransition._updatedFibers.size > 10) warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
1692
- currentTransition._updatedFibers.clear();
1693
- }
1694
- }
1695
- }
1696
- var didWarnAboutMessageChannel = false;
1697
- var enqueueTaskImpl = null;
1698
- function enqueueTask(task) {
1699
- if (enqueueTaskImpl === null) try {
1700
- var requireString = ("require" + Math.random()).slice(0, 7);
1701
- enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
1702
- } catch (_err) {
1703
- enqueueTaskImpl = function(callback) {
1704
- if (didWarnAboutMessageChannel === false) {
1705
- didWarnAboutMessageChannel = true;
1706
- if (typeof MessageChannel === "undefined") 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.");
1707
- }
1708
- var channel = new MessageChannel();
1709
- channel.port1.onmessage = callback;
1710
- channel.port2.postMessage(void 0);
1711
- };
1712
- }
1713
- return enqueueTaskImpl(task);
1714
- }
1715
- var actScopeDepth = 0;
1716
- var didWarnNoAwaitAct = false;
1717
- function act(callback) {
1718
- var prevActScopeDepth = actScopeDepth;
1719
- actScopeDepth++;
1720
- if (ReactCurrentActQueue.current === null) ReactCurrentActQueue.current = [];
1721
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1722
- var result;
1723
- try {
1724
- ReactCurrentActQueue.isBatchingLegacy = true;
1725
- result = callback();
1726
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1727
- var queue = ReactCurrentActQueue.current;
1728
- if (queue !== null) {
1729
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1730
- flushActQueue(queue);
1731
- }
1732
- }
1733
- } catch (error$1) {
1734
- popActScope(prevActScopeDepth);
1735
- throw error$1;
1736
- } finally {
1737
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1738
- }
1739
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
1740
- var thenableResult = result;
1741
- var wasAwaited = false;
1742
- var thenable = { then: function(resolve, reject) {
1743
- wasAwaited = true;
1744
- thenableResult.then(function(returnValue$1) {
1745
- popActScope(prevActScopeDepth);
1746
- if (actScopeDepth === 0) recursivelyFlushAsyncActWork(returnValue$1, resolve, reject);
1747
- else resolve(returnValue$1);
1748
- }, function(error$1) {
1749
- popActScope(prevActScopeDepth);
1750
- reject(error$1);
1751
- });
1752
- } };
1753
- if (!didWarnNoAwaitAct && typeof Promise !== "undefined") Promise.resolve().then(function() {}).then(function() {
1754
- if (!wasAwaited) {
1755
- didWarnNoAwaitAct = true;
1756
- 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 () => ...);");
1757
- }
1758
- });
1759
- return thenable;
1760
- } else {
1761
- var returnValue = result;
1762
- popActScope(prevActScopeDepth);
1763
- if (actScopeDepth === 0) {
1764
- var _queue = ReactCurrentActQueue.current;
1765
- if (_queue !== null) {
1766
- flushActQueue(_queue);
1767
- ReactCurrentActQueue.current = null;
1768
- }
1769
- return { then: function(resolve, reject) {
1770
- if (ReactCurrentActQueue.current === null) {
1771
- ReactCurrentActQueue.current = [];
1772
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1773
- } else resolve(returnValue);
1774
- } };
1775
- } else return { then: function(resolve, reject) {
1776
- resolve(returnValue);
1777
- } };
1778
- }
1779
- }
1780
- function popActScope(prevActScopeDepth) {
1781
- if (prevActScopeDepth !== actScopeDepth - 1) error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
1782
- actScopeDepth = prevActScopeDepth;
1783
- }
1784
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1785
- var queue = ReactCurrentActQueue.current;
1786
- if (queue !== null) try {
1787
- flushActQueue(queue);
1788
- enqueueTask(function() {
1789
- if (queue.length === 0) {
1790
- ReactCurrentActQueue.current = null;
1791
- resolve(returnValue);
1792
- } else recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1793
- });
1794
- } catch (error$1) {
1795
- reject(error$1);
1796
- }
1797
- else resolve(returnValue);
1798
- }
1799
- var isFlushing = false;
1800
- function flushActQueue(queue) {
1801
- if (!isFlushing) {
1802
- isFlushing = true;
1803
- var i = 0;
1804
- try {
1805
- for (; i < queue.length; i++) {
1806
- var callback = queue[i];
1807
- do
1808
- callback = callback(true);
1809
- while (callback !== null);
1810
- }
1811
- queue.length = 0;
1812
- } catch (error$1) {
1813
- queue = queue.slice(i + 1);
1814
- throw error$1;
1815
- } finally {
1816
- isFlushing = false;
1817
- }
1818
- }
1819
- }
1820
- var createElement$1 = createElementWithValidation;
1821
- var cloneElement$1 = cloneElementWithValidation;
1822
- var createFactory = createFactoryWithValidation;
1823
- exports.Children = {
1824
- map: mapChildren,
1825
- forEach: forEachChildren,
1826
- count: countChildren,
1827
- toArray,
1828
- only: onlyChild
1829
- };
1830
- exports.Component = Component;
1831
- exports.Fragment = REACT_FRAGMENT_TYPE;
1832
- exports.Profiler = REACT_PROFILER_TYPE;
1833
- exports.PureComponent = PureComponent;
1834
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
1835
- exports.Suspense = REACT_SUSPENSE_TYPE;
1836
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
1837
- exports.act = act;
1838
- exports.cloneElement = cloneElement$1;
1839
- exports.createContext = createContext;
1840
- exports.createElement = createElement$1;
1841
- exports.createFactory = createFactory;
1842
- exports.createRef = createRef;
1843
- exports.forwardRef = forwardRef;
1844
- exports.isValidElement = isValidElement;
1845
- exports.lazy = lazy;
1846
- exports.memo = memo;
1847
- exports.startTransition = startTransition;
1848
- exports.unstable_act = act;
1849
- exports.useCallback = useCallback$1;
1850
- exports.useContext = useContext;
1851
- exports.useDebugValue = useDebugValue;
1852
- exports.useDeferredValue = useDeferredValue;
1853
- exports.useEffect = useEffect$1;
1854
- exports.useId = useId;
1855
- exports.useImperativeHandle = useImperativeHandle;
1856
- exports.useInsertionEffect = useInsertionEffect;
1857
- exports.useLayoutEffect = useLayoutEffect;
1858
- exports.useMemo = useMemo$1;
1859
- exports.useReducer = useReducer;
1860
- exports.useRef = useRef$1;
1861
- exports.useState = useState$1;
1862
- exports.useSyncExternalStore = useSyncExternalStore;
1863
- exports.useTransition = useTransition;
1864
- exports.version = ReactVersion;
1865
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(/* @__PURE__ */ new Error());
1866
- })();
1867
- }) });
1868
- var require_react = /* @__PURE__ */ __commonJS({ "../../node_modules/react/index.js": ((exports, module) => {
1869
- if (process.env.NODE_ENV === "production") module.exports = require_react_production_min();
1870
- else module.exports = require_react_development();
1871
- }) });
1872
- var require_react_jsx_runtime_production_min = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react-jsx-runtime.production.min.js": ((exports) => {
1873
- var f = require_react(), k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = {
1874
- key: !0,
1875
- ref: !0,
1876
- __self: !0,
1877
- __source: !0
1878
- };
1879
- function q(c, a, g) {
1880
- var b, d = {}, e = null, h = null;
1881
- void 0 !== g && (e = "" + g);
1882
- void 0 !== a.key && (e = "" + a.key);
1883
- void 0 !== a.ref && (h = a.ref);
1884
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
1885
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
1886
- return {
1887
- $$typeof: k,
1888
- type: c,
1889
- key: e,
1890
- ref: h,
1891
- props: d,
1892
- _owner: n.current
1893
- };
1894
- }
1895
- exports.Fragment = l;
1896
- exports.jsx = q;
1897
- exports.jsxs = q;
1898
- }) });
1899
- var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJS({ "../../node_modules/react/cjs/react-jsx-runtime.development.js": ((exports) => {
1900
- if (process.env.NODE_ENV !== "production") (function() {
1901
- var React$1 = require_react();
1902
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
1903
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
1904
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1905
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
1906
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1907
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
1908
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
1909
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
1910
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
1911
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
1912
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
1913
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1914
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
1915
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1916
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
1917
- function getIteratorFn(maybeIterable) {
1918
- if (maybeIterable === null || typeof maybeIterable !== "object") return null;
1919
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
1920
- if (typeof maybeIterator === "function") return maybeIterator;
1921
- return null;
1922
- }
1923
- var ReactSharedInternals = React$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1924
- function error(format) {
1925
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
1926
- printWarning("error", format, args);
1927
- }
1928
- function printWarning(level, format, args) {
1929
- var stack = ReactSharedInternals.ReactDebugCurrentFrame.getStackAddendum();
1930
- if (stack !== "") {
1931
- format += "%s";
1932
- args = args.concat([stack]);
1933
- }
1934
- var argsWithFormat = args.map(function(item) {
1935
- return String(item);
1936
- });
1937
- argsWithFormat.unshift("Warning: " + format);
1938
- Function.prototype.apply.call(console[level], console, argsWithFormat);
1939
- }
1940
- var enableScopeAPI = false;
1941
- var enableCacheElement = false;
1942
- var enableTransitionTracing = false;
1943
- var enableLegacyHidden = false;
1944
- var enableDebugTracing = false;
1945
- var REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1946
- function isValidElementType(type) {
1947
- if (typeof type === "string" || typeof type === "function") return true;
1948
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) return true;
1949
- if (typeof type === "object" && type !== null) {
1950
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) return true;
1951
- }
1952
- return false;
1953
- }
1954
- function getWrappedName(outerType, innerType, wrapperName) {
1955
- var displayName = outerType.displayName;
1956
- if (displayName) return displayName;
1957
- var functionName = innerType.displayName || innerType.name || "";
1958
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
1959
- }
1960
- function getContextName(type) {
1961
- return type.displayName || "Context";
1962
- }
1963
- function getComponentNameFromType(type) {
1964
- if (type == null) return null;
1965
- if (typeof type.tag === "number") error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
1966
- if (typeof type === "function") return type.displayName || type.name || null;
1967
- if (typeof type === "string") return type;
1968
- switch (type) {
1969
- case REACT_FRAGMENT_TYPE: return "Fragment";
1970
- case REACT_PORTAL_TYPE: return "Portal";
1971
- case REACT_PROFILER_TYPE: return "Profiler";
1972
- case REACT_STRICT_MODE_TYPE: return "StrictMode";
1973
- case REACT_SUSPENSE_TYPE: return "Suspense";
1974
- case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
1975
- }
1976
- if (typeof type === "object") switch (type.$$typeof) {
1977
- case REACT_CONTEXT_TYPE: return getContextName(type) + ".Consumer";
1978
- case REACT_PROVIDER_TYPE: return getContextName(type._context) + ".Provider";
1979
- case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef");
1980
- case REACT_MEMO_TYPE:
1981
- var outerName = type.displayName || null;
1982
- if (outerName !== null) return outerName;
1983
- return getComponentNameFromType(type.type) || "Memo";
1984
- case REACT_LAZY_TYPE:
1985
- var lazyComponent = type;
1986
- var payload = lazyComponent._payload;
1987
- var init = lazyComponent._init;
1988
- try {
1989
- return getComponentNameFromType(init(payload));
1990
- } catch (x$1) {
1991
- return null;
1992
- }
1993
- }
1994
- return null;
1995
- }
1996
- var assign = Object.assign;
1997
- var disabledDepth = 0;
1998
- var prevLog;
1999
- var prevInfo;
2000
- var prevWarn;
2001
- var prevError;
2002
- var prevGroup;
2003
- var prevGroupCollapsed;
2004
- var prevGroupEnd;
2005
- function disabledLog() {}
2006
- disabledLog.__reactDisabledLog = true;
2007
- function disableLogs() {
2008
- if (disabledDepth === 0) {
2009
- prevLog = console.log;
2010
- prevInfo = console.info;
2011
- prevWarn = console.warn;
2012
- prevError = console.error;
2013
- prevGroup = console.group;
2014
- prevGroupCollapsed = console.groupCollapsed;
2015
- prevGroupEnd = console.groupEnd;
2016
- var props = {
2017
- configurable: true,
2018
- enumerable: true,
2019
- value: disabledLog,
2020
- writable: true
2021
- };
2022
- Object.defineProperties(console, {
2023
- info: props,
2024
- log: props,
2025
- warn: props,
2026
- error: props,
2027
- group: props,
2028
- groupCollapsed: props,
2029
- groupEnd: props
2030
- });
2031
- }
2032
- disabledDepth++;
2033
- }
2034
- function reenableLogs() {
2035
- disabledDepth--;
2036
- if (disabledDepth === 0) {
2037
- var props = {
2038
- configurable: true,
2039
- enumerable: true,
2040
- writable: true
2041
- };
2042
- Object.defineProperties(console, {
2043
- log: assign({}, props, { value: prevLog }),
2044
- info: assign({}, props, { value: prevInfo }),
2045
- warn: assign({}, props, { value: prevWarn }),
2046
- error: assign({}, props, { value: prevError }),
2047
- group: assign({}, props, { value: prevGroup }),
2048
- groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
2049
- groupEnd: assign({}, props, { value: prevGroupEnd })
2050
- });
2051
- }
2052
- if (disabledDepth < 0) error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2053
- }
2054
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2055
- var prefix;
2056
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2057
- if (prefix === void 0) try {
2058
- throw Error();
2059
- } catch (x$1) {
2060
- var match = x$1.stack.trim().match(/\n( *(at )?)/);
2061
- prefix = match && match[1] || "";
2062
- }
2063
- return "\n" + prefix + name;
2064
- }
2065
- var reentry = false;
2066
- var componentFrameCache = new (typeof WeakMap === "function" ? WeakMap : Map)();
2067
- function describeNativeComponentFrame(fn, construct) {
2068
- if (!fn || reentry) return "";
2069
- var frame = componentFrameCache.get(fn);
2070
- if (frame !== void 0) return frame;
2071
- var control;
2072
- reentry = true;
2073
- var previousPrepareStackTrace = Error.prepareStackTrace;
2074
- Error.prepareStackTrace = void 0;
2075
- var previousDispatcher = ReactCurrentDispatcher.current;
2076
- ReactCurrentDispatcher.current = null;
2077
- disableLogs();
2078
- try {
2079
- if (construct) {
2080
- var Fake = function() {
2081
- throw Error();
2082
- };
2083
- Object.defineProperty(Fake.prototype, "props", { set: function() {
2084
- throw Error();
2085
- } });
2086
- if (typeof Reflect === "object" && Reflect.construct) {
2087
- try {
2088
- Reflect.construct(Fake, []);
2089
- } catch (x$1) {
2090
- control = x$1;
2091
- }
2092
- Reflect.construct(fn, [], Fake);
2093
- } else {
2094
- try {
2095
- Fake.call();
2096
- } catch (x$1) {
2097
- control = x$1;
2098
- }
2099
- fn.call(Fake.prototype);
2100
- }
2101
- } else {
2102
- try {
2103
- throw Error();
2104
- } catch (x$1) {
2105
- control = x$1;
2106
- }
2107
- fn();
2108
- }
2109
- } catch (sample) {
2110
- if (sample && control && typeof sample.stack === "string") {
2111
- var sampleLines = sample.stack.split("\n");
2112
- var controlLines = control.stack.split("\n");
2113
- var s = sampleLines.length - 1;
2114
- var c = controlLines.length - 1;
2115
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) c--;
2116
- for (; s >= 1 && c >= 0; s--, c--) if (sampleLines[s] !== controlLines[c]) {
2117
- if (s !== 1 || c !== 1) do {
2118
- s--;
2119
- c--;
2120
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2121
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2122
- if (fn.displayName && _frame.includes("<anonymous>")) _frame = _frame.replace("<anonymous>", fn.displayName);
2123
- if (typeof fn === "function") componentFrameCache.set(fn, _frame);
2124
- return _frame;
2125
- }
2126
- } while (s >= 1 && c >= 0);
2127
- break;
2128
- }
2129
- }
2130
- } finally {
2131
- reentry = false;
2132
- ReactCurrentDispatcher.current = previousDispatcher;
2133
- reenableLogs();
2134
- Error.prepareStackTrace = previousPrepareStackTrace;
2135
- }
2136
- var name = fn ? fn.displayName || fn.name : "";
2137
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2138
- if (typeof fn === "function") componentFrameCache.set(fn, syntheticFrame);
2139
- return syntheticFrame;
2140
- }
2141
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2142
- return describeNativeComponentFrame(fn, false);
2143
- }
2144
- function shouldConstruct(Component) {
2145
- var prototype = Component.prototype;
2146
- return !!(prototype && prototype.isReactComponent);
2147
- }
2148
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2149
- if (type == null) return "";
2150
- if (typeof type === "function") return describeNativeComponentFrame(type, shouldConstruct(type));
2151
- if (typeof type === "string") return describeBuiltInComponentFrame(type);
2152
- switch (type) {
2153
- case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense");
2154
- case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList");
2155
- }
2156
- if (typeof type === "object") switch (type.$$typeof) {
2157
- case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render);
2158
- case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2159
- case REACT_LAZY_TYPE:
2160
- var lazyComponent = type;
2161
- var payload = lazyComponent._payload;
2162
- var init = lazyComponent._init;
2163
- try {
2164
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2165
- } catch (x$1) {}
2166
- }
2167
- return "";
2168
- }
2169
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2170
- var loggedTypeFailures = {};
2171
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2172
- function setCurrentlyValidatingElement(element) {
2173
- if (element) {
2174
- var owner = element._owner;
2175
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2176
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2177
- } else ReactDebugCurrentFrame.setExtraStackFrame(null);
2178
- }
2179
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2180
- var has = Function.call.bind(hasOwnProperty);
2181
- for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
2182
- var error$1 = void 0;
2183
- try {
2184
- if (typeof typeSpecs[typeSpecName] !== "function") {
2185
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
2186
- err.name = "Invariant Violation";
2187
- throw err;
2188
- }
2189
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2190
- } catch (ex) {
2191
- error$1 = ex;
2192
- }
2193
- if (error$1 && !(error$1 instanceof Error)) {
2194
- setCurrentlyValidatingElement(element);
2195
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
2196
- setCurrentlyValidatingElement(null);
2197
- }
2198
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2199
- loggedTypeFailures[error$1.message] = true;
2200
- setCurrentlyValidatingElement(element);
2201
- error("Failed %s type: %s", location, error$1.message);
2202
- setCurrentlyValidatingElement(null);
2203
- }
2204
- }
2205
- }
2206
- var isArrayImpl = Array.isArray;
2207
- function isArray(a) {
2208
- return isArrayImpl(a);
2209
- }
2210
- function typeName(value) {
2211
- return typeof Symbol === "function" && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2212
- }
2213
- function willCoercionThrow(value) {
2214
- try {
2215
- testStringCoercion(value);
2216
- return false;
2217
- } catch (e) {
2218
- return true;
2219
- }
2220
- }
2221
- function testStringCoercion(value) {
2222
- return "" + value;
2223
- }
2224
- function checkKeyStringCoercion(value) {
2225
- if (willCoercionThrow(value)) {
2226
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2227
- return testStringCoercion(value);
2228
- }
2229
- }
2230
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2231
- var RESERVED_PROPS = {
2232
- key: true,
2233
- ref: true,
2234
- __self: true,
2235
- __source: true
2236
- };
2237
- var specialPropKeyWarningShown;
2238
- var specialPropRefWarningShown;
2239
- var didWarnAboutStringRefs = {};
2240
- function hasValidRef(config) {
2241
- if (hasOwnProperty.call(config, "ref")) {
2242
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2243
- if (getter && getter.isReactWarning) return false;
2244
- }
2245
- return config.ref !== void 0;
2246
- }
2247
- function hasValidKey(config) {
2248
- if (hasOwnProperty.call(config, "key")) {
2249
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2250
- if (getter && getter.isReactWarning) return false;
2251
- }
2252
- return config.key !== void 0;
2253
- }
2254
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2255
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2256
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2257
- if (!didWarnAboutStringRefs[componentName]) {
2258
- error("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2259
- didWarnAboutStringRefs[componentName] = true;
2260
- }
2261
- }
2262
- }
2263
- function defineKeyPropWarningGetter(props, displayName) {
2264
- var warnAboutAccessingKey = function() {
2265
- if (!specialPropKeyWarningShown) {
2266
- specialPropKeyWarningShown = true;
2267
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2268
- }
2269
- };
2270
- warnAboutAccessingKey.isReactWarning = true;
2271
- Object.defineProperty(props, "key", {
2272
- get: warnAboutAccessingKey,
2273
- configurable: true
2274
- });
2275
- }
2276
- function defineRefPropWarningGetter(props, displayName) {
2277
- var warnAboutAccessingRef = function() {
2278
- if (!specialPropRefWarningShown) {
2279
- specialPropRefWarningShown = true;
2280
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2281
- }
2282
- };
2283
- warnAboutAccessingRef.isReactWarning = true;
2284
- Object.defineProperty(props, "ref", {
2285
- get: warnAboutAccessingRef,
2286
- configurable: true
2287
- });
2288
- }
2289
- /**
2290
- * Factory method to create a new React element. This no longer adheres to
2291
- * the class pattern, so do not use new to call it. Also, instanceof check
2292
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2293
- * if something is a React Element.
2294
- *
2295
- * @param {*} type
2296
- * @param {*} props
2297
- * @param {*} key
2298
- * @param {string|object} ref
2299
- * @param {*} owner
2300
- * @param {*} self A *temporary* helper to detect places where `this` is
2301
- * different from the `owner` when React.createElement is called, so that we
2302
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
2303
- * functions, and as long as `this` and owner are the same, there will be no
2304
- * change in behavior.
2305
- * @param {*} source An annotation object (added by a transpiler or otherwise)
2306
- * indicating filename, line number, and/or other information.
2307
- * @internal
2308
- */
2309
- var ReactElement = function(type, key, ref, self, source, owner, props) {
2310
- var element = {
2311
- $$typeof: REACT_ELEMENT_TYPE,
2312
- type,
2313
- key,
2314
- ref,
2315
- props,
2316
- _owner: owner
2317
- };
2318
- element._store = {};
2319
- Object.defineProperty(element._store, "validated", {
2320
- configurable: false,
2321
- enumerable: false,
2322
- writable: true,
2323
- value: false
2324
- });
2325
- Object.defineProperty(element, "_self", {
2326
- configurable: false,
2327
- enumerable: false,
2328
- writable: false,
2329
- value: self
2330
- });
2331
- Object.defineProperty(element, "_source", {
2332
- configurable: false,
2333
- enumerable: false,
2334
- writable: false,
2335
- value: source
2336
- });
2337
- if (Object.freeze) {
2338
- Object.freeze(element.props);
2339
- Object.freeze(element);
2340
- }
2341
- return element;
2342
- };
2343
- /**
2344
- * https://github.com/reactjs/rfcs/pull/107
2345
- * @param {*} type
2346
- * @param {object} props
2347
- * @param {string} key
2348
- */
2349
- function jsxDEV(type, config, maybeKey, source, self) {
2350
- var propName;
2351
- var props = {};
2352
- var key = null;
2353
- var ref = null;
2354
- if (maybeKey !== void 0) {
2355
- checkKeyStringCoercion(maybeKey);
2356
- key = "" + maybeKey;
2357
- }
2358
- if (hasValidKey(config)) {
2359
- checkKeyStringCoercion(config.key);
2360
- key = "" + config.key;
2361
- }
2362
- if (hasValidRef(config)) {
2363
- ref = config.ref;
2364
- warnIfStringRefCannotBeAutoConverted(config, self);
2365
- }
2366
- for (propName in config) if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) props[propName] = config[propName];
2367
- if (type && type.defaultProps) {
2368
- var defaultProps = type.defaultProps;
2369
- for (propName in defaultProps) if (props[propName] === void 0) props[propName] = defaultProps[propName];
2370
- }
2371
- if (key || ref) {
2372
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2373
- if (key) defineKeyPropWarningGetter(props, displayName);
2374
- if (ref) defineRefPropWarningGetter(props, displayName);
2375
- }
2376
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2377
- }
2378
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2379
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2380
- function setCurrentlyValidatingElement$1(element) {
2381
- if (element) {
2382
- var owner = element._owner;
2383
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2384
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2385
- } else ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2386
- }
2387
- var propTypesMisspellWarningShown = false;
2388
- /**
2389
- * Verifies the object is a ReactElement.
2390
- * See https://reactjs.org/docs/react-api.html#isvalidelement
2391
- * @param {?object} object
2392
- * @return {boolean} True if `object` is a ReactElement.
2393
- * @final
2394
- */
2395
- function isValidElement(object) {
2396
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2397
- }
2398
- function getDeclarationErrorAddendum() {
2399
- if (ReactCurrentOwner$1.current) {
2400
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2401
- if (name) return "\n\nCheck the render method of `" + name + "`.";
2402
- }
2403
- return "";
2404
- }
2405
- function getSourceInfoErrorAddendum(source) {
2406
- if (source !== void 0) {
2407
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2408
- var lineNumber = source.lineNumber;
2409
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2410
- }
2411
- return "";
2412
- }
2413
- /**
2414
- * Warn if there's no key explicitly set on dynamic arrays of children or
2415
- * object keys are not valid. This allows us to keep track of children between
2416
- * updates.
2417
- */
2418
- var ownerHasKeyUseWarning = {};
2419
- function getCurrentComponentErrorInfo(parentType) {
2420
- var info = getDeclarationErrorAddendum();
2421
- if (!info) {
2422
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2423
- if (parentName) info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2424
- }
2425
- return info;
2426
- }
2427
- /**
2428
- * Warn if the element doesn't have an explicit key assigned to it.
2429
- * This element is in an array. The array could grow and shrink or be
2430
- * reordered. All children that haven't already been validated are required to
2431
- * have a "key" property assigned to it. Error statuses are cached so a warning
2432
- * will only be shown once.
2433
- *
2434
- * @internal
2435
- * @param {ReactElement} element Element that requires a key.
2436
- * @param {*} parentType element's parent's type.
2437
- */
2438
- function validateExplicitKey(element, parentType) {
2439
- if (!element._store || element._store.validated || element.key != null) return;
2440
- element._store.validated = true;
2441
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2442
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) return;
2443
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2444
- var childOwner = "";
2445
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2446
- setCurrentlyValidatingElement$1(element);
2447
- error("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", currentComponentErrorInfo, childOwner);
2448
- setCurrentlyValidatingElement$1(null);
2449
- }
2450
- /**
2451
- * Ensure that every element either is passed in a static location, in an
2452
- * array with an explicit keys property defined, or in an object literal
2453
- * with valid key property.
2454
- *
2455
- * @internal
2456
- * @param {ReactNode} node Statically passed child of any type.
2457
- * @param {*} parentType node's parent's type.
2458
- */
2459
- function validateChildKeys(node, parentType) {
2460
- if (typeof node !== "object") return;
2461
- if (isArray(node)) for (var i = 0; i < node.length; i++) {
2462
- var child = node[i];
2463
- if (isValidElement(child)) validateExplicitKey(child, parentType);
2464
- }
2465
- else if (isValidElement(node)) {
2466
- if (node._store) node._store.validated = true;
2467
- } else if (node) {
2468
- var iteratorFn = getIteratorFn(node);
2469
- if (typeof iteratorFn === "function") {
2470
- if (iteratorFn !== node.entries) {
2471
- var iterator = iteratorFn.call(node);
2472
- var step;
2473
- while (!(step = iterator.next()).done) if (isValidElement(step.value)) validateExplicitKey(step.value, parentType);
2474
- }
2475
- }
2476
- }
2477
- }
2478
- /**
2479
- * Given an element, validate that its props follow the propTypes definition,
2480
- * provided by the type.
2481
- *
2482
- * @param {ReactElement} element
2483
- */
2484
- function validatePropTypes(element) {
2485
- var type = element.type;
2486
- if (type === null || type === void 0 || typeof type === "string") return;
2487
- var propTypes;
2488
- if (typeof type === "function") propTypes = type.propTypes;
2489
- else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) propTypes = type.propTypes;
2490
- else return;
2491
- if (propTypes) {
2492
- var name = getComponentNameFromType(type);
2493
- checkPropTypes(propTypes, element.props, "prop", name, element);
2494
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2495
- propTypesMisspellWarningShown = true;
2496
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", getComponentNameFromType(type) || "Unknown");
2497
- }
2498
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2499
- }
2500
- /**
2501
- * Given a fragment, validate that it can only be provided with fragment props
2502
- * @param {ReactElement} fragment
2503
- */
2504
- function validateFragmentProps(fragment) {
2505
- var keys = Object.keys(fragment.props);
2506
- for (var i = 0; i < keys.length; i++) {
2507
- var key = keys[i];
2508
- if (key !== "children" && key !== "key") {
2509
- setCurrentlyValidatingElement$1(fragment);
2510
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
2511
- setCurrentlyValidatingElement$1(null);
2512
- break;
2513
- }
2514
- }
2515
- if (fragment.ref !== null) {
2516
- setCurrentlyValidatingElement$1(fragment);
2517
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
2518
- setCurrentlyValidatingElement$1(null);
2519
- }
2520
- }
2521
- var didWarnAboutKeySpread = {};
2522
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
2523
- var validType = isValidElementType(type);
2524
- if (!validType) {
2525
- var info = "";
2526
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
2527
- var sourceInfo = getSourceInfoErrorAddendum(source);
2528
- if (sourceInfo) info += sourceInfo;
2529
- else info += getDeclarationErrorAddendum();
2530
- var typeString;
2531
- if (type === null) typeString = "null";
2532
- else if (isArray(type)) typeString = "array";
2533
- else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
2534
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
2535
- info = " Did you accidentally export a JSX literal instead of a component?";
2536
- } else typeString = typeof type;
2537
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
2538
- }
2539
- var element = jsxDEV(type, props, key, source, self);
2540
- if (element == null) return element;
2541
- if (validType) {
2542
- var children = props.children;
2543
- if (children !== void 0) if (isStaticChildren) if (isArray(children)) {
2544
- for (var i = 0; i < children.length; i++) validateChildKeys(children[i], type);
2545
- if (Object.freeze) Object.freeze(children);
2546
- } else error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2547
- else validateChildKeys(children, type);
2548
- }
2549
- if (hasOwnProperty.call(props, "key")) {
2550
- var componentName = getComponentNameFromType(type);
2551
- var keys = Object.keys(props).filter(function(k$1) {
2552
- return k$1 !== "key";
2553
- });
2554
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
2555
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
2556
- error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", beforeExample, componentName, keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}", componentName);
2557
- didWarnAboutKeySpread[componentName + beforeExample] = true;
2558
- }
2559
- }
2560
- if (type === REACT_FRAGMENT_TYPE) validateFragmentProps(element);
2561
- else validatePropTypes(element);
2562
- return element;
2563
- }
2564
- function jsxWithValidationStatic(type, props, key) {
2565
- return jsxWithValidation(type, props, key, true);
2566
- }
2567
- function jsxWithValidationDynamic(type, props, key) {
2568
- return jsxWithValidation(type, props, key, false);
2569
- }
2570
- var jsx$1 = jsxWithValidationDynamic;
2571
- var jsxs$1 = jsxWithValidationStatic;
2572
- exports.Fragment = REACT_FRAGMENT_TYPE;
2573
- exports.jsx = jsx$1;
2574
- exports.jsxs = jsxs$1;
2575
- })();
2576
- }) });
2577
- var require_jsx_runtime = /* @__PURE__ */ __commonJS({ "../../node_modules/react/jsx-runtime.js": ((exports, module) => {
2578
- if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production_min();
2579
- else module.exports = require_react_jsx_runtime_development();
2580
- }) });
2581
-
2582
- //#endregion
2583
- //#region node_modules/@envive-ai/react-icons/dist/Sparkles.js
2584
- require_react();
2585
- var import_jsx_runtime$3 = /* @__PURE__ */ __toESM(require_jsx_runtime());
2586
- const SvgSparkles = (props) => /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("svg", {
2587
- xmlns: "http://www.w3.org/2000/svg",
2588
- width: 24,
2589
- height: 24,
2590
- fill: "currentColor",
2591
- ...props,
2592
- children: /* @__PURE__ */ (0, import_jsx_runtime$3.jsx)("path", {
2593
- stroke: "currentColor",
2594
- strokeLinecap: "round",
2595
- strokeLinejoin: "round",
2596
- strokeWidth: 1.114,
2597
- d: "m8.187 5.996 1.288 3.35c.21.545.314.817.477 1.046q.219.306.525.525c.23.163.502.268 1.046.477l3.35 1.289-3.35 1.288c-.544.21-.817.314-1.046.477q-.306.219-.525.525c-.163.23-.267.502-.477 1.046l-1.288 3.35-1.289-3.35c-.21-.544-.314-.817-.477-1.046a2.2 2.2 0 0 0-.525-.525c-.229-.163-.501-.267-1.046-.477L1.5 12.683l3.35-1.289c.545-.21.817-.314 1.046-.477.203-.144.38-.322.525-.525.163-.229.268-.501.477-1.046zM19.64 14.314l.644 1.674c.105.273.158.409.239.524q.108.153.262.262c.115.081.251.134.523.239l1.675.644-1.675.644c-.272.105-.408.157-.523.239q-.153.108-.262.262c-.081.115-.134.25-.239.523L19.64 21l-.644-1.675c-.105-.272-.157-.408-.239-.523a1.1 1.1 0 0 0-.262-.262c-.115-.082-.25-.134-.523-.239l-1.675-.644 1.675-.644c.272-.105.408-.158.523-.239q.153-.108.262-.262c.082-.115.134-.251.239-.524zM17.091 3l.644 1.675c.105.272.158.409.24.523q.108.154.262.262c.114.082.25.134.523.24l1.675.643-1.675.644c-.273.105-.409.158-.523.24q-.153.108-.263.262c-.081.114-.134.25-.239.523l-.644 1.675-.644-1.675c-.105-.273-.157-.409-.238-.523a1.1 1.1 0 0 0-.263-.263c-.114-.081-.25-.134-.523-.239l-1.675-.644 1.675-.644c.272-.105.409-.157.523-.239q.153-.109.263-.262c.081-.115.133-.25.238-.523z"
2598
- })
2599
- });
2600
- var Sparkles_default = SvgSparkles;
2601
-
2602
- //#endregion
2603
- //#region node_modules/@envive-ai/react-icons/dist/IconCloseVariant.js
2604
- require_react();
2605
- var import_jsx_runtime$2 = /* @__PURE__ */ __toESM(require_jsx_runtime());
2606
- const SvgIconCloseVariant = (props) => /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("svg", {
2607
- xmlns: "http://www.w3.org/2000/svg",
2608
- viewBox: "0 0 24 24",
2609
- ...props,
2610
- children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("g", {
2611
- className: "icon-close-variant_svg__layer",
2612
- children: /* @__PURE__ */ (0, import_jsx_runtime$2.jsx)("path", {
2613
- fill: "currentColor",
2614
- d: "m18.98 2.56-6.76 6.76-6.76-6.76-2.65 2.65 6.76 6.76-6.76 6.76 2.65 2.65 6.76-6.76 6.76 6.76 2.65-2.65-6.76-6.76 6.76-6.76z"
2615
- })
2616
- })
2617
- });
2618
- var IconCloseVariant_default = SvgIconCloseVariant;
2619
-
2620
- //#endregion
2621
- //#region src/SearchZeroState/overlay/overlayHostLocator.ts
2622
- const SEARCH_OVERLAY_ENTRYPOINT_ID = "spiffy-ai-search-overlay-entrypoint";
2623
- const SEARCH_OVERLAY_PORTAL_ID = "spiffy-ai-search-overlay-portal";
2624
- /**
2625
- * Find the portal target inside the overlay host's ShadowRoot.
2626
- */
2627
- function getOverlayPortalTarget(hostId = SEARCH_OVERLAY_ENTRYPOINT_ID) {
2628
- const bareMount = document.getElementById(SEARCH_OVERLAY_PORTAL_ID);
2629
- if (bareMount) return bareMount;
2630
- const host = document.getElementById(hostId);
2631
- if (!host) throw new Error(`[Overlay] Host #${hostId} not found`);
2632
- const sr = host.shadowRoot;
2633
- if (!sr) throw new Error("[Overlay] Host has no shadowRoot (was it initialized?)");
2634
- const mount = sr.getElementById(SEARCH_OVERLAY_PORTAL_ID);
2635
- if (!mount) throw new Error("[Overlay] Portal mount missing inside ShadowRoot");
2636
- return mount;
2637
- }
2638
-
2639
- //#endregion
2640
- //#region src/SearchZeroState/SearchOverlay.tsx
2641
- const SearchOverlay = React.forwardRef(({ children, className, dataTestId, role, ariaModal, ariaLabelledby, id, usingPortal }, ref) => {
2642
- const overlayClasses = classNames("spiffy-search-overlay", "spiffy-tw-fixed", "spiffy-tw-top-[0]", "spiffy-tw-left-[0]", "spiffy-tw-h-[100vh]", "spiffy-tw-w-full", "spiffy-h-[calc(100%-1rem)]", "spiffy-tw-px-[24px] spiffy-tw-pt-[16px] sm:spiffy-tw-px-[41px] sm:spiffy-tw-pt-[40px]", "spiffy-tw-z-[2147483647]", "spiffy-tw-overflow-y-auto", "spiffy-tw-overflow-x-hidden", className);
2643
- const overlayContentClasses = classNames("spiffy-search-overlay-content", "spiffy-tw-flex spiffy-tw-flex-col", "spiffy-tw-min-h-full", className);
2644
- const node = /* @__PURE__ */ jsx(motion.div, {
2645
- ref,
2646
- className: overlayClasses,
2647
- initial: { opacity: 0 },
2648
- animate: { opacity: 1 },
2649
- exit: { opacity: 0 },
2650
- transition: { duration: .2 },
2651
- children: /* @__PURE__ */ jsx("div", {
2652
- className: overlayContentClasses,
2653
- "data-testid": dataTestId,
2654
- role,
2655
- "aria-modal": ariaModal,
2656
- "aria-labelledby": ariaLabelledby,
2657
- id,
2658
- children
2659
- })
2660
- });
2661
- if (!usingPortal) return node;
2662
- try {
2663
- return createPortal(node, getOverlayPortalTarget());
2664
- } catch (err) {
2665
- return node;
2666
- }
2667
- });
2668
-
2669
- //#endregion
2670
- //#region src/SearchZeroState/zeroStateSearchVariants.ts
2671
- const searchZeroStateVariantClasses = {
2672
- backgroundTertiary: {
2673
- overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-tertiary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
2674
- sparklesIconColor: colorVar(ColorNames.AccentPrimary)
2675
- },
2676
- backgroundDark: {
2677
- overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-dark] spiffy-tw-text-[--spiffy-colors-text-light] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
2678
- sparklesIconColor: colorVar(ColorNames.AccentPrimary)
2679
- },
2680
- backgroundPrimary: {
2681
- overlayBackgroundClasses: "spiffy-tw-bg-[--spiffy-colors-background-primary] spiffy-tw-text-[--spiffy-colors-text-primary] spiffy-tw-bg-opacity-90 spiffy-tw-backdrop-blur-20",
2682
- sparklesIconColor: colorVar(ColorNames.AccentPrimary)
2683
- }
2684
- };
2685
-
2686
- //#endregion
2687
- //#region node_modules/@envive-ai/react-icons/dist/AiSearchBold.js
2688
- require_react();
2689
- var import_jsx_runtime$1 = /* @__PURE__ */ __toESM(require_jsx_runtime());
2690
- const SvgAiSearchBold = (props) => /* @__PURE__ */ (0, import_jsx_runtime$1.jsxs)("svg", {
2691
- xmlns: "http://www.w3.org/2000/svg",
2692
- width: 32,
2693
- height: 32,
2694
- fill: "none",
2695
- ...props,
2696
- children: [/* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("path", {
2697
- fill: "#AB1212",
2698
- stroke: "#AB1212",
2699
- strokeLinecap: "round",
2700
- strokeLinejoin: "round",
2701
- d: "m25.345 3.271 1.103 2.87c.18.466.27.7.409.896q.186.263.45.45c.196.139.429.229.896.408L31.072 9l-2.87 1.103c-.466.18-.7.27-.896.41a1.9 1.9 0 0 0-.45.449c-.139.196-.229.43-.408.896l-1.104 2.869-1.103-2.87c-.18-.466-.27-.7-.409-.895a1.9 1.9 0 0 0-.45-.45c-.196-.14-.429-.23-.896-.409L19.618 9l2.87-1.104c.466-.18.7-.269.896-.409a1.9 1.9 0 0 0 .45-.45c.139-.195.228-.429.408-.895z"
2702
- }), /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)("path", {
2703
- stroke: "#111",
2704
- strokeLinecap: "round",
2705
- strokeWidth: 2,
2706
- d: "M18.807 5.469A9.402 9.402 0 1 0 13.4 22.72c4.463.11 8.277-2.907 9.34-7.055M19.312 21.25l4.813 5.25"
2707
- })]
2708
- });
2709
- var AiSearchBold_default = SvgAiSearchBold;
2710
-
2711
- //#endregion
2712
- //#region node_modules/@envive-ai/react-icons/dist/AiSearchThin.js
2713
- require_react();
2714
- var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime());
2715
- const SvgAiSearchThin = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
2716
- xmlns: "http://www.w3.org/2000/svg",
2717
- width: 26,
2718
- height: 23,
2719
- fill: "none",
2720
- ...props,
2721
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
2722
- stroke: "currentColor",
2723
- strokeLinecap: "round",
2724
- strokeLinejoin: "round",
2725
- d: "M19.106 1.148 20 3.47c.145.377.218.566.33.725.1.14.224.263.364.363.16.113.348.186.726.331l2.32.893-2.32.893c-.378.145-.567.217-.726.33q-.212.151-.363.364c-.113.159-.186.348-.33.725l-.894 2.321-.893-2.32c-.145-.378-.217-.567-.33-.726-.1-.14-.223-.264-.364-.364-.159-.113-.347-.185-.725-.33l-2.321-.893 2.321-.893c.378-.145.566-.218.725-.33.14-.1.264-.224.364-.364.113-.16.185-.348.33-.725z"
2726
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
2727
- stroke: "currentColor",
2728
- strokeLinecap: "round",
2729
- d: "M13.108 2.928a7.607 7.607 0 1 0 3.182 8.25M15.544 17.773l3.592 3.934"
2730
- })]
2731
- });
2732
- var AiSearchThin_default = SvgAiSearchThin;
2733
-
2734
- //#endregion
2735
- //#region src/SearchZeroState/SearchIcon.tsx
2736
- const SEARCH_ENTRYPOINT_BUTTON_TESTID = "spiffy-search-entrypoint-button";
2737
- const SearchIcon = ({ size = 22, variant = "thin", color = "currentColor", onClick, label, entryPointRef }) => {
2738
- const containerClasses = classNames([
2739
- "spiffy-global-search-input-container",
2740
- "spiffy-tw-relative",
2741
- "spiffy-tw-flex",
2742
- "spiffy-tw-items-center"
2743
- ]);
2744
- const iconStrokeWidth = variant === "thin" ? "inherit" : "2px";
2745
- const IconComponent = {
2746
- thin: AiSearchThin_default,
2747
- bold: AiSearchBold_default
2748
- }[variant];
2749
- return /* @__PURE__ */ jsxs("button", {
2750
- className: containerClasses,
2751
- type: "button",
2752
- onClick,
2753
- "data-testid": SEARCH_ENTRYPOINT_BUTTON_TESTID,
2754
- ref: entryPointRef,
2755
- children: [/* @__PURE__ */ jsx(IconComponent, {
2756
- style: {
2757
- width: size,
2758
- height: size
2759
- },
2760
- fill: color,
2761
- strokeWidth: iconStrokeWidth
2762
- }), label && /* @__PURE__ */ jsx(Typography, {
2763
- variant: "body3",
2764
- className: "spiffy-global-search-text",
2765
- children: label
2766
- })]
2767
- });
2768
- };
2769
-
2770
- //#endregion
2771
- //#region src/SearchZeroState/components/RecommendedProducts.tsx
2772
- const RecommendedProducts = ({ retrievedProducts, merchantShortName, productCardConfig = {
2773
- variant: "minimal",
2774
- hoverVariant: "none",
2775
- layoutVariant: "square"
2776
- }, productGridVariant = "square", heading }) => {
2777
- const { track } = useAmplitudeTracking();
2778
- const containerClasses = classNames("spiffy-tw-justify-center", "spiffy-tw-overflow-hidden", "spiffy-tw-bg-white", "spiffy-tw-relative", "spiffy-tw-px-[24px]", "spiffy-tw-py-[16px]", "sm:spiffy-tw-px-[41px]", "sm:spiffy-tw-py-[40px]");
2779
- const titleContainerClasses = classNames("spiffy-tw-w-full", "spiffy-tw-border-b", "spiffy-tw-border-solid", "spiffy-tw-border-b-[--spiffy-colors-text-accent]", "spiffy-tw-pb-[8px]", "spiffy-tw-mb-[16px]");
2780
- const productGridClasses = classNames("spiffy-tw-grid", "spiffy-tw-justify-items-stretch", "spiffy-tw-grid-cols-2", "md:spiffy-tw-grid-cols-3", "lg:spiffy-tw-grid-cols-4", "spiffy-tw-gap-x-[4px]", "spiffy-tw-gap-y-[24px]", "spiffy-tw-h-full", "spiffy-tw-w-full", "spiffy-tw-items-stretch");
2781
- if (retrievedProducts == null || retrievedProducts.length === 0) return null;
2782
- const handleProductClick = (product, index) => {
2783
- track(SpiffyMetricsEventName.ProductCardClicked, {
2784
- eventProps: {
2785
- url: product.url,
2786
- search_response_id: void 0,
2787
- product_response_id: product.response_id,
2788
- trigger_location: ChatElementDisplayLocation.SEARCH_ZERO_STATE_SUGGESTED_PRODUCTS,
2789
- click_position: index != null ? index + 1 : null,
2790
- title: product.title,
2791
- original_price: product.original_price,
2792
- sale_price: product.sale_price,
2793
- average_rating: product.average_rating,
2794
- number_reviews: product.number_reviews
2795
- },
2796
- alsoSendToGoogleAnalytics: true
2797
- });
2798
- };
2799
- return /* @__PURE__ */ jsxs(motion.div, {
2800
- className: containerClasses,
2801
- initial: { opacity: 0 },
2802
- animate: { opacity: 1 },
2803
- exit: { opacity: 0 },
2804
- transition: { duration: .2 },
2805
- style: {
2806
- left: "50%",
2807
- right: "50%",
2808
- marginLeft: "-50vw",
2809
- marginRight: "-50vw",
2810
- width: "100vw"
2811
- },
2812
- children: [heading && /* @__PURE__ */ jsx("div", {
2813
- className: titleContainerClasses,
2814
- children: /* @__PURE__ */ jsx(Typography, {
2815
- variant: "h1",
2816
- className: "spiffy-tw-text-[--spiffy-colors-text-accent]",
2817
- children: heading
2818
- })
2819
- }), /* @__PURE__ */ jsx(ProductGrid, {
2820
- productList: retrievedProducts,
2821
- productGridVariant,
2822
- productGridClasses,
2823
- productCardConfig,
2824
- merchantShortName,
2825
- onProductClick: handleProductClick
2826
- })]
2827
- });
2828
- };
2829
-
2830
- //#endregion
2831
- //#region src/SearchZeroState/SearchZeroState.tsx
2832
- const SEARCH_ENTRYPOINT_INPUT_TESTID = "spiffy-search-entrypoint-input";
2833
- const SearchZeroState = ({ widgetConfig, initialIsOpen, entryPointRef }) => {
2834
- console.log("SearchZeroState: widgetConfig", widgetConfig);
2835
- const { searchZeroStateVariant, searchInputVariant, searchIconVariant, searchIconSize = 24, searchBoxPlaceholder, layout, compactLabel, initialSuggestions = [], animationSpeed = "standard", suggestionButtonConfig, includeSubtitle, usingPortal = false } = widgetConfig;
2836
- const { variant: suggestionButtonVariant, hoverVariant: suggestionButtonHoverVariant, borderRadius: suggestionButtonBorderRadius } = suggestionButtonConfig;
2837
- const [isOpen, setIsOpen] = useState(!!initialIsOpen);
2838
- const searchInputRef = useRef(null);
2839
- const searchInput = useSearch({ allowRedirect: true });
2840
- const { track } = useAmplitudeTracking();
2841
- const { recommendedProductsHeading, searchOverlayHeading, productCardConfig, merchantShortName, recommendedProducts, searchText, autocompleteResults, focusedIndex, focusedOptionId, shouldShowAutocomplete, onSearchInputChange, onSearchInputFocus, onSearchInputBlur, onKeyDown, onAutocompleteSelect, onSubmitSearch, resetSearch } = searchInput;
2842
- const { overlayBackgroundClasses, sparklesIconColor } = searchZeroStateVariantClasses[searchZeroStateVariant && searchZeroStateVariantClasses[searchZeroStateVariant] ? searchZeroStateVariant : "backgroundTertiary"];
2843
- const { searchInputIconColor } = searchInputVariantClasses[searchInputVariant];
2844
- const handleOpen = () => setIsOpen(true);
2845
- const handleClose = () => setIsOpen(false);
2846
- useEffect(() => {
2847
- if (isOpen) track(SpiffyMetricsEventName.SearchComponentVisible, { eventProps: { search_component: SpiffyWidgets.SearchZeroState } });
2848
- }, [isOpen, track]);
2849
- useEffect(() => {
2850
- if (isOpen) {
2851
- resetSearch();
2852
- searchInputRef.current?.focus();
2853
- }
2854
- }, [isOpen, resetSearch]);
2855
- const submitSearchString = useCallback((query) => {
2856
- onSearchInputChange(query);
2857
- if (onSubmitSearch && query.trim()) {
2858
- onSubmitSearch();
2859
- setIsOpen(false);
2860
- }
2861
- }, [onSubmitSearch, onSearchInputChange]);
2862
- const searchChange = (value) => {
2863
- onSearchInputChange(value);
2864
- };
2865
- if (!isOpen) {
2866
- if (layout === "icon") return /* @__PURE__ */ jsx(SearchIcon, {
2867
- entryPointRef,
2868
- size: searchIconSize,
2869
- variant: searchIconVariant,
2870
- label: compactLabel,
2871
- onClick: handleOpen,
2872
- color: searchInputIconColor
2873
- });
2874
- return /* @__PURE__ */ jsx(SearchInput, {
2875
- value: "",
2876
- onChange: () => {},
2877
- placeholder: searchBoxPlaceholder,
2878
- suggestions: [],
2879
- onFocus: handleOpen,
2880
- searchInputVariant,
2881
- dataTestId: SEARCH_ENTRYPOINT_INPUT_TESTID
2882
- });
2883
- }
2884
- return /* @__PURE__ */ jsx(AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxs(SearchOverlay, {
2885
- role: "dialog",
2886
- ariaModal: true,
2887
- ariaLabelledby: "global-search-title",
2888
- className: overlayBackgroundClasses,
2889
- usingPortal,
2890
- children: [
2891
- /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
2892
- className: "spiffy-tw-relative spiffy-tw-mb-4",
2893
- children: [/* @__PURE__ */ jsxs("div", {
2894
- className: "spiffy-tw-flex spiffy-tw-items-center",
2895
- children: [/* @__PURE__ */ jsx(Typography, {
2896
- id: "global-search-title",
2897
- variant: "t3",
2898
- children: searchOverlayHeading
2899
- }), /* @__PURE__ */ jsx(Sparkles_default, {
2900
- className: "sm:spiffy-tw-w-[36px] sm:spiffy-tw-h-[45px] spiffy-tw-w-[24px] spiffy-tw-h-[36px] spiffy-tw-ml-2",
2901
- color: sparklesIconColor,
2902
- stroke: "2px"
2903
- })]
2904
- }), includeSubtitle && /* @__PURE__ */ jsx(Typography, {
2905
- variant: "body2",
2906
- children: "Go ahead, get as specific as you like..."
2907
- })]
2908
- }), /* @__PURE__ */ jsx("button", {
2909
- onClick: handleClose,
2910
- className: "spiffy-tw-absolute spiffy-tw-top-4 spiffy-tw-right-4 sm:spiffy-tw-top-8 sm:spiffy-tw-right-8 ",
2911
- "aria-label": "Close search",
2912
- type: "button",
2913
- children: /* @__PURE__ */ jsx(IconCloseVariant_default, {
2914
- className: "spiffy-tw-w-[20px] spiffy-tw-h-[20px] sm:spiffy-tw-w-[28px] sm:spiffy-tw-h-[28px]",
2915
- strokeWidth: "2px"
2916
- })
2917
- })] }),
2918
- /* @__PURE__ */ jsx(SearchInputForm, {
2919
- searchInputRef,
2920
- searchInputVariant,
2921
- searchText,
2922
- autocompleteResults,
2923
- searchBoxPlaceholder,
2924
- focusedOptionId,
2925
- shouldShowAutocomplete,
2926
- focusedIndex,
2927
- onKeyDown,
2928
- onAutocompleteSelect,
2929
- onSearchInputChange: searchChange,
2930
- onSearchSubmit: submitSearchString,
2931
- onSearchInputFocus,
2932
- onSearchInputBlur
2933
- }),
2934
- /* @__PURE__ */ jsxs(AnimatePresence, { children: [initialSuggestions && initialSuggestions.length > 0 && /* @__PURE__ */ jsx(motion.div, {
2935
- className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
2936
- initial: { opacity: 0 },
2937
- animate: { opacity: 1 },
2938
- exit: { opacity: 0 },
2939
- transition: { duration: .2 },
2940
- children: /* @__PURE__ */ jsx("div", {
2941
- className: "spiffy-tw-mt-6",
2942
- children: /* @__PURE__ */ jsx(SuggestionBar, {
2943
- id: "global-search-suggestions",
2944
- locationForMetrics: SuggestionBarLocationForMetrics.SUGGESTION_BAR_TOP,
2945
- buttonTexts: initialSuggestions,
2946
- buttonBorderRadius: suggestionButtonBorderRadius,
2947
- buttonVariation: suggestionButtonVariant ?? "primary",
2948
- hoverButtonVariation: suggestionButtonHoverVariant ?? "primary",
2949
- animationSpeed,
2950
- handleReply: (message) => {
2951
- if (message.type === MessageType.QueryTyped && message.metadata?.content) {
2952
- track(SpiffyMetricsEventName.SearchZeroStateSuggestionClicked, { eventProps: {
2953
- queryText: message.metadata.content,
2954
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
2955
- } });
2956
- submitSearchString(message.metadata.content);
2957
- }
2958
- },
2959
- twoRowsOnMobile: true
2960
- })
2961
- })
2962
- }), recommendedProducts.length > 0 && /* @__PURE__ */ jsx("div", {
2963
- className: "spiffy-tw-mt-[40px]",
2964
- children: /* @__PURE__ */ jsx(RecommendedProducts, {
2965
- retrievedProducts: recommendedProducts,
2966
- merchantShortName,
2967
- productCardConfig,
2968
- productGridVariant: "standard",
2969
- heading: recommendedProductsHeading
2970
- })
2971
- })] })
2972
- ]
2973
- }) });
2974
- };
2975
-
2976
- //#endregion
2977
- //#region src/SearchZeroState/SearchZeroStateWidget.tsx
2978
- const SearchZeroStateWidget = ({ initialIsOpen, widgetConfigId = "searchEntryPointIcon", entryPointRef }) => {
2979
- const newConfig = useNewOrgConfig();
2980
- const widgetConfig = useMemo(() => {
2981
- if (newConfig && newConfig.frontendConfig?.widgetConfigs) return { ...(newConfig.frontendConfig?.widgetConfigs).find((widget) => widget.key === widgetConfigId).config };
2982
- return null;
2983
- }, [newConfig, widgetConfigId]);
2984
- if (!widgetConfig) return null;
2985
- return /* @__PURE__ */ jsx(SearchZeroState, {
2986
- widgetConfig,
2987
- initialIsOpen,
2988
- entryPointRef
2989
- });
2990
- };
2991
-
2992
- //#endregion
2993
4
  export { SearchZeroState, SearchZeroStateWidget };