@stokr/components-library 3.0.67 → 3.0.68

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 (796) hide show
  1. package/README.md +179 -179
  2. package/dist/analytics/index.js +1 -1
  3. package/dist/api/fetchData.js +2 -2
  4. package/dist/components/2FA/Connect2FA.js +1 -1
  5. package/dist/components/2FA/EnterCode.js +1 -1
  6. package/dist/components/2FA/Sucess2FA.js +1 -1
  7. package/dist/components/2FA/login-with-otp-flow.js +1 -1
  8. package/dist/components/2FA/main-flow.js +1 -1
  9. package/dist/components/AccountBalance/AccountBalance.js +1 -1
  10. package/dist/components/AdminDashboard/Table/ReactTable.js +5 -5
  11. package/dist/components/AdminDashboard/Table/ReactTableWrapper.js +1 -1
  12. package/dist/components/AdminDashboard/Table/Table.js +1 -1
  13. package/dist/components/AgreementItem/AgreementItem.js +1 -1
  14. package/dist/components/BackButton/BackButton.js +1 -1
  15. package/dist/components/Background/Background.js +1 -1
  16. package/dist/components/BasicTable/BasicTable.js +1 -1
  17. package/dist/components/BlogPost/BlogPost.js +1 -1
  18. package/dist/components/Button/Button.styles.js +1 -1
  19. package/dist/components/Button/GlareButton.js +2 -2
  20. package/dist/components/ChartLegend/ChartLegend.js +3 -3
  21. package/dist/components/Checkbox/Checkbox.js +1 -1
  22. package/dist/components/Checklist/ChecklistCard.js +1 -1
  23. package/dist/components/Chips/Chip.js +1 -1
  24. package/dist/components/Chips/ChipWrapper.js +1 -1
  25. package/dist/components/ComponentScroll/ComponentScroll.js +3 -3
  26. package/dist/components/Country/CountrySelect.js +4 -4
  27. package/dist/components/CryptoAddress/ComponentWrap.js +1 -1
  28. package/dist/components/CryptoAddress/CryptoAddress.js +7 -7
  29. package/dist/components/CryptoAddress/RadioWrap.js +1 -1
  30. package/dist/components/CryptoAddressDetails/CryptoAddressDetails.js +1 -1
  31. package/dist/components/CryptoAddressWrapper/CryptoAddressWrapper.js +1 -1
  32. package/dist/components/FAQ/FAQ.js +1 -1
  33. package/dist/components/FAQ/FAQ.styles.js +2 -2
  34. package/dist/components/Footer/Footer.js +1 -1
  35. package/dist/components/Footer/FooterLayout.js +1 -1
  36. package/dist/components/Footer/FooterMenu.js +3 -3
  37. package/dist/components/ForgotPasswordModal/ForgotPasswordModal.js +5 -5
  38. package/dist/components/Form/Form.js +2 -2
  39. package/dist/components/Form/Form.styles.js +1 -1
  40. package/dist/components/Header/Header.js +3 -3
  41. package/dist/components/HeroBlock/HeroVideoBlock.js +1 -1
  42. package/dist/components/IdentityInfo/IdentityInfo.js +1 -1
  43. package/dist/components/InfoIcon/InfoIcon.js +6 -6
  44. package/dist/components/Input/DatePickerInput.js +3 -5
  45. package/dist/components/Input/Input.js +1 -1
  46. package/dist/components/Input/InputPassword.js +1 -1
  47. package/dist/components/Input/InputUsername.js +1 -1
  48. package/dist/components/Input/InputWithButton.js +1 -1
  49. package/dist/components/Input/MultiSelect.js +3 -4
  50. package/dist/components/Input/OtpInput.js +2 -2
  51. package/dist/components/Input/RangeInput.js +4 -4
  52. package/dist/components/Input/Select.js +4 -5
  53. package/dist/components/Input/TableFilterDropdown.js +1 -1
  54. package/dist/components/InvestmentStat/InvestmentStat.js +1 -1
  55. package/dist/components/LatestUpdate/LatestUpdate.js +1 -1
  56. package/dist/components/Layout/Layout.js +1 -1
  57. package/dist/components/LoginModal/LoginModal.js +6 -6
  58. package/dist/components/MainMenu/DynamicMainMenu.js +3 -3
  59. package/dist/components/MainMenu/MainMenu.js +6 -6
  60. package/dist/components/Modal/Modal.js +2 -2
  61. package/dist/components/Modal/NewVentureModal/NewVentureModal.js +9 -9
  62. package/dist/components/Modal/PaymentModal.js +2 -2
  63. package/dist/components/Modal/SuccessModal/SuccessModal.js +3 -3
  64. package/dist/components/MultiProgressBar/MultiProgressBar.js +1 -1
  65. package/dist/components/Number/Number.js +1 -1
  66. package/dist/components/PageTransition/PageTransition.js +1 -1
  67. package/dist/components/Pagination/Pagination.js +1 -1
  68. package/dist/components/Pagination/PaginationControls.js +1 -1
  69. package/dist/components/Payment/PaymentDisplay.js +4 -4
  70. package/dist/components/Payment/TimerComponent.js +1 -1
  71. package/dist/components/ProfileBadge/ProfileBadge.js +1 -1
  72. package/dist/components/ProfileBox/ProfileBox.js +1 -1
  73. package/dist/components/ProfileStat/ProfileStat.js +1 -1
  74. package/dist/components/QRCode/QRCode.js +2 -2
  75. package/dist/components/Radio/Radio.js +1 -1
  76. package/dist/components/RefreshButton/RefreshButton.js +1 -1
  77. package/dist/components/RegisterConfirmModal/RegisterConfirmModal.js +1 -1
  78. package/dist/components/RegisterModal/RegisterModal.js +8 -8
  79. package/dist/components/RequestDataBox/RequestDataBox.js +1 -1
  80. package/dist/components/ResetConfirmModal/ResetConfirmModal.js +1 -1
  81. package/dist/components/ResetPasswordModal/ResetPasswordModal.js +6 -6
  82. package/dist/components/SEO/SEO.js +3 -3
  83. package/dist/components/Slider/Slider.js +4 -4
  84. package/dist/components/SmartLink/SmartLink.js +1 -1
  85. package/dist/components/Snackbar/Snackbar.js +1 -1
  86. package/dist/components/Snackbar/SnackbarProvider.js +1 -1
  87. package/dist/components/StepController/StepController.js +1 -1
  88. package/dist/components/StepController/StepControllerContext.js +1 -1
  89. package/dist/components/StepController/StepControllerProgress.js +1 -1
  90. package/dist/components/StepsProgress/StepIndicator.js +1 -1
  91. package/dist/components/Switch/Switch.js +1 -1
  92. package/dist/components/Tabs/Tabs.js +1 -1
  93. package/dist/components/TabsNav/TabNav.js +1 -1
  94. package/dist/components/TabsNav/TabsNav.js +1 -1
  95. package/dist/components/TaxResidenceCard/TaxResidenceCard.js +1 -1
  96. package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +2 -2
  97. package/dist/components/TeamOverview/TeamOverview.js +1 -1
  98. package/dist/components/TermsModal/TermsModal.js +5 -5
  99. package/dist/components/Timeline/TimelineStep.js +1 -1
  100. package/dist/components/ToDoList/ToDoList.js +3 -3
  101. package/dist/components/ToDoList/ToDoListTask.js +4 -4
  102. package/dist/components/TransactionDetails/TransactionDetails.js +1 -1
  103. package/dist/components/TransactionDetails/TransactionDetails.styles.js +2 -2
  104. package/dist/components/TransactionInfo/TransactionInfo.js +1 -1
  105. package/dist/components/VerifyEmailModal/VerifyEmailModal.js +5 -5
  106. package/dist/components/headerHo/HeaderHo.js +1 -3
  107. package/dist/components/logo/Logo.js +1 -1
  108. package/dist/components/taxId/register-taxid.js +4 -4
  109. package/dist/context/Auth.js +12 -15
  110. package/dist/context/AuthContext.js +4 -4
  111. package/dist/firebase-config.js +2 -4
  112. package/dist/hooks/useNewVentureForm.js +1 -1
  113. package/dist/index.js +6 -7
  114. package/dist/manifest.json +25 -25
  115. package/dist/model/axios.js +1 -2
  116. package/dist/model/axiosPublic.js +1 -2
  117. package/dist/robots.txt +3 -3
  118. package/dist/routing/RouterWrapper.js +1 -1
  119. package/dist/runtime-config.js +1 -1
  120. package/dist/static/fonts/icomoon/icomoon.eot +0 -0
  121. package/dist/static/fonts/icomoon/icomoon.svg +52 -52
  122. package/dist/static/fonts/icomoon/icomoon.ttf +0 -0
  123. package/dist/static/fonts/icomoon/icomoon.woff +0 -0
  124. package/dist/static/fonts/icomoon/selection.json +0 -0
  125. package/dist/static/fonts/icomoon/style.css +0 -0
  126. package/dist/static/images/Glassess.svg +5 -5
  127. package/dist/static/images/add-folder-icon.svg +4 -4
  128. package/dist/static/images/arrow-down-black.svg +21 -21
  129. package/dist/static/images/check-icon.svg +3 -3
  130. package/dist/static/images/checkmark-circle-icon.svg +3 -3
  131. package/dist/static/images/close-circle-icon.svg +2 -2
  132. package/dist/static/images/copy_icon.svg +4 -4
  133. package/dist/static/images/cross-icon.svg +3 -3
  134. package/dist/static/images/currency/eth.svg +10 -10
  135. package/dist/static/images/currency/eth_logo.svg +8 -8
  136. package/dist/static/images/currency/eur.svg +3 -3
  137. package/dist/static/images/currency/usdc-logo.svg +5 -5
  138. package/dist/static/images/doc-icon.svg +3 -3
  139. package/dist/static/images/download_icon.svg +3 -3
  140. package/dist/static/images/external-link-icon.svg +3 -3
  141. package/dist/static/images/filter-icon.svg +6 -6
  142. package/dist/static/images/globe.svg +15 -15
  143. package/dist/static/images/mangopay.svg +20 -20
  144. package/dist/static/images/numbers/number_eight.svg +3 -3
  145. package/dist/static/images/numbers/number_five.svg +4 -4
  146. package/dist/static/images/numbers/number_four.svg +3 -3
  147. package/dist/static/images/numbers/number_nine.svg +4 -4
  148. package/dist/static/images/numbers/number_one.svg +4 -4
  149. package/dist/static/images/numbers/number_seven.svg +4 -4
  150. package/dist/static/images/numbers/number_six.svg +4 -4
  151. package/dist/static/images/numbers/number_three.svg +3 -3
  152. package/dist/static/images/numbers/number_two.svg +4 -4
  153. package/dist/static/images/numbers/number_zero.svg +3 -3
  154. package/dist/static/images/plus-icon.svg +4 -4
  155. package/dist/static/images/prof-inv.svg +3 -3
  156. package/dist/static/images/search-icon.svg +3 -3
  157. package/dist/static/images/transfer-icon.svg +10 -10
  158. package/dist/static/images/trash.svg +16 -16
  159. package/dist/static/images/upload.svg +5 -5
  160. package/dist/static/images/warning-filled.svg +3 -3
  161. package/dist/styles/global.js +2 -2
  162. package/dist/utils/copyToClipboard.js +7 -7
  163. package/dist/utils/delete-redirect-cookie-and-navigate.js +3 -3
  164. package/dist/utils/moment.js +3 -2
  165. package/dist/utils/redirect-url.js +2 -2
  166. package/dist/utils/set-redirect-cookie.js +2 -2
  167. package/dist/utils/transition.js +1 -1
  168. package/package.json +143 -143
  169. package/dist/_virtual/Collapse.js +0 -4
  170. package/dist/_virtual/Component.js +0 -4
  171. package/dist/_virtual/Range.js +0 -4
  172. package/dist/_virtual/ResizeObserver.es.js +0 -6
  173. package/dist/_virtual/UnmountClosed.js +0 -4
  174. package/dist/_virtual/_commonjsHelpers.js +0 -38
  175. package/dist/_virtual/arrows.js +0 -4
  176. package/dist/_virtual/attributes-to-props.js +0 -4
  177. package/dist/_virtual/constants.js +0 -4
  178. package/dist/_virtual/default-props.js +0 -4
  179. package/dist/_virtual/defaultRenderElements.js +0 -4
  180. package/dist/_virtual/dom-to-react.js +0 -4
  181. package/dist/_virtual/domparser.js +0 -4
  182. package/dist/_virtual/dots.js +0 -4
  183. package/dist/_virtual/getInnerHeight.js +0 -4
  184. package/dist/_virtual/getInnerWidth.js +0 -4
  185. package/dist/_virtual/getScrollbarWidth.js +0 -4
  186. package/dist/_virtual/hoist-non-react-statics.cjs.js +0 -2
  187. package/dist/_virtual/html-to-dom.js +0 -4
  188. package/dist/_virtual/index.js +0 -5
  189. package/dist/_virtual/index10.js +0 -5
  190. package/dist/_virtual/index11.js +0 -7
  191. package/dist/_virtual/index12.js +0 -7
  192. package/dist/_virtual/index13.js +0 -7
  193. package/dist/_virtual/index14.js +0 -4
  194. package/dist/_virtual/index15.js +0 -7
  195. package/dist/_virtual/index16.js +0 -7
  196. package/dist/_virtual/index17.js +0 -7
  197. package/dist/_virtual/index18.js +0 -4
  198. package/dist/_virtual/index19.js +0 -4
  199. package/dist/_virtual/index2.js +0 -7
  200. package/dist/_virtual/index20.js +0 -4
  201. package/dist/_virtual/index21.js +0 -4
  202. package/dist/_virtual/index22.js +0 -4
  203. package/dist/_virtual/index23.js +0 -4
  204. package/dist/_virtual/index24.js +0 -4
  205. package/dist/_virtual/index25.js +0 -4
  206. package/dist/_virtual/index26.js +0 -4
  207. package/dist/_virtual/index27.js +0 -4
  208. package/dist/_virtual/index28.js +0 -4
  209. package/dist/_virtual/index29.js +0 -4
  210. package/dist/_virtual/index3.js +0 -5
  211. package/dist/_virtual/index30.js +0 -4
  212. package/dist/_virtual/index31.js +0 -4
  213. package/dist/_virtual/index4.js +0 -5
  214. package/dist/_virtual/index5.js +0 -5
  215. package/dist/_virtual/index6.js +0 -5
  216. package/dist/_virtual/index7.js +0 -7
  217. package/dist/_virtual/index8.js +0 -4
  218. package/dist/_virtual/index9.js +0 -5
  219. package/dist/_virtual/initial-state.js +0 -4
  220. package/dist/_virtual/inner-slider.js +0 -4
  221. package/dist/_virtual/innerSliderUtils.js +0 -4
  222. package/dist/_virtual/isString.js +0 -4
  223. package/dist/_virtual/node.js +0 -4
  224. package/dist/_virtual/performance-now.js +0 -4
  225. package/dist/_virtual/popper.js +0 -6
  226. package/dist/_virtual/possibleStandardNamesOptimized.js +0 -4
  227. package/dist/_virtual/react-is.development.js +0 -4
  228. package/dist/_virtual/react-is.production.min.js +0 -4
  229. package/dist/_virtual/react-table.development.js +0 -4
  230. package/dist/_virtual/react-table.production.min.js +0 -4
  231. package/dist/_virtual/react-tippy.js +0 -5
  232. package/dist/_virtual/react-tippy2.js +0 -4
  233. package/dist/_virtual/returnFalse.js +0 -4
  234. package/dist/_virtual/slider.js +0 -4
  235. package/dist/_virtual/styles.js +0 -4
  236. package/dist/_virtual/track.js +0 -4
  237. package/dist/_virtual/types.js +0 -4
  238. package/dist/_virtual/utilities.js +0 -4
  239. package/dist/_virtual/utilities2.js +0 -4
  240. package/dist/_virtual/utilities3.js +0 -4
  241. package/dist/_virtual/utils.js +0 -4
  242. package/dist/components-library.css +0 -781
  243. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -8
  244. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -6
  245. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -7
  246. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
  247. package/dist/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -6
  248. package/dist/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -15
  249. package/dist/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -17
  250. package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -12
  251. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
  252. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -8
  253. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -16
  254. package/dist/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -13
  255. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -6
  256. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -24
  257. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -6
  258. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -6
  259. package/dist/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -25
  260. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -13
  261. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -12
  262. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -10
  263. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  264. package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -10
  265. package/dist/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -10
  266. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -10
  267. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -14
  268. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -9
  269. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -11
  270. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -11
  271. package/dist/node_modules/@date-fns/tz/date/index.js +0 -66
  272. package/dist/node_modules/@date-fns/tz/date/mini.js +0 -124
  273. package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
  274. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -28
  275. package/dist/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +0 -345
  276. package/dist/node_modules/@emotion/hash/dist/emotion-hash.esm.js +0 -31
  277. package/dist/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js +0 -10
  278. package/dist/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js +0 -84
  279. package/dist/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +0 -50
  280. package/dist/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +0 -169
  281. package/dist/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js +0 -83
  282. package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +0 -53
  283. package/dist/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js +0 -9
  284. package/dist/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js +0 -45
  285. package/dist/node_modules/@firebase/app/dist/esm/index.esm.js +0 -609
  286. package/dist/node_modules/@firebase/auth/dist/esm/index-36fcbc82.js +0 -5751
  287. package/dist/node_modules/@firebase/component/dist/esm/index.esm.js +0 -291
  288. package/dist/node_modules/@firebase/logger/dist/esm/index.esm.js +0 -106
  289. package/dist/node_modules/@firebase/util/dist/index.esm.js +0 -828
  290. package/dist/node_modules/@firebase/util/dist/postinstall.js +0 -4
  291. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -257
  292. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -122
  293. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -34
  294. package/dist/node_modules/@lottiefiles/dotlottie-react/dist/index.js +0 -53
  295. package/dist/node_modules/@lottiefiles/dotlottie-web/dist/index.js +0 -1973
  296. package/dist/node_modules/add-px-to-style/index.js +0 -48
  297. package/dist/node_modules/axios/index.js +0 -38
  298. package/dist/node_modules/axios/lib/adapters/adapters.js +0 -71
  299. package/dist/node_modules/axios/lib/adapters/fetch.js +0 -219
  300. package/dist/node_modules/axios/lib/adapters/xhr.js +0 -141
  301. package/dist/node_modules/axios/lib/axios.js +0 -50
  302. package/dist/node_modules/axios/lib/cancel/CancelToken.js +0 -99
  303. package/dist/node_modules/axios/lib/cancel/CanceledError.js +0 -20
  304. package/dist/node_modules/axios/lib/cancel/isCancel.js +0 -6
  305. package/dist/node_modules/axios/lib/core/Axios.js +0 -188
  306. package/dist/node_modules/axios/lib/core/AxiosError.js +0 -67
  307. package/dist/node_modules/axios/lib/core/AxiosHeaders.js +0 -231
  308. package/dist/node_modules/axios/lib/core/InterceptorManager.js +0 -66
  309. package/dist/node_modules/axios/lib/core/buildFullPath.js +0 -12
  310. package/dist/node_modules/axios/lib/core/dispatchRequest.js +0 -52
  311. package/dist/node_modules/axios/lib/core/mergeConfig.js +0 -88
  312. package/dist/node_modules/axios/lib/core/settle.js +0 -18
  313. package/dist/node_modules/axios/lib/core/transformData.js +0 -17
  314. package/dist/node_modules/axios/lib/defaults/index.js +0 -116
  315. package/dist/node_modules/axios/lib/defaults/transitional.js +0 -9
  316. package/dist/node_modules/axios/lib/env/data.js +0 -4
  317. package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -34
  318. package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
  319. package/dist/node_modules/axios/lib/helpers/bind.js +0 -8
  320. package/dist/node_modules/axios/lib/helpers/buildURL.js +0 -32
  321. package/dist/node_modules/axios/lib/helpers/combineURLs.js +0 -6
  322. package/dist/node_modules/axios/lib/helpers/composeSignals.js +0 -39
  323. package/dist/node_modules/axios/lib/helpers/cookies.js +0 -49
  324. package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +0 -54
  325. package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -9
  326. package/dist/node_modules/axios/lib/helpers/isAxiosError.js +0 -7
  327. package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -11
  328. package/dist/node_modules/axios/lib/helpers/null.js +0 -4
  329. package/dist/node_modules/axios/lib/helpers/parseHeaders.js +0 -47
  330. package/dist/node_modules/axios/lib/helpers/parseProtocol.js +0 -7
  331. package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +0 -41
  332. package/dist/node_modules/axios/lib/helpers/resolveConfig.js +0 -46
  333. package/dist/node_modules/axios/lib/helpers/speedometer.js +0 -36
  334. package/dist/node_modules/axios/lib/helpers/spread.js +0 -8
  335. package/dist/node_modules/axios/lib/helpers/throttle.js +0 -35
  336. package/dist/node_modules/axios/lib/helpers/toFormData.js +0 -117
  337. package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -18
  338. package/dist/node_modules/axios/lib/helpers/trackStream.js +0 -80
  339. package/dist/node_modules/axios/lib/helpers/validator.js +0 -67
  340. package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -4
  341. package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -4
  342. package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -5
  343. package/dist/node_modules/axios/lib/platform/browser/index.js +0 -15
  344. package/dist/node_modules/axios/lib/platform/common/utils.js +0 -15
  345. package/dist/node_modules/axios/lib/platform/index.js +0 -9
  346. package/dist/node_modules/axios/lib/utils.js +0 -415
  347. package/dist/node_modules/classnames/index.js +0 -61
  348. package/dist/node_modules/copy-to-clipboard/index.js +0 -101
  349. package/dist/node_modules/country-flag-icons/modules/react/3x2/index.js +0 -6570
  350. package/dist/node_modules/country-flag-icons/react/3x2/index.js +0 -269
  351. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
  352. package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
  353. package/dist/node_modules/date-fns/_lib/format/formatters.js +0 -652
  354. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +0 -62
  355. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +0 -58
  356. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -20
  357. package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
  358. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +0 -8
  359. package/dist/node_modules/date-fns/_lib/protectedTokens.js +0 -23
  360. package/dist/node_modules/date-fns/addDays.js +0 -12
  361. package/dist/node_modules/date-fns/addMonths.js +0 -26
  362. package/dist/node_modules/date-fns/addWeeks.js +0 -7
  363. package/dist/node_modules/date-fns/addYears.js +0 -7
  364. package/dist/node_modules/date-fns/constants.js +0 -14
  365. package/dist/node_modules/date-fns/constructFrom.js +0 -11
  366. package/dist/node_modules/date-fns/differenceInCalendarDays.js +0 -19
  367. package/dist/node_modules/date-fns/differenceInCalendarMonths.js +0 -14
  368. package/dist/node_modules/date-fns/eachMonthOfInterval.js +0 -20
  369. package/dist/node_modules/date-fns/eachYearOfInterval.js +0 -20
  370. package/dist/node_modules/date-fns/endOfISOWeek.js +0 -7
  371. package/dist/node_modules/date-fns/endOfMonth.js +0 -11
  372. package/dist/node_modules/date-fns/endOfWeek.js +0 -15
  373. package/dist/node_modules/date-fns/endOfYear.js +0 -11
  374. package/dist/node_modules/date-fns/format.js +0 -77
  375. package/dist/node_modules/date-fns/getDayOfYear.js +0 -12
  376. package/dist/node_modules/date-fns/getDaysInMonth.js +0 -14
  377. package/dist/node_modules/date-fns/getDefaultOptions.js +0 -7
  378. package/dist/node_modules/date-fns/getISODay.js +0 -8
  379. package/dist/node_modules/date-fns/getISOWeek.js +0 -12
  380. package/dist/node_modules/date-fns/getISOWeekYear.js +0 -25
  381. package/dist/node_modules/date-fns/getMonth.js +0 -7
  382. package/dist/node_modules/date-fns/getWeek.js +0 -12
  383. package/dist/node_modules/date-fns/getWeekYear.js +0 -28
  384. package/dist/node_modules/date-fns/getYear.js +0 -7
  385. package/dist/node_modules/date-fns/isAfter.js +0 -7
  386. package/dist/node_modules/date-fns/isBefore.js +0 -7
  387. package/dist/node_modules/date-fns/isDate.js +0 -6
  388. package/dist/node_modules/date-fns/isSameDay.js +0 -13
  389. package/dist/node_modules/date-fns/isSameMonth.js +0 -12
  390. package/dist/node_modules/date-fns/isSameYear.js +0 -12
  391. package/dist/node_modules/date-fns/isValid.js +0 -8
  392. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
  393. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -20
  394. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -43
  395. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -16
  396. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -85
  397. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -36
  398. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -12
  399. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -164
  400. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -122
  401. package/dist/node_modules/date-fns/locale/en-US.js +0 -20
  402. package/dist/node_modules/date-fns/max.js +0 -16
  403. package/dist/node_modules/date-fns/min.js +0 -16
  404. package/dist/node_modules/date-fns/parse/_lib/Parser.js +0 -25
  405. package/dist/node_modules/date-fns/parse/_lib/Setter.js +0 -44
  406. package/dist/node_modules/date-fns/parse/_lib/constants.js +0 -50
  407. package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -44
  408. package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -44
  409. package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -64
  410. package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
  411. package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -45
  412. package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -44
  413. package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -30
  414. package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -20
  415. package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -17
  416. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -32
  417. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -27
  418. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -28
  419. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
  420. package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -106
  421. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -43
  422. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -43
  423. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -43
  424. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -39
  425. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -76
  426. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -42
  427. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -67
  428. package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -27
  429. package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -73
  430. package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -71
  431. package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -27
  432. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -76
  433. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -73
  434. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -71
  435. package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -16
  436. package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -16
  437. package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -47
  438. package/dist/node_modules/date-fns/parse/_lib/parsers.js +0 -67
  439. package/dist/node_modules/date-fns/parse/_lib/utils.js +0 -117
  440. package/dist/node_modules/date-fns/parse.js +0 -123
  441. package/dist/node_modules/date-fns/setDay.js +0 -17
  442. package/dist/node_modules/date-fns/setISODay.js +0 -12
  443. package/dist/node_modules/date-fns/setISOWeek.js +0 -11
  444. package/dist/node_modules/date-fns/setMonth.js +0 -17
  445. package/dist/node_modules/date-fns/setWeek.js +0 -11
  446. package/dist/node_modules/date-fns/setYear.js +0 -11
  447. package/dist/node_modules/date-fns/startOfDay.js +0 -9
  448. package/dist/node_modules/date-fns/startOfISOWeek.js +0 -7
  449. package/dist/node_modules/date-fns/startOfISOWeekYear.js +0 -13
  450. package/dist/node_modules/date-fns/startOfMonth.js +0 -10
  451. package/dist/node_modules/date-fns/startOfWeek.js +0 -15
  452. package/dist/node_modules/date-fns/startOfWeekYear.js +0 -17
  453. package/dist/node_modules/date-fns/startOfYear.js +0 -10
  454. package/dist/node_modules/date-fns/toDate.js +0 -7
  455. package/dist/node_modules/date-fns/transpose.js +0 -18
  456. package/dist/node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +0 -8
  457. package/dist/node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js +0 -9
  458. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js +0 -29
  459. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js +0 -89
  460. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js +0 -4
  461. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js +0 -81
  462. package/dist/node_modules/date-fns-tz/dist/esm/format/formatters/index.js +0 -125
  463. package/dist/node_modules/date-fns-tz/dist/esm/format/index.js +0 -24
  464. package/dist/node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js +0 -13
  465. package/dist/node_modules/date-fns-tz/dist/esm/toDate/index.js +0 -305
  466. package/dist/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +0 -14
  467. package/dist/node_modules/deepmerge/dist/es.js +0 -69
  468. package/dist/node_modules/dom-css/index.js +0 -65
  469. package/dist/node_modules/domelementtype/lib/index.js +0 -39
  470. package/dist/node_modules/domhandler/lib/index.js +0 -166
  471. package/dist/node_modules/domhandler/lib/node.js +0 -438
  472. package/dist/node_modules/dompurify/dist/purify.es.js +0 -1020
  473. package/dist/node_modules/firebase/app/dist/esm/index.esm.js +0 -20
  474. package/dist/node_modules/firebase/auth/dist/esm/index.esm.js +0 -44
  475. package/dist/node_modules/formik/dist/formik.esm.js +0 -969
  476. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -92
  477. package/dist/node_modules/html-dom-parser/lib/client/constants.js +0 -55
  478. package/dist/node_modules/html-dom-parser/lib/client/domparser.js +0 -96
  479. package/dist/node_modules/html-dom-parser/lib/client/html-to-dom.js +0 -31
  480. package/dist/node_modules/html-dom-parser/lib/client/utilities.js +0 -96
  481. package/dist/node_modules/html-react-parser/esm/index.js +0 -5
  482. package/dist/node_modules/html-react-parser/lib/attributes-to-props.js +0 -64
  483. package/dist/node_modules/html-react-parser/lib/dom-to-react.js +0 -99
  484. package/dist/node_modules/html-react-parser/lib/index.js +0 -51
  485. package/dist/node_modules/html-react-parser/lib/utilities.js +0 -79
  486. package/dist/node_modules/idb/build/index.js +0 -69
  487. package/dist/node_modules/idb/build/wrap-idb-value.js +0 -148
  488. package/dist/node_modules/inline-style-parser/cjs/index.js +0 -142
  489. package/dist/node_modules/js-cookie/dist/js.cookie.js +0 -99
  490. package/dist/node_modules/json2mq/index.js +0 -55
  491. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  492. package/dist/node_modules/lodash-es/_Hash.js +0 -21
  493. package/dist/node_modules/lodash-es/_ListCache.js +0 -21
  494. package/dist/node_modules/lodash-es/_Map.js +0 -6
  495. package/dist/node_modules/lodash-es/_MapCache.js +0 -21
  496. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  497. package/dist/node_modules/lodash-es/_Set.js +0 -6
  498. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  499. package/dist/node_modules/lodash-es/_Symbol.js +0 -5
  500. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  501. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  502. package/dist/node_modules/lodash-es/_arrayEach.js +0 -12
  503. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -13
  504. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -24
  505. package/dist/node_modules/lodash-es/_arrayMap.js +0 -10
  506. package/dist/node_modules/lodash-es/_arrayPush.js +0 -10
  507. package/dist/node_modules/lodash-es/_assignValue.js +0 -13
  508. package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -13
  509. package/dist/node_modules/lodash-es/_baseAssign.js +0 -8
  510. package/dist/node_modules/lodash-es/_baseAssignIn.js +0 -8
  511. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -16
  512. package/dist/node_modules/lodash-es/_baseClone.js +0 -88
  513. package/dist/node_modules/lodash-es/_baseCreate.js +0 -21
  514. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  515. package/dist/node_modules/lodash-es/_baseGetTag.js +0 -14
  516. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  517. package/dist/node_modules/lodash-es/_baseIsMap.js +0 -9
  518. package/dist/node_modules/lodash-es/_baseIsNative.js +0 -22
  519. package/dist/node_modules/lodash-es/_baseIsSet.js +0 -9
  520. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -14
  521. package/dist/node_modules/lodash-es/_baseKeys.js +0 -19
  522. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -20
  523. package/dist/node_modules/lodash-es/_baseTimes.js +0 -10
  524. package/dist/node_modules/lodash-es/_baseToString.js +0 -21
  525. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  526. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -9
  527. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -16
  528. package/dist/node_modules/lodash-es/_cloneDataView.js +0 -8
  529. package/dist/node_modules/lodash-es/_cloneRegExp.js +0 -9
  530. package/dist/node_modules/lodash-es/_cloneSymbol.js +0 -8
  531. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  532. package/dist/node_modules/lodash-es/_copyArray.js +0 -11
  533. package/dist/node_modules/lodash-es/_copyObject.js +0 -23
  534. package/dist/node_modules/lodash-es/_copySymbols.js +0 -8
  535. package/dist/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  536. package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
  537. package/dist/node_modules/lodash-es/_defineProperty.js +0 -12
  538. package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
  539. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  540. package/dist/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  541. package/dist/node_modules/lodash-es/_getMapData.js +0 -8
  542. package/dist/node_modules/lodash-es/_getNative.js +0 -9
  543. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  544. package/dist/node_modules/lodash-es/_getRawTag.js +0 -25
  545. package/dist/node_modules/lodash-es/_getSymbols.js +0 -17
  546. package/dist/node_modules/lodash-es/_getSymbolsIn.js +0 -16
  547. package/dist/node_modules/lodash-es/_getTag.js +0 -34
  548. package/dist/node_modules/lodash-es/_getValue.js +0 -6
  549. package/dist/node_modules/lodash-es/_hashClear.js +0 -8
  550. package/dist/node_modules/lodash-es/_hashDelete.js +0 -8
  551. package/dist/node_modules/lodash-es/_hashGet.js +0 -15
  552. package/dist/node_modules/lodash-es/_hashHas.js +0 -10
  553. package/dist/node_modules/lodash-es/_hashSet.js +0 -11
  554. package/dist/node_modules/lodash-es/_initCloneArray.js +0 -13
  555. package/dist/node_modules/lodash-es/_initCloneByTag.js +0 -43
  556. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  557. package/dist/node_modules/lodash-es/_isIndex.js +0 -10
  558. package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
  559. package/dist/node_modules/lodash-es/_isMasked.js +0 -11
  560. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  561. package/dist/node_modules/lodash-es/_listCacheClear.js +0 -7
  562. package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -20
  563. package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
  564. package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
  565. package/dist/node_modules/lodash-es/_listCacheSet.js +0 -14
  566. package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -14
  567. package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -9
  568. package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
  569. package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
  570. package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -10
  571. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -15
  572. package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
  573. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  574. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -12
  575. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -18
  576. package/dist/node_modules/lodash-es/_objectToString.js +0 -8
  577. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  578. package/dist/node_modules/lodash-es/_root.js +0 -6
  579. package/dist/node_modules/lodash-es/_stackClear.js +0 -8
  580. package/dist/node_modules/lodash-es/_stackDelete.js +0 -8
  581. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  582. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  583. package/dist/node_modules/lodash-es/_stackSet.js +0 -22
  584. package/dist/node_modules/lodash-es/_stringToPath.js +0 -16
  585. package/dist/node_modules/lodash-es/_toKey.js +0 -11
  586. package/dist/node_modules/lodash-es/_toSource.js +0 -18
  587. package/dist/node_modules/lodash-es/clone.js +0 -8
  588. package/dist/node_modules/lodash-es/cloneDeep.js +0 -8
  589. package/dist/node_modules/lodash-es/eq.js +0 -6
  590. package/dist/node_modules/lodash-es/isArguments.js +0 -13
  591. package/dist/node_modules/lodash-es/isArray.js +0 -4
  592. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  593. package/dist/node_modules/lodash-es/isBuffer.js +0 -11
  594. package/dist/node_modules/lodash-es/isFunction.js +0 -13
  595. package/dist/node_modules/lodash-es/isLength.js +0 -7
  596. package/dist/node_modules/lodash-es/isMap.js +0 -8
  597. package/dist/node_modules/lodash-es/isObject.js +0 -7
  598. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  599. package/dist/node_modules/lodash-es/isPlainObject.js +0 -22
  600. package/dist/node_modules/lodash-es/isSet.js +0 -8
  601. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  602. package/dist/node_modules/lodash-es/isTypedArray.js +0 -8
  603. package/dist/node_modules/lodash-es/keys.js +0 -9
  604. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  605. package/dist/node_modules/lodash-es/memoize.js +0 -22
  606. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  607. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  608. package/dist/node_modules/lodash-es/toPath.js +0 -16
  609. package/dist/node_modules/lodash-es/toString.js +0 -7
  610. package/dist/node_modules/lodash.debounce/index.js +0 -137
  611. package/dist/node_modules/memoize-one/dist/memoize-one.esm.js +0 -52
  612. package/dist/node_modules/mixpanel-browser/dist/mixpanel.module.js +0 -25533
  613. package/dist/node_modules/object-assign/index.js +0 -73
  614. package/dist/node_modules/performance-now/lib/performance-now.js +0 -42
  615. package/dist/node_modules/popper.js/dist/esm/popper.js +0 -1516
  616. package/dist/node_modules/prefix-style/index.js +0 -29
  617. package/dist/node_modules/prop-types/checkPropTypes.js +0 -68
  618. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -58
  619. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -451
  620. package/dist/node_modules/prop-types/index.js +0 -20
  621. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -12
  622. package/dist/node_modules/prop-types/lib/has.js +0 -11
  623. package/dist/node_modules/property-expr/index.js +0 -105
  624. package/dist/node_modules/qrcode.react/lib/esm/index.js +0 -1099
  625. package/dist/node_modules/raf/index.js +0 -67
  626. package/dist/node_modules/react-collapse/lib/Collapse.js +0 -285
  627. package/dist/node_modules/react-collapse/lib/UnmountClosed.js +0 -278
  628. package/dist/node_modules/react-collapse/lib/index.js +0 -17
  629. package/dist/node_modules/react-copy-to-clipboard/lib/Component.js +0 -209
  630. package/dist/node_modules/react-copy-to-clipboard/lib/index.js +0 -14
  631. package/dist/node_modules/react-custom-scrollbars-4/lib/Scrollbars/defaultRenderElements.js +0 -85
  632. package/dist/node_modules/react-custom-scrollbars-4/lib/Scrollbars/index.js +0 -706
  633. package/dist/node_modules/react-custom-scrollbars-4/lib/Scrollbars/styles.js +0 -67
  634. package/dist/node_modules/react-custom-scrollbars-4/lib/index.js +0 -24
  635. package/dist/node_modules/react-custom-scrollbars-4/lib/utils/getInnerHeight.js +0 -21
  636. package/dist/node_modules/react-custom-scrollbars-4/lib/utils/getInnerWidth.js +0 -21
  637. package/dist/node_modules/react-custom-scrollbars-4/lib/utils/getScrollbarWidth.js +0 -44
  638. package/dist/node_modules/react-custom-scrollbars-4/lib/utils/isString.js +0 -19
  639. package/dist/node_modules/react-custom-scrollbars-4/lib/utils/returnFalse.js +0 -19
  640. package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -325
  641. package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -59
  642. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -25
  643. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -9
  644. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -9
  645. package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -282
  646. package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
  647. package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
  648. package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
  649. package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
  650. package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -13
  651. package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -21
  652. package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
  653. package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
  654. package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
  655. package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
  656. package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
  657. package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
  658. package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
  659. package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -34
  660. package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
  661. package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
  662. package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
  663. package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
  664. package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
  665. package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
  666. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
  667. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
  668. package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
  669. package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
  670. package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
  671. package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
  672. package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
  673. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -10
  674. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
  675. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
  676. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -10
  677. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
  678. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
  679. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
  680. package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
  681. package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -40
  682. package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -72
  683. package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -11
  684. package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -13
  685. package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -17
  686. package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
  687. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -19
  688. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -30
  689. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -12
  690. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -20
  691. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -15
  692. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -22
  693. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -16
  694. package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -16
  695. package/dist/node_modules/react-day-picker/dist/esm/helpers/getLabels.js +0 -41
  696. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -17
  697. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -43
  698. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -39
  699. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -20
  700. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -20
  701. package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -20
  702. package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -14
  703. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -13
  704. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -9
  705. package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -23
  706. package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -14
  707. package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -9
  708. package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
  709. package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -14
  710. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -10
  711. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -11
  712. package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
  713. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
  714. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -7
  715. package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
  716. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
  717. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
  718. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
  719. package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
  720. package/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js +0 -62
  721. package/dist/node_modules/react-day-picker/dist/esm/noonDateLib.js +0 -145
  722. package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -42
  723. package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -33
  724. package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -33
  725. package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -128
  726. package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -100
  727. package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -13
  728. package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -42
  729. package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -21
  730. package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -55
  731. package/dist/node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js +0 -53
  732. package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -52
  733. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -17
  734. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -61
  735. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -23
  736. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
  737. package/dist/node_modules/react-day-picker/dist/esm/utils/toTimeZone.js +0 -11
  738. package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
  739. package/dist/node_modules/react-fast-compare/index.js +0 -63
  740. package/dist/node_modules/react-helmet/es/Helmet.js +0 -717
  741. package/dist/node_modules/react-helmet/node_modules/react-fast-compare/index.js +0 -81
  742. package/dist/node_modules/react-intersection-observer/dist/index.js +0 -178
  743. package/dist/node_modules/react-is/cjs/react-is.development.js +0 -157
  744. package/dist/node_modules/react-is/cjs/react-is.production.min.js +0 -98
  745. package/dist/node_modules/react-is/index.js +0 -17
  746. package/dist/node_modules/react-otp-input/lib/index.esm.js +0 -168
  747. package/dist/node_modules/react-portal/es/LegacyPortal.js +0 -91
  748. package/dist/node_modules/react-portal/es/Portal.js +0 -74
  749. package/dist/node_modules/react-portal/es/PortalCompat.js +0 -12
  750. package/dist/node_modules/react-portal/es/utils.js +0 -4
  751. package/dist/node_modules/react-property/lib/index.js +0 -471
  752. package/dist/node_modules/react-property/lib/possibleStandardNamesOptimized.js +0 -499
  753. package/dist/node_modules/react-range/lib/Range.js +0 -592
  754. package/dist/node_modules/react-range/lib/index.js +0 -39
  755. package/dist/node_modules/react-range/lib/types.js +0 -19
  756. package/dist/node_modules/react-range/lib/utils.js +0 -318
  757. package/dist/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +0 -19
  758. package/dist/node_modules/react-select/dist/Select-ef7c0426.esm.js +0 -2317
  759. package/dist/node_modules/react-select/dist/index-641ee5b8.esm.js +0 -1071
  760. package/dist/node_modules/react-select/dist/react-select.esm.js +0 -20
  761. package/dist/node_modules/react-select/dist/useCreatable-09aaeb9a.esm.js +0 -75
  762. package/dist/node_modules/react-select/dist/useStateManager-7e1e8489.esm.js +0 -51
  763. package/dist/node_modules/react-side-effect/lib/index.js +0 -105
  764. package/dist/node_modules/react-slick/lib/arrows.js +0 -248
  765. package/dist/node_modules/react-slick/lib/default-props.js +0 -85
  766. package/dist/node_modules/react-slick/lib/dots.js +0 -192
  767. package/dist/node_modules/react-slick/lib/index.js +0 -22
  768. package/dist/node_modules/react-slick/lib/initial-state.js +0 -48
  769. package/dist/node_modules/react-slick/lib/inner-slider.js +0 -810
  770. package/dist/node_modules/react-slick/lib/slider.js +0 -333
  771. package/dist/node_modules/react-slick/lib/track.js +0 -330
  772. package/dist/node_modules/react-slick/lib/utils/innerSliderUtils.js +0 -730
  773. package/dist/node_modules/react-table/dist/react-table.development.js +0 -3684
  774. package/dist/node_modules/react-table/dist/react-table.production.min.js +0 -1637
  775. package/dist/node_modules/react-table/index.js +0 -17
  776. package/dist/node_modules/react-tippy/dist/react-tippy.js +0 -1981
  777. package/dist/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -495
  778. package/dist/node_modules/string-convert/camel2hyphen.js +0 -16
  779. package/dist/node_modules/style-to-js/cjs/index.js +0 -31
  780. package/dist/node_modules/style-to-js/cjs/utilities.js +0 -42
  781. package/dist/node_modules/style-to-object/cjs/index.js +0 -38
  782. package/dist/node_modules/stylis/src/Enum.js +0 -20
  783. package/dist/node_modules/stylis/src/Middleware.js +0 -22
  784. package/dist/node_modules/stylis/src/Parser.js +0 -157
  785. package/dist/node_modules/stylis/src/Serializer.js +0 -29
  786. package/dist/node_modules/stylis/src/Tokenizer.js +0 -160
  787. package/dist/node_modules/stylis/src/Utility.js +0 -52
  788. package/dist/node_modules/tiny-case/index.js +0 -33
  789. package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +0 -16
  790. package/dist/node_modules/to-camel-case/index.js +0 -18
  791. package/dist/node_modules/to-no-case/index.js +0 -32
  792. package/dist/node_modules/to-space-case/index.js +0 -18
  793. package/dist/node_modules/toggle-selection/index.js +0 -42
  794. package/dist/node_modules/toposort/index.js +0 -79
  795. package/dist/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +0 -5
  796. package/dist/node_modules/yup/index.esm.js +0 -1921
