@protonradio/proton-ui 0.11.16 → 0.11.18-beta.1

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 (230) hide show
  1. package/dist/assets/svg/icons.svg.cjs.js.map +1 -1
  2. package/dist/assets/svg/icons.svg.es.js.map +1 -1
  3. package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -1
  4. package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -1
  5. package/dist/components/Badge/Badge.cjs.js.map +1 -1
  6. package/dist/components/Badge/Badge.es.js.map +1 -1
  7. package/dist/components/Banner/Banner.cjs.js.map +1 -1
  8. package/dist/components/Banner/Banner.es.js.map +1 -1
  9. package/dist/components/Button/Button.cjs.js.map +1 -1
  10. package/dist/components/Button/Button.es.js.map +1 -1
  11. package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -1
  12. package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -1
  13. package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js +1 -1
  14. package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js.map +1 -1
  15. package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +26 -26
  16. package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js.map +1 -1
  17. package/dist/components/DataTable/DataTable.cjs.js.map +1 -1
  18. package/dist/components/DataTable/DataTable.es.js.map +1 -1
  19. package/dist/components/Dialog/Dialog.cjs.js.map +1 -1
  20. package/dist/components/Dialog/Dialog.es.js.map +1 -1
  21. package/dist/components/Elevation/Elevation.cjs.js.map +1 -1
  22. package/dist/components/Elevation/Elevation.es.js.map +1 -1
  23. package/dist/components/Icon/Icon.cjs.js.map +1 -1
  24. package/dist/components/Icon/Icon.es.js.map +1 -1
  25. package/dist/components/ImageBackground/ImageBackground.cjs.js.map +1 -1
  26. package/dist/components/ImageBackground/ImageBackground.es.js.map +1 -1
  27. package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -1
  28. package/dist/components/Input/BaseInput/Input.es.js.map +1 -1
  29. package/dist/components/Input/CopyInput/CopyInput.cjs.js +1 -1
  30. package/dist/components/Input/CopyInput/CopyInput.cjs.js.map +1 -1
  31. package/dist/components/Input/CopyInput/CopyInput.es.js +9 -9
  32. package/dist/components/Input/CopyInput/CopyInput.es.js.map +1 -1
  33. package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +1 -1
  34. package/dist/components/Input/SearchInput/SearchInput.es.js.map +1 -1
  35. package/dist/components/Menu/MenuTrigger.cjs.js.map +1 -1
  36. package/dist/components/Menu/MenuTrigger.es.js.map +1 -1
  37. package/dist/components/Menu/PopoverMenu.cjs.js +1 -1
  38. package/dist/components/Menu/PopoverMenu.cjs.js.map +1 -1
  39. package/dist/components/Menu/PopoverMenu.es.js +32 -28
  40. package/dist/components/Menu/PopoverMenu.es.js.map +1 -1
  41. package/dist/components/Modal/Modal.cjs.js.map +1 -1
  42. package/dist/components/Modal/Modal.es.js.map +1 -1
  43. package/dist/components/Popover/Popover.cjs.js.map +1 -1
  44. package/dist/components/Popover/Popover.es.js.map +1 -1
  45. package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -1
  46. package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -1
  47. package/dist/components/Select/Select.cjs.js.map +1 -1
  48. package/dist/components/Select/Select.es.js +3 -3
  49. package/dist/components/Select/Select.es.js.map +1 -1
  50. package/dist/components/Switch/Switch.cjs.js.map +1 -1
  51. package/dist/components/Switch/Switch.es.js.map +1 -1
  52. package/dist/components/Table/Collection/collectionParser.cjs.js.map +1 -1
  53. package/dist/components/Table/Collection/collectionParser.es.js.map +1 -1
  54. package/dist/components/Table/Collection/useTableCollection.cjs.js.map +1 -1
  55. package/dist/components/Table/Collection/useTableCollection.es.js.map +1 -1
  56. package/dist/components/Table/Table.cjs.js.map +1 -1
  57. package/dist/components/Table/Table.es.js +5 -5
  58. package/dist/components/Table/Table.es.js.map +1 -1
  59. package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -1
  60. package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -1
  61. package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +1 -1
  62. package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +1 -1
  63. package/dist/components/ThemeProvider.cjs.js.map +1 -1
  64. package/dist/components/ThemeProvider.es.js +4 -4
  65. package/dist/components/ThemeProvider.es.js.map +1 -1
  66. package/dist/components/Tombstone/Tombstone.cjs.js.map +1 -1
  67. package/dist/components/Tombstone/Tombstone.es.js.map +1 -1
  68. package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -1
  69. package/dist/components/Tooltip/Tooltip.es.js.map +1 -1
  70. package/dist/components/Waveform/Waveform.cjs.js.map +1 -1
  71. package/dist/components/Waveform/Waveform.es.js.map +1 -1
  72. package/dist/components/Waveform/WaveformBar.cjs.js.map +1 -1
  73. package/dist/components/Waveform/WaveformBar.es.js.map +1 -1
  74. package/dist/design/darkTheme/colors.cjs.js.map +1 -1
  75. package/dist/design/darkTheme/colors.es.js +3 -3
  76. package/dist/design/darkTheme/stylesheet.cjs.js.map +1 -1
  77. package/dist/design/darkTheme/stylesheet.es.js +12 -12
  78. package/dist/design/darkTheme/stylesheet.es.js.map +1 -1
  79. package/dist/design/generateStylesheet.cjs.js.map +1 -1
  80. package/dist/design/generateStylesheet.es.js.map +1 -1
  81. package/dist/design/lightTheme/colors.cjs.js.map +1 -1
  82. package/dist/design/lightTheme/colors.es.js +3 -3
  83. package/dist/design/lightTheme/stylesheet.cjs.js.map +1 -1
  84. package/dist/design/lightTheme/stylesheet.es.js +12 -12
  85. package/dist/design/lightTheme/stylesheet.es.js.map +1 -1
  86. package/dist/hooks/useBreakpoint.cjs.js.map +1 -1
  87. package/dist/hooks/useBreakpoint.es.js.map +1 -1
  88. package/dist/hooks/useIsClosing.cjs.js.map +1 -1
  89. package/dist/hooks/useIsClosing.es.js.map +1 -1
  90. package/dist/hooks/useLockBodyScroll.cjs.js.map +1 -1
  91. package/dist/hooks/useLockBodyScroll.es.js.map +1 -1
  92. package/dist/hooks/usePalette.cjs.js.map +1 -1
  93. package/dist/hooks/usePalette.es.js.map +1 -1
  94. package/dist/index.d.ts +38 -38
  95. package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js +1 -1
  96. package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js.map +1 -1
  97. package/dist/node_modules/@react-aria/button/dist/useButton.es.js +12 -13
  98. package/dist/node_modules/@react-aria/button/dist/useButton.es.js.map +1 -1
  99. package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js.map +1 -1
  100. package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js.map +1 -1
  101. package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js.map +1 -1
  102. package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js +3 -3
  103. package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js.map +1 -1
  104. package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js.map +1 -1
  105. package/dist/node_modules/@react-aria/form/dist/useFormValidation.es.js.map +1 -1
  106. package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js.map +1 -1
  107. package/dist/node_modules/@react-aria/i18n/dist/context.es.js.map +1 -1
  108. package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.cjs.js.map +1 -1
  109. package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.es.js.map +1 -1
  110. package/dist/node_modules/@react-aria/i18n/dist/utils.cjs.js.map +1 -1
  111. package/dist/node_modules/@react-aria/i18n/dist/utils.es.js.map +1 -1
  112. package/dist/node_modules/@react-aria/interactions/dist/context.cjs.js.map +1 -1
  113. package/dist/node_modules/@react-aria/interactions/dist/context.es.js.map +1 -1
  114. package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.cjs.js.map +1 -1
  115. package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.es.js.map +1 -1
  116. package/dist/node_modules/@react-aria/interactions/dist/focusSafely.cjs.js.map +1 -1
  117. package/dist/node_modules/@react-aria/interactions/dist/focusSafely.es.js.map +1 -1
  118. package/dist/node_modules/@react-aria/interactions/dist/textSelection.cjs.js.map +1 -1
  119. package/dist/node_modules/@react-aria/interactions/dist/textSelection.es.js.map +1 -1
  120. package/dist/node_modules/@react-aria/interactions/dist/useFocus.cjs.js.map +1 -1
  121. package/dist/node_modules/@react-aria/interactions/dist/useFocus.es.js.map +1 -1
  122. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs.js.map +1 -1
  123. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.es.js.map +1 -1
  124. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js.map +1 -1
  125. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.es.js.map +1 -1
  126. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +1 -1
  127. package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +1 -1
  128. package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.cjs.js.map +1 -1
  129. package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.es.js.map +1 -1
  130. package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.cjs.js.map +1 -1
  131. package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.es.js.map +1 -1
  132. package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +2 -2
  133. package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js.map +1 -1
  134. package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js +23 -23
  135. package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js.map +1 -1
  136. package/dist/node_modules/@react-aria/interactions/dist/utils.cjs.js.map +1 -1
  137. package/dist/node_modules/@react-aria/interactions/dist/utils.es.js.map +1 -1
  138. package/dist/node_modules/@react-aria/label/dist/useField.cjs.js.map +1 -1
  139. package/dist/node_modules/@react-aria/label/dist/useField.es.js.map +1 -1
  140. package/dist/node_modules/@react-aria/label/dist/useLabel.cjs.js.map +1 -1
  141. package/dist/node_modules/@react-aria/label/dist/useLabel.es.js.map +1 -1
  142. package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js.map +1 -1
  143. package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js.map +1 -1
  144. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js +1 -1
  145. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js.map +1 -1
  146. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js +18 -18
  147. package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js.map +1 -1
  148. package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.cjs.js.map +1 -1
  149. package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.es.js.map +1 -1
  150. package/dist/node_modules/@react-aria/overlays/dist/useOverlay.cjs.js.map +1 -1
  151. package/dist/node_modules/@react-aria/overlays/dist/useOverlay.es.js.map +1 -1
  152. package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.cjs.js.map +1 -1
  153. package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.es.js.map +1 -1
  154. package/dist/node_modules/@react-aria/radio/dist/useRadio.cjs.js.map +1 -1
  155. package/dist/node_modules/@react-aria/radio/dist/useRadio.es.js.map +1 -1
  156. package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.cjs.js.map +1 -1
  157. package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.es.js.map +1 -1
  158. package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.cjs.js.map +1 -1
  159. package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +1 -1
  160. package/dist/node_modules/@react-aria/switch/dist/useSwitch.cjs.js.map +1 -1
  161. package/dist/node_modules/@react-aria/switch/dist/useSwitch.es.js.map +1 -1
  162. package/dist/node_modules/@react-aria/toggle/dist/useToggle.cjs.js.map +1 -1
  163. package/dist/node_modules/@react-aria/toggle/dist/useToggle.es.js.map +1 -1
  164. package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.cjs.js.map +1 -1
  165. package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.es.js.map +1 -1
  166. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js.map +1 -1
  167. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js +3 -3
  168. package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js.map +1 -1
  169. package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.cjs.js.map +1 -1
  170. package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.es.js.map +1 -1
  171. package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js.map +1 -1
  172. package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.es.js.map +1 -1
  173. package/dist/node_modules/@react-stately/toggle/dist/useToggleState.cjs.js.map +1 -1
  174. package/dist/node_modules/@react-stately/toggle/dist/useToggleState.es.js.map +1 -1
  175. package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js.map +1 -1
  176. package/dist/node_modules/@react-stately/utils/dist/useControlledState.es.js.map +1 -1
  177. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js +1 -1
  178. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js.map +1 -1
  179. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js +2 -1
  180. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js.map +1 -1
  181. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js +1 -1
  182. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js.map +1 -1
  183. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js +2 -1
  184. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js.map +1 -1
  185. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js +1 -1
  186. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js.map +1 -1
  187. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js +2 -1
  188. package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js.map +1 -1
  189. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js +1 -1
  190. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js.map +1 -1
  191. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js +2 -1
  192. package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js.map +1 -1
  193. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js +1 -1
  194. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js.map +1 -1
  195. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js +7 -6
  196. package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js.map +1 -1
  197. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js +1 -1
  198. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js.map +1 -1
  199. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js +4 -3
  200. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js.map +1 -1
  201. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js +1 -1
  202. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js.map +1 -1
  203. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js +7 -6
  204. package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js.map +1 -1
  205. package/dist/node_modules/color2k/dist/index.exports.import.es.cjs.js.map +1 -1
  206. package/dist/node_modules/color2k/dist/index.exports.import.es.es.js.map +1 -1
  207. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +7 -7
  208. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js.map +1 -1
  209. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +174 -167
  210. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -1
  211. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js +1 -1
  212. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js.map +1 -1
  213. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +3 -3
  214. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -1
  215. package/dist/node_modules/react/jsx-runtime.cjs.js.map +1 -1
  216. package/dist/node_modules/react/jsx-runtime.es.js.map +1 -1
  217. package/dist/utils/color2k.cjs.js.map +1 -1
  218. package/dist/utils/color2k.es.js.map +1 -1
  219. package/dist/utils/copy.cjs.js +1 -1
  220. package/dist/utils/copy.cjs.js.map +1 -1
  221. package/dist/utils/copy.es.js +20 -19
  222. package/dist/utils/copy.es.js.map +1 -1
  223. package/dist/utils/image.cjs.js.map +1 -1
  224. package/dist/utils/image.es.js.map +1 -1
  225. package/dist/utils/navigation.cjs.js.map +1 -1
  226. package/dist/utils/navigation.es.js.map +1 -1
  227. package/dist/utils/palette.cjs.js.map +1 -1
  228. package/dist/utils/palette.es.js +1 -1
  229. package/dist/utils/palette.es.js.map +1 -1
  230. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ariaHideOutside.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/ariaHideOutside.mjs"],"sourcesContent":["import {getOwnerWindow as $fF94N$getOwnerWindow} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\n// Keeps a ref count of all hidden elements. Added to when hiding an element, and\n// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.\nlet $5e3802645cc19319$var$refCountMap = new WeakMap();\nlet $5e3802645cc19319$var$observerStack = [];\nfunction $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {\n let windowObj = (0, $fF94N$getOwnerWindow)(targets === null || targets === void 0 ? void 0 : targets[0]);\n let opts = options instanceof windowObj.Element ? {\n root: options\n } : options;\n var _opts_root;\n let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;\n let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;\n let visibleNodes = new Set(targets);\n let hiddenNodes = new Set();\n let getHidden = (element)=>{\n return shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute('aria-hidden') === 'true';\n };\n let setHidden = (element, hidden)=>{\n if (shouldUseInert && element instanceof windowObj.HTMLElement) element.inert = hidden;\n else if (hidden) element.setAttribute('aria-hidden', 'true');\n else {\n element.removeAttribute('aria-hidden');\n if (element instanceof windowObj.HTMLElement) // We only ever call setHidden with hidden = false when the nodeCount is 1 aka\n // we are trying to make the element visible to screen readers again, so remove inert as well\n element.inert = false;\n }\n };\n let walk = (root)=>{\n // Keep live announcer and top layer elements (e.g. toasts) visible.\n for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);\n let acceptNode = (node)=>{\n // Skip this node and its children if it is one of the target nodes, or a live announcer.\n // Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is\n // made for elements with role=\"row\" since VoiceOver on iOS has issues hiding elements with role=\"row\".\n // For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).\n if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;\n // Skip this node but continue to children if one of the targets is inside the node.\n for (let target of visibleNodes){\n if (node.contains(target)) return NodeFilter.FILTER_SKIP;\n }\n return NodeFilter.FILTER_ACCEPT;\n };\n let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode: acceptNode\n });\n // TreeWalker does not include the root.\n let acceptRoot = acceptNode(root);\n if (acceptRoot === NodeFilter.FILTER_ACCEPT) hide(root);\n if (acceptRoot !== NodeFilter.FILTER_REJECT) {\n let node = walker.nextNode();\n while(node != null){\n hide(node);\n node = walker.nextNode();\n }\n }\n };\n let hide = (node)=>{\n var _refCountMap_get;\n let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;\n // If already aria-hidden, and the ref count is zero, then this element\n // was already hidden and there's nothing for us to do.\n if (getHidden(node) && refCount === 0) return;\n if (refCount === 0) setHidden(node, true);\n hiddenNodes.add(node);\n $5e3802645cc19319$var$refCountMap.set(node, refCount + 1);\n };\n // If there is already a MutationObserver listening from a previous call,\n // disconnect it so the new on takes over.\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].disconnect();\n walk(root);\n let observer = new MutationObserver((changes)=>{\n for (let change of changes){\n if (change.type !== 'childList') continue;\n // If the parent element of the added nodes is not within one of the targets,\n // and not already inside a hidden node, hide all of the new children.\n if (![\n ...visibleNodes,\n ...hiddenNodes\n ].some((node)=>node.contains(change.target))) for (let node of change.addedNodes){\n if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);\n else if (node instanceof Element) walk(node);\n }\n }\n });\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n let observerWrapper = {\n visibleNodes: visibleNodes,\n hiddenNodes: hiddenNodes,\n observe () {\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n },\n disconnect () {\n observer.disconnect();\n }\n };\n $5e3802645cc19319$var$observerStack.push(observerWrapper);\n return ()=>{\n observer.disconnect();\n for (let node of hiddenNodes){\n let count = $5e3802645cc19319$var$refCountMap.get(node);\n if (count == null) continue;\n if (count === 1) {\n setHidden(node, false);\n $5e3802645cc19319$var$refCountMap.delete(node);\n } else $5e3802645cc19319$var$refCountMap.set(node, count - 1);\n }\n // Remove this observer from the stack, and start the previous one.\n if (observerWrapper === $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1]) {\n $5e3802645cc19319$var$observerStack.pop();\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].observe();\n } else $5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(observerWrapper), 1);\n };\n}\nfunction $5e3802645cc19319$export$1020fa7f77e17884(element) {\n let observer = $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1];\n if (observer && !observer.visibleNodes.has(element)) {\n observer.visibleNodes.add(element);\n return ()=>{\n observer.visibleNodes.delete(element);\n };\n }\n}\n\n\nexport {$5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside, $5e3802645cc19319$export$1020fa7f77e17884 as keepVisible};\n//# sourceMappingURL=ariaHideOutside.module.js.map\n"],"names":["$5e3802645cc19319$var$supportsInert","$5e3802645cc19319$var$refCountMap","$5e3802645cc19319$var$observerStack","$5e3802645cc19319$export$1c3ebcada18427bf","targets","options","windowObj","$fF94N$getOwnerWindow","opts","_opts_root","root","shouldUseInert","visibleNodes","hiddenNodes","getHidden","element","setHidden","hidden","walk","acceptNode","node","target","walker","acceptRoot","hide","_refCountMap_get","refCount","observer","changes","change","observerWrapper","count"],"mappings":"q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AIkB,EAAQ9B,EAAkC,IAAImB,CAAI,EAClDW,GAAS,OACTA,IAAU,GACVf,EAAUI,EAAM,EAAK,EACrBnB,EAAkC,OAAOmB,CAAI,GAC1CnB,EAAkC,IAAImB,EAAMW,EAAQ,CAAC,EAChE,CAEID,IAAoB5B,EAAoCA,EAAoC,OAAS,CAAC,GACtGA,EAAoC,IAAG,EACnCA,EAAoC,QAAQA,EAAoCA,EAAoC,OAAS,CAAC,EAAE,QAAO,GACxIA,EAAoC,OAAOA,EAAoC,QAAQ4B,CAAe,EAAG,CAAC,CACrH,CACJ","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ariaHideOutside.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/ariaHideOutside.mjs"],"sourcesContent":["import {getOwnerWindow as $fF94N$getOwnerWindow} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\n// Keeps a ref count of all hidden elements. Added to when hiding an element, and\n// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.\nlet $5e3802645cc19319$var$refCountMap = new WeakMap();\nlet $5e3802645cc19319$var$observerStack = [];\nfunction $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {\n let windowObj = (0, $fF94N$getOwnerWindow)(targets === null || targets === void 0 ? void 0 : targets[0]);\n let opts = options instanceof windowObj.Element ? {\n root: options\n } : options;\n var _opts_root;\n let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;\n let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;\n let visibleNodes = new Set(targets);\n let hiddenNodes = new Set();\n let getHidden = (element)=>{\n return shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute('aria-hidden') === 'true';\n };\n let setHidden = (element, hidden)=>{\n if (shouldUseInert && element instanceof windowObj.HTMLElement) element.inert = hidden;\n else if (hidden) element.setAttribute('aria-hidden', 'true');\n else element.removeAttribute('aria-hidden');\n };\n let walk = (root)=>{\n // Keep live announcer and top layer elements (e.g. toasts) visible.\n for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);\n let acceptNode = (node)=>{\n // Skip this node and its children if it is one of the target nodes, or a live announcer.\n // Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is\n // made for elements with role=\"row\" since VoiceOver on iOS has issues hiding elements with role=\"row\".\n // For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).\n if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;\n // Skip this node but continue to children if one of the targets is inside the node.\n for (let target of visibleNodes){\n if (node.contains(target)) return NodeFilter.FILTER_SKIP;\n }\n return NodeFilter.FILTER_ACCEPT;\n };\n let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode: acceptNode\n });\n // TreeWalker does not include the root.\n let acceptRoot = acceptNode(root);\n if (acceptRoot === NodeFilter.FILTER_ACCEPT) hide(root);\n if (acceptRoot !== NodeFilter.FILTER_REJECT) {\n let node = walker.nextNode();\n while(node != null){\n hide(node);\n node = walker.nextNode();\n }\n }\n };\n let hide = (node)=>{\n var _refCountMap_get;\n let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;\n // If already aria-hidden, and the ref count is zero, then this element\n // was already hidden and there's nothing for us to do.\n if (getHidden(node) && refCount === 0) return;\n if (refCount === 0) setHidden(node, true);\n hiddenNodes.add(node);\n $5e3802645cc19319$var$refCountMap.set(node, refCount + 1);\n };\n // If there is already a MutationObserver listening from a previous call,\n // disconnect it so the new on takes over.\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].disconnect();\n walk(root);\n let observer = new MutationObserver((changes)=>{\n for (let change of changes){\n if (change.type !== 'childList') continue;\n // If the parent element of the added nodes is not within one of the targets,\n // and not already inside a hidden node, hide all of the new children.\n if (![\n ...visibleNodes,\n ...hiddenNodes\n ].some((node)=>node.contains(change.target))) for (let node of change.addedNodes){\n if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);\n else if (node instanceof Element) walk(node);\n }\n }\n });\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n let observerWrapper = {\n visibleNodes: visibleNodes,\n hiddenNodes: hiddenNodes,\n observe () {\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n },\n disconnect () {\n observer.disconnect();\n }\n };\n $5e3802645cc19319$var$observerStack.push(observerWrapper);\n return ()=>{\n observer.disconnect();\n for (let node of hiddenNodes){\n let count = $5e3802645cc19319$var$refCountMap.get(node);\n if (count == null) continue;\n if (count === 1) {\n setHidden(node, false);\n $5e3802645cc19319$var$refCountMap.delete(node);\n } else $5e3802645cc19319$var$refCountMap.set(node, count - 1);\n }\n // Remove this observer from the stack, and start the previous one.\n if (observerWrapper === $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1]) {\n $5e3802645cc19319$var$observerStack.pop();\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].observe();\n } else $5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(observerWrapper), 1);\n };\n}\nfunction $5e3802645cc19319$export$1020fa7f77e17884(element) {\n let observer = $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1];\n if (observer && !observer.visibleNodes.has(element)) {\n observer.visibleNodes.add(element);\n return ()=>{\n observer.visibleNodes.delete(element);\n };\n }\n}\n\n\nexport {$5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside, $5e3802645cc19319$export$1020fa7f77e17884 as keepVisible};\n//# sourceMappingURL=ariaHideOutside.module.js.map\n"],"names":["$5e3802645cc19319$var$supportsInert","$5e3802645cc19319$var$refCountMap","$5e3802645cc19319$var$observerStack","$5e3802645cc19319$export$1c3ebcada18427bf","targets","options","windowObj","$fF94N$getOwnerWindow","opts","_opts_root","root","shouldUseInert","visibleNodes","hiddenNodes","getHidden","element","setHidden","hidden","walk","acceptNode","node","target","walker","acceptRoot","hide","_refCountMap_get","refCount","observer","changes","change","observerWrapper","count"],"mappings":"qHAaMA,EAAsC,OAAO,YAAgB,KAAe,UAAW,YAAY,UAGzG,IAAIC,EAAoC,IAAI,QACxCC,EAAsC,CAAA,EAC1C,SAASC,EAA0CC,EAASC,EAAS,CACjE,IAAIC,EAAgBC,iBAAuBH,GAAY,KAA6B,OAASA,EAAQ,CAAC,CAAC,EACnGI,EAAOH,aAAmBC,EAAU,QAAU,CAC9C,KAAMD,CACT,EAAGA,EACJ,IAAII,EACJ,IAAIC,GAAQD,EAAaD,GAAS,KAA0B,OAASA,EAAK,QAAU,MAAQC,IAAe,OAASA,EAAa,SAAS,KACtIE,GAAkBH,GAAS,KAA0B,OAASA,EAAK,iBAAmBR,EACtFY,EAAe,IAAI,IAAIR,CAAO,EAC9BS,EAAc,IAAI,IAClBC,EAAaC,GACNJ,GAAkBI,aAAmBT,EAAU,YAAcS,EAAQ,MAAQA,EAAQ,aAAa,aAAa,IAAM,OAE5HC,EAAY,CAACD,EAASE,IAAS,CAC3BN,GAAkBI,a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AAMO,GAAOA,EAAK,SAASS,EAAO,MAAM,CAAC,EAAG,QAAST,KAAQS,EAAO,YAC7DT,aAAgB,aAAeA,aAAgB,cAAgBA,EAAK,QAAQ,gBAAkB,QAAUA,EAAK,QAAQ,oBAAsB,QAASR,EAAa,IAAIQ,CAAI,EACrKA,aAAgB,SAASF,EAAKE,CAAI,CAG3D,CAAK,EACDO,EAAS,QAAQjB,EAAM,CACnB,UAAW,GACX,QAAS,EACjB,CAAK,EACD,IAAIoB,EAAkB,CAClB,aAAclB,EACd,YAAaC,EACb,SAAW,CACPc,EAAS,QAAQjB,EAAM,CACnB,UAAW,GACX,QAAS,EACzB,CAAa,CACJ,EACD,YAAc,CACViB,EAAS,WAAU,CACtB,CACT,EACI,OAAAzB,EAAoC,KAAK4B,CAAe,EACjD,IAAI,CACPH,EAAS,WAAU,EACnB,QAASP,KAAQP,EAAY,CACzB,IAAIkB,EAAQ9B,EAAkC,IAAImB,CAAI,EAClDW,GAAS,OACTA,IAAU,GACVf,EAAUI,EAAM,EAAK,EACrBnB,EAAkC,OAAOmB,CAAI,GAC1CnB,EAAkC,IAAImB,EAAMW,EAAQ,CAAC,EAC/D,CAEGD,IAAoB5B,EAAoCA,EAAoC,OAAS,CAAC,GACtGA,EAAoC,IAAG,EACnCA,EAAoC,QAAQA,EAAoCA,EAAoC,OAAS,CAAC,EAAE,WACjIA,EAAoC,OAAOA,EAAoC,QAAQ4B,CAAe,EAAG,CAAC,CACzH,CACA","x_google_ignoreList":[0]}
