@nethesis/phone-island 1.1.5 → 1.1.6

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 (321) hide show
  1. package/dist/App.js.map +1 -1
  2. package/dist/components/AlertView/index.js.map +1 -1
  3. package/dist/components/AudioBars.js.map +1 -1
  4. package/dist/components/AudioPlayerView/PlayerFooterActions.js +1 -1
  5. package/dist/components/AudioPlayerView/PlayerFooterActions.js.map +1 -1
  6. package/dist/components/AudioPlayerView/Progress.js.map +1 -1
  7. package/dist/components/AudioPlayerView/index.js +1 -1
  8. package/dist/components/AudioPlayerView/index.js.map +1 -1
  9. package/dist/components/CallView/Actions.js +1 -1
  10. package/dist/components/CallView/Actions.js.map +1 -1
  11. package/dist/components/CallView/BackCall.js +1 -1
  12. package/dist/components/CallView/BackCall.js.map +1 -1
  13. package/dist/components/CallView/DeviceIcon.js +1 -1
  14. package/dist/components/CallView/DeviceIcon.js.map +1 -1
  15. package/dist/components/CallView/DisplayName.js +1 -1
  16. package/dist/components/CallView/DisplayName.js.map +1 -1
  17. package/dist/components/CallView/DisplayNameUtils.js.map +1 -1
  18. package/dist/components/CallView/Number.js +1 -1
  19. package/dist/components/CallView/Number.js.map +1 -1
  20. package/dist/components/CallView/NumberPopover.js +1 -1
  21. package/dist/components/CallView/NumberPopover.js.map +1 -1
  22. package/dist/components/CallView/index.js +1 -1
  23. package/dist/components/CallView/index.js.map +1 -1
  24. package/dist/components/ConferenceView/ConferenceUsersList.js +1 -1
  25. package/dist/components/ConferenceView/ConferenceUsersList.js.map +1 -1
  26. package/dist/components/ConferenceView/index.js +1 -1
  27. package/dist/components/ConferenceView/index.js.map +1 -1
  28. package/dist/components/ContactView/ContactListView.js +1 -1
  29. package/dist/components/ContactView/ContactListView.js.map +1 -1
  30. package/dist/components/ContactView/SelectContactNumberView.js +1 -1
  31. package/dist/components/ContactView/SelectContactNumberView.js.map +1 -1
  32. package/dist/components/ContactView/TransferActions.js +1 -1
  33. package/dist/components/ContactView/TransferActions.js.map +1 -1
  34. package/dist/components/Hangup.js +1 -1
  35. package/dist/components/Hangup.js.map +1 -1
  36. package/dist/components/KeypadView/index.js +1 -1
  37. package/dist/components/KeypadView/index.js.map +1 -1
  38. package/dist/components/OperatorBusyView/index.js +1 -1
  39. package/dist/components/OperatorBusyView/index.js.map +1 -1
  40. package/dist/components/PhysicalRecorderView/index.js +1 -1
  41. package/dist/components/PhysicalRecorderView/index.js.map +1 -1
  42. package/dist/components/RecorderView/Actions.js +1 -1
  43. package/dist/components/RecorderView/Actions.js.map +1 -1
  44. package/dist/components/RecorderView/BarsGroup.js.map +1 -1
  45. package/dist/components/RecorderView/index.js +1 -1
  46. package/dist/components/RecorderView/index.js.map +1 -1
  47. package/dist/components/SettingsView/AudioView.js +1 -1
  48. package/dist/components/SettingsView/AudioView.js.map +1 -1
  49. package/dist/components/SettingsView/MicrophoneView.js +1 -1
  50. package/dist/components/SettingsView/MicrophoneView.js.map +1 -1
  51. package/dist/components/SettingsView/SettingsHeader.js +1 -1
  52. package/dist/components/SettingsView/SettingsHeader.js.map +1 -1
  53. package/dist/components/SettingsView/ThemeView.js +1 -1
  54. package/dist/components/SettingsView/ThemeView.js.map +1 -1
  55. package/dist/components/SettingsView/index.js +1 -1
  56. package/dist/components/SettingsView/index.js.map +1 -1
  57. package/dist/components/SideView/SideView.js +1 -1
  58. package/dist/components/SideView/SideView.js.map +1 -1
  59. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  60. package/dist/components/Socket.js.map +1 -1
  61. package/dist/components/SwitchDeviceView/index.js +1 -1
  62. package/dist/components/SwitchDeviceView/index.js.map +1 -1
  63. package/dist/components/SwitchInputView/DropdownContent.js +1 -1
  64. package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
  65. package/dist/components/SwitchInputView/Index.js +1 -1
  66. package/dist/components/TextScroll.js +1 -1
  67. package/dist/components/TextScroll.js.map +1 -1
  68. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  69. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  70. package/dist/components/VideoStreamingEmptyState/index.js +1 -1
  71. package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
  72. package/dist/components/VideoStreamingSkeleton/index.js +1 -1
  73. package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
  74. package/dist/components/VideoView/index.js.map +1 -1
  75. package/dist/components/WebRTC.js.map +1 -1
  76. package/dist/events/SocketEvents.js.map +1 -1
  77. package/dist/lib/i18n.js +1 -1
  78. package/dist/lib/i18n.js.map +1 -1
  79. package/dist/lib/phone/call.js +1 -1
  80. package/dist/lib/phone/call.js.map +1 -1
  81. package/dist/lib/phone/counterpartDevice.js.map +1 -1
  82. package/dist/lib/phone/video.js.map +1 -1
  83. package/dist/lib/player/audio.js.map +1 -1
  84. package/dist/lib/user/default_device.js.map +1 -1
  85. package/dist/lib/user/extensions.js.map +1 -1
  86. package/dist/models/currentCall.js.map +1 -1
  87. package/dist/models/island.js.map +1 -1
  88. package/dist/models/player.js +1 -1
  89. package/dist/models/player.js.map +1 -1
  90. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  91. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  92. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  93. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  94. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  95. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  96. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  97. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  98. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  99. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  100. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  114. package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
  115. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  116. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  117. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  118. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  119. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  120. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  121. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  122. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  123. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  124. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +1 -1
  125. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -1
  126. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  127. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  128. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  129. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  130. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  131. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  132. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  133. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  134. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  135. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  136. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  137. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  138. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  139. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  140. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  141. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  142. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  143. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
  144. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
  145. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  146. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js +2 -0
  153. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js.map +1 -0
  154. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js +2 -0
  171. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js.map +1 -0
  172. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js +2 -0
  195. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -0
  196. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/utils/is-ref-object.mjs.js.map +1 -0
  199. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  201. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  202. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  209. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  212. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  213. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  214. package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
  215. package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
  216. package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
  217. package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
  218. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +1 -1
  219. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js.map +1 -1
  220. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +1 -1
  221. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js.map +1 -1
  222. package/dist/node_modules/react-i18next/dist/es/unescape.js +1 -1
  223. package/dist/node_modules/react-i18next/dist/es/unescape.js.map +1 -1
  224. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
  225. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  226. package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
  227. package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
  228. package/dist/package.json.js +1 -1
  229. package/dist/services/astproxy.js +1 -1
  230. package/dist/services/astproxy.js.map +1 -1
  231. package/dist/services/phonebook.js +1 -1
  232. package/dist/services/phonebook.js.map +1 -1
  233. package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
  234. package/dist/utils/deviceUtils.js.map +1 -1
  235. package/package.json +10 -5
  236. package/dist/_virtual/arrayLikeToArray.js +0 -2
  237. package/dist/_virtual/arrayLikeToArray.js.map +0 -1
  238. package/dist/_virtual/arrayWithHoles.js +0 -2
  239. package/dist/_virtual/arrayWithHoles.js.map +0 -1
  240. package/dist/_virtual/classCallCheck.js +0 -2
  241. package/dist/_virtual/classCallCheck.js.map +0 -1
  242. package/dist/_virtual/createClass.js +0 -2
  243. package/dist/_virtual/createClass.js.map +0 -1
  244. package/dist/_virtual/defineProperty.js +0 -2
  245. package/dist/_virtual/defineProperty.js.map +0 -1
  246. package/dist/_virtual/iterableToArrayLimit.js +0 -2
  247. package/dist/_virtual/iterableToArrayLimit.js.map +0 -1
  248. package/dist/_virtual/nonIterableRest.js +0 -2
  249. package/dist/_virtual/nonIterableRest.js.map +0 -1
  250. package/dist/_virtual/objectWithoutProperties.js +0 -2
  251. package/dist/_virtual/objectWithoutProperties.js.map +0 -1
  252. package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -2
  253. package/dist/_virtual/objectWithoutPropertiesLoose.js.map +0 -1
  254. package/dist/_virtual/slicedToArray.js +0 -2
  255. package/dist/_virtual/slicedToArray.js.map +0 -1
  256. package/dist/_virtual/toPrimitive.js +0 -2
  257. package/dist/_virtual/toPrimitive.js.map +0 -1
  258. package/dist/_virtual/toPropertyKey.js +0 -2
  259. package/dist/_virtual/toPropertyKey.js.map +0 -1
  260. package/dist/_virtual/typeof.js +0 -2
  261. package/dist/_virtual/typeof.js.map +0 -1
  262. package/dist/_virtual/unsupportedIterableToArray.js +0 -2
  263. package/dist/_virtual/unsupportedIterableToArray.js.map +0 -1
  264. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -2
  265. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
  266. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -2
  267. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js.map +0 -1
  268. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -2
  269. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
  270. package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -2
  271. package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
  272. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -2
  273. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
  274. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  275. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  276. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -2
  277. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
  278. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -2
  279. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
  280. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -2
  281. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +0 -1
  282. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -2
  283. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js.map +0 -1
  284. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  285. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  286. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -2
  287. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
  288. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -2
  289. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +0 -1
  290. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
  291. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  292. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -2
  293. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js.map +0 -1
  294. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  295. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  296. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -2
  297. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js.map +0 -1
  298. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -2
  299. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js.map +0 -1
  300. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -2
  301. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js.map +0 -1
  302. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -2
  303. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
  304. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -2
  305. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js.map +0 -1
  306. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -2
  307. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
  308. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -2
  309. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
  310. package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -2
  311. package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
  312. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -2
  313. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
  314. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +0 -2
  315. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +0 -1
  316. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +0 -1
  317. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
  318. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
  319. package/dist/node_modules/void-elements/index.js +0 -2
  320. package/dist/node_modules/void-elements/index.js.map +0 -1
  321. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/is-ref-object.mjs.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./mix/index.mjs.js"),t=require("../../../../motion-utils/dist/es/errors.mjs.js"),s=require("../../../../motion-utils/dist/es/clamp.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js"),i=require("../../../../motion-utils/dist/es/pipe.mjs.js"),n=require("../../../../motion-utils/dist/es/progress.mjs.js"),o=require("../../../../motion-utils/dist/es/global-config.mjs.js");exports.interpolate=function(u,l,{clamp:m=!0,ease:p,mixer:a}={}){const j=u.length;if(t.invariant(j===l.length,"Both input and output ranges must be the same length","range-length"),1===j)return()=>l[0];if(2===j&&l[0]===l[1])return()=>l[1];const c=u[0]===u[1];u[0]>u[j-1]&&(u=[...u].reverse(),l=[...l].reverse());const g=function(t,s,n){const u=[],l=n||o.MotionGlobalConfig.mix||e.mix,m=t.length-1;for(let e=0;e<m;e++){let n=l(t[e],t[e+1]);if(s){const t=Array.isArray(s)?s[e]||r.noop:s;n=i.pipe(t,n)}u.push(n)}return u}(l,p,a),f=g.length,d=e=>{if(c&&e<u[0])return l[0];let t=0;if(f>1)for(;t<u.length-2&&!(e<u[t+1]);t++);const s=n.progress(u[t],u[t+1],e);return g[t](s)};return m?e=>d(s.clamp(u[0],u[j-1],e)):d};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./mix/index.mjs.js"),t=require("../../../../motion-utils/dist/es/errors.mjs.js"),s=require("../../../../motion-utils/dist/es/clamp.mjs.js"),r=require("../../../../motion-utils/dist/es/noop.mjs.js"),i=require("../../../../motion-utils/dist/es/pipe.mjs.js"),n=require("../../../../motion-utils/dist/es/progress.mjs.js"),o=require("../../../../motion-utils/dist/es/global-config.mjs.js");exports.interpolate=function(u,l,{clamp:m=!0,ease:p,mixer:a}={}){const c=u.length;if("production"!==process.env.NODE_ENV&&t.invariant(c===l.length,"Both input and output ranges must be the same length","range-length"),1===c)return()=>l[0];if(2===c&&l[0]===l[1])return()=>l[1];const j=u[0]===u[1];u[0]>u[c-1]&&(u=[...u].reverse(),l=[...l].reverse());const g=function(t,s,n){const u=[],l=o.MotionGlobalConfig.mix||e.mix,m=t.length-1;for(let e=0;e<m;e++){let o=n?.(t[e],t[e+1])||l(t[e],t[e+1]);if(s){const t=Array.isArray(s)?s[e]||r.noop:s;o=i.pipe(t,o)}u.push(o)}return u}(l,p,a),f=g.length,d=e=>{if(j&&e<u[0])return l[0];let t=0;if(f>1)for(;t<u.length-2&&!(e<u[t+1]);t++);const s=n.progress(u[t],u[t+1],e);return g[t](s)};return m?e=>d(s.clamp(u[0],u[c-1],e)):d};