@@ -1,2317 +0,0 @@
1
- import _extends from "../../@babel/runtime/helpers/esm/extends.js";
2
- import _objectSpread2 from "../../@babel/runtime/helpers/esm/objectSpread2.js";
3
- import _classCallCheck from "../../@babel/runtime/helpers/esm/classCallCheck.js";
4
- import _createClass from "../../@babel/runtime/helpers/esm/createClass.js";
5
- import _inherits from "../../@babel/runtime/helpers/esm/inherits.js";
6
- import _createSuper from "../../@babel/runtime/helpers/esm/createSuper.js";
7
- import _toConsumableArray from "../../@babel/runtime/helpers/esm/toConsumableArray.js";
8
- import * as React from "react";
9
- import { Component, Fragment, useMemo, useRef, useCallback, useEffect } from "react";
10
- import { B as multiValueAsValue, C as singleValueAsValue, D as valueTernary, E as classNames, y as valueContainerCSS, x as css, w as placeholderCSS, v as optionCSS, u as noOptionsMessageCSS, t as multiValueRemoveCSS, q as multiValueLabelCSS, p as multiValueCSS, o as menuPortalCSS, n as menuListCSS, m as menuCSS, k as loadingMessageCSS, l as loadingIndicatorCSS, j as inputCSS, h as indicatorSeparatorCSS, i as indicatorsContainerCSS, f as groupHeadingCSS, g as groupCSS, e as dropdownIndicatorCSS, d as css$1, b as containerCSS, a as clearIndicatorCSS, F as defaultComponents, G as isDocumentElement, H as cleanValue, K as notNullish, A as isMobileDevice, z as isTouchCapable, I as scrollIntoView, J as noop, M as MenuPlacer, r as removeProps, s as supportsPassiveEvents } from "./index-641ee5b8.esm.js";
11
- import { createElement as jsx, css as css$2 } from "../../@emotion/react/dist/emotion-react.browser.esm.js";
12
- import memoizeOne from "../../memoize-one/dist/memoize-one.esm.js";
13
- import _objectWithoutProperties from "../../@babel/runtime/helpers/esm/objectWithoutProperties.js";
14
- function _EMOTION_STRINGIFIED_CSS_ERROR__$2() {
15
- return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
16
- }
17
- var _ref = process.env.NODE_ENV === "production" ? {
18
- name: "7pg0cj-a11yText",
19
- styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"
20
- } : {
21
- name: "1f43avz-a11yText-A11yText",
22
- styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",
23
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",
24
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
25
- };
26
- var A11yText = function A11yText2(props) {
27
- return jsx("span", _extends({
28
- css: _ref
29
- }, props));
30
- };
31
- var A11yText$1 = A11yText;
32
- var defaultAriaLiveMessages = {
33
- guidance: function guidance(props) {
34
- var isSearchable = props.isSearchable, isMulti = props.isMulti, tabSelectsValue = props.tabSelectsValue, context = props.context, isInitialFocus = props.isInitialFocus;
35
- switch (context) {
36
- case "menu":
37
- return "Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(tabSelectsValue ? ", press Tab to select the option and exit the menu" : "", ".");
38
- case "input":
39
- return isInitialFocus ? "".concat(props["aria-label"] || "Select", " is focused ").concat(isSearchable ? ",type to refine list" : "", ", press Down to open the menu, ").concat(isMulti ? " press left to focus selected values" : "") : "";
40
- case "value":
41
- return "Use left and right to toggle between focused values, press Backspace to remove the currently focused value";
42
- default:
43
- return "";
44
- }
45
- },
46
- onChange: function onChange(props) {
47
- var action = props.action, _props$label = props.label, label = _props$label === void 0 ? "" : _props$label, labels = props.labels, isDisabled = props.isDisabled;
48
- switch (action) {
49
- case "deselect-option":
50
- case "pop-value":
51
- case "remove-value":
52
- return "option ".concat(label, ", deselected.");
53
- case "clear":
54
- return "All selected options have been cleared.";
55
- case "initial-input-focus":
56
- return "option".concat(labels.length > 1 ? "s" : "", " ").concat(labels.join(","), ", selected.");
57
- case "select-option":
58
- return isDisabled ? "option ".concat(label, " is disabled. Select another option.") : "option ".concat(label, ", selected.");
59
- default:
60
- return "";
61
- }
62
- },
63
- onFocus: function onFocus(props) {
64
- var context = props.context, focused = props.focused, options = props.options, _props$label2 = props.label, label = _props$label2 === void 0 ? "" : _props$label2, selectValue = props.selectValue, isDisabled = props.isDisabled, isSelected = props.isSelected, isAppleDevice2 = props.isAppleDevice;
65
- var getArrayIndex = function getArrayIndex2(arr, item) {
66
- return arr && arr.length ? "".concat(arr.indexOf(item) + 1, " of ").concat(arr.length) : "";
67
- };
68
- if (context === "value" && selectValue) {
69
- return "value ".concat(label, " focused, ").concat(getArrayIndex(selectValue, focused), ".");
70
- }
71
- if (context === "menu" && isAppleDevice2) {
72
- var disabled = isDisabled ? " disabled" : "";
73
- var status = "".concat(isSelected ? " selected" : "").concat(disabled);
74
- return "".concat(label).concat(status, ", ").concat(getArrayIndex(options, focused), ".");
75
- }
76
- return "";
77
- },
78
- onFilter: function onFilter(props) {
79
- var inputValue = props.inputValue, resultsMessage = props.resultsMessage;
80
- return "".concat(resultsMessage).concat(inputValue ? " for search term " + inputValue : "", ".");
81
- }
82
- };
83
- var LiveRegion = function LiveRegion2(props) {
84
- var ariaSelection = props.ariaSelection, focusedOption = props.focusedOption, focusedValue = props.focusedValue, focusableOptions = props.focusableOptions, isFocused = props.isFocused, selectValue = props.selectValue, selectProps = props.selectProps, id = props.id, isAppleDevice2 = props.isAppleDevice;
85
- var ariaLiveMessages = selectProps.ariaLiveMessages, getOptionLabel4 = selectProps.getOptionLabel, inputValue = selectProps.inputValue, isMulti = selectProps.isMulti, isOptionDisabled3 = selectProps.isOptionDisabled, isSearchable = selectProps.isSearchable, menuIsOpen = selectProps.menuIsOpen, options = selectProps.options, screenReaderStatus2 = selectProps.screenReaderStatus, tabSelectsValue = selectProps.tabSelectsValue, isLoading = selectProps.isLoading;
86
- var ariaLabel = selectProps["aria-label"];
87
- var ariaLive = selectProps["aria-live"];
88
- var messages = useMemo(function() {
89
- return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
90
- }, [ariaLiveMessages]);
91
- var ariaSelected = useMemo(function() {
92
- var message = "";
93
- if (ariaSelection && messages.onChange) {
94
- var option = ariaSelection.option, selectedOptions = ariaSelection.options, removedValue = ariaSelection.removedValue, removedValues = ariaSelection.removedValues, value = ariaSelection.value;
95
- var asOption = function asOption2(val) {
96
- return !Array.isArray(val) ? val : null;
97
- };
98
- var selected = removedValue || option || asOption(value);
99
- var label = selected ? getOptionLabel4(selected) : "";
100
- var multiSelected = selectedOptions || removedValues || void 0;
101
- var labels = multiSelected ? multiSelected.map(getOptionLabel4) : [];
102
- var onChangeProps = _objectSpread2({
103
- // multiSelected items are usually items that have already been selected
104
- // or set by the user as a default value so we assume they are not disabled
105
- isDisabled: selected && isOptionDisabled3(selected, selectValue),
106
- label,
107
- labels
108
- }, ariaSelection);
109
- message = messages.onChange(onChangeProps);
110
- }
111
- return message;
112
- }, [ariaSelection, messages, isOptionDisabled3, selectValue, getOptionLabel4]);
113
- var ariaFocused = useMemo(function() {
114
- var focusMsg = "";
115
- var focused = focusedOption || focusedValue;
116
- var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
117
- if (focused && messages.onFocus) {
118
- var onFocusProps = {
119
- focused,
120
- label: getOptionLabel4(focused),
121
- isDisabled: isOptionDisabled3(focused, selectValue),
122
- isSelected,
123
- options: focusableOptions,
124
- context: focused === focusedOption ? "menu" : "value",
125
- selectValue,
126
- isAppleDevice: isAppleDevice2
127
- };
128
- focusMsg = messages.onFocus(onFocusProps);
129
- }
130
- return focusMsg;
131
- }, [focusedOption, focusedValue, getOptionLabel4, isOptionDisabled3, messages, focusableOptions, selectValue, isAppleDevice2]);
132
- var ariaResults = useMemo(function() {
133
- var resultsMsg = "";
134
- if (menuIsOpen && options.length && !isLoading && messages.onFilter) {
135
- var resultsMessage = screenReaderStatus2({
136
- count: focusableOptions.length
137
- });
138
- resultsMsg = messages.onFilter({
139
- inputValue,
140
- resultsMessage
141
- });
142
- }
143
- return resultsMsg;
144
- }, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus2, isLoading]);
145
- var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus";
146
- var ariaGuidance = useMemo(function() {
147
- var guidanceMsg = "";
148
- if (messages.guidance) {
149
- var context = focusedValue ? "value" : menuIsOpen ? "menu" : "input";
150
- guidanceMsg = messages.guidance({
151
- "aria-label": ariaLabel,
152
- context,
153
- isDisabled: focusedOption && isOptionDisabled3(focusedOption, selectValue),
154
- isMulti,
155
- isSearchable,
156
- tabSelectsValue,
157
- isInitialFocus
158
- });
159
- }
160
- return guidanceMsg;
161
- }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled3, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
162
- var ScreenReaderText = jsx(Fragment, null, jsx("span", {
163
- id: "aria-selection"
164
- }, ariaSelected), jsx("span", {
165
- id: "aria-focused"
166
- }, ariaFocused), jsx("span", {
167
- id: "aria-results"
168
- }, ariaResults), jsx("span", {
169
- id: "aria-guidance"
170
- }, ariaGuidance));
171
- return jsx(Fragment, null, jsx(A11yText$1, {
172
- id
173
- }, isInitialFocus && ScreenReaderText), jsx(A11yText$1, {
174
- "aria-live": ariaLive,
175
- "aria-atomic": "false",
176
- "aria-relevant": "additions text",
177
- role: "log"
178
- }, isFocused && !isInitialFocus && ScreenReaderText));
179
- };
180
- var LiveRegion$1 = LiveRegion;
181
- var diacritics = [{
182
- base: "A",
183
- letters: "AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"
184
- }, {
185
- base: "AA",
186
- letters: "Ꜳ"
187
- }, {
188
- base: "AE",
189
- letters: "ÆǼǢ"
190
- }, {
191
- base: "AO",
192
- letters: "Ꜵ"
193
- }, {
194
- base: "AU",
195
- letters: "Ꜷ"
196
- }, {
197
- base: "AV",
198
- letters: "ꜸꜺ"
199
- }, {
200
- base: "AY",
201
- letters: "Ꜽ"
202
- }, {
203
- base: "B",
204
- letters: "BⒷBḂḄḆɃƂƁ"
205
- }, {
206
- base: "C",
207
- letters: "CⒸCĆĈĊČÇḈƇȻꜾ"
208
- }, {
209
- base: "D",
210
- letters: "DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"
211
- }, {
212
- base: "DZ",
213
- letters: "DZDŽ"
214
- }, {
215
- base: "Dz",
216
- letters: "DzDž"
217
- }, {
218
- base: "E",
219
- letters: "EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"
220
- }, {
221
- base: "F",
222
- letters: "FⒻFḞƑꝻ"
223
- }, {
224
- base: "G",
225
- letters: "GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"
226
- }, {
227
- base: "H",
228
- letters: "HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"
229
- }, {
230
- base: "I",
231
- letters: "IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"
232
- }, {
233
- base: "J",
234
- letters: "JⒿJĴɈ"
235
- }, {
236
- base: "K",
237
- letters: "KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"
238
- }, {
239
- base: "L",
240
- letters: "LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"
241
- }, {
242
- base: "LJ",
243
- letters: "LJ"
244
- }, {
245
- base: "Lj",
246
- letters: "Lj"
247
- }, {
248
- base: "M",
249
- letters: "MⓂMḾṀṂⱮƜ"
250
- }, {
251
- base: "N",
252
- letters: "NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"
253
- }, {
254
- base: "NJ",
255
- letters: "NJ"
256
- }, {
257
- base: "Nj",
258
- letters: "Nj"
259
- }, {
260
- base: "O",
261
- letters: "OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"
262
- }, {
263
- base: "OI",
264
- letters: "Ƣ"
265
- }, {
266
- base: "OO",
267
- letters: "Ꝏ"
268
- }, {
269
- base: "OU",
270
- letters: "Ȣ"
271
- }, {
272
- base: "P",
273
- letters: "PⓅPṔṖƤⱣꝐꝒꝔ"
274
- }, {
275
- base: "Q",
276
- letters: "QⓆQꝖꝘɊ"
277
- }, {
278
- base: "R",
279
- letters: "RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"
280
- }, {
281
- base: "S",
282
- letters: "SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"
283
- }, {
284
- base: "T",
285
- letters: "TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"
286
- }, {
287
- base: "TZ",
288
- letters: "Ꜩ"
289
- }, {
290
- base: "U",
291
- letters: "UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"
292
- }, {
293
- base: "V",
294
- letters: "VⓋVṼṾƲꝞɅ"
295
- }, {
296
- base: "VY",
297
- letters: "Ꝡ"
298
- }, {
299
- base: "W",
300
- letters: "WⓌWẀẂŴẆẄẈⱲ"
301
- }, {
302
- base: "X",
303
- letters: "XⓍXẊẌ"
304
- }, {
305
- base: "Y",
306
- letters: "YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"
307
- }, {
308
- base: "Z",
309
- letters: "ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"
310
- }, {
311
- base: "a",
312
- letters: "aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"
313
- }, {
314
- base: "aa",
315
- letters: "ꜳ"
316
- }, {
317
- base: "ae",
318
- letters: "æǽǣ"
319
- }, {
320
- base: "ao",
321
- letters: "ꜵ"
322
- }, {
323
- base: "au",
324
- letters: "ꜷ"
325
- }, {
326
- base: "av",
327
- letters: "ꜹꜻ"
328
- }, {
329
- base: "ay",
330
- letters: "ꜽ"
331
- }, {
332
- base: "b",
333
- letters: "bⓑbḃḅḇƀƃɓ"
334
- }, {
335
- base: "c",
336
- letters: "cⓒcćĉċčçḉƈȼꜿↄ"
337
- }, {
338
- base: "d",
339
- letters: "dⓓdḋďḍḑḓḏđƌɖɗꝺ"
340
- }, {
341
- base: "dz",
342
- letters: "dzdž"
343
- }, {
344
- base: "e",
345
- letters: "eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"
346
- }, {
347
- base: "f",
348
- letters: "fⓕfḟƒꝼ"
349
- }, {
350
- base: "g",
351
- letters: "gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"
352
- }, {
353
- base: "h",
354
- letters: "hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"
355
- }, {
356
- base: "hv",
357
- letters: "ƕ"
358
- }, {
359
- base: "i",
360
- letters: "iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"
361
- }, {
362
- base: "j",
363
- letters: "jⓙjĵǰɉ"
364
- }, {
365
- base: "k",
366
- letters: "kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"
367
- }, {
368
- base: "l",
369
- letters: "lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"
370
- }, {
371
- base: "lj",
372
- letters: "lj"
373
- }, {
374
- base: "m",
375
- letters: "mⓜmḿṁṃɱɯ"
376
- }, {
377
- base: "n",
378
- letters: "nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"
379
- }, {
380
- base: "nj",
381
- letters: "nj"
382
- }, {
383
- base: "o",
384
- letters: "oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"
385
- }, {
386
- base: "oi",
387
- letters: "ƣ"
388
- }, {
389
- base: "ou",
390
- letters: "ȣ"
391
- }, {
392
- base: "oo",
393
- letters: "ꝏ"
394
- }, {
395
- base: "p",
396
- letters: "pⓟpṕṗƥᵽꝑꝓꝕ"
397
- }, {
398
- base: "q",
399
- letters: "qⓠqɋꝗꝙ"
400
- }, {
401
- base: "r",
402
- letters: "rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"
403
- }, {
404
- base: "s",
405
- letters: "sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"
406
- }, {
407
- base: "t",
408
- letters: "tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"
409
- }, {
410
- base: "tz",
411
- letters: "ꜩ"
412
- }, {
413
- base: "u",
414
- letters: "uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"
415
- }, {
416
- base: "v",
417
- letters: "vⓥvṽṿʋꝟʌ"
418
- }, {
419
- base: "vy",
420
- letters: "ꝡ"
421
- }, {
422
- base: "w",
423
- letters: "wⓦwẁẃŵẇẅẘẉⱳ"
424
- }, {
425
- base: "x",
426
- letters: "xⓧxẋẍ"
427
- }, {
428
- base: "y",
429
- letters: "yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"
430
- }, {
431
- base: "z",
432
- letters: "zⓩzźẑżžẓẕƶȥɀⱬꝣ"
433
- }];
434
- var anyDiacritic = new RegExp("[" + diacritics.map(function(d) {
435
- return d.letters;
436
- }).join("") + "]", "g");
437
- var diacriticToBase = {};
438
- for (var i = 0; i < diacritics.length; i++) {
439
- var diacritic = diacritics[i];
440
- for (var j = 0; j < diacritic.letters.length; j++) {
441
- diacriticToBase[diacritic.letters[j]] = diacritic.base;
442
- }
443
- }
444
- var stripDiacritics = function stripDiacritics2(str) {
445
- return str.replace(anyDiacritic, function(match) {
446
- return diacriticToBase[match];
447
- });
448
- };
449
- var memoizedStripDiacriticsForInput = memoizeOne(stripDiacritics);
450
- var trimString = function trimString2(str) {
451
- return str.replace(/^\s+|\s+$/g, "");
452
- };
453
- var defaultStringify = function defaultStringify2(option) {
454
- return "".concat(option.label, " ").concat(option.value);
455
- };
456
- var createFilter = function createFilter2(config) {
457
- return function(option, rawInput) {
458
- if (option.data.__isNew__) return true;
459
- var _ignoreCase$ignoreAcc = _objectSpread2({
460
- ignoreCase: true,
461
- ignoreAccents: true,
462
- stringify: defaultStringify,
463
- trim: true,
464
- matchFrom: "any"
465
- }, config), ignoreCase = _ignoreCase$ignoreAcc.ignoreCase, ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents, stringify = _ignoreCase$ignoreAcc.stringify, trim = _ignoreCase$ignoreAcc.trim, matchFrom = _ignoreCase$ignoreAcc.matchFrom;
466
- var input = trim ? trimString(rawInput) : rawInput;
467
- var candidate = trim ? trimString(stringify(option)) : stringify(option);
468
- if (ignoreCase) {
469
- input = input.toLowerCase();
470
- candidate = candidate.toLowerCase();
471
- }
472
- if (ignoreAccents) {
473
- input = memoizedStripDiacriticsForInput(input);
474
- candidate = stripDiacritics(candidate);
475
- }
476
- return matchFrom === "start" ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
477
- };
478
- };
479
- var _excluded = ["innerRef"];
480
- function DummyInput(_ref3) {
481
- var innerRef = _ref3.innerRef, props = _objectWithoutProperties(_ref3, _excluded);
482
- var filteredProps = removeProps(props, "onExited", "in", "enter", "exit", "appear");
483
- return jsx("input", _extends({
484
- ref: innerRef
485
- }, filteredProps, {
486
- css: /* @__PURE__ */ css$2({
487
- label: "dummyInput",
488
- // get rid of any default styles
489
- background: 0,
490
- border: 0,
491
- // important! this hides the flashing cursor
492
- caretColor: "transparent",
493
- fontSize: "inherit",
494
- gridArea: "1 / 1 / 2 / 3",
495
- outline: 0,
496
- padding: 0,
497
- // important! without `width` browsers won't allow focus
498
- width: 1,
499
- // remove cursor on desktop
500
- color: "transparent",
501
- // remove cursor on mobile whilst maintaining "scroll into view" behaviour
502
- left: -100,
503
- opacity: 0,
504
- position: "relative",
505
- transform: "scale(.01)"
506
- }, process.env.NODE_ENV === "production" ? "" : ";label:DummyInput;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")
507
- }));
508
- }
509
- var cancelScroll = function cancelScroll2(event) {
510
- if (event.cancelable) event.preventDefault();
511
- event.stopPropagation();
512
- };
513
- function useScrollCapture(_ref3) {
514
- var isEnabled = _ref3.isEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
515
- var isBottom = useRef(false);
516
- var isTop = useRef(false);
517
- var touchStart = useRef(0);
518
- var scrollTarget = useRef(null);
519
- var handleEventDelta = useCallback(function(event, delta) {
520
- if (scrollTarget.current === null) return;
521
- var _scrollTarget$current = scrollTarget.current, scrollTop = _scrollTarget$current.scrollTop, scrollHeight = _scrollTarget$current.scrollHeight, clientHeight = _scrollTarget$current.clientHeight;
522
- var target = scrollTarget.current;
523
- var isDeltaPositive = delta > 0;
524
- var availableScroll = scrollHeight - clientHeight - scrollTop;
525
- var shouldCancelScroll = false;
526
- if (availableScroll > delta && isBottom.current) {
527
- if (onBottomLeave) onBottomLeave(event);
528
- isBottom.current = false;
529
- }
530
- if (isDeltaPositive && isTop.current) {
531
- if (onTopLeave) onTopLeave(event);
532
- isTop.current = false;
533
- }
534
- if (isDeltaPositive && delta > availableScroll) {
535
- if (onBottomArrive && !isBottom.current) {
536
- onBottomArrive(event);
537
- }
538
- target.scrollTop = scrollHeight;
539
- shouldCancelScroll = true;
540
- isBottom.current = true;
541
- } else if (!isDeltaPositive && -delta > scrollTop) {
542
- if (onTopArrive && !isTop.current) {
543
- onTopArrive(event);
544
- }
545
- target.scrollTop = 0;
546
- shouldCancelScroll = true;
547
- isTop.current = true;
548
- }
549
- if (shouldCancelScroll) {
550
- cancelScroll(event);
551
- }
552
- }, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
553
- var onWheel = useCallback(function(event) {
554
- handleEventDelta(event, event.deltaY);
555
- }, [handleEventDelta]);
556
- var onTouchStart = useCallback(function(event) {
557
- touchStart.current = event.changedTouches[0].clientY;
558
- }, []);
559
- var onTouchMove = useCallback(function(event) {
560
- var deltaY = touchStart.current - event.changedTouches[0].clientY;
561
- handleEventDelta(event, deltaY);
562
- }, [handleEventDelta]);
563
- var startListening = useCallback(function(el) {
564
- if (!el) return;
565
- var notPassive = supportsPassiveEvents ? {
566
- passive: false
567
- } : false;
568
- el.addEventListener("wheel", onWheel, notPassive);
569
- el.addEventListener("touchstart", onTouchStart, notPassive);
570
- el.addEventListener("touchmove", onTouchMove, notPassive);
571
- }, [onTouchMove, onTouchStart, onWheel]);
572
- var stopListening = useCallback(function(el) {
573
- if (!el) return;
574
- el.removeEventListener("wheel", onWheel, false);
575
- el.removeEventListener("touchstart", onTouchStart, false);
576
- el.removeEventListener("touchmove", onTouchMove, false);
577
- }, [onTouchMove, onTouchStart, onWheel]);
578
- useEffect(function() {
579
- if (!isEnabled) return;
580
- var element = scrollTarget.current;
581
- startListening(element);
582
- return function() {
583
- stopListening(element);
584
- };
585
- }, [isEnabled, startListening, stopListening]);
586
- return function(element) {
587
- scrollTarget.current = element;
588
- };
589
- }
590
- var STYLE_KEYS = ["boxSizing", "height", "overflow", "paddingRight", "position"];
591
- var LOCK_STYLES = {
592
- boxSizing: "border-box",
593
- // account for possible declaration `width: 100%;` on body
594
- overflow: "hidden",
595
- position: "relative",
596
- height: "100%"
597
- };
598
- function preventTouchMove(e) {
599
- if (e.cancelable) e.preventDefault();
600
- }
601
- function allowTouchMove(e) {
602
- e.stopPropagation();
603
- }
604
- function preventInertiaScroll() {
605
- var top = this.scrollTop;
606
- var totalScroll = this.scrollHeight;
607
- var currentScroll = top + this.offsetHeight;
608
- if (top === 0) {
609
- this.scrollTop = 1;
610
- } else if (currentScroll === totalScroll) {
611
- this.scrollTop = top - 1;
612
- }
613
- }
614
- function isTouchDevice() {
615
- return "ontouchstart" in window || navigator.maxTouchPoints;
616
- }
617
- var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
618
- var activeScrollLocks = 0;
619
- var listenerOptions = {
620
- capture: false,
621
- passive: false
622
- };
623
- function useScrollLock(_ref3) {
624
- var isEnabled = _ref3.isEnabled, _ref$accountForScroll = _ref3.accountForScrollbars, accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
625
- var originalStyles = useRef({});
626
- var scrollTarget = useRef(null);
627
- var addScrollLock = useCallback(function(touchScrollTarget) {
628
- if (!canUseDOM) return;
629
- var target = document.body;
630
- var targetStyle = target && target.style;
631
- if (accountForScrollbars) {
632
- STYLE_KEYS.forEach(function(key) {
633
- var val = targetStyle && targetStyle[key];
634
- originalStyles.current[key] = val;
635
- });
636
- }
637
- if (accountForScrollbars && activeScrollLocks < 1) {
638
- var currentPadding = parseInt(originalStyles.current.paddingRight, 10) || 0;
639
- var clientWidth = document.body ? document.body.clientWidth : 0;
640
- var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;
641
- Object.keys(LOCK_STYLES).forEach(function(key) {
642
- var val = LOCK_STYLES[key];
643
- if (targetStyle) {
644
- targetStyle[key] = val;
645
- }
646
- });
647
- if (targetStyle) {
648
- targetStyle.paddingRight = "".concat(adjustedPadding, "px");
649
- }
650
- }
651
- if (target && isTouchDevice()) {
652
- target.addEventListener("touchmove", preventTouchMove, listenerOptions);
653
- if (touchScrollTarget) {
654
- touchScrollTarget.addEventListener("touchstart", preventInertiaScroll, listenerOptions);
655
- touchScrollTarget.addEventListener("touchmove", allowTouchMove, listenerOptions);
656
- }
657
- }
658
- activeScrollLocks += 1;
659
- }, [accountForScrollbars]);
660
- var removeScrollLock = useCallback(function(touchScrollTarget) {
661
- if (!canUseDOM) return;
662
- var target = document.body;
663
- var targetStyle = target && target.style;
664
- activeScrollLocks = Math.max(activeScrollLocks - 1, 0);
665
- if (accountForScrollbars && activeScrollLocks < 1) {
666
- STYLE_KEYS.forEach(function(key) {
667
- var val = originalStyles.current[key];
668
- if (targetStyle) {
669
- targetStyle[key] = val;
670
- }
671
- });
672
- }
673
- if (target && isTouchDevice()) {
674
- target.removeEventListener("touchmove", preventTouchMove, listenerOptions);
675
- if (touchScrollTarget) {
676
- touchScrollTarget.removeEventListener("touchstart", preventInertiaScroll, listenerOptions);
677
- touchScrollTarget.removeEventListener("touchmove", allowTouchMove, listenerOptions);
678
- }
679
- }
680
- }, [accountForScrollbars]);
681
- useEffect(function() {
682
- if (!isEnabled) return;
683
- var element = scrollTarget.current;
684
- addScrollLock(element);
685
- return function() {
686
- removeScrollLock(element);
687
- };
688
- }, [isEnabled, addScrollLock, removeScrollLock]);
689
- return function(element) {
690
- scrollTarget.current = element;
691
- };
692
- }
693
- function _EMOTION_STRINGIFIED_CSS_ERROR__$1() {
694
- return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
695
- }
696
- var blurSelectInput = function blurSelectInput2(event) {
697
- var element = event.target;
698
- return element.ownerDocument.activeElement && element.ownerDocument.activeElement.blur();
699
- };
700
- var _ref2$1 = process.env.NODE_ENV === "production" ? {
701
- name: "1kfdb0e",
702
- styles: "position:fixed;left:0;bottom:0;right:0;top:0"
703
- } : {
704
- name: "bp8cua-ScrollManager",
705
- styles: "position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",
706
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",
707
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
708
- };
709
- function ScrollManager(_ref3) {
710
- var children = _ref3.children, lockEnabled = _ref3.lockEnabled, _ref$captureEnabled = _ref3.captureEnabled, captureEnabled = _ref$captureEnabled === void 0 ? true : _ref$captureEnabled, onBottomArrive = _ref3.onBottomArrive, onBottomLeave = _ref3.onBottomLeave, onTopArrive = _ref3.onTopArrive, onTopLeave = _ref3.onTopLeave;
711
- var setScrollCaptureTarget = useScrollCapture({
712
- isEnabled: captureEnabled,
713
- onBottomArrive,
714
- onBottomLeave,
715
- onTopArrive,
716
- onTopLeave
717
- });
718
- var setScrollLockTarget = useScrollLock({
719
- isEnabled: lockEnabled
720
- });
721
- var targetRef = function targetRef2(element) {
722
- setScrollCaptureTarget(element);
723
- setScrollLockTarget(element);
724
- };
725
- return jsx(Fragment, null, lockEnabled && jsx("div", {
726
- onClick: blurSelectInput,
727
- css: _ref2$1
728
- }), children(targetRef));
729
- }
730
- function _EMOTION_STRINGIFIED_CSS_ERROR__() {
731
- return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
732
- }
733
- var _ref2 = process.env.NODE_ENV === "production" ? {
734
- name: "1a0ro4n-requiredInput",
735
- styles: "label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"
736
- } : {
737
- name: "5kkxb2-requiredInput-RequiredInput",
738
- styles: "label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",
739
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",
740
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
741
- };
742
- var RequiredInput = function RequiredInput2(_ref3) {
743
- var name = _ref3.name, onFocus2 = _ref3.onFocus;
744
- return jsx("input", {
745
- required: true,
746
- name,
747
- tabIndex: -1,
748
- "aria-hidden": "true",
749
- onFocus: onFocus2,
750
- css: _ref2,
751
- value: "",
752
- onChange: function onChange2() {
753
- }
754
- });
755
- };
756
- var RequiredInput$1 = RequiredInput;
757
- function testPlatform(re) {
758
- var _window$navigator$use;
759
- return typeof window !== "undefined" && window.navigator != null ? re.test(((_window$navigator$use = window.navigator["userAgentData"]) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.platform) || window.navigator.platform) : false;
760
- }
761
- function isIPhone() {
762
- return testPlatform(/^iPhone/i);
763
- }
764
- function isMac() {
765
- return testPlatform(/^Mac/i);
766
- }
767
- function isIPad() {
768
- return testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
769
- isMac() && navigator.maxTouchPoints > 1;
770
- }
771
- function isIOS() {
772
- return isIPhone() || isIPad();
773
- }
774
- function isAppleDevice() {
775
- return isMac() || isIOS();
776
- }
777
- var formatGroupLabel = function formatGroupLabel2(group) {
778
- return group.label;
779
- };
780
- var getOptionLabel$1 = function getOptionLabel(option) {
781
- return option.label;
782
- };
783
- var getOptionValue$1 = function getOptionValue(option) {
784
- return option.value;
785
- };
786
- var isOptionDisabled = function isOptionDisabled2(option) {
787
- return !!option.isDisabled;
788
- };
789
- var defaultStyles = {
790
- clearIndicator: clearIndicatorCSS,
791
- container: containerCSS,
792
- control: css$1,
793
- dropdownIndicator: dropdownIndicatorCSS,
794
- group: groupCSS,
795
- groupHeading: groupHeadingCSS,
796
- indicatorsContainer: indicatorsContainerCSS,
797
- indicatorSeparator: indicatorSeparatorCSS,
798
- input: inputCSS,
799
- loadingIndicator: loadingIndicatorCSS,
800
- loadingMessage: loadingMessageCSS,
801
- menu: menuCSS,
802
- menuList: menuListCSS,
803
- menuPortal: menuPortalCSS,
804
- multiValue: multiValueCSS,
805
- multiValueLabel: multiValueLabelCSS,
806
- multiValueRemove: multiValueRemoveCSS,
807
- noOptionsMessage: noOptionsMessageCSS,
808
- option: optionCSS,
809
- placeholder: placeholderCSS,
810
- singleValue: css,
811
- valueContainer: valueContainerCSS
812
- };
813
- var colors = {
814
- primary: "#2684FF",
815
- primary75: "#4C9AFF",
816
- primary50: "#B2D4FF",
817
- primary25: "#DEEBFF",
818
- danger: "#DE350B",
819
- dangerLight: "#FFBDAD",
820
- neutral0: "hsl(0, 0%, 100%)",
821
- neutral5: "hsl(0, 0%, 95%)",
822
- neutral10: "hsl(0, 0%, 90%)",
823
- neutral20: "hsl(0, 0%, 80%)",
824
- neutral30: "hsl(0, 0%, 70%)",
825
- neutral40: "hsl(0, 0%, 60%)",
826
- neutral50: "hsl(0, 0%, 50%)",
827
- neutral60: "hsl(0, 0%, 40%)",
828
- neutral70: "hsl(0, 0%, 30%)",
829
- neutral80: "hsl(0, 0%, 20%)",
830
- neutral90: "hsl(0, 0%, 10%)"
831
- };
832
- var borderRadius = 4;
833
- var baseUnit = 4;
834
- var controlHeight = 38;
835
- var menuGutter = baseUnit * 2;
836
- var spacing = {
837
- baseUnit,
838
- controlHeight,
839
- menuGutter
840
- };
841
- var defaultTheme = {
842
- borderRadius,
843
- colors,
844
- spacing
845
- };
846
- var defaultProps = {
847
- "aria-live": "polite",
848
- backspaceRemovesValue: true,
849
- blurInputOnSelect: isTouchCapable(),
850
- captureMenuScroll: !isTouchCapable(),
851
- classNames: {},
852
- closeMenuOnSelect: true,
853
- closeMenuOnScroll: false,
854
- components: {},
855
- controlShouldRenderValue: true,
856
- escapeClearsValue: false,
857
- filterOption: createFilter(),
858
- formatGroupLabel,
859
- getOptionLabel: getOptionLabel$1,
860
- getOptionValue: getOptionValue$1,
861
- isDisabled: false,
862
- isLoading: false,
863
- isMulti: false,
864
- isRtl: false,
865
- isSearchable: true,
866
- isOptionDisabled,
867
- loadingMessage: function loadingMessage() {
868
- return "Loading...";
869
- },
870
- maxMenuHeight: 300,
871
- minMenuHeight: 140,
872
- menuIsOpen: false,
873
- menuPlacement: "bottom",
874
- menuPosition: "absolute",
875
- menuShouldBlockScroll: false,
876
- menuShouldScrollIntoView: !isMobileDevice(),
877
- noOptionsMessage: function noOptionsMessage() {
878
- return "No options";
879
- },
880
- openMenuOnFocus: false,
881
- openMenuOnClick: true,
882
- options: [],
883
- pageSize: 5,
884
- placeholder: "Select...",
885
- screenReaderStatus: function screenReaderStatus(_ref3) {
886
- var count = _ref3.count;
887
- return "".concat(count, " result").concat(count !== 1 ? "s" : "", " available");
888
- },
889
- styles: {},
890
- tabIndex: 0,
891
- tabSelectsValue: true,
892
- unstyled: false
893
- };
894
- function toCategorizedOption(props, option, selectValue, index) {
895
- var isDisabled = _isOptionDisabled(props, option, selectValue);
896
- var isSelected = _isOptionSelected(props, option, selectValue);
897
- var label = getOptionLabel2(props, option);
898
- var value = getOptionValue2(props, option);
899
- return {
900
- type: "option",
901
- data: option,
902
- isDisabled,
903
- isSelected,
904
- label,
905
- value,
906
- index
907
- };
908
- }
909
- function buildCategorizedOptions(props, selectValue) {
910
- return props.options.map(function(groupOrOption, groupOrOptionIndex) {
911
- if ("options" in groupOrOption) {
912
- var categorizedOptions = groupOrOption.options.map(function(option, optionIndex) {
913
- return toCategorizedOption(props, option, selectValue, optionIndex);
914
- }).filter(function(categorizedOption2) {
915
- return isFocusable(props, categorizedOption2);
916
- });
917
- return categorizedOptions.length > 0 ? {
918
- type: "group",
919
- data: groupOrOption,
920
- options: categorizedOptions,
921
- index: groupOrOptionIndex
922
- } : void 0;
923
- }
924
- var categorizedOption = toCategorizedOption(props, groupOrOption, selectValue, groupOrOptionIndex);
925
- return isFocusable(props, categorizedOption) ? categorizedOption : void 0;
926
- }).filter(notNullish);
927
- }
928
- function buildFocusableOptionsFromCategorizedOptions(categorizedOptions) {
929
- return categorizedOptions.reduce(function(optionsAccumulator, categorizedOption) {
930
- if (categorizedOption.type === "group") {
931
- optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function(option) {
932
- return option.data;
933
- })));
934
- } else {
935
- optionsAccumulator.push(categorizedOption.data);
936
- }
937
- return optionsAccumulator;
938
- }, []);
939
- }
940
- function buildFocusableOptionsWithIds(categorizedOptions, optionId) {
941
- return categorizedOptions.reduce(function(optionsAccumulator, categorizedOption) {
942
- if (categorizedOption.type === "group") {
943
- optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function(option) {
944
- return {
945
- data: option.data,
946
- id: "".concat(optionId, "-").concat(categorizedOption.index, "-").concat(option.index)
947
- };
948
- })));
949
- } else {
950
- optionsAccumulator.push({
951
- data: categorizedOption.data,
952
- id: "".concat(optionId, "-").concat(categorizedOption.index)
953
- });
954
- }
955
- return optionsAccumulator;
956
- }, []);
957
- }
958
- function buildFocusableOptions(props, selectValue) {
959
- return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props, selectValue));
960
- }
961
- function isFocusable(props, categorizedOption) {
962
- var _props$inputValue = props.inputValue, inputValue = _props$inputValue === void 0 ? "" : _props$inputValue;
963
- var data = categorizedOption.data, isSelected = categorizedOption.isSelected, label = categorizedOption.label, value = categorizedOption.value;
964
- return (!shouldHideSelectedOptions(props) || !isSelected) && _filterOption(props, {
965
- label,
966
- value,
967
- data
968
- }, inputValue);
969
- }
970
- function getNextFocusedValue(state, nextSelectValue) {
971
- var focusedValue = state.focusedValue, lastSelectValue = state.selectValue;
972
- var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);
973
- if (lastFocusedIndex > -1) {
974
- var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);
975
- if (nextFocusedIndex > -1) {
976
- return focusedValue;
977
- } else if (lastFocusedIndex < nextSelectValue.length) {
978
- return nextSelectValue[lastFocusedIndex];
979
- }
980
- }
981
- return null;
982
- }
983
- function getNextFocusedOption(state, options) {
984
- var lastFocusedOption = state.focusedOption;
985
- return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];
986
- }
987
- var getFocusedOptionId = function getFocusedOptionId2(focusableOptionsWithIds, focusedOption) {
988
- var _focusableOptionsWith;
989
- var focusedOptionId = (_focusableOptionsWith = focusableOptionsWithIds.find(function(option) {
990
- return option.data === focusedOption;
991
- })) === null || _focusableOptionsWith === void 0 ? void 0 : _focusableOptionsWith.id;
992
- return focusedOptionId || null;
993
- };
994
- var getOptionLabel2 = function getOptionLabel3(props, data) {
995
- return props.getOptionLabel(data);
996
- };
997
- var getOptionValue2 = function getOptionValue3(props, data) {
998
- return props.getOptionValue(data);
999
- };
1000
- function _isOptionDisabled(props, option, selectValue) {
1001
- return typeof props.isOptionDisabled === "function" ? props.isOptionDisabled(option, selectValue) : false;
1002
- }
1003
- function _isOptionSelected(props, option, selectValue) {
1004
- if (selectValue.indexOf(option) > -1) return true;
1005
- if (typeof props.isOptionSelected === "function") {
1006
- return props.isOptionSelected(option, selectValue);
1007
- }
1008
- var candidate = getOptionValue2(props, option);
1009
- return selectValue.some(function(i) {
1010
- return getOptionValue2(props, i) === candidate;
1011
- });
1012
- }
1013
- function _filterOption(props, option, inputValue) {
1014
- return props.filterOption ? props.filterOption(option, inputValue) : true;
1015
- }
1016
- var shouldHideSelectedOptions = function shouldHideSelectedOptions2(props) {
1017
- var hideSelectedOptions = props.hideSelectedOptions, isMulti = props.isMulti;
1018
- if (hideSelectedOptions === void 0) return isMulti;
1019
- return hideSelectedOptions;
1020
- };
1021
- var instanceId = 1;
1022
- var Select = /* @__PURE__ */ (function(_Component) {
1023
- _inherits(Select2, _Component);
1024
- var _super = _createSuper(Select2);
1025
- function Select2(_props) {
1026
- var _this;
1027
- _classCallCheck(this, Select2);
1028
- _this = _super.call(this, _props);
1029
- _this.state = {
1030
- ariaSelection: null,
1031
- focusedOption: null,
1032
- focusedOptionId: null,
1033
- focusableOptionsWithIds: [],
1034
- focusedValue: null,
1035
- inputIsHidden: false,
1036
- isFocused: false,
1037
- selectValue: [],
1038
- clearFocusValueOnUpdate: false,
1039
- prevWasFocused: false,
1040
- inputIsHiddenAfterUpdate: void 0,
1041
- prevProps: void 0,
1042
- instancePrefix: "",
1043
- isAppleDevice: false
1044
- };
1045
- _this.blockOptionHover = false;
1046
- _this.isComposing = false;
1047
- _this.commonProps = void 0;
1048
- _this.initialTouchX = 0;
1049
- _this.initialTouchY = 0;
1050
- _this.openAfterFocus = false;
1051
- _this.scrollToFocusedOptionOnUpdate = false;
1052
- _this.userIsDragging = void 0;
1053
- _this.controlRef = null;
1054
- _this.getControlRef = function(ref) {
1055
- _this.controlRef = ref;
1056
- };
1057
- _this.focusedOptionRef = null;
1058
- _this.getFocusedOptionRef = function(ref) {
1059
- _this.focusedOptionRef = ref;
1060
- };
1061
- _this.menuListRef = null;
1062
- _this.getMenuListRef = function(ref) {
1063
- _this.menuListRef = ref;
1064
- };
1065
- _this.inputRef = null;
1066
- _this.getInputRef = function(ref) {
1067
- _this.inputRef = ref;
1068
- };
1069
- _this.focus = _this.focusInput;
1070
- _this.blur = _this.blurInput;
1071
- _this.onChange = function(newValue, actionMeta) {
1072
- var _this$props = _this.props, onChange2 = _this$props.onChange, name = _this$props.name;
1073
- actionMeta.name = name;
1074
- _this.ariaOnChange(newValue, actionMeta);
1075
- onChange2(newValue, actionMeta);
1076
- };
1077
- _this.setValue = function(newValue, action, option) {
1078
- var _this$props2 = _this.props, closeMenuOnSelect = _this$props2.closeMenuOnSelect, isMulti = _this$props2.isMulti, inputValue = _this$props2.inputValue;
1079
- _this.onInputChange("", {
1080
- action: "set-value",
1081
- prevInputValue: inputValue
1082
- });
1083
- if (closeMenuOnSelect) {
1084
- _this.setState({
1085
- inputIsHiddenAfterUpdate: !isMulti
1086
- });
1087
- _this.onMenuClose();
1088
- }
1089
- _this.setState({
1090
- clearFocusValueOnUpdate: true
1091
- });
1092
- _this.onChange(newValue, {
1093
- action,
1094
- option
1095
- });
1096
- };
1097
- _this.selectOption = function(newValue) {
1098
- var _this$props3 = _this.props, blurInputOnSelect = _this$props3.blurInputOnSelect, isMulti = _this$props3.isMulti, name = _this$props3.name;
1099
- var selectValue = _this.state.selectValue;
1100
- var deselected = isMulti && _this.isOptionSelected(newValue, selectValue);
1101
- var isDisabled = _this.isOptionDisabled(newValue, selectValue);
1102
- if (deselected) {
1103
- var candidate = _this.getOptionValue(newValue);
1104
- _this.setValue(multiValueAsValue(selectValue.filter(function(i) {
1105
- return _this.getOptionValue(i) !== candidate;
1106
- })), "deselect-option", newValue);
1107
- } else if (!isDisabled) {
1108
- if (isMulti) {
1109
- _this.setValue(multiValueAsValue([].concat(_toConsumableArray(selectValue), [newValue])), "select-option", newValue);
1110
- } else {
1111
- _this.setValue(singleValueAsValue(newValue), "select-option");
1112
- }
1113
- } else {
1114
- _this.ariaOnChange(singleValueAsValue(newValue), {
1115
- action: "select-option",
1116
- option: newValue,
1117
- name
1118
- });
1119
- return;
1120
- }
1121
- if (blurInputOnSelect) {
1122
- _this.blurInput();
1123
- }
1124
- };
1125
- _this.removeValue = function(removedValue) {
1126
- var isMulti = _this.props.isMulti;
1127
- var selectValue = _this.state.selectValue;
1128
- var candidate = _this.getOptionValue(removedValue);
1129
- var newValueArray = selectValue.filter(function(i) {
1130
- return _this.getOptionValue(i) !== candidate;
1131
- });
1132
- var newValue = valueTernary(isMulti, newValueArray, newValueArray[0] || null);
1133
- _this.onChange(newValue, {
1134
- action: "remove-value",
1135
- removedValue
1136
- });
1137
- _this.focusInput();
1138
- };
1139
- _this.clearValue = function() {
1140
- var selectValue = _this.state.selectValue;
1141
- _this.onChange(valueTernary(_this.props.isMulti, [], null), {
1142
- action: "clear",
1143
- removedValues: selectValue
1144
- });
1145
- };
1146
- _this.popValue = function() {
1147
- var isMulti = _this.props.isMulti;
1148
- var selectValue = _this.state.selectValue;
1149
- var lastSelectedValue = selectValue[selectValue.length - 1];
1150
- var newValueArray = selectValue.slice(0, selectValue.length - 1);
1151
- var newValue = valueTernary(isMulti, newValueArray, newValueArray[0] || null);
1152
- if (lastSelectedValue) {
1153
- _this.onChange(newValue, {
1154
- action: "pop-value",
1155
- removedValue: lastSelectedValue
1156
- });
1157
- }
1158
- };
1159
- _this.getFocusedOptionId = function(focusedOption) {
1160
- return getFocusedOptionId(_this.state.focusableOptionsWithIds, focusedOption);
1161
- };
1162
- _this.getFocusableOptionsWithIds = function() {
1163
- return buildFocusableOptionsWithIds(buildCategorizedOptions(_this.props, _this.state.selectValue), _this.getElementId("option"));
1164
- };
1165
- _this.getValue = function() {
1166
- return _this.state.selectValue;
1167
- };
1168
- _this.cx = function() {
1169
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1170
- args[_key] = arguments[_key];
1171
- }
1172
- return classNames.apply(void 0, [_this.props.classNamePrefix].concat(args));
1173
- };
1174
- _this.getOptionLabel = function(data) {
1175
- return getOptionLabel2(_this.props, data);
1176
- };
1177
- _this.getOptionValue = function(data) {
1178
- return getOptionValue2(_this.props, data);
1179
- };
1180
- _this.getStyles = function(key, props) {
1181
- var unstyled = _this.props.unstyled;
1182
- var base = defaultStyles[key](props, unstyled);
1183
- base.boxSizing = "border-box";
1184
- var custom = _this.props.styles[key];
1185
- return custom ? custom(base, props) : base;
1186
- };
1187
- _this.getClassNames = function(key, props) {
1188
- var _this$props$className, _this$props$className2;
1189
- return (_this$props$className = (_this$props$className2 = _this.props.classNames)[key]) === null || _this$props$className === void 0 ? void 0 : _this$props$className.call(_this$props$className2, props);
1190
- };
1191
- _this.getElementId = function(element) {
1192
- return "".concat(_this.state.instancePrefix, "-").concat(element);
1193
- };
1194
- _this.getComponents = function() {
1195
- return defaultComponents(_this.props);
1196
- };
1197
- _this.buildCategorizedOptions = function() {
1198
- return buildCategorizedOptions(_this.props, _this.state.selectValue);
1199
- };
1200
- _this.getCategorizedOptions = function() {
1201
- return _this.props.menuIsOpen ? _this.buildCategorizedOptions() : [];
1202
- };
1203
- _this.buildFocusableOptions = function() {
1204
- return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions());
1205
- };
1206
- _this.getFocusableOptions = function() {
1207
- return _this.props.menuIsOpen ? _this.buildFocusableOptions() : [];
1208
- };
1209
- _this.ariaOnChange = function(value, actionMeta) {
1210
- _this.setState({
1211
- ariaSelection: _objectSpread2({
1212
- value
1213
- }, actionMeta)
1214
- });
1215
- };
1216
- _this.onMenuMouseDown = function(event) {
1217
- if (event.button !== 0) {
1218
- return;
1219
- }
1220
- event.stopPropagation();
1221
- event.preventDefault();
1222
- _this.focusInput();
1223
- };
1224
- _this.onMenuMouseMove = function(event) {
1225
- _this.blockOptionHover = false;
1226
- };
1227
- _this.onControlMouseDown = function(event) {
1228
- if (event.defaultPrevented) {
1229
- return;
1230
- }
1231
- var openMenuOnClick = _this.props.openMenuOnClick;
1232
- if (!_this.state.isFocused) {
1233
- if (openMenuOnClick) {
1234
- _this.openAfterFocus = true;
1235
- }
1236
- _this.focusInput();
1237
- } else if (!_this.props.menuIsOpen) {
1238
- if (openMenuOnClick) {
1239
- _this.openMenu("first");
1240
- }
1241
- } else {
1242
- if (event.target.tagName !== "INPUT" && event.target.tagName !== "TEXTAREA") {
1243
- _this.onMenuClose();
1244
- }
1245
- }
1246
- if (event.target.tagName !== "INPUT" && event.target.tagName !== "TEXTAREA") {
1247
- event.preventDefault();
1248
- }
1249
- };
1250
- _this.onDropdownIndicatorMouseDown = function(event) {
1251
- if (event && event.type === "mousedown" && event.button !== 0) {
1252
- return;
1253
- }
1254
- if (_this.props.isDisabled) return;
1255
- var _this$props4 = _this.props, isMulti = _this$props4.isMulti, menuIsOpen = _this$props4.menuIsOpen;
1256
- _this.focusInput();
1257
- if (menuIsOpen) {
1258
- _this.setState({
1259
- inputIsHiddenAfterUpdate: !isMulti
1260
- });
1261
- _this.onMenuClose();
1262
- } else {
1263
- _this.openMenu("first");
1264
- }
1265
- event.preventDefault();
1266
- };
1267
- _this.onClearIndicatorMouseDown = function(event) {
1268
- if (event && event.type === "mousedown" && event.button !== 0) {
1269
- return;
1270
- }
1271
- _this.clearValue();
1272
- event.preventDefault();
1273
- _this.openAfterFocus = false;
1274
- if (event.type === "touchend") {
1275
- _this.focusInput();
1276
- } else {
1277
- setTimeout(function() {
1278
- return _this.focusInput();
1279
- });
1280
- }
1281
- };
1282
- _this.onScroll = function(event) {
1283
- if (typeof _this.props.closeMenuOnScroll === "boolean") {
1284
- if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {
1285
- _this.props.onMenuClose();
1286
- }
1287
- } else if (typeof _this.props.closeMenuOnScroll === "function") {
1288
- if (_this.props.closeMenuOnScroll(event)) {
1289
- _this.props.onMenuClose();
1290
- }
1291
- }
1292
- };
1293
- _this.onCompositionStart = function() {
1294
- _this.isComposing = true;
1295
- };
1296
- _this.onCompositionEnd = function() {
1297
- _this.isComposing = false;
1298
- };
1299
- _this.onTouchStart = function(_ref22) {
1300
- var touches = _ref22.touches;
1301
- var touch = touches && touches.item(0);
1302
- if (!touch) {
1303
- return;
1304
- }
1305
- _this.initialTouchX = touch.clientX;
1306
- _this.initialTouchY = touch.clientY;
1307
- _this.userIsDragging = false;
1308
- };
1309
- _this.onTouchMove = function(_ref3) {
1310
- var touches = _ref3.touches;
1311
- var touch = touches && touches.item(0);
1312
- if (!touch) {
1313
- return;
1314
- }
1315
- var deltaX = Math.abs(touch.clientX - _this.initialTouchX);
1316
- var deltaY = Math.abs(touch.clientY - _this.initialTouchY);
1317
- var moveThreshold = 5;
1318
- _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;
1319
- };
1320
- _this.onTouchEnd = function(event) {
1321
- if (_this.userIsDragging) return;
1322
- if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {
1323
- _this.blurInput();
1324
- }
1325
- _this.initialTouchX = 0;
1326
- _this.initialTouchY = 0;
1327
- };
1328
- _this.onControlTouchEnd = function(event) {
1329
- if (_this.userIsDragging) return;
1330
- _this.onControlMouseDown(event);
1331
- };
1332
- _this.onClearIndicatorTouchEnd = function(event) {
1333
- if (_this.userIsDragging) return;
1334
- _this.onClearIndicatorMouseDown(event);
1335
- };
1336
- _this.onDropdownIndicatorTouchEnd = function(event) {
1337
- if (_this.userIsDragging) return;
1338
- _this.onDropdownIndicatorMouseDown(event);
1339
- };
1340
- _this.handleInputChange = function(event) {
1341
- var prevInputValue = _this.props.inputValue;
1342
- var inputValue = event.currentTarget.value;
1343
- _this.setState({
1344
- inputIsHiddenAfterUpdate: false
1345
- });
1346
- _this.onInputChange(inputValue, {
1347
- action: "input-change",
1348
- prevInputValue
1349
- });
1350
- if (!_this.props.menuIsOpen) {
1351
- _this.onMenuOpen();
1352
- }
1353
- };
1354
- _this.onInputFocus = function(event) {
1355
- if (_this.props.onFocus) {
1356
- _this.props.onFocus(event);
1357
- }
1358
- _this.setState({
1359
- inputIsHiddenAfterUpdate: false,
1360
- isFocused: true
1361
- });
1362
- if (_this.openAfterFocus || _this.props.openMenuOnFocus) {
1363
- _this.openMenu("first");
1364
- }
1365
- _this.openAfterFocus = false;
1366
- };
1367
- _this.onInputBlur = function(event) {
1368
- var prevInputValue = _this.props.inputValue;
1369
- if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {
1370
- _this.inputRef.focus();
1371
- return;
1372
- }
1373
- if (_this.props.onBlur) {
1374
- _this.props.onBlur(event);
1375
- }
1376
- _this.onInputChange("", {
1377
- action: "input-blur",
1378
- prevInputValue
1379
- });
1380
- _this.onMenuClose();
1381
- _this.setState({
1382
- focusedValue: null,
1383
- isFocused: false
1384
- });
1385
- };
1386
- _this.onOptionHover = function(focusedOption) {
1387
- if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {
1388
- return;
1389
- }
1390
- var options = _this.getFocusableOptions();
1391
- var focusedOptionIndex = options.indexOf(focusedOption);
1392
- _this.setState({
1393
- focusedOption,
1394
- focusedOptionId: focusedOptionIndex > -1 ? _this.getFocusedOptionId(focusedOption) : null
1395
- });
1396
- };
1397
- _this.shouldHideSelectedOptions = function() {
1398
- return shouldHideSelectedOptions(_this.props);
1399
- };
1400
- _this.onValueInputFocus = function(e) {
1401
- e.preventDefault();
1402
- e.stopPropagation();
1403
- _this.focus();
1404
- };
1405
- _this.onKeyDown = function(event) {
1406
- var _this$props5 = _this.props, isMulti = _this$props5.isMulti, backspaceRemovesValue = _this$props5.backspaceRemovesValue, escapeClearsValue = _this$props5.escapeClearsValue, inputValue = _this$props5.inputValue, isClearable = _this$props5.isClearable, isDisabled = _this$props5.isDisabled, menuIsOpen = _this$props5.menuIsOpen, onKeyDown = _this$props5.onKeyDown, tabSelectsValue = _this$props5.tabSelectsValue, openMenuOnFocus = _this$props5.openMenuOnFocus;
1407
- var _this$state = _this.state, focusedOption = _this$state.focusedOption, focusedValue = _this$state.focusedValue, selectValue = _this$state.selectValue;
1408
- if (isDisabled) return;
1409
- if (typeof onKeyDown === "function") {
1410
- onKeyDown(event);
1411
- if (event.defaultPrevented) {
1412
- return;
1413
- }
1414
- }
1415
- _this.blockOptionHover = true;
1416
- switch (event.key) {
1417
- case "ArrowLeft":
1418
- if (!isMulti || inputValue) return;
1419
- _this.focusValue("previous");
1420
- break;
1421
- case "ArrowRight":
1422
- if (!isMulti || inputValue) return;
1423
- _this.focusValue("next");
1424
- break;
1425
- case "Delete":
1426
- case "Backspace":
1427
- if (inputValue) return;
1428
- if (focusedValue) {
1429
- _this.removeValue(focusedValue);
1430
- } else {
1431
- if (!backspaceRemovesValue) return;
1432
- if (isMulti) {
1433
- _this.popValue();
1434
- } else if (isClearable) {
1435
- _this.clearValue();
1436
- }
1437
- }
1438
- break;
1439
- case "Tab":
1440
- if (_this.isComposing) return;
1441
- if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused
1442
- // option is already selected; it breaks the flow of navigation
1443
- openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {
1444
- return;
1445
- }
1446
- _this.selectOption(focusedOption);
1447
- break;
1448
- case "Enter":
1449
- if (event.keyCode === 229) {
1450
- break;
1451
- }
1452
- if (menuIsOpen) {
1453
- if (!focusedOption) return;
1454
- if (_this.isComposing) return;
1455
- _this.selectOption(focusedOption);
1456
- break;
1457
- }
1458
- return;
1459
- case "Escape":
1460
- if (menuIsOpen) {
1461
- _this.setState({
1462
- inputIsHiddenAfterUpdate: false
1463
- });
1464
- _this.onInputChange("", {
1465
- action: "menu-close",
1466
- prevInputValue: inputValue
1467
- });
1468
- _this.onMenuClose();
1469
- } else if (isClearable && escapeClearsValue) {
1470
- _this.clearValue();
1471
- }
1472
- break;
1473
- case " ":
1474
- if (inputValue) {
1475
- return;
1476
- }
1477
- if (!menuIsOpen) {
1478
- _this.openMenu("first");
1479
- break;
1480
- }
1481
- if (!focusedOption) return;
1482
- _this.selectOption(focusedOption);
1483
- break;
1484
- case "ArrowUp":
1485
- if (menuIsOpen) {
1486
- _this.focusOption("up");
1487
- } else {
1488
- _this.openMenu("last");
1489
- }
1490
- break;
1491
- case "ArrowDown":
1492
- if (menuIsOpen) {
1493
- _this.focusOption("down");
1494
- } else {
1495
- _this.openMenu("first");
1496
- }
1497
- break;
1498
- case "PageUp":
1499
- if (!menuIsOpen) return;
1500
- _this.focusOption("pageup");
1501
- break;
1502
- case "PageDown":
1503
- if (!menuIsOpen) return;
1504
- _this.focusOption("pagedown");
1505
- break;
1506
- case "Home":
1507
- if (!menuIsOpen) return;
1508
- _this.focusOption("first");
1509
- break;
1510
- case "End":
1511
- if (!menuIsOpen) return;
1512
- _this.focusOption("last");
1513
- break;
1514
- default:
1515
- return;
1516
- }
1517
- event.preventDefault();
1518
- };
1519
- _this.state.instancePrefix = "react-select-" + (_this.props.instanceId || ++instanceId);
1520
- _this.state.selectValue = cleanValue(_props.value);
1521
- if (_props.menuIsOpen && _this.state.selectValue.length) {
1522
- var focusableOptionsWithIds = _this.getFocusableOptionsWithIds();
1523
- var focusableOptions = _this.buildFocusableOptions();
1524
- var optionIndex = focusableOptions.indexOf(_this.state.selectValue[0]);
1525
- _this.state.focusableOptionsWithIds = focusableOptionsWithIds;
1526
- _this.state.focusedOption = focusableOptions[optionIndex];
1527
- _this.state.focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusableOptions[optionIndex]);
1528
- }
1529
- return _this;
1530
- }
1531
- _createClass(Select2, [{
1532
- key: "componentDidMount",
1533
- value: function componentDidMount() {
1534
- this.startListeningComposition();
1535
- this.startListeningToTouch();
1536
- if (this.props.closeMenuOnScroll && document && document.addEventListener) {
1537
- document.addEventListener("scroll", this.onScroll, true);
1538
- }
1539
- if (this.props.autoFocus) {
1540
- this.focusInput();
1541
- }
1542
- if (this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef) {
1543
- scrollIntoView(this.menuListRef, this.focusedOptionRef);
1544
- }
1545
- if (isAppleDevice()) {
1546
- this.setState({
1547
- isAppleDevice: true
1548
- });
1549
- }
1550
- }
1551
- }, {
1552
- key: "componentDidUpdate",
1553
- value: function componentDidUpdate(prevProps) {
1554
- var _this$props6 = this.props, isDisabled = _this$props6.isDisabled, menuIsOpen = _this$props6.menuIsOpen;
1555
- var isFocused = this.state.isFocused;
1556
- if (
1557
- // ensure focus is restored correctly when the control becomes enabled
1558
- isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens
1559
- isFocused && menuIsOpen && !prevProps.menuIsOpen
1560
- ) {
1561
- this.focusInput();
1562
- }
1563
- if (isFocused && isDisabled && !prevProps.isDisabled) {
1564
- this.setState({
1565
- isFocused: false
1566
- }, this.onMenuClose);
1567
- } else if (!isFocused && !isDisabled && prevProps.isDisabled && this.inputRef === document.activeElement) {
1568
- this.setState({
1569
- isFocused: true
1570
- });
1571
- }
1572
- if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {
1573
- scrollIntoView(this.menuListRef, this.focusedOptionRef);
1574
- this.scrollToFocusedOptionOnUpdate = false;
1575
- }
1576
- }
1577
- }, {
1578
- key: "componentWillUnmount",
1579
- value: function componentWillUnmount() {
1580
- this.stopListeningComposition();
1581
- this.stopListeningToTouch();
1582
- document.removeEventListener("scroll", this.onScroll, true);
1583
- }
1584
- // ==============================
1585
- // Consumer Handlers
1586
- // ==============================
1587
- }, {
1588
- key: "onMenuOpen",
1589
- value: function onMenuOpen() {
1590
- this.props.onMenuOpen();
1591
- }
1592
- }, {
1593
- key: "onMenuClose",
1594
- value: function onMenuClose() {
1595
- this.onInputChange("", {
1596
- action: "menu-close",
1597
- prevInputValue: this.props.inputValue
1598
- });
1599
- this.props.onMenuClose();
1600
- }
1601
- }, {
1602
- key: "onInputChange",
1603
- value: function onInputChange(newValue, actionMeta) {
1604
- this.props.onInputChange(newValue, actionMeta);
1605
- }
1606
- // ==============================
1607
- // Methods
1608
- // ==============================
1609
- }, {
1610
- key: "focusInput",
1611
- value: function focusInput() {
1612
- if (!this.inputRef) return;
1613
- this.inputRef.focus();
1614
- }
1615
- }, {
1616
- key: "blurInput",
1617
- value: function blurInput() {
1618
- if (!this.inputRef) return;
1619
- this.inputRef.blur();
1620
- }
1621
- // aliased for consumers
1622
- }, {
1623
- key: "openMenu",
1624
- value: function openMenu(focusOption) {
1625
- var _this2 = this;
1626
- var _this$state2 = this.state, selectValue = _this$state2.selectValue, isFocused = _this$state2.isFocused;
1627
- var focusableOptions = this.buildFocusableOptions();
1628
- var openAtIndex = focusOption === "first" ? 0 : focusableOptions.length - 1;
1629
- if (!this.props.isMulti) {
1630
- var selectedIndex = focusableOptions.indexOf(selectValue[0]);
1631
- if (selectedIndex > -1) {
1632
- openAtIndex = selectedIndex;
1633
- }
1634
- }
1635
- this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);
1636
- this.setState({
1637
- inputIsHiddenAfterUpdate: false,
1638
- focusedValue: null,
1639
- focusedOption: focusableOptions[openAtIndex],
1640
- focusedOptionId: this.getFocusedOptionId(focusableOptions[openAtIndex])
1641
- }, function() {
1642
- return _this2.onMenuOpen();
1643
- });
1644
- }
1645
- }, {
1646
- key: "focusValue",
1647
- value: function focusValue(direction) {
1648
- var _this$state3 = this.state, selectValue = _this$state3.selectValue, focusedValue = _this$state3.focusedValue;
1649
- if (!this.props.isMulti) return;
1650
- this.setState({
1651
- focusedOption: null
1652
- });
1653
- var focusedIndex = selectValue.indexOf(focusedValue);
1654
- if (!focusedValue) {
1655
- focusedIndex = -1;
1656
- }
1657
- var lastIndex = selectValue.length - 1;
1658
- var nextFocus = -1;
1659
- if (!selectValue.length) return;
1660
- switch (direction) {
1661
- case "previous":
1662
- if (focusedIndex === 0) {
1663
- nextFocus = 0;
1664
- } else if (focusedIndex === -1) {
1665
- nextFocus = lastIndex;
1666
- } else {
1667
- nextFocus = focusedIndex - 1;
1668
- }
1669
- break;
1670
- case "next":
1671
- if (focusedIndex > -1 && focusedIndex < lastIndex) {
1672
- nextFocus = focusedIndex + 1;
1673
- }
1674
- break;
1675
- }
1676
- this.setState({
1677
- inputIsHidden: nextFocus !== -1,
1678
- focusedValue: selectValue[nextFocus]
1679
- });
1680
- }
1681
- }, {
1682
- key: "focusOption",
1683
- value: function focusOption() {
1684
- var direction = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "first";
1685
- var pageSize = this.props.pageSize;
1686
- var focusedOption = this.state.focusedOption;
1687
- var options = this.getFocusableOptions();
1688
- if (!options.length) return;
1689
- var nextFocus = 0;
1690
- var focusedIndex = options.indexOf(focusedOption);
1691
- if (!focusedOption) {
1692
- focusedIndex = -1;
1693
- }
1694
- if (direction === "up") {
1695
- nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;
1696
- } else if (direction === "down") {
1697
- nextFocus = (focusedIndex + 1) % options.length;
1698
- } else if (direction === "pageup") {
1699
- nextFocus = focusedIndex - pageSize;
1700
- if (nextFocus < 0) nextFocus = 0;
1701
- } else if (direction === "pagedown") {
1702
- nextFocus = focusedIndex + pageSize;
1703
- if (nextFocus > options.length - 1) nextFocus = options.length - 1;
1704
- } else if (direction === "last") {
1705
- nextFocus = options.length - 1;
1706
- }
1707
- this.scrollToFocusedOptionOnUpdate = true;
1708
- this.setState({
1709
- focusedOption: options[nextFocus],
1710
- focusedValue: null,
1711
- focusedOptionId: this.getFocusedOptionId(options[nextFocus])
1712
- });
1713
- }
1714
- }, {
1715
- key: "getTheme",
1716
- value: (
1717
- // ==============================
1718
- // Getters
1719
- // ==============================
1720
- function getTheme() {
1721
- if (!this.props.theme) {
1722
- return defaultTheme;
1723
- }
1724
- if (typeof this.props.theme === "function") {
1725
- return this.props.theme(defaultTheme);
1726
- }
1727
- return _objectSpread2(_objectSpread2({}, defaultTheme), this.props.theme);
1728
- }
1729
- )
1730
- }, {
1731
- key: "getCommonProps",
1732
- value: function getCommonProps() {
1733
- var clearValue = this.clearValue, cx = this.cx, getStyles = this.getStyles, getClassNames = this.getClassNames, getValue = this.getValue, selectOption = this.selectOption, setValue = this.setValue, props = this.props;
1734
- var isMulti = props.isMulti, isRtl = props.isRtl, options = props.options;
1735
- var hasValue = this.hasValue();
1736
- return {
1737
- clearValue,
1738
- cx,
1739
- getStyles,
1740
- getClassNames,
1741
- getValue,
1742
- hasValue,
1743
- isMulti,
1744
- isRtl,
1745
- options,
1746
- selectOption,
1747
- selectProps: props,
1748
- setValue,
1749
- theme: this.getTheme()
1750
- };
1751
- }
1752
- }, {
1753
- key: "hasValue",
1754
- value: function hasValue() {
1755
- var selectValue = this.state.selectValue;
1756
- return selectValue.length > 0;
1757
- }
1758
- }, {
1759
- key: "hasOptions",
1760
- value: function hasOptions() {
1761
- return !!this.getFocusableOptions().length;
1762
- }
1763
- }, {
1764
- key: "isClearable",
1765
- value: function isClearable() {
1766
- var _this$props7 = this.props, isClearable2 = _this$props7.isClearable, isMulti = _this$props7.isMulti;
1767
- if (isClearable2 === void 0) return isMulti;
1768
- return isClearable2;
1769
- }
1770
- }, {
1771
- key: "isOptionDisabled",
1772
- value: function isOptionDisabled3(option, selectValue) {
1773
- return _isOptionDisabled(this.props, option, selectValue);
1774
- }
1775
- }, {
1776
- key: "isOptionSelected",
1777
- value: function isOptionSelected(option, selectValue) {
1778
- return _isOptionSelected(this.props, option, selectValue);
1779
- }
1780
- }, {
1781
- key: "filterOption",
1782
- value: function filterOption(option, inputValue) {
1783
- return _filterOption(this.props, option, inputValue);
1784
- }
1785
- }, {
1786
- key: "formatOptionLabel",
1787
- value: function formatOptionLabel(data, context) {
1788
- if (typeof this.props.formatOptionLabel === "function") {
1789
- var _inputValue = this.props.inputValue;
1790
- var _selectValue = this.state.selectValue;
1791
- return this.props.formatOptionLabel(data, {
1792
- context,
1793
- inputValue: _inputValue,
1794
- selectValue: _selectValue
1795
- });
1796
- } else {
1797
- return this.getOptionLabel(data);
1798
- }
1799
- }
1800
- }, {
1801
- key: "formatGroupLabel",
1802
- value: function formatGroupLabel3(data) {
1803
- return this.props.formatGroupLabel(data);
1804
- }
1805
- // ==============================
1806
- // Mouse Handlers
1807
- // ==============================
1808
- }, {
1809
- key: "startListeningComposition",
1810
- value: (
1811
- // ==============================
1812
- // Composition Handlers
1813
- // ==============================
1814
- function startListeningComposition() {
1815
- if (document && document.addEventListener) {
1816
- document.addEventListener("compositionstart", this.onCompositionStart, false);
1817
- document.addEventListener("compositionend", this.onCompositionEnd, false);
1818
- }
1819
- }
1820
- )
1821
- }, {
1822
- key: "stopListeningComposition",
1823
- value: function stopListeningComposition() {
1824
- if (document && document.removeEventListener) {
1825
- document.removeEventListener("compositionstart", this.onCompositionStart);
1826
- document.removeEventListener("compositionend", this.onCompositionEnd);
1827
- }
1828
- }
1829
- }, {
1830
- key: "startListeningToTouch",
1831
- value: (
1832
- // ==============================
1833
- // Touch Handlers
1834
- // ==============================
1835
- function startListeningToTouch() {
1836
- if (document && document.addEventListener) {
1837
- document.addEventListener("touchstart", this.onTouchStart, false);
1838
- document.addEventListener("touchmove", this.onTouchMove, false);
1839
- document.addEventListener("touchend", this.onTouchEnd, false);
1840
- }
1841
- }
1842
- )
1843
- }, {
1844
- key: "stopListeningToTouch",
1845
- value: function stopListeningToTouch() {
1846
- if (document && document.removeEventListener) {
1847
- document.removeEventListener("touchstart", this.onTouchStart);
1848
- document.removeEventListener("touchmove", this.onTouchMove);
1849
- document.removeEventListener("touchend", this.onTouchEnd);
1850
- }
1851
- }
1852
- }, {
1853
- key: "renderInput",
1854
- value: (
1855
- // ==============================
1856
- // Renderers
1857
- // ==============================
1858
- function renderInput() {
1859
- var _this$props8 = this.props, isDisabled = _this$props8.isDisabled, isSearchable = _this$props8.isSearchable, inputId = _this$props8.inputId, inputValue = _this$props8.inputValue, tabIndex = _this$props8.tabIndex, form = _this$props8.form, menuIsOpen = _this$props8.menuIsOpen, required = _this$props8.required;
1860
- var _this$getComponents = this.getComponents(), Input = _this$getComponents.Input;
1861
- var _this$state4 = this.state, inputIsHidden = _this$state4.inputIsHidden, ariaSelection = _this$state4.ariaSelection;
1862
- var commonProps = this.commonProps;
1863
- var id = inputId || this.getElementId("input");
1864
- var ariaAttributes = _objectSpread2(_objectSpread2(_objectSpread2({
1865
- "aria-autocomplete": "list",
1866
- "aria-expanded": menuIsOpen,
1867
- "aria-haspopup": true,
1868
- "aria-errormessage": this.props["aria-errormessage"],
1869
- "aria-invalid": this.props["aria-invalid"],
1870
- "aria-label": this.props["aria-label"],
1871
- "aria-labelledby": this.props["aria-labelledby"],
1872
- "aria-required": required,
1873
- role: "combobox",
1874
- "aria-activedescendant": this.state.isAppleDevice ? void 0 : this.state.focusedOptionId || ""
1875
- }, menuIsOpen && {
1876
- "aria-controls": this.getElementId("listbox")
1877
- }), !isSearchable && {
1878
- "aria-readonly": true
1879
- }), this.hasValue() ? (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus" && {
1880
- "aria-describedby": this.getElementId("live-region")
1881
- } : {
1882
- "aria-describedby": this.getElementId("placeholder")
1883
- });
1884
- if (!isSearchable) {
1885
- return /* @__PURE__ */ React.createElement(DummyInput, _extends({
1886
- id,
1887
- innerRef: this.getInputRef,
1888
- onBlur: this.onInputBlur,
1889
- onChange: noop,
1890
- onFocus: this.onInputFocus,
1891
- disabled: isDisabled,
1892
- tabIndex,
1893
- inputMode: "none",
1894
- form,
1895
- value: ""
1896
- }, ariaAttributes));
1897
- }
1898
- return /* @__PURE__ */ React.createElement(Input, _extends({}, commonProps, {
1899
- autoCapitalize: "none",
1900
- autoComplete: "off",
1901
- autoCorrect: "off",
1902
- id,
1903
- innerRef: this.getInputRef,
1904
- isDisabled,
1905
- isHidden: inputIsHidden,
1906
- onBlur: this.onInputBlur,
1907
- onChange: this.handleInputChange,
1908
- onFocus: this.onInputFocus,
1909
- spellCheck: "false",
1910
- tabIndex,
1911
- form,
1912
- type: "text",
1913
- value: inputValue
1914
- }, ariaAttributes));
1915
- }
1916
- )
1917
- }, {
1918
- key: "renderPlaceholderOrValue",
1919
- value: function renderPlaceholderOrValue() {
1920
- var _this3 = this;
1921
- var _this$getComponents2 = this.getComponents(), MultiValue = _this$getComponents2.MultiValue, MultiValueContainer = _this$getComponents2.MultiValueContainer, MultiValueLabel = _this$getComponents2.MultiValueLabel, MultiValueRemove = _this$getComponents2.MultiValueRemove, SingleValue = _this$getComponents2.SingleValue, Placeholder = _this$getComponents2.Placeholder;
1922
- var commonProps = this.commonProps;
1923
- var _this$props9 = this.props, controlShouldRenderValue = _this$props9.controlShouldRenderValue, isDisabled = _this$props9.isDisabled, isMulti = _this$props9.isMulti, inputValue = _this$props9.inputValue, placeholder = _this$props9.placeholder;
1924
- var _this$state5 = this.state, selectValue = _this$state5.selectValue, focusedValue = _this$state5.focusedValue, isFocused = _this$state5.isFocused;
1925
- if (!this.hasValue() || !controlShouldRenderValue) {
1926
- return inputValue ? null : /* @__PURE__ */ React.createElement(Placeholder, _extends({}, commonProps, {
1927
- key: "placeholder",
1928
- isDisabled,
1929
- isFocused,
1930
- innerProps: {
1931
- id: this.getElementId("placeholder")
1932
- }
1933
- }), placeholder);
1934
- }
1935
- if (isMulti) {
1936
- return selectValue.map(function(opt, index) {
1937
- var isOptionFocused = opt === focusedValue;
1938
- var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
1939
- return /* @__PURE__ */ React.createElement(MultiValue, _extends({}, commonProps, {
1940
- components: {
1941
- Container: MultiValueContainer,
1942
- Label: MultiValueLabel,
1943
- Remove: MultiValueRemove
1944
- },
1945
- isFocused: isOptionFocused,
1946
- isDisabled,
1947
- key,
1948
- index,
1949
- removeProps: {
1950
- onClick: function onClick() {
1951
- return _this3.removeValue(opt);
1952
- },
1953
- onTouchEnd: function onTouchEnd() {
1954
- return _this3.removeValue(opt);
1955
- },
1956
- onMouseDown: function onMouseDown(e) {
1957
- e.preventDefault();
1958
- }
1959
- },
1960
- data: opt
1961
- }), _this3.formatOptionLabel(opt, "value"));
1962
- });
1963
- }
1964
- if (inputValue) {
1965
- return null;
1966
- }
1967
- var singleValue = selectValue[0];
1968
- return /* @__PURE__ */ React.createElement(SingleValue, _extends({}, commonProps, {
1969
- data: singleValue,
1970
- isDisabled
1971
- }), this.formatOptionLabel(singleValue, "value"));
1972
- }
1973
- }, {
1974
- key: "renderClearIndicator",
1975
- value: function renderClearIndicator() {
1976
- var _this$getComponents3 = this.getComponents(), ClearIndicator = _this$getComponents3.ClearIndicator;
1977
- var commonProps = this.commonProps;
1978
- var _this$props10 = this.props, isDisabled = _this$props10.isDisabled, isLoading = _this$props10.isLoading;
1979
- var isFocused = this.state.isFocused;
1980
- if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {
1981
- return null;
1982
- }
1983
- var innerProps = {
1984
- onMouseDown: this.onClearIndicatorMouseDown,
1985
- onTouchEnd: this.onClearIndicatorTouchEnd,
1986
- "aria-hidden": "true"
1987
- };
1988
- return /* @__PURE__ */ React.createElement(ClearIndicator, _extends({}, commonProps, {
1989
- innerProps,
1990
- isFocused
1991
- }));
1992
- }
1993
- }, {
1994
- key: "renderLoadingIndicator",
1995
- value: function renderLoadingIndicator() {
1996
- var _this$getComponents4 = this.getComponents(), LoadingIndicator = _this$getComponents4.LoadingIndicator;
1997
- var commonProps = this.commonProps;
1998
- var _this$props11 = this.props, isDisabled = _this$props11.isDisabled, isLoading = _this$props11.isLoading;
1999
- var isFocused = this.state.isFocused;
2000
- if (!LoadingIndicator || !isLoading) return null;
2001
- var innerProps = {
2002
- "aria-hidden": "true"
2003
- };
2004
- return /* @__PURE__ */ React.createElement(LoadingIndicator, _extends({}, commonProps, {
2005
- innerProps,
2006
- isDisabled,
2007
- isFocused
2008
- }));
2009
- }
2010
- }, {
2011
- key: "renderIndicatorSeparator",
2012
- value: function renderIndicatorSeparator() {
2013
- var _this$getComponents5 = this.getComponents(), DropdownIndicator = _this$getComponents5.DropdownIndicator, IndicatorSeparator = _this$getComponents5.IndicatorSeparator;
2014
- if (!DropdownIndicator || !IndicatorSeparator) return null;
2015
- var commonProps = this.commonProps;
2016
- var isDisabled = this.props.isDisabled;
2017
- var isFocused = this.state.isFocused;
2018
- return /* @__PURE__ */ React.createElement(IndicatorSeparator, _extends({}, commonProps, {
2019
- isDisabled,
2020
- isFocused
2021
- }));
2022
- }
2023
- }, {
2024
- key: "renderDropdownIndicator",
2025
- value: function renderDropdownIndicator() {
2026
- var _this$getComponents6 = this.getComponents(), DropdownIndicator = _this$getComponents6.DropdownIndicator;
2027
- if (!DropdownIndicator) return null;
2028
- var commonProps = this.commonProps;
2029
- var isDisabled = this.props.isDisabled;
2030
- var isFocused = this.state.isFocused;
2031
- var innerProps = {
2032
- onMouseDown: this.onDropdownIndicatorMouseDown,
2033
- onTouchEnd: this.onDropdownIndicatorTouchEnd,
2034
- "aria-hidden": "true"
2035
- };
2036
- return /* @__PURE__ */ React.createElement(DropdownIndicator, _extends({}, commonProps, {
2037
- innerProps,
2038
- isDisabled,
2039
- isFocused
2040
- }));
2041
- }
2042
- }, {
2043
- key: "renderMenu",
2044
- value: function renderMenu() {
2045
- var _this4 = this;
2046
- var _this$getComponents7 = this.getComponents(), Group = _this$getComponents7.Group, GroupHeading = _this$getComponents7.GroupHeading, Menu = _this$getComponents7.Menu, MenuList = _this$getComponents7.MenuList, MenuPortal = _this$getComponents7.MenuPortal, LoadingMessage = _this$getComponents7.LoadingMessage, NoOptionsMessage = _this$getComponents7.NoOptionsMessage, Option = _this$getComponents7.Option;
2047
- var commonProps = this.commonProps;
2048
- var focusedOption = this.state.focusedOption;
2049
- var _this$props12 = this.props, captureMenuScroll = _this$props12.captureMenuScroll, inputValue = _this$props12.inputValue, isLoading = _this$props12.isLoading, loadingMessage2 = _this$props12.loadingMessage, minMenuHeight = _this$props12.minMenuHeight, maxMenuHeight = _this$props12.maxMenuHeight, menuIsOpen = _this$props12.menuIsOpen, menuPlacement = _this$props12.menuPlacement, menuPosition = _this$props12.menuPosition, menuPortalTarget = _this$props12.menuPortalTarget, menuShouldBlockScroll = _this$props12.menuShouldBlockScroll, menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView, noOptionsMessage2 = _this$props12.noOptionsMessage, onMenuScrollToTop = _this$props12.onMenuScrollToTop, onMenuScrollToBottom = _this$props12.onMenuScrollToBottom;
2050
- if (!menuIsOpen) return null;
2051
- var render = function render2(props, id) {
2052
- var type = props.type, data = props.data, isDisabled = props.isDisabled, isSelected = props.isSelected, label = props.label, value = props.value;
2053
- var isFocused = focusedOption === data;
2054
- var onHover = isDisabled ? void 0 : function() {
2055
- return _this4.onOptionHover(data);
2056
- };
2057
- var onSelect = isDisabled ? void 0 : function() {
2058
- return _this4.selectOption(data);
2059
- };
2060
- var optionId = "".concat(_this4.getElementId("option"), "-").concat(id);
2061
- var innerProps = {
2062
- id: optionId,
2063
- onClick: onSelect,
2064
- onMouseMove: onHover,
2065
- onMouseOver: onHover,
2066
- tabIndex: -1,
2067
- role: "option",
2068
- "aria-selected": _this4.state.isAppleDevice ? void 0 : isSelected
2069
- // is not supported on Apple devices
2070
- };
2071
- return /* @__PURE__ */ React.createElement(Option, _extends({}, commonProps, {
2072
- innerProps,
2073
- data,
2074
- isDisabled,
2075
- isSelected,
2076
- key: optionId,
2077
- label,
2078
- type,
2079
- value,
2080
- isFocused,
2081
- innerRef: isFocused ? _this4.getFocusedOptionRef : void 0
2082
- }), _this4.formatOptionLabel(props.data, "menu"));
2083
- };
2084
- var menuUI;
2085
- if (this.hasOptions()) {
2086
- menuUI = this.getCategorizedOptions().map(function(item) {
2087
- if (item.type === "group") {
2088
- var _data = item.data, options = item.options, groupIndex = item.index;
2089
- var groupId = "".concat(_this4.getElementId("group"), "-").concat(groupIndex);
2090
- var headingId = "".concat(groupId, "-heading");
2091
- return /* @__PURE__ */ React.createElement(Group, _extends({}, commonProps, {
2092
- key: groupId,
2093
- data: _data,
2094
- options,
2095
- Heading: GroupHeading,
2096
- headingProps: {
2097
- id: headingId,
2098
- data: item.data
2099
- },
2100
- label: _this4.formatGroupLabel(item.data)
2101
- }), item.options.map(function(option) {
2102
- return render(option, "".concat(groupIndex, "-").concat(option.index));
2103
- }));
2104
- } else if (item.type === "option") {
2105
- return render(item, "".concat(item.index));
2106
- }
2107
- });
2108
- } else if (isLoading) {
2109
- var message = loadingMessage2({
2110
- inputValue
2111
- });
2112
- if (message === null) return null;
2113
- menuUI = /* @__PURE__ */ React.createElement(LoadingMessage, commonProps, message);
2114
- } else {
2115
- var _message = noOptionsMessage2({
2116
- inputValue
2117
- });
2118
- if (_message === null) return null;
2119
- menuUI = /* @__PURE__ */ React.createElement(NoOptionsMessage, commonProps, _message);
2120
- }
2121
- var menuPlacementProps = {
2122
- minMenuHeight,
2123
- maxMenuHeight,
2124
- menuPlacement,
2125
- menuPosition,
2126
- menuShouldScrollIntoView
2127
- };
2128
- var menuElement = /* @__PURE__ */ React.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function(_ref4) {
2129
- var ref = _ref4.ref, _ref4$placerProps = _ref4.placerProps, placement = _ref4$placerProps.placement, maxHeight = _ref4$placerProps.maxHeight;
2130
- return /* @__PURE__ */ React.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {
2131
- innerRef: ref,
2132
- innerProps: {
2133
- onMouseDown: _this4.onMenuMouseDown,
2134
- onMouseMove: _this4.onMenuMouseMove
2135
- },
2136
- isLoading,
2137
- placement
2138
- }), /* @__PURE__ */ React.createElement(ScrollManager, {
2139
- captureEnabled: captureMenuScroll,
2140
- onTopArrive: onMenuScrollToTop,
2141
- onBottomArrive: onMenuScrollToBottom,
2142
- lockEnabled: menuShouldBlockScroll
2143
- }, function(scrollTargetRef) {
2144
- return /* @__PURE__ */ React.createElement(MenuList, _extends({}, commonProps, {
2145
- innerRef: function innerRef(instance) {
2146
- _this4.getMenuListRef(instance);
2147
- scrollTargetRef(instance);
2148
- },
2149
- innerProps: {
2150
- role: "listbox",
2151
- "aria-multiselectable": commonProps.isMulti,
2152
- id: _this4.getElementId("listbox")
2153
- },
2154
- isLoading,
2155
- maxHeight,
2156
- focusedOption
2157
- }), menuUI);
2158
- }));
2159
- });
2160
- return menuPortalTarget || menuPosition === "fixed" ? /* @__PURE__ */ React.createElement(MenuPortal, _extends({}, commonProps, {
2161
- appendTo: menuPortalTarget,
2162
- controlElement: this.controlRef,
2163
- menuPlacement,
2164
- menuPosition
2165
- }), menuElement) : menuElement;
2166
- }
2167
- }, {
2168
- key: "renderFormField",
2169
- value: function renderFormField() {
2170
- var _this5 = this;
2171
- var _this$props13 = this.props, delimiter = _this$props13.delimiter, isDisabled = _this$props13.isDisabled, isMulti = _this$props13.isMulti, name = _this$props13.name, required = _this$props13.required;
2172
- var selectValue = this.state.selectValue;
2173
- if (required && !this.hasValue() && !isDisabled) {
2174
- return /* @__PURE__ */ React.createElement(RequiredInput$1, {
2175
- name,
2176
- onFocus: this.onValueInputFocus
2177
- });
2178
- }
2179
- if (!name || isDisabled) return;
2180
- if (isMulti) {
2181
- if (delimiter) {
2182
- var value = selectValue.map(function(opt) {
2183
- return _this5.getOptionValue(opt);
2184
- }).join(delimiter);
2185
- return /* @__PURE__ */ React.createElement("input", {
2186
- name,
2187
- type: "hidden",
2188
- value
2189
- });
2190
- } else {
2191
- var input = selectValue.length > 0 ? selectValue.map(function(opt, i) {
2192
- return /* @__PURE__ */ React.createElement("input", {
2193
- key: "i-".concat(i),
2194
- name,
2195
- type: "hidden",
2196
- value: _this5.getOptionValue(opt)
2197
- });
2198
- }) : /* @__PURE__ */ React.createElement("input", {
2199
- name,
2200
- type: "hidden",
2201
- value: ""
2202
- });
2203
- return /* @__PURE__ */ React.createElement("div", null, input);
2204
- }
2205
- } else {
2206
- var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : "";
2207
- return /* @__PURE__ */ React.createElement("input", {
2208
- name,
2209
- type: "hidden",
2210
- value: _value
2211
- });
2212
- }
2213
- }
2214
- }, {
2215
- key: "renderLiveRegion",
2216
- value: function renderLiveRegion() {
2217
- var commonProps = this.commonProps;
2218
- var _this$state6 = this.state, ariaSelection = _this$state6.ariaSelection, focusedOption = _this$state6.focusedOption, focusedValue = _this$state6.focusedValue, isFocused = _this$state6.isFocused, selectValue = _this$state6.selectValue;
2219
- var focusableOptions = this.getFocusableOptions();
2220
- return /* @__PURE__ */ React.createElement(LiveRegion$1, _extends({}, commonProps, {
2221
- id: this.getElementId("live-region"),
2222
- ariaSelection,
2223
- focusedOption,
2224
- focusedValue,
2225
- isFocused,
2226
- selectValue,
2227
- focusableOptions,
2228
- isAppleDevice: this.state.isAppleDevice
2229
- }));
2230
- }
2231
- }, {
2232
- key: "render",
2233
- value: function render() {
2234
- var _this$getComponents8 = this.getComponents(), Control = _this$getComponents8.Control, IndicatorsContainer = _this$getComponents8.IndicatorsContainer, SelectContainer = _this$getComponents8.SelectContainer, ValueContainer = _this$getComponents8.ValueContainer;
2235
- var _this$props14 = this.props, className = _this$props14.className, id = _this$props14.id, isDisabled = _this$props14.isDisabled, menuIsOpen = _this$props14.menuIsOpen;
2236
- var isFocused = this.state.isFocused;
2237
- var commonProps = this.commonProps = this.getCommonProps();
2238
- return /* @__PURE__ */ React.createElement(SelectContainer, _extends({}, commonProps, {
2239
- className,
2240
- innerProps: {
2241
- id,
2242
- onKeyDown: this.onKeyDown
2243
- },
2244
- isDisabled,
2245
- isFocused
2246
- }), this.renderLiveRegion(), /* @__PURE__ */ React.createElement(Control, _extends({}, commonProps, {
2247
- innerRef: this.getControlRef,
2248
- innerProps: {
2249
- onMouseDown: this.onControlMouseDown,
2250
- onTouchEnd: this.onControlTouchEnd
2251
- },
2252
- isDisabled,
2253
- isFocused,
2254
- menuIsOpen
2255
- }), /* @__PURE__ */ React.createElement(ValueContainer, _extends({}, commonProps, {
2256
- isDisabled
2257
- }), this.renderPlaceholderOrValue(), this.renderInput()), /* @__PURE__ */ React.createElement(IndicatorsContainer, _extends({}, commonProps, {
2258
- isDisabled
2259
- }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
2260
- }
2261
- }], [{
2262
- key: "getDerivedStateFromProps",
2263
- value: function getDerivedStateFromProps(props, state) {
2264
- var prevProps = state.prevProps, clearFocusValueOnUpdate = state.clearFocusValueOnUpdate, inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate, ariaSelection = state.ariaSelection, isFocused = state.isFocused, prevWasFocused = state.prevWasFocused, instancePrefix = state.instancePrefix;
2265
- var options = props.options, value = props.value, menuIsOpen = props.menuIsOpen, inputValue = props.inputValue, isMulti = props.isMulti;
2266
- var selectValue = cleanValue(value);
2267
- var newMenuOptionsState = {};
2268
- if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) {
2269
- var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : [];
2270
- var focusableOptionsWithIds = menuIsOpen ? buildFocusableOptionsWithIds(buildCategorizedOptions(props, selectValue), "".concat(instancePrefix, "-option")) : [];
2271
- var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null;
2272
- var focusedOption = getNextFocusedOption(state, focusableOptions);
2273
- var focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusedOption);
2274
- newMenuOptionsState = {
2275
- selectValue,
2276
- focusedOption,
2277
- focusedOptionId,
2278
- focusableOptionsWithIds,
2279
- focusedValue,
2280
- clearFocusValueOnUpdate: false
2281
- };
2282
- }
2283
- var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? {
2284
- inputIsHidden: inputIsHiddenAfterUpdate,
2285
- inputIsHiddenAfterUpdate: void 0
2286
- } : {};
2287
- var newAriaSelection = ariaSelection;
2288
- var hasKeptFocus = isFocused && prevWasFocused;
2289
- if (isFocused && !hasKeptFocus) {
2290
- newAriaSelection = {
2291
- value: valueTernary(isMulti, selectValue, selectValue[0] || null),
2292
- options: selectValue,
2293
- action: "initial-input-focus"
2294
- };
2295
- hasKeptFocus = !prevWasFocused;
2296
- }
2297
- if ((ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === "initial-input-focus") {
2298
- newAriaSelection = null;
2299
- }
2300
- return _objectSpread2(_objectSpread2(_objectSpread2({}, newMenuOptionsState), newInputIsHiddenState), {}, {
2301
- prevProps: props,
2302
- ariaSelection: newAriaSelection,
2303
- prevWasFocused: hasKeptFocus
2304
- });
2305
- }
2306
- }]);
2307
- return Select2;
2308
- })(Component);
2309
- Select.defaultProps = defaultProps;
2310
- export {
2311
- Select as S,
2312
- defaultProps as a,
2313
- getOptionLabel$1 as b,
2314
- createFilter as c,
2315
- defaultTheme as d,
2316
- getOptionValue$1 as g
2317
- };