@@ -1,35 +1,35 @@
1
1
  import { getOwnerWindow as w } from "@react-aria/utils";
2
2
  const $ = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
3
3
  let d = /* @__PURE__ */ new WeakMap(), i = [];
4
- function M(s, f) {
5
- let c = w(s == null ? void 0 : s[0]), l = f instanceof c.Element ? {
6
- root: f
7
- } : f;
4
+ function M(s, u) {
5
+ let f = w(s == null ? void 0 : s[0]), l = u instanceof f.Element ? {
6
+ root: u
7
+ } : u;
8
8
  var p;
9
- let v = (p = l == null ? void 0 : l.root) !== null && p !== void 0 ? p : document.body, h = (l == null ? void 0 : l.shouldUseInert) && $, o = new Set(s), a = /* @__PURE__ */ new Set(), g = (e) => h && e instanceof c.HTMLElement ? e.inert : e.getAttribute("aria-hidden") === "true", b = (e, t) => {
10
- h && e instanceof c.HTMLElement ? e.inert = t : t ? e.setAttribute("aria-hidden", "true") : (e.removeAttribute("aria-hidden"), e instanceof c.HTMLElement && (e.inert = !1));
9
+ let v = (p = l == null ? void 0 : l.root) !== null && p !== void 0 ? p : document.body, h = (l == null ? void 0 : l.shouldUseInert) && $, o = new Set(s), a = /* @__PURE__ */ new Set(), m = (e) => h && e instanceof f.HTMLElement ? e.inert : e.getAttribute("aria-hidden") === "true", b = (e, t) => {
10
+ h && e instanceof f.HTMLElement ? e.inert = t : t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
11
11
  }, T = (e) => {
12
12
  for (let n of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) o.add(n);
13
13
  let t = (n) => {
14
14
  if (a.has(n) || o.has(n) || n.parentElement && a.has(n.parentElement) && n.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
15
- for (let m of o)
16
- if (n.contains(m)) return NodeFilter.FILTER_SKIP;
15
+ for (let g of o)
16
+ if (n.contains(g)) return NodeFilter.FILTER_SKIP;
17
17
  return NodeFilter.FILTER_ACCEPT;
18
18
  }, r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
19
19
  acceptNode: t
20
- }), N = t(e);
21
- if (N === NodeFilter.FILTER_ACCEPT && L(e), N !== NodeFilter.FILTER_REJECT) {
20
+ }), L = t(e);
21
+ if (L === NodeFilter.FILTER_ACCEPT && N(e), L !== NodeFilter.FILTER_REJECT) {
22
22
  let n = r.nextNode();
23
23
  for (; n != null; )
24
- L(n), n = r.nextNode();
24
+ N(n), n = r.nextNode();
25
25
  }
26
- }, L = (e) => {
26
+ }, N = (e) => {
27
27
  var t;
28
28
  let r = (t = d.get(e)) !== null && t !== void 0 ? t : 0;
29
- g(e) && r === 0 || (r === 0 && b(e, !0), a.add(e), d.set(e, r + 1));
29
+ m(e) && r === 0 || (r === 0 && b(e, !0), a.add(e), d.set(e, r + 1));
30
30
  };
31
31
  i.length && i[i.length - 1].disconnect(), T(v);
32
- let u = new MutationObserver((e) => {
32
+ let c = new MutationObserver((e) => {
33
33
  for (let t of e)
34
34
  if (t.type === "childList" && ![
35
35
  ...o,
@@ -38,7 +38,7 @@ function M(s, f) {
38
38
  for (let r of t.addedNodes)
39
39
  (r instanceof HTMLElement || r instanceof SVGElement) && (r.dataset.liveAnnouncer === "true" || r.dataset.reactAriaTopLayer === "true") ? o.add(r) : r instanceof Element && T(r);
40
40
  });
41
- u.observe(v, {
41
+ c.observe(v, {
42
42
  childList: !0,
43
43
  subtree: !0
44
44
  });
@@ -46,17 +46,17 @@ function M(s, f) {
46
46
  visibleNodes: o,
47
47
  hiddenNodes: a,
48
48
  observe() {
49
- u.observe(v, {
49
+ c.observe(v, {
50
50
  childList: !0,
51
51
  subtree: !0
52
52
  });
53
53
  },
54
54
  disconnect() {
55
- u.disconnect();
55
+ c.disconnect();
56
56
  }
57
57
  };
58
58
  return i.push(E), () => {
59
- u.disconnect();
59
+ c.disconnect();
60
60
  for (let e of a) {
61
61
  let t = d.get(e);
62
62
  t != null && (t === 1 ? (b(e, !1), d.delete(e)) : d.set(e, t - 1));
@@ -1 +1 @@
1
- {"version":3,"file":"ariaHideOutside.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/ariaHideOutside.mjs"],"sourcesContent":["import {getOwnerWindow as $fF94N$getOwnerWindow} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\n// Keeps a ref count of all hidden elements. Added to when hiding an element, and\n// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.\nlet $5e3802645cc19319$var$refCountMap = new WeakMap();\nlet $5e3802645cc19319$var$observerStack = [];\nfunction $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {\n let windowObj = (0, $fF94N$getOwnerWindow)(targets === null || targets === void 0 ? void 0 : targets[0]);\n let opts = options instanceof windowObj.Element ? {\n root: options\n } : options;\n var _opts_root;\n let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;\n let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;\n let visibleNodes = new Set(targets);\n let hiddenNodes = new Set();\n let getHidden = (element)=>{\n return shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute('aria-hidden') === 'true';\n };\n let setHidden = (element, hidden)=>{\n if (shouldUseInert && element instanceof windowObj.HTMLElement) element.inert = hidden;\n else if (hidden) element.setAttribute('aria-hidden', 'true');\n else {\n element.removeAttribute('aria-hidden');\n if (element instanceof windowObj.HTMLElement) // We only ever call setHidden with hidden = false when the nodeCount is 1 aka\n // we are trying to make the element visible to screen readers again, so remove inert as well\n element.inert = false;\n }\n };\n let walk = (root)=>{\n // Keep live announcer and top layer elements (e.g. toasts) visible.\n for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);\n let acceptNode = (node)=>{\n // Skip this node and its children if it is one of the target nodes, or a live announcer.\n // Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is\n // made for elements with role=\"row\" since VoiceOver on iOS has issues hiding elements with role=\"row\".\n // For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).\n if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;\n // Skip this node but continue to children if one of the targets is inside the node.\n for (let target of visibleNodes){\n if (node.contains(target)) return NodeFilter.FILTER_SKIP;\n }\n return NodeFilter.FILTER_ACCEPT;\n };\n let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode: acceptNode\n });\n // TreeWalker does not include the root.\n let acceptRoot = acceptNode(root);\n if (acceptRoot === NodeFilter.FILTER_ACCEPT) hide(root);\n if (acceptRoot !== NodeFilter.FILTER_REJECT) {\n let node = walker.nextNode();\n while(node != null){\n hide(node);\n node = walker.nextNode();\n }\n }\n };\n let hide = (node)=>{\n var _refCountMap_get;\n let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;\n // If already aria-hidden, and the ref count is zero, then this element\n // was already hidden and there's nothing for us to do.\n if (getHidden(node) && refCount === 0) return;\n if (refCount === 0) setHidden(node, true);\n hiddenNodes.add(node);\n $5e3802645cc19319$var$refCountMap.set(node, refCount + 1);\n };\n // If there is already a MutationObserver listening from a previous call,\n // disconnect it so the new on takes over.\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].disconnect();\n walk(root);\n let observer = new MutationObserver((changes)=>{\n for (let change of changes){\n if (change.type !== 'childList') continue;\n // If the parent element of the added nodes is not within one of the targets,\n // and not already inside a hidden node, hide all of the new children.\n if (![\n ...visibleNodes,\n ...hiddenNodes\n ].some((node)=>node.contains(change.target))) for (let node of change.addedNodes){\n if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);\n else if (node instanceof Element) walk(node);\n }\n }\n });\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n let observerWrapper = {\n visibleNodes: visibleNodes,\n hiddenNodes: hiddenNodes,\n observe () {\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n },\n disconnect () {\n observer.disconnect();\n }\n };\n $5e3802645cc19319$var$observerStack.push(observerWrapper);\n return ()=>{\n observer.disconnect();\n for (let node of hiddenNodes){\n let count = $5e3802645cc19319$var$refCountMap.get(node);\n if (count == null) continue;\n if (count === 1) {\n setHidden(node, false);\n $5e3802645cc19319$var$refCountMap.delete(node);\n } else $5e3802645cc19319$var$refCountMap.set(node, count - 1);\n }\n // Remove this observer from the stack, and start the previous one.\n if (observerWrapper === $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1]) {\n $5e3802645cc19319$var$observerStack.pop();\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].observe();\n } else $5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(observerWrapper), 1);\n };\n}\nfunction $5e3802645cc19319$export$1020fa7f77e17884(element) {\n let observer = $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1];\n if (observer && !observer.visibleNodes.has(element)) {\n observer.visibleNodes.add(element);\n return ()=>{\n observer.visibleNodes.delete(element);\n };\n }\n}\n\n\nexport {$5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside, $5e3802645cc19319$export$1020fa7f77e17884 as keepVisible};\n//# sourceMappingURL=ariaHideOutside.module.js.map\n"],"names":["$5e3802645cc19319$var$supportsInert","$5e3802645cc19319$var$refCountMap","$5e3802645cc19319$var$observerStack","$5e3802645cc19319$export$1c3ebcada18427bf","targets","options","windowObj","$fF94N$getOwnerWindow","opts","_opts_root","root","shouldUseInert","visibleNodes","hiddenNodes","getHidden","element","setHidden","hidden","walk","acceptNode","node","target","walker","acceptRoot","hide","_refCountMap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,cAAclB;AAAA,IACd,aAAaC;AAAA,IACb,UAAW;AACP,MAAAc,EAAS,QAAQjB,GAAM;AAAA,QACnB,WAAW;AAAA,QACX,SAAS;AAAA,MACzB,CAAa;AAAA,IACL;AAAA,IACA,aAAc;AACV,MAAAiB,EAAS,WAAU;AAAA,IACvB;AAAA,EACR;AACI,SAAAzB,EAAoC,KAAK4B,CAAe,GACjD,MAAI;AACP,IAAAH,EAAS,WAAU;AACnB,aAASP,KAAQP,GAAY;AACzB,UAAIkB,IAAQ9B,EAAkC,IAAImB,CAAI;AACtD,MAAIW,KAAS,SACTA,MAAU,KACVf,EAAUI,GAAM,EAAK,GACrBnB,EAAkC,OAAOmB,CAAI,KAC1CnB,EAAkC,IAAImB,GAAMW,IAAQ,CAAC;AAAA,IAChE;AAEA,IAAID,MAAoB5B,EAAoCA,EAAoC,SAAS,CAAC,KACtGA,EAAoC,IAAG,GACnCA,EAAoC,UAAQA,EAAoCA,EAAoC,SAAS,CAAC,EAAE,QAAO,KACxIA,EAAoC,OAAOA,EAAoC,QAAQ4B,CAAe,GAAG,CAAC;AAAA,EACrH;AACJ;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ariaHideOutside.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/ariaHideOutside.mjs"],"sourcesContent":["import {getOwnerWindow as $fF94N$getOwnerWindow} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\n// Keeps a ref count of all hidden elements. Added to when hiding an element, and\n// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.\nlet $5e3802645cc19319$var$refCountMap = new WeakMap();\nlet $5e3802645cc19319$var$observerStack = [];\nfunction $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {\n let windowObj = (0, $fF94N$getOwnerWindow)(targets === null || targets === void 0 ? void 0 : targets[0]);\n let opts = options instanceof windowObj.Element ? {\n root: options\n } : options;\n var _opts_root;\n let root = (_opts_root = opts === null || opts === void 0 ? void 0 : opts.root) !== null && _opts_root !== void 0 ? _opts_root : document.body;\n let shouldUseInert = (opts === null || opts === void 0 ? void 0 : opts.shouldUseInert) && $5e3802645cc19319$var$supportsInert;\n let visibleNodes = new Set(targets);\n let hiddenNodes = new Set();\n let getHidden = (element)=>{\n return shouldUseInert && element instanceof windowObj.HTMLElement ? element.inert : element.getAttribute('aria-hidden') === 'true';\n };\n let setHidden = (element, hidden)=>{\n if (shouldUseInert && element instanceof windowObj.HTMLElement) element.inert = hidden;\n else if (hidden) element.setAttribute('aria-hidden', 'true');\n else element.removeAttribute('aria-hidden');\n };\n let walk = (root)=>{\n // Keep live announcer and top layer elements (e.g. toasts) visible.\n for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);\n let acceptNode = (node)=>{\n // Skip this node and its children if it is one of the target nodes, or a live announcer.\n // Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is\n // made for elements with role=\"row\" since VoiceOver on iOS has issues hiding elements with role=\"row\".\n // For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).\n if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;\n // Skip this node but continue to children if one of the targets is inside the node.\n for (let target of visibleNodes){\n if (node.contains(target)) return NodeFilter.FILTER_SKIP;\n }\n return NodeFilter.FILTER_ACCEPT;\n };\n let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode: acceptNode\n });\n // TreeWalker does not include the root.\n let acceptRoot = acceptNode(root);\n if (acceptRoot === NodeFilter.FILTER_ACCEPT) hide(root);\n if (acceptRoot !== NodeFilter.FILTER_REJECT) {\n let node = walker.nextNode();\n while(node != null){\n hide(node);\n node = walker.nextNode();\n }\n }\n };\n let hide = (node)=>{\n var _refCountMap_get;\n let refCount = (_refCountMap_get = $5e3802645cc19319$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;\n // If already aria-hidden, and the ref count is zero, then this element\n // was already hidden and there's nothing for us to do.\n if (getHidden(node) && refCount === 0) return;\n if (refCount === 0) setHidden(node, true);\n hiddenNodes.add(node);\n $5e3802645cc19319$var$refCountMap.set(node, refCount + 1);\n };\n // If there is already a MutationObserver listening from a previous call,\n // disconnect it so the new on takes over.\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].disconnect();\n walk(root);\n let observer = new MutationObserver((changes)=>{\n for (let change of changes){\n if (change.type !== 'childList') continue;\n // If the parent element of the added nodes is not within one of the targets,\n // and not already inside a hidden node, hide all of the new children.\n if (![\n ...visibleNodes,\n ...hiddenNodes\n ].some((node)=>node.contains(change.target))) for (let node of change.addedNodes){\n if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);\n else if (node instanceof Element) walk(node);\n }\n }\n });\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n let observerWrapper = {\n visibleNodes: visibleNodes,\n hiddenNodes: hiddenNodes,\n observe () {\n observer.observe(root, {\n childList: true,\n subtree: true\n });\n },\n disconnect () {\n observer.disconnect();\n }\n };\n $5e3802645cc19319$var$observerStack.push(observerWrapper);\n return ()=>{\n observer.disconnect();\n for (let node of hiddenNodes){\n let count = $5e3802645cc19319$var$refCountMap.get(node);\n if (count == null) continue;\n if (count === 1) {\n setHidden(node, false);\n $5e3802645cc19319$var$refCountMap.delete(node);\n } else $5e3802645cc19319$var$refCountMap.set(node, count - 1);\n }\n // Remove this observer from the stack, and start the previous one.\n if (observerWrapper === $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1]) {\n $5e3802645cc19319$var$observerStack.pop();\n if ($5e3802645cc19319$var$observerStack.length) $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1].observe();\n } else $5e3802645cc19319$var$observerStack.splice($5e3802645cc19319$var$observerStack.indexOf(observerWrapper), 1);\n };\n}\nfunction $5e3802645cc19319$export$1020fa7f77e17884(element) {\n let observer = $5e3802645cc19319$var$observerStack[$5e3802645cc19319$var$observerStack.length - 1];\n if (observer && !observer.visibleNodes.has(element)) {\n observer.visibleNodes.add(element);\n return ()=>{\n observer.visibleNodes.delete(element);\n };\n }\n}\n\n\nexport {$5e3802645cc19319$export$1c3ebcada18427bf as ariaHideOutside, $5e3802645cc19319$export$1020fa7f77e17884 as keepVisible};\n//# sourceMappingURL=ariaHideOutside.module.js.map\n"],"names":["$5e3802645cc19319$var$supportsInert","$5e3802645cc19319$var$refCountMap","$5e3802645cc19319$var$observerStack","$5e3802645cc19319$export$1c3ebcada18427bf","targets","options","windowObj","$fF94N$getOwnerWindow","opts","_opts_root","root","shouldUseInert","visibleNodes","hiddenNodes","getHidden","element","setHidden","hidden","walk","acceptNode","node","target","walker","acceptRoot","hide","_refCountMap_get","refCount","observer","changes","change","observerWrapper","count"],"mappings":";AAaA,MAAMA,IAAsC,OAAO,cAAgB,OAAe,WAAW,YAAY;AAGzG,IAAIC,IAAoC,oBAAI,WACxCC,IAAsC,CAAA;AAC1C,SAASC,EAA0CC,GAASC,GAAS;AACjE,MAAIC,IAAgBC,EAAuBH,KAAY,OAA6B,SAASA,EAAQ,CAAC,CAAC,GACnGI,IAAOH,aAAmBC,EAAU,UAAU;AAAA,IAC9C,MAAMD;AAAA,EACT,IAAGA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rBnB,EAAkC,OAAOmB,CAAI,KAC1CnB,EAAkC,IAAImB,GAAMW,IAAQ,CAAC;AAAA,IAC/D;AAED,IAAID,MAAoB5B,EAAoCA,EAAoC,SAAS,CAAC,KACtGA,EAAoC,IAAG,GACnCA,EAAoC,UAAQA,EAAoCA,EAAoC,SAAS,CAAC,EAAE,aACjIA,EAAoC,OAAOA,EAAoC,QAAQ4B,CAAe,GAAG,CAAC;AAAA,EACzH;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useModalOverlay.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useModalOverlay.mjs"],"sourcesContent":["import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from \"./ariaHideOutside.mjs\";\nimport {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from \"./useOverlay.mjs\";\nimport {useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from \"./Overlay.mjs\";\nimport {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from \"./usePreventScroll.mjs\";\nimport {mergeProps as $7Dhkr$mergeProps} from \"@react-aria/utils\";\nimport {useEffect as $7Dhkr$useEffect} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {\n let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $a11501f3d1d39e6c$export$ea8f71083e90600f)({\n ...props,\n isOpen: state.isOpen,\n onClose: state.close\n }, ref);\n (0, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({\n isDisabled: !state.isOpen\n });\n (0, $337b884510726a0d$export$14c98a7594375490)();\n (0, $7Dhkr$useEffect)(()=>{\n if (state.isOpen && ref.current) return (0, $5e3802645cc19319$export$1c3ebcada18427bf)([\n ref.current\n ], {\n shouldUseInert: true\n });\n }, [\n state.isOpen,\n ref\n ]);\n return {\n modalProps: (0, $7Dhkr$mergeProps)(overlayProps),\n underlayProps: underlayProps\n };\n}\n\n\nexport {$8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay};\n//# sourceMappingURL=useModalOverlay.module.js.map\n"],"names":["$8ac8429251c45e4b$export$dbc0f175b25fb0fb","props","state","ref","overlayProps","underlayProps","$a11501f3d1d39e6c$export$ea8f71083e90600f","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","$337b884510726a0d$export$14c98a7594375490","$7Dhkr$useEffect","$5e3802645cc19319$export$1c3ebcada18427bf","$7Dhkr$mergeProps"],"mappings":"oRAuBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,aAAcC,EAAc,cAAeC,CAAa,EAASC,aAA2C,CAC9G,GAAGL,EACH,OAAQC,EAAM,OACd,QAASA,EAAM,KACvB,EAAOC,CAAG,EACN,OAAII,mBAA2C,CAC3C,WAAY,CAACL,EAAM,MAC3B,CAAK,EACGM,yBAAyC,EACzCC,EAAAA,UAAkB,IAAI,CACtB,GAAIP,EAAM,QAAUC,EAAI,QAAS,OAAWO,EAAAA,gBAA2C,CACnFP,EAAI,OAChB,EAAW,CACC,eAAgB,EAC5B,CAAS,CACL,EAAG,CACCD,EAAM,OACNC,CACR,CAAK,EACM,CACH,WAAgBQ,EAAAA,WAAmBP,CAAY,EAC/C,cAAeC,CACvB,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useModalOverlay.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useModalOverlay.mjs"],"sourcesContent":["import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from \"./ariaHideOutside.mjs\";\nimport {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from \"./useOverlay.mjs\";\nimport {useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from \"./Overlay.mjs\";\nimport {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from \"./usePreventScroll.mjs\";\nimport {mergeProps as $7Dhkr$mergeProps} from \"@react-aria/utils\";\nimport {useEffect as $7Dhkr$useEffect} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {\n let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $a11501f3d1d39e6c$export$ea8f71083e90600f)({\n ...props,\n isOpen: state.isOpen,\n onClose: state.close\n }, ref);\n (0, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({\n isDisabled: !state.isOpen\n });\n (0, $337b884510726a0d$export$14c98a7594375490)();\n (0, $7Dhkr$useEffect)(()=>{\n if (state.isOpen && ref.current) return (0, $5e3802645cc19319$export$1c3ebcada18427bf)([\n ref.current\n ], {\n shouldUseInert: true\n });\n }, [\n state.isOpen,\n ref\n ]);\n return {\n modalProps: (0, $7Dhkr$mergeProps)(overlayProps),\n underlayProps: underlayProps\n };\n}\n\n\nexport {$8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay};\n//# sourceMappingURL=useModalOverlay.module.js.map\n"],"names":["$8ac8429251c45e4b$export$dbc0f175b25fb0fb","props","state","ref","overlayProps","underlayProps","$a11501f3d1d39e6c$export$ea8f71083e90600f","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","$337b884510726a0d$export$14c98a7594375490","$7Dhkr$useEffect","$5e3802645cc19319$export$1c3ebcada18427bf","$7Dhkr$mergeProps"],"mappings":"oRAuBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,aAAcC,EAAc,cAAeC,CAAa,EAASC,aAA2C,CAC9G,GAAGL,EACH,OAAQC,EAAM,OACd,QAASA,EAAM,KAClB,EAAEC,CAAG,EACN,OAAII,mBAA2C,CAC3C,WAAY,CAACL,EAAM,MAC3B,CAAK,EACGM,EAAyC,uBAAA,EACzCC,EAAgB,UAAE,IAAI,CACtB,GAAIP,EAAM,QAAUC,EAAI,QAAS,OAAWO,EAAAA,gBAA2C,CACnFP,EAAI,OAChB,EAAW,CACC,eAAgB,EAC5B,CAAS,CACT,EAAO,CACCD,EAAM,OACNC,CACR,CAAK,EACM,CACH,WAAgBQ,EAAiB,WAAEP,CAAY,EAC/C,cAAeC,CACvB,CACA","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useModalOverlay.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useModalOverlay.mjs"],"sourcesContent":["import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from \"./ariaHideOutside.mjs\";\nimport {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from \"./useOverlay.mjs\";\nimport {useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from \"./Overlay.mjs\";\nimport {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from \"./usePreventScroll.mjs\";\nimport {mergeProps as $7Dhkr$mergeProps} from \"@react-aria/utils\";\nimport {useEffect as $7Dhkr$useEffect} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {\n let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $a11501f3d1d39e6c$export$ea8f71083e90600f)({\n ...props,\n isOpen: state.isOpen,\n onClose: state.close\n }, ref);\n (0, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({\n isDisabled: !state.isOpen\n });\n (0, $337b884510726a0d$export$14c98a7594375490)();\n (0, $7Dhkr$useEffect)(()=>{\n if (state.isOpen && ref.current) return (0, $5e3802645cc19319$export$1c3ebcada18427bf)([\n ref.current\n ], {\n shouldUseInert: true\n });\n }, [\n state.isOpen,\n ref\n ]);\n return {\n modalProps: (0, $7Dhkr$mergeProps)(overlayProps),\n underlayProps: underlayProps\n };\n}\n\n\nexport {$8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay};\n//# sourceMappingURL=useModalOverlay.module.js.map\n"],"names":["$8ac8429251c45e4b$export$dbc0f175b25fb0fb","props","state","ref","overlayProps","underlayProps","$a11501f3d1d39e6c$export$ea8f71083e90600f","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","$337b884510726a0d$export$14c98a7594375490","$7Dhkr$useEffect","$5e3802645cc19319$export$1c3ebcada18427bf","$7Dhkr$mergeProps"],"mappings":";;;;;;AAuBA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,cAAcC,GAAc,eAAeC,EAAa,IAASC,EAA2C;AAAA,IAC9G,GAAGL;AAAA,IACH,QAAQC,EAAM;AAAA,IACd,SAASA,EAAM;AAAA,EACvB,GAAOC,CAAG;AACN,SAAII,EAA2C;AAAA,IAC3C,YAAY,CAACL,EAAM;AAAA,EAC3B,CAAK,GACGM,EAAyC,GACzCC,EAAkB,MAAI;AACtB,QAAIP,EAAM,UAAUC,EAAI,QAAS,QAAWO,EAA2C;AAAA,MACnFP,EAAI;AAAA,IAChB,GAAW;AAAA,MACC,gBAAgB;AAAA,IAC5B,CAAS;AAAA,EACL,GAAG;AAAA,IACCD,EAAM;AAAA,IACNC;AAAA,EACR,CAAK,GACM;AAAA,IACH,YAAgBQ,EAAmBP,CAAY;AAAA,IAC/C,eAAeC;AAAA,EACvB;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useModalOverlay.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useModalOverlay.mjs"],"sourcesContent":["import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from \"./ariaHideOutside.mjs\";\nimport {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from \"./useOverlay.mjs\";\nimport {useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from \"./Overlay.mjs\";\nimport {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from \"./usePreventScroll.mjs\";\nimport {mergeProps as $7Dhkr$mergeProps} from \"@react-aria/utils\";\nimport {useEffect as $7Dhkr$useEffect} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {\n let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $a11501f3d1d39e6c$export$ea8f71083e90600f)({\n ...props,\n isOpen: state.isOpen,\n onClose: state.close\n }, ref);\n (0, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({\n isDisabled: !state.isOpen\n });\n (0, $337b884510726a0d$export$14c98a7594375490)();\n (0, $7Dhkr$useEffect)(()=>{\n if (state.isOpen && ref.current) return (0, $5e3802645cc19319$export$1c3ebcada18427bf)([\n ref.current\n ], {\n shouldUseInert: true\n });\n }, [\n state.isOpen,\n ref\n ]);\n return {\n modalProps: (0, $7Dhkr$mergeProps)(overlayProps),\n underlayProps: underlayProps\n };\n}\n\n\nexport {$8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay};\n//# sourceMappingURL=useModalOverlay.module.js.map\n"],"names":["$8ac8429251c45e4b$export$dbc0f175b25fb0fb","props","state","ref","overlayProps","underlayProps","$a11501f3d1d39e6c$export$ea8f71083e90600f","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","$337b884510726a0d$export$14c98a7594375490","$7Dhkr$useEffect","$5e3802645cc19319$export$1c3ebcada18427bf","$7Dhkr$mergeProps"],"mappings":";;;;;;AAuBA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,cAAcC,GAAc,eAAeC,EAAa,IAASC,EAA2C;AAAA,IAC9G,GAAGL;AAAA,IACH,QAAQC,EAAM;AAAA,IACd,SAASA,EAAM;AAAA,EAClB,GAAEC,CAAG;AACN,SAAII,EAA2C;AAAA,IAC3C,YAAY,CAACL,EAAM;AAAA,EAC3B,CAAK,GACGM,EAAyC,GACzCC,EAAkB,MAAI;AACtB,QAAIP,EAAM,UAAUC,EAAI,QAAS,QAAWO,EAA2C;AAAA,MACnFP,EAAI;AAAA,IAChB,GAAW;AAAA,MACC,gBAAgB;AAAA,IAC5B,CAAS;AAAA,EACT,GAAO;AAAA,IACCD,EAAM;AAAA,IACNC;AAAA,EACR,CAAK,GACM;AAAA,IACH,YAAgBQ,EAAmBP,CAAY;AAAA,IAC/C,eAAeC;AAAA,EACvB;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlay.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useOverlay.mjs"],"sourcesContent":["import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from \"@react-aria/focus\";\nimport {useEffect as $jtpZv$useEffect} from \"react\";\nimport {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $a11501f3d1d39e6c$var$visibleOverlays = [];\nfunction $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {\n let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;\n // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.\n (0, $jtpZv$useEffect)(()=>{\n if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {\n $a11501f3d1d39e6c$var$visibleOverlays.push(ref);\n return ()=>{\n let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);\n if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);\n };\n }\n }, [\n isOpen,\n ref\n ]);\n // Only hide the overlay when it is the topmost visible overlay in the stack\n let onHide = ()=>{\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();\n };\n let onInteractOutsideStart = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n };\n let onInteractOutside = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n onHide();\n }\n };\n // Handle the escape key\n let onKeyDown = (e)=>{\n if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {\n e.stopPropagation();\n e.preventDefault();\n onHide();\n }\n };\n // Handle clicking outside the overlay to close it\n (0, $jtpZv$useInteractOutside)({\n ref: ref,\n onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,\n onInteractOutsideStart: onInteractOutsideStart\n });\n let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({\n isDisabled: !shouldCloseOnBlur,\n onBlurWithin: (e)=>{\n // Do not close if relatedTarget is null, which means focus is lost to the body.\n // That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.\n // Clicking on the body to close the overlay should already be handled by useInteractOutside.\n // https://github.com/adobe/react-spectrum/issues/4130\n // https://github.com/adobe/react-spectrum/issues/4922\n //\n // If focus is moving into a child focus scope (e.g. menu inside a dialog),\n // do not close the outer overlay. At this point, the active scope should\n // still be the outer overlay, since blur events run before focus.\n if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();\n }\n });\n let onPointerDownUnderlay = (e)=>{\n // fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846\n if (e.target === e.currentTarget) e.preventDefault();\n };\n return {\n overlayProps: {\n onKeyDown: onKeyDown,\n ...focusWithinProps\n },\n underlayProps: {\n onPointerDown: onPointerDownUnderlay\n }\n };\n}\n\n\nexport {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};\n//# sourceMappingURL=useOverlay.module.js.map\n"],"names":["$a11501f3d1d39e6c$var$visibleOverlays","$a11501f3d1d39e6c$export$ea8f71083e90600f","props","ref","onClose","shouldCloseOnBlur","isOpen","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","$jtpZv$useEffect","index","onHide","onInteractOutsideStart","onInteractOutside","onKeyDown","$jtpZv$useInteractOutside","focusWithinProps","$jtpZv$useFocusWithin","$jtpZv$isElementInChildOfActiveScope","onPointerDownUnderlay"],"mappings":"mRAiBMA,EAAwC,CAAA,EAC9C,SAASC,EAA0CC,EAAOC,EAAK,CAC3D,GAAI,CAAE,QAASC,EAAS,kBAAmBC,EAAmB,OAAQC,EAAQ,cAAeC,EAAgB,GAAO,0BAA2BC,EAA4B,GAAO,6BAA8BC,CAA4B,EAAKP,EAE7OQ,EAAAA,UAAkB,IAAI,CACtB,GAAIJ,GAAU,CAACN,EAAsC,SAASG,CAAG,EAC7D,OAAAH,EAAsC,KAAKG,CAAG,EACvC,IAAI,CACP,IAAIQ,EAAQX,EAAsC,QAAQG,CAAG,EACzDQ,GAAS,GAAGX,EAAsC,OAAOW,EAAO,CAAC,CACzE,CAER,EAAG,CACCL,EACAH,CACR,CAAK,EAED,IAAIS,EAAS,IAAI,CACTZ,EAAsCA,EAAsC,OAAS,CAAC,IAAMG,GAAOC,GAASA,EAAO,CAC3H,EACIS,EAA0B,GAAI,EAC1B,CAACJ,GAAgCA,EAA6B,EAAE,MAAM,IAClET,EAAsCA,EAAsC,OAAS,CAAC,IAAMG,IAC5F,EAAE,gBAAe,EACjB,EAAE,eAAc,EAG5B,EACIW,EAAqB,GAAI,EACrB,CAACL,GAAgCA,EAA6B,EAAE,MAAM,KAClET,EAAsCA,EAAsC,OAAS,CAAC,IAAMG,IAC5F,EAAE,gBAAe,EACjB,EAAE,eAAc,GAEpBS,EAAM,EAEd,EAEIG,EAAa,GAAI,CACb,EAAE,MAAQ,UAAY,CAACP,GAA6B,CAAC,EAAE,YAAY,cACnE,EAAE,gBAAe,EACjB,EAAE,eAAc,EAChBI,EAAM,EAEd,EAEII,qBAA2B,CAC3B,IAAKb,EACL,kBAAmBI,GAAiBD,EAASQ,EAAoB,OACjE,uBAAwBD,CAChC,CAAK,EACD,GAAI,CAAE,iBAAkBI,CAAgB,EAASC,EAAAA,eAAuB,CACpE,WAAY,CAACb,EACb,aAAe,GAAI,CAUX,CAAC,EAAE,eAAqBc,EAAAA,8BAAsC,EAAE,aAAa,IAC7E,CAACV,GAAgCA,EAA6B,EAAE,aAAa,KAAGL,GAAY,MAAsCA,EAAO,EACjJ,CACR,CAAK,EACGgB,EAAyB,GAAI,CAEzB,EAAE,SAAW,EAAE,eAAe,EAAE,eAAc,CACtD,EACA,MAAO,CACH,aAAc,CACV,UAAWL,EACX,GAAGE,CACf,EACQ,cAAe,CACX,cAAeG,CAC3B,CACA,CACA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useOverlay.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useOverlay.mjs"],"sourcesContent":["import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from \"@react-aria/focus\";\nimport {useEffect as $jtpZv$useEffect} from \"react\";\nimport {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $a11501f3d1d39e6c$var$visibleOverlays = [];\nfunction $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {\n let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;\n // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.\n (0, $jtpZv$useEffect)(()=>{\n if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {\n $a11501f3d1d39e6c$var$visibleOverlays.push(ref);\n return ()=>{\n let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);\n if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);\n };\n }\n }, [\n isOpen,\n ref\n ]);\n // Only hide the overlay when it is the topmost visible overlay in the stack\n let onHide = ()=>{\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();\n };\n let onInteractOutsideStart = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n };\n let onInteractOutside = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n onHide();\n }\n };\n // Handle the escape key\n let onKeyDown = (e)=>{\n if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {\n e.stopPropagation();\n e.preventDefault();\n onHide();\n }\n };\n // Handle clicking outside the overlay to close it\n (0, $jtpZv$useInteractOutside)({\n ref: ref,\n onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,\n onInteractOutsideStart: onInteractOutsideStart\n });\n let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({\n isDisabled: !shouldCloseOnBlur,\n onBlurWithin: (e)=>{\n // Do not close if relatedTarget is null, which means focus is lost to the body.\n // That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.\n // Clicking on the body to close the overlay should already be handled by useInteractOutside.\n // https://github.com/adobe/react-spectrum/issues/4130\n // https://github.com/adobe/react-spectrum/issues/4922\n //\n // If focus is moving into a child focus scope (e.g. menu inside a dialog),\n // do not close the outer overlay. At this point, the active scope should\n // still be the outer overlay, since blur events run before focus.\n if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();\n }\n });\n let onPointerDownUnderlay = (e)=>{\n // fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846\n if (e.target === e.currentTarget) e.preventDefault();\n };\n return {\n overlayProps: {\n onKeyDown: onKeyDown,\n ...focusWithinProps\n },\n underlayProps: {\n onPointerDown: onPointerDownUnderlay\n }\n };\n}\n\n\nexport {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};\n//# sourceMappingURL=useOverlay.module.js.map\n"],"names":["$a11501f3d1d39e6c$var$visibleOverlays","$a11501f3d1d39e6c$export$ea8f71083e90600f","props","ref","onClose","shouldCloseOnBlur","isOpen","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","$jtpZv$useEffect","index","onHide","onInteractOutsideStart","onInteractOutside","onKeyDown","$jtpZv$useInteractOutside","focusWithinProps","$jtpZv$useFocusWithin","$jtpZv$isElementInChildOfActiveScope","onPointerDownUnderlay"],"mappings":"mRAiBMA,EAAwC,CAAA,EAC9C,SAASC,E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T,CAAK,EACGgB,EAAyB,GAAI,CAEzB,EAAE,SAAW,EAAE,eAAe,EAAE,gBAC5C,EACI,MAAO,CACH,aAAc,CACV,UAAWL,EACX,GAAGE,CACN,EACD,cAAe,CACX,cAAeG,CAClB,CACT,CACA","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlay.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useOverlay.mjs"],"sourcesContent":["import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from \"@react-aria/focus\";\nimport {useEffect as $jtpZv$useEffect} from \"react\";\nimport {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $a11501f3d1d39e6c$var$visibleOverlays = [];\nfunction $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {\n let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;\n // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.\n (0, $jtpZv$useEffect)(()=>{\n if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {\n $a11501f3d1d39e6c$var$visibleOverlays.push(ref);\n return ()=>{\n let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);\n if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);\n };\n }\n }, [\n isOpen,\n ref\n ]);\n // Only hide the overlay when it is the topmost visible overlay in the stack\n let onHide = ()=>{\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();\n };\n let onInteractOutsideStart = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n };\n let onInteractOutside = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n onHide();\n }\n };\n // Handle the escape key\n let onKeyDown = (e)=>{\n if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {\n e.stopPropagation();\n e.preventDefault();\n onHide();\n }\n };\n // Handle clicking outside the overlay to close it\n (0, $jtpZv$useInteractOutside)({\n ref: ref,\n onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,\n onInteractOutsideStart: onInteractOutsideStart\n });\n let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({\n isDisabled: !shouldCloseOnBlur,\n onBlurWithin: (e)=>{\n // Do not close if relatedTarget is null, which means focus is lost to the body.\n // That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.\n // Clicking on the body to close the overlay should already be handled by useInteractOutside.\n // https://github.com/adobe/react-spectrum/issues/4130\n // https://github.com/adobe/react-spectrum/issues/4922\n //\n // If focus is moving into a child focus scope (e.g. menu inside a dialog),\n // do not close the outer overlay. At this point, the active scope should\n // still be the outer overlay, since blur events run before focus.\n if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();\n }\n });\n let onPointerDownUnderlay = (e)=>{\n // fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846\n if (e.target === e.currentTarget) e.preventDefault();\n };\n return {\n overlayProps: {\n onKeyDown: onKeyDown,\n ...focusWithinProps\n },\n underlayProps: {\n onPointerDown: onPointerDownUnderlay\n }\n };\n}\n\n\nexport {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};\n//# sourceMappingURL=useOverlay.module.js.map\n"],"names":["$a11501f3d1d39e6c$var$visibleOverlays","$a11501f3d1d39e6c$export$ea8f71083e90600f","props","ref","onClose","shouldCloseOnBlur","isOpen","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","$jtpZv$useEffect","index","onHide","onInteractOutsideStart","onInteractOutside","onKeyDown","$jtpZv$useInteractOutside","focusWithinProps","$jtpZv$useFocusWithin","$jtpZv$isElementInChildOfActiveScope","onPointerDownUnderlay"],"mappings":";;;;AAiBA,MAAMA,IAAwC,CAAA;AAC9C,SAASC,EAA0CC,GAAOC,GAAK;AAC3D,MAAI,EAAE,SAASC,GAAS,mBAAmBC,GAAmB,QAAQC,GAAQ,eAAeC,IAAgB,IAAO,2BAA2BC,IAA4B,IAAO,8BAA8BC,EAA4B,IAAKP;AAEjP,EAAIQ,EAAkB,MAAI;AACtB,QAAIJ,KAAU,CAACN,EAAsC,SAASG,CAAG;AAC7D,aAAAH,EAAsC,KAAKG,CAAG,GACvC,MAAI;AACP,YAAIQ,IAAQX,EAAsC,QAAQG,CAAG;AAC7D,QAAIQ,KAAS,KAAGX,EAAsC,OAAOW,GAAO,CAAC;AAAA,MACzE;AAAA,EAER,GAAG;AAAA,IACCL;AAAA,IACAH;AAAA,EACR,CAAK;AAED,MAAIS,IAAS,MAAI;AACb,IAAIZ,EAAsCA,EAAsC,SAAS,CAAC,MAAMG,KAAOC,KAASA,EAAO;AAAA,EAC3H,GACIS,IAAyB,CAAC,MAAI;AAC9B,KAAI,CAACJ,KAAgCA,EAA6B,EAAE,MAAM,MAClET,EAAsCA,EAAsC,SAAS,CAAC,MAAMG,MAC5F,EAAE,gBAAe,GACjB,EAAE,eAAc;AAAA,EAG5B,GACIW,IAAoB,CAAC,MAAI;AACzB,KAAI,CAACL,KAAgCA,EAA6B,EAAE,MAAM,OAClET,EAAsCA,EAAsC,SAAS,CAAC,MAAMG,MAC5F,EAAE,gBAAe,GACjB,EAAE,eAAc,IAEpBS,EAAM;AAAA,EAEd,GAEIG,IAAY,CAAC,MAAI;AACjB,IAAI,EAAE,QAAQ,YAAY,CAACP,KAA6B,CAAC,EAAE,YAAY,gBACnE,EAAE,gBAAe,GACjB,EAAE,eAAc,GAChBI,EAAM;AAAA,EAEd;AAEA,EAAII,EAA2B;AAAA,IAC3B,KAAKb;AAAA,IACL,mBAAmBI,KAAiBD,IAASQ,IAAoB;AAAA,IACjE,wBAAwBD;AAAA,EAChC,CAAK;AACD,MAAI,EAAE,kBAAkBI,EAAgB,IAASC,EAAuB;AAAA,IACpE,YAAY,CAACb;AAAA,IACb,cAAc,CAAC,MAAI;AAUf,MAAI,CAAC,EAAE,iBAAqBc,EAAsC,EAAE,aAAa,MAC7E,CAACV,KAAgCA,EAA6B,EAAE,aAAa,OAAGL,KAAY,QAAsCA,EAAO;AAAA,IACjJ;AAAA,EACR,CAAK,GACGgB,IAAwB,CAAC,MAAI;AAE7B,IAAI,EAAE,WAAW,EAAE,iBAAe,EAAE,eAAc;AAAA,EACtD;AACA,SAAO;AAAA,IACH,cAAc;AAAA,MACV,WAAWL;AAAA,MACX,GAAGE;AAAA,IACf;AAAA,IACQ,eAAe;AAAA,MACX,eAAeG;AAAA,IAC3B;AAAA,EACA;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useOverlay.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/useOverlay.mjs"],"sourcesContent":["import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from \"@react-aria/focus\";\nimport {useEffect as $jtpZv$useEffect} from \"react\";\nimport {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $a11501f3d1d39e6c$var$visibleOverlays = [];\nfunction $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {\n let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;\n // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.\n (0, $jtpZv$useEffect)(()=>{\n if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {\n $a11501f3d1d39e6c$var$visibleOverlays.push(ref);\n return ()=>{\n let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);\n if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);\n };\n }\n }, [\n isOpen,\n ref\n ]);\n // Only hide the overlay when it is the topmost visible overlay in the stack\n let onHide = ()=>{\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();\n };\n let onInteractOutsideStart = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n };\n let onInteractOutside = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n onHide();\n }\n };\n // Handle the escape key\n let onKeyDown = (e)=>{\n if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {\n e.stopPropagation();\n e.preventDefault();\n onHide();\n }\n };\n // Handle clicking outside the overlay to close it\n (0, $jtpZv$useInteractOutside)({\n ref: ref,\n onInteractOutside: isDismissable && isOpen ? onInteractOutside : undefined,\n onInteractOutsideStart: onInteractOutsideStart\n });\n let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({\n isDisabled: !shouldCloseOnBlur,\n onBlurWithin: (e)=>{\n // Do not close if relatedTarget is null, which means focus is lost to the body.\n // That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.\n // Clicking on the body to close the overlay should already be handled by useInteractOutside.\n // https://github.com/adobe/react-spectrum/issues/4130\n // https://github.com/adobe/react-spectrum/issues/4922\n //\n // If focus is moving into a child focus scope (e.g. menu inside a dialog),\n // do not close the outer overlay. At this point, the active scope should\n // still be the outer overlay, since blur events run before focus.\n if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose === null || onClose === void 0 ? void 0 : onClose();\n }\n });\n let onPointerDownUnderlay = (e)=>{\n // fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846\n if (e.target === e.currentTarget) e.preventDefault();\n };\n return {\n overlayProps: {\n onKeyDown: onKeyDown,\n ...focusWithinProps\n },\n underlayProps: {\n onPointerDown: onPointerDownUnderlay\n }\n };\n}\n\n\nexport {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};\n//# sourceMappingURL=useOverlay.module.js.map\n"],"names":["$a11501f3d1d39e6c$var$visibleOverlays","$a11501f3d1d39e6c$export$ea8f71083e90600f","props","ref","onClose","shouldCloseOnBlur","isOpen","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","$jtpZv$useEffect","index","onHide","onInteractOutsideStart","onInteractOutside","onKeyDown","$jtpZv$useInteractOutside","focusWithinProps","$jtpZv$useFocusWithin","$jtpZv$isElementInChildOfActiveScope","onPointerDownUnderlay"],"mappings":";;;;AAiBA,MAAMA,IAAwC,CAAA;AAC9C,SAASC,EAA0CC,GAAOC,GAAK;AAC3D,MAAI,EAAE,SAASC,GAAS,mBAAmBC,GAAmB,QAAQC,GAAQ,eAAeC,IAAgB,IAAO,2BAA2BC,IAA4B,IAAO,8BAA8BC,EAA8B,IAAGP;AAEjP,EAAIQ,EAAkB,MAAI;AACtB,QAAIJ,KAAU,CAACN,EAAsC,SAASG,CAAG;AAC7D,aAAAH,EAAsC,KAAKG,CAAG,GACvC,MAAI;AACP,YAAIQ,IAAQX,EAAsC,QAAQG,CAAG;AAC7D,QAAIQ,KAAS,KAAGX,EAAsC,OAAOW,GAAO,CAAC;AAAA,MACrF;AAAA,EAEA,GAAO;AAAA,IACCL;AAAA,IACAH;AAAA,EACR,CAAK;AAED,MAAIS,IAAS,MAAI;AACb,IAAIZ,EAAsCA,EAAsC,SAAS,CAAC,MAAMG,KAAOC,KAASA;EACxH,GACQS,IAAyB,CAAC,MAAI;AAC9B,KAAI,CAACJ,KAAgCA,EAA6B,EAAE,MAAM,MAClET,EAAsCA,EAAsC,SAAS,CAAC,MAAMG,MAC5F,EAAE,gBAAe,GACjB,EAAE,eAAc;AAAA,EAGhC,GACQW,IAAoB,CAAC,MAAI;AACzB,KAAI,CAACL,KAAgCA,EAA6B,EAAE,MAAM,OAClET,EAAsCA,EAAsC,SAAS,CAAC,MAAMG,MAC5F,EAAE,gBAAe,GACjB,EAAE,eAAc,IAEpBS;EAEZ,GAEQG,IAAY,CAAC,MAAI;AACjB,IAAI,EAAE,QAAQ,YAAY,CAACP,KAA6B,CAAC,EAAE,YAAY,gBACnE,EAAE,gBAAe,GACjB,EAAE,eAAc,GAChBI;EAEZ;AAEI,EAAII,EAA2B;AAAA,IAC3B,KAAKb;AAAA,IACL,mBAAmBI,KAAiBD,IAASQ,IAAoB;AAAA,IACjE,wBAAwBD;AAAA,EAChC,CAAK;AACD,MAAI,EAAE,kBAAkBI,EAAkB,IAAOC,EAAuB;AAAA,IACpE,YAAY,CAACb;AAAA,IACb,cAAc,CAAC,MAAI;AAUf,MAAI,CAAC,EAAE,iBAAqBc,EAAsC,EAAE,aAAa,MAC7E,CAACV,KAAgCA,EAA6B,EAAE,aAAa,OAAGL,KAAY,QAAsCA,EAAO;AAAA,IAChJ;AAAA,EACT,CAAK,GACGgB,IAAwB,CAAC,MAAI;AAE7B,IAAI,EAAE,WAAW,EAAE,iBAAe,EAAE;EAC5C;AACI,SAAO;AAAA,IACH,cAAc;AAAA,MACV,WAAWL;AAAA,MACX,GAAGE;AAAA,IACN;AAAA,IACD,eAAe;AAAA,MACX,eAAeG;AAAA,IAClB;AAAA,EACT;AACA;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"usePreventScroll.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs"],"sourcesContent":["import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\n// HTML input types that do not cause the software keyboard to appear.\nconst $49c51c25361d4cd2$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet $49c51c25361d4cd2$var$preventScrollCount = 0;\nlet $49c51c25361d4cd2$var$restore;\nfunction $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {\n let { isDisabled: isDisabled } = options;\n (0, $7mMvr$useLayoutEffect)(()=>{\n if (isDisabled) return;\n $49c51c25361d4cd2$var$preventScrollCount++;\n if ($49c51c25361d4cd2$var$preventScrollCount === 1) {\n if ((0, $7mMvr$isIOS)()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();\n else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();\n }\n return ()=>{\n $49c51c25361d4cd2$var$preventScrollCount--;\n if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();\n };\n }, [\n isDisabled\n ]);\n}\n// For most browsers, all we need to do is set `overflow: hidden` on the root element, and\n// add some padding to prevent the page from shifting when the scrollbar is hidden.\nfunction $49c51c25361d4cd2$var$preventScrollStandard() {\n let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n return (0, $7mMvr$chain)(scrollbarWidth > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.\n ('scrollbarGutter' in document.documentElement.style ? $49c51c25361d4cd2$var$setStyle(document.documentElement, 'scrollbarGutter', 'stable') : $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${scrollbarWidth}px`)), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'));\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at\n// the top or bottom. Work around a bug where this does not work when the element does not actually overflow\n// by preventing default in a `touchmove` event.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction $49c51c25361d4cd2$var$preventScrollMobileSafari() {\n let scrollable;\n let restoreScrollableStyles;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = (0, $7mMvr$getScrollParent)(e.target, true);\n if (scrollable === document.documentElement && scrollable === document.body) return;\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead.\n if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === 'auto') restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, 'overscrollBehavior', 'contain');\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // overscroll-behavior should prevent scroll chaining, but currently does not\n // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452\n // This checks that both the width and height do not overflow, otherwise we might\n // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to\n // the element will prevent vertical page scrolling. We can't add that automatically\n // because it must be set before the touchstart event.\n if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();\n };\n let onTouchEnd = ()=>{\n if (restoreScrollableStyles) restoreScrollableStyles();\n };\n let onFocus = (e)=>{\n let target = e.target;\n if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {\n setupStyles();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view.\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if ($49c51c25361d4cd2$var$visualViewport) {\n if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n $49c51c25361d4cd2$var$scrollIntoView(target);\n });\n else // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n $49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target), {\n once: true\n });\n }\n });\n }\n };\n let restoreStyles = null;\n let setupStyles = ()=>{\n if (restoreStyles) return;\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`), ()=>{\n window.scrollTo(scrollX, scrollY);\n });\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n };\n let removeEvents = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();\n restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();\n removeEvents();\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction $49c51c25361d4cd2$var$setStyle(element, style, value) {\n let cur = element.style[style];\n element.style[style] = value;\n return ()=>{\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {\n // internal function, so it's ok to ignore the difficult to fix type error\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction $49c51c25361d4cd2$var$scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n let nextTarget = target;\n while(nextTarget && nextTarget !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = (0, $7mMvr$getScrollParent)(nextTarget);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = nextTarget.getBoundingClientRect().top;\n if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;\n }\n nextTarget = scrollable.parentElement;\n }\n}\nfunction $49c51c25361d4cd2$var$willOpenKeyboard(target) {\n return target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n\nexport {$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll};\n//# sourceMappingURL=usePreventScroll.module.js.map\n"],"names":["$49c51c25361d4cd2$var$visualViewport","$49c51c25361d4cd2$var$nonTextInputTypes","$49c51c25361d4cd2$var$preventScrollCount","$49c51c25361d4cd2$var$restore","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","options","isDisabled","$7mMvr$useLayoutEffect","$7mMvr$isIOS","$49c51c25361d4cd2$var$preventScrollMobileSafari","$49c51c25361d4cd2$var$preventScrollStandard","scrollbarWidth","$7mMvr$chain","$49c51c25361d4cd2$var$setStyle","scrollable","restoreScrollableStyles","onTouchStart","e","$7mMvr$getScrollParent","onTouchMove","onTouchEnd","onFocus","target","$49c51c25361d4cd2$var$willOpenKeyboard","setupStyles","$49c51c25361d4cd2$var$scrollIntoView","restoreStyles","onWindowScroll","scrollX","scrollY","$49c51c25361d4cd2$var$addEvent","removeEvents","element","style","value","cur","event","handler","root","nextTarget","scrollableTop","targetTop"],"mappings":"qHAaMA,EAAuC,OAAO,SAAa,KAAe,OAAO,eAEjFC,EAA0C,IAAI,IAAI,CACpD,WACA,QACA,QACA,QACA,OACA,QACA,SACA,SACA,OACJ,CAAC,EAED,IAAIC,EAA2C,EAC3CC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,EAAIE,CAC3B,CACJ,CAEA,SAASL,EAA+BR,EAAQc,EAAOC,EAAShC,EAAS,CAGrE,OAAAiB,EAAO,iBAAiBc,EAAOC,EAAShC,CAAO,EACxC,IAAI,CAEPiB,EAAO,oBAAoBc,EAAOC,EAAShC,CAAO,CACtD,CACJ,CACA,SAASoB,EAAqCH,EAAQ,CAClD,IAAIgB,EAAO,SAAS,kBAAoB,SAAS,gBAC7CC,EAAajB,EACjB,KAAMiB,GAAcA,IAAeD,GAAK,CAEpC,IAAIxB,EAAiBI,EAAAA,gBAAwBqB,CAAU,EACvD,GAAIzB,IAAe,SAAS,iBAAmBA,IAAe,SAAS,MAAQA,IAAeyB,EAAY,CACtG,IAAIC,EAAgB1B,EAAW,sBAAqB,EAAG,IACnD2B,EAAYF,EAAW,sBAAqB,EAAG,IAC/CE,EAAYD,EAAgBD,EAAW,eAAczB,EAAW,WAAa2B,EAAYD,EACjG,CACAD,EAAazB,EAAW,aAC5B,CACJ,CACA,SAASS,EAAuCD,EAAQ,CACpD,OAAOA,aAAkB,kBAAoB,CAACrB,EAAwC,IAAIqB,EAAO,IAAI,GAAKA,aAAkB,qBAAuBA,aAAkB,aAAeA,EAAO,iBAC/L","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"usePreventScroll.cjs.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs"],"sourcesContent":["import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\n// HTML input types that do not cause the software keyboard to appear.\nconst $49c51c25361d4cd2$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet $49c51c25361d4cd2$var$preventScrollCount = 0;\nlet $49c51c25361d4cd2$var$restore;\nfunction $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {\n let { isDisabled: isDisabled } = options;\n (0, $7mMvr$useLayoutEffect)(()=>{\n if (isDisabled) return;\n $49c51c25361d4cd2$var$preventScrollCount++;\n if ($49c51c25361d4cd2$var$preventScrollCount === 1) {\n if ((0, $7mMvr$isIOS)()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();\n else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();\n }\n return ()=>{\n $49c51c25361d4cd2$var$preventScrollCount--;\n if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();\n };\n }, [\n isDisabled\n ]);\n}\n// For most browsers, all we need to do is set `overflow: hidden` on the root element, and\n// add some padding to prevent the page from shifting when the scrollbar is hidden.\nfunction $49c51c25361d4cd2$var$preventScrollStandard() {\n let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n return (0, $7mMvr$chain)(scrollbarWidth > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.\n ('scrollbarGutter' in document.documentElement.style ? $49c51c25361d4cd2$var$setStyle(document.documentElement, 'scrollbarGutter', 'stable') : $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${scrollbarWidth}px`)), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'));\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at\n// the top or bottom. Work around a bug where this does not work when the element does not actually overflow\n// by preventing default in a `touchmove` event.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction $49c51c25361d4cd2$var$preventScrollMobileSafari() {\n let scrollable;\n let restoreScrollableStyles;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = (0, $7mMvr$getScrollParent)(e.target, true);\n if (scrollable === document.documentElement && scrollable === document.body) return;\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead.\n if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === 'auto') restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, 'overscrollBehavior', 'contain');\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // overscroll-behavior should prevent scroll chaining, but currently does not\n // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452\n // This checks that both the width and height do not overflow, otherwise we might\n // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to\n // the element will prevent vertical page scrolling. We can't add that automatically\n // because it must be set before the touchstart event.\n if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();\n };\n let onTouchEnd = ()=>{\n if (restoreScrollableStyles) restoreScrollableStyles();\n };\n let onFocus = (e)=>{\n let target = e.target;\n if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {\n setupStyles();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view.\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if ($49c51c25361d4cd2$var$visualViewport) {\n if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n $49c51c25361d4cd2$var$scrollIntoView(target);\n });\n else // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n $49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target), {\n once: true\n });\n }\n });\n }\n };\n let restoreStyles = null;\n let setupStyles = ()=>{\n if (restoreStyles) return;\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`), ()=>{\n window.scrollTo(scrollX, scrollY);\n });\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n };\n let removeEvents = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();\n restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();\n removeEvents();\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction $49c51c25361d4cd2$var$setStyle(element, style, value) {\n let cur = element.style[style];\n element.style[style] = value;\n return ()=>{\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {\n // internal function, so it's ok to ignore the difficult to fix type error\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction $49c51c25361d4cd2$var$scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n let nextTarget = target;\n while(nextTarget && nextTarget !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = (0, $7mMvr$getScrollParent)(nextTarget);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = nextTarget.getBoundingClientRect().top;\n if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;\n }\n nextTarget = scrollable.parentElement;\n }\n}\nfunction $49c51c25361d4cd2$var$willOpenKeyboard(target) {\n return target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n\nexport {$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll};\n//# sourceMappingURL=usePreventScroll.module.js.map\n"],"names":["$49c51c25361d4cd2$var$visualViewport","$49c51c25361d4cd2$var$nonTextInputTypes","$49c51c25361d4cd2$var$preventScrollCount","$49c51c25361d4cd2$var$restore","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","options","isDisabled","$7mMvr$useLayoutEffect","$7mMvr$isIOS","$49c51c25361d4cd2$var$preventScrollMobileSafari","$49c51c25361d4cd2$var$preventScrollStandard","scrollbarWidth","$7mMvr$chain","$49c51c25361d4cd2$var$setStyle","scrollable","restoreScrollableStyles","onTouchStart","e","$7mMvr$getScrollParent","onTouchMove","onTouchEnd","onFocus","target","$49c51c25361d4cd2$var$willOpenKeyboard","setupStyles","$49c51c25361d4cd2$var$scrollIntoView","restoreStyles","onWindowScroll","scrollX","scrollY","$49c51c25361d4cd2$var$addEvent","removeEvents","element","style","value","cur","event","handler","root","nextTarget","scrollableTop","targetTop"],"mappings":"qHAaMA,EAAuC,OAAO,SAAa,KAAe,OAAO,eAEjFC,EAA0C,IAAI,IAAI,CACpD,WACA,QACA,QACA,QACA,OACA,QACA,SACA,SACA,OACJ,CAAC,EAED,IAAIC,EAA2C,EAC3CC,EACJ,SAASC,EAA0CC,EAAU,GAAI,CAC7D,GAAI,CAAE,WA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,EAAOC,EAAShC,CAAO,EACxC,IAAI,CAEPiB,EAAO,oBAAoBc,EAAOC,EAAShC,CAAO,CAC1D,CACA,CACA,SAASoB,EAAqCH,EAAQ,CAClD,IAAIgB,EAAO,SAAS,kBAAoB,SAAS,gBAC7CC,EAAajB,EACjB,KAAMiB,GAAcA,IAAeD,GAAK,CAEpC,IAAIxB,EAAiBI,kBAAwBqB,CAAU,EACvD,GAAIzB,IAAe,SAAS,iBAAmBA,IAAe,SAAS,MAAQA,IAAeyB,EAAY,CACtG,IAAIC,EAAgB1B,EAAW,sBAAqB,EAAG,IACnD2B,EAAYF,EAAW,sBAAqB,EAAG,IAC/CE,EAAYD,EAAgBD,EAAW,eAAczB,EAAW,WAAa2B,EAAYD,EAChG,CACDD,EAAazB,EAAW,aAC3B,CACL,CACA,SAASS,EAAuCD,EAAQ,CACpD,OAAOA,aAAkB,kBAAoB,CAACrB,EAAwC,IAAIqB,EAAO,IAAI,GAAKA,aAAkB,qBAAuBA,aAAkB,aAAeA,EAAO,iBAC/L","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"usePreventScroll.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs"],"sourcesContent":["import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\n// HTML input types that do not cause the software keyboard to appear.\nconst $49c51c25361d4cd2$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet $49c51c25361d4cd2$var$preventScrollCount = 0;\nlet $49c51c25361d4cd2$var$restore;\nfunction $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {\n let { isDisabled: isDisabled } = options;\n (0, $7mMvr$useLayoutEffect)(()=>{\n if (isDisabled) return;\n $49c51c25361d4cd2$var$preventScrollCount++;\n if ($49c51c25361d4cd2$var$preventScrollCount === 1) {\n if ((0, $7mMvr$isIOS)()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();\n else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();\n }\n return ()=>{\n $49c51c25361d4cd2$var$preventScrollCount--;\n if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();\n };\n }, [\n isDisabled\n ]);\n}\n// For most browsers, all we need to do is set `overflow: hidden` on the root element, and\n// add some padding to prevent the page from shifting when the scrollbar is hidden.\nfunction $49c51c25361d4cd2$var$preventScrollStandard() {\n let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n return (0, $7mMvr$chain)(scrollbarWidth > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.\n ('scrollbarGutter' in document.documentElement.style ? $49c51c25361d4cd2$var$setStyle(document.documentElement, 'scrollbarGutter', 'stable') : $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${scrollbarWidth}px`)), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'));\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at\n// the top or bottom. Work around a bug where this does not work when the element does not actually overflow\n// by preventing default in a `touchmove` event.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction $49c51c25361d4cd2$var$preventScrollMobileSafari() {\n let scrollable;\n let restoreScrollableStyles;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = (0, $7mMvr$getScrollParent)(e.target, true);\n if (scrollable === document.documentElement && scrollable === document.body) return;\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead.\n if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === 'auto') restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, 'overscrollBehavior', 'contain');\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // overscroll-behavior should prevent scroll chaining, but currently does not\n // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452\n // This checks that both the width and height do not overflow, otherwise we might\n // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to\n // the element will prevent vertical page scrolling. We can't add that automatically\n // because it must be set before the touchstart event.\n if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();\n };\n let onTouchEnd = ()=>{\n if (restoreScrollableStyles) restoreScrollableStyles();\n };\n let onFocus = (e)=>{\n let target = e.target;\n if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {\n setupStyles();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view.\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if ($49c51c25361d4cd2$var$visualViewport) {\n if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n $49c51c25361d4cd2$var$scrollIntoView(target);\n });\n else // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n $49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target), {\n once: true\n });\n }\n });\n }\n };\n let restoreStyles = null;\n let setupStyles = ()=>{\n if (restoreStyles) return;\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`), ()=>{\n window.scrollTo(scrollX, scrollY);\n });\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n };\n let removeEvents = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();\n restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();\n removeEvents();\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction $49c51c25361d4cd2$var$setStyle(element, style, value) {\n let cur = element.style[style];\n element.style[style] = value;\n return ()=>{\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {\n // internal function, so it's ok to ignore the difficult to fix type error\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction $49c51c25361d4cd2$var$scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n let nextTarget = target;\n while(nextTarget && nextTarget !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = (0, $7mMvr$getScrollParent)(nextTarget);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = nextTarget.getBoundingClientRect().top;\n if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;\n }\n nextTarget = scrollable.parentElement;\n }\n}\nfunction $49c51c25361d4cd2$var$willOpenKeyboard(target) {\n return target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n\nexport {$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll};\n//# sourceMappingURL=usePreventScroll.module.js.map\n"],"names":["$49c51c25361d4cd2$var$visualViewport","$49c51c25361d4cd2$var$nonTextInputTypes","$49c51c25361d4cd2$var$preventScrollCount","$49c51c25361d4cd2$var$restore","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","options","isDisabled","$7mMvr$useLayoutEffect","$7mMvr$isIOS","$49c51c25361d4cd2$var$preventScrollMobileSafari","$49c51c25361d4cd2$var$preventScrollStandard","scrollbarWidth","$7mMvr$chain","$49c51c25361d4cd2$var$setStyle","scrollable","restoreScrollableStyles","onTouchStart","e","$7mMvr$getScrollParent","onTouchMove","onTouchEnd","onFocus","target","$49c51c25361d4cd2$var$willOpenKeyboard","setupStyles","$49c51c25361d4cd2$var$scrollIntoView","restoreStyles","onWindowScroll","scrollX","scrollY","$49c51c25361d4cd2$var$addEvent","removeEvents","element","style","value","cur","event","handler","root","nextTarget","scrollableTop","targetTop"],"mappings":";AAaA,MAAMA,IAAuC,OAAO,WAAa,OAAe,OAAO,gBAEjFC,IAA0C,oBAAI,IAAI;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAED,IAAIC,IAA2C,GAC3CC;AACJ,SAASC,EAA0CC,IAAU,IAAI;AAC7D,MAAI,EAAE,YAAYC,EAAU,IAAKD;AACjC,EAAIE,EAAw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IC,IAAMH,EAAQ,MAAMC,CAAK;AAC7B,SAAAD,EAAQ,MAAMC,CAAK,IAAIC,GAChB,MAAI;AACP,IAAAF,EAAQ,MAAMC,CAAK,IAAIE;AAAA,EAC3B;AACJ;AAEA,SAASL,EAA+BR,GAAQc,GAAOC,GAAShC,GAAS;AAGrE,SAAAiB,EAAO,iBAAiBc,GAAOC,GAAShC,CAAO,GACxC,MAAI;AAEP,IAAAiB,EAAO,oBAAoBc,GAAOC,GAAShC,CAAO;AAAA,EACtD;AACJ;AACA,SAASoB,EAAqCH,GAAQ;AAClD,MAAIgB,IAAO,SAAS,oBAAoB,SAAS,iBAC7CC,IAAajB;AACjB,SAAMiB,KAAcA,MAAeD,KAAK;AAEpC,QAAIxB,IAAiBI,EAAwBqB,CAAU;AACvD,QAAIzB,MAAe,SAAS,mBAAmBA,MAAe,SAAS,QAAQA,MAAeyB,GAAY;AACtG,UAAIC,IAAgB1B,EAAW,sBAAqB,EAAG,KACnD2B,IAAYF,EAAW,sBAAqB,EAAG;AACnD,MAAIE,IAAYD,IAAgBD,EAAW,iBAAczB,EAAW,aAAa2B,IAAYD;AAAA,IACjG;AACA,IAAAD,IAAazB,EAAW;AAAA,EAC5B;AACJ;AACA,SAASS,EAAuCD,GAAQ;AACpD,SAAOA,aAAkB,oBAAoB,CAACrB,EAAwC,IAAIqB,EAAO,IAAI,KAAKA,aAAkB,uBAAuBA,aAAkB,eAAeA,EAAO;AAC/L;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"usePreventScroll.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs"],"sourcesContent":["import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\n// HTML input types that do not cause the software keyboard to appear.\nconst $49c51c25361d4cd2$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet $49c51c25361d4cd2$var$preventScrollCount = 0;\nlet $49c51c25361d4cd2$var$restore;\nfunction $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {\n let { isDisabled: isDisabled } = options;\n (0, $7mMvr$useLayoutEffect)(()=>{\n if (isDisabled) return;\n $49c51c25361d4cd2$var$preventScrollCount++;\n if ($49c51c25361d4cd2$var$preventScrollCount === 1) {\n if ((0, $7mMvr$isIOS)()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();\n else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();\n }\n return ()=>{\n $49c51c25361d4cd2$var$preventScrollCount--;\n if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();\n };\n }, [\n isDisabled\n ]);\n}\n// For most browsers, all we need to do is set `overflow: hidden` on the root element, and\n// add some padding to prevent the page from shifting when the scrollbar is hidden.\nfunction $49c51c25361d4cd2$var$preventScrollStandard() {\n let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n return (0, $7mMvr$chain)(scrollbarWidth > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.\n ('scrollbarGutter' in document.documentElement.style ? $49c51c25361d4cd2$var$setStyle(document.documentElement, 'scrollbarGutter', 'stable') : $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${scrollbarWidth}px`)), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'));\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at\n// the top or bottom. Work around a bug where this does not work when the element does not actually overflow\n// by preventing default in a `touchmove` event.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction $49c51c25361d4cd2$var$preventScrollMobileSafari() {\n let scrollable;\n let restoreScrollableStyles;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = (0, $7mMvr$getScrollParent)(e.target, true);\n if (scrollable === document.documentElement && scrollable === document.body) return;\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead.\n if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === 'auto') restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, 'overscrollBehavior', 'contain');\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // overscroll-behavior should prevent scroll chaining, but currently does not\n // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452\n // This checks that both the width and height do not overflow, otherwise we might\n // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to\n // the element will prevent vertical page scrolling. We can't add that automatically\n // because it must be set before the touchstart event.\n if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();\n };\n let onTouchEnd = ()=>{\n if (restoreScrollableStyles) restoreScrollableStyles();\n };\n let onFocus = (e)=>{\n let target = e.target;\n if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {\n setupStyles();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view.\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if ($49c51c25361d4cd2$var$visualViewport) {\n if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n $49c51c25361d4cd2$var$scrollIntoView(target);\n });\n else // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n $49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target), {\n once: true\n });\n }\n });\n }\n };\n let restoreStyles = null;\n let setupStyles = ()=>{\n if (restoreStyles) return;\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`), ()=>{\n window.scrollTo(scrollX, scrollY);\n });\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n };\n let removeEvents = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();\n restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();\n removeEvents();\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction $49c51c25361d4cd2$var$setStyle(element, style, value) {\n let cur = element.style[style];\n element.style[style] = value;\n return ()=>{\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {\n // internal function, so it's ok to ignore the difficult to fix type error\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction $49c51c25361d4cd2$var$scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n let nextTarget = target;\n while(nextTarget && nextTarget !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = (0, $7mMvr$getScrollParent)(nextTarget);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = nextTarget.getBoundingClientRect().top;\n if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;\n }\n nextTarget = scrollable.parentElement;\n }\n}\nfunction $49c51c25361d4cd2$var$willOpenKeyboard(target) {\n return target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n\nexport {$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll};\n//# sourceMappingURL=usePreventScroll.module.js.map\n"],"names":["$49c51c25361d4cd2$var$visualViewport","$49c51c25361d4cd2$var$nonTextInputTypes","$49c51c25361d4cd2$var$preventScrollCount","$49c51c25361d4cd2$var$restore","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","options","isDisabled","$7mMvr$useLayoutEffect","$7mMvr$isIOS","$49c51c25361d4cd2$var$preventScrollMobileSafari","$49c51c25361d4cd2$var$preventScrollStandard","scrollbarWidth","$7mMvr$chain","$49c51c25361d4cd2$var$setStyle","scrollable","restoreScrollableStyles","onTouchStart","e","$7mMvr$getScrollParent","onTouchMove","onTouchEnd","onFocus","target","$49c51c25361d4cd2$var$willOpenKeyboard","setupStyles","$49c51c25361d4cd2$var$scrollIntoView","restoreStyles","onWindowScroll","scrollX","scrollY","$49c51c25361d4cd2$var$addEvent","removeEvents","element","style","value","cur","event","handler","root","nextTarget","scrollableTop","targetTop"],"mappings":";AAaA,MAAMA,IAAuC,OAAO,WAAa,OAAe,OAAO,gBAEjFC,IAA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AK,GAAGU,EAA+B,UAAU,SAAST,GAAS,EAAI,CAAC;AACpE,SAAO,MAAI;AAEP,IAAAN,KAA4B,QAAsDA,KAClFW,KAAkB,QAA4CA,KAC9DK;EACR;AACA;AAEA,SAASlB,EAA+BmB,GAASC,GAAOC,GAAO;AAC3D,MAAIC,IAAMH,EAAQ,MAAMC,CAAK;AAC7B,SAAAD,EAAQ,MAAMC,CAAK,IAAIC,GAChB,MAAI;AACP,IAAAF,EAAQ,MAAMC,CAAK,IAAIE;AAAA,EAC/B;AACA;AAEA,SAASL,EAA+BR,GAAQc,GAAOC,GAAShC,GAAS;AAGrE,SAAAiB,EAAO,iBAAiBc,GAAOC,GAAShC,CAAO,GACxC,MAAI;AAEP,IAAAiB,EAAO,oBAAoBc,GAAOC,GAAShC,CAAO;AAAA,EAC1D;AACA;AACA,SAASoB,EAAqCH,GAAQ;AAClD,MAAIgB,IAAO,SAAS,oBAAoB,SAAS,iBAC7CC,IAAajB;AACjB,SAAMiB,KAAcA,MAAeD,KAAK;AAEpC,QAAIxB,IAAiBI,EAAwBqB,CAAU;AACvD,QAAIzB,MAAe,SAAS,mBAAmBA,MAAe,SAAS,QAAQA,MAAeyB,GAAY;AACtG,UAAIC,IAAgB1B,EAAW,sBAAqB,EAAG,KACnD2B,IAAYF,EAAW,sBAAqB,EAAG;AACnD,MAAIE,IAAYD,IAAgBD,EAAW,iBAAczB,EAAW,aAAa2B,IAAYD;AAAA,IAChG;AACD,IAAAD,IAAazB,EAAW;AAAA,EAC3B;AACL;AACA,SAASS,EAAuCD,GAAQ;AACpD,SAAOA,aAAkB,oBAAoB,CAACrB,EAAwC,IAAIqB,EAAO,IAAI,KAAKA,aAAkB,uBAAuBA,aAAkB,eAAeA,EAAO;AAC/L;","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useRadio.cjs.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadio.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.defaultSelectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n form: form,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n"],"names":["$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","form","descriptionId","errorMessageId","validationBehavior","$884aeceb3d67f00f$export$37b65e5b5444d35c","$5jJ3f$useFormReset","$5jJ3f$useFormValidation"],"mappings":"qTAmBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,MAAOC,EAAO,SAAUC,EAAU,aAAcC,EAAW,kBAAmBC,EAAgB,aAAcC,EAAc,WAAYC,EAAY,cAAeC,EAAe,QAASC,EAAS,UAAWC,EAAW,QAASC,CAAO,EAAKZ,EACnP,MAAMa,EAAab,EAAM,YAAcC,EAAM,WAC7C,IAAIa,EAAcV,GAAY,KAC1BW,EAAeV,GAAa,MAAQC,GAAkB,KACtD,CAACQ,GAAe,CAACC,GAAgB,QAAQ,IAAI,WAAa,cAAc,QAAQ,KAAK,kFAAkF,EAC3K,IAAIC,EAAUf,EAAM,gBAAkBE,EAClCc,EAAYC,GAAI,CAChBA,EAAE,gBAAe,EACjBjB,EAAM,iBAAiBE,CAAK,CAChC,EAEI,CAAE,WAAYgB,EAAY,UAAWC,CAAS,EAASC,WAAiB,CACxE,aAAcd,EACd,WAAYC,EACZ,cAAeC,EACf,QAASC,EACT,UAAWC,EACX,QAASC,EACT,WAAYC,CACpB,CAAK,EAEG,CAAE,WAAYS,EAAY,UAAWC,CAAc,EAASF,WAAiB,CAC7E,aAAcd,EACd,WAAYC,EACZ,cAAeC,EACf,UAAWE,EACX,QAASC,EACT,WAAYC,EACZ,QAASK,EAAG,CACR,IAAIM,EACJd,GAAY,MAAsCA,EAAQQ,CAAC,EAC3DjB,EAAM,iBAAiBE,CAAK,GA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s.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadio.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.defaultSelectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n form: form,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n"],"names":["$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","form","descriptionId","errorMessageId","validationBehavior","$884aeceb3d67f00f$export$37b65e5b5444d35c","$5jJ3f$useFormReset","$5jJ3f$useFormValidation"],"mappings":"qTAmBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,MAAOC,EAAO,SAAUC,EAAU,aAAcC,EAAW,kBAAmBC,EAAgB,aAAcC,EAAc,WAAYC,EAAY,cAAeC,EAAe,QAASC,EAAS,UAAWC,EAAW,QAASC,CAAS,EAAGZ,EACnP,MAAMa,EAAab,EAAM,YAAcC,EAAM,WAC7C,IAAIa,EAAcV,GAAY,KAC1BW,EAAeV,GAAa,MAAQC,GAAkB,KACtD,CAACQ,GAAe,CAACC,GAAgB,QAAQ,IAAI,WAAa,cAAc,QAAQ,KAAK,kFAAkF,EAC3K,IAAIC,EAAUf,EAAM,gBAAkBE,EAClCc,EAAYC,GAAI,CAChBA,EAAE,gBAAe,EACjBjB,EAAM,iBAAiBE,CAAK,CACpC,EAEQ,CAAE,WAAYgB,EAAY,UAAWC,CAAS,EAASC,WAAiB,CACxE,aAAcd,EACd,WAAYC,EACZ,cAAeC,EACf,QAASC,EACT,UAAWC,EACX,QAASC,EACT,WAAYC,CACpB,CAAK,EAEG,CAAE,WAAYS,EAAY,UAAWC,CAAc,EAASF,WAAiB,CAC7E,aAAcd,EACd,WAAYC,EACZ,cAAeC,EACf,UAAWE,EACX,QAASC,EACT,WAAYC,EACZ,Q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,WAAYrB,EACZ,WAAYG,EACZ,UAAWI,GAAaG,CAChC,CACA","x_google_ignoreList":[0]}
@@ -1 +1 @@
1
- {"version":3,"file":"useRadio.es.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadio.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.defaultSelectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n form: form,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n"],"names":["$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","form","descriptionId","errorMessageId","validationBehavior","$884aeceb3d67f00f$export$37b65e5b5444d35c","$5jJ3f$useFormReset","$5jJ3f$useFormValidation"],"mappings":";;;;;AAmBA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,OAAOC,GAAO,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,GAAgB,cAAcC,GAAc,YAAYC,GAAY,eAAeC,GAAe,SAASC,GAAS,WAAWC,GAAW,SAASC,EAAO,IAAKZ;AACnP,QAAMa,IAAab,EAAM,cAAcC,EAAM;AAC7C,MAAIa,IAAcV,KAAY,MAC1BW,IAAeV,KAAa,QAAQC,KAAkB;AAC1D,EAAI,CAACQ,KAAe,CAACC,KAAgB,QAAQ,IAAI,aAAa,gBAAc,QAAQ,KAAK,kFAAkF;AAC3K,MAAIC,IAAUf,EAAM,kBAAkBE,GAClCc,IAAW,CAACC,MAAI;AAChB,IAAAA,EAAE,gBAAe,GACjBjB,EAAM,iBAAiBE,CAAK;AAAA,EAChC,GAEI,EAAE,YAAYgB,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,cAAcd;AAAA,IACd,YAAYC;AAAA,IACZ,eAAeC;AAAA,IACf,SAASC;AAAA,IACT,WAAWC;AA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AAA,MACH,MAAM;AAAA,MACN,MAAMI;AAAA,MACN,MAAMC;AAAA,MACN,UAAUF;AAAA,MACV,UAAUlB;AAAA,MACV,UAAUZ,EAAM,cAAcmC,MAAuB;AAAA,MACrD,SAASpB;AAAA,MACT,OAAOb;AAAA,MACP,UAAUc;AAAA,MACV,oBAAoB;AAAA,QAChBjB,EAAM,kBAAkB;AAAA,QACxBC,EAAM,YAAYkC,IAAiB;AAAA,QACnCD;AAAA,MAChB,EAAc,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,IAC3C,CAAS;AAAA,IACD,YAAYrB;AAAA,IACZ,YAAYG;AAAA,IACZ,WAAWI,KAAaG;AAAA,EAChC;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"useRadio.es.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadio.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.defaultSelectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n form: form,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n"],"names":["$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","form","descriptionId","errorMessageId","validationBehavior","$884aeceb3d67f00f$export$37b65e5b5444d35c","$5jJ3f$useFormReset","$5jJ3f$useFormValidation"],"mappings":";;;;;AAmBA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,OAAOC,GAAO,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,GAAgB,cAAcC,GAAc,YAAYC,GAAY,eAAeC,GAAe,SAASC,GAAS,WAAWC,GAAW,SAASC,EAAS,IAAGZ;AACnP,QAAMa,IAAab,EAAM,cAAcC,EAAM;AAC7C,MAAIa,IAAcV,KAAY,MAC1BW,IAAeV,KAAa,QAAQC,KA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