2
2
  //# sourceMappingURL=interpolate.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interpolate.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/utils/interpolate.mjs"],"sourcesContent":["import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n"],"names":["interpolate","input","output","clamp","isClamp","ease","mixer","inputLength","length","invariant","isZeroDeltaRange","reverse","mixers","customMixer","mixerFactory","MotionGlobalConfig","mix","numMixers","i","easingFunction","Array","isArray","noop","pipe","push","createMixers","interpolator","v","progressInRange","progress"],"mappings":"weA6DgBA,SACZC,EACAC,GACEC,MAAOC,GAAU,EAAIC,KAAEA,EAAIC,MAAEA,GAAiC,IAEhE,MAAMC,EAAcN,EAAMO,OAY1B,GAVAC,EAASA,UACLF,IAAgBL,EAAOM,OACvB,uDACA,gBAOgB,IAAhBD,EAAmB,MAAO,IAAML,EAAO,GAC3C,GAAoB,IAAhBK,GAAqBL,EAAO,KAAOA,EAAO,GAAI,MAAO,IAAMA,EAAO,GAEtE,MAAMQ,EAAmBT,EAAM,KAAOA,EAAM,GAGxCA,EAAM,GAAKA,EAAMM,EAAc,KAC/BN,EAAQ,IAAIA,GAAOU,UACnBT,EAAS,IAAIA,GAAQS,WAGzB,MAAMC,EAvEV,SACIV,EACAG,EACAQ,GAEA,MAAMD,EAA0B,GAC1BE,EACFD,GAAeE,qBAAmBC,KAAOA,EAAAA,IACvCC,EAAYf,EAAOM,OAAS,EAElC,IAAK,IAAIU,EAAI,EAAGA,EAAID,EAAWC,IAAK,CAChC,IAAIZ,EAAQQ,EAAaZ,EAAOgB,GAAIhB,EAAOgB,EAAI,IAE/C,GAAIb,EAAM,CACN,MAAMc,EAAiBC,MAAMC,QAAQhB,GAAQA,EAAKa,IAAMI,EAAIA,KAAGjB,EAC/DC,EAAQiB,EAAIA,KAACJ,EAAgBb,EACjC,CAEAM,EAAOY,KAAKlB,EAChB,CAEA,OAAOM,CACX,CAiDmBa,CAAavB,EAAQG,EAAMC,GACpCW,EAAYL,EAAOJ,OAEnBkB,EAAgBC,IAClB,GAAIjB,GAAoBiB,EAAI1B,EAAM,GAAI,OAAOC,EAAO,GAEpD,IAAIgB,EAAI,EAER,GAAID,EAAY,EACZ,KAAOC,EAAIjB,EAAMO,OAAS,KAClBmB,EAAI1B,EAAMiB,EAAI,IADOA,KAKjC,MAAMU,EAAkBC,WAAS5B,EAAMiB,GAAIjB,EAAMiB,EAAI,GAAIS,GAEzD,OAAOf,EAAOM,GAAGU,IAGrB,OAAOxB,EACAuB,GACGD,EAAavB,EAAKA,MAACF,EAAM,GAAIA,EAAMM,EAAc,GAAIoB,IACzDD,CACV"}
1
+ {"version":3,"file":"interpolate.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/utils/interpolate.mjs"],"sourcesContent":["import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = customMixer?.(output[i], output[i + 1]) ||\n mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n process.env.NODE_ENV !== \"production\" &&\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n"],"names":["interpolate","input","output","clamp","isClamp","ease","mixer","inputLength","length","process","env","NODE_ENV","invariant","isZeroDeltaRange","reverse","mixers","customMixer","mixerFactory","MotionGlobalConfig","mix","numMixers","i","easingFunction","Array","isArray","noop","pipe","push","createMixers","interpolator","v","progressInRange","progress"],"mappings":"weAkEgBA,SACZC,EACAC,GACEC,MAAOC,GAAU,EAAIC,KAAEA,EAAIC,MAAEA,GAAiC,IAEhE,MAAMC,EAAcN,EAAMO,OAa1B,GAXyB,eAAzBC,QAAQC,IAAIC,UACRC,EAASA,UACLL,IAAgBL,EAAOM,OACvB,uDACA,gBAOY,IAAhBD,EAAmB,MAAO,IAAML,EAAO,GAC3C,GAAoB,IAAhBK,GAAqBL,EAAO,KAAOA,EAAO,GAAI,MAAO,IAAMA,EAAO,GAEtE,MAAMW,EAAmBZ,EAAM,KAAOA,EAAM,GAGxCA,EAAM,GAAKA,EAAMM,EAAc,KAC/BN,EAAQ,IAAIA,GAAOa,UACnBZ,EAAS,IAAIA,GAAQY,WAGzB,MAAMC,EAzEV,SACIb,EACAG,EACAW,GAEA,MAAMD,EAA0B,GAC1BE,EAAgCC,EAAAA,mBAAmBC,KAAOA,MAC1DC,EAAYlB,EAAOM,OAAS,EAElC,IAAK,IAAIa,EAAI,EAAGA,EAAID,EAAWC,IAAK,CAChC,IAAIf,EACAU,IAAcd,EAAOmB,GAAInB,EAAOmB,EAAI,KACpCJ,EAAaf,EAAOmB,GAAInB,EAAOmB,EAAI,IAEvC,GAAIhB,EAAM,CACN,MAAMiB,EAAiBC,MAAMC,QAAQnB,GAAQA,EAAKgB,IAAMI,EAAIA,KAAGpB,EAC/DC,EAAQoB,EAAIA,KAACJ,EAAgBhB,EACjC,CAEAS,EAAOY,KAAKrB,EAChB,CAEA,OAAOS,CACX,CAkDmBa,CAAa1B,EAAQG,EAAMC,GACpCc,EAAYL,EAAOP,OAEnBqB,EAAgBC,IAClB,GAAIjB,GAAoBiB,EAAI7B,EAAM,GAAI,OAAOC,EAAO,GAEpD,IAAImB,EAAI,EAER,GAAID,EAAY,EACZ,KAAOC,EAAIpB,EAAMO,OAAS,KAClBsB,EAAI7B,EAAMoB,EAAI,IADOA,KAKjC,MAAMU,EAAkBC,WAAS/B,EAAMoB,GAAIpB,EAAMoB,EAAI,GAAIS,GAEzD,OAAOf,EAAOM,GAAGU,IAGrB,OAAO3B,EACA0B,GACGD,EAAa1B,EAAKA,MAACF,EAAM,GAAIA,EAAMM,EAAc,GAAIuB,IACzDD,CACV"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-ref-object.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/utils/is-ref-object.mjs"],"sourcesContent":["function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n//# sourceMappingURL=is-ref-object.mjs.map\n"],"names":["ref","Object","prototype","hasOwnProperty","call"],"mappings":"wFAAM,SAA+BA,GACjC,OACIA,GACe,iBAARA,GACPC,OAAOC,UAAUC,eAAeC,KAAKJ,EAAK,UAElD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/types/color/hex.mjs.js"),r=require("../../value/types/color/hsla.mjs.js"),s=require("../../value/types/color/hsla-to-rgba.mjs.js"),t=require("../../value/types/color/rgba.mjs.js"),a=require("./immediate.mjs.js"),o=require("./number.mjs.js"),l=require("../../../../../motion-utils/dist/es/errors.mjs.js");const i=(e,r,s)=>{const t=e*e,a=s*(r*r-t)+t;return a<0?0:Math.sqrt(a)},n=[e.hex,t.rgba,r.hsla];function u(e){const t=(a=e,n.find(e=>e.test(a)));var a;if(!t)return l.warning(!1,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!1;let o=t.parse(e);return t===r.hsla&&(o=s.hslaToRgba(o)),o}exports.mixColor=(e,r)=>{const s=u(e),l=u(r);if(!s||!l)return a.mixImmediate(e,r);const n={...s};return e=>(n.red=i(s.red,l.red,e),n.green=i(s.green,l.green,e),n.blue=i(s.blue,l.blue,e),n.alpha=o.mixNumber(s.alpha,l.alpha,e),t.rgba.transform(n))},exports.mixLinearColor=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../value/types/color/hex.mjs.js"),r=require("../../value/types/color/hsla.mjs.js"),s=require("../../value/types/color/hsla-to-rgba.mjs.js"),t=require("../../value/types/color/rgba.mjs.js"),o=require("./immediate.mjs.js"),a=require("./number.mjs.js"),n=require("../../../../../motion-utils/dist/es/errors.mjs.js");const i=(e,r,s)=>{const t=e*e,o=s*(r*r-t)+t;return o<0?0:Math.sqrt(o)},l=[e.hex,t.rgba,r.hsla];function u(e){const t=(o=e,l.find(e=>e.test(o)));var o;if(!t)return"production"!==process.env.NODE_ENV&&n.warning(!1,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!1;let a=t.parse(e);return t===r.hsla&&(a=s.hslaToRgba(a)),a}exports.mixColor=(e,r)=>{const s=u(e),n=u(r);if(!s||!n)return o.mixImmediate(e,r);const l={...s};return e=>(l.red=i(s.red,n.red,e),l.green=i(s.green,n.green,e),l.blue=i(s.blue,n.blue,e),l.alpha=a.mixNumber(s.alpha,n.alpha,e),t.rgba.transform(l))},exports.mixLinearColor=i;
2
2
  //# sourceMappingURL=color.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/utils/mix/color.mjs"],"sourcesContent":["import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n if (!type) {\n warning(false, `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n return false;\n }\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n"],"names":["mixLinearColor","from","to","v","fromExpo","expo","Math","sqrt","colorTypes","hex","rgba","hsla","asRGBA","color","type","find","test","warning","model","parse","hslaToRgba","mixColor","fromRGBA","toRGBA","mixImmediate","blended","red","green","blue","alpha","mixNumber","transform"],"mappings":"+YAYaA,MAAAA,EAAiBA,CAACC,EAAcC,EAAYC,KACrD,MAAMC,EAAWH,EAAOA,EAClBI,EAAOF,GAAKD,EAAKA,EAAKE,GAAYA,EACxC,OAAOC,EAAO,EAAI,EAAIC,KAAKC,KAAKF,IAG9BG,EAAa,CAACC,EAAAA,IAAKC,EAAIA,KAAEC,EAAIA,MAInC,SAASC,EAAOC,GACZ,MAAMC,GAJYX,EAIQU,EAH1BL,EAAWO,KAAMD,GAASA,EAAKE,KAAKb,KADlBA,MAMlB,IAAKW,EAMD,OALAG,EAAOA,SACH,EACA,IAAIJ,wEACJ,yBAEG,EAGX,IAAIK,EAAQJ,EAAKK,MAAMN,GAOvB,OALIC,IAASH,EAAAA,OAETO,EAAQE,EAAAA,WAAWF,IAGhBA,CACX,kBAEwBG,CAACpB,EAAsBC,KAC3C,MAAMoB,EAAWV,EAAOX,GAClBsB,EAASX,EAAOV,GAEtB,IAAKoB,IAAaC,EACd,OAAOC,EAAYA,aAACvB,EAAMC,GAG9B,MAAMuB,EAAU,IAAKH,GAErB,OAAQnB,IACJsB,EAAQC,IAAM1B,EAAesB,EAASI,IAAKH,EAAOG,IAAKvB,GACvDsB,EAAQE,MAAQ3B,EAAesB,EAASK,MAAOJ,EAAOI,MAAOxB,GAC7DsB,EAAQG,KAAO5B,EAAesB,EAASM,KAAML,EAAOK,KAAMzB,GAC1DsB,EAAQI,MAAQC,EAAAA,UAAUR,EAASO,MAAON,EAAOM,MAAO1B,GACjDO,EAAIA,KAACqB,UAAWN"}
1
+ {"version":3,"file":"color.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/utils/mix/color.mjs"],"sourcesContent":["import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n if (!type) {\n process.env.NODE_ENV !== \"production\" &&\n warning(false, `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n return false;\n }\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n"],"names":["mixLinearColor","from","to","v","fromExpo","expo","Math","sqrt","colorTypes","hex","rgba","hsla","asRGBA","color","type","find","test","process","env","NODE_ENV","warning","model","parse","hslaToRgba","mixColor","fromRGBA","toRGBA","mixImmediate","blended","red","green","blue","alpha","mixNumber","transform"],"mappings":"+YAYaA,MAAAA,EAAiBA,CAACC,EAAcC,EAAYC,KACrD,MAAMC,EAAWH,EAAOA,EAClBI,EAAOF,GAAKD,EAAKA,EAAKE,GAAYA,EACxC,OAAOC,EAAO,EAAI,EAAIC,KAAKC,KAAKF,IAG9BG,EAAa,CAACC,EAAAA,IAAKC,EAAIA,KAAEC,EAAIA,MAInC,SAASC,EAAOC,GACZ,MAAMC,GAJYX,EAIQU,EAH1BL,EAAWO,KAAMD,GAASA,EAAKE,KAAKb,KADlBA,MAMlB,IAAKW,EAOD,MANyB,eAAzBG,QAAQC,IAAIC,UACRC,EAAAA,SACI,EACA,IAAIP,wEACJ,yBAED,EAGX,IAAIQ,EAAQP,EAAKQ,MAAMT,GAOvB,OALIC,IAASH,EAAAA,OAETU,EAAQE,EAAAA,WAAWF,IAGhBA,CACX,kBAEwBG,CAACvB,EAAsBC,KAC3C,MAAMuB,EAAWb,EAAOX,GAClByB,EAASd,EAAOV,GAEtB,IAAKuB,IAAaC,EACd,OAAOC,EAAYA,aAAC1B,EAAMC,GAG9B,MAAM0B,EAAU,IAAKH,GAErB,OAAQtB,IACJyB,EAAQC,IAAM7B,EAAeyB,EAASI,IAAKH,EAAOG,IAAK1B,GACvDyB,EAAQE,MAAQ9B,EAAeyB,EAASK,MAAOJ,EAAOI,MAAO3B,GAC7DyB,EAAQG,KAAO/B,EAAeyB,EAASM,KAAML,EAAOK,KAAM5B,GAC1DyB,EAAQI,MAAQC,EAAAA,UAAUR,EAASO,MAAON,EAAOM,MAAO7B,GACjDO,EAAIA,KAACwB,UAAWN"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/utils/is-css-variable.mjs.js"),r=require("../../value/types/color/index.mjs.js"),t=require("../../value/types/complex/index.mjs.js"),i=require("./color.mjs.js"),s=require("./immediate.mjs.js"),n=require("./number.mjs.js"),o=require("./visibility.mjs.js"),l=require("../../../../../motion-utils/dist/es/pipe.mjs.js"),a=require("../../../../../motion-utils/dist/es/errors.mjs.js");function u(e,r){return t=>n.mixNumber(e,r,t)}function m(t){return"number"==typeof t?u:"string"==typeof t?e.isCSSVariableToken(t)?s.mixImmediate:r.color.test(t)?i.mixColor:p:Array.isArray(t)?c:"object"==typeof t?r.color.test(t)?i.mixColor:x:s.mixImmediate}function c(e,r){const t=[...e],i=t.length,s=e.map((e,t)=>m(e)(e,r[t]));return e=>{for(let r=0;r<i;r++)t[r]=s[r](e);return t}}function x(e,r){const t={...e,...r},i={};for(const s in t)void 0!==e[s]&&void 0!==r[s]&&(i[s]=m(e[s])(e[s],r[s]));return e=>{for(const r in i)t[r]=i[r](e);return t}}const p=(e,r)=>{const i=t.complex.createTransformer(r),n=t.analyseComplexValue(e),u=t.analyseComplexValue(r);return n.indexes.var.length===u.indexes.var.length&&n.indexes.color.length===u.indexes.color.length&&n.indexes.number.length>=u.indexes.number.length?o.invisibleValues.has(e)&&!u.values.length||o.invisibleValues.has(r)&&!n.values.length?o.mixVisibility(e,r):l.pipe(c(function(e,r){const t=[],i={color:0,var:0,number:0};for(let s=0;s<r.values.length;s++){const n=r.types[s],o=e.indexes[n][i[n]],l=e.values[o]??0;t[s]=l,i[n]++}return t}(n,u),u.values),i):(a.warning(!0,`Complex values '${e}' and '${r}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),s.mixImmediate(e,r))};exports.getMixer=m,exports.mixArray=c,exports.mixComplex=p,exports.mixObject=x;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../animation/utils/is-css-variable.mjs.js"),r=require("../../value/types/color/index.mjs.js"),i=require("../../value/types/complex/index.mjs.js"),s=require("./color.mjs.js"),t=require("./immediate.mjs.js"),n=require("./number.mjs.js"),o=require("./visibility.mjs.js"),l=require("../../../../../motion-utils/dist/es/pipe.mjs.js"),a=require("../../../../../motion-utils/dist/es/errors.mjs.js");function u(e,r){return i=>n.mixNumber(e,r,i)}function m(i){return"number"==typeof i?u:"string"==typeof i?e.isCSSVariableToken(i)?t.mixImmediate:r.color.test(i)?s.mixColor:d:Array.isArray(i)?c:"object"==typeof i?r.color.test(i)?s.mixColor:x:t.mixImmediate}function c(e,r){const i=[...e],s=i.length,t=e.map((e,i)=>m(e)(e,r[i]));return e=>{for(let r=0;r<s;r++)i[r]=t[r](e);return i}}function x(e,r){const i={...e,...r},s={};for(const t in i)void 0!==e[t]&&void 0!==r[t]&&(s[t]=m(e[t])(e[t],r[t]));return e=>{for(const r in s)i[r]=s[r](e);return i}}const d=(e,r)=>{const s=i.analyseComplexValue(e),n=i.analyseComplexValue(r);return s.indexes.var.length===n.indexes.var.length&&s.indexes.color.length===n.indexes.color.length&&s.indexes.number.length>=n.indexes.number.length?o.invisibleValues.has(e)&&!n.values.length||o.invisibleValues.has(r)&&!s.values.length?o.mixVisibility(e,r):l.pipe(c(function(e,r){const i=[],s={color:0,var:0,number:0};for(let t=0;t<r.values.length;t++){const n=r.types[t],o=e.indexes[n][s[n]],l=e.values[o]??0;i[t]=l,s[n]++}return i}(s,n),n.values),i.buildTransformer(n)):("production"!==process.env.NODE_ENV&&a.warning(!0,`Complex values '${e}' and '${r}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),t.mixImmediate(e,r))};exports.getMixer=m,exports.mixArray=c,exports.mixComplex=d,exports.mixObject=x;
2
2
  //# sourceMappingURL=complex.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"complex.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/utils/mix/complex.mjs"],"sourcesContent":["import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n"],"names":["mixNumber","a","b","p","mixNumber$1","getMixer","isCSSVariableToken","mixImmediate","color","test","mixColor","mixComplex","Array","isArray","mixArray","mixObject","output","numValues","length","blendValue","map","v","i","key","undefined","origin","target","template","complex","createTransformer","originStats","analyseComplexValue","targetStats","indexes","var","number","invisibleValues","has","values","mixVisibility","pipe","orderedOrigin","pointers","type","types","originIndex","originValue","matchOrder","warning"],"mappings":"8dAqBA,SAASA,EAAUC,EAAWC,GAC1B,OAAQC,GAAcC,EAAkBJ,UAACC,EAAGC,EAAGC,EACnD,CAEM,SAAUE,EAAYJ,GACxB,MAAiB,iBAANA,EACAD,EACa,iBAANC,EACPK,EAAkBA,mBAACL,GACpBM,eACAC,EAAAA,MAAMC,KAAKR,GACXS,EAAAA,SACAC,EACCC,MAAMC,QAAQZ,GACda,EACa,iBAANb,EACPO,EAAKA,MAACC,KAAKR,GAAKS,EAAAA,SAAWK,EAG/BR,cACX,CAEM,SAAUO,EAASb,EAAiBC,GACtC,MAAMc,EAAS,IAAIf,GACbgB,EAAYD,EAAOE,OAEnBC,EAAalB,EAAEmB,IAAI,CAACC,EAAGC,IAAMjB,EAASgB,EAAThB,CAAYgB,EAAUnB,EAAEoB,KAE3D,OAAQnB,IACJ,IAAK,IAAImB,EAAI,EAAGA,EAAIL,EAAWK,IAC3BN,EAAOM,GAAKH,EAAWG,GAAGnB,GAE9B,OAAOa,EAEf,CAEM,SAAUD,EAAUd,EAAkBC,GACxC,MAAMc,EAAS,IAAKf,KAAMC,GACpBiB,EAAoD,CAAA,EAE1D,IAAK,MAAMI,KAAOP,OACCQ,IAAXvB,EAAEsB,SAAiCC,IAAXtB,EAAEqB,KAC1BJ,EAAWI,GAAOlB,EAASJ,EAAEsB,GAAXlB,CACdJ,EAAEsB,GACFrB,EAAEqB,KAKd,OAAQF,IACJ,IAAK,MAAME,KAAOJ,EACdH,EAAOO,GAAOJ,EAAWI,GAAKF,GAElC,OAAOL,EAEf,CAuBaL,MAAAA,EAAaA,CACtBc,EACAC,KAEA,MAAMC,EAAWC,EAAAA,QAAQC,kBAAkBH,GACrCI,EAAcC,sBAAoBN,GAClCO,EAAcD,sBAAoBL,GAMxC,OAJII,EAAYG,QAAQC,IAAIhB,SAAWc,EAAYC,QAAQC,IAAIhB,QAC3DY,EAAYG,QAAQzB,MAAMU,SAAWc,EAAYC,QAAQzB,MAAMU,QAC/DY,EAAYG,QAAQE,OAAOjB,QAAUc,EAAYC,QAAQE,OAAOjB,OAI3DkB,EAAAA,gBAAgBC,IAAIZ,KAChBO,EAAYM,OAAOpB,QACvBkB,EAAAA,gBAAgBC,IAAIX,KAChBI,EAAYQ,OAAOpB,OAEjBqB,EAAaA,cAACd,EAAkBC,GAGpCc,EAAIA,KACP1B,EA5CZ,SACIW,EACAC,GAEA,MAAMe,EAA+B,GAE/BC,EAAW,CAAElC,MAAO,EAAG0B,IAAK,EAAGC,OAAQ,GAE7C,IAAK,IAAIb,EAAI,EAAGA,EAAII,EAAOY,OAAOpB,OAAQI,IAAK,CAC3C,MAAMqB,EAAOjB,EAAOkB,MAAMtB,GACpBuB,EAAcpB,EAAOQ,QAAQU,GAAMD,EAASC,IAC5CG,EAAcrB,EAAOa,OAAOO,IAAgB,EAElDJ,EAAcnB,GAAKwB,EAEnBJ,EAASC,IACb,CAEA,OAAOF,CACX,CAyBqBM,CAAWjB,EAAaE,GAAcA,EAAYM,QAC3DX,IAGJqB,WACI,EACA,mBAAmBvB,WAAgBC,4KACnC,4BAGGnB,EAAYA,aAACkB,EAAQC"}
1
+ {"version":3,"file":"complex.mjs.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/utils/mix/complex.mjs"],"sourcesContent":["import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { analyseComplexValue, buildTransformer } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), buildTransformer(targetStats));\n }\n else {\n process.env.NODE_ENV !== \"production\" &&\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n"],"names":["mixNumber","a","b","p","mixNumber$1","getMixer","isCSSVariableToken","mixImmediate","color","test","mixColor","mixComplex","Array","isArray","mixArray","mixObject","output","numValues","length","blendValue","map","v","i","key","undefined","origin","target","originStats","analyseComplexValue","targetStats","indexes","var","number","invisibleValues","has","values","mixVisibility","pipe","orderedOrigin","pointers","type","types","originIndex","originValue","matchOrder","buildTransformer","process","env","NODE_ENV","warning"],"mappings":"8dAqBA,SAASA,EAAUC,EAAWC,GAC1B,OAAQC,GAAcC,EAAkBJ,UAACC,EAAGC,EAAGC,EACnD,CAEM,SAAUE,EAAYJ,GACxB,MAAiB,iBAANA,EACAD,EACa,iBAANC,EACPK,EAAkBA,mBAACL,GACpBM,eACAC,EAAAA,MAAMC,KAAKR,GACXS,EAAAA,SACAC,EACCC,MAAMC,QAAQZ,GACda,EACa,iBAANb,EACPO,EAAKA,MAACC,KAAKR,GAAKS,EAAAA,SAAWK,EAG/BR,cACX,CAEM,SAAUO,EAASb,EAAiBC,GACtC,MAAMc,EAAS,IAAIf,GACbgB,EAAYD,EAAOE,OAEnBC,EAAalB,EAAEmB,IAAI,CAACC,EAAGC,IAAMjB,EAASgB,EAAThB,CAAYgB,EAAUnB,EAAEoB,KAE3D,OAAQnB,IACJ,IAAK,IAAImB,EAAI,EAAGA,EAAIL,EAAWK,IAC3BN,EAAOM,GAAKH,EAAWG,GAAGnB,GAE9B,OAAOa,EAEf,CAEM,SAAUD,EAAUd,EAAkBC,GACxC,MAAMc,EAAS,IAAKf,KAAMC,GACpBiB,EAAoD,CAAA,EAE1D,IAAK,MAAMI,KAAOP,OACCQ,IAAXvB,EAAEsB,SAAiCC,IAAXtB,EAAEqB,KAC1BJ,EAAWI,GAAOlB,EAASJ,EAAEsB,GAAXlB,CACdJ,EAAEsB,GACFrB,EAAEqB,KAKd,OAAQF,IACJ,IAAK,MAAME,KAAOJ,EACdH,EAAOO,GAAOJ,EAAWI,GAAKF,GAElC,OAAOL,EAEf,CAuBaL,MAAAA,EAAaA,CACtBc,EACAC,KAEA,MAAMC,EAAcC,sBAAoBH,GAClCI,EAAcD,sBAAoBF,GAMxC,OAJIC,EAAYG,QAAQC,IAAIb,SAAWW,EAAYC,QAAQC,IAAIb,QAC3DS,EAAYG,QAAQtB,MAAMU,SAAWW,EAAYC,QAAQtB,MAAMU,QAC/DS,EAAYG,QAAQE,OAAOd,QAAUW,EAAYC,QAAQE,OAAOd,OAI3De,EAAAA,gBAAgBC,IAAIT,KAChBI,EAAYM,OAAOjB,QACvBe,EAAAA,gBAAgBC,IAAIR,KAChBC,EAAYQ,OAAOjB,OAEjBkB,EAAaA,cAACX,EAAkBC,GAGpCW,OACHvB,EA3CZ,SACIW,EACAC,GAEA,MAAMY,EAA+B,GAE/BC,EAAW,CAAE/B,MAAO,EAAGuB,IAAK,EAAGC,OAAQ,GAE7C,IAAK,IAAIV,EAAI,EAAGA,EAAII,EAAOS,OAAOjB,OAAQI,IAAK,CAC3C,MAAMkB,EAAOd,EAAOe,MAAMnB,GACpBoB,EAAcjB,EAAOK,QAAQU,GAAMD,EAASC,IAC5CG,EAAclB,EAAOU,OAAOO,IAAgB,EAElDJ,EAAchB,GAAKqB,EAEnBJ,EAASC,IACb,CAEA,OAAOF,CACX,CAwBqBM,CAAWjB,EAAaE,GAAcA,EAAYM,QAC3DU,mBAAiBhB,KAGI,eAAzBiB,QAAQC,IAAIC,UACRC,EAAAA,SACI,EACA,mBAAmBxB,WAAgBC,4KACnC,4BAGDnB,EAAYA,aAACkB,EAAQC"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-elements.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/utils/resolve-elements.mjs"],"sourcesContent":["import { activeScope } from '../scope/active.mjs';\n\nfunction resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n const root = scope\n ? scope.current\n : activeScope.current?.root || document;\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n"],"names":["resolveElements","elementOrSelector","scope","selectorCache","EventTarget","root","current","activeScope","document","elements","querySelectorAll","Array","from","filter","element"],"mappings":"oIAuBgBA,SACZC,EACAC,EACAC,GAEA,GAAyB,MAArBF,EACA,MAAO,GAGX,GAAIA,aAA6BG,YAC7B,MAAO,CAACH,GACL,GAAiC,iBAAtBA,EAAgC,CAC9C,MAAMI,EAA6BH,EAC7BA,EAAMI,QACNC,EAAAA,YAAYD,SAASD,MAAQG,SAE7BC,EACFN,IAAgBF,IAChBI,EAAKK,iBAAiBT,GAE1B,OAAOQ,EAAWE,MAAMC,KAAKH,GAAY,EAC7C,CAEA,OAAOE,MAAMC,KAAKX,GAAmBY,OAChCC,GAA2C,MAAXA,EAEzC"}
1
+ {"version":3,"file":"resolve-elements.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/utils/resolve-elements.mjs"],"sourcesContent":["import { activeScope } from '../scope/active.mjs';\n\nfunction resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n const root = scope\n ? scope.current\n : activeScope.current?.root || document;\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n"],"names":["resolveElements","elementOrSelector","scope","selectorCache","EventTarget","root","current","activeScope","document","elements","querySelectorAll","Array","from","filter","element"],"mappings":"oIA6BgBA,SACZC,EACAC,EACAC,GAEA,GAAyB,MAArBF,EACA,MAAO,GAGX,GAAIA,aAA6BG,YAC7B,MAAO,CAACH,GACL,GAAiC,iBAAtBA,EAAgC,CAC9C,MAAMI,EAA6BH,EAC7BA,EAAMI,QACNC,EAAAA,YAAYD,SAASD,MAAQG,SAE7BC,EACFN,IAAgBF,IAChBI,EAAKK,iBAAiBT,GAE1B,OAAOQ,EAAWE,MAAMC,KAAKH,GAAY,EAC7C,CAEA,OAAOE,MAAMC,KAAKX,GAAmBY,OAChCC,GAA2C,MAAXA,EAEzC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../frameloop/sync-time.mjs.js"),e=require("../frameloop/frame.mjs.js"),s=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),i=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js"),n=require("../../../../motion-utils/dist/es/velocity-per-second.mjs.js");class r{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const s=t.time.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){var s;this.current=e,this.updatedAt=t.time.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(s=this.current,!isNaN(parseFloat(s))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&s.warnOnce(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){var s;return"change"===t?this.onChangeSubscribe(e):((s=this.events)[t]||(s[t]=new i.SubscriptionManager)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new i.SubscriptionManager,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){e.frame.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=t.time.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,30);return n.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0;let s,i=!1;s=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===s&&this.clearAnimation(),e()}),i||(this.animation=s),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}exports.MotionValue=r,exports.motionValue=function(t,e){return new r(t,e)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../frameloop/sync-time.mjs.js"),e=require("../frameloop/frame.mjs.js"),s=require("../../../../motion-utils/dist/es/warn-once.mjs.js"),i=require("../../../../motion-utils/dist/es/subscription-manager.mjs.js"),n=require("../../../../motion-utils/dist/es/velocity-per-second.mjs.js");const r={current:void 0};class a{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const s=t.time.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){var s;this.current=e,this.updatedAt=t.time.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(s=this.current,!isNaN(parseFloat(s))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&s.warnOnce(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){var s;return"change"===t?this.onChangeSubscribe(e):((s=this.events)[t]||(s[t]=new i.SubscriptionManager)).add(e)}onChangeSubscribe(t){const{events:e}=this;return e.change||this.changeSubscriber?(e.change||(e.change=new i.SubscriptionManager,e.change.add(this.changeSubscriber),this.changeSubscriber=void 0),e.change.add(t)):this.changeSubscriber=t,()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:e.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){e.frame.read(()=>{this.changeSubscriber||this.events.change?.getSize()||this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(e,s=!0){s&&(this.updatedAt=t.time.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:e}=this;e?e(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){r.current?.push(this);const t=this.animation?.liveValue?.();return void 0===t?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=t.time.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,30);return n.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return new Promise(e=>this.run(t,e))}run(t,e){this.stop(),this.hasAnimated=!0;let s,i=!1;s=t(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===s&&(this.animation=void 0),e?.()}),i||(this.animation=s),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}exports.MotionValue=a,exports.collectMotionValues=r,exports.motionValue=function(t,e){return new a(t,e)};
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/value/index.mjs"],"sourcesContent":["import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.notifyChange();\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n var _a;\n if (eventName === \"change\")\n return this.onChangeSubscribe(callback);\n return ((_a = this.events)[eventName] || (_a[eventName] = new SubscriptionManager())).add(callback);\n }\n onChangeSubscribe(callback) {\n const { events } = this;\n if (!events.change && !this.changeSubscriber) {\n this.changeSubscriber = callback;\n }\n else {\n if (!events.change) {\n events.change = new SubscriptionManager();\n events.change.add(this.changeSubscriber);\n this.changeSubscriber = undefined;\n }\n events.change.add(callback);\n }\n return () => {\n if (this.changeSubscriber === callback) {\n this.changeSubscriber = undefined;\n }\n else {\n events.change?.remove(callback);\n }\n this.stopIfUnobserved();\n };\n }\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n stopIfUnobserved() {\n frame.read(() => {\n if (!this.changeSubscriber && !this.events.change?.getSize()) {\n this.stop();\n }\n });\n }\n clearListeners() {\n this.changeSubscriber = undefined;\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.notifyChange();\n }\n notifyChange() {\n const { current, changeSubscriber } = this;\n /**\n * One or the other exists. Subscribing during the direct\n * subscriber's call moves it into a new manager, which must not\n * then be notified for the same change.\n */\n if (changeSubscriber) {\n changeSubscriber(current);\n }\n else {\n this.events.change?.notify(current);\n }\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n /**\n * A value animating on the compositor isn't updated every frame,\n * so read it from its animation.\n */\n const sampled = this.animation?.liveValue?.();\n return sampled === undefined ? this.current : sampled;\n }\n /**\n * The value as last set. Unlike get(), this doesn't read an animation\n * running on the compositor, which renders the value itself.\n */\n getCurrent() {\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n /**\n * Complete synchronously via the callback rather than chaining a\n * second promise per animation. Guard against animations that\n * complete before startAnimation has returned.\n */\n let isComplete = false;\n let animation;\n // eslint-disable-next-line prefer-const -- read by the callback before assignment when completing synchronously\n animation = startAnimation(() => {\n isComplete = true;\n this.events.animationComplete?.notify();\n if (this.animation === animation)\n this.clearAnimation();\n resolve();\n });\n if (!isComplete)\n this.animation = animation;\n this.events.animationStart?.notify();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n // Assign rather than delete to keep the object's shape stable\n this.animation = undefined;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n"],"names":["MotionValue","constructor","init","options","this","canTrackVelocity","events","updateAndNotify","v","currentTime","time","now","updatedAt","setPrevFrameValue","prev","current","setCurrent","notifyChange","dependents","dependent","dirty","hasAnimated","owner","value","undefined","isNaN","parseFloat","prevFrameValue","prevUpdatedAt","onChange","subscription","process","env","NODE_ENV","warnOnce","on","eventName","callback","onChangeSubscribe","_a","SubscriptionManager","add","change","changeSubscriber","remove","stopIfUnobserved","frame","read","getSize","stop","clearListeners","eventManagers","clear","attach","passiveEffect","stopPassiveEffect","set","setWithVelocity","delta","jump","endAnimation","notify","addDependent","Set","removeDependent","delete","get","sampled","animation","liveValue","getCurrent","getPrevious","getVelocity","Math","min","velocityPerSecond","start","startAnimation","Promise","resolve","isComplete","animationComplete","clearAnimation","animationStart","animationCancel","isAnimating","destroy"],"mappings":"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"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../node_modules/motion-dom/dist/es/value/index.mjs"],"sourcesContent":["import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.dirty();\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n var _a;\n if (eventName === \"change\")\n return this.onChangeSubscribe(callback);\n return ((_a = this.events)[eventName] || (_a[eventName] = new SubscriptionManager())).add(callback);\n }\n onChangeSubscribe(callback) {\n const { events } = this;\n if (!events.change && !this.changeSubscriber) {\n this.changeSubscriber = callback;\n }\n else {\n if (!events.change) {\n events.change = new SubscriptionManager();\n events.change.add(this.changeSubscriber);\n this.changeSubscriber = undefined;\n }\n events.change.add(callback);\n }\n return () => {\n if (this.changeSubscriber === callback) {\n this.changeSubscriber = undefined;\n }\n else {\n events.change?.remove(callback);\n }\n this.stopIfUnobserved();\n };\n }\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n stopIfUnobserved() {\n frame.read(() => {\n if (!this.changeSubscriber && !this.events.change?.getSize()) {\n this.stop();\n }\n });\n }\n clearListeners() {\n this.changeSubscriber = undefined;\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v) {\n this.passiveEffect\n ? this.passiveEffect(v, this.updateAndNotify)\n : this.updateAndNotify(v);\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n if (endAnimation) {\n /**\n * Stop first, as stopping a running animation can set the\n * value it's showing, which would replace v. Marking the value\n * as updated now skips a JS animation's catch-up tick on stop,\n * which could otherwise complete it.\n */\n this.updatedAt = time.now();\n this.stop();\n }\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n this.stopPassiveEffect?.();\n }\n dirty() {\n const { current, changeSubscriber } = this;\n /**\n * One or the other exists. Subscribing during the direct\n * subscriber's call moves it into a new manager, which must not\n * then be notified for the same change.\n */\n if (changeSubscriber) {\n changeSubscriber(current);\n }\n else {\n this.events.change?.notify(current);\n }\n }\n addDependent(dependent) {\n (this.dependents || (this.dependents = new Set())).add(dependent);\n }\n removeDependent(dependent) {\n this.dependents?.delete(dependent);\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n collectMotionValues.current?.push(this);\n /**\n * A value animating on the compositor isn't updated every frame,\n * so read it from its animation.\n */\n const sampled = this.animation?.liveValue?.();\n return sampled === undefined ? this.current : sampled;\n }\n /**\n * The value as last set. Unlike get(), this doesn't read an animation\n * running on the compositor, which renders the value itself.\n */\n getCurrent() {\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n return new Promise((resolve) => this.run(startAnimation, resolve));\n }\n /**\n * As start(), without making a promise, for animations started\n * internally, which complete through their own controls.\n */\n run(startAnimation, onComplete) {\n this.stop();\n this.hasAnimated = true;\n /**\n * Guard against animations that complete before startAnimation\n * has returned.\n */\n let isComplete = false;\n let animation;\n // eslint-disable-next-line prefer-const -- read by the callback before assignment when completing synchronously\n animation = startAnimation(() => {\n isComplete = true;\n this.events.animationComplete?.notify();\n if (this.animation === animation)\n this.animation = undefined;\n onComplete?.();\n });\n if (!isComplete)\n this.animation = animation;\n this.events.animationStart?.notify();\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n this.events.animationCancel?.notify();\n }\n // Assign rather than delete to keep the object's shape stable\n this.animation = undefined;\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n this.stopPassiveEffect?.();\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n"],"names":["collectMotionValues","current","undefined","MotionValue","constructor","init","options","this","canTrackVelocity","events","updateAndNotify","v","currentTime","time","now","updatedAt","setPrevFrameValue","prev","setCurrent","dirty","dependents","dependent","hasAnimated","owner","value","isNaN","parseFloat","prevFrameValue","prevUpdatedAt","onChange","subscription","process","env","NODE_ENV","warnOnce","on","eventName","callback","onChangeSubscribe","_a","SubscriptionManager","add","change","changeSubscriber","remove","stopIfUnobserved","frame","read","getSize","stop","clearListeners","eventManagers","clear","attach","passiveEffect","stopPassiveEffect","set","setWithVelocity","delta","jump","endAnimation","notify","addDependent","Set","removeDependent","delete","get","push","sampled","animation","liveValue","getCurrent","getPrevious","getVelocity","Math","min","velocityPerSecond","start","startAnimation","Promise","resolve","run","onComplete","isComplete","animationComplete","animationStart","animationCancel","isAnimating","destroy"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("./rgba.mjs.js");const r={test:require("./utils.mjs.js").isColorString("#"),parse:function(s){let r="",t="",e="",n="";return s.length>5?(r=s.substring(1,3),t=s.substring(3,5),e=s.substring(5,7),n=s.substring(7,9)):(r=s.substring(1,2),t=s.substring(2,3),e=s.substring(3,4),n=s.substring(4,5),r+=r,t+=t,e+=e,n+=n),{red:parseInt(r,16),green:parseInt(t,16),blue:parseInt(e,16),alpha:n?parseInt(n,16)/255:1}},transform:s.rgba.transform};exports.hex=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./rgba.mjs.js"),e=require("./utils.mjs.js");const s=(r,e,s)=>{const t=r.substring(1+e*s,1+(e+1)*s);return s>1?t:t+t};const t={test:e.isColorString("#"),parse:function(r){const e=r.length>5?2:1,t=s(r,3,e);return{red:parseInt(s(r,0,e),16),green:parseInt(s(r,1,e),16),blue:parseInt(s(r,2,e),16),alpha:t?parseInt(t,16)/255:1}},transform:r.rgba.transform};exports.hex=t;
2
2
  //# sourceMappingURL=hex.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hex.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/hex.mjs"],"sourcesContent":["import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n"],"names":["hex","test","isColorString","parse","v","r","g","b","a","length","substring","red","parseInt","green","blue","alpha","transform","rgba"],"mappings":"mGAqCO,MAAMA,EAAM,CACfC,+BAAiCC,cAAC,KAClCC,MAnCJ,SAAkBC,GACd,IAAIC,EAAI,GACJC,EAAI,GACJC,EAAI,GACJC,EAAI,GAqBR,OAlBIJ,EAAEK,OAAS,GACXJ,EAAID,EAAEM,UAAU,EAAG,GACnBJ,EAAIF,EAAEM,UAAU,EAAG,GACnBH,EAAIH,EAAEM,UAAU,EAAG,GACnBF,EAAIJ,EAAEM,UAAU,EAAG,KAInBL,EAAID,EAAEM,UAAU,EAAG,GACnBJ,EAAIF,EAAEM,UAAU,EAAG,GACnBH,EAAIH,EAAEM,UAAU,EAAG,GACnBF,EAAIJ,EAAEM,UAAU,EAAG,GACnBL,GAAKA,EACLC,GAAKA,EACLC,GAAKA,EACLC,GAAKA,GAGF,CACHG,IAAKC,SAASP,EAAG,IACjBQ,MAAOD,SAASN,EAAG,IACnBQ,KAAMF,SAASL,EAAG,IAClBQ,MAAOP,EAAII,SAASJ,EAAG,IAAM,IAAM,EAE3C,EAKIQ,UAAWC,EAAIA,KAACD"}
1
+ {"version":3,"file":"hex.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/color/hex.mjs"],"sourcesContent":["import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\n/**\n * #FF0000 has two characters per channel, #F00 one, which is doubled.\n */\nconst channel = (v, i, size) => {\n const c = v.substring(1 + i * size, 1 + (i + 1) * size);\n return size > 1 ? c : c + c;\n};\nfunction parseHex(v) {\n const size = v.length > 5 ? 2 : 1;\n const alpha = channel(v, 3, size);\n return {\n red: parseInt(channel(v, 0, size), 16),\n green: parseInt(channel(v, 1, size), 16),\n blue: parseInt(channel(v, 2, size), 16),\n alpha: alpha ? parseInt(alpha, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n"],"names":["channel","v","i","size","c","substring","hex","test","isColorString","parse","length","alpha","red","parseInt","green","blue","transform","rgba"],"mappings":"+HAOA,MAAMA,EAAUA,CAACC,EAAWC,EAAWC,KACnC,MAAMC,EAAIH,EAAEI,UAAU,EAAIH,EAAIC,EAAM,GAAKD,EAAI,GAAKC,GAClD,OAAOA,EAAO,EAAIC,EAAIA,EAAIA,GAevB,MAAME,EAAM,CACfC,KAAoBC,EAAaA,cAAC,KAClCC,MAdJ,SAAkBR,GACd,MAAME,EAAOF,EAAES,OAAS,EAAI,EAAI,EAC1BC,EAAQX,EAAQC,EAAG,EAAGE,GAE5B,MAAO,CACHS,IAAKC,SAASb,EAAQC,EAAG,EAAGE,GAAO,IACnCW,MAAOD,SAASb,EAAQC,EAAG,EAAGE,GAAO,IACrCY,KAAMF,SAASb,EAAQC,EAAG,EAAGE,GAAO,IACpCQ,MAAOA,EAAQE,SAASF,EAAO,IAAM,IAAM,EAEnD,EAKIK,UAAWC,EAAIA,KAACD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../color/index.mjs.js"),t=require("../utils/color-regex.mjs.js"),s=require("../utils/float-regex.mjs.js"),r=require("../utils/sanitize.mjs.js");const o=new RegExp(s.floatRegex.source),n=new RegExp(t.colorRegex.source,"i");const u="number",l="color",i=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function a(t){const s=t.toString(),r=[],o={color:[],number:[],var:[]},n=[];let a=0;const c=s.replace(i,t=>(e.color.test(t)?(o.color.push(a),n.push(l),r.push(e.color.parse(t))):t.startsWith("var(")?(o.var.push(a),n.push("var"),r.push(t)):(o.number.push(a),n.push(u),r.push(parseFloat(t))),++a,"${}")).split("${}");return{values:r,split:c,indexes:o,types:n}}function c({split:t,types:s}){const o=t.length;return n=>{let i="";for(let a=0;a<o;a++)if(i+=t[a],void 0!==n[a]){const t=s[a];i+=t===u?r.sanitize(n[a]):t===l?e.color.transform(n[a]):n[a]}return i}}const p=(t,s)=>{return"number"==typeof t?s?.trim().endsWith("/")?t:0:"number"==typeof(r=t)?0:e.color.test(r)?e.color.getAnimatableNone(r):r;var r};const f={test:function(e){return isNaN(e)&&"string"==typeof e&&(o.test(e)||n.test(e))},parse:function(e){return a(e).values},createTransformer:function(e){return c(a(e))},getAnimatableNone:function(e){const t=a(e);return c(t)(t.values.map((e,s)=>p(e,t.split[s])))}};exports.analyseComplexValue=a,exports.complex=f,exports.hasComplexValues=function(e){const t=e.toString();return o.test(t)||n.test(t)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../color/index.mjs.js"),t=require("../utils/color-regex.mjs.js"),s=require("../utils/float-regex.mjs.js"),r=require("../utils/sanitize.mjs.js");const o=new RegExp(s.floatRegex.source),n=new RegExp(t.colorRegex.source,"i");const u="number",l="color",i=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;function a(t){const s=t.toString(),r=[],o={color:[],number:[],var:[]},n=[];let a=0;const c=s.replace(i,t=>(e.color.test(t)?(o.color.push(a),n.push(l),r.push(e.color.parse(t))):t.startsWith("var(")?(o.var.push(a),n.push("var"),r.push(t)):(o.number.push(a),n.push(u),r.push(parseFloat(t))),++a,"${}")).split("${}");return{values:r,split:c,indexes:o,types:n}}function c({split:t,types:s}){const o=t.length;return n=>{let i="";for(let a=0;a<o;a++)if(i+=t[a],void 0!==n[a]){const t=s[a];i+=t===u?r.sanitize(n[a]):t===l?e.color.transform(n[a]):n[a]}return i}}const p=(t,s)=>{return"number"==typeof t?s?.trim().endsWith("/")?t:0:"number"==typeof(r=t)?0:e.color.test(r)?e.color.getAnimatableNone(r):r;var r};const f={test:function(e){return isNaN(e)&&"string"==typeof e&&(o.test(e)||n.test(e))},parse:function(e){return a(e).values},createTransformer:function(e){return c(a(e))},getAnimatableNone:function(e){const t=a(e);return c(t)(t.values.map((e,s)=>p(e,t.split[s])))}};exports.analyseComplexValue=a,exports.buildTransformer=c,exports.complex=f,exports.hasComplexValues=function(e){const t=e.toString();return o.test(t)||n.test(t)};
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/complex/index.mjs"],"sourcesContent":["import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\n/**\n * Non-global copies of the token regexes so test() can use .test()\n * (no match array, stops at the first token) without lastIndex state.\n */\nconst hasFloat = /*@__PURE__*/ new RegExp(floatRegex.source);\nconst hasColor = /*@__PURE__*/ new RegExp(colorRegex.source, \"i\");\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (hasFloat.test(v) || hasColor.test(v)));\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`.\n// The lookahead skips digits in function names, like the 3 in matrix3d(.\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?![a-z]*\\()/giu;\n/**\n * Whether analyseComplexValue(value) would find any values, without\n * tokenising the string. CSS variables are resolved before this is\n * used, so it's enough to look for a number or a color.\n */\nfunction hasComplexValues(value) {\n const asString = value.toString();\n return hasFloat.test(asString) || hasColor.test(asString);\n}\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex, hasComplexValues };\n//# sourceMappingURL=index.mjs.map\n"],"names":["hasFloat","RegExp","floatRegex","source","hasColor","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","value","originalValue","toString","values","indexes","color","number","var","types","i","split","replace","parsedValue","test","push","parse","startsWith","parseFloat","buildTransformer","numSections","length","v","output","undefined","type","sanitize","transform","convertToZero","splitBefore","trim","endsWith","getAnimatableNone","complex","isNaN","createTransformer","info","transformer","map","asString"],"mappings":"mOAYA,MAAMA,EAAyB,IAAIC,OAAOC,EAAUA,WAACC,QAC/CC,EAAyB,IAAIH,OAAOI,EAAUA,WAACF,OAAQ,KAU7D,MAAMG,EAAe,SACfC,EAAc,QAwBdC,EACF,8OAYE,SAAUC,EACZC,GAEA,MAAMC,EAAgBD,EAAME,WAEtBC,EAAwB,GACxBC,EAAwB,CAC1BC,MAAO,GACPC,OAAQ,GACRC,IAAK,IAEHC,EAAmC,GAEzC,IAAIC,EAAI,EACR,MAiBMC,EAjBYT,EAAcU,QAAQb,EAAec,IAC/CP,EAAKA,MAACQ,KAAKD,IACXR,EAAQC,MAAMS,KAAKL,GACnBD,EAAMM,KAAKjB,GACXM,EAAOW,KAAKT,EAAAA,MAAMU,MAAMH,KACjBA,EAAYI,WAtDJ,SAuDfZ,EAAQG,IAAIO,KAAKL,GACjBD,EAAMM,KAzDA,OA0DNX,EAAOW,KAAKF,KAEZR,EAAQE,OAAOQ,KAAKL,GACpBD,EAAMM,KAAKlB,GACXO,EAAOW,KAAKG,WAAWL,OAEzBH,EA9DU,QAiEQC,MAjER,OAmEhB,MAAO,CAAEP,SAAQO,QAAON,UAASI,QACrC,CAMA,SAASU,GAAiBR,MAAEA,EAAKF,MAAEA,IAC/B,MAAMW,EAAcT,EAAMU,OAC1B,OAAQC,IACJ,IAAIC,EAAS,GACb,IAAK,IAAIb,EAAI,EAAGA,EAAIU,EAAaV,IAE7B,GADAa,GAAUZ,EAAMD,QACHc,IAATF,EAAEZ,GAAkB,CACpB,MAAMe,EAAOhB,EAAMC,GAEfa,GADAE,IAAS5B,EACC6B,EAAQA,SAACJ,EAAEZ,IACde,IAAS3B,EACNQ,EAAAA,MAAMqB,UAAUL,EAAEZ,IAElBY,EAAEZ,EAEpB,CAGJ,OAAOa,EAEf,CAMA,MAiBMK,EAAgBA,CAClB3B,EACA4B,KAEA,MAAqB,iBAAV5B,EACA4B,GAAaC,OAAOC,SAAS,KAAO9B,EAAQ,EArB1C,iBADaqB,EAwBErB,GAvBJ,EAAIK,EAAKA,MAACQ,KAAKQ,GAAKhB,EAAKA,MAAC0B,kBAAkBV,GAAKA,EAD/CA,OAmCvB,MAAMW,EAAU,CACnBnB,KApJJ,SAAcQ,GACV,OACIY,MAAMZ,IACO,iBAANA,IACN/B,EAASuB,KAAKQ,IAAM3B,EAASmB,KAAKQ,GAE3C,EA+IIN,MAnEJ,SAA2BM,GACvB,OAAOtB,EAAoBsB,GAAGlB,MAClC,EAkEI+B,kBA1CJ,SAA2BzC,GACvB,OAAOyB,EAAiBnB,EAAoBN,GAChD,EAyCIsC,kBAZJ,SAA2BV,GACvB,MAAMc,EAAOpC,EAAoBsB,GAEjC,OADoBH,EAAiBiB,EAC9BC,CACHD,EAAKhC,OAAOkC,IAAI,CAACrC,EAAOS,IAAMkB,EAAc3B,EAAOmC,EAAKzB,MAAMD,KAEtE,4EAxGM,SAA2BT,GAC7B,MAAMsC,EAAWtC,EAAME,WACvB,OAAOZ,EAASuB,KAAKyB,IAAa5C,EAASmB,KAAKyB,EACpD"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/complex/index.mjs"],"sourcesContent":["import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\n/**\n * Non-global copies of the token regexes so test() can use .test()\n * (no match array, stops at the first token) without lastIndex state.\n */\nconst hasFloat = /*@__PURE__*/ new RegExp(floatRegex.source);\nconst hasColor = /*@__PURE__*/ new RegExp(colorRegex.source, \"i\");\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (hasFloat.test(v) || hasColor.test(v)));\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`.\n// The lookahead skips digits in function names, like the 3 in matrix3d(.\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?![a-z]*\\()/giu;\n/**\n * Whether analyseComplexValue(value) would find any values, without\n * tokenising the string. CSS variables are resolved before this is\n * used, so it's enough to look for a number or a color.\n */\nfunction hasComplexValues(value) {\n const asString = value.toString();\n return hasFloat.test(asString) || hasColor.test(asString);\n}\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, buildTransformer, complex, hasComplexValues };\n//# sourceMappingURL=index.mjs.map\n"],"names":["hasFloat","RegExp","floatRegex","source","hasColor","colorRegex","NUMBER_TOKEN","COLOR_TOKEN","complexRegex","analyseComplexValue","value","originalValue","toString","values","indexes","color","number","var","types","i","split","replace","parsedValue","test","push","parse","startsWith","parseFloat","buildTransformer","numSections","length","v","output","undefined","type","sanitize","transform","convertToZero","splitBefore","trim","endsWith","getAnimatableNone","complex","isNaN","createTransformer","info","transformer","map","asString"],"mappings":"mOAYA,MAAMA,EAAyB,IAAIC,OAAOC,EAAUA,WAACC,QAC/CC,EAAyB,IAAIH,OAAOI,EAAUA,WAACF,OAAQ,KAU7D,MAAMG,EAAe,SACfC,EAAc,QAwBdC,EACF,8OAYE,SAAUC,EACZC,GAEA,MAAMC,EAAgBD,EAAME,WAEtBC,EAAwB,GACxBC,EAAwB,CAC1BC,MAAO,GACPC,OAAQ,GACRC,IAAK,IAEHC,EAAmC,GAEzC,IAAIC,EAAI,EACR,MAiBMC,EAjBYT,EAAcU,QAAQb,EAAec,IAC/CP,EAAKA,MAACQ,KAAKD,IACXR,EAAQC,MAAMS,KAAKL,GACnBD,EAAMM,KAAKjB,GACXM,EAAOW,KAAKT,EAAAA,MAAMU,MAAMH,KACjBA,EAAYI,WAtDJ,SAuDfZ,EAAQG,IAAIO,KAAKL,GACjBD,EAAMM,KAzDA,OA0DNX,EAAOW,KAAKF,KAEZR,EAAQE,OAAOQ,KAAKL,GACpBD,EAAMM,KAAKlB,GACXO,EAAOW,KAAKG,WAAWL,OAEzBH,EA9DU,QAiEQC,MAjER,OAmEhB,MAAO,CAAEP,SAAQO,QAAON,UAASI,QACrC,CAMgBU,SAAAA,GAAiBR,MAAEA,EAAKF,MAAEA,IACtC,MAAMW,EAAcT,EAAMU,OAC1B,OAAQC,IACJ,IAAIC,EAAS,GACb,IAAK,IAAIb,EAAI,EAAGA,EAAIU,EAAaV,IAE7B,GADAa,GAAUZ,EAAMD,QACHc,IAATF,EAAEZ,GAAkB,CACpB,MAAMe,EAAOhB,EAAMC,GAEfa,GADAE,IAAS5B,EACC6B,EAAQA,SAACJ,EAAEZ,IACde,IAAS3B,EACNQ,EAAAA,MAAMqB,UAAUL,EAAEZ,IAElBY,EAAEZ,EAEpB,CAGJ,OAAOa,EAEf,CAMA,MAiBMK,EAAgBA,CAClB3B,EACA4B,KAEA,MAAqB,iBAAV5B,EACA4B,GAAaC,OAAOC,SAAS,KAAO9B,EAAQ,EArB1C,iBADaqB,EAwBErB,GAvBJ,EAAIK,EAAKA,MAACQ,KAAKQ,GAAKhB,EAAKA,MAAC0B,kBAAkBV,GAAKA,EAD/CA,OAmCvB,MAAMW,EAAU,CACnBnB,KApJJ,SAAcQ,GACV,OACIY,MAAMZ,IACO,iBAANA,IACN/B,EAASuB,KAAKQ,IAAM3B,EAASmB,KAAKQ,GAE3C,EA+IIN,MAnEJ,SAA2BM,GACvB,OAAOtB,EAAoBsB,GAAGlB,MAClC,EAkEI+B,kBA1CJ,SAA2BzC,GACvB,OAAOyB,EAAiBnB,EAAoBN,GAChD,EAyCIsC,kBAZJ,SAA2BV,GACvB,MAAMc,EAAOpC,EAAoBsB,GAEjC,OADoBH,EAAiBiB,EAC9BC,CACHD,EAAKhC,OAAOkC,IAAI,CAACrC,EAAOS,IAAMkB,EAAc3B,EAAOmC,EAAKzB,MAAMD,KAEtE,uGAxGM,SAA2BT,GAC7B,MAAMsC,EAAWtC,EAAME,WACvB,OAAOZ,EAASuB,KAAKyB,IAAa5C,EAASmB,KAAKyB,EACpD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../complex/index.mjs.js"),t=require("../complex/filter.mjs.js"),s=require("../complex/mask.mjs.js"),r=require("../maps/defaults.mjs.js");const a=new Set([t.filter,s.mask]);exports.getAnimatableNone=function(t,s){let l=r.getDefaultValueType(t);return a.has(l)||(l=e.complex),l.getAnimatableNone?l.getAnimatableNone(s):void 0};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../complex/index.mjs.js"),t=require("../complex/filter.mjs.js"),r=require("../complex/mask.mjs.js"),s=require("../maps/defaults.mjs.js");const l=new Set([t.filter,r.mask]);let a,i,m;exports.getAnimatableNone=function(t,r){if(t===a&&r===i)return m;let n=s.getDefaultValueType(t);return l.has(n)||(n=e.complex),m=n.getAnimatableNone?n.getAnimatableNone(r):void 0,a=t,i=r,m};
2
2
  //# sourceMappingURL=animatable-none.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"animatable-none.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs"],"sourcesContent":["import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n"],"names":["customTypes","Set","filter","mask","key","value","defaultValueType","getDefaultValueType","has","complex","getAnimatableNone","undefined"],"mappings":"4NAKA,MAAMA,EAA4B,IAAIC,IAAI,CAACC,EAAAA,OAAQC,EAAAA,iCAE7C,SAA4BC,EAAaC,GAC3C,IAAIC,EAAmBC,sBAAoBH,GAG3C,OAFKJ,EAAYQ,IAAIF,KAA0BA,EAAmBG,EAAAA,SAE3DH,EAAiBI,kBAClBJ,EAAiBI,kBAAkBL,QACnCM,CACV"}
1
+ {"version":3,"file":"animatable-none.mjs.js","sources":["../../../../../../../../node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs"],"sourcesContent":["import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\n/**\n * The last call and its result. animate() on many elements asks for the\n * same none for each one, and parsing the value is the slow part.\n */\nlet lastKey;\nlet lastValue;\nlet lastNone;\nfunction getAnimatableNone(key, value) {\n if (key === lastKey && value === lastValue)\n return lastNone;\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n lastNone = defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n lastKey = key;\n lastValue = value;\n return lastNone;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n"],"names":["customTypes","Set","filter","mask","lastKey","lastValue","lastNone","key","value","defaultValueType","getDefaultValueType","has","complex","getAnimatableNone","undefined"],"mappings":"4NAKA,MAAMA,EAA4B,IAAIC,IAAI,CAACC,EAAAA,OAAQC,EAAAA,OAMnD,IAAIC,EACAC,EACAC,4BAEE,SAA4BC,EAAaC,GAC3C,GAAID,IAAQH,GAAWI,IAAUH,EAAW,OAAOC,EAEnD,IAAIG,EAAmBC,sBAAoBH,GAS3C,OARKP,EAAYW,IAAIF,KAA0BA,EAAmBG,EAAAA,SAElEN,EAAWG,EAAiBI,kBACtBJ,EAAiBI,kBAAkBL,QACnCM,EACNV,EAAUG,EACVF,EAAYG,EAELF,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../errors.mjs.js"),i=require("../../noop.mjs.js"),r=require("../anticipate.mjs.js"),n=require("../back.mjs.js"),t=require("../circ.mjs.js"),s=require("../cubic-bezier.mjs.js"),c=require("../ease.mjs.js"),a=require("./is-bezier-definition.mjs.js");const u={linear:i.noop,easeIn:c.easeIn,easeInOut:c.easeInOut,easeOut:c.easeOut,circIn:t.circIn,circInOut:t.circInOut,circOut:t.circOut,backIn:n.backIn,backInOut:n.backInOut,backOut:n.backOut,anticipate:r.anticipate};exports.easingDefinitionToFunction=i=>{if(a.isBezierDefinition(i)){e.invariant(4===i.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[r,n,t,c]=i;return s.cubicBezier(r,n,t,c)}return"string"==typeof i?(e.invariant(void 0!==u[i],`Invalid easing type '${i}'`,"invalid-easing-type"),u[i]):i};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../errors.mjs.js"),i=require("../../noop.mjs.js"),r=require("../anticipate.mjs.js"),n=require("../back.mjs.js"),s=require("../circ.mjs.js"),t=require("../cubic-bezier.mjs.js"),c=require("../ease.mjs.js"),u=require("./is-bezier-definition.mjs.js");const a={linear:i.noop,easeIn:c.easeIn,easeInOut:c.easeInOut,easeOut:c.easeOut,circIn:s.circIn,circInOut:s.circInOut,circOut:s.circOut,backIn:n.backIn,backInOut:n.backInOut,backOut:n.backOut,anticipate:r.anticipate};exports.easingDefinitionToFunction=i=>{if(u.isBezierDefinition(i)){"undefined"!=typeof process&&"production"!==process.env.NODE_ENV&&e.invariant(4===i.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[r,n,s,c]=i;return t.cubicBezier(r,n,s,c)}return"string"==typeof i?("undefined"!=typeof process&&"production"!==process.env.NODE_ENV&&e.invariant(void 0!==a[i],`Invalid easing type '${i}'`,"invalid-easing-type"),a[i]):i};
2
2
  //# sourceMappingURL=map.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"map.mjs.js","sources":["../../../../../../../node_modules/motion-utils/dist/es/easing/utils/map.mjs"],"sourcesContent":["import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n"],"names":["easingLookup","linear","noop","easeIn","easeInOut","easeOut","circIn","circInOut","circOut","backIn","backInOut","backOut","anticipate","definition","isBezierDefinition","invariant","length","x1","y1","x2","y2","cubicBezier","undefined"],"mappings":"6UAUA,MAAMA,EAAe,CACjBC,OAAQC,EAAIA,YACZC,EAAMA,iBACNC,EAASA,kBACTC,EAAOA,eACPC,EAAMA,iBACNC,EAASA,kBACTC,EAAOA,eACPC,EAAMA,iBACNC,EAASA,kBACTC,EAAOA,QACPC,WAAAA,EAAAA,+CAQAC,IAEA,GAAIC,EAAAA,mBAAmBD,GAAa,CAEhCE,EAASA,UACiB,IAAtBF,EAAWG,OACX,0DACA,uBAGJ,MAAOC,EAAIC,EAAIC,EAAIC,GAAMP,EACzB,OAAOQ,EAAWA,YAACJ,EAAIC,EAAIC,EAAIC,EACnC,CAAO,MAhBkB,iBAgBAP,GAErBE,iBACiCO,IAA7BtB,EAAaa,GACb,wBAAwBA,KACxB,uBAEGb,EAAaa,IAGjBA"}
1
+ {"version":3,"file":"map.mjs.js","sources":["../../../../../../../node_modules/motion-utils/dist/es/easing/utils/map.mjs"],"sourcesContent":["import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n typeof process !== \"undefined\" &&\n process.env.NODE_ENV !== \"production\" &&\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n"],"names":["easingLookup","linear","noop","easeIn","easeInOut","easeOut","circIn","circInOut","circOut","backIn","backInOut","backOut","anticipate","definition","isBezierDefinition","process","env","NODE_ENV","invariant","length","x1","y1","x2","y2","cubicBezier","undefined"],"mappings":"6UAUA,MAAMA,EAAe,CACjBC,OAAQC,EAAIA,YACZC,EAAMA,iBACNC,EAASA,kBACTC,EAAOA,eACPC,EAAMA,iBACNC,EAASA,kBACTC,EAAOA,eACPC,EAAMA,iBACNC,EAASA,kBACTC,EAAOA,QACPC,WAAAA,EAAAA,+CAQAC,IAEA,GAAIC,EAAAA,mBAAmBD,GAAa,CAEb,oBAAZE,SACsB,eAAzBA,QAAQC,IAAIC,UACZC,EAASA,UACiB,IAAtBL,EAAWM,OACX,0DACA,uBAGR,MAAOC,EAAIC,EAAIC,EAAIC,GAAMV,EACzB,OAAOW,EAAWA,YAACJ,EAAIC,EAAIC,EAAIC,EACnC,CAAO,MAlBkB,iBAkBAV,GAEF,oBAAZE,SACsB,eAAzBA,QAAQC,IAAIC,UACZC,iBACiCO,IAA7BzB,EAAaa,GACb,wBAAwBA,KACxB,uBAEDb,EAAaa,IAGjBA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../@babel/runtime/helpers/defineProperty.js");var e=require("../../../@babel/runtime/helpers/classCallCheck.js"),s=require("../../../@babel/runtime/helpers/createClass.js"),t=require("react").createContext(),r=function(){function t(){e.default(this,t),this.usedNamespaces={}}return s.default(t,[{key:"addUsedNamespaces",value:function(e){var s=this;e.forEach(function(e){s.usedNamespaces[e]||(s.usedNamespaces[e]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();exports.I18nContext=t,exports.ReportNamespaces=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=require("react").createContext();exports.I18nContext=e,exports.ReportNamespaces=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};
2
2
  //# sourceMappingURL=context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sources":["../../../../../node_modules/react-i18next/dist/es/context.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport var I18nContext = createContext();\nexport var ReportNamespaces = function () {\n function ReportNamespaces() {\n _classCallCheck(this, ReportNamespaces);\n\n this.usedNamespaces = {};\n }\n\n _createClass(ReportNamespaces, [{\n key: \"addUsedNamespaces\",\n value: function addUsedNamespaces(namespaces) {\n var _this = this;\n\n namespaces.forEach(function (ns) {\n if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;\n });\n }\n }, {\n key: \"getUsedNamespaces\",\n value: function getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n }]);\n\n return ReportNamespaces;\n}();\nexport function composeInitialProps(ForComponent) {\n return function (ctx) {\n return new Promise(function (resolve) {\n var i18nInitialProps = getInitialProps();\n\n if (ForComponent.getInitialProps) {\n ForComponent.getInitialProps(ctx).then(function (componentsInitialProps) {\n resolve(_objectSpread(_objectSpread({}, componentsInitialProps), i18nInitialProps));\n });\n } else {\n resolve(i18nInitialProps);\n }\n });\n };\n}\nexport function getInitialProps() {\n var i18n = getI18n();\n var namespaces = i18n.reportNamespaces ? i18n.reportNamespaces.getUsedNamespaces() : [];\n var ret = {};\n var initialI18nStore = {};\n i18n.languages.forEach(function (l) {\n initialI18nStore[l] = {};\n namespaces.forEach(function (ns) {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n}"],"names":["I18nContext","createContext","ReportNamespaces","_classCallCheck","this","usedNamespaces","_createClass","key","value","namespaces","_this","forEach","ns","Object","keys"],"mappings":"gQAaWA,mBAAcC,gBACdC,EAAmB,WAC5B,SAASA,IACPC,UAAgBC,KAAMF,GAEtBE,KAAKC,eAAiB,EACxB,CAkBA,OAhBAC,EAAY,QAACJ,EAAkB,CAAC,CAC9BK,IAAK,oBACLC,MAAO,SAA2BC,GAChC,IAAIC,EAAQN,KAEZK,EAAWE,QAAQ,SAAUC,GACtBF,EAAML,eAAeO,KAAKF,EAAML,eAAeO,IAAM,EAC5D,EACF,GACC,CACDL,IAAK,oBACLC,MAAO,WACL,OAAOK,OAAOC,KAAKV,KAAKC,eAC1B,KAGKH,CACT,CAxB8B"}
1
+ {"version":3,"file":"context.js","sources":["../../../../../node_modules/react-i18next/dist/es/context.js"],"sourcesContent":["import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n if (!i18n) {\n console.warn('react-i18next:: getInitialProps: You will need to pass in an i18next instance by using initReactI18next');\n return {};\n }\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};"],"names":["I18nContext","createContext","constructor","this","usedNamespaces","addUsedNamespaces","namespaces","forEach","ns","getUsedNamespaces","Object","keys"],"mappings":"oEAKaA,MAAAA,mBAAcC,+DACpB,MACLC,WAAAA,GACEC,KAAKC,eAAiB,EACxB,CACAC,iBAAAA,CAAkBC,GAChBA,EAAWC,QAAQC,IACZL,KAAKC,eAAeI,KAAKL,KAAKC,eAAeI,IAAM,IAE5D,CACAC,iBAAAA,GACE,OAAOC,OAAOC,KAAKR,KAAKC,eAC1B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../@babel/runtime/helpers/defineProperty.js");function r(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function t(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach(function(r){e.default(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}var n={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:require("./unescape.js").unescape};exports.getDefaults=function(){return n},exports.setDefaults=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=t(t({},n),e)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});let e={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:require("./unescape.js").unescape,transDefaultProps:void 0};exports.getDefaults=()=>e;
2
2
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sources":["../../../../../node_modules/react-i18next/dist/es/defaults.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport { unescape } from './unescape.js';\nvar defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape: unescape\n};\nexport function setDefaults() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n defaultOptions = _objectSpread(_objectSpread({}, defaultOptions), options);\n}\nexport function getDefaults() {\n return defaultOptions;\n}"],"names":["ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","defaultOptions","bindI18n","bindI18nStore","transEmptyNodeValue","transSupportBasicHtmlNodes","transWrapTextNodes","transKeepBasicHtmlNodesFor","useSuspense","unescape","options","undefined"],"mappings":"uIAEA,SAASA,EAAQC,EAAQC,GAAkB,IAAIC,EAAOC,OAAOD,KAAKF,GAAS,GAAIG,OAAOC,sBAAuB,CAAE,IAAIC,EAAUF,OAAOC,sBAAsBJ,GAAaC,IAAkBI,EAAUA,EAAQC,OAAO,SAAUC,GAAO,OAAOJ,OAAOK,yBAAyBR,EAAQO,GAAKE,UAAY,IAAMP,EAAKQ,KAAKC,MAAMT,EAAMG,EAAU,CAAE,OAAOH,CAAM,CAExV,SAASU,EAAcC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAyB,MAAhBF,UAAUD,GAAaC,UAAUD,GAAK,GAAQA,EAAI,EAAKf,EAAQI,OAAOc,IAAS,GAAMC,QAAQ,SAAUC,GAAOC,EAAAA,QAAgBP,EAAQM,EAAKF,EAAOE,GAAO,GAAehB,OAAOkB,0BAA6BlB,OAAOmB,iBAAiBT,EAAQV,OAAOkB,0BAA0BJ,IAAmBlB,EAAQI,OAAOc,IAASC,QAAQ,SAAUC,GAAOhB,OAAOoB,eAAeV,EAAQM,EAAKhB,OAAOK,yBAAyBS,EAAQE,GAAO,EAAM,CAAE,OAAON,CAAQ,CAGrhB,IAAIW,EAAiB,CACnBC,SAAU,kBACVC,cAAe,GACfC,oBAAqB,GACrBC,4BAA4B,EAC5BC,mBAAoB,GACpBC,2BAA4B,CAAC,KAAM,SAAU,IAAK,KAClDC,aAAa,EACbC,kCAAUA,8BAML,WACL,OAAOR,CACT,sBANO,WACL,IAAIS,EAAUlB,UAAUC,OAAS,QAAsBkB,IAAjBnB,UAAU,GAAmBA,UAAU,GAAK,CAAA,EAClFS,EAAiBZ,EAAcA,EAAc,CAAE,EAAEY,GAAiBS,EACpE"}
1
+ {"version":3,"file":"defaults.js","sources":["../../../../../node_modules/react-i18next/dist/es/defaults.js"],"sourcesContent":["import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape,\n transDefaultProps: undefined\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;"],"names":["defaultOptions","bindI18n","bindI18nStore","transEmptyNodeValue","transSupportBasicHtmlNodes","transWrapTextNodes","transKeepBasicHtmlNodesFor","useSuspense","unescape","transDefaultProps","undefined","getDefaults"],"mappings":"oEACA,IAAIA,EAAiB,CACnBC,SAAU,kBACVC,cAAe,GACfC,oBAAqB,GACrBC,4BAA4B,EAC5BC,mBAAoB,GACpBC,2BAA4B,CAAC,KAAM,SAAU,IAAK,KAClDC,aAAa,oCACLC,SACRC,uBAAmBC,uBAQMC,IAAMX"}
@@ -1,2 +1,2 @@
1
- "use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.getI18n=function(){return e},exports.setI18n=function(t){e=t};
1
+ "use strict";let e;Object.defineProperty(exports,"__esModule",{value:!0});exports.getI18n=()=>e,exports.setI18n=t=>{e=t};
2
2
  //# sourceMappingURL=i18nInstance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18nInstance.js","sources":["../../../../../node_modules/react-i18next/dist/es/i18nInstance.js"],"sourcesContent":["var i18nInstance;\nexport function setI18n(instance) {\n i18nInstance = instance;\n}\nexport function getI18n() {\n return i18nInstance;\n}"],"names":["i18nInstance","instance"],"mappings":"aAAA,IAAIA,yEAIG,WACL,OAAOA,CACT,kBALO,SAAiBC,GACtBD,EAAeC,CACjB"}
1
+ {"version":3,"file":"i18nInstance.js","sources":["../../../../../node_modules/react-i18next/dist/es/i18nInstance.js"],"sourcesContent":["let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;"],"names":["i18nInstance","getI18n","instance"],"mappings":"aAAA,IAAIA,yEAImBC,IAAMD,kBAHNE,IACrBF,EAAeE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./defaults.js"),t=require("./i18nInstance.js"),r={type:"3rdParty",init:function(r){e.setDefaults(r.options.react),t.setI18n(r)}};exports.initReactI18next=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./i18nInstance.js");const t={type:"3rdParty",init(t){e.setI18n(t)}};exports.initReactI18next=t;
2
2
  //# sourceMappingURL=initReactI18next.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"initReactI18next.js","sources":["../../../../../node_modules/react-i18next/dist/es/initReactI18next.js"],"sourcesContent":["import { setDefaults } from './defaults.js';\nimport { setI18n } from './i18nInstance.js';\nexport var initReactI18next = {\n type: '3rdParty',\n init: function init(instance) {\n setDefaults(instance.options.react);\n setI18n(instance);\n }\n};"],"names":["initReactI18next","type","init","instance","setDefaults","options","react","setI18n"],"mappings":"kIAEWA,EAAmB,CAC5BC,KAAM,WACNC,KAAM,SAAcC,GAClBC,EAAAA,YAAYD,EAASE,QAAQC,OAC7BC,EAAOA,QAACJ,EACV"}
1
+ {"version":3,"file":"initReactI18next.js","sources":["../../../../../node_modules/react-i18next/dist/es/initReactI18next.js"],"sourcesContent":["import { setI18n } from './i18nInstance.js';\nexport const initReactI18next = {\n type: '3rdParty',\n init(instance) {\n setI18n(instance);\n }\n};"],"names":["initReactI18next","type","init","instance","setI18n"],"mappings":"uGACO,MAAMA,EAAmB,CAC9BC,KAAM,WACNC,IAAAA,CAAKC,GACHC,EAAOA,QAACD,EACV"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,t={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},p=function(e){return t[e]};exports.unescape=function(t){return t.replace(e,p)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},t=e=>p[e];exports.unescape=p=>p.replace(e,t);
2
2
  //# sourceMappingURL=unescape.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unescape.js","sources":["../../../../../node_modules/react-i18next/dist/es/unescape.js"],"sourcesContent":["var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nvar htmlEntities = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"',\n '&nbsp;': ' ',\n '&#160;': ' ',\n '&copy;': '©',\n '&#169;': '©',\n '&reg;': '®',\n '&#174;': '®',\n '&hellip;': '…',\n '&#8230;': '…',\n '&#x2F;': '/',\n '&#47;': '/'\n};\n\nvar unescapeHtmlEntity = function unescapeHtmlEntity(m) {\n return htmlEntities[m];\n};\n\nexport var unescape = function unescape(text) {\n return text.replace(matchHtmlEntity, unescapeHtmlEntity);\n};"],"names":["matchHtmlEntity","htmlEntities","unescapeHtmlEntity","m","text","replace"],"mappings":"oEAAA,IAAIA,EAAkB,oGAClBC,EAAe,CACjB,QAAS,IACT,QAAS,IACT,OAAQ,IACR,QAAS,IACT,OAAQ,IACR,QAAS,IACT,SAAU,IACV,QAAS,IACT,SAAU,IACV,QAAS,IACT,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,QAAS,IACT,SAAU,IACV,WAAY,IACZ,UAAW,IACX,SAAU,IACV,QAAS,KAGPC,EAAqB,SAA4BC,GACnD,OAAOF,EAAaE,EACtB,mBAEsB,SAAkBC,GACtC,OAAOA,EAAKC,QAAQL,EAAiBE,EACvC"}
1
+ {"version":3,"file":"unescape.js","sources":["../../../../../node_modules/react-i18next/dist/es/unescape.js"],"sourcesContent":["const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&amp;': '&',\n '&#38;': '&',\n '&lt;': '<',\n '&#60;': '<',\n '&gt;': '>',\n '&#62;': '>',\n '&apos;': \"'\",\n '&#39;': \"'\",\n '&quot;': '\"',\n '&#34;': '\"',\n '&nbsp;': '\\u00A0',\n '&#160;': '\\u00A0',\n '&copy;': '©',\n '&#169;': '©',\n '&reg;': '®',\n '&#174;': '®',\n '&hellip;': '…',\n '&#8230;': '…',\n '&#x2F;': '/',\n '&#47;': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);"],"names":["matchHtmlEntity","htmlEntities","unescapeHtmlEntity","m","text","replace"],"mappings":"oEAAA,MAAMA,EAAkB,oGAClBC,EAAe,CACnB,QAAS,IACT,QAAS,IACT,OAAQ,IACR,QAAS,IACT,OAAQ,IACR,QAAS,IACT,SAAU,IACV,QAAS,IACT,SAAU,IACV,QAAS,IACT,SAAU,IACV,SAAU,IACV,SAAU,IACV,SAAU,IACV,QAAS,IACT,SAAU,IACV,WAAY,IACZ,UAAW,IACX,SAAU,IACV,QAAS,KAELC,EAAqBC,GAAKF,EAAaE,oBACrBC,GAAQA,EAAKC,QAAQL,EAAiBE"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../@babel/runtime/helpers/slicedToArray.js"),t=require("../../../@babel/runtime/helpers/defineProperty.js"),r=require("../../../@babel/runtime/helpers/typeof.js"),n=require("react"),o=require("./context.js"),a=require("./utils.js"),u=require("./defaults.js"),i=require("./i18nInstance.js");function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?s(Object(n),!0).forEach(function(r){t.default(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}exports.useTranslation=function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=s.i18n,l=n.useContext(o.I18nContext)||{},p=l.i18n,d=l.defaultNS,g=f||p||i.getI18n();if(g&&!g.reportNamespaces&&(g.reportNamespaces=new o.ReportNamespaces),!g){a.warnOnce("You will need to pass in an i18next instance by using initReactI18next");var y=function(e,t){return"string"==typeof t?t:t&&"object"===r.default(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},b=[y,{},!1];return b.t=y,b.i18n={},b.ready=!1,b}g.options.react&&void 0!==g.options.react.wait&&a.warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var j=c(c(c({},u.getDefaults()),g.options.react),s),O=j.useSuspense,m=j.keyPrefix,v=t||d||g.options&&g.options.defaultNS;v="string"==typeof v?[v]:v||["translation"],g.reportNamespaces.addUsedNamespaces&&g.reportNamespaces.addUsedNamespaces(v);var h=(g.isInitialized||g.initializedStoreOnce)&&v.every(function(e){return a.hasLoadedNamespace(e,g,j)});function w(){return g.getFixedT(s.lng||null,"fallback"===j.nsMode?v:v[0],m)}var N=n.useState(w),P=e.default(N,2),x=P[0],S=P[1],q=v.join();s.lng&&(q="".concat(s.lng).concat(q));var I,E,D,R=(I=q,D=n.useRef(),n.useEffect(function(){D.current=E?D.current:I},[I,E]),D.current),k=n.useRef(!0);n.useEffect(function(){var e=j.bindI18n,t=j.bindI18nStore;function r(){k.current&&S(w)}return k.current=!0,h||O||(s.lng?a.loadLanguages(g,s.lng,v,function(){k.current&&S(w)}):a.loadNamespaces(g,v,function(){k.current&&S(w)})),h&&R&&R!==q&&k.current&&S(w),e&&g&&g.on(e,r),t&&g&&g.store.on(t,r),function(){k.current=!1,e&&g&&e.split(" ").forEach(function(e){return g.off(e,r)}),t&&g&&t.split(" ").forEach(function(e){return g.store.off(e,r)})}},[g,q]);var A=n.useRef(!0);n.useEffect(function(){k.current&&!A.current&&S(w),A.current=!1},[g,m]);var L=[x,g,h];if(L.t=x,L.i18n=g,L.ready=h,h)return L;if(!h&&!O)return L;throw new Promise(function(e){s.lng?a.loadLanguages(g,s.lng,v,function(){return e()}):a.loadNamespaces(g,v,function(){return e()})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("../../../i18next/dist/esm/i18next.js"),t=require("./context.js"),s=require("./utils.js"),r=require("./defaults.js"),a=require("./i18nInstance.js");const i=e=>new Proxy(e,{get:(e,n)=>"__original"===n?e:Reflect.get(e,n)}),o={t:(e,n)=>{if(s.isString(n))return n;if(s.isObject(n)&&s.isString(n.defaultValue))return n.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){const n=e[e.length-1];return"function"==typeof n?"":n}return e},ready:!1},u=()=>()=>{};exports.useTranslation=(l,c={})=>{const{i18n:g}=c,{i18n:d,defaultNS:f}=e.useContext(t.I18nContext)||{},p=g||d||a.getI18n();p&&!p.reportNamespaces&&(p.reportNamespaces=new t.ReportNamespaces),p||s.warnOnce(p,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const y=e.useMemo(()=>({...r.getDefaults(),...p?.options?.react,...c}),[p,c]),{useSuspense:S,keyPrefix:m,bindI18n:x,bindI18nStore:b}=y,N=l||f||p?.options?.defaultNS,I=s.isString(N)?[N]:N||["translation"],h=JSON.stringify(I),w=e.useMemo(()=>I,[h]);p?.reportNamespaces?.addUsedNamespaces?.(w);const k=e.useRef(0),v=e.useCallback(e=>{if(!p)return u;return((e,{bindI18n:n,bindI18nStore:t},s)=>(n&&e.on(n,s),t&&e.store.on(t,s),()=>{n&&e.off(n,s),t&&e.store.off(t,s)}))(p,{bindI18n:x,bindI18nStore:b},()=>{k.current+=1,e()})},[p,x,b]),E=e.useRef(),_=e.useCallback(()=>{if(!p)return o;const e=!(!p.isInitialized&&!p.initializedStoreOnce)&&w.every(e=>s.hasLoadedNamespace(e,p,y)),t=c.lng||p.language,r=k.current,a="function"==typeof m?n.keyFromSelector(m,{...p.options,ns:w}):m,i=E.current;if(i&&i.i18n===p&&i.ready===e&&i.lng===t&&i.namespaces===w&&i.keyPrefix===a&&i.revision===r)return i;const u={t:p.getFixedT(t,"fallback"===y.nsMode?w:w[0],m,{scopeNs:w}),i18n:p,ready:e,lng:t,namespaces:w,keyPrefix:a,revision:r};return E.current=u,u},[p,w,m,y,c.lng]),[O,j]=e.useState(0);let R,{t:T,ready:L}=e.useSyncExternalStore(v,_,_);p&&S&&!L&&(R=new Promise(e=>{const n=()=>e();c.lng?s.loadLanguages(p,c.lng,w,n):s.loadNamespaces(p,w,n)}),({t:T,ready:L}=_())),e.useEffect(()=>{if(p&&!L&&!S){const e=()=>j(e=>e+1);c.lng?s.loadLanguages(p,c.lng,w,e):s.loadNamespaces(p,w,e)}},[p,c.lng,w,L,S,O]);const P=p||{},q=e.useRef(null),A=e.useMemo(()=>{const e=P,n=`${(t=e).language}|${t.resolvedLanguage}|${t.languages?.join(",")}`;var t;q.current?.original===e&&q.current.lang===n||(q.current={original:e,lang:n,wrapper:i(e)});const r=q.current.wrapper,a=L||S?T:(...e)=>(s.warnOnce(p,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),T(...e)),o=[a,r,L];return o.t=a,o.i18n=r,o.ready=L,o},[T,P,L,P.resolvedLanguage,P.language,P.languages]);if(p&&S&&!L)throw s.inDevelopment()&&s.warnOnce(p,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),R;return A};
2
2
  //# sourceMappingURL=useTranslation.js